* [PATCH] ld: aarch64: Update test linker scripts relocs.ld and relocs-ilp32.ld
@ 2022-07-08 12:43 Matthew Malcomson
2022-07-29 10:16 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Malcomson @ 2022-07-08 12:43 UTC (permalink / raw)
To: binutils; +Cc: Richard.Earnshaw
[-- Attachment #1: Type: text/plain, Size: 1657 bytes --]
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.
OK for master?
############### Attachment also inlined for ease of reply ###############
diff --git a/ld/testsuite/ld-aarch64/relocs-ilp32.ld b/ld/testsuite/ld-aarch64/relocs-ilp32.ld
index 7174aff236f189a1ae5caa94ecaf27c7ddb171b5..4ddba9141209a48c1342c4ffaf65b327d91873a8 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 f42176e64d30daa9949c0679ff3b0a931de46dfd..77adac8b46e01b488e68405b1291335a2dfa29fc 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) }
}
[-- Attachment #2: linker-script-test.patch --]
[-- Type: text/plain, Size: 1237 bytes --]
diff --git a/ld/testsuite/ld-aarch64/relocs-ilp32.ld b/ld/testsuite/ld-aarch64/relocs-ilp32.ld
index 7174aff236f189a1ae5caa94ecaf27c7ddb171b5..4ddba9141209a48c1342c4ffaf65b327d91873a8 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 f42176e64d30daa9949c0679ff3b0a931de46dfd..77adac8b46e01b488e68405b1291335a2dfa29fc 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] 2+ messages in thread
* Re: [PATCH] ld: aarch64: Update test linker scripts relocs.ld and relocs-ilp32.ld
2022-07-08 12:43 [PATCH] ld: aarch64: Update test linker scripts relocs.ld and relocs-ilp32.ld Matthew Malcomson
@ 2022-07-29 10:16 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2022-07-29 10:16 UTC (permalink / raw)
To: Matthew Malcomson, binutils; +Cc: Richard.Earnshaw
Hi Matthew,
> 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.
>
> OK for master?
Approved - please apply. (Sorry for the long delay in reviewing this patch).
Please also apply to the 2.39 branch.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-29 10:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-08 12:43 [PATCH] ld: aarch64: Update test linker scripts relocs.ld and relocs-ilp32.ld Matthew Malcomson
2022-07-29 10:16 ` Nick Clifton
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).