Re: Question about search for crt?.o files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 14, 2011 at 9:25 AM, Andrew Haley <aph@xxxxxxxxxx> wrote:
> On 14/04/11 02:58, David Highley wrote:
>
>> We have the need to capture our compilers into our configuration
>> management system so that we build with different versions. So I was
>> checking the capture of the compiler by wrapping an strace around a
>> compile that is invoked with the -B option to add a new search path
>> for the relocated compiler. Everything looked like it was being
>> found in the new location except when the crt?.o start up code is
>> being looked for.  It appeared that directory locations were looked
>> for first and then the file, crt1.o or crti.o, was searched for all
>> over the place. The complilations work and the programs execute, but
>> it does appear to looking all over the file system for the start up
>> code to be linked with the application. This was observed with a
>> 4.1.2 g++ build.
>
> crt?.0 are part of the C library, not part of gcc.  We have no control
> over these files or where they go, so we have to look for them in the
> standard places.

Andrew,

Using the "--verbose" option when linking will show the search paths for each
object file and library used, including the failed paths.  This can be
very useful
in figuring out where things are in the many different sub-directories.

It also shows exactly which object files and libraries are being linked.

Regards,

David P.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux