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

default linker for shared libraries, need some comments


Hi! I had some problems with setting default linker for shared libraries. 
They are always linked against ld-linux.so.2. Option --dynamic-linker 
works only for usual programs. 

For example:

ldd -v libhistory.so.4.1
        libc.so.6 => /lib/libc.so.6 (0x4000c000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

        Version information:
        ./libhistory.so.4.1:
                libc.so.6 (GLIBC_2.0) => /lib/libc.so.6
        /lib/libc.so.6:
                ld-linux.so.2 (GLIBC_2.1) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_2.0) => /lib/ld-linux.so.2
                ld-linux.so.2 (GLIBC_PRIVATE) => /lib/ld-linux.so.2

It seems that ld-linux.so.2 dependency is provided by libc.so.6 library. 

Also I found that .interp section is not present for most libraries. Is it 
mean that I cannot set directly default linker for such libraries?

objdump -s  -j .interp /lib/libc-2.2.5.so
/lib/libc-2.2.5.so:     file format elf32-i386

Contents of section .interp:
 10dcb0 2f6c6962 2f6c642d 6c696e75 782e736f  /lib/ld-linux.so
 10dcc0 2e3200                               .2.


1. Probably I need to change default linker for libc.so.6, isn't it? And 
recompile all required libraries after that. Would I have compatiblity 
problems or they can be solved by creating ld-linux.so.2 link to new 
default linker?

2. Can I change default linker for libc.so.6 binary
( without recompiling ), just using something like objcopy or hex editor?. 

3. How is the section SONAME related to dynamic linking ?

Cheers,YP

FYI

glibc 2.2.5
ld    2.13.90.0.4
ia32
-
Mr. Yaroslav Popovitch yp at sot dot com       - tel. +372 6419975
SOT Finnish Software Engineering Ltd.   - fax  +372 6419975
Kreutzwaldi 7-4, 10124  TALLINN         - http://www.sot.com
ESTONIA                                 - http://sotlinux.net




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