Document a change of behavior in r315552.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 23 Oct 2017 21:00:15 +0000 (21:00 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 23 Oct 2017 21:00:15 +0000 (21:00 +0000)
We used to reject this, but we now accept. The output seems
reasonable, so this is probably an OK extension over bfd/gold.

llvm-svn: 316376

lld/test/ELF/got32-i386-pie-rw.s [new file with mode: 0644]

diff --git a/lld/test/ELF/got32-i386-pie-rw.s b/lld/test/ELF/got32-i386-pie-rw.s
new file mode 100644 (file)
index 0000000..18b019c
--- /dev/null
@@ -0,0 +1,17 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %s -o %t.o
+# RUN: ld.lld %t.o -o %t -pie
+# RUN: llvm-readelf -r -s %t | FileCheck %s
+
+# Unlike bfd and gold we accept this.
+
+# CHECK: .foobar           PROGBITS        00001000
+# CHECK: .got              PROGBITS        [[GOT:[0-9a-z]*]]
+# CHECK: [[GOT]]   00000008 R_386_RELATIVE
+# CHECK: 00001002  00000008 R_386_RELATIVE
+foo:
+
+.section .foobar, "awx"
+.global _start
+_start:
+ movl foo@GOT, %ebx