A frame.c patch

H.J. Lu hjl@lucon.org
Fri Oct 17 20:51:00 GMT 1997


This patch fixed the EH bug I reported earlier. There are many
linked functions referenced in .eh_frame. The gnu ld will only keep
one definition. As the result, many FDE entries contain just junk
since they reference non-existing local symbols and the gnu ld
just puts zero in the pc_begin field.



-- 
H.J. Lu (hjl@gnu.ai.mit.edu)
---
Fri Oct 17 08:28:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)

	* frame.c (count_fdes, add_fdes): Skip linked once FDE entries.

Index: frame.c
===================================================================
RCS file: /home/work/cvs/gnu/egcs/gcc/frame.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 frame.c
--- frame.c	1997/10/09 17:28:50	1.1.1.3
+++ frame.c	1997/10/17 23:04:44
@@ -217,8 +217,9 @@
 
   for (count = 0; this_fde->length != 0; this_fde = next_fde (this_fde))
     {
-      /* Skip CIEs.  */
-      if ((uaddr)(this_fde->CIE_pointer) == (uaddr)-1)
+      /* Skip CIEs and linked once FDE entries.  */
+      if ((uaddr)(this_fde->CIE_pointer) == (uaddr)-1
+	  || !this_fde->pc_begin)
 	continue;
 
       ++count;
@@ -237,8 +238,9 @@
 
   for (; this_fde->length != 0; this_fde = next_fde (this_fde))
     {
-      /* Skip CIEs.  */
-      if ((uaddr)(this_fde->CIE_pointer) == (uaddr)-1)
+      /* Skip CIEs and linked once FDE entries.  */
+      if ((uaddr)(this_fde->CIE_pointer) == (uaddr)-1
+	  || !this_fde->pc_begin)
 	continue;
 
       fde_insert (array, i++, this_fde);



More information about the Gcc mailing list