(linker) default search path for ld

ali hagigat hagigatali@gmail.com
Tue Nov 16 08:45:00 GMT 2010


Thanks Ian for the reply. Here is the result of gcc -v:

--------------------------------------------
/root> gcc -v
Using built-in specs.
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada
--enable-java-awt=gtk --disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic
--with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.4.2 20091222 (Red Hat 4.4.2-20) (GCC)
--------------------------------------------


I also copied a part of the manual ld:
-----------------------------------------------
-L searchdir
--library-path=searchdir
The default set of paths searched (without being specified with ‘-L’)
depends on which emulation mode ld is using,....
-----------------------------------------------


On Tue, Nov 16, 2010 at 10:02 AM, Ian Lance Taylor <iant@google.com> wrote:
> ali hagigat <hagigatali@gmail.com> writes:
>
>> What is the default search path of my linker, GNU ld considering the
>> following command and the emulation modes supported:
>>
>> root> ld -V
>> GNU ld version 2.19.51.0.14-34.fc12 20090722
>>   Supported emulations:
>>    elf_i386
>>    i386linux
>>    elf_x86_64
>
> The linker itself doesn't have much of a default search path.  The
> search path is passed to the linker by the compiler.  Run "gcc -v" to
> see how gcc invokes the linker and the set of -L options that it passes.
>
> Ian
>



More information about the Gcc-help mailing list