mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-04 03:44:59 +00:00
90b395e93a
This is for compatiblity with GNU gold. GNU gold tries to resolve symbols specified by --export-dynamic-symbol. So, if a symbol specified by --export-dynamic-symbol is in an archive file, lld's result is currently different from gold's. Interestingly, that behavior is different for --dynamic-list. I added a new test to ensure that. Differential Revision: https://reviews.llvm.org/D43103 llvm-svn: 324752
18 lines
421 B
ArmAsm
18 lines
421 B
ArmAsm
# REQUIRES: x86
|
|
|
|
# RUN: rm -f %t.a
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/archive2.s -o %t1.o
|
|
# RUN: llvm-ar rcs %t.a %t1.o
|
|
|
|
# RUN: echo "{ foo; };" > %t.list
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t2.o
|
|
# RUN: ld.lld -shared -o %t.so --dynamic-list %t.list %t.a %t2.o
|
|
|
|
# RUN: llvm-readelf -dyn-symbols %t.so | FileCheck %s
|
|
# CHECK-NOT: foo
|
|
|
|
.global _start
|
|
_start:
|
|
nop
|