[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/26815] Unnecessary error on linking STV_PROTECTED library: reloc
From: |
thiago at kde dot org |
Subject: |
[Bug ld/26815] Unnecessary error on linking STV_PROTECTED library: relocation R_X86_64_PC32 against protected symbol `f' can not be used when making a shared object |
Date: |
Fri, 30 Oct 2020 03:18:00 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=26815
--- Comment #4 from Thiago Macieira <thiago at kde dot org> ---
(In reply to H.J. Lu from comment #3)
> GOT relocation is needed for function pointer comparison.
>
> > Either way, the fact that gold and ld.bfd behave different is a problem. And
> > so is the fact that passing an empty --dynamic-list file causes it to work.
>
> An empty --dynamic-list file is the same as -Bsymbolic.
I see.
Then this is an incompatibility between compiler and linker: the compiler sees
a protected symbol and emits a relocation assuming it doesn't need indirect
access via the GOT to do a pointer comparison, but ld.bfd says it should.
Anyway, this is what I am asking to change: when a symbol is protected, the
compiler optimisation should be allowed and pointer comparison still works
provided ALL users use the GOT too. That includes the executable.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/26815] New: Unnecessary error on linking STV_PROTECTED library: relocation R_X86_64_PC32 against protected symbol `f' can not be used when making a shared object, thiago at kde dot org, 2020/10/29
- [Bug ld/26815] Unnecessary error on linking STV_PROTECTED library: relocation R_X86_64_PC32 against protected symbol `f' can not be used when making a shared object, hjl.tools at gmail dot com, 2020/10/29
- [Bug ld/26815] Unnecessary error on linking STV_PROTECTED library: relocation R_X86_64_PC32 against protected symbol `f' can not be used when making a shared object, hjl.tools at gmail dot com, 2020/10/29
- [Bug ld/26815] Unnecessary error on linking STV_PROTECTED library: relocation R_X86_64_PC32 against protected symbol `f' can not be used when making a shared object, thiago at kde dot org, 2020/10/29
- [Bug ld/26815] Unnecessary error on linking STV_PROTECTED library: relocation R_X86_64_PC32 against protected symbol `f' can not be used when making a shared object, hjl.tools at gmail dot com, 2020/10/29
- [Bug ld/26815] Unnecessary error on linking STV_PROTECTED library: relocation R_X86_64_PC32 against protected symbol `f' can not be used when making a shared object,
thiago at kde dot org <=
- [Bug ld/26815] Unnecessary error on linking STV_PROTECTED library: relocation R_X86_64_PC32 against protected symbol `f' can not be used when making a shared object, hjl.tools at gmail dot com, 2020/10/29
- [Bug ld/26815] Unnecessary error on linking STV_PROTECTED library: relocation R_X86_64_PC32 against protected symbol `f' can not be used when making a shared object, thiago at kde dot org, 2020/10/29
- [Bug ld/26815] Unnecessary error on linking STV_PROTECTED library: relocation R_X86_64_PC32 against protected symbol `f' can not be used when making a shared object, address@hidden, 2020/10/30