diff options
author | Matthew Malcomson <hardenedapple@gmail.com> | 2022-08-02 12:07:00 +0100 |
---|---|---|
committer | Matthew Malcomson <hardenedapple@gmail.com> | 2022-08-02 12:09:40 +0100 |
commit | b90e0b2f1b516ea32789ae3877830b518cb8ed60 (patch) | |
tree | b3fcf8bd60a7afb1e8dfb8f5eeb67d2858269c86 | |
parent | e90f28a7a78666ae593fec5cf57c0b5eb4636c22 (diff) | |
download | fsf-binutils-gdb-b90e0b2f1b516ea32789ae3877830b518cb8ed60.zip fsf-binutils-gdb-b90e0b2f1b516ea32789ae3877830b518cb8ed60.tar.gz fsf-binutils-gdb-b90e0b2f1b516ea32789ae3877830b518cb8ed60.tar.bz2 |
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.ld | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-aarch64/relocs.ld | 4 |
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 7174aff..4ddba91 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 f42176e..77adac8 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) } } |