diff options
author | jules <jules@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-13 15:24:03 +0000 |
---|---|---|
committer | jules <jules@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-13 15:24:03 +0000 |
commit | a7cc94aa453a5b092723df12f2d5abe2fb7c9bbd (patch) | |
tree | eabd03b4a938ee28ef19ab97a08894ee5170b75d /gcc/java | |
parent | c68d013087944fffd96d8e357102a044e885d08f (diff) | |
download | gcc-a7cc94aa453a5b092723df12f2d5abe2fb7c9bbd.tar.gz |
* gcc/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.
* 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
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/java/decl.c | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 1044784186b..a0d1037dd2f 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +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. diff --git a/gcc/java/decl.c b/gcc/java/decl.c index 197c391e27c..168d30dba2a 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -2057,6 +2057,13 @@ finish_method (tree fndecl) 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) |