[lld] ec52408 - [ELF] Test R_*_SIZE for non-SHF_ALLOC sections
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 7 20:19:35 PST 2020
Author: Fangrui Song
Date: 2020-11-07T20:19:21-08:00
New Revision: ec52408decf9987fc44d0c541ce65341c4c768f7
URL: https://github.com/llvm/llvm-project/commit/ec52408decf9987fc44d0c541ce65341c4c768f7
DIFF: https://github.com/llvm/llvm-project/commit/ec52408decf9987fc44d0c541ce65341c4c768f7.diff
LOG: [ELF] Test R_*_SIZE for non-SHF_ALLOC sections
Added:
Modified:
lld/test/ELF/x86-64-reloc-size.s
Removed:
################################################################################
diff --git a/lld/test/ELF/x86-64-reloc-size.s b/lld/test/ELF/x86-64-reloc-size.s
index 7d42cfe3e597..9faa9da3cee5 100644
--- a/lld/test/ELF/x86-64-reloc-size.s
+++ b/lld/test/ELF/x86-64-reloc-size.s
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
# RUN: ld.lld %t.o -o %t
# RUN: llvm-readobj -r %t | FileCheck --check-prefix=NORELOC %s
-# RUN: llvm-readelf -x .data %t | FileCheck --check-prefix=DATA %s
+# RUN: llvm-readelf -x .data -x nonalloc %t | FileCheck --check-prefix=DATA %s
# RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=DISASM %s
# RUN: ld.lld -shared %t.o -o %t.so
@@ -19,6 +19,9 @@
# DATA-NEXT: 0x002031cc 00001b00 00000000 00001900 00000000
# DATA-NEXT: 0x002031dc 00001b00 00000000 0000
+# DATA: section 'nonalloc':
+# DATA-NEXT: 0x00000000 1a000000 00000000
+
# DISASM: <_start>:
# DISASM-NEXT: movl 25, %eax
# DISASM-NEXT: movl 27, %eax
@@ -71,3 +74,6 @@ _start:
movl foo at SIZE+1,%eax
movl foohidden at SIZE-1,%eax
movl foohidden at SIZE+1,%eax
+
+.section nonalloc
+ .quad foo at SIZE
More information about the llvm-commits
mailing list