Build hppa unwind info for more than .text
Hi Alan,
: We were missing lots of unwind info, especially when using : -ffunction-sections, which confuses gdb.
:
: gas/ChangeLog
: * config/tc-hppa.c (pa_build_unwind_subspace): Build unwind
: depending on section flags, not just for .text.
: Index: gas/config/tc-hppa.c
: =================================================================== : RCS file: /cvs/src/src/gas/config/tc-hppa.c,v
: retrieving revision 1.76
: diff -u -p -r1.76 tc-hppa.c
: --- tc-hppa.c 2001/01/14 07:03:49 1.76
: +++ tc-hppa.c 2001/01/16 12:23:05
: @@ -6053,7 +6053,9 @@ pa_build_unwind_subspace (call_info)
: int reloc;
: char c, *p;
:
: - if (now_seg != text_section)
: + if ((bfd_get_section_flags (stdoutput, now_seg)
: + & (SEC_ALLOC | SEC_LOAD | SEC_READONLY)) : + != (SEC_ALLOC | SEC_LOAD | SEC_READONLY))
: return;
Won't this create unwind info for read only data sections ? Would that be a bad thing ?
Cheers
Nick
Quoted 7 lines · Nick Clifton
: - if (
now_seg!=text_section)
: + if ((bfd_get_section_flags(stdoutput,now_seg): + & (SEC_ALLOC | SEC_LOAD | SEC_READONLY)) : + != (SEC_ALLOC | SEC_LOAD | SEC_READONLY)): return;
Won't this create unwind info for read only data sections ?
Only if the assembler sees
.proc
.callinfo
.entry
function body
.exit
.procend
You're unlikely to get unwanted unwind info.
Alan Modra
Signature · 1 line
Linuxcare. Support for the Revolution.