diff options
author | Jakub Jelinek <jakub@redhat.com> | 2003-05-16 22:09:22 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2003-05-16 22:09:22 +0000 |
commit | f18f73dddf8e8beee5646f08362501703d917791 (patch) | |
tree | 0263f96916c31cb329b80472caf4f2a3a0ffa797 /libffi/src/powerpc | |
parent | f55d6a2d6ae8b2041e0c841cd8cab3980a4b2138 (diff) |
* configure.in (HAVE_RO_EH_FRAME): Check whether .eh_frame section
should be read-only.
* configure: Rebuilt.
* fficonfig.h.in: Rebuilt.
* include/ffi.h.in (EH_FRAME_FLAGS): Define.
* src/alpha/osf.S: Use EH_FRAME_FLAGS.
* src/powerpc/linux64.S: Likewise.
* src/powerpc/linux64_closure.S: Likewise. Include ffi.h.
* src/powerpc/sysv.S: Use EH_FRAME_FLAGS. Use pcrel encoding
if -fpic/-fPIC/-mrelocatable.
* src/powerpc/powerpc_closure.S: Likewise.
* src/sparc/v8.S: If HAVE_RO_EH_FRAME is defined, don't include
#write in .eh_frame flags.
* src/sparc/v9.S: Likewise.
* src/x86/unix64.S: Use EH_FRAME_FLAGS.
* src/x86/sysv.S: Likewise. Use pcrel encoding if -fpic/-fPIC.
* src/s390/sysv.S: Use EH_FRAME_FLAGS. Include ffi.h.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@66887 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/src/powerpc')
-rw-r--r-- | libffi/src/powerpc/linux64.S | 2 | ||||
-rw-r--r-- | libffi/src/powerpc/linux64_closure.S | 5 | ||||
-rw-r--r-- | libffi/src/powerpc/ppc_closure.S | 35 | ||||
-rw-r--r-- | libffi/src/powerpc/sysv.S | 47 |
4 files changed, 61 insertions, 28 deletions
diff --git a/libffi/src/powerpc/linux64.S b/libffi/src/powerpc/linux64.S index 9619c539223..28727cd01f8 100644 --- a/libffi/src/powerpc/linux64.S +++ b/libffi/src/powerpc/linux64.S @@ -141,7 +141,7 @@ ffi_call_LINUX64: .byte 0,12,0,1,128,4,0,0 .size .ffi_call_LINUX64,.-.ffi_call_LINUX64 - .section .eh_frame,"aw",@progbits + .section .eh_frame,EH_FRAME_FLAGS,@progbits .Lframe1: .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry .LSCIE1: diff --git a/libffi/src/powerpc/linux64_closure.S b/libffi/src/powerpc/linux64_closure.S index d435e584fd5..1159c1e77a8 100644 --- a/libffi/src/powerpc/linux64_closure.S +++ b/libffi/src/powerpc/linux64_closure.S @@ -1,3 +1,6 @@ +#define LIBFFI_ASM +#include <ffi.h> + .file "linux64_closure.S" #ifdef __powerpc64__ @@ -174,7 +177,7 @@ ffi_closure_LINUX64: .byte 0,12,0,1,128,0,0,0 .size .ffi_closure_LINUX64,.-.ffi_closure_LINUX64 - .section .eh_frame,"aw",@progbits + .section .eh_frame,EH_FRAME_FLAGS,@progbits .Lframe1: .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry .LSCIE1: diff --git a/libffi/src/powerpc/ppc_closure.S b/libffi/src/powerpc/ppc_closure.S index 4cfc8fda5ad..391f318d199 100644 --- a/libffi/src/powerpc/ppc_closure.S +++ b/libffi/src/powerpc/ppc_closure.S @@ -197,36 +197,51 @@ ENTRY(ffi_closure_SYSV) blr END(ffi_closure_SYSV) - .section ".eh_frame","aw" -__FRAME_BEGIN__: + .section ".eh_frame",EH_FRAME_FLAGS,@progbits +.Lframe1: .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry .LSCIE1: .4byte 0x0 # CIE Identifier Tag .byte 0x1 # CIE Version +#if defined _RELOCATABLE || defined __PIC__ + .ascii "zR\0" # CIE Augmentation +#else .ascii "\0" # CIE Augmentation - .byte 0x1 # uleb128 0x1; CIE Code Alignment Factor - .byte 0x7c # sleb128 -4; CIE Data Alignment Factor +#endif + .uleb128 0x1 # CIE Code Alignment Factor + .sleb128 -4 # CIE Data Alignment Factor .byte 0x41 # CIE RA Column +#if defined _RELOCATABLE || defined __PIC__ + .uleb128 0x1 # Augmentation size + .byte 0x1b # FDE Encoding (pcrel sdata4) +#endif .byte 0xc # DW_CFA_def_cfa - .byte 0x1 # uleb128 0x1 - .byte 0x0 # uleb128 0x0 + .uleb128 0x1 + .uleb128 0x0 .align 2 .LECIE1: .LSFDE1: .4byte .LEFDE1-.LASFDE1 # FDE Length .LASFDE1: - .4byte .LASFDE1-__FRAME_BEGIN__ # FDE CIE offset + .4byte .LASFDE1-.Lframe1 # FDE CIE offset +#if defined _RELOCATABLE || defined __PIC__ + .4byte .LFB1-. # FDE initial location +#else .4byte .LFB1 # FDE initial location +#endif .4byte .LFE1-.LFB1 # FDE address range +#if defined _RELOCATABLE || defined __PIC__ + .uleb128 0x0 # Augmentation size +#endif .byte 0x4 # DW_CFA_advance_loc4 .4byte .LCFI0-.LFB1 .byte 0xe # DW_CFA_def_cfa_offset - .byte 144,1 # uleb128 144 + .uleb128 144 .byte 0x4 # DW_CFA_advance_loc4 .4byte .LCFI1-.LCFI0 .byte 0x2f # DW_CFA_GNU_negative_offset_extended - .byte 0x41 # uleb128 0x41 - .byte 0x1 # uleb128 0x1 + .uleb128 0x41 + .uleb128 0x1 .align 2 .LEFDE1: diff --git a/libffi/src/powerpc/sysv.S b/libffi/src/powerpc/sysv.S index c1e0d18461c..c045c779dfc 100644 --- a/libffi/src/powerpc/sysv.S +++ b/libffi/src/powerpc/sysv.S @@ -128,48 +128,63 @@ L(float_return_value): .LFE1: END(ffi_call_SYSV) - .section ".eh_frame","aw" -__FRAME_BEGIN__: + .section ".eh_frame",EH_FRAME_FLAGS,@progbits +.Lframe1: .4byte .LECIE1-.LSCIE1 /* Length of Common Information Entry */ .LSCIE1: .4byte 0x0 /* CIE Identifier Tag */ .byte 0x1 /* CIE Version */ - .ascii "\0" /* CIE Augmentation */ - .byte 0x1 /* uleb128 0x1; CIE Code Alignment Factor */ - .byte 0x7c /* sleb128 -4; CIE Data Alignment Factor */ +#if defined _RELOCATABLE || defined __PIC__ + .ascii "zR\0" /* CIE Augmentation */ +#else + .ascii "\0" /* CIE Augmentation */ +#endif + .uleb128 0x1 /* CIE Code Alignment Factor */ + .sleb128 -4 /* CIE Data Alignment Factor */ .byte 0x41 /* CIE RA Column */ +#if defined _RELOCATABLE || defined __PIC__ + .uleb128 0x1 /* Augmentation size */ + .byte 0x1b /* FDE Encoding (pcrel sdata4) */ +#endif .byte 0xc /* DW_CFA_def_cfa */ - .byte 0x1 /* uleb128 0x1 */ - .byte 0x0 /* uleb128 0x0 */ + .uleb128 0x1 + .uleb128 0x0 .align 2 .LECIE1: .LSFDE1: .4byte .LEFDE1-.LASFDE1 /* FDE Length */ .LASFDE1: - .4byte .LASFDE1-__FRAME_BEGIN__ /* FDE CIE offset */ + .4byte .LASFDE1-.Lframe1 /* FDE CIE offset */ +#if defined _RELOCATABLE || defined __PIC__ + .4byte .LFB1-. /* FDE initial location */ +#else .4byte .LFB1 /* FDE initial location */ +#endif .4byte .LFE1-.LFB1 /* FDE address range */ +#if defined _RELOCATABLE || defined __PIC__ + .uleb128 0x0 /* Augmentation size */ +#endif .byte 0x4 /* DW_CFA_advance_loc4 */ .4byte .LCFI0-.LFB1 .byte 0xd /* DW_CFA_def_cfa_register */ - .byte 0x08 /* uleb128 0x08 */ + .uleb128 0x08 .byte 0x4 /* DW_CFA_advance_loc4 */ .4byte .LCFI5-.LCFI0 .byte 0x2f /* DW_CFA_GNU_negative_offset_extended */ - .byte 0x41 /* uleb128 0x41 */ - .byte 0x1 /* uleb128 0x1 */ + .uleb128 0x41 + .uleb128 0x1 .byte 0x9f /* DW_CFA_offset, column 0x1f */ - .byte 0x1 /* uleb128 0x1 */ + .uleb128 0x1 .byte 0x9e /* DW_CFA_offset, column 0x1e */ - .byte 0x2 /* uleb128 0x2 */ + .uleb128 0x2 .byte 0x9d /* DW_CFA_offset, column 0x1d */ - .byte 0x3 /* uleb128 0x3 */ + .uleb128 0x3 .byte 0x9c /* DW_CFA_offset, column 0x1c */ - .byte 0x4 /* uleb128 0x4 */ + .uleb128 0x4 .byte 0x4 /* DW_CFA_advance_loc4 */ .4byte .LCFI6-.LCFI5 .byte 0xd /* DW_CFA_def_cfa_register */ - .byte 0x1c /* uleb128 0x1c */ + .uleb128 0x1c .align 2 .LEFDE1: #endif |