1 2002-03-06 Jakub Jelinek <jakub@redhat.com>
3 * config/i386/i386.h (REDO_SECTION_INFO_P): Define.
5 2002-03-02 Richard Henderson <rth@redhat.com>
7 * config/i386/i386.h (ENCODE_SECTION_INFO): MODULE_LOCAL_P applies
10 2002-03-02 Richard Henderson <rth@redhat.com>
12 * attribs.c (handle_visibility_attribute): Don't call
14 * varasm.c (maybe_assemble_visibility): New.
15 (assemble_start_function, assemble_variable, assemble_alias): Use it.
17 --- gcc/config/i386/i386.h.jj Tue Jun 4 18:54:32 2002
18 +++ gcc/config/i386/i386.h Tue Jun 4 18:54:42 2002
19 @@ -2268,12 +2268,13 @@ do { \
20 SYMBOL_REF_FLAG (XEXP (rtl, 0)) \
21 = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd' \
22 || ! TREE_PUBLIC (DECL) \
23 - || (TREE_CODE (DECL) == VAR_DECL \
24 - && MODULE_LOCAL_P (DECL))); \
25 + || MODULE_LOCAL_P (DECL)); \
30 +#define REDO_SECTION_INFO_P(DECL) 1
32 /* The `FINALIZE_PIC' macro serves as a hook to emit these special
33 codes once the function is being compiled into assembly code, but
34 not before. (It is not done before, because in the case of
35 --- gcc/varasm.c.jj Tue Jun 4 18:54:32 2002
36 +++ gcc/varasm.c Tue Jun 4 18:54:42 2002
37 @@ -167,6 +167,7 @@ static unsigned min_align PARAMS ((unsi
38 static void output_constructor PARAMS ((tree, HOST_WIDE_INT,
40 static void globalize_decl PARAMS ((tree));
41 +static void maybe_assemble_visibility PARAMS ((tree));
42 static int in_named_entry_eq PARAMS ((const PTR, const PTR));
43 static hashval_t in_named_entry_hash PARAMS ((const PTR));
45 @@ -1238,6 +1239,8 @@ assemble_start_function (decl, fnname)
48 globalize_decl (decl);
50 + maybe_assemble_visibility (decl);
53 /* Do any machine/system dependent processing of the function name */
54 @@ -1591,6 +1594,9 @@ assemble_variable (decl, top_level, at_e
55 DECL_ALIGN (decl) = align;
56 set_mem_align (decl_rtl, align);
58 + if (TREE_PUBLIC (decl))
59 + maybe_assemble_visibility (decl);
61 /* Handle uninitialized definitions. */
63 if ((DECL_INITIAL (decl) == 0 || DECL_INITIAL (decl) == error_mark_node)
64 @@ -5167,7 +5173,11 @@ assemble_alias (decl, target)
66 /* Make name accessible from other files, if appropriate. */
67 if (TREE_PUBLIC (decl))
68 - globalize_decl (decl);
70 + globalize_decl (decl);
72 + maybe_assemble_visibility (decl);
75 #ifdef ASM_OUTPUT_DEF_FROM_DECLS
76 ASM_OUTPUT_DEF_FROM_DECLS (asm_out_file, decl, target);
77 @@ -5213,6 +5223,21 @@ assemble_visibility (decl, visibility_ty
81 +/* A helper function to call assemble_visibility when needed for a decl. */
84 +maybe_assemble_visibility (decl)
87 + tree visibility = lookup_attribute ("visibility", DECL_ATTRIBUTES (decl));
91 + = TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (visibility)));
92 + assemble_visibility (decl, type);
96 /* Returns 1 if the target configuration supports defining public symbols
97 so that one of them will be chosen at link time instead of generating a
98 multiply-defined symbol error, whether through the use of weak symbols or
99 --- gcc/attribs.c.jj Tue Jun 4 18:54:32 2002
100 +++ gcc/attribs.c Tue Jun 4 18:54:42 2002
101 @@ -1101,8 +1101,6 @@ handle_visibility_attribute (node, name,
102 *no_add_attrs = true;
106 - assemble_visibility (decl, TREE_STRING_POINTER (id));