bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/20513] New: GNU ld does not ignore symbols defined in sections m


From: rguenth at gcc dot gnu.org
Subject: [Bug ld/20513] New: GNU ld does not ignore symbols defined in sections marked EXCLUDE
Date: Thu, 25 Aug 2016 07:27:09 +0000

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

            Bug ID: 20513
           Summary: GNU ld does not ignore symbols defined in sections
                    marked EXCLUDE
           Product: binutils
           Version: 2.26
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

When linking two object files, one with a definition of symbol FOO and one with
a definition of symbol FOO in a section marked with SHF_EXCLUDE then GNU ld
complains about 'multiple definitions of 'FOO''.  GOLD handles this situation
just fine.

t1.s:
        .text
        .section        .text.startup,"ax",@progbits
        .p2align 4,,15
        .globl  main
        .type   main, @function
main:

t2.s:
        .text
        .section        .text.startup,"axe",@progbits
        .p2align 4,,15
        .globl  main
        .type   main, @function
main:

(ignore assembler warnings about bogus section attributes)

> ld t1.o t2.o -o a.out
t2.o: In function `main':
(.text.startup+0x0): multiple definition of `main'
t1.o:(.text.startup+0x0): first defined here
> gold t1.o t2.o -o a.out

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]