This is the mail archive of the
mailing list for the GCC project.
RE: why is g++ relocation error linking only showing when listing objects explicitly?
- From: "Mark Galeck (CW)" <mgaleck at Brocade dot com>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Fri, 21 Dec 2012 01:38:20 -0800
- Subject: RE: why is g++ relocation error linking only showing when listing objects explicitly?
- References: <firstname.lastname@example.org>
I had posted the question below 5 days ago but there were no replys. At that time, it was a mere curiosity. But now, what appeared to work then, actually does not work... So now I am in trouble and I have more symptoms.
What is going on, and how do I get g++ linker to work here??
when using g++ to link about 2300 .o files into a single library, total size about 29MB, and -mlongcall does not help.
This doesn't work (24-bit relocation error)
>g++ -fPIC `<command to list object files>`
However, this works correctly (!!!???)
>echo `<the same command to list object files>` | xargs g++ -fPIC
Actually, the second version also does not work. It does not give an error message, and there appears a big library. BUT: Some symbols are defined in some object files, but then become undefined in the resulting library!!!
If I decrease the number of object files to about 1200, the symbols in question vanish completely from the library!!!
Finally, if I decrease the number of object files further to about 800, the symbols in question are present in the library again, and this time defined as they should.
Please anybody knows what could be happening???