.exception_ranges ${RELOCATING-0} : ONLY_IF_RO { *(.exception_ranges${RELOCATING+*}) }
${TEXT_PLT+${PLT_NEXT_DATA+${PLT} ${OTHER_PLT_SECTIONS}}}
+ /* Various note sections. Placed here so that they are included in the
+ read-only segment, and so that they are not treated as orphan sections. */
+ .note.build-id : { *(.note.build-id) } ${RELOCATING+${REGION}}
+ .note.GNU-stack : { *(.note.GNU-stack) } ${RELOCATING+${REGION}}
+ .note.gnu-property : { *(.note.gnu-property) } ${RELOCATING+${REGION}}
+ .note.ABI-tag : { *(.note.ABI-tag) } ${RELOCATING+${REGION}}
+ .note.package : { *(.note.package) } ${RELOCATING+${REGION}}
+ .note.dlopen : { *(.note.dlopen) } ${RELOCATING+${REGION}}
+ .note.netbsd.ident : { *(.note.netbsd.ident) } ${RELOCATING+${REGION}}
+ .note.openbsd.ident : { *(.note.openbsd.ident) } ${RELOCATING+${REGION}}
+
${RELOCATING+${ETEXT_LAST_IN_RODATA_SEGMENT+PROVIDE (__${ETEXT_NAME} = .);}}
${RELOCATING+${ETEXT_LAST_IN_RODATA_SEGMENT+PROVIDE (_${ETEXT_NAME} = .);}}
${RELOCATING+${ETEXT_LAST_IN_RODATA_SEGMENT+PROVIDE (${ETEXT_NAME} = .);}}
.gnu.build.attributes : { *(.gnu.build.attributes${RELOCATING+ .gnu.build.attributes.*}) }
- /* Various note sections. Placed here so that they do not get
- treated as orphan sections. */
- .note.build-id : { *(.note.build-id) } ${RELOCATING+${REGION}}
- .note.GNU-stack : { *(.note.GNU-stack) } ${RELOCATING+${REGION}}
- .note.gnu-property : { *(.note.gnu-property) } ${RELOCATING+${REGION}}
- .note.ABI-tag : { *(.note.ABI-tag) } ${RELOCATING+${REGION}}
- .note.package : { *(.note.package) } ${RELOCATING+${REGION}}
- .note.dlopen : { *(.note.dlopen) } ${RELOCATING+${REGION}}
- .note.netbsd.ident : { *(.note.netbsd.ident) } ${RELOCATING+${REGION}}
- .note.openbsd.ident : { *(.note.openbsd.ident) } ${RELOCATING+${REGION}}
-
EOF
--- /dev/null
+#ld: --build-id -z separate-code -z relro --rosegment
+#readelf: -l --wide
+#target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi
+#xfail: ![check_relro_support]
+
+#failif
+#...
+[ ]+LOAD[ ]+0x[0-9a-f x]+.*
+#...
+[ ]+LOAD[ ]+0x[0-9a-f x]+.*
+#...
+[ ]+LOAD[ ]+0x[0-9a-f x]+.*
+#...
+[ ]+LOAD[ ]+0x[0-9a-f x]+.*
+#...
--- /dev/null
+ .text
+ .type start,"function"
+ .global start
+start:
+ .type _start,"function"
+ .global _start
+_start:
+ .type __start,"function"
+ .global __start
+__start:
+ .type main,"function"
+ .global main
+main:
+ .type _main,"function"
+ .global _main
+_main:
+ .dc.a 0
+ .section .rodata,"a"
+ .zero 8
+ .bss
+ .zero 8
+ .section .note.ABI-tag,"a"
+ .align 4
+ .zero 32
+ .ident "GCC: (GNU) 14.2.1"
+ .section .note.GNU-stack,"",%progbits