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.
This commit is contained in:
Faraz Shahbazker 2019-05-02 16:16:44 +00:00 committed by Jeff Johnston
parent e91bc190ff
commit a9a0d219a4
22 changed files with 22 additions and 0 deletions

View File

@ -148,6 +148,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -104,6 +104,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -97,6 +97,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -97,6 +97,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -98,6 +98,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -105,6 +105,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -106,6 +106,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -107,6 +107,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -57,6 +57,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -57,6 +57,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -96,6 +96,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -59,6 +59,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -56,6 +56,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -96,6 +96,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -110,6 +110,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -113,6 +113,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -116,6 +116,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -116,6 +116,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -99,6 +99,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -99,6 +99,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -106,6 +106,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)

View File

@ -108,6 +108,7 @@ SECTIONS
*(.gnu.linkonce.r.*)
}
_fdata = ALIGN(16);
. = _fdata;
.data : {
*(.data)
*(.data.*)