This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hello,
Attached is a patch to address an issue first discussed on gcc-patches
(http://gcc.gnu.org/ml/gcc-patches/2007-10/msg00414.html), where it was
suggested that a change to GNU as would be more appropriate.
GCC for mips/Irix used to set NOSTRIP bit on .debug_frame and
doesn't any more.
This is causing troubles when using the libexc system library e.g.
for frame unwinding purposes, because it expects a single .debug_frame
per executable, the section has NOSTRIP set in system objects and the
native linker doesn't merge those having the bit set together with
those not having it.
Typically, for
<< /* t.c */
#include <libexc.h>
int main (void)
{
trace_back_stack_and_print ();
return 0;
}
>>
We see
$ gcc -o t t.c -lexc
$ elfdump -hv t | grep -A 1 debug_frame
[37] SHT_MIPS_DWARF 0 0x9bc0 0x4b0 .debug_frame
0 0 0x4 0 0x00000000
--
[39] SHT_MIPS_DWARF 0 0xa5a6 0xa4 .debug_frame
0 0 0x1 0 0x08000000 NOSTRIP
$ ./t
libexc(158601884): FATAL ERROR update_obj_info: dwarf_elf_init failed
for ./t -- (107) DW_DLE_DEBUG_FRAME_DUPLICATE Only one .debug_frame
section is allowed
The attached patch addresses this by teaching gas to set the bit as part
of similar specialized treatments it already performs in other cases.
Tested by checking that the "make check" outputs remain unchanged
after the patch and by checking that the test above now behaves as
expected.
Thanks in advance,
Olivier
2007-10-10 Olivier Hainque <hainque@adacore.com>
* bfd/elfxx-mips.c (_bfd_mips_elf_fake_sections): Force
SHF_MIPS_NOSTRIP on .debug_frame for Irix.
Attachment:
mips-irix-debug_frame-nostrip.dif
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |