This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

tisdk-rootfs提供的glibc 2.21缺少unwind table,unwind必现crash

downloads.ti.com/.../index_FDS.html

使用tisdk提供的包(gcc5.3 glibc2.21),链接如下

http://downloads.ti.com/infotainment/esd/jacinto6/processor-sdk-linux-automotive/03_01_00_03/exports/tisdk-rootfs-image-dra7xx-evm.tar.xz

由于有内存分析的需求,使用gperftools做内存分析(在每次malloc节点做unwind并记录调用栈)

应用启动必现crash,crash发生在回溯ld-2.21.so的栈

通过readelf -u ld-2.21.so查看unwind table,发现只有19个entries(正常应该有200个左右)

发现问题原因是ld-2.21.so的编译选项没有-funwind-tables,导致缺少栈回溯必须的unwind table

下载了一份来自gnu的glibc 2.21源码,使用ti提供的toolchain加-funwind-tables选项后编译可以正常执行unwind

tisdk内的ld-2.21.so:

Unwind table index '.ARM.exidx' at offset 0x16e24 contains 19 entries

加-funwind-tables选项编译的ld-2.21.so:

Unwind table index '.ARM.exidx' at offset 0x16f0c contains 170 entries:

请问:tisdk提供的glibc库是否有带unwind table版本的?