[PATCH v2] elf: Add optimization barrier for __ehdr_start and _end

Florian Weimer fweimer@redhat.com
Mon Jun 16 07:37:16 GMT 2025


* H. J. Lu:

>> I think the new test should cover all of ld.so, and only accept the
>> IRELATIVE relocation and the initialization of _rtld_global_ro, and no
>> other run-time relocations.  (Maybe it has to be restricted to !Hurd,
>> though.)
>>
>
> We only need to check run-time relocations before ELF_DYNAMIC_RELOCATE.

True, but this rather hard to check in a test.  If we work around the
other cases, too, we can have a reliable test for this issue.  I think
this is important because none of the changes proposed so far address
the root cause (that x86-64 is a HIDDEN_VAR_NEEDS_DYNAMIC_RELOC
architecture from GCC's point of view, in the sense that is fine to
generate run-time relocations for hidden/local objects with the code
model that we use).

Thanks,
Florian



More information about the Libc-alpha mailing list