[llvm-bugs] [Bug 49693] New: GOT references generated for code that requests static relocation model
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Mar 23 05:39:25 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=49693
Bug ID: 49693
Summary: GOT references generated for code that requests static
relocation model
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: simonas+llvm.org at kazlauskas.me
CC: llvm-bugs at lists.llvm.org
; RUN: llc --relocation-model=static -mtriple=aarch64-none < %s
; RUN: llc --relocation-model=static -mtriple=x86_64-none < %s
define void @peach() unnamed_addr {
start:
br label %bb1
bb1: ; preds = %bb1, %start
%0 = load volatile i8, i8* bitcast (void ()* @banana to i8*), align 1
br label %bb1
}
declare void @banana() unnamed_addr
The following example generates GOT references in LLVM 12, but did not do so in
LLVM 11.
If the `@banana` is marked as `dso_local`, then a local reference is generated,
however my understanding is that the `dso_local` annotation is a hint that the
compiler is allowed to generate direct references and not that its absence
requires it to produce GOT references.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210323/7fc89541/attachment.html>
More information about the llvm-bugs
mailing list