[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/26815] Unnecessary error on linking STV_PROTECTED library: reloc
From: |
hjl.tools at gmail dot com |
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:40:27 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=26815
--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Thiago Macieira from comment #4)
> (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.
This is an ABI change. We have 2 choices
1. Extend GNU_PROPERTY_NO_COPY_ON_PROTECTED to cover protected function
pointers. We can rename it to GNU_PROPERTY_LOCAL_PROTECTED, Or
2. Add a new property for protected function pointers.
Please raise the issue at
https://gitlab.com/x86-psABIs/Linux-ABI
This will require support in GCC, linker and ld.so.
--
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, 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 <=
- [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