[RFA] Don't warn when using ld --wrap and code in Thumb-state on ARM

Matthew Gretton-Dann matthew.gretton-dann@arm.com
Thu Apr 1 15:55:00 GMT 2010


Alan,

On Tue, 2010-03-30 at 09:42 +1030, Alan Modra wrote:
> On Mon, Mar 29, 2010 at 04:48:27PM +0100, Matthew Gretton-Dann wrote:
> > However, this change in symbol type is usually allowed for function
> > symbols - _bfd_elf_merge_symbol indicates this.  But in this case this
> > hasn't been allowed because the test for both symbols being function
> > type symbols is done after an early exit for weak symbols.
> > 
> > The fix is to move the test for merging two function symbols, and so
> > whether to allow a symbol type change earlier in _bfd_elf_merge_symbol.
> 
> I'd rather see a fix to the check for weak versioned symbols.  Ian
> added that code here:
> cvs diff -r 1.10 -r 1.11 elflink.h
> 
> And made a fix here:
> cvs diff -r 1.19 -r 1.20 elflink.h
> 
> The test has remained functionally unchanged since.  Ian may have some
> old mail archived that can shed some light on exactly why the test was
> added.  I couldn't see anything for the first patch in the binutils
> mail archives, and the bug-gnu-utils archive doesn't go back far
> enough.

Thanks for your comments.  Please find attached a reworked patch that
tightens the test you are talking about to make sure that at least on of
the symbols being merged is weak (which is what the comment says we are
testing for).  However, I am aware that this may not be precisely what
you meant - so any further comments you have would be welcome.

I have tested this on arm-none-linux-gnueabi and x86_64-none-linux-gnu.

Proposed ChangeLog:

2010-04-01  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>

	* elflink.c (_bfd_elf_merge_symbol): Tighten up the test for
	early exit due to merging the same weak symbol to test that the
	symbols are actually weak.

Thanks,

Matt

-- 
Matthew Gretton-Dann
Principal Engineer - Tools, PD Software
ARM Limited
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1004-wrap-fix.patch
Type: text/x-patch
Size: 1405 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100401/5d9a2d02/attachment.bin>


More information about the Binutils mailing list