GNU binutils 2.17.50 retirement planning
David Chisnall
theraven at FreeBSD.org
Sun Nov 25 12:52:22 UTC 2018
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
More information about the freebsd-current
mailing list