This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
RFA: patch to make MIPS ddb scripts keep .init and .fini
- From: Richard Sandiford <rsandifo at redhat dot com>
- To: newlib at sources dot redhat dot com
- Date: 07 Oct 2002 10:15:26 +0100
- Subject: RFA: patch to make MIPS ddb scripts keep .init and .fini
This trivial patch allows ddb.ld and ddb-kseg.ld to work
with --gc-sections. Tested with gcc using vr4300-sim.
OK to apply?
Richard
* mips/ddb.ld: KEEP .init and .fini.
* mips/ddb-kseg0.ld: Likewise.
Index: mips/ddb.ld
===================================================================
RCS file: /cvs/cvsfiles/devo/libgloss/mips/ddb.ld,v
retrieving revision 1.12
diff -u -d -p -r1.12 ddb.ld
--- mips/ddb.ld 2002/08/06 18:44:29 1.12
+++ mips/ddb.ld 2002/09/11 09:54:08
@@ -33,7 +33,7 @@ SECTIONS
. = 0xA0100000;
.text : {
_ftext = . ;
- *(.init)
+ KEEP (*(.init))
eprol = .;
*(.text)
*(.text.*)
@@ -43,7 +43,7 @@ SECTIONS
PROVIDE (__runtime_reloc_start = .);
*(.rel.sdata)
PROVIDE (__runtime_reloc_stop = .);
- *(.fini)
+ KEEP (*(.fini))
etext = .;
_etext = .;
}
Index: mips/ddb-kseg0.ld
===================================================================
RCS file: /cvs/cvsfiles/devo/libgloss/mips/ddb-kseg0.ld,v
retrieving revision 1.3
diff -u -d -p -r1.3 ddb-kseg0.ld
--- mips/ddb-kseg0.ld 2002/08/06 18:44:29 1.3
+++ mips/ddb-kseg0.ld 2002/09/11 09:54:08
@@ -33,7 +33,7 @@ SECTIONS
. = 0x80100000;
.text : {
_ftext = . ;
- *(.init)
+ KEEP (*(.init))
eprol = .;
*(.text)
*(.text.*)
@@ -43,7 +43,7 @@ SECTIONS
PROVIDE (__runtime_reloc_start = .);
*(.rel.sdata)
PROVIDE (__runtime_reloc_stop = .);
- *(.fini)
+ KEEP (*(.fini))
etext = .;
_etext = .;
}