[parisc-linux] Build hppa unwind info for more than .text

Alan Modra alan@linuxcare.com.au
Wed, 17 Jan 2001 00:02:07 +1100 (EST)


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.

Alan Modra
-- 
Linuxcare.  Support for the Revolution.

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;
 
   reloc = R_PARISC_SEGREL32;