Messages in this thread | | | Date | Thu, 09 Jul 1998 13:56:11 -0400 | From | Glenn MacGregor <> | Subject | ld-linux |
| |
Hi all, I am not on this list so any comments should be sent to me. I am having problems with ld-linux.so.1.9.2 and libdl.so.1.9.2 and all the associated utils. Sorry if this is long winded but I can't seem to get it out any other way, so here goes. I have writen a program, pgm, which many shared objects including std libs like libc5, libs written by me placed in the usr/lib dir libpgm.so, and other .so's written by me. The problem is that in pgm the dlopen call to open a .so, t.so, is given the full path, /usr/local/test/t.so. This .so depends on other shared objects like libc5, libpgm.so, and t1.so, t1.so is located in some arbitraty directory which is given on the link line with the ld option -rpath and -rpath-link. Getting into dlopen code I see that it is failing to find t1.so. It finds all the others, libc5, libpgm,ld-linux,libdl. I did an objdump on t.so, here are some of the results:
objdump -ax ssm.so | more ssm.so: file format elf32-i386 ssm.so architecture: i386, flags 0x00000150: HAS_SYMS, DYNAMIC, D_PAGED start address 0x00011e58
Program Header: LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12 filesz 0x00031afc memsz 0x00031afc flags r-x LOAD off 0x00031b00 vaddr 0x00032b00 paddr 0x00032b00 align 2**12 filesz 0x00000aac memsz 0x00000bac flags rw- DYNAMIC off 0x00032524 vaddr 0x00033524 paddr 0x00033524 align 2**2 filesz 0x00000088 memsz 0x00000088 flags rw-
Dynamic Section: NEEDED serial.so NEEDED libnv.so.1.0 SONAME ssm.so RPATH /usr/local/qc/class/fb/serial HASH 0x94 STRTAB 0x3a48 SYMTAB 0x12a8 STRSZ 0xae77 SYMENT 0x10 PLTGOT 0x32c24 PLTRELSZ 0x1148 PLTREL 0x11 JMPREL 0xea70 REL 0xe8c0 RELSZ 0x1b0 RELENT 0x8
As seen above there are two needed objects, serial.so and libnv.so.1.0 both of these I wrote. libnv is located in /usr/local/lib and it is linked from there so that is why I suspect that I don't need a rpath for that one. serial.so is located in /usr/local/qc/class/fb/serial and is not linked from there so I use rpath. My question is, is there a problem in the runtime linker that for some reason it will not see rpath? I have tried using the environment var LD_LIBRARY_PATH, when I use that it sees the fullpath but still dies for some reason. I have been beating my head against the wall for about 2 weeks now, can someone please help me.
Thank you very much
Glenn --
Glenn MacGregor
Applications Engineer Oracom, Inc. http://www.oracom.com
Tel. +1 978.557.5710 Fax +1 978.557.5716
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |