diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-04 16:28:40 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-07 00:11:40 +0000 |
commit | ae85c4b9a6609523c293173843679733b1ede7ba (patch) | |
tree | 9a110d52b2cd54f428acea5e787c274b2309eddc /meta/classes/linuxloader.bbclass | |
parent | 0b84897ea813a4f7a8b198efcc7ac335debf19d9 (diff) | |
download | poky-ae85c4b9a6609523c293173843679733b1ede7ba.tar.gz |
linuxloader/image-prelink/image-mklibs: Fix non-standard path prelinking
Prelinking on x86-64 wasn't working out the box as it uses /lib and
not /lib64 for libs. Prelink was refusing to link as the dynamic loader
didn't match its idea of the right path. Passing in the --dyanmic-linker
option avoids this.
We can share code from image-mklibs so abstract that into a new class,
linuxloader.bbclass.
This does break prelinking of multilib images, I've opened a bug so we
can loop back and fix that problem, the code would need to iterate the
dynamic loaders (and setup ld.so.conf files for it).
(From OE-Core rev: 7c3f2f61536cc8e0322087558cdcfe29ee2fac6d)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/linuxloader.bbclass')
-rw-r--r-- | meta/classes/linuxloader.bbclass | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/meta/classes/linuxloader.bbclass b/meta/classes/linuxloader.bbclass new file mode 100644 index 0000000000..5c4dc5c51b --- /dev/null +++ b/meta/classes/linuxloader.bbclass | |||
@@ -0,0 +1,24 @@ | |||
1 | |||
2 | linuxloader () { | ||
3 | case ${TARGET_ARCH} in | ||
4 | powerpc | mips | mipsel | microblaze ) | ||
5 | dynamic_loader="${base_libdir}/ld.so.1" | ||
6 | ;; | ||
7 | powerpc64) | ||
8 | dynamic_loader="${base_libdir}/ld64.so.1" | ||
9 | ;; | ||
10 | x86_64) | ||
11 | dynamic_loader="${base_libdir}/ld-linux-x86-64.so.2" | ||
12 | ;; | ||
13 | i*86 ) | ||
14 | dynamic_loader="${base_libdir}/ld-linux.so.2" | ||
15 | ;; | ||
16 | arm ) | ||
17 | dynamic_loader="${base_libdir}/ld-linux.so.3" | ||
18 | ;; | ||
19 | * ) | ||
20 | dynamic_loader="/unknown_dynamic_linker" | ||
21 | ;; | ||
22 | esac | ||
23 | echo $dynamic_loader | ||
24 | } | ||