https://bugs.llvm.org/show_bug.cgi?id=35653
Bug ID: 35653
Summary: Incorrect relocation for no PLT PIC code without
optimization
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedb...@nondot.org
Reporter: compn...@compnerd.org
CC: llvm-bugs@lists.llvm.org
$ bin/clang -target x86_64-unknown-linux-gnu -fomit-frame-pointer
-mstack-alignment=8 -fno-plt -fPIC -x c -S - -o - <<< '
void f(void);
void g(void) { return f(); }
'
.text
.file "-"
.globl g # -- Begin function g
.p2align 4, 0x90
.type g,@function
g: # @g
.cfi_startproc
# %bb.0: # %entry
callq f
retq
.Lfunc_end0:
.size g, .Lfunc_end0-g
.cfi_endproc
# -- End function
.ident "clang version 6.0.0 (http://llvm.org/git/clang.git
efe67fdaf10325b04b6a6af538bed43eea8103a1) (http://llvm.org/git/llvm.git
bcf3bed73b8653dcce398f7d64dbb4e78a0746f2)"
.section ".note.GNU-stack","",@progbits
$ bin/clang -target x86_64-unknown-linux-gnu -fomit-frame-pointer
-mstack-alignment=8 -O1 -fno-plt -fPIC -x c -S - -o - <<< '
void f(void);
void g(void) { return f(); }
'
.text
.file "-"
.globl g # -- Begin function g
.p2align 4, 0x90
.type g,@function
g: # @g
.cfi_startproc
# %bb.0: # %entry
jmpq *f@GOTPCREL(%rip) # TAILCALL
.Lfunc_end0:
.size g, .Lfunc_end0-g
.cfi_endproc
# -- End function
.ident "clang version 6.0.0 (http://llvm.org/git/clang.git
efe67fdaf10325b04b6a6af538bed43eea8103a1) (http://llvm.org/git/llvm.git
bcf3bed73b8653dcce398f7d64dbb4e78a0746f2)"
.section ".note.GNU-stack","",@progbits
Note that we generate `callq f` rather than `callq *f@GOTPCREL(%rip)`.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs