summaryrefslogtreecommitdiffstats
path: root/lld
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-02-23 14:41:24 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-02-23 14:41:24 +0000
commit82d6725c3a8ee3fc853a6dc653c8a604c5ac70fa (patch)
tree35e305984b7e87145d5c78271114b72dd93f0e63 /lld
parent6485a994db16f18bbee1b523db73d170b0a9da0f (diff)
downloadbcm5719-llvm-82d6725c3a8ee3fc853a6dc653c8a604c5ac70fa.tar.gz
bcm5719-llvm-82d6725c3a8ee3fc853a6dc653c8a604c5ac70fa.zip
Add a test showing that nocopyreloc is only about copy relocs.
For functions the linker uses a related hack: creating a plt in the main executable that preempts the function. Like bfd and gold, we don't disable it with nocopyreloc. llvm-svn: 295976
Diffstat (limited to 'lld')
-rw-r--r--lld/test/ELF/undef-with-plt-addr.s3
1 files changed, 3 insertions, 0 deletions
diff --git a/lld/test/ELF/undef-with-plt-addr.s b/lld/test/ELF/undef-with-plt-addr.s
index 2e2fc20be3f..d34859c04e8 100644
--- a/lld/test/ELF/undef-with-plt-addr.s
+++ b/lld/test/ELF/undef-with-plt-addr.s
@@ -5,6 +5,9 @@
// RUN: ld.lld %t.o %t2.so -o %t3
// RUN: llvm-readobj -t -s -r %t3 | FileCheck %s
+// Test that -z nocopyreloc doesn't prevent the plt hack.
+// RUN: ld.lld %t.o %t2.so -o %t3 -z nocopyreloc
+
.globl _start
_start:
movabsq $set_data, %rax
OpenPOWER on IntegriCloud