This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: RFA: patch to make MIPS ddb scripts keep .init and .fini
- From: "J. Johnston" <jjohnstn at redhat dot com>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: newlib at sources dot redhat dot com
- Date: Mon, 07 Oct 2002 12:15:13 -0400
- Subject: Re: RFA: patch to make MIPS ddb scripts keep .init and .fini
- Organization: Red Hat Inc.
- References: <wvnk7kuk3td.fsf@talisman.cambridge.redhat.com>
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 = .;
> }