Bug 43302 - [Regression] gcc creates "dummy" resources in object files
Summary: [Regression] gcc creates "dummy" resources in object files
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: 4.4.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-09 09:22 UTC by Michele Bini
Modified: 2012-11-09 23:21 UTC (History)
5 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work: 4.2.2
Known to fail: 4.4.3
Last reconfirmed:


Attachments
A simple test exhibiting the .dummy resources problem (586 bytes, application/octet-stream)
2010-03-09 09:25 UTC, Michele Bini
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michele Bini 2010-03-09 09:22:57 UTC
gcj adds a java resource named ".dummy" to most (all?) the object file it produces. That resource doesn't appear anywhere in the sources.

This is a problem when I try to link an application made from multiple .o produced by separate gcj invocations: I get the link-time error:

 multiple definition of `java resource .dummy'

Also this is a regression as gcj 4.2.2 didn't add it and thus the linker didn't complain.

gcc was built with the following options:

../gcc-4.4.3/configure --prefix="/opt/focuseek-build-fsk" \
	    --program-suffix=-fsk \
	    --enable-languages=c,c++,java \
	    --enable-shared --enable-threads \
	    --enable-__cxa_atexit \
	    --enable-libgcj-multifile

on a centos 5.4. The md5 for ecj.jar is d7cd6a27c8801e66cbaa964a039ecfdb which, as of today, is what contrib/download_ecj retrieves.

I'm aware of bug 42143 but I'm not able to say whether this is the same bug or another one.

I will attach a test case as soon as possible.
Comment 1 Michele Bini 2010-03-09 09:25:43 UTC
Created attachment 20053 [details]
A simple test exhibiting the .dummy resources problem

As I said this works with gcc 4.2.2
Comment 2 Michele Bini 2010-03-10 08:30:34 UTC
Experimenting with -save-temps I noticed that the .dummy resource is in the .jar generated by ecj which seems to point to it as the main suspect.
Comment 3 Greg Larkin 2010-05-03 18:37:25 UTC
(In reply to comment #2)
> Experimenting with -save-temps I noticed that the .dummy resource is in the
> .jar generated by ecj which seems to point to it as the main suspect.
> 

I believe that's correct - please see: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42143#c7

Thank you,
Greg Larkin
Comment 4 Steven Bosscher 2012-11-09 23:21:02 UTC
If it comes from ecj, it's not a gcc bug.