from being used for symbols with vague linkage when
HAVE_GAS_COMDAT_GROUP is true.
* gcc/java/decl.c (finish_method): Give methods once-only linkage.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98089
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-04-13 Julian Brown <julian@codesourcery.com>
+
+ * config/elfos.h (MAKE_DECL_ONE_ONLY): Redefined to stop DECL_WEAK from
+ being used for symbols with vague linkage when HAVE_GAS_COMDAT_GROUP
+ is true.
+
2005-04-13 Kazu Hirata <kazu@cs.umass.edu>
* basic-block.h, tree-ssa-uncprop.c, varasm.c,
fprintf ((FILE), "%s\n", ASM_SECTION_START_OP)
#endif
-#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
+/* Don't use weak for entities with vague linkage when HAVE_GAS_COMDAT_GROUP
+ is true. */
+#define MAKE_DECL_ONE_ONLY(DECL) \
+ do \
+ { \
+ if (!HAVE_GAS_COMDAT_GROUP) \
+ DECL_WEAK(DECL) = 1; \
+ } \
+ while (0)
/* Switch into a generic section. */
#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
+2005-04-13 Julian Brown <julian@codesourcery.com>
+
+ * decl.c (finish_method): Give methods once-only linkage.
+
2005-04-11 Richard Sandiford <rsandifo@redhat.com>
* lang.opt: Refer to the GCC internals documentation instead of c.opt.
build2 (TRY_FINALLY_EXPR, void_type_node, *tp, exit));
}
+ /* Ensure non-abstract non-static non-private members are defined only once
+ when linking. This is an issue when using CNI to interface with C++ object
+ files. */
+ if (! METHOD_STATIC (fndecl) && ! METHOD_PRIVATE (fndecl)
+ && ! METHOD_ABSTRACT (fndecl) && ! METHOD_FINAL (fndecl))
+ make_decl_one_only (fndecl);
+
/* Prepend class initialization for static methods reachable from
other classes. */
if (METHOD_STATIC (fndecl)