https://sourceware.org/bugzilla/show_bug.cgi?id=27491
Alan Modra <amodra at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2021-03-02 --- Comment #1 from Alan Modra <amodra at gmail dot com> --- powerpc64le on a similar testcase with _start: pld 3,__start_xx@got@pcrel pld 4,__stop_xx@got@pcrel does a similar optimisation without complaint, generating a binary that performs two pla instructions setting both registers to zero pc-relative (which isn't zero when the shared library is loaded somewhere other than address zero). Technically that is wrong since the value of an undefined weak symbol is zero, and so the got entries should be left in order to load an absolute zero. But it might be reasonable in this case since you expect __start_xx and __stop_xx to have an address somewhere in the executable. However, I think I'll fix this. In contrast .weak xxx .global _start _start: pld 3,xxx@got@pcrel leaves the pld alone when xxx is undefined, loading the reg with zero from the got entry. -- You are receiving this mail because: You are on the CC list for the bug.