[lld] r247947 - [elf2] Extend program-header-layout.s to check that read only sections are correctly merged into the first PT_LOAD.

Michael J. Spencer via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 14:19:57 PDT 2015


Author: mspencer
Date: Thu Sep 17 16:19:56 2015
New Revision: 247947

URL: http://llvm.org/viewvc/llvm-project?rev=247947&view=rev
Log:
[elf2] Extend program-header-layout.s to check that read only sections are correctly merged into the first PT_LOAD.

Modified:
    lld/trunk/test/elf2/program-header-layout.s

Modified: lld/trunk/test/elf2/program-header-layout.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/program-header-layout.s?rev=247947&r1=247946&r2=247947&view=diff
==============================================================================
--- lld/trunk/test/elf2/program-header-layout.s (original)
+++ lld/trunk/test/elf2/program-header-layout.s Thu Sep 17 16:19:56 2015
@@ -1,6 +1,6 @@
 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
 # RUN: lld -flavor gnu2 %t -o %t2
-# RUN: llvm-readobj -program-headers %t2 | FileCheck %s
+# RUN: llvm-readobj -sections -program-headers %t2 | FileCheck %s
 # REQUIRES: x86
 
 # Check that different output sections with the same flags are merged into a
@@ -17,14 +17,28 @@ _start:
 .section .b,"aw"
 .quad 2
 
+# CHECK:        Name: .r
+# CHECK-NEXT:   Type: SHT_PROGBITS
+# CHECK-NEXT:   Flags [
+# CHECK-NEXT:     SHF_ALLOC
+# CHECK-NEXT:   ]
+# CHECK-NEXT:   Address:
+# CHECK-NEXT:   Offset: 0x1000
+# CHECK-NEXT:   Size:
+# CHECK-NEXT:   Link:
+# CHECK-NEXT:   Info:
+# CHECK-NEXT:   AddressAlignment:
+# CHECK-NEXT:   EntrySize:
+# CHECK-NEXT: }
+
 # CHECK:      ProgramHeaders [
 # CHECK-NEXT:   ProgramHeader {
 # CHECK-NEXT:     Type: PT_LOAD
 # CHECK-NEXT:     Offset: 0x0
 # CHECK-NEXT:     VirtualAddress:
 # CHECK-NEXT:     PhysicalAddress:
-# CHECK-NEXT:     FileSize:
-# CHECK-NEXT:     MemSize:
+# CHECK-NEXT:     FileSize: 4104
+# CHECK-NEXT:     MemSize: 4104
 # CHECK-NEXT:     Flags [
 # CHECK-NEXT:       PF_R
 # CHECK-NEXT:     ]




More information about the llvm-commits mailing list