Skip to content

Commit

Permalink
[ELF][test][NFC] Make a test standard compliant
Browse files Browse the repository at this point in the history
PT_LOAD segments in the program header must be sorted by their virtual
addresses, so they should be defined in a similar order as the
associated sections.

Differential Revision: https://reviews.llvm.org/D111068
  • Loading branch information
igorkudrin committed Oct 5, 2021
1 parent e66121b commit 65c284a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lld/test/ELF/linkerscript/implicit-program-header.test
Expand Up @@ -7,9 +7,9 @@
# RUN: llvm-readelf -l %t1 | FileCheck %s

# CHECK: Segment Sections...
# CHECK-NEXT: 00 .dynsym .hash .dynstr .foo .text .dynamic
# CHECK-NEXT: 01 .foo
# CHECK-NEXT: 02 .foo
# CHECK-NEXT: 00 .dynsym .hash .dynstr .text
# CHECK-NEXT: 01 .foo .dynamic
# CHECK-NEXT: 02 .foo .dynamic

PHDRS {
ph_write PT_LOAD FLAGS(2);
Expand All @@ -18,7 +18,7 @@ PHDRS {
}

SECTIONS {
.text : { *(.text) } : ph_write
.bar : { *(.bar) } : ph_exec : ph_note
.foo : { *(.foo) }
.text : { *(.text) } : ph_write
}

0 comments on commit 65c284a

Please sign in to comment.