about summary refs log tree commit diff
path: root/ports/sysdeps/hppa/fpu/feenablxcpt.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2021-01-19 17:17:01 +0000
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2021-01-20 14:42:46 +0000
commitb5dbaa167f4317c312e22fb761036d3570e6614a (patch)
tree7a975d689fce089d8731b521b7b0bc78704a8793 /ports/sysdeps/hppa/fpu/feenablxcpt.c
parent54afd0132a909969862bb2ce96bd5e95beab324a (diff)
downloadglibc-b5dbaa167f4317c312e22fb761036d3570e6614a.tar.gz
glibc-b5dbaa167f4317c312e22fb761036d3570e6614a.tar.xz
glibc-b5dbaa167f4317c312e22fb761036d3570e6614a.zip
csu: Move static pie self relocation later [BZ #27072]
IFUNC resolvers may depend on tunables and cpu feature setup so
move static pie self relocation after those.

It is hard to guarantee that the ealy startup code does not rely
on relocations so this is a bit fragile. It would be more robust
to handle RELATIVE relocs early and only IRELATIVE relocs later,
but the current relocation processing code cannot do that.

The early startup code up to relocation processing includes

  _dl_aux_init (auxvec);
  __libc_init_secure ();
  __tunables_init (__environ);
  ARCH_INIT_CPU_FEATURES ();
  _dl_relocate_static_pie ();

These are simple enough that RELATIVE relocs can be avoided.

The following steps include

  ARCH_SETUP_IREL ();
  ARCH_SETUP_TLS ();
  ARCH_APPLY_IREL ();

On some targets IRELATIVE processing relies on TLS setup on
others TLS setup relies on IRELATIVE relocs, so the right
position for _dl_relocate_static_pie is target dependent.
For now move self relocation as early as possible on targets
that support static PIE.

Fixes bug 27072.
Diffstat (limited to 'ports/sysdeps/hppa/fpu/feenablxcpt.c')
0 files changed, 0 insertions, 0 deletions