aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2022-10-27 19:36:15 +0100
committerAlex Bennée <alex.bennee@linaro.org>2022-10-31 20:37:58 +0000
commit25916dd65d7e72f7bb5b9727bb346a9d17993072 (patch)
tree591977a2065be6a194cbec1d45631cb458e67dc9 /tests
parent991e9051238e15207ca3fbfc630fd98f0e2b86cd (diff)
downloadqemu-25916dd65d7e72f7bb5b9727bb346a9d17993072.zip
qemu-25916dd65d7e72f7bb5b9727bb346a9d17993072.tar.gz
qemu-25916dd65d7e72f7bb5b9727bb346a9d17993072.tar.bz2
tests/tcg/nios2: Tweak 10m50-ghrd.ld
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> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20221024035341.2971123-1-richard.henderson@linaro.org> Message-Id: <20221027183637.2772968-10-alex.bennee@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/tcg/nios2/10m50-ghrd.ld14
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/tcg/nios2/10m50-ghrd.ld b/tests/tcg/nios2/10m50-ghrd.ld
index 7db0d59..71cdda4 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