Re: GNU binutils 2.17.50 retirement planning

From: David Chisnall <theraven_at_FreeBSD.org>
Date: Sun, 25 Nov 2018 12:52:08 +0000
On 23 Nov 2018, at 16:23, Ed Maste <emaste_at_freebsd.org> wrote:
> 
> For some time we have been incrementally working to retire the use of
> obsolete GNU Binutils 2.17.50 tools. At present we still install three
> binutils by default:
> 
> as
> ld.bfd
> objdump

We probably need to kill ld.bfd before 12.0.  It predates ifunc and so interprets anything with an ifunc as requiring a copy relocation.  This means that if you use it to link against any shared library (like, say, libc.so.7 in FreeBSD 12.0) that uses ifuncs then it will insert a relocation so that the ifunc resolver (which contains PC-relative addresses of other functions) will be copied into the main binary.  This then causes your program to crash the first time anything calls memcpy, in a very difficult-to-debug way (it jumps into a random bit of your main binary, runs for a bit, and then dies).

David
Received on Sun Nov 25 2018 - 11:52:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:19 UTC