This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: New symbol binding to fix C++ ABI
- From: Nick Clifton <nickc at redhat dot com>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>, Binutils <binutils at sourceware dot org>, Jason Merrill <jason at redhat dot com>
- Date: Thu, 23 Jul 2009 14:00:05 +0100
- Subject: Re: New symbol binding to fix C++ ABI
- References: <4A24405B.8030602@redhat.com> <6dc9ffc80906011500l61d073a5lc64ff5a3237c5bae@mail.gmail.com> <4A246738.9070804@redhat.com>
Hi Uli,
Updated patch attached. It's officially a gas test but because expect
runs readelf it tests that, too.
Thanks for submitting this patch, and please accept my apologese for
taking so long to review it.
The patch is fine and I have committed it, although I have made a few
small additions. I have updated the description of GAS's .type
directive to include the gnu_unique_object type. I added a description
of the 'u' character in the output of nm and "objdump --syms" and I made
mention of the support for this new feature in the gas/NEWS and ld/NEWS
files.
Cheers
Nick
gas/ChangeLog
2009-07-23 Ulrich Drepper <drepper@redhat.com>
* config/obj-elf.c (obj_elf_type): Add code to support a type of
gnu_unique_object.
* doc/as.texinfo: Document new feature of .type directive.
* NEWS: Mention support for gnu_unique_object symbol type.
include/elf/ChangeLog
2009-07-23 Ulrich Drepper <drepper@redhat.com>
* common.h (STB_GNU_UNIQUE): Define.
ld/ChangeLog
2009-07-23 Ulrich Drepper <drepper@redhat.com>
* NEWS: Mention the linker's support for symbols with a binding of
STB_GNU_UNIQUE.
gas/testsuite/ChangeLog
2009-07-23 Ulrich Drepper <drepper@redhat.com>
* gas/elf/type.s: Add unique global symbol definition.
* gas/elf/type.e: Add expected readelf output for global unique
symbol.
elfcpp/ChangeLog
2009-07-23 Ulrich Drepper <drepper@redhat.com>
* elfcpp.h (enum STB): Add STB_GNU_UNIQUE.
binutils/ChangeLog
2009-07-23 Ulrich Drepper <drepper@redhat.com>
* readelf.c (get_symbol_binding): For Linux targeted files return
UNIQUE for symbols with the STB_GNU_UNIQUE binding.
* doc/binutils.texi: Document the meaning of the 'u' symbol
binding in the output of nm and objdump --syms.
bfd/ChangeLog
2009-07-23 Ulrich Drepper <drepper@redhat.com>
* elf-bfd.h (struct elf_link_hash_entry): Add unique_global field.
* elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols
with the BSF_GNU_UNIQUE flag bit set.
* elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag
for symbols with STB_GNU_UNIQUE binding.
* elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols
with the STB_GNU_UNIQUE binding.
(elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for
symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for
symbols with the unique_global field set.
(elf_link_output_extsym): Set unique_global field for symbols with
the STB_GNU_UNIQUE binding.
* syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit.
(bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE
symbols.
(bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE
symbols.
* bfd-in2.h: Regenerate.