[PATCH 11/21] mips: libgloss: Remove the arch spec in mti* linker scripts
Aleksandar Rikalo
arikalo@gmail.com
Thu Oct 31 05:49:27 GMT 2024
From: Matthew Fortune <matthew.fortune@imgtec.com>
The mti*.ld scripts are for use on both R2 and R6 architectures. Also
fix an alignment bug in the scripts copied from the 2_1_0 branch.
Signed-off-by: Matthew Fortune <matthew.fortune@imgtec.com>
Signed-off-by: Aleksandar Rikalo <arikalo@gmail.com>
---
libgloss/mips/mti32.ld | 5 ++---
libgloss/mips/mti64.ld | 5 ++---
libgloss/mips/mti64_n32.ld | 5 ++---
3 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/libgloss/mips/mti32.ld b/libgloss/mips/mti32.ld
index 3c8daf6f1..71f409a67 100644
--- a/libgloss/mips/mti32.ld
+++ b/libgloss/mips/mti32.ld
@@ -3,7 +3,6 @@
the simulator. */
ENTRY(_start)
-OUTPUT_ARCH("mips:isa32r2")
OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradbigmips", "elf32-tradlittlemips")
GROUP(-lc -lidt -lgcc)
SEARCH_DIR(.)
@@ -109,8 +108,8 @@ SECTIONS
*(.rodata.*)
*(.gnu.linkonce.r.*)
}
- _fdata = ALIGN(16);
- . = _fdata;
+ . = ALIGN(16);
+ _fdata = .;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/mti64.ld b/libgloss/mips/mti64.ld
index 74d778412..ca6549de3 100644
--- a/libgloss/mips/mti64.ld
+++ b/libgloss/mips/mti64.ld
@@ -5,7 +5,6 @@
each other (e.g., MIPS32r2 and MIPS64). */
ENTRY(_start)
-OUTPUT_ARCH("mips:isa64r2")
OUTPUT_FORMAT("elf32-tradlittlemips", "elf32-tradbigmips", "elf32-tradlittlemips")
GROUP(-lc -lidt -lgcc)
SEARCH_DIR(.)
@@ -112,8 +111,8 @@ SECTIONS
*(.rodata.*)
*(.gnu.linkonce.r.*)
}
- _fdata = ALIGN(16);
- . = _fdata;
+ . = ALIGN(16);
+ _fdata = .;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/mti64_n32.ld b/libgloss/mips/mti64_n32.ld
index 5098a88d0..98e932281 100644
--- a/libgloss/mips/mti64_n32.ld
+++ b/libgloss/mips/mti64_n32.ld
@@ -8,7 +8,6 @@
o32 ABI targets in OUTPUT_FORMAT. */
ENTRY(_start)
-OUTPUT_ARCH("mips:isa64r2")
OUTPUT_FORMAT("elf32-ntradlittlemips", "elf32-ntradbigmips", "elf32-ntradlittlemips")
GROUP(-lc -lidt -lgcc)
SEARCH_DIR(.)
@@ -115,8 +114,8 @@ SECTIONS
*(.rodata.*)
*(.gnu.linkonce.r.*)
}
- _fdata = ALIGN(16);
- . = _fdata;
+ . = ALIGN(16);
+ _fdata = .;
.data : {
*(.data)
*(.data.*)
--
2.25.1
More information about the Newlib
mailing list