This is the mail archive of the
mailing list for the GCC project.
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: Sun, 16 Dec 2012 20:59:26 -0800
- Subject: why is g++ relocation error linking only showing when listing objects explicitly?
- References: <firstname.lastname@example.org>
I think this question belongs here and not on a general Unix mailing list, but I am not sure, so please forgive me if I am posting in the wrong place.
I am getting the error
"relocation truncated to fit: R_PPC_PLTREL24 against symbol ..."
when using g++ to link about 2300 .o files into a single library, total size about 29MB, and -mlongcall does not help.
Curiously, this only happens when listing the files explicitly. That is:
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
What is going on here??
Thank you for any insight.