[llvm] [ARM] Use .reloc for weak symbols in PIC mode instead of GOT indirection (PR #208372)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 9 05:18:23 PDT 2026
================
@@ -2,18 +2,19 @@
; RUN: llc < %s -mtriple=thumbv7-linux-gnueabi -relocation-model=pic | FileCheck %s
; RUN: llc < %s -O0 -fast-isel-abort=2 -mtriple=armv7-linux-gnueabi -relocation-model=pic | FileCheck %s
-; Hidden weak function with dso_local must still use GOT indirection
-; in PIC mode on ARM. The assembler eagerly resolves PC-relative
-; expressions like .long xxx-(.LPC+8) when both are in the same section,
-; which prevents the linker from overriding the weak definition with
-; a non-weak one from another object file.
+; Weak dso_local hidden functions must be overridable at link time
+; (a strong definition in another object should override the weak one).
----------------
smithp35 wrote:
a non-weak definition
https://github.com/llvm/llvm-project/pull/208372
More information about the llvm-commits
mailing list