This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: why is g++ relocation error linking only showing when listing objects explicitly?


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??


Previous message:

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???


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]