[PATCH 05/10] ld: Initial DT_RELR support
Fangrui Song
i@maskray.me
Sat Jan 8 08:30:44 GMT 2022
On 2022-01-07, H.J. Lu via Binutils wrote:
>Add a -z pack-relative-relocs option to enable DT_RELR and create a
>relr.dyn section for DT_RELR.
>
>-z pack-relative-relocs implies -z combreloc and --relax. --no-relax
>and -z nocombreloc imply -z nopack-relative-relocs.
>
>-z pack-relative-relocs is chosen over the similar option in lld,
>--pack-dyn-relocs=relr, to implement a glibc binary lockout mechanism
>with a special glibc version symbol, to avoid random crashes of DT_RELR
>binaries with the existing glibc binaries.
I think -z pack-relative-relocs is orthogonal to -z combreloc.
-z combreloc affects how .rela.dyn is sorted and whether RELACOUNT is
generated. It has nothing to do with .relr.dyn, which is a different section.
More information about the Libc-alpha
mailing list