* config/tc-mn10300.h (md_allow_eh_opt): Define. Only allow call frame optimization if linker relaxation is not enabled.
* gas/elf/elf.exp: Disable ehopt test for mn10300.
+2007-11-06 Nick Clifton <nickc@redhat.com>
+
+ * ehopt.c (check_eh_frame): If md_allow_eh_opt is defined, invoke
+ it to see if the optimizations should be applied.
+ * config/tc-mn10300.h (md_allow_eh_opt): Define. Only allow call
+ frame optimization if linker relaxation is not enabled.
+
2007-11-05 Danny Smith <dannysmith@users.sourceforge.net>
* read.c (ALIGN_LIMIT): Rename to ...
#define HANDLE_ALIGN(frag) mn10300_handle_align (frag)
extern void mn10300_handle_align (fragS *);
+
+/* Only allow call frame debug info optimization when linker relaxation is
+ not enabled as otherwise we could generate the DWARF directives without
+ the relocs necessary to patch them up. */
+#define md_allow_eh_opt (linkrelax == 0)
position of the two symbols relative to each other should ensure that this
macro returns zero in situations where this can occur.
+@item md_allow_eh_opt
+If defined, GAS will check this macro before performing any optimizations on
+the DWARF call frame debug information that is emitted. Targets which
+implement link time relaxation may need to define this macro and set it to zero
+if it is possible to change the size of a function's prologue.
@end table
@node Object format backend
if (flag_traditional_format)
return 0;
+#ifdef md_allow_eh_opt
+ if (! md_allow_eh_opt)
+ return 0;
+#endif
+
/* Select the proper section data. */
if (strcmp (segment_name (now_seg), ".eh_frame") == 0)
d = &eh_frame_data;
+2007-11-06 Nick Clifton <nickc@redhat.com>
+
+ * gas/elf/elf.exp: Disable ehopt test for mn10300.
+
2007-11-01 H.J. Lu <hongjiu.lu@intel.com>
* gas/i386/i386.d: New.
set target_machine -armelf
}
}
- run_dump_test "ehopt0"
+
+ # The MN10300 port disables the assembler's call frame optimization
+ # because it interfers with link time relaxation of function prologues.
+ if (![istarget "mn10300-*-*"] && ![istarget "am3*-*-*"]} then {
+ run_dump_test "ehopt0"
+ }
run_dump_test "group0a"
run_dump_test "group0b"
run_dump_test "group1a"