[PATCH 0/7] Support DT_RELR relative relocation format
Joseph Myers
joseph@codesourcery.com
Fri Feb 4 20:12:36 GMT 2022
On Fri, 4 Feb 2022, H.J. Lu via Libc-alpha wrote:
> On Fri, Feb 4, 2022 at 12:00 PM Joseph Myers <joseph@codesourcery.com> wrote:
> >
> > On Thu, 3 Feb 2022, H.J. Lu via Libc-alpha wrote:
> >
> > > DT_RELR is enabled in glibc shared libraries and position independent
> > > executables (PIE) automatically if linker supports -z pack-relative-relocs
> > > nd the architecture defines SUPPORT_DT_RELR in config.h. At the moment,
> > > only x86 targets define SUPPORT_DT_RELR.
> >
> > The patch 1 description says "This patch is simpler than Chrome OS's glibc
> > patch and makes ELF_DYNAMIC_DO_RELR available to all ports.".
> >
> > What exactly would other architectures need to add in glibc to provide
> > RELR support, since I don't see any actual architecture-specific code in
>
> DT_RELR is enabled only if linker supports -z report-relative-reloc option
> which adds GLIBC_ABI_DT_RELR dependency in the linker output to
> prevent random crashes with the older glibc binaries.
What do you mean by "is enabled"?
Building glibc itself to use such relocations can properly depend on
linker support.
The set of binaries (executables and shared libraries) glibc can load must
not depend on linker support.
Those are two different questions.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list