diff options
Diffstat (limited to 'test/ELF/znotext-weak-undef.s')
-rw-r--r-- | test/ELF/znotext-weak-undef.s | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ELF/znotext-weak-undef.s b/test/ELF/znotext-weak-undef.s new file mode 100644 index 0000000000000..d606d872bc4f2 --- /dev/null +++ b/test/ELF/znotext-weak-undef.s @@ -0,0 +1,16 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o +# RUN: not ld.lld -z notext -shared %t.o -o %t 2>&1 | FileCheck %s +# CHECK: relocation R_X86_64_32 cannot be used against shared object; recompile with -fPIC + +# RUN: ld.lld -z notext %t.o -o %t +# RUN: llvm-readobj -r %t | FileCheck %s --check-prefix=EXE +# EXE: Relocations [ +# EXE-NEXT: ] + +.text +.global foo +.weak foo + +_start: +mov $foo,%eax |