1 |
On 08/02/2012 05:23 PM, Jing Huang wrote: |
2 |
> Hmm.. The root cause of this fault is: |
3 |
> |
4 |
> ./x86-program(built with dynamic libraries) |
5 |
> -->load_elf_binary() |
6 |
> -->open_exec("/lib/ld-linux.so.2"); |
7 |
> |
8 |
> lxc chroot lacks of /lib/ld-linux.so.2. This problem is a difficult |
9 |
> one. In my opinion, the following two steps are essential to solve it. |
10 |
> |
11 |
> 1. alter linker script to build x86-program using custom ld-linux.so.2 |
12 |
> path ( /target/lib/ld-linux.so.2 ). |
13 |
> |
14 |
|
15 |
Overriding it is an interesting task, for the time being try mixing |
16 |
amd64 and arm binaries, they use /lib and /lib64 so it is fine. |
17 |
|
18 |
> 2. switch dynamic libraries to custom paths. |
19 |
> This point is relatively easy. I could use either LD_LIBRARY_PATH or |
20 |
> ld.so.conf. |
21 |
> |
22 |
> "ldconfig /etc/ld.so.conf" is odd. I had altered ld.so.conf and |
23 |
> env.d/00basic to exclude original library path(/lib, /usr/lib, |
24 |
> /usr/local/lib), but the new generated cache file still include these |
25 |
> paths. |
26 |
> Unfortunately, linker will link libraries accroding to the ld cache |
27 |
> file unless declare the DT_RPATH and LD_LIBRARY_PATH. |
28 |
|
29 |
Yes, it is one of the issue to investigate. |
30 |
|
31 |
lu |