RFA: patch to make MIPS ddb scripts keep .init and .fini
J. Johnston
jjohnstn@redhat.com
Mon Oct 7 09:15:00 GMT 2002
Richard Sandiford wrote:
>
> 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.
>
Yes, go ahead.
-- Jeff J.
> 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 = .;
> }
More information about the Newlib
mailing list