This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: Linking many .o files together (instead of compiling the .jar file directly)
- From: Rutger Ovidius <ovid at mailandnews dot com>
- To: "Simon Rutishauser" <simon dot rutishauser at gmx dot ch>, java <java at gcc dot gnu dot org>
- Date: Sat, 18 Oct 2003 12:20:19 -0400
- Subject: RE: Linking many .o files together (instead of compiling the .jar file directly)
Yes, they don't link.
I think "ld -r" is the answer, but I'm still testing this..
>===== Original Message From "Simon Rutishauser" <simon.rutishauser@gmx.ch>
=====
>Is there any reason why you're not simply creating a static library using
>the ar - tool?
>
>Peschm
>
>Am Sat, 18 Oct 2003 11:15:32 -0400 schrieb Rutger Ovidius:
>> Hi,
>>
>> When I am forced to compile a .jar file by extracting its individual
>> .class files, I end up with a ton of .o files.
>>
>> Is there a way I can combine them to one big .o file representing what
>> would have been compiled if the .jar file compilation had been successful?
>>
>> Many .jar files on windows which compiled fine with 3.3.1, now fail in a
>> similar way on 3.4 with an error (replacing the symbol name) like:
>>
>> C:\DOCUME~1\v\LOCALS~1\Temp/cc0Maaaa.s: Assembler messages:
>> C:\DOCUME~1\v\LOCALS~1\Temp/cc0Maaaa.s:94227: Error: symbol
>> `__GLOBAL__I__ZN3org7eclipse4core8internal4boot16URLConte
>> ntFilter6class$E' is already defined
>>
>> These files will rely on other .jar libraries from the CLASSPATH.
>>
>> ld -o big.o *.o won't work.
>>
>> gcj --CLASSPATH=x;x;x -o big.o *.o fails too.
>>
>> Any hints? Thanks.