[PATCH 05/10] ld: Initial DT_RELR support
H.J. Lu
hjl.tools@gmail.com
Sat Jan 8 18:32:49 GMT 2022
On Fri, Jan 7, 2022 at 6:42 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Fri, Jan 7, 2022 at 6:10 PM Fangrui Song <i@maskray.me> wrote:
> >
> > 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.
> >
> > Why does --no-relax suppress -z nopack-relative-relocs?
>
> -z nopack-relative-relocs uses the linker relaxation. It is
> possible to do it with --no-relax. But it requires a major change
> in the linker relaxation.
>
It turns out to be a simple change. Fixed in the v2 patch.
H.J.
More information about the Binutils
mailing list