diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2008-10-09 17:31:43 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@libertysurf.fr> | 2008-10-09 17:31:43 +0000 |
commit | ad5fec3b3a1e529a7056e15f271851bd0dfb10fa (patch) | |
tree | 291496f36be6171335bae736003855fdece60068 | |
parent | dcb1a1e279928080fb42b2270f5a3180f81e4133 (diff) | |
download | gdb-ad5fec3b3a1e529a7056e15f271851bd0dfb10fa.zip gdb-ad5fec3b3a1e529a7056e15f271851bd0dfb10fa.tar.gz gdb-ad5fec3b3a1e529a7056e15f271851bd0dfb10fa.tar.bz2 |
* dw2gencfi.c (cfi_finish): Deal with md_fix_up_eh_frame.
* config/tc-i386.h (md_fix_up_eh_frame): Define on Solaris.
(i386_solaris_fix_up_eh_frame): Declare.
* config/tc-i386.c (i386_solaris_fix_up_eh_frame): New function.
-rw-r--r-- | gas/ChangeLog | 7 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 9 | ||||
-rw-r--r-- | gas/config/tc-i386.h | 5 | ||||
-rw-r--r-- | gas/dw2gencfi.c | 4 |
4 files changed, 25 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index c53448a..a3b056b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,10 @@ +2008-10-09 Eric Botcazou <ebotcazou@adacore.com> + + * dw2gencfi.c (cfi_finish): Deal with md_fix_up_eh_frame. + * config/tc-i386.h (md_fix_up_eh_frame): Define on Solaris. + (i386_solaris_fix_up_eh_frame): Declare. + * config/tc-i386.c (i386_solaris_fix_up_eh_frame): New function. + 2008-10-09 Nick Clifton <nickc@redhat.com> PR 6944 diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 539ea79..df76ae9 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -10105,6 +10105,15 @@ i386_elf_section_type (const char *str, size_t len) return -1; } +#ifdef TE_SOLARIS +void +i386_solaris_fix_up_eh_frame (segT sec) +{ + if (flag_code == CODE_64BIT) + elf_section_type (sec) = SHT_X86_64_UNWIND; +} +#endif + #ifdef TE_PE void tc_pe_dwarf2_emit_offset (symbolS *symbol, unsigned int size) diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h index a670ff9..fd8c8ec 100644 --- a/gas/config/tc-i386.h +++ b/gas/config/tc-i386.h @@ -212,6 +212,11 @@ extern void tc_x86_frame_initial_instructions (void); #define md_elf_section_type(str,len) i386_elf_section_type (str, len) extern int i386_elf_section_type (const char *, size_t); +#ifdef TE_SOLARIS +#define md_fix_up_eh_frame(sec) i386_solaris_fix_up_eh_frame (sec) +extern void i386_solaris_fix_up_eh_frame (segT); +#endif + /* Support for SHF_X86_64_LARGE */ extern int x86_64_section_word (char *, size_t); extern int x86_64_section_letter (int, char **); diff --git a/gas/dw2gencfi.c b/gas/dw2gencfi.c index 12a656f..4adfeab 100644 --- a/gas/dw2gencfi.c +++ b/gas/dw2gencfi.c @@ -1496,6 +1496,10 @@ cfi_finish (void) subseg_set (cfi_seg, 0); record_alignment (cfi_seg, EH_FRAME_ALIGNMENT); +#ifdef md_fix_up_eh_frame + md_fix_up_eh_frame (cfi_seg); +#endif + /* Make sure check_eh_frame doesn't do anything with our output. */ save_flag_traditional_format = flag_traditional_format; flag_traditional_format = 1; |