无法从buildroot获取未提取的运行时库

时间:2014-01-10 16:33:55

标签: embedded-linux buildroot

我正在尝试使用buildroot 2012.08在输出/暂存中生成未剥离的库和二进制文件。我在Build options:

下启用了“使用调试符号构建包”
BR2_ENABLE_DEBUG=y
# BR2_DEBUG_1 is not set
BR2_DEBUG_2=y
# BR2_DEBUG_3 is not set
# BR2_STRIP_strip is not set
BR2_STRIP_sstrip=y

这就是我得到的:

$ file output/staging/lib/*
output/staging/lib/ld-uClibc-0.9.33.2.so:    ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked, with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, stripped
output/staging/lib/ld-uClibc.so.0:           symbolic link to `ld-uClibc-0.9.33.2.so'
output/staging/lib/libcrypt-0.9.33.2.so:     ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked (uses shared libs), with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, stripped
output/staging/lib/libcrypt.so.0:            symbolic link to `libcrypt-0.9.33.2.so'
output/staging/lib/libc.so.0:                symbolic link to `libuClibc-0.9.33.2.so'
output/staging/lib/libdl-0.9.33.2.so:        ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked (uses shared libs), with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, stripped
output/staging/lib/libdl.so.0:               symbolic link to `libdl-0.9.33.2.so'
output/staging/lib/libgcc_s.so:              symbolic link to `libgcc_s.so.1'
output/staging/lib/libgcc_s.so.1:            ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked, with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, not stripped
output/staging/lib/libiw.so:                 symbolic link to `libiw.so.29'
output/staging/lib/libiw.so.29:              ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked, with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, not stripped
output/staging/lib/libm-0.9.33.2.so:         ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked (uses shared libs), with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, stripped
output/staging/lib/libm.so.0:                symbolic link to `libm-0.9.33.2.so'
output/staging/lib/libnsl-0.9.33.2.so:       ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked (uses shared libs), with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, stripped
output/staging/lib/libnsl.so.0:              symbolic link to `libnsl-0.9.33.2.so'
output/staging/lib/libpthread-0.9.33.2.so:   ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked (uses shared libs), with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, not stripped
output/staging/lib/libpthread.so.0:          symbolic link to `libpthread-0.9.33.2.so'
output/staging/lib/libresolv-0.9.33.2.so:    ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked (uses shared libs), with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, stripped
output/staging/lib/libresolv.so.0:           symbolic link to `libresolv-0.9.33.2.so'
output/staging/lib/librt-0.9.33.2.so:        ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked (uses shared libs), with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, stripped
output/staging/lib/librt.so.0:               symbolic link to `librt-0.9.33.2.so'
output/staging/lib/libthread_db-0.9.33.2.so: ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked (uses shared libs), with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, not stripped
output/staging/lib/libthread_db.so.1:        symbolic link to `libthread_db-0.9.33.2.so'
output/staging/lib/libuClibc-0.9.33.2.so:    ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked (uses shared libs), with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, stripped
output/staging/lib/libutil-0.9.33.2.so:      ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked (uses shared libs), with unknown capability 0x41000000 = 0xf676e75, with unknown capability 0x10000 = 0x70403, stripped
output/staging/lib/libutil.so.0:             symbolic link to `libutil-0.9.33.2.so'

除了libpthread和libthread_db !!

之外都被剥离了

有什么想法吗?

3 个答案:

答案 0 :(得分:2)

2012.05也有同样的问题。 2013.11修复它:所有的库都没有被剥离。

答案 1 :(得分:2)

剥离和调试符号是独立的项目 - 尽管在buildroot中剥离也会删除调试符号。

要禁用剥离,您需要设置BR2_STRIP_none:在 strip命令中为目标上的二进制文件选择 none 。选择此选项后,请不要忘记清理。您还可以在不应剥离的可执行文件选项中添加不应剥离的文件或目录列表。

但是,条带选项仅影响目标上的二进制文件和库。 Buildroot从不剥离输出/暂存中的二进制文件和库。但是,单个包构建系统可能会这样做。在这个问题中,您可以参考uClibc生成的标准C库。 uClibc的配置有一个特定的剥离选项:DOSTRIP - 此选项默认为true。 Buildroot尝试根据BR2_STRIP选项设置该选项,但这在2013年12月中旬提交e090aeaa之前无效。

答案 2 :(得分:0)

我在2012.02遇到了同样的问题,并且有一个简单的治疗方法。只需编辑你的uclibc配置文件(在我的例子中它是toolchain / uClibc / uClibc-0.9.32.config)并更改行

DOSTRIP=y

# DOSTRIP is not set

这将禁用在构建期间剥离uclibc库:

$ file output/staging/lib/*
output/staging/lib/ld-uClibc-0.9.32.1.so:    ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, not stripped
output/staging/lib/ld-uClibc.so.0:           symbolic link to `ld-uClibc-0.9.32.1.so' 
output/staging/lib/libcrypt-0.9.32.1.so:     ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), not stripped
output/staging/lib/libcrypt.so.0:            symbolic link to `libcrypt-0.9.32.1.so' 
output/staging/lib/libc.so.0:                symbolic link to `libuClibc-0.9.32.1.so' 
output/staging/lib/libdl-0.9.32.1.so:        ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), not stripped
output/staging/lib/libdl.so.0:               symbolic link to `libdl-0.9.32.1.so' 
output/staging/lib/libgcc_s.so:              ASCII text
output/staging/lib/libgcc_s.so.1:            ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, not stripped
output/staging/lib/libm-0.9.32.1.so:         ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), not stripped
output/staging/lib/libm.so.0:                symbolic link to `libm-0.9.32.1.so' 
output/staging/lib/libnsl-0.9.32.1.so:       ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), not stripped
output/staging/lib/libnsl.so.0:              symbolic link to `libnsl-0.9.32.1.so' 
output/staging/lib/libpthread-0.9.32.1.so:   ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), not stripped
output/staging/lib/libpthread.so.0:          symbolic link to `libpthread-0.9.32.1.so' 
output/staging/lib/libresolv-0.9.32.1.so:    ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), not stripped
output/staging/lib/libresolv.so.0:           symbolic link to `libresolv-0.9.32.1.so' 
output/staging/lib/librt-0.9.32.1.so:        ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), not stripped
output/staging/lib/librt.so.0:               symbolic link to `librt-0.9.32.1.so' 
output/staging/lib/libthread_db-0.9.32.1.so: ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), not stripped
output/staging/lib/libthread_db.so.1:        symbolic link to `libthread_db-0.9.32.1.so' 
output/staging/lib/libuClibc-0.9.32.1.so:    ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), not stripped
output/staging/lib/libutil-0.9.32.1.so:      ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), not stripped
output/staging/lib/libutil.so.0:             symbolic link to `libutil-0.9.32.1.so'

全部未经剥离。