This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PR12365 and common symbols
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: binutils at sourceware dot org
- Cc: Alan Modra <amodra at gmail dot com>
- Date: Fri, 22 Apr 2011 15:32:38 -0700
- Subject: Re: PR12365 and common symbols
- References: <20110420002520.GG19947@bubble.grove.modra.org>
On Tue, Apr 19, 2011 at 5:25 PM, Alan Modra <amodra@gmail.com> wrote:
> This patch makes ld keep IR-only common symbols in their own specially
> marked common section, so that ld can report an error if such a symbol
> is referenced.
>
> bfd/
> ? ? ? ?PR ld/12365
> ? ? ? ?* elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols
> ? ? ? ?in their own common section.
> ? ? ? ?* elflink.c (elf_link_add_object_symbols): Likewise.
> ? ? ? ?* linker.c (generic_link_check_archive_element): Don't lose flags
> ? ? ? ?if common section is pre-existing.
> ? ? ? ?(_bfd_generic_link_add_one_symbol): Likewise.
> ld/
> ? ? ? ?PR ld/12365
> ? ? ? ?* ldfile.c (ldfile_try_open_bfd): Move code creating and switching
> ? ? ? ?to plugin IR BFD..
> ? ? ? ?* ldmain.c (add_archive_element): ..and similar code here..
> ? ? ? ?* plugin.c (plugin_maybe_claim): ..to here. ?New function.
> ? ? ? ?(plugin_call_claim_file): Make static.
> ? ? ? ?(asymbol_from_plugin_symbol): Set ELF st_shndx for common syms.
> ? ? ? ?(plugin_multiple_common): New function.
> ? ? ? ?(plugin_call_all_symbols_read): Hook in plugin_multiple_common.
> ? ? ? ?* plugin.h (plugin_call_claim_file): Don't declare.
> ? ? ? ?(plugin_maybe_claim): Declare.
>
BFD linker still doesn't work right:
http://www.sourceware.org/bugzilla/show_bug.cgi?id=12696
--
H.J.