int eh_frame_estimate_size_before_relax (fragS *);
int eh_frame_relax_frag (fragS *);
void eh_frame_convert_frag (fragS *);
+void eh_begin (void);
int generic_force_reloc (struct fix *);
/* SFrame FRE optimization. */
int z_augmentation;
};
-static int get_cie_info (struct cie_info *);
-
/* Extract information from the CIE. */
static int
state_error,
};
+struct frame_data
+{
+ enum frame_state state;
+
+ int cie_info_ok;
+ struct cie_info cie_info;
+
+ symbolS *size_end_sym;
+ fragS *loc4_frag;
+ int loc4_fix;
+
+ int aug_size;
+ int aug_shift;
+};
+
+static struct eh_state
+{
+ struct frame_data eh_data;
+ struct frame_data debug_data;
+} frame;
+
/* This function is called from emit_expr. It looks for cases which
we can optimize.
int
check_eh_frame (expressionS *exp, unsigned int *pnbytes)
{
- struct frame_data
- {
- enum frame_state state;
-
- int cie_info_ok;
- struct cie_info cie_info;
-
- symbolS *size_end_sym;
- fragS *loc4_frag;
- int loc4_fix;
-
- int aug_size;
- int aug_shift;
- };
-
- static struct frame_data eh_frame_data;
- static struct frame_data debug_frame_data;
struct frame_data *d;
/* Don't optimize. */
/* Select the proper section data. */
if (startswith (segment_name (now_seg), ".eh_frame")
&& segment_name (now_seg)[9] != '_')
- d = &eh_frame_data;
+ d = &frame.eh_data;
else if (startswith (segment_name (now_seg), ".debug_frame"))
- d = &debug_frame_data;
+ d = &frame.debug_data;
else
return 0;
frag->fr_subtype = 0;
frag->fr_offset = 0;
}
+
+void
+eh_begin (void)
+{
+ memset (&frame, 0, sizeof (frame));
+}