This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

ld resulting long command line arguments when calling collect2 workaround


Hello,

I think this is a binutils query, as it relates to ld calling collect2.
collect2 is part of gcc I noticed, so if this is a query for gcc please
let me know.

I am using an old ld v2.12 compiled on cygwin/ms-windows.  When
linking my c++ app, with g++, I have many objects.  I put all the
objects in a file and then use @make.objects to get them in-to the link
command.  If i specify them on the g++ command line when linking it
complains about a too long command line.

However, the problem is that ld/g++ seems to "expand" the @make.objects
file and pass all the filenames to the objects again on the command line
to collect2 (which appears to do the final linking and creation of elf
etc).  collect2 has the same problem with command line argument limit

Could someone tell me if there is a workaround to get ld/gcc/collect2 to
receive the make.objects file containing the list of objects please?

The other idea I had was to put all the objects in several smaller libs,
and then link those resulting libs.  However this is causing link
problems (some code seems to go missing, so I wanted to try linking all
the objects at the same time).

Any help appreciated.

Kind regards

JG



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