* [PATCH] tests/tcg/nios2: Tweak 10m50-ghrd.ld
@ 2022-10-24 3:53 Richard Henderson
2022-10-24 21:37 ` Alex Bennée
0 siblings, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2022-10-24 3:53 UTC (permalink / raw)
To: qemu-devel; +Cc: alex.bennee
More closely follow the default linker script for nios2.
This magically fixes a problem resolving .got relocs from
the toolchain's libgcc.a.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1258
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tests/tcg/nios2/10m50-ghrd.ld | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/tests/tcg/nios2/10m50-ghrd.ld b/tests/tcg/nios2/10m50-ghrd.ld
index 7db0d59ad7..71cdda450c 100644
--- a/tests/tcg/nios2/10m50-ghrd.ld
+++ b/tests/tcg/nios2/10m50-ghrd.ld
@@ -44,11 +44,15 @@ SECTIONS
.data : ALIGN(4) {
*(.shdata)
*(.data .data.* .gnu.linkonce.d.*)
- . = ALIGN(4);
- _gp = ABSOLUTE(. + 0x8000);
- *(.got.plt) *(.got)
- *(.lit8)
- *(.lit4)
+ } >ram :RAM
+
+ HIDDEN (_gp = ALIGN(16) + 0x7ff0);
+ PROVIDE_HIDDEN (gp = _gp);
+ .got : ALIGN(4) {
+ *(.got.plt) *(.igot.plt) *(.got) *(.igot)
+ } >ram :RAM
+
+ .sdata : ALIGN(4) {
*(.sdata .sdata.* .gnu.linkonce.s.*)
} >ram :RAM
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] tests/tcg/nios2: Tweak 10m50-ghrd.ld
2022-10-24 13:24 [PATCH 00/29] tcg: Fix x86 TARGET_TB_PCREL (#1269) Richard Henderson
@ 2022-10-24 13:24 ` Richard Henderson
2022-10-25 9:12 ` Claudio Fontana
0 siblings, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2022-10-24 13:24 UTC (permalink / raw)
To: qemu-devel
More closely follow the default linker script for nios2.
This magically fixes a problem resolving .got relocs from
the toolchain's libgcc.a.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1258
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tests/tcg/nios2/10m50-ghrd.ld | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/tests/tcg/nios2/10m50-ghrd.ld b/tests/tcg/nios2/10m50-ghrd.ld
index 7db0d59ad7..71cdda450c 100644
--- a/tests/tcg/nios2/10m50-ghrd.ld
+++ b/tests/tcg/nios2/10m50-ghrd.ld
@@ -44,11 +44,15 @@ SECTIONS
.data : ALIGN(4) {
*(.shdata)
*(.data .data.* .gnu.linkonce.d.*)
- . = ALIGN(4);
- _gp = ABSOLUTE(. + 0x8000);
- *(.got.plt) *(.got)
- *(.lit8)
- *(.lit4)
+ } >ram :RAM
+
+ HIDDEN (_gp = ALIGN(16) + 0x7ff0);
+ PROVIDE_HIDDEN (gp = _gp);
+ .got : ALIGN(4) {
+ *(.got.plt) *(.igot.plt) *(.got) *(.igot)
+ } >ram :RAM
+
+ .sdata : ALIGN(4) {
*(.sdata .sdata.* .gnu.linkonce.s.*)
} >ram :RAM
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/tcg/nios2: Tweak 10m50-ghrd.ld
2022-10-24 3:53 [PATCH] tests/tcg/nios2: Tweak 10m50-ghrd.ld Richard Henderson
@ 2022-10-24 21:37 ` Alex Bennée
0 siblings, 0 replies; 4+ messages in thread
From: Alex Bennée @ 2022-10-24 21:37 UTC (permalink / raw)
To: Richard Henderson; +Cc: qemu-devel
Richard Henderson <richard.henderson@linaro.org> writes:
> More closely follow the default linker script for nios2.
> This magically fixes a problem resolving .got relocs from
> the toolchain's libgcc.a.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1258
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Queued to testing/next, thanks.
--
Alex Bennée
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/tcg/nios2: Tweak 10m50-ghrd.ld
2022-10-24 13:24 ` [PATCH] tests/tcg/nios2: Tweak 10m50-ghrd.ld Richard Henderson
@ 2022-10-25 9:12 ` Claudio Fontana
0 siblings, 0 replies; 4+ messages in thread
From: Claudio Fontana @ 2022-10-25 9:12 UTC (permalink / raw)
To: Richard Henderson, qemu-devel
This is unrelated to the "tcg: Fix x86 TARGET_TB_PCREL (#1269)" series right?
For some reason it appears to me as part of it, as a reply to the cover letter.
Ignoring this one as I don't understand it at all.
Ciao,
C
On 10/24/22 15:24, Richard Henderson wrote:
> More closely follow the default linker script for nios2.
> This magically fixes a problem resolving .got relocs from
> the toolchain's libgcc.a.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1258
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
> tests/tcg/nios2/10m50-ghrd.ld | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/tests/tcg/nios2/10m50-ghrd.ld b/tests/tcg/nios2/10m50-ghrd.ld
> index 7db0d59ad7..71cdda450c 100644
> --- a/tests/tcg/nios2/10m50-ghrd.ld
> +++ b/tests/tcg/nios2/10m50-ghrd.ld
> @@ -44,11 +44,15 @@ SECTIONS
> .data : ALIGN(4) {
> *(.shdata)
> *(.data .data.* .gnu.linkonce.d.*)
> - . = ALIGN(4);
> - _gp = ABSOLUTE(. + 0x8000);
> - *(.got.plt) *(.got)
> - *(.lit8)
> - *(.lit4)
> + } >ram :RAM
> +
> + HIDDEN (_gp = ALIGN(16) + 0x7ff0);
> + PROVIDE_HIDDEN (gp = _gp);
> + .got : ALIGN(4) {
> + *(.got.plt) *(.igot.plt) *(.got) *(.igot)
> + } >ram :RAM
> +
> + .sdata : ALIGN(4) {
> *(.sdata .sdata.* .gnu.linkonce.s.*)
> } >ram :RAM
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-25 9:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-24 3:53 [PATCH] tests/tcg/nios2: Tweak 10m50-ghrd.ld Richard Henderson
2022-10-24 21:37 ` Alex Bennée
-- strict thread matches above, loose matches on Subject: below --
2022-10-24 13:24 [PATCH 00/29] tcg: Fix x86 TARGET_TB_PCREL (#1269) Richard Henderson
2022-10-24 13:24 ` [PATCH] tests/tcg/nios2: Tweak 10m50-ghrd.ld Richard Henderson
2022-10-25 9:12 ` Claudio Fontana
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 NNTP newsgroup(s).