This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Patch to recent ELF linker enhancement
- To: nickc at cygnus dot com
- Subject: Re: Patch to recent ELF linker enhancement
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 13 Dec 1999 21:05:13 -0500
- CC: binutils at sourceware dot cygnus dot com
- References: <199912140156.RAA24299@elmo.cygnus.com>
Date: Mon, 13 Dec 1999 17:56:38 -0800
From: Nick Clifton <nickc@cygnus.com>
: 1999-12-13 Nick Clifton <nickc@cygnus.com>
:
: * elflink.h (elf_link_add_archive_symbols): Do not bother
: checking for defined commons if the element has already been
: linked in.
:
: I think this patch will force the linker to read in archive elements
: which it does not need to read in.
Err, presumably you mean the original patch, not my little bugfix
patch represneted by the ChangeLog entry above ?
No, I didn't. If h->root.type is, say, bfd_link_hash_defined, then
your recent small patch would call _bfd_get_elt_at_filepos, unlike the
original code.
However, you are right about my patch being unnecessary - it is the
elf_link_is_defined_archive_sytmbol() itself that is wrong. I was
forgetting to check to see if the symbol was allocated to the common
section. The patch below fixes this and prevents the above test case
from generating an error.
1999-12-13 Nick Clifton <nickc@cygnus.com>
* elflink.h (elf_link_is_defined_archive_symbol): Check to see
if the symbol is in the common section.
Looks reasonable.
Some day we will have to handle processor specific STB_* and SHN_*
values. For example, for MIPS ELF a symbol in section
SHN_MIPS_SCOMMON is a common symbol. Perhaps we can use the
backend_symbol_processing hook somehow.
Ian