https://sourceware.org/bugzilla/show_bug.cgi?id=21762

            Bug ID: 21762
           Summary: Use of STABS directives on MIPS causes label to be
                    incorrectly marked as MIPS16
           Product: binutils
           Version: 2.28
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: james410 at cowgill dot org.uk
  Target Milestone: ---

On MIPS, attempting to use a STABS directive (.stabs, .stabn or .stabd) before
a .set directive has occured in the input file, causes any preceding labels to
be marked as MIPS16.

> $ cat test.s
> main:
>       .stabd 0, 0, 0
> $ mips-linux-gnu-as test.s -o test.o
> $ readelf --syms test.o | grep main
>      4: 00000000     0 NOTYPE  LOCAL  DEFAULT [MIPS16]     1 main

Passing -no-mips16 causes as to emit a micromips symbol instead:
> $ mips-linux-gnu-as -no-mips16 test.s -o test.o
> $ readelf --syms test.o | grep main
>      4: 00000000     0 NOTYPE  LOCAL  DEFAULT [MICROMIPS]     1 main

Using some noop .set directive before the .stabd works around the bug:
> $ cat test.s
> main:
>       .set mips0
>       .stabd 0, 0, 0
> $ mips-linux-gnu-as test.s -o test.o
> $ readelf --syms test.o | grep main
>      4: 00000000     0 NOTYPE  LOCAL  DEFAULT    1 main

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to