glibc/sysdeps
H.J. Lu 81467d4b61 elf: Add optimization barrier for __ehdr_start and _end
rtld.c has

extern const ElfW(Ehdr) __ehdr_start attribute_hidden;
...
  _dl_rtld_map.l_map_start = (ElfW(Addr)) &__ehdr_start;
  _dl_rtld_map.l_map_end = (ElfW(Addr)) _end;

As

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120653

shows, compiler may generate run-time relocation on __ehdr_start with

	movq	.LC0(%rip), %xmm0
...
	.section	.data.rel.ro.local,"aw"
	.align 8
.LC0:
	.quad	__ehdr_start

This won't work before run-time relocation is finished in rtld.c.  Add
optimization barrier to prevent run-time relocations against __ehdr_start
and _end.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2025-06-16 08:43:40 +08:00
..
aarch64 aarch64: fix typo in sysdeps/aarch64/Makefile 2025-06-10 10:48:07 +01:00
alpha
arc
arm
csky
generic generic: Add missing parameter name to __getrandom_early_init 2025-05-28 10:00:41 +02:00
gnu
hppa
htl htl: move pthread_key_*, pthread_get/setspecific 2025-06-15 21:21:12 +02:00
hurd
i386 math: Remove i386 ilogb/ilogbf/llogb/llogbf 2025-06-02 13:32:19 -03:00
ieee754 math: Optimize float ilogb/llogb 2025-06-02 13:32:19 -03:00
loongarch math: Optimize float ilogb/llogb 2025-06-02 13:32:19 -03:00
m68k math: Optimize float ilogb/llogb 2025-06-02 13:32:19 -03:00
mach htl: move pthread_key_*, pthread_get/setspecific 2025-06-15 21:21:12 +02:00
microblaze
mips
nptl
or1k
posix
powerpc math: Optimize float ilogb/llogb 2025-06-02 13:32:19 -03:00
pthread hurd: Fix tst-stack2 test build on Hurd 2025-05-09 10:19:37 -03:00
riscv
s390 S390: Use cfi_val_offset instead of cfi_escape. 31bit part 2025-05-23 15:05:56 +02:00
sh
sparc sparc: Fix argument passing to __libc_start_main (BZ 32981) 2025-06-03 09:11:46 -03:00
unix riscv: Correct __riscv_hwprobe function prototype [BZ #32932] 2025-06-13 11:25:12 -03:00
wordsize-32
wordsize-64
x86 x86: Avoid GLRO(dl_x86_cpu_features) 2025-06-09 13:03:13 +08:00
x86_64 elf: Add optimization barrier for __ehdr_start and _end 2025-06-16 08:43:40 +08:00