From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2049) id 3AB77385382C; Tue, 2 Aug 2022 11:11:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3AB77385382C Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Matthew Malcomson To: bfd-cvs@sourceware.org Subject: [binutils-gdb] ld: aarch64: Update test linker scripts relocs.ld and relocs-ilp32.ld X-Act-Checkin: binutils-gdb X-Git-Author: Matthew Malcomson X-Git-Refname: refs/heads/master X-Git-Oldrev: e90f28a7a78666ae593fec5cf57c0b5eb4636c22 X-Git-Newrev: b90e0b2f1b516ea32789ae3877830b518cb8ed60 Message-Id: <20220802111127.3AB77385382C@sourceware.org> Date: Tue, 2 Aug 2022 11:11:27 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Aug 2022 11:11:27 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db90e0b2f1b51= 6ea32789ae3877830b518cb8ed60 commit b90e0b2f1b516ea32789ae3877830b518cb8ed60 Author: Matthew Malcomson Date: Tue Aug 2 12:07:00 2022 +0100 ld: aarch64: Update test linker scripts relocs.ld and relocs-ilp32.ld =20 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. =20 We get this warning when testing aarch64-none-elf with -mcmodel=3Dtiny. 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-aarc= h64/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 . =3D 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/re= locs.ld index f42176e64d3..77adac8b46e 100644 --- a/ld/testsuite/ld-aarch64/relocs.ld +++ b/ld/testsuite/ld-aarch64/relocs.ld @@ -16,4 +16,8 @@ SECTIONS . =3D 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) } }