summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/image-mklibs.bbclass16
1 files changed, 9 insertions, 7 deletions
diff --git a/meta/classes/image-mklibs.bbclass b/meta/classes/image-mklibs.bbclass
index 6c0e8dcf35..5f6df1b17f 100644
--- a/meta/classes/image-mklibs.bbclass
+++ b/meta/classes/image-mklibs.bbclass
@@ -9,13 +9,15 @@ mklibs_optimize_image_doit() {
9 mkdir -p ${WORKDIR}/mklibs/dest 9 mkdir -p ${WORKDIR}/mklibs/dest
10 cd ${IMAGE_ROOTFS} 10 cd ${IMAGE_ROOTFS}
11 du -bs > ${WORKDIR}/mklibs/du.before.mklibs.txt 11 du -bs > ${WORKDIR}/mklibs/du.before.mklibs.txt
12 for i in `find .`; do file $i; done \ 12
13 | grep ELF \ 13 # Build a list of dynamically linked executable ELF files.
14 | grep "LSB *executable" \ 14 # Omit libc/libpthread as a special case because it has an interpreter
15 | grep "dynamically linked" \ 15 # but is primarily what we intend to strip down.
16 | sed "s/:.*//" \ 16 for i in `find . -type f -executable ! -name 'libc-*' ! -name 'libpthread-*'`; do
17 | sed "s+^\./++" \ 17 file $i | grep -q ELF || continue
18 > ${WORKDIR}/mklibs/executables.list 18 ${HOST_PREFIX}readelf -l $i | grep -q INTERP || continue
19 echo $i
20 done > ${WORKDIR}/mklibs/executables.list
19 21
20 dynamic_loader=$(linuxloader) 22 dynamic_loader=$(linuxloader)
21 23