Bind defined symbol locally in PIE

Jens Remus jremus@linux.ibm.com
Mon Jul 28 16:29:17 GMT 2025


Hello H.J.,

thank you very much for your response!

On 24.07.2025 16:08, H.J. Lu wrote:
> On Thu, Jul 24, 2025 at 4:04 AM Jens Remus <jremus@linux.ibm.com> wrote:

>> I am porting the x86-64 change from your x86 commit 4e0c91e45402 ("Bind
>> defined symbol locally in PIE") to s390 for PR 33141.
>>
>> The change in elf_x86_64_relocate_section is clear to me.  The change
> 
> This one checks if input relocation should be copied to output.
> 
>> to elf_x86_64_check_relocs (now scan_relocs) is not.
> 
> This one checks if dynamic relocation, which may be generated by linker, not
> copied from input, is needed.

Ok.  As to my attempt to figure out what this change does, as the other
architectures did not port that change, by reverting that change on
master/4e0c91e45402 and not being able to experience any x86 test cases
to fail:  Could it be that the change in the check never makes any
difference?  Or do you otherwise happen to have a suggestion for a test
case that would show how the change takes effect?

> These 2 are related, but different.
> 
>> Other architectures that supposedly ported your fix (see list of commits
>> in forwarded PR update below) did only change relocate_section.

Thanks and regards,
Jens
-- 
Jens Remus
Linux on Z Development (D3303)
+49-7031-16-1128 Office
jremus@de.ibm.com

IBM

IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Böblingen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/



More information about the Binutils mailing list