mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-10 01:55:08 +00:00
4af8d47d05
Previously, we drop symbols starting with .L from the symbol table, so if there is a relocation that refers a .L symbol, it ended up referencing a null -- which happened to be interpreted as an absolute symbol. This patch copies all symbols including local ones if -emit-reloc is given. Fixes https://bugs.llvm.org/show_bug.cgi?id=41385 Differential Revision: https://reviews.llvm.org/D60306 llvm-svn: 357885
15 lines
382 B
ArmAsm
15 lines
382 B
ArmAsm
# REQUIRES: x86
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
|
# RUN: ld.lld --emit-relocs %t.o -o %t.exe
|
|
# RUN: llvm-readelf --relocations %t.exe | FileCheck %s
|
|
|
|
# CHECK: 0000000000201004 000000010000000b R_X86_64_32S 0000000000200120 .Lfoo + 8
|
|
|
|
.globl _start
|
|
_start:
|
|
movq .Lfoo+8, %rax
|
|
.section .rodata.cst16,"aM",@progbits,16
|
|
.Lfoo:
|
|
.quad 0
|
|
.quad 0
|