Skip to content

Commit

Permalink
Merge pull request #1160 from nicolasnoble/data-sections-are-important
Browse files Browse the repository at this point in the history
Properly keeping data sections...
  • Loading branch information
nicolasnoble authored Dec 17, 2022
2 parents d762a4d + f7d1ca9 commit 920dc6d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions src/mips/cpe.ld
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ SECTIONS {

__data_start = .;
.data : {
*(.data .data.* .gnu.linkonce.d.*)
*(.data1)
*(.sdata .sdata.* .gnu.linkonce.s.*)
*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
*(.got.plt)
*(.got)
KEEP (*(.data .data.* .gnu.linkonce.d.*))
KEEP (*(.data1))
KEEP (*(.sdata .sdata.* .gnu.linkonce.s.*))
KEEP (*(.sdata2 .sdata2.* .gnu.linkonce.s2.*))
KEEP (*(.got.plt))
KEEP (*(.got))
} > ram

. = ALIGN(4);
Expand Down
14 changes: 7 additions & 7 deletions src/mips/ps-exe.ld
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,15 @@ SECTIONS {

__data_start = .;
.data : {
*(.data .data.* .gnu.linkonce.d.*)
*(.data1)
*(.sdata .sdata.* .gnu.linkonce.s.*)
*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
*(.got.plt)
*(.got)
KEEP (*(.data .data.* .gnu.linkonce.d.*))
KEEP (*(.data1))
KEEP (*(.sdata .sdata.* .gnu.linkonce.s.*))
KEEP (*(.sdata2 .sdata2.* .gnu.linkonce.s2.*))
KEEP (*(.got.plt))
KEEP (*(.got))
/* pad file to be a multiple of 2048 bytes. Needed for loading from CD-ROM. */
. = ALIGN(2048);
} > ram
} > ram = 0x50414444

__data_end = .;
__fdata_end = .;
Expand Down

0 comments on commit 920dc6d

Please sign in to comment.