public inbox for binutils-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb/binutils-2_39-branch] ld: aarch64: Update test linker scripts relocs.ld and relocs-ilp32.ld
@ 2022-08-02 11:13 Matthew Malcomson
  0 siblings, 0 replies; only message in thread
From: Matthew Malcomson @ 2022-08-02 11:13 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=8e878c72d897a4afdd8f828cc152ccb65abe66d7

commit 8e878c72d897a4afdd8f828cc152ccb65abe66d7
Author: Matthew Malcomson <hardenedapple@gmail.com>
Date:   Tue Aug 2 12:12:26 2022 +0100

    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.

Diff:
---
 ld/testsuite/ld-aarch64/relocs-ilp32.ld | 4 ++++
 ld/testsuite/ld-aarch64/relocs.ld       | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/ld/testsuite/ld-aarch64/relocs-ilp32.ld b/ld/testsuite/ld-aarch64/relocs-ilp32.ld
index 7174aff236f..4ddba914120 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 f42176e64d3..77adac8b46e 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) }
 }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-02 11:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02 11:13 [binutils-gdb/binutils-2_39-branch] ld: aarch64: Update test linker scripts relocs.ld and relocs-ilp32.ld Matthew Malcomson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).