Cross build binary for ARMv7l, EABI5 or ld_preload issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cross build binary for ARMv7l, EABI5 or ld_preload issue

2,071 Views
gopikrishnan
Contributor III

Am currently trying to compile an c++ source to so file manually. Without recipe, I would like to cross build it arm7L EABI5 format. Currently, I am getting the so file in format of EABI4 and on board it is complaining,

ERROR: ld.so: ****.so from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored error

Under /opt/freescale, cross tool-chain is available. 

While building:

1) export PATH=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/arm-none-linux-gnueabi/bin:$PATH

2) g++ lib***.c -o lib***-arm.so -fPIC -shared -pthread -ldl -D_GNU_SOURCE

While executing

1) sudo LD_PRELOAD=./lib***.so LD_LIBRARY_PATH=. ./app

Am I missing anything?

Thanks,

0 Kudos
1 Reply

946 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Gopi,

I guess you have to use the path  /usr/lib/ for LD_PRELOAD something like :

export LD_PRELOAD=/usr/lib/lib***.so.3

Regards

0 Kudos