summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Malcomson <hardenedapple@gmail.com>2022-08-02 12:12:26 +0100
committerMatthew Malcomson <hardenedapple@gmail.com>2022-08-02 12:12:32 +0100
commit8e878c72d897a4afdd8f828cc152ccb65abe66d7 (patch)
tree1e9c5f7b2827cdb9666ec37c25fb034112b42640
parent11bb913e270abd077764308a95dc58c031ffbe5c (diff)
ld: aarch64: Update test linker scripts relocs.ld and relocs-ilp32.ld
The updates are to ensure that the .data section exists. This means that we always have a data section. That means that we don't create a RWX segment and avoid the corresponding warning. We get this warning when testing aarch64-none-elf with -mcmodel=tiny. N.b. this changes quite a few testcases from fail to pass.
-rw-r--r--ld/testsuite/ld-aarch64/relocs-ilp32.ld4
-rw-r--r--ld/testsuite/ld-aarch64/relocs.ld4
2 files changed, 8 insertions, 0 deletions
diff --git a/ld/testsuite/ld-aarch64/relocs-ilp32.ld b/ld/testsuite/ld-aarch64/relocs-ilp32.ld
index 7174aff236..4ddba91412 100644
--- a/ld/testsuite/ld-aarch64/relocs-ilp32.ld
+++ b/ld/testsuite/ld-aarch64/relocs-ilp32.ld
@@ -16,4 +16,8 @@ SECTIONS
. = 0x12340000;
.far : { *(.far) }
.ARM.attributes 0 : { *(.ARM.atttributes) }
+ /* Providing a .data section triggers a non-executable segment to be
+ generated, which gives somewhere else for the linker to put the TLS
+ segment without creating a RWX permissioned one. */
+ .data : { *(.data) }
}
diff --git a/ld/testsuite/ld-aarch64/relocs.ld b/ld/testsuite/ld-aarch64/relocs.ld
index f42176e64d..77adac8b46 100644
--- a/ld/testsuite/ld-aarch64/relocs.ld
+++ b/ld/testsuite/ld-aarch64/relocs.ld
@@ -16,4 +16,8 @@ SECTIONS
. = 0x12340000;
.far : { *(.far) }
.ARM.attributes 0 : { *(.ARM.atttributes) }
+ /* Providing a .data section triggers a non-executable segment to be
+ generated, which gives somewhere else for the linker to put the TLS
+ segment without creating a RWX permissioned one. */
+ .data : { *(.data) }
}