bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/24697] ld powerpc 2.31.1 crashes when linking a library containi


From: amodra at gmail dot com
Subject: [Bug ld/24697] ld powerpc 2.31.1 crashes when linking a library containing R_PPC_EMB_SDA21 relocation symbols
Date: Wed, 19 Jun 2019 02:38:29 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=24697

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amodra at gmail dot com

--- Comment #1 from Alan Modra <amodra at gmail dot com> ---
> on Debian Stretch with gcc 6.3.0 and
> corresponding linker we didn't had that problem.

If that is the case you were not using the debian stretch linker to link your
3rd. party ELF file into a shared library.  The error message dates back to
1996, git commit e25a798839b.

Also, from a quick look at the EABI definition of R_PPC_EMB_SDA21 I believe the
GNU ld implementation for that relocation has been broken ever since GNU ld
recognized it.  R_PPC_EMB_SDA21 is supposed to operate on the least significant
21 bits of the 24-bit field at r_offset according to the EABI document I have,
version 1.0 dated Jan 1995.  GNU ld operates on a 32-bit field at r_offset,
which means we have an inconsistency that matters for big-endian targets.

Fixing GNU ld would not be hard for someone familiar with the sources, and you
could easily be compatible with GNU as objects (that emit R_PPC_EMB_SDA21
operating on a 32-bit field) and object files complying with the EABI by simply
masking off the two low bits of r_offset.

However, given the fact that no one has bothered to do so in 23 years suggests
that no one will take action on this bug.  The double free has likely already
been fixed..

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]