Patch to keep special sections generated by mips gcc
Jeff Johnston
jjohnstn@redhat.com
Thu Jun 8 22:24:00 GMT 2006
Patch checked in.
-- Jeff J.
Fred Fish wrote:
> New mainline versions of binutils ld strip zero length sections
> by default. This patch is needed to ensure that the special
> sections generated by mips gcc are kept in the final executable.
>
>
> 2006-06-07 Fred Fish <fnf@specifix.com>
>
> * mips/idt.ld, mips/idt32.ld, mips/idt64.ld, mips/nullmon.ld,
> mips/pmon.ld: Keep special sections generated by mips gcc.
>
> Index: mips/idt.ld
> ===================================================================
> RCS file: /cvsroots/latest/src/newlib/libgloss/mips/idt.ld,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 idt.ld
> --- mips/idt.ld 8 Oct 2005 19:45:24 -0000 1.1.1.1
> +++ mips/idt.ld 8 Jun 2006 01:45:16 -0000
> @@ -170,4 +170,15 @@ SECTIONS
> .debug_funcnames 0 : { *(.debug_funcnames) }
> .debug_typenames 0 : { *(.debug_typenames) }
> .debug_varnames 0 : { *(.debug_varnames) }
> +
> + /* Special sections generated by gcc */
> + /* Newer GNU linkers strip by default */
> + .mdebug.abi32 0 : { KEEP(*(.mdebug.abi32)) }
> + .mdebug.abiN32 0 : { KEEP(*(.mdebug.abiN32)) }
> + .mdebug.abi64 0 : { KEEP(*(.mdebug.abi64)) }
> + .mdebug.abiO64 0 : { KEEP(*(.mdebug.abiO64)) }
> + .mdebug.eabi32 0 : { KEEP(*(.mdebug.eabi32)) }
> + .mdebug.eabi64 0 : { KEEP(*(.mdebug.eabi64)) }
> + .gcc_compiled_long32 0 : { KEEP(*(.gcc_compiled_long32)) }
> + .gcc_compiled_long64 0 : { KEEP(*(.gcc_compiled_long64)) }
> }
> Index: mips/idt32.ld
> ===================================================================
> RCS file: /cvsroots/latest/src/newlib/libgloss/mips/idt32.ld,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 idt32.ld
> --- mips/idt32.ld 8 Oct 2005 19:45:24 -0000 1.1.1.1
> +++ mips/idt32.ld 8 Jun 2006 01:45:06 -0000
> @@ -172,4 +172,15 @@ SECTIONS
> .debug_funcnames 0 : { *(.debug_funcnames) }
> .debug_typenames 0 : { *(.debug_typenames) }
> .debug_varnames 0 : { *(.debug_varnames) }
> +
> + /* Special sections generated by gcc */
> + /* Newer GNU linkers strip by default */
> + .mdebug.abi32 0 : { KEEP(*(.mdebug.abi32)) }
> + .mdebug.abiN32 0 : { KEEP(*(.mdebug.abiN32)) }
> + .mdebug.abi64 0 : { KEEP(*(.mdebug.abi64)) }
> + .mdebug.abiO64 0 : { KEEP(*(.mdebug.abiO64)) }
> + .mdebug.eabi32 0 : { KEEP(*(.mdebug.eabi32)) }
> + .mdebug.eabi64 0 : { KEEP(*(.mdebug.eabi64)) }
> + .gcc_compiled_long32 0 : { KEEP(*(.gcc_compiled_long32)) }
> + .gcc_compiled_long64 0 : { KEEP(*(.gcc_compiled_long64)) }
> }
> Index: mips/idt64.ld
> ===================================================================
> RCS file: /cvsroots/latest/src/newlib/libgloss/mips/idt64.ld,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 idt64.ld
> --- mips/idt64.ld 8 Oct 2005 19:45:24 -0000 1.1.1.1
> +++ mips/idt64.ld 8 Jun 2006 01:44:59 -0000
> @@ -171,4 +171,15 @@ SECTIONS
> .debug_funcnames 0 : { *(.debug_funcnames) }
> .debug_typenames 0 : { *(.debug_typenames) }
> .debug_varnames 0 : { *(.debug_varnames) }
> +
> + /* Special sections generated by gcc */
> + /* Newer GNU linkers strip by default */
> + .mdebug.abi32 0 : { KEEP(*(.mdebug.abi32)) }
> + .mdebug.abiN32 0 : { KEEP(*(.mdebug.abiN32)) }
> + .mdebug.abi64 0 : { KEEP(*(.mdebug.abi64)) }
> + .mdebug.abiO64 0 : { KEEP(*(.mdebug.abiO64)) }
> + .mdebug.eabi32 0 : { KEEP(*(.mdebug.eabi32)) }
> + .mdebug.eabi64 0 : { KEEP(*(.mdebug.eabi64)) }
> + .gcc_compiled_long32 0 : { KEEP(*(.gcc_compiled_long32)) }
> + .gcc_compiled_long64 0 : { KEEP(*(.gcc_compiled_long64)) }
> }
> Index: mips/nullmon.ld
> ===================================================================
> RCS file: /cvsroots/latest/src/newlib/libgloss/mips/nullmon.ld,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 nullmon.ld
> --- mips/nullmon.ld 8 Oct 2005 19:45:24 -0000 1.1.1.1
> +++ mips/nullmon.ld 8 Jun 2006 01:44:52 -0000
> @@ -165,4 +165,15 @@ SECTIONS
> .debug_funcnames 0 : { *(.debug_funcnames) }
> .debug_typenames 0 : { *(.debug_typenames) }
> .debug_varnames 0 : { *(.debug_varnames) }
> +
> + /* Special sections generated by gcc */
> + /* Newer GNU linkers strip by default */
> + .mdebug.abi32 0 : { KEEP(*(.mdebug.abi32)) }
> + .mdebug.abiN32 0 : { KEEP(*(.mdebug.abiN32)) }
> + .mdebug.abi64 0 : { KEEP(*(.mdebug.abi64)) }
> + .mdebug.abiO64 0 : { KEEP(*(.mdebug.abiO64)) }
> + .mdebug.eabi32 0 : { KEEP(*(.mdebug.eabi32)) }
> + .mdebug.eabi64 0 : { KEEP(*(.mdebug.eabi64)) }
> + .gcc_compiled_long32 0 : { KEEP(*(.gcc_compiled_long32)) }
> + .gcc_compiled_long64 0 : { KEEP(*(.gcc_compiled_long64)) }
> }
> Index: mips/pmon.ld
> ===================================================================
> RCS file: /cvsroots/latest/src/newlib/libgloss/mips/pmon.ld,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 pmon.ld
> --- mips/pmon.ld 8 Oct 2005 19:45:24 -0000 1.1.1.1
> +++ mips/pmon.ld 8 Jun 2006 01:44:38 -0000
> @@ -164,4 +164,15 @@ SECTIONS
> .debug_funcnames 0 : { *(.debug_funcnames) }
> .debug_typenames 0 : { *(.debug_typenames) }
> .debug_varnames 0 : { *(.debug_varnames) }
> +
> + /* Special sections generated by gcc */
> + /* Newer GNU linkers strip by default */
> + .mdebug.abi32 0 : { KEEP(*(.mdebug.abi32)) }
> + .mdebug.abiN32 0 : { KEEP(*(.mdebug.abiN32)) }
> + .mdebug.abi64 0 : { KEEP(*(.mdebug.abi64)) }
> + .mdebug.abiO64 0 : { KEEP(*(.mdebug.abiO64)) }
> + .mdebug.eabi32 0 : { KEEP(*(.mdebug.eabi32)) }
> + .mdebug.eabi64 0 : { KEEP(*(.mdebug.eabi64)) }
> + .gcc_compiled_long32 0 : { KEEP(*(.gcc_compiled_long32)) }
> + .gcc_compiled_long64 0 : { KEEP(*(.gcc_compiled_long64)) }
> }
>
More information about the Newlib
mailing list