Index: gcc/ChangeLog =================================================================== RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v retrieving revision 2.2552 diff -p -r2.2552 ChangeLog *** gcc/ChangeLog 29 Jan 2004 15:59:09 -0000 2.2552 --- gcc/ChangeLog 29 Jan 2004 16:00:16 -0000 *************** *** 1,3 **** --- 1,61 ---- + 2004-01-29 Matt Austern + + * c-opts.c (c_common_handle_option): Add -fhidden-weak option. + * c.opt: Ditto. + * flags.h (flag_hidden_weak): flag corresponding to -fhidden-weak. + * toplev.c (flag_hidden_weak): Ditto. + * default.h (ASM_OUTPUT_UNWIND_LABEL): New target macro. + (TARGET_WEAK_NO_TOC): New target macro. + (TARGET_USES_WEAK_UNWIND_INFO): New target macro. + (TARGET_SUPPORTS_HIDDEN): New target macro. + (DEFAULT_USE_HIDDEN_WEAK): New target macro. + (USE_COMMON_FOR_ONE_ONLY): 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): On systems where USE_COMMON_FOR_ONE_ONLY is + false, don't use DECL_COMMON, instead use DECL_ONE_ONLY. + * config/darwin-protos.h (darwin_unique_section): Declare. + (darwin_asm_named_section): Ditto. + (darwin_section_type_flags): Ditto. + (darwin_non_lazy_pcrel): Ditto. + (darwin_output_unwind_label): Ditto. + (darwin_make_decl_one_only): Ditto. + * 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 functiosn as defined. + (darwin_make_decl_one_only): Define. + (darwin_asm_named_section): Ditto. + (darwin_section_type_flags): Ditto. + (darwin_unique_section): Ditto. + (darwin_output_unwind_label): Ditto. + (darwin_non_lazy_pcrel): Ditto. + (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): Ditto. + (TARGET_SUPPORTS_HIDDEN): Ditto. + (DEFAULT_USE_HIDDEN_WEAK): Ditto. + (USE_COMMON_FOR_ONE_ONLY): Ditto. + (TARGET_USES_WEAK_UNWIND_INFO): Ditto. + (FRAME_BEGIN_LABEL): Ditto. + (ASM_OUTPUT_UNWIND_LABEL): Ditto. + (ASM_DECLARE_OBJECT_NAME): Make references to weak symbols indirect. + (ASM_DECLARE_FUNCTION_NAME): Ditto. + (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): Ditto. + (ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX): Ditto. + (TARGET_ASM_NAMED_SECTION): Ditto. + (TARGET_SECTION_TYPE_FLAGS): Ditto. + 2004-01-29 Kazu Hirata * config/frv/frv.c: Don't mention deprecated macros in Index: gcc/c-opts.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/c-opts.c,v retrieving revision 1.98 diff -p -r1.98 c-opts.c *** gcc/c-opts.c 21 Jan 2004 20:39:51 -0000 1.98 --- gcc/c-opts.c 29 Jan 2004 16:00:17 -0000 *************** c_common_handle_option (size_t scode, co *** 916,921 **** --- 916,932 ---- flag_weak = value; break; + case OPT_fhidden_weak: + flag_hidden_weak = value; + #if !TARGET_SUPPORTS_HIDDEN + if (value) + { + warning ("-fhidden-weak not supported for this target, ignored"); + flag_hidden_weak = 0; + } + #endif + break; + case OPT_fzero_link: flag_zero_link = value; break; Index: gcc/c.opt =================================================================== RCS file: /cvs/gcc/gcc/gcc/c.opt,v retrieving revision 1.17 diff -p -r1.17 c.opt *** gcc/c.opt 25 Sep 2003 01:25:50 -0000 1.17 --- gcc/c.opt 29 Jan 2004 16:00:17 -0000 *************** fweak *** 666,671 **** --- 666,675 ---- C++ ObjC++ Emit common-like symbols as weak symbols + fhidden-weak + C++ ObjC++ + Give weak symbols hidden visibility on targets that support it + fwide-exec-charset= C ObjC C++ ObjC++ Joined RejectNegative -fwide-exec-charset= Convert all wide strings and character constants to character set Index: gcc/defaults.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/defaults.h,v retrieving revision 1.126 diff -p -r1.126 defaults.h *** gcc/defaults.h 21 Jan 2004 20:39:53 -0000 1.126 --- gcc/defaults.h 29 Jan 2004 16:00:18 -0000 *************** do { fputs (integer_asm_op (POINTER_SIZE *** 219,224 **** --- 219,232 ---- #endif #endif + /* How to emit a nonlocal label for FDEs. Default is to do nothing, + because most targets don't need such labels. The meaning of the + first two parameters is obvious. The third is a boolean: true if + this is a placeholder label for an omitted FDE. */ + #ifndef ASM_OUTPUT_UNWIND_LABEL + #define ASM_OUTPUT_UNWIND_LABEL(FILE, DECL, EMPTY) do { } while(0) + #endif + /* This determines whether or not we support weak symbols. */ #ifndef SUPPORTS_WEAK #if defined (ASM_WEAKEN_LABEL) || defined (ASM_WEAKEN_DECL) *************** do { fputs (integer_asm_op (POINTER_SIZE *** 237,242 **** --- 245,262 ---- #endif #endif + /* Determines whether symbols with link-once semantics should be given + special treatments so that they don't get put in the table of + contents of a static archive. */ + #ifndef TARGET_WEAK_NO_TOC + # define TARGET_WEAK_NO_TOC 0 + #endif + + /* This determines whether or not we need linkonce unwind information */ + #ifndef TARGET_USES_WEAK_UNWIND_INFO + #define TARGET_USES_WEAK_UNWIND_INFO 0 + #endif + /* By default, there is no prefix on user-defined symbols. */ #ifndef USER_LABEL_PREFIX #define USER_LABEL_PREFIX "" *************** do { fputs (integer_asm_op (POINTER_SIZE *** 257,262 **** --- 277,306 ---- # define TARGET_ATTRIBUTE_WEAK # endif #endif + + /* This determines whether this target supports hidden visibility. + This is a weaker condition than HAVE_GAS_HIDDEN, which probes for + specific assembler syntax. */ + #ifndef TARGET_SUPPORTS_HIDDEN + # ifdef HAVE_GAS_HIDDEN + # define TARGET_SUPPORTS_HIDDEN 1 + # else + # define TARGET_SUPPORTS_HIDDEN 0 + # endif + #endif + + /* Determine whether weak symbols should be given hidden visibility by + default. */ + #ifndef DEFAULT_USE_HIDDEN_WEAK + # define DEFAULT_USE_HIDDEN_WEAK 0 + #endif + + /* Determines whether we may use common symbols to represent one-only + semantics (a.k.a. "vague linkage"). */ + #ifndef USE_COMMON_FOR_ONE_ONLY + # define USE_COMMON_FOR_ONE_ONLY 1 + #endif + /* If the target supports init_priority C++ attribute, give SUPPORTS_INIT_PRIORITY a nonzero value. */ Index: gcc/dwarf2out.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/dwarf2out.c,v retrieving revision 1.482 diff -p -r1.482 dwarf2out.c *** gcc/dwarf2out.c 29 Jan 2004 08:26:24 -0000 1.482 --- gcc/dwarf2out.c 29 Jan 2004 16:00:25 -0000 *************** typedef struct cfa_loc GTY(()) *** 243,248 **** --- 243,249 ---- typedef struct dw_fde_struct GTY(()) { + tree decl; const char *dw_fde_begin; const char *dw_fde_current_label; const char *dw_fde_end; *************** static void def_cfa_1 (const char *, dw_ *** 391,397 **** --- 392,400 ---- #define FUNC_END_LABEL "LFE" #endif + #ifndef FRAME_BEGIN_LABEL #define FRAME_BEGIN_LABEL "Lframe" + #endif #define CIE_AFTER_SIZE_LABEL "LSCIE" #define CIE_END_LABEL "LECIE" #define FDE_LABEL "LSFDE" *************** output_call_frame_info (int for_eh) *** 1942,1947 **** --- 1945,1966 ---- if (fde_table_in_use == 0) return; + /* If we make FDEs linkonce, we may have to emit an empty label for + an FDE that wouldn't otherwise be emitted. We want to avoid + having an FDE kept around when the function it refers to is + discarded. (Example where this matters: a primary function + template in C++ requires EH information, but an explicit + specialization doesn't. */ + if (TARGET_USES_WEAK_UNWIND_INFO + && ! flag_asynchronous_unwind_tables + && for_eh) + for (i = 0; i < fde_table_in_use; i++) + if ((fde_table[i].nothrow || fde_table[i].all_throwers_are_sibcalls) + && !fde_table[i].uses_eh_lsda + && ! DECL_ONE_ONLY (fde_table[i].decl)) + ASM_OUTPUT_UNWIND_LABEL (asm_out_file, fde_table[i].decl, + /* empty */ 1); + /* If we don't have any functions we'll want to unwind out of, don't emit any EH unwind information. Note that if exceptions aren't enabled, we won't have collected nothrow information, and if we *************** output_call_frame_info (int for_eh) *** 1953,1958 **** --- 1972,1980 ---- for (i = 0; i < fde_table_in_use; i++) if (fde_table[i].uses_eh_lsda) any_eh_needed = any_lsda_needed = true; + else if (TARGET_USES_WEAK_UNWIND_INFO + && DECL_ONE_ONLY (fde_table[i].decl)) + any_eh_needed = 1; else if (! fde_table[i].nothrow && ! fde_table[i].all_throwers_are_sibcalls) any_eh_needed = true; *************** output_call_frame_info (int for_eh) *** 2004,2010 **** P Indicates the presence of an encoding + language personality routine in the CIE augmentation. */ ! fde_encoding = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/1, /*global=*/0); per_encoding = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/2, /*global=*/1); lsda_encoding = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0, /*global=*/0); --- 2026,2034 ---- P Indicates the presence of an encoding + language personality routine in the CIE augmentation. */ ! fde_encoding = TARGET_USES_WEAK_UNWIND_INFO && !flag_hidden_weak ! ? ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/2, /*global=*/1) ! : ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/1, /*global=*/0); per_encoding = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/2, /*global=*/1); lsda_encoding = ASM_PREFERRED_EH_DATA_FORMAT (/*code=*/0, /*global=*/0); *************** output_call_frame_info (int for_eh) *** 2095,2103 **** --- 2119,2130 ---- /* Don't emit EH unwind info for leaf functions that don't need it. */ if (for_eh && !flag_asynchronous_unwind_tables && flag_exceptions && (fde->nothrow || fde->all_throwers_are_sibcalls) + && (! TARGET_USES_WEAK_UNWIND_INFO || ! DECL_ONE_ONLY (fde->decl)) && !fde->uses_eh_lsda) continue; + ASM_OUTPUT_UNWIND_LABEL (asm_out_file, fde->decl, /* empty */ 0); + (*targetm.asm_out.internal_label) (asm_out_file, FDE_LABEL, for_eh + i * 2); ASM_GENERATE_INTERNAL_LABEL (l1, FDE_AFTER_SIZE_LABEL, for_eh + i * 2); ASM_GENERATE_INTERNAL_LABEL (l2, FDE_END_LABEL, for_eh + i * 2); *************** output_call_frame_info (int for_eh) *** 2113,2121 **** if (for_eh) { ! dw2_asm_output_encoded_addr_rtx (fde_encoding, ! gen_rtx_SYMBOL_REF (Pmode, fde->dw_fde_begin), ! "FDE initial location"); dw2_asm_output_delta (size_of_encoded_value (fde_encoding), fde->dw_fde_end, fde->dw_fde_begin, "FDE address range"); --- 2140,2155 ---- if (for_eh) { ! if (TARGET_USES_WEAK_UNWIND_INFO ! && DECL_ONE_ONLY (fde->decl)) ! dw2_asm_output_encoded_addr_rtx (fde_encoding, ! gen_rtx_SYMBOL_REF (Pmode, IDENTIFIER_POINTER ! (DECL_ASSEMBLER_NAME (fde->decl))), ! "FDE initial location"); ! else ! dw2_asm_output_encoded_addr_rtx (fde_encoding, ! gen_rtx_SYMBOL_REF (Pmode, fde->dw_fde_begin), ! "FDE initial location"); dw2_asm_output_delta (size_of_encoded_value (fde_encoding), fde->dw_fde_end, fde->dw_fde_begin, "FDE address range"); *************** dwarf2out_begin_prologue (unsigned int l *** 2248,2253 **** --- 2282,2288 ---- /* Add the new FDE at the end of the fde_table. */ fde = &fde_table[fde_table_in_use++]; + fde->decl = current_function_decl; fde->dw_fde_begin = xstrdup (label); fde->dw_fde_current_label = NULL; fde->dw_fde_end = NULL; Index: gcc/flags.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/flags.h,v retrieving revision 1.128 diff -p -r1.128 flags.h *** gcc/flags.h 27 Jan 2004 12:49:30 -0000 1.128 --- gcc/flags.h 29 Jan 2004 16:00:26 -0000 *************** extern int flag_unwind_tables; *** 505,510 **** --- 505,515 ---- extern int flag_asynchronous_unwind_tables; + /* Nonzero means that weak symbols are to be emitted with hidden + visiblity. This is not supported on all targets. */ + + extern int flag_hidden_weak; + /* Nonzero means don't place uninitialized global data in common storage by default. */ Index: gcc/toplev.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/toplev.c,v retrieving revision 1.870 diff -p -r1.870 toplev.c *** gcc/toplev.c 27 Jan 2004 12:49:30 -0000 1.870 --- gcc/toplev.c 29 Jan 2004 16:00:29 -0000 *************** unsigned local_tick; *** 465,470 **** --- 465,475 ---- /* -f flags. */ + /* Nonzero means that weak symbols are to be emitted with hidden + visiblity. This is not supported on all targets. */ + + int flag_hidden_weak = DEFAULT_USE_HIDDEN_WEAK; + /* Nonzero means `char' should be signed. */ int flag_signed_char; Index: gcc/varasm.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/varasm.c,v retrieving revision 1.405 diff -p -r1.405 varasm.c *** gcc/varasm.c 14 Jan 2004 00:49:00 -0000 1.405 --- gcc/varasm.c 29 Jan 2004 16:00:32 -0000 *************** globalize_decl (tree decl) *** 4366,4371 **** --- 4366,4374 ---- } return; } + #elif defined(ASM_MAKE_LABEL_LINKONCE) + if (DECL_ONE_ONLY (decl)) + ASM_MAKE_LABEL_LINKONCE (asm_out_file, name); #endif (*targetm.asm_out.globalize_label) (asm_out_file, name); *************** make_decl_one_only (tree decl) *** 4490,4496 **** TREE_PUBLIC (decl) = 1; ! if (TREE_CODE (decl) == VAR_DECL && (DECL_INITIAL (decl) == 0 || DECL_INITIAL (decl) == error_mark_node)) DECL_COMMON (decl) = 1; else if (SUPPORTS_ONE_ONLY) --- 4493,4500 ---- TREE_PUBLIC (decl) = 1; ! if (USE_COMMON_FOR_ONE_ONLY ! && TREE_CODE (decl) == VAR_DECL && (DECL_INITIAL (decl) == 0 || DECL_INITIAL (decl) == error_mark_node)) DECL_COMMON (decl) = 1; else if (SUPPORTS_ONE_ONLY) Index: gcc/config/darwin-protos.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/darwin-protos.h,v retrieving revision 1.29 diff -p -r1.29 darwin-protos.h *** gcc/config/darwin-protos.h 10 Nov 2003 23:07:09 -0000 1.29 --- gcc/config/darwin-protos.h 29 Jan 2004 16:00:33 -0000 *************** extern void machopic_select_section (tre *** 73,83 **** --- 73,92 ---- extern void machopic_select_rtx_section (enum machine_mode, rtx, unsigned HOST_WIDE_INT); + extern void darwin_unique_section (tree decl, int reloc); + extern void darwin_asm_named_section (const char *, unsigned int); + extern unsigned int darwin_section_type_flags (tree, const char *, int); + extern void darwin_non_lazy_pcrel (FILE *, rtx); + + extern void darwin_output_unwind_label(FILE *, tree, int); + extern void darwin_pragma_ignore (struct cpp_reader *); extern void darwin_pragma_options (struct cpp_reader *); extern void darwin_pragma_unused (struct cpp_reader *); extern void darwin_file_end (void); + + extern void darwin_make_decl_one_only (tree decl); /* Expanded by EXTRA_SECTION_FUNCTIONS into varasm.o. */ extern void const_section (void); Index: gcc/config/darwin.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/darwin.c,v retrieving revision 1.55 diff -p -r1.55 darwin.c *** gcc/config/darwin.c 14 Nov 2003 01:47:55 -0000 1.55 --- gcc/config/darwin.c 29 Jan 2004 16:00:34 -0000 *************** machopic_finish (FILE *asm_out_file) *** 900,909 **** if (! TREE_USED (temp)) continue; - /* If the symbol is actually defined, we don't need a stub. */ - if (sym_name[0] == '!' && sym_name[1] == 'T') - continue; - sym_name = darwin_strip_name_encoding (sym_name); sym = alloca (strlen (sym_name) + 2); --- 900,905 ---- *************** darwin_encode_section_info (tree decl, r *** 1008,1013 **** --- 1004,1010 ---- if ((TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == VAR_DECL) && !DECL_EXTERNAL (decl) + && (!TREE_PUBLIC (decl) || (!DECL_ONE_ONLY (decl) && !DECL_WEAK (decl))) && ((TREE_STATIC (decl) && (!DECL_COMMON (decl) || !TREE_PUBLIC (decl))) || (DECL_INITIAL (decl) *************** update_stubs (const char *name) *** 1159,1164 **** --- 1156,1175 ---- } void + darwin_make_decl_one_only (tree decl) + { + static const char *text_section = "__TEXT,__textcoal_nt,coalesced,no_toc"; + static const char *data_section = "__DATA,__datacoal_nt,coalesced,no_toc"; + + const char *sec = TREE_CODE (decl) == FUNCTION_DECL + ? text_section + : data_section; + TREE_PUBLIC (decl) = 1; + DECL_ONE_ONLY (decl) = 1; + DECL_SECTION_NAME (decl) = build_string (strlen (sec), sec); + } + + void machopic_select_section (tree exp, int reloc, unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED) { *************** darwin_globalize_label (FILE *stream, co *** 1325,1330 **** --- 1336,1438 ---- default_globalize_label (stream, name); } + void + darwin_asm_named_section (const char *name, unsigned int flags ATTRIBUTE_UNUSED) + { + fprintf (asm_out_file, ".section %s\n", name); + } + + unsigned int + darwin_section_type_flags (tree decl, const char *name, int reloc) + { + unsigned int flags = default_section_type_flags (decl, name, reloc); + + /* Weak or linkonce variables live in a writable section. */ + if (decl != 0 && TREE_CODE (decl) != FUNCTION_DECL + && (DECL_WEAK (decl) || DECL_ONE_ONLY (decl))) + flags |= SECTION_WRITE; + + return flags; + } + + void + darwin_unique_section (tree decl, int reloc ATTRIBUTE_UNUSED) + { + /* Darwin does not use unique sections. However, the target's + unique_section hook is called for linkonce symbols. We need + to set an appropriate section for such symbols. */ + if (DECL_ONE_ONLY (decl) && !DECL_SECTION_NAME (decl)) + darwin_make_decl_one_only (decl); + } + + /* Emit a label for an FDE, making it global and/or weak if appropriate. + The third parameter is nonzero if this is just a placeholder for an + FDE that we are omitting. */ + void + darwin_output_unwind_label(FILE *file, tree decl, int empty) + { + tree id = DECL_ASSEMBLER_NAME (decl) + ? DECL_ASSEMBLER_NAME (decl) + : DECL_NAME (decl); + + const char *prefix = "_"; + const int prefix_len = 1; + + const char *base = IDENTIFIER_POINTER (id); + unsigned int base_len = IDENTIFIER_LENGTH (id); + + const char *suffix = ".eh"; + unsigned int suffix_len = 3; + + int need_quotes = name_needs_quotes (base); + int quotes_len = need_quotes ? 2 : 0; + + char *lab = xmalloc (prefix_len + base_len + suffix_len + quotes_len + 1); + lab[0] = '\0'; + + if (need_quotes) + strcat(lab, "\""); + strcat(lab, prefix); + strcat(lab, base); + strcat(lab, suffix); + if (need_quotes) + strcat(lab, "\""); + + if (TREE_PUBLIC (decl)) + fprintf (file, "%s %s\n", + (DECL_VISIBILITY (decl) != VISIBILITY_HIDDEN + ? ".globl" + : ".private_extern"), + lab); + + if (DECL_ONE_ONLY (decl) && TREE_PUBLIC (decl)) + fprintf (file, ".weak_definition %s\n", lab); + + if (empty) + fprintf (file, "%s = 0\n", lab); + else + fprintf (file, "%s:\n", lab); + + free (lab); + } + + /* Generate a PC-relative reference to a Mach-O non-lazy-symbol. */ + void + darwin_non_lazy_pcrel (FILE *file, rtx addr) + { + const char *str; + const char *nlp_name; + + if (GET_CODE (addr) != SYMBOL_REF) + abort (); + + str = darwin_strip_name_encoding (XSTR (addr, 0)); + nlp_name = machopic_non_lazy_ptr_name (str); + fputs ("\t.long\t", file); + ASM_OUTPUT_LABELREF (file, nlp_name); + fputs ("-.", file); + } + /* Emit an assembler directive to set visibility for a symbol. The only supported visibilities are VISIBILITY_DEFAULT and VISIBILITY_HIDDEN; the latter corresponds to Darwin's "private *************** void *** 1361,1368 **** darwin_asm_output_dwarf_delta (FILE *file, int size ATTRIBUTE_UNUSED, const char *lab1, const char *lab2) { ! const char *p = lab1 + (lab1[0] == '*'); ! int islocaldiff = (p[0] == 'L'); if (islocaldiff) fprintf (file, "\t.set L$set$%d,", darwin_dwarf_label_counter); --- 1469,1476 ---- darwin_asm_output_dwarf_delta (FILE *file, int size ATTRIBUTE_UNUSED, const char *lab1, const char *lab2) { ! int islocaldiff = (lab1[0] == '*' && lab1[1] == 'L' ! && lab2[0] == '*' && lab2[1] == 'L'); if (islocaldiff) fprintf (file, "\t.set L$set$%d,", darwin_dwarf_label_counter); Index: gcc/config/darwin.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/darwin.h,v retrieving revision 1.65 diff -p -r1.65 darwin.h *** gcc/config/darwin.h 26 Dec 2003 19:13:35 -0000 1.65 --- gcc/config/darwin.h 29 Jan 2004 16:00:34 -0000 *************** do { text_section (); \ *** 310,315 **** --- 310,362 ---- "\t.stabs \"%s\",%d,0,0,Letext\nLetext:\n", "" , N_SO); \ } while (0) + /* Making a symbols weak on Darwin requires more than just setting DECL_WEAK. */ + #define MAKE_DECL_ONE_ONLY(DECL) darwin_make_decl_one_only (DECL) + + /* Representation of linkonce symbols for the MACH-O assembler. Linkonce + symbols must be given a special section *and* must be preceded by a + special assembler directive. */ + #define ASM_MAKE_LABEL_LINKONCE(FILE, NAME) \ + do { const char* _x = (NAME); if (!!strncmp (_x, "_OBJC_", 6)) { \ + fputs (".weak_definition ", FILE); assemble_name (FILE, _x); \ + fputs ("\n", FILE); }} while (0) + + /* We support hidden visibility */ + #undef TARGET_SUPPORTS_HIDDEN + #define TARGET_SUPPORTS_HIDDEN 1 + + /* Weak symbols are not hidden by default (can be overridden with + -fhidden-weak) */ + #undef DEFAULT_USE_HIDDEN_WEAK + #define DEFAULT_USE_HIDDEN_WEAK 0 + + /* The Darwin linker imposes two limitations on common symbols: they + can't have hidden visibility, and they can't appear in dylibs. As + a consequence, we should never use common symbols to represent + vague linkage. */ + #undef USE_COMMON_FOR_ONE_ONLY + #define USE_COMMON_FOR_ONE_ONLY 0 + + /* The Darwin linker doesn't like coalesced symbols to appear in a + static archive's table of contents, because it can't handle + duplicate entries in a TOC. */ + #undef TARGET_WEAK_NO_TOC + #define TARGET_WEAK_NO_TOC 1 + + /* We make exception information linkonce. */ + #undef TARGET_USES_WEAK_UNWIND_INFO + #define TARGET_USES_WEAK_UNWIND_INFO 1 + + /* We need to use a nonlocal label for the start of an EH frame: the + Darwin linker requires that a coalesced section start with a label. */ + #undef FRAME_BEGIN_LABEL + #define FRAME_BEGIN_LABEL "EH_frame" + + /* Emit a label for the FDE corresponding to DECL. EMPTY means + emit a label for an empty FDE. */ + #define ASM_OUTPUT_UNWIND_LABEL(FILE, DECL, EMPTY) \ + darwin_output_unwind_label ((FILE), (DECL), (EMPTY)) + /* Our profiling scheme doesn't LP labels and counter words. */ #define NO_PROFILE_COUNTERS 1 *************** do { text_section (); \ *** 361,370 **** const char *xname = NAME; \ if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \ xname = IDENTIFIER_POINTER (DECL_NAME (DECL)); \ ! if ((TREE_STATIC (DECL) \ ! && (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \ ! || DECL_INITIAL (DECL)) \ ! machopic_define_name (xname); \ if ((TREE_STATIC (DECL) \ && (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \ || DECL_INITIAL (DECL)) \ --- 408,418 ---- const char *xname = NAME; \ if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \ xname = IDENTIFIER_POINTER (DECL_NAME (DECL)); \ ! if (! DECL_ONE_ONLY (DECL) && ! DECL_WEAK (DECL)) \ ! if ((TREE_STATIC (DECL) \ ! && (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \ ! || DECL_INITIAL (DECL)) \ ! machopic_define_name (xname); \ if ((TREE_STATIC (DECL) \ && (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \ || DECL_INITIAL (DECL)) \ *************** do { text_section (); \ *** 381,398 **** const char *xname = NAME; \ if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \ xname = IDENTIFIER_POINTER (DECL_NAME (DECL)); \ ! if ((TREE_STATIC (DECL) \ ! && (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \ ! || DECL_INITIAL (DECL)) \ ! machopic_define_name (xname); \ if ((TREE_STATIC (DECL) \ && (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \ || DECL_INITIAL (DECL)) \ (* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \ ASM_OUTPUT_LABEL (FILE, xname); \ - /* Avoid generating stubs for functions we've just defined by \ - outputting any required stub name label now. */ \ - machopic_output_possible_stub_label (FILE, xname); \ } while (0) #define ASM_DECLARE_CONSTANT_NAME(FILE, NAME, EXP, SIZE) \ --- 429,444 ---- const char *xname = NAME; \ if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \ xname = IDENTIFIER_POINTER (DECL_NAME (DECL)); \ ! if (! DECL_ONE_ONLY (DECL) && ! DECL_WEAK (DECL)) \ ! if ((TREE_STATIC (DECL) \ ! && (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \ ! || DECL_INITIAL (DECL)) \ ! machopic_define_name (xname); \ if ((TREE_STATIC (DECL) \ && (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \ || DECL_INITIAL (DECL)) \ (* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \ ASM_OUTPUT_LABEL (FILE, xname); \ } while (0) #define ASM_DECLARE_CONSTANT_NAME(FILE, NAME, EXP, SIZE) \ *************** SECTION_FUNCTION (darwin_exception_secti *** 640,646 **** ".section __DATA,__gcc_except_tab", 0) \ SECTION_FUNCTION (darwin_eh_frame_section, \ in_darwin_eh_frame, \ ! ".section __TEXT,__eh_frame", 0) \ \ static void \ objc_section_init (void) \ --- 686,692 ---- ".section __DATA,__gcc_except_tab", 0) \ SECTION_FUNCTION (darwin_eh_frame_section, \ in_darwin_eh_frame, \ ! ".section " EH_FRAME_SECTION_NAME ",__eh_frame" EH_FRAME_SECTION_ATTR, 0) \ \ static void \ objc_section_init (void) \ *************** objc_section_init (void) \ *** 681,686 **** --- 727,736 ---- #define TARGET_ASM_SELECT_SECTION machopic_select_section #undef TARGET_ASM_SELECT_RTX_SECTION #define TARGET_ASM_SELECT_RTX_SECTION machopic_select_rtx_section + #undef TARGET_ASM_UNIQUE_SECTION + #define TARGET_ASM_UNIQUE_SECTION darwin_unique_section + + #define ASM_DECLARE_UNRESOLVED_REFERENCE(FILE,NAME) \ do { \ *************** enum machopic_addr_class { *** 808,813 **** --- 858,866 ---- #define TARGET_ASM_EH_FRAME_SECTION darwin_eh_frame_section + #define EH_FRAME_SECTION_NAME "__TEXT" + #define EH_FRAME_SECTION_ATTR ",coalesced,no_toc+strip_static_syms" + #undef ASM_PREFERRED_EH_DATA_FORMAT #define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ (((CODE) == 2 && (GLOBAL) == 1) \ *************** enum machopic_addr_class { *** 817,823 **** --- 870,888 ---- #define ASM_OUTPUT_DWARF_DELTA(FILE,SIZE,LABEL1,LABEL2) \ darwin_asm_output_dwarf_delta (FILE, SIZE, LABEL1, LABEL2) + #define ASM_MAYBE_OUTPUT_ENCODED_ADDR_RTX(ASM_OUT_FILE, ENCODING, SIZE, ADDR, DONE) \ + if (ENCODING == ASM_PREFERRED_EH_DATA_FORMAT (2, 1)) { \ + darwin_non_lazy_pcrel (ASM_OUT_FILE, ADDR); \ + goto DONE; \ + } + + #define TARGET_TERMINATE_DW2_EH_FRAME_INFO false + + #undef TARGET_ASM_NAMED_SECTION + #define TARGET_ASM_NAMED_SECTION darwin_asm_named_section + #undef TARGET_SECTION_TYPE_FLAGS + #define TARGET_SECTION_TYPE_FLAGS darwin_section_type_flags #define DARWIN_REGISTER_TARGET_PRAGMAS() \ do { \ Index: gcc/cp/ChangeLog =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/ChangeLog,v retrieving revision 1.3917 diff -p -r1.3917 ChangeLog *** gcc/cp/ChangeLog 29 Jan 2004 04:23:37 -0000 1.3917 --- gcc/cp/ChangeLog 29 Jan 2004 16:00:35 -0000 *************** *** 1,3 **** --- 1,17 ---- + 2004-01-29 Matt Austern + + * decl2.c (comdat_linkage): Set visibility of weak symbols to + VISIBLITY_HIDDEN if user sets the appropriate flag. + (maybe_make_one_only): Ditto. + (maybe_emit_vtables): If weak symbols are hidden, be more + cautious about making vtables weak. + * method.c (make_thunk): If weak symbols are hidden, be more + cautious about making thunks weak. + (use_thunk): Ditto. + * 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. + 2004-01-28 Giovanni Bajo * parser.c (cp_parser_template_id): Parse tentatively `[:' after a Index: gcc/cp/decl2.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/decl2.c,v retrieving revision 1.697 diff -p -r1.697 decl2.c *** gcc/cp/decl2.c 26 Jan 2004 17:41:50 -0000 1.697 --- gcc/cp/decl2.c 29 Jan 2004 16:00:38 -0000 *************** void *** 1359,1365 **** comdat_linkage (tree decl) { if (flag_weak) ! make_decl_one_only (decl); else if (TREE_CODE (decl) == FUNCTION_DECL || (TREE_CODE (decl) == VAR_DECL && DECL_ARTIFICIAL (decl))) /* We can just emit function and compiler-generated variables --- 1359,1369 ---- comdat_linkage (tree decl) { if (flag_weak) ! { ! make_decl_one_only (decl); ! if (flag_hidden_weak) ! DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN; ! } else if (TREE_CODE (decl) == FUNCTION_DECL || (TREE_CODE (decl) == VAR_DECL && DECL_ARTIFICIAL (decl))) /* We can just emit function and compiler-generated variables *************** maybe_make_one_only (tree decl) *** 1426,1431 **** --- 1430,1437 ---- because their DECL_INITIAL may not have been set properly yet. */ make_decl_one_only (decl); + if (flag_hidden_weak) + DECL_VISIBILITY (decl) = VISIBILITY_HIDDEN; if (TREE_CODE (decl) == VAR_DECL) { *************** maybe_emit_vtables (tree ctype) *** 1561,1566 **** --- 1567,1573 ---- tree vtbl; tree primary_vtbl; bool needed = false; + bool weaken_vtables; /* If the vtables for this class have already been emitted there is nothing more to do. */ *************** maybe_emit_vtables (tree ctype) *** 1591,1596 **** --- 1598,1624 ---- else if (TREE_PUBLIC (vtbl) && !DECL_COMDAT (vtbl)) needed = true; + /* Determine whether to make vtables weak. The ABI requires that we + do so. There are two cases in which we have to violate the ABI + specification: on systems where we don't have weak symbols + (obviously), and if weak symbols are given hidden visibility. In + the latter case we make vtables weak only in cases where they + really will be emitted in multiple translation units, not in the + more common case where we're emitting the vtable in the + translation unit containing the definition of a noninline key + method. */ + if (flag_weak && !flag_hidden_weak) + weaken_vtables = true; + else if (flag_weak) + { + if (CLASSTYPE_USE_TEMPLATE (ctype)) + weaken_vtables = CLASSTYPE_IMPLICIT_INSTANTIATION (ctype); + else + weaken_vtables = !CLASSTYPE_KEY_METHOD (ctype) + || DECL_DECLARED_INLINE_P (CLASSTYPE_KEY_METHOD (ctype)); + } + else + weaken_vtables = false; /* The ABI requires that we emit all of the vtables if we emit any of them. */ *************** maybe_emit_vtables (tree ctype) *** 1637,1644 **** DECL_IGNORED_P (vtbl) = 1; } ! /* Always make vtables weak. */ ! if (flag_weak) comdat_linkage (vtbl); rest_of_decl_compilation (vtbl, NULL, 1, 1); --- 1665,1672 ---- DECL_IGNORED_P (vtbl) = 1; } ! /* Always make vtables weak. Or at least *almost* always; see above. */ ! if (weaken_vtables) comdat_linkage (vtbl); rest_of_decl_compilation (vtbl, NULL, 1, 1); Index: gcc/cp/method.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/method.c,v retrieving revision 1.275 diff -p -r1.275 method.c *** gcc/cp/method.c 2 Jan 2004 15:57:16 -0000 1.275 --- gcc/cp/method.c 29 Jan 2004 16:00:38 -0000 *************** make_thunk (tree function, bool this_adj *** 153,160 **** TREE_READONLY (thunk) = TREE_READONLY (function); TREE_THIS_VOLATILE (thunk) = TREE_THIS_VOLATILE (function); TREE_PUBLIC (thunk) = TREE_PUBLIC (function); if (flag_weak) ! comdat_linkage (thunk); SET_DECL_THUNK_P (thunk, this_adjusting); THUNK_TARGET (thunk) = function; THUNK_FIXED_OFFSET (thunk) = d; --- 153,167 ---- TREE_READONLY (thunk) = TREE_READONLY (function); TREE_THIS_VOLATILE (thunk) = TREE_THIS_VOLATILE (function); TREE_PUBLIC (thunk) = TREE_PUBLIC (function); + + /* Always make thunks weak. Or at least *almost* always. If weak + symbols may be given hidden visibility, we have to be more careful. */ if (flag_weak) ! if (!flag_hidden_weak ! || DECL_ONE_ONLY (function) || DECL_WEAK (function) ! || DECL_VISIBILITY (function) == VISIBILITY_HIDDEN) ! comdat_linkage (thunk); ! SET_DECL_THUNK_P (thunk, this_adjusting); THUNK_TARGET (thunk) = function; THUNK_FIXED_OFFSET (thunk) = d; *************** use_thunk (tree thunk_fndecl, bool emit_ *** 390,395 **** --- 397,407 ---- rewrite. */ TREE_PUBLIC (thunk_fndecl) = TREE_PUBLIC (function); DECL_VISIBILITY (thunk_fndecl) = DECL_VISIBILITY (function); + if (flag_weak) + if (!flag_hidden_weak + || DECL_ONE_ONLY (function) || DECL_WEAK (function) + || DECL_VISIBILITY (function) == VISIBILITY_HIDDEN) + comdat_linkage (thunk_fndecl); if (flag_syntax_only) { Index: gcc/cp/pt.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/pt.c,v retrieving revision 1.821 diff -p -r1.821 pt.c *** gcc/cp/pt.c 26 Jan 2004 17:41:50 -0000 1.821 --- gcc/cp/pt.c 29 Jan 2004 16:00:46 -0000 *************** do_type_instantiation (tree t, tree stor *** 10576,10581 **** --- 10576,10582 ---- int extern_p = 0; int nomem_p = 0; int static_p = 0; + int previous_instantiation_extern_p = 0; if (TREE_CODE (t) == TYPE_DECL) t = TREE_TYPE (t); *************** do_type_instantiation (tree t, tree stor *** 10637,10647 **** No program shall explicitly instantiate any template more than once. ! If CLASSTYPE_INTERFACE_ONLY, then the first explicit instantiation ! was `extern'. If EXTERN_P then the second is. If -frepo, chances ! are we already got marked as an explicit instantiation because of the ! repo file. All these cases are OK. */ ! if (!CLASSTYPE_INTERFACE_ONLY (t) && !extern_p && !flag_use_repository && (complain & tf_error)) pedwarn ("duplicate explicit instantiation of `%#T'", t); --- 10638,10653 ---- No program shall explicitly instantiate any template more than once. ! If PREVIOUS_INSTANTIATION_EXTERN_P, then the first explicit ! instantiation was `extern'. If EXTERN_P then the second is. ! If -frepo, chances are we already got marked as an explicit ! instantiation because of the repo file. All these cases are ! OK. */ ! ! previous_instantiation_extern_p = CLASSTYPE_INTERFACE_ONLY (t); ! ! if (!previous_instantiation_extern_p && !extern_p ! && !flag_use_repository && (complain & tf_error)) pedwarn ("duplicate explicit instantiation of `%#T'", t); *************** do_type_instantiation (tree t, tree stor *** 10658,10663 **** --- 10664,10670 ---- { tree tmp; + int explicitly_instantiate_members = 0; /* In contrast to implicit instantiation, where only the declarations, and not the definitions, of members are *************** do_type_instantiation (tree t, tree stor *** 10676,10701 **** *explicit* instantiations or not. We choose to be generous, and not set DECL_EXPLICIT_INSTANTIATION. Therefore, we allow the explicit instantiation of a class where some of the members ! have no definition in the current translation unit. */ if (! static_p) for (tmp = TYPE_METHODS (t); tmp; tmp = TREE_CHAIN (tmp)) if (TREE_CODE (tmp) == FUNCTION_DECL && DECL_TEMPLATE_INSTANTIATION (tmp)) { ! mark_decl_instantiated (tmp, extern_p); ! repo_template_instantiated (tmp, extern_p); ! if (! extern_p) ! instantiate_decl (tmp, /*defer_ok=*/1); } for (tmp = TYPE_FIELDS (t); tmp; tmp = TREE_CHAIN (tmp)) if (TREE_CODE (tmp) == VAR_DECL && DECL_TEMPLATE_INSTANTIATION (tmp)) { ! mark_decl_instantiated (tmp, extern_p); ! repo_template_instantiated (tmp, extern_p); ! if (! extern_p) ! instantiate_decl (tmp, /*defer_ok=*/1); } if (CLASSTYPE_NESTED_UTDS (t)) --- 10683,10728 ---- *explicit* instantiations or not. We choose to be generous, and not set DECL_EXPLICIT_INSTANTIATION. Therefore, we allow the explicit instantiation of a class where some of the members ! have no definition in the current translation unit. Exception: ! on some targets (e.g. Darwin), weak symbols do not get put in ! a static archive's TOC. The problematic case is if we're doing ! a non-extern explicit instantiation of an extern template: we ! have to put member functions in the TOC in that case, or we'll ! get unresolved symbols at link time. */ ! ! explicitly_instantiate_members = ! TARGET_WEAK_NO_TOC ! && previous_instantiation_extern_p && ! extern_p ! && ! TYPE_FOR_JAVA (t); if (! static_p) for (tmp = TYPE_METHODS (t); tmp; tmp = TREE_CHAIN (tmp)) if (TREE_CODE (tmp) == FUNCTION_DECL && DECL_TEMPLATE_INSTANTIATION (tmp)) { ! if (explicitly_instantiate_members) ! do_decl_instantiation (tmp, NULL_TREE); ! else ! { ! mark_decl_instantiated (tmp, extern_p); ! repo_template_instantiated (tmp, extern_p); ! if (! extern_p) ! instantiate_decl (tmp, /*defer_ok=*/1); ! } } for (tmp = TYPE_FIELDS (t); tmp; tmp = TREE_CHAIN (tmp)) if (TREE_CODE (tmp) == VAR_DECL && DECL_TEMPLATE_INSTANTIATION (tmp)) { ! if (explicitly_instantiate_members) ! do_decl_instantiation (tmp, NULL_TREE); ! else ! { ! mark_decl_instantiated (tmp, extern_p); ! repo_template_instantiated (tmp, extern_p); ! if (! extern_p) ! instantiate_decl (tmp, /*defer_ok=*/1); ! } } if (CLASSTYPE_NESTED_UTDS (t)) Index: libffi/ChangeLog =================================================================== RCS file: /cvs/gcc/gcc/libffi/ChangeLog,v retrieving revision 1.157 diff -p -r1.157 ChangeLog *** libffi/ChangeLog 25 Jan 2004 06:58:33 -0000 1.157 --- libffi/ChangeLog 29 Jan 2004 16:00:54 -0000 *************** *** 1,3 **** --- 1,8 ---- + 2004-01-29 Matt Austern + * src/powerpc/darwin.S: Change EH information in assembly glue to + match EH format changes in the compiler. + * src/powerpc/darwin_closure.S: Ditto. + 2004-01-25 Eric Botcazou * src/sparc/ffi.c (ffi_prep_args_v9): Shift the parameter array Index: libffi/src/powerpc/darwin.S =================================================================== RCS file: /cvs/gcc/gcc/libffi/src/powerpc/darwin.S,v retrieving revision 1.7 diff -p -r1.7 darwin.S *** libffi/src/powerpc/darwin.S 21 Oct 2003 19:01:56 -0000 1.7 --- libffi/src/powerpc/darwin.S 29 Jan 2004 16:00:54 -0000 *************** _ffi_call_AIX: *** 162,169 **** /* END(_ffi_call_AIX) */ .data ! .section __TEXT,__eh_frame ! Lframe1: .set L$set$0,LECIE1-LSCIE1 .long L$set$0 ; Length of Common Information Entry LSCIE1: --- 162,169 ---- /* END(_ffi_call_AIX) */ .data ! .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: *************** LSCIE1: *** 173,191 **** .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 0xc ; DW_CFA_def_cfa .byte 0x1 ; uleb128 0x1 .byte 0x0 ; uleb128 0x0 .align 2 LECIE1: 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 LFB0-. ; FDE initial location .set L$set$3,LFE1-LFB0 .long L$set$3 ; FDE address range --- 173,192 ---- .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 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: ! .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 Index: libffi/src/powerpc/darwin_closure.S =================================================================== RCS file: /cvs/gcc/gcc/libffi/src/powerpc/darwin_closure.S,v retrieving revision 1.6 diff -p -r1.6 darwin_closure.S *** libffi/src/powerpc/darwin_closure.S 18 Sep 2003 19:35:46 -0000 1.6 --- libffi/src/powerpc/darwin_closure.S 29 Jan 2004 16:00:54 -0000 *************** Lfinish: *** 234,241 **** /* END(ffi_closure_ASM) */ .data ! .section __TEXT,__eh_frame ! Lframe1: .set L$set$0,LECIE1-LSCIE1 .long L$set$0 ; Length of Common Information Entry LSCIE1: --- 234,241 ---- /* END(ffi_closure_ASM) */ .data ! .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: *************** LSCIE1: *** 246,264 **** .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 0xc ; DW_CFA_def_cfa .byte 0x1 ; uleb128 0x1 .byte 0x0 ; uleb128 0x0 .align 2 LECIE1: 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 LFB1-. ; FDE initial location .set L$set$3,LFE1-LFB1 .long L$set$3 ; FDE address range --- 246,265 ---- .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor .byte 0x41 ; CIE RA Column .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_closure_ASM.eh + _ffi_closure_ASM.eh: LSFDE1: .set L$set$1,LEFDE1-LASFDE1 .long L$set$1 ; FDE Length LASFDE1: ! .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