aboutsummaryrefslogtreecommitdiff
path: root/libffi/src/powerpc
diff options
context:
space:
mode:
authorMatt Austern <austern@apple.com>2004-03-12 17:09:03 +0000
committerMatt Austern <austern@apple.com>2004-03-12 17:09:03 +0000
commit622dd78b4174ef0e7aef567e8680b2a40837665f (patch)
treecaa8a2f6e25f2a2ca455a215f64f01003c8ba7c4 /libffi/src/powerpc
parent0cd74d0cde48ad9e904248444010edb9488bd745 (diff)
Enabled linkonce support for Darwin.
* target.h (struct gcc_target): New target hook, unwind_label. * target-def.h (TARGET_ASM_EMIT_UNWIND_LABEL): New hook. * output.h (default_emit_unwind_label): New function. * default.h (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): New macro. (TARGET_USES_WEAK_UNWIND_INFO): New target macro. (TARGET_SUPPORTS_HIDDEN): New target macro. * dwarf2out.c (struct dw_fde_struct): Add field for function decl that corresponds to this FDE. (FRAME_BEGIN_LABEL): Allow target to override default label. (output_call_frame_info): If FDEs are linknonce, then use extra indirection for FDE encoding, output a label for each FDE, and output an empty label for each function without an FDE. (dwarf2out_begin_prologue): Set up decl field when creating an FDE. * varasm.c (globalize_decl): Call ASM_MAKE_LABEL_LINKONCE for decls with DECL_ONE_ONLY set, if that macro is defined. (make_decl_one_only): Don't use DECL_COMMON if we're compiling for a SUPPORTS_ONE_ONLY target. * config/darwin-protos.h (darwin_unique_section): Declare. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_make_decl_one_only): Likewise. * config/darwin.c (machopic_finish): Get rid of tweak that eliminate stubs for symbols that are defined. (darwin_encode_section_info): Don't treat weak functions as defined. (darwin_make_decl_one_only): Define. (darwin_asm_named_section): Likewise. (darwin_section_type_flags): Likewise. (darwin_unique_section): Likewise. (darwin_emit_unwind_label): Likewise. (darwin_non_lazy_pcrel): Likewise. (darwin_asm_output_dwarf_delta): Difference between two labels is local only if both labels are local. * config/darwin.h (MAKE_DECL_ONE_ONLY): Define. (ASM_MAKE_LABEL_LINKONCE): Likewise. (TARGET_SUPPORTS_HIDDEN): Likewise. (TARGET_USES_WEAK_UNWIND_INFO): Likewise. (TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY): Likewise. (FRAME_BEGIN_LABEL): Likewise. (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. (ASM_DECLARE_FUNCTION_NAME): Likewise. (darwin_eh_frame_section): Give __eh_frame section the coalesced flag. (TARGET_ASM_UNIQUE_SECTION): Define. (EH_FRAME_SECTION_NAME): Define. (EH_FRAME_SECTION_ATTR): Likewise. (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Likewise. (TARGET_ASM_NAMED_SECTION): Likewise. (TARGET_SECTION_TYPE_FLAGS): Likewise. * doc/tm.texi: Document TARGET_USES_WEAK_UNWIND_INFO, TARGET_EXPLICIT_INSTANTIATIONS_ONE_ONLY, TARGET_SUPPORTS_HIDDEN, TARGET_ASM_EMIT_UNWIND_LABEL. * cp/decl2.c (maybe_make_one_only): Look at TARGET_EXPLICIT_INSTANTIATION_ONE_ONLY when deciding whether to make an explicit instantiation weak. * cp/method.c (use_thunk): Make sure we call comdat_linkage when appropriate. * cp/pt.c (do_type_instantiation): On systems where weak symbols don't go in a static archive's TOC, explicit instantiation of a class must imply *explicit* instantiation of its memeber. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@79394 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/src/powerpc')
-rw-r--r--libffi/src/powerpc/darwin.S13
-rw-r--r--libffi/src/powerpc/darwin_closure.S11
2 files changed, 13 insertions, 11 deletions
diff --git a/libffi/src/powerpc/darwin.S b/libffi/src/powerpc/darwin.S
index 70c48e531d9..ad4824e2762 100644
--- a/libffi/src/powerpc/darwin.S
+++ b/libffi/src/powerpc/darwin.S
@@ -162,8 +162,8 @@ _ffi_call_AIX:
/* END(_ffi_call_AIX) */
.data
-.section __TEXT,__eh_frame
-Lframe1:
+.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms
+EH_frame1:
.set L$set$0,LECIE1-LSCIE1
.long L$set$0 ; Length of Common Information Entry
LSCIE1:
@@ -173,19 +173,20 @@ LSCIE1:
.byte 0x1 ; uleb128 0x1; CIE Code Alignment Factor
.byte 0x7c ; sleb128 -4; CIE Data Alignment Factor
.byte 0x41 ; CIE RA Column
- .byte 0x1 ; uleb128 0x1; Augmentation size
- .byte 0x10 ; FDE Encoding (pcrel)
+ .byte 0x1 ; uleb128 0x1; Augmentation size
+ .byte 0x90 ; FDE Encoding (indirect pcrel)
.byte 0xc ; DW_CFA_def_cfa
.byte 0x1 ; uleb128 0x1
.byte 0x0 ; uleb128 0x0
.align 2
LECIE1:
+.globl _ffi_call_DARWIN.eh
+_ffi_call_DARWIN.eh:
LSFDE1:
.set L$set$1,LEFDE1-LASFDE1
.long L$set$1 ; FDE Length
LASFDE1:
- .set L$set$2,LASFDE1-Lframe1
- .long L$set$2 ; FDE CIE offset
+ .long LASFDE1-EH_frame1 ; FDE CIE offset
.long LFB0-. ; FDE initial location
.set L$set$3,LFE1-LFB0
.long L$set$3 ; FDE address range
diff --git a/libffi/src/powerpc/darwin_closure.S b/libffi/src/powerpc/darwin_closure.S
index d8612a85445..13ee81d6049 100644
--- a/libffi/src/powerpc/darwin_closure.S
+++ b/libffi/src/powerpc/darwin_closure.S
@@ -234,8 +234,8 @@ Lfinish:
/* END(ffi_closure_ASM) */
.data
-.section __TEXT,__eh_frame
-Lframe1:
+.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms
+EH_frame1:
.set L$set$0,LECIE1-LSCIE1
.long L$set$0 ; Length of Common Information Entry
LSCIE1:
@@ -246,19 +246,20 @@ LSCIE1:
.byte 0x7c ; sleb128 -4; CIE Data Alignment Factor
.byte 0x41 ; CIE RA Column
.byte 0x1 ; uleb128 0x1; Augmentation size
- .byte 0x10 ; FDE Encoding (pcrel)
+ .byte 0x90 ; FDE Encoding (indirect pcrel)
.byte 0xc ; DW_CFA_def_cfa
.byte 0x1 ; uleb128 0x1
.byte 0x0 ; uleb128 0x0
.align 2
LECIE1:
+.globl _ffi_closure_ASM.eh
+_ffi_closure_ASM.eh:
LSFDE1:
.set L$set$1,LEFDE1-LASFDE1
.long L$set$1 ; FDE Length
LASFDE1:
- .set L$set$2,LASFDE1-Lframe1
- .long L$set$2 ; FDE CIE offset
+ .long LASFDE1-EH_frame1 ; FDE CIE offset
.long LFB1-. ; FDE initial location
.set L$set$3,LFE1-LFB1
.long L$set$3 ; FDE address range