[OpenWrt-Devel] TEXTREL in x86 with musl

Luiz Angelo Daros de Luca luizluca at gmail.com
Mon Jul 6 02:35:36 EDT 2015


SInce x86 started to compile with musl, elfutils package becomes broken.

During linking, elfutils checks if there is TEXTREL in its .so files, and
it fatally fails if so. I guess this is the only package that does this
kind of test.

I'm new to PIE binary but google says that the presence of TEXTREL in an
"readelf -d" indicates that one of more files linked were not compiled with
-fPIC.  Following https://wiki.gentoo.org/wiki/Hardened/Textrels_Guide, I
tried to locale the offending file with scanelf and got this:

$ trunk/build_dir/target-i386_i486_musl-1.1.10/elfutils-0.163 $ scanelf -qT
*.so libelf/*.so
  libelf.so: __func__.3897 [0xE1F1] in (optimized out: previous
__stack_chk_fail_local) [0xE1F0]

I checked all .so files generated with musl and most of them (or all) got
the same output. I still have the uclibc binaries and none have TEXTREL.

What is the best way to deal with this? Turn TEXTREL into non-fatal for

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150706/ea993756/attachment.htm>
-------------- next part --------------
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list