mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-04 03:44:59 +00:00
88796a7988
Add file-level comments Replace trivial Input/*.s with echo ... | llvm-mc Delete insignificant addresses to make them more tolerant to layout changes Simplify test output Merge merge-section-types.s into compatible-section-types.s and add a missed case Merge gnu-ifunc-gotpcrel.s (added in D19517) into gnu-ifunc-dso.s (added in D35119) and add missed cases Delete typed-undef.s - covered by executable-undefined-ignoreall.s Delete emit-relocs-shared.s - covered by emit-relocs-merge.s Replace copy-rel-pie.s and copy-rel-pie2.s with canonical-plt-pcrel.s, canonical-plt-symbolic.s and copy-rel.s: add -no-pie cases. add a case that a canonical PLT can be created for STT_GNU_IFUNC. The logic in Symbols.h was untested: // ctor of SharedSymbol if (this->type == llvm::ELF::STT_GNU_IFUNC) this->type = llvm::ELF::STT_FUNC; llvm-svn: 371361
27 lines
1021 B
ArmAsm
27 lines
1021 B
ArmAsm
# REQUIRES: x86
|
|
|
|
## Version scripts are handled before relocation processing, so
|
|
## { local: *; } does not make a canonical PLT VER_NDX_LOCAL.
|
|
|
|
# RUN: echo '.global foo; .type foo, @function; foo:' | \
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux - -o %t.so.o
|
|
# RUN: ld.lld %t.so.o -o %t.so -shared
|
|
|
|
# RUN: echo "{ global: main; local: *; };" > %t.script
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
|
|
# RUN: ld.lld %t.o %t.so -o %t -version-script %t.script
|
|
# RUN: llvm-readelf -r --symbols %t | FileCheck %s
|
|
|
|
# CHECK: Relocation section '.rela.plt' at offset {{.*}} contains 1 entries:
|
|
# CHECK: R_X86_64_JUMP_SLOT [[ADDR:[0-9a-f]+]] foo + 0
|
|
|
|
# CHECK: Symbol table '.dynsym' contains 2 entries:
|
|
# CHECK-NEXT: Num: Value Size Type Bind Vis Ndx Name
|
|
# CHECK-NEXT: 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
|
|
# CHECK-NEXT: 1: [[ADDR]] 0 FUNC GLOBAL DEFAULT UND foo
|
|
|
|
.globl _start
|
|
_start:
|
|
movl $foo - ., %eax
|