[patch] Symbols in discarded sections.

Paul Brook paul@codesourcery.com
Wed Dec 1 21:04:00 GMT 2004


This time with the right attachment.

On Wednesday 01 December 2004 20:32, Paul Brook wrote:
> 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.group_undef
Type: text/x-diff
Size: 2432 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20041201/2083054d/attachment.bin>


More information about the Binutils mailing list