Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - Strange library loading issue (first posted in general): Page 1 of 13 (13 Items)
   
Strange library loading issue (first posted in general)  
Hello,

I have been  having an issue with one of my processes loading one of my libraries that was included in my binary image 
by mkifs with compression 3.

The included library is a different size as the one still in the compiled directory.  There were no errors on make or 
mkifs.

The problem I see is this:

# export DL_DEBUG=1
# export LD_LIBRARY_PATH=/proc/boot
# ls -la /proc/boot/liboamlib.so.1
-rwxrwxr-x  1 508       508          446464 Nov 13  2009 /proc/boot/liboamlib.so.1

Process 352276 (ls) exited status=0.
# dbs
load_object: attempt load of liboamutilities.so.1
load_elf32: loaded lib at addr fe378000(text) fe38ac90(data)
load_object: attempt load of libcommonSlSwLogLib.so.1
load_elf32: loaded lib at addr fe38c000(text) fe39b500(data)
load_object: attempt load of libutilities.so.1
load_elf32: loaded lib at addr fe39d000(text) fe3b4740(data)
load_object: attempt load of liboamlib.so.1
load_elf32: mmaped, addr 0 67ca0 vaddr fe41eca0
Could not find library liboamlib.so.1

Process 360468 (dbs) exited status=1.
# export LD_LIBRARY_PATH=/tmp:/proc/boot
# ls -la /tmp/liboamlib.so.1
-rw-r--r--  2 root      0            549491 Nov 13  2009 /tmp/liboamlib.so.1

Process 376852 (ls) exited status=0.
# dbs
load_object: attempt load of liboamutilities.so.1
load_elf32: loaded lib at addr fe378000(text) fe38ac90(data)
load_object: attempt load of libcommonSlSwLogLib.so.1
load_elf32: loaded lib at addr fe38c000(text) fe39b500(data)
load_object: attempt load of libutilities.so.1
load_elf32: loaded lib at addr fe39d000(text) fe3b4740(data)
load_object: attempt load of liboamlib.so.1
load_elf32: loaded lib at addr fe3b6000(text) fe41dca0(data)
load_object: attempt load of liboamwaveready.so.1
load_elf32: loaded lib at addr fe424000(text) fe4dac30(data)
load_object: attempt load of libacilib.so.1
load_elf32: loaded lib at addr fe4e3000(text) fe4f0660(data)
load_object: attempt load of libcommonSlAppBaseLib.so.1
load_elf32: loaded lib at addr fe4f2000(text) fe509d40(data)
load_object: attempt load of libcommonRblPulseTimerLib.so.1
load_elf32: loaded lib at addr fe50b000(text) fe514690(data)
load_object: attempt load of libcommonRblUtilitiesLib.so.1
load_elf32: loaded lib at addr fe515000(text) fe523c30(data)
load_object: attempt load of libsocket.so.2
load_elf32: loaded lib at addr fe525000(text) fe545a60(data)
load_object: attempt load of libm.so.2
load_elf32: loaded lib at addr fe550000(text) fe56edb0(data)
load_object: attempt load of libham.so.2
load_elf32: loaded lib at addr fe573000(text) fe57ce80(data)
load_object: attempt load of libecpp-ne.so.4
load_elf32: loaded lib at addr fe57e000(text) fe59b780(data)


As you can see, the file in /tmp works much better than the one in /proc/boot.

I am cross compiling from x86 linux to ppc QNX 6.3.2.  Our build environment is not trivial to further complicate the 
issue.

Why are the libraries different sizes?
Could whatever changed the size of the lib cause this issue?
Is there anything else that could cause the issue?

Thanks,
Liam