Browse Source

* 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.
* gas/elf/elf.exp: Disable ehopt test for mn10300.
insight_6_8-branch
Nick Clifton 19 years ago
parent
commit
8c7504802a
  1. 7
      gas/ChangeLog
  2. 5
      gas/config/tc-mn10300.h
  3. 5
      gas/doc/internals.texi
  4. 5
      gas/ehopt.c
  5. 4
      gas/testsuite/ChangeLog
  6. 5
      gas/testsuite/gas/elf/elf.exp

7
gas/ChangeLog

@ -1,3 +1,10 @@
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 ...

5
gas/config/tc-mn10300.h

@ -120,3 +120,8 @@ extern bfd_boolean mn10300_allow_local_subtract (expressionS *, expressionS *, s
#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)

5
gas/doc/internals.texi

@ -1547,6 +1547,11 @@ evaluated. Targets which implement link time relaxation which may change the
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

5
gas/ehopt.c

@ -275,6 +275,11 @@ check_eh_frame (expressionS *exp, unsigned int *pnbytes)
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;

4
gas/testsuite/ChangeLog

@ -1,3 +1,7 @@
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.

5
gas/testsuite/gas/elf/elf.exp

@ -73,7 +73,12 @@ if { ([istarget "*-*-*elf*"]
set target_machine -armelf
}
}
# 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"

Loading…
Cancel
Save