This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Symbols in discarded sections.


The ELF specification says that when a COMDAT section is discarded, the global 
symbols defined relative to that section should be converted to undefined 
symbols.

Failure to do this was causing problems problems linking some C++ code from 
different vendors. One object file defined a comdat section with a weak 
definition of a symbol. The other defined the same comdat section with a 
strong definition of the symbol. ld discarded the latter section, but still 
resolved symbol references to the [discarded] strong definition.

Tested on i686-linux and cross to arm-none-eabi.
Ok?

2004-12-01  Paul Brook  <paul@codesourcery.com>

bfd/
 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
 sections undefined.
ld/testsuite/
 * ld-elf/group1.d: New test.
 * ld-elf/group.ld, ld-elf/group1a.s, ld-elf/group1b.s: New test.
2004-12-01  Paul Brook  <paul@codesourcery.com>

bfd/
	* elflink.c (elf_link_add_object_symbols): Make symbols from discarded
	sections undefined.
ld/testsuite/
	* ld-elf/group1.d: New test.
	* ld-elf/group.ld, ld-elf/group1a.s, ld-elf/group1b.s: New test.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]