From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22761 invoked by alias); 22 Nov 2009 12:51:11 -0000 Received: (qmail 22743 invoked by uid 48); 22 Nov 2009 12:51:11 -0000 Date: Sun, 22 Nov 2009 12:51:00 -0000 Subject: [Bug java/42143] New: gcj creates "dummy" variables X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: java-prs@gcc.gnu.org From: "kurt at roeckx dot be" Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2009-q4/txt/msg00056.txt.bz2 Hi, When running the libtool regression tests, I get the following error: gcj -shared -Wl,--whole-archive ./.libs/liba1.a ./.libs/liba2.a -Wl,--no-whole-archive -Wl,-soname -Wl,liba12.so.0 -o .libs/liba12.so.0.0.0 ./.libs/liba2.a(A2.o):(.rodata+0x0): multiple definition of `java resource .dummy' ./.libs/liba1.a(A1.o):(.rodata+0x0): first defined here collect2: ld returned 1 exit status Looking at liba1.a I see: Relocation section '.rela.text' at offset 0x1ad0 contains 3 entries: Offset Info Type Sym. Value Sym. Name + Addend000000000005 002600000004 R_X86_64_PLT32 0000000000000000 _ZN4java4lang6ObjectC1 - 4 000000000023 002300000002 R_X86_64_PC32 0000000000000000 _ZGr8_$_dummy - 4 [...] Symbol table '.symtab' contains 54 entries: Num: Value Size Type Bind Vis Ndx Name [...] 35: 0000000000000000 16 OBJECT GLOBAL HIDDEN 11 _ZGr8_$_dummy There is nothing called "dummy" in the source file. The source file is: public class foo1 { public static void main(String[] argv) { A1 a1 = new A1(); } } It can also be reproduced with a file that just has "public class foo1 {}" I get this error with Debian's 4.3.4-4. The version 4.3.2-2 does not generate that symbol. An old build log of libtool with gcj version 4.3.3-3 also does not show the error. -- Summary: gcj creates "dummy" variables Product: gcc Version: 4.3.4 Status: UNCONFIRMED Severity: normal Priority: P3 Component: java AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kurt at roeckx dot be http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143