aboutsummaryrefslogtreecommitdiff
path: root/lld/test
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-05-30 11:18:03 -0700
committerFangrui Song <i@maskray.me>2024-05-30 11:18:03 -0700
commit747d670baef35f0615b32652e93c97a2ff8dba18 (patch)
treecd77243481f0d35a21f3f4826091e1b13306cd74 /lld/test
parent73e07e924470ebab76a634e41fadf425a859e0ea (diff)
downloadllvm-747d670baef35f0615b32652e93c97a2ff8dba18.zip
llvm-747d670baef35f0615b32652e93c97a2ff8dba18.tar.gz
llvm-747d670baef35f0615b32652e93c97a2ff8dba18.tar.bz2
[ELF] Make .interp/SHT_NOTE not special
Follow-up to a previous simplification 2473b1af085ad54e89666cedf684fdf10a84f058. The xor difference between a SHT_NOTE and a read-only SHT_PROGBITS (previously >=NOT_SPECIAL) should be smaller than RF_EXEC. Otherwise, for the following section layout, `findOrphanPos` would place .text before note. ``` // simplified from linkerscript/custom-section-type.s non orphans: progbits 0x8060c00 NOT_SPECIAL note 0x8040003 orphan: .text 0x8061000 NOT_SPECIAL ``` rw-text.lds in orphan.s (added by 73e07e924470ebab76a634e41fadf425a859e0ea) demonstrates a similar case. The new behavior is more similar to GNU ld. #93763 fixed BOLT's brittle reliance on the previous .interp behavior.
Diffstat (limited to 'lld/test')
-rw-r--r--lld/test/ELF/linkerscript/orphan.s6
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/test/ELF/linkerscript/orphan.s b/lld/test/ELF/linkerscript/orphan.s
index cff6a3e..4f01b18 100644
--- a/lld/test/ELF/linkerscript/orphan.s
+++ b/lld/test/ELF/linkerscript/orphan.s
@@ -55,13 +55,13 @@
# RUN: ld.lld a.o -T rw-text.lds -o rw-text
# RUN: llvm-readelf -S rw-text | FileCheck %s --check-prefix=RW-TEXT
-# RW-TEXT: .interp PROGBITS 00000000000002{{..}} 0
-# RW-TEXT-NEXT: .note.my NOTE 00000000000002{{..}} 0
-# RW-TEXT-NEXT: .jcr PROGBITS 00000000000002{{..}} 0
+# RW-TEXT: .jcr PROGBITS 00000000000002{{..}} 0
# RW-TEXT-NEXT: .rw1 PROGBITS 00000000000002{{..}} 0
# RW-TEXT-NEXT: .rw2 PROGBITS 00000000000002{{..}} 0
# RW-TEXT-NEXT: .rw3 PROGBITS 00000000000002{{..}} 0
# RW-TEXT-NEXT: .bss NOBITS 00000000000002{{..}} 0
+# RW-TEXT-NEXT: .interp PROGBITS 00000000000002{{..}} 0
+# RW-TEXT-NEXT: .note.my NOTE 00000000000002{{..}} 0
# RW-TEXT-NEXT: .text PROGBITS 0000000000001{{...}} 0
# RW-TEXT-NEXT: .mytext PROGBITS 0000000000001{{...}} 0