ld default hash style
Xi Ruoyao
xry111@xry111.site
Tue Apr 1 04:02:36 GMT 2025
On Tue, 2025-04-01 at 01:27 +0000, Tavis Ormandy wrote:
> Hello, I maintain a set of patches to make some old binaries work on
> modern Linux. The binaries require some ancient ld.so, but it can load
> files produced by modern ld, so I preload some compatability shims and
> it works great.
>
> I started to get reports recently that they just crash and don't load at
> all. The bug was that the ancient loader didn't understand the GNU hash
> style and somehow these users were not getting the old-style hashes.
> Forcing hash-style=sysv on the commandline gets it to work again.
>
> Did the default change recently? If not, what could have caused the
> change?
It's configurable when binutils is built, using the --enable-default-
hash-style=gnu option. This option isn't the default, thus you need to
ask your distro if it has recently added the option.
But FWIW most major distros have added this for decades, not recently.
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
More information about the Binutils
mailing list