public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Make .data section placement coincide with _fdata symbol
@ 2019-05-15 19:31 Jeff Johnston
0 siblings, 0 replies; only message in thread
From: Jeff Johnston @ 2019-05-15 19:31 UTC (permalink / raw)
To: newlib-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a9a0d219a417a8079b878ce967f72997789e328a
commit a9a0d219a417a8079b878ce967f72997789e328a
Author: Faraz Shahbazker <fshahbazker at wavecomp dot com>
Date: Thu May 2 16:16:44 2019 +0000
Make .data section placement coincide with _fdata symbol
The _fdata symbol in MIPS linker scripts is aligned to a 16-byte
boundary. The ALIGN function does not implicitly update current
location counter. If sections positioned after the assignment
do not have the same natural alignment as the ALIGN function then
the start of the section group will not coincide with the value
of the symbol.
Given the linker command sequence:
symbol = ALIGN (NN);
(.section*)
where the idiom implies a desire to mark the beginning of .section
with symbol, there must be an assignment to the location counter
between the assignment to symbol and the .section pattern.
libgloss/
* mips/array.ld: Update the location counter to match _fdata.
* mips/cfe.ld: Likewise.
* mips/ddb-kseg0.ld: Likewise.
* mips/ddb.ld: Likewise.
* mips/dve.ld: Likewise.
* mips/idt.ld: Likewise.
* mips/idt32.ld: Likewise.
* mips/idt64.ld: Likewise.
* mips/idtecoff.ld: Likewise.
* mips/jmr3904app-java.ld: Likewise.
* mips/jmr3904app.ld: Likewise.
* mips/jmr3904dram-java.ld: Likewise.
* mips/jmr3904dram.ld: Likewise.
* mips/lsi.ld: Likewise.
* mips/mti32.ld: Likewise.
* mips/mti64.ld: Likewise.
* mips/mti64_64.ld: Likewise.
* mips/mti64_n32.ld: Likewise.
* mips/nullmon.ld: Likewise.
* mips/pmon.ld: Likewise.
* mips/sde32.ld: Likewise.
* mips/sde64.ld: Likewise.
Diff:
---
libgloss/mips/array.ld | 1 +
libgloss/mips/cfe.ld | 1 +
libgloss/mips/ddb-kseg0.ld | 1 +
libgloss/mips/ddb.ld | 1 +
libgloss/mips/dve.ld | 1 +
libgloss/mips/idt.ld | 1 +
libgloss/mips/idt32.ld | 1 +
libgloss/mips/idt64.ld | 1 +
libgloss/mips/idtecoff.ld | 1 +
libgloss/mips/jmr3904app-java.ld | 1 +
libgloss/mips/jmr3904app.ld | 1 +
libgloss/mips/jmr3904dram-java.ld | 1 +
libgloss/mips/jmr3904dram.ld | 1 +
libgloss/mips/lsi.ld | 1 +
libgloss/mips/mti32.ld | 1 +
libgloss/mips/mti64.ld | 1 +
libgloss/mips/mti64_64.ld | 1 +
libgloss/mips/mti64_n32.ld | 1 +
libgloss/mips/nullmon.ld | 1 +
libgloss/mips/pmon.ld | 1 +
libgloss/mips/sde32.ld | 1 +
libgloss/mips/sde64.ld | 1 +
22 files changed, 22 insertions(+)
diff --git a/libgloss/mips/array.ld b/libgloss/mips/array.ld
index 2bc49c7..0492ae5 100644
--- a/libgloss/mips/array.ld
+++ b/libgloss/mips/array.ld
@@ -148,6 +148,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/cfe.ld b/libgloss/mips/cfe.ld
index 78fb853..9a0f8d5 100644
--- a/libgloss/mips/cfe.ld
+++ b/libgloss/mips/cfe.ld
@@ -104,6 +104,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/ddb-kseg0.ld b/libgloss/mips/ddb-kseg0.ld
index 74bc1b0..8c1f926 100644
--- a/libgloss/mips/ddb-kseg0.ld
+++ b/libgloss/mips/ddb-kseg0.ld
@@ -97,6 +97,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/ddb.ld b/libgloss/mips/ddb.ld
index 8fcafd3..299106f 100644
--- a/libgloss/mips/ddb.ld
+++ b/libgloss/mips/ddb.ld
@@ -97,6 +97,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/dve.ld b/libgloss/mips/dve.ld
index adce60f..96abbbe 100644
--- a/libgloss/mips/dve.ld
+++ b/libgloss/mips/dve.ld
@@ -98,6 +98,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/idt.ld b/libgloss/mips/idt.ld
index 0d69af4..b4608bf 100644
--- a/libgloss/mips/idt.ld
+++ b/libgloss/mips/idt.ld
@@ -105,6 +105,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/idt32.ld b/libgloss/mips/idt32.ld
index 175a98b..5084df7 100644
--- a/libgloss/mips/idt32.ld
+++ b/libgloss/mips/idt32.ld
@@ -106,6 +106,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/idt64.ld b/libgloss/mips/idt64.ld
index bd217e5..a1121c6 100644
--- a/libgloss/mips/idt64.ld
+++ b/libgloss/mips/idt64.ld
@@ -107,6 +107,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/idtecoff.ld b/libgloss/mips/idtecoff.ld
index 2788cc8..0297c60 100644
--- a/libgloss/mips/idtecoff.ld
+++ b/libgloss/mips/idtecoff.ld
@@ -57,6 +57,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/jmr3904app-java.ld b/libgloss/mips/jmr3904app-java.ld
index 98ce535..92de26d 100644
--- a/libgloss/mips/jmr3904app-java.ld
+++ b/libgloss/mips/jmr3904app-java.ld
@@ -57,6 +57,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/jmr3904app.ld b/libgloss/mips/jmr3904app.ld
index d5b3109..367fc47 100644
--- a/libgloss/mips/jmr3904app.ld
+++ b/libgloss/mips/jmr3904app.ld
@@ -96,6 +96,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/jmr3904dram-java.ld b/libgloss/mips/jmr3904dram-java.ld
index 71e8403..4c0681a 100644
--- a/libgloss/mips/jmr3904dram-java.ld
+++ b/libgloss/mips/jmr3904dram-java.ld
@@ -59,6 +59,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/jmr3904dram.ld b/libgloss/mips/jmr3904dram.ld
index a2cb1ea..9e7d255 100644
--- a/libgloss/mips/jmr3904dram.ld
+++ b/libgloss/mips/jmr3904dram.ld
@@ -56,6 +56,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/lsi.ld b/libgloss/mips/lsi.ld
index ca64ab9..780c31c 100644
--- a/libgloss/mips/lsi.ld
+++ b/libgloss/mips/lsi.ld
@@ -96,6 +96,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/mti32.ld b/libgloss/mips/mti32.ld
index 41592d1..3c8daf6 100644
--- a/libgloss/mips/mti32.ld
+++ b/libgloss/mips/mti32.ld
@@ -110,6 +110,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/mti64.ld b/libgloss/mips/mti64.ld
index 8a47c47..74d7784 100644
--- a/libgloss/mips/mti64.ld
+++ b/libgloss/mips/mti64.ld
@@ -113,6 +113,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/mti64_64.ld b/libgloss/mips/mti64_64.ld
index 81704f0..d33d156 100644
--- a/libgloss/mips/mti64_64.ld
+++ b/libgloss/mips/mti64_64.ld
@@ -116,6 +116,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/mti64_n32.ld b/libgloss/mips/mti64_n32.ld
index 6c53809..5098a88 100644
--- a/libgloss/mips/mti64_n32.ld
+++ b/libgloss/mips/mti64_n32.ld
@@ -116,6 +116,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/nullmon.ld b/libgloss/mips/nullmon.ld
index 14b0d0e..5ea8b59 100644
--- a/libgloss/mips/nullmon.ld
+++ b/libgloss/mips/nullmon.ld
@@ -99,6 +99,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/pmon.ld b/libgloss/mips/pmon.ld
index 244c1f6..fff6f66 100644
--- a/libgloss/mips/pmon.ld
+++ b/libgloss/mips/pmon.ld
@@ -99,6 +99,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/sde32.ld b/libgloss/mips/sde32.ld
index 657f5f3..7273107 100644
--- a/libgloss/mips/sde32.ld
+++ b/libgloss/mips/sde32.ld
@@ -106,6 +106,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
diff --git a/libgloss/mips/sde64.ld b/libgloss/mips/sde64.ld
index e3a0f29..0bcbe98 100644
--- a/libgloss/mips/sde64.ld
+++ b/libgloss/mips/sde64.ld
@@ -108,6 +108,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
+ . = _fdata;
.data : {
*(.data)
*(.data.*)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-05-15 19:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-15 19:31 [newlib-cygwin] Make .data section placement coincide with _fdata symbol Jeff Johnston
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).