[Bug target/11322] New: SH profiler outputs multiple definitions of symbol

marcus at mc dot pp dot se gcc-bugzilla@gcc.gnu.org
Thu Jun 26 01:00:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11322

           Summary: SH profiler outputs multiple definitions of symbol
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: marcus at mc dot pp dot se
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: shl-unknown-netbsdelf1.6T
  GCC host triplet: shl-unknown-netbsdelf1.6T
GCC target triplet: shl-unknown-netbsdelf1.6T

When I compile anything with profiling enabled, the assembler
complains that a symbol is doubly defined:

doreimon:~% cat foo.c
void foo() { }
doreimon:~% gcc -c -pg foo.c
/var/tmp//ccqt8nci.s: Assembler messages:
/var/tmp//ccqt8nci.s:19: Error: symbol `.LP3' is already defined
doreimon:~% 

Looking at the generated assembler code, this is indeed the case:

        .file   "foo.c"
        .text
        .little
        .text
        .align 1
        .global foo
        .type   foo, @function
foo:
        .data
        .align 2
.LP3:
        .long   0
        .text
        mov.l   .LP3,r1
        mova    .LP3r,r0
        jmp     @r1
        nop
        .align  2
.LP3:   .long   __mcount
.LP3r:
        mov.l   r14,@-r15
        mov     r15,r14
        mov     r14,r15
        mov.l   @r15+,r14
        rts     
        nop
        .size   foo, .-foo
        .ident  "GCC: (GNU) 3.3"



More information about the Gcc-bugs mailing list