* Empty section removal has messed up MIPS gdb
@ 2005-04-20 21:35 Daniel Jacobowitz
2005-04-20 21:53 ` H. J. Lu
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2005-04-20 21:35 UTC (permalink / raw)
To: binutils
GCC used to leave a message for the debugger in the form of an empty
section:
/* Generate a special section to describe the ABI switches used to
produce the resultant binary. This used to be done by the assembler
setting bits in the ELF header's flags field, but we have run out of
bits. GDB needs this information in order to be able to correctly
debug these binaries. See the function mips_gdbarch_init() in
gdb/mips-tdep.c. This is unnecessary for the IRIX 5/6 ABIs and
causes unnecessary IRIX 6 ld warnings. */
The emitted bits were simply:
.section .mdebug.abi64
.previous
The sections are now stripped. I don't want to put contents in them and
waste object file space unless it's absolutely necessary. How should I
cajole ld into leaving them?
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Empty section removal has messed up MIPS gdb
2005-04-20 21:35 Empty section removal has messed up MIPS gdb Daniel Jacobowitz
@ 2005-04-20 21:53 ` H. J. Lu
2005-04-20 21:57 ` Daniel Jacobowitz
0 siblings, 1 reply; 5+ messages in thread
From: H. J. Lu @ 2005-04-20 21:53 UTC (permalink / raw)
To: binutils
On Wed, Apr 20, 2005 at 05:35:33PM -0400, Daniel Jacobowitz wrote:
> GCC used to leave a message for the debugger in the form of an empty
> section:
>
> /* Generate a special section to describe the ABI switches used to
> produce the resultant binary. This used to be done by the assembler
> setting bits in the ELF header's flags field, but we have run out of
> bits. GDB needs this information in order to be able to correctly
> debug these binaries. See the function mips_gdbarch_init() in
> gdb/mips-tdep.c. This is unnecessary for the IRIX 5/6 ABIs and
> causes unnecessary IRIX 6 ld warnings. */
>
> The emitted bits were simply:
>
> .section .mdebug.abi64
> .previous
>
> The sections are now stripped. I don't want to put contents in them and
> waste object file space unless it's absolutely necessary. How should I
> cajole ld into leaving them?
>
Mark it KEEP?
H.J.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Empty section removal has messed up MIPS gdb
2005-04-20 21:53 ` H. J. Lu
@ 2005-04-20 21:57 ` Daniel Jacobowitz
2005-04-20 22:58 ` H. J. Lu
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2005-04-20 21:57 UTC (permalink / raw)
To: H. J. Lu; +Cc: binutils
On Wed, Apr 20, 2005 at 02:53:17PM -0700, H. J. Lu wrote:
> On Wed, Apr 20, 2005 at 05:35:33PM -0400, Daniel Jacobowitz wrote:
> > GCC used to leave a message for the debugger in the form of an empty
> > section:
> >
> > /* Generate a special section to describe the ABI switches used to
> > produce the resultant binary. This used to be done by the assembler
> > setting bits in the ELF header's flags field, but we have run out of
> > bits. GDB needs this information in order to be able to correctly
> > debug these binaries. See the function mips_gdbarch_init() in
> > gdb/mips-tdep.c. This is unnecessary for the IRIX 5/6 ABIs and
> > causes unnecessary IRIX 6 ld warnings. */
> >
> > The emitted bits were simply:
> >
> > .section .mdebug.abi64
> > .previous
> >
> > The sections are now stripped. I don't want to put contents in them and
> > waste object file space unless it's absolutely necessary. How should I
> > cajole ld into leaving them?
> >
>
> Mark it KEEP?
This is something that has to be done in the linker, right? i.e. the
linker would also need to know about this convention.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Empty section removal has messed up MIPS gdb
2005-04-20 21:57 ` Daniel Jacobowitz
@ 2005-04-20 22:58 ` H. J. Lu
2005-04-20 23:58 ` Eric Christopher
0 siblings, 1 reply; 5+ messages in thread
From: H. J. Lu @ 2005-04-20 22:58 UTC (permalink / raw)
To: binutils
On Wed, Apr 20, 2005 at 05:57:46PM -0400, Daniel Jacobowitz wrote:
> On Wed, Apr 20, 2005 at 02:53:17PM -0700, H. J. Lu wrote:
> > On Wed, Apr 20, 2005 at 05:35:33PM -0400, Daniel Jacobowitz wrote:
> > > GCC used to leave a message for the debugger in the form of an empty
> > > section:
> > >
> > > /* Generate a special section to describe the ABI switches used to
> > > produce the resultant binary. This used to be done by the assembler
> > > setting bits in the ELF header's flags field, but we have run out of
> > > bits. GDB needs this information in order to be able to correctly
> > > debug these binaries. See the function mips_gdbarch_init() in
> > > gdb/mips-tdep.c. This is unnecessary for the IRIX 5/6 ABIs and
> > > causes unnecessary IRIX 6 ld warnings. */
> > >
> > > The emitted bits were simply:
> > >
> > > .section .mdebug.abi64
> > > .previous
> > >
> > > The sections are now stripped. I don't want to put contents in them and
> > > waste object file space unless it's absolutely necessary. How should I
> > > cajole ld into leaving them?
> > >
> >
> > Mark it KEEP?
>
> This is something that has to be done in the linker, right? i.e. the
> linker would also need to know about this convention.
>
It is done in linker script:
[hjl@gnu scripttempl]$ grep KEEP elf.sc
KEEP (*crtbegin*.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
KEEP (*crtbegin*.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
KEEP (*(.init))
KEEP (*(.text.*personality*))
KEEP (*(.fini))
.eh_frame ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) }
.gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { KEEP
(*(.gcc_except_table)) *(.gcc_except_table.*) }
.eh_frame ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) }
.gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { KEEP
(*(.gcc_except_table)) *(.gcc_except_table.*) }
.preinit_array ${RELOCATING-0} : { KEEP (*(.preinit_array)) }
.init_array ${RELOCATING-0} : { KEEP (*(.init_array)) }
.fini_array ${RELOCATING-0} : { KEEP (*(.fini_array)) }
.jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
KEEP (*(.gnu.linkonce.d.*personality*))
You can do it for .mdebug.abi64.
H.J.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Empty section removal has messed up MIPS gdb
2005-04-20 22:58 ` H. J. Lu
@ 2005-04-20 23:58 ` Eric Christopher
0 siblings, 0 replies; 5+ messages in thread
From: Eric Christopher @ 2005-04-20 23:58 UTC (permalink / raw)
To: drow; +Cc: binutils
> You can do it for .mdebug.abi64.
As a note if Daniel is going to do the patch then please do it
for .gcc_compiled_long[32,64] as well :)
If you're too busy to do it lemme know and I will.
-eric
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-04-20 23:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-20 21:35 Empty section removal has messed up MIPS gdb Daniel Jacobowitz
2005-04-20 21:53 ` H. J. Lu
2005-04-20 21:57 ` Daniel Jacobowitz
2005-04-20 22:58 ` H. J. Lu
2005-04-20 23:58 ` Eric Christopher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).