[Bug gold/22791] Don't error when a -pie executable uses a shared function without PIC/PIE relocation

2018-02-06 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22791 --- Comment #14 from H.J. Lu --- (In reply to Cary Coutant from comment #13) > (In reply to H.J. Lu from comment #12) > > Since there is no need to prepare for PLT branch on x86-64, we can treat > > PC32 relocation with branch as PLT32 relocat

[Bug gold/22791] Don't error when a -pie executable uses a shared function without PIC/PIE relocation

2018-02-06 Thread ccoutant at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22791 --- Comment #13 from Cary Coutant --- (In reply to H.J. Lu from comment #12) > Since there is no need to prepare for PLT branch on x86-64, we can treat > PC32 relocation with branch as PLT32 relocation. I posted a patch for ld: > > https://s

[Bug gold/22791] Don't error when a -pie executable uses a shared function without PIC/PIE relocation

2018-02-06 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22791 H.J. Lu changed: What|Removed |Added CC||hjl.tools at gmail dot com --- Comment #12

[Bug gold/22791] Don't error when a -pie executable uses a shared function without PIC/PIE relocation

2018-02-05 Thread rafael.espindola at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22791 --- Comment #11 from Rafael Ávila de Espíndola --- (In reply to Cary Coutant from comment #10) > The "official" or "canonical" PLT entry is the one that serves as the > address of the function throughout the program. OK, so we were talking ab

[Bug gold/22791] Don't error when a -pie executable uses a shared function without PIC/PIE relocation

2018-02-05 Thread ccoutant at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22791 --- Comment #10 from Cary Coutant --- The "official" or "canonical" PLT entry is the one that serves as the address of the function throughout the program. If you make the function protected in your shared library, I think the PIC sequence to

[Bug gold/22791] Don't error when a -pie executable uses a shared function without PIC/PIE relocation

2018-02-05 Thread rafael.espindola at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22791 --- Comment #9 from Rafael Ávila de Espíndola --- (In reply to Cary Coutant from comment #8) > (In reply to Rafael Ávila de Espíndola from comment #5) > > (In reply to Cary Coutant from comment #4) > > > This would be fine if we knew for a fac

[Bug gold/22791] Don't error when a -pie executable uses a shared function without PIC/PIE relocation

2018-02-05 Thread ccoutant at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22791 --- Comment #8 from Cary Coutant --- (In reply to Rafael Ávila de Espíndola from comment #5) > (In reply to Cary Coutant from comment #4) > > This would be fine if we knew for a fact that the relocation is on a call > > instruction. The proble

[Bug gold/22791] Don't error when a -pie executable uses a shared function without PIC/PIE relocation

2018-02-05 Thread rafael.espindola at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22791 --- Comment #7 from Rafael Ávila de Espíndola --- (In reply to Rafael Ávila de Espíndola from comment #5) > (In reply to Cary Coutant from comment #4) > > This would be fine if we knew for a fact that the relocation is on a call > > instructio

[Bug gold/22791] Don't error when a -pie executable uses a shared function without PIC/PIE relocation

2018-02-05 Thread rafael.espindola at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22791 --- Comment #6 from Rafael Ávila de Espíndola --- Created attachment 10787 --> https://sourceware.org/bugzilla/attachment.cgi?id=10787&action=edit testcase that prints the address of a function -- You are receiving this mail because: You a

[Bug gold/22791] Don't error when a -pie executable uses a shared function without PIC/PIE relocation

2018-02-05 Thread rafael.espindola at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22791 --- Comment #5 from Rafael Ávila de Espíndola --- (In reply to Cary Coutant from comment #4) > This would be fine if we knew for a fact that the relocation is on a call > instruction. The problem is that R_X86_64_PC32 isn't always a call > ins

[Bug gold/22791] Don't error when a -pie executable uses a shared function without PIC/PIE relocation

2018-02-05 Thread hjl.tools at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22791 H.J. Lu changed: What|Removed |Added Summary|Don't error when a -pie |Don't error when a -pie |