bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/27491] ld: relocation R_X86_64_PC32 against undefined protected


From: hjl.tools at gmail dot com
Subject: [Bug ld/27491] ld: relocation R_X86_64_PC32 against undefined protected symbol `__start_xx' can not be used when making a shared object
Date: Tue, 02 Mar 2021 19:27:49 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=27491

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Fangrui Song from comment #3)
>
> I don't know what happened to the 2010-01 patch. It likely did not let
> __start_ reference retain magic sections in other translation unit (in
> metadata section usage __start_/__stop_ references are always in a separate
> runtime file), so "__start_ retaining all magic sections" was not effective
> before 2015-10.  Why do we need new start/stop symbols? The orphan
> __start_/__stop_ usage worked before 2015-10 and will work with -z
> start-stop-gc.

You got it wrong.  --gc-section never worked correctly before all these
fixed applied.

> (I think of the possibility enabling -z start-stop-gc by default because the
> rule was essentially invalid before 2015-10.)
>

LLVM requires a different __start_/__stop_ semantic, which isn't wrong
by itself.  But it shouldn't hijack the current one.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]