Bug #3906
R_ARM_TLS_LE32 relocation not permitted in shared object
0%
Description
I'm compiling the latest git (4.1-2141~g01c26fc) on a Debian arm-linux-gnueabi VM using QEMU with gcc version 4.4.5.
I've configured with:
./configure --disable-avahi --enable-bundle --disable-libav --disable-ffmpeg_static --disable-libx264 --disable-libx265 --disable-dbus_1 --disable-hdhomerun_client --disable-hdhomerun_staticbut make gives these errors at the end, even though the binary is there:
... cut ... Markdown: docs/wizard/mapping.md Markdown: docs/wizard/muxes.md Markdown: docs/wizard/network.md Markdown: docs/wizard/status.md CC src/docs.o CC build.o CC timestamp.o CC tvheadend /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/http.o(.text+0x18f4): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/epg.o(.text+0x3650): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/streaming.o(.text+0x620): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/esfilter.o(.text+0xd0): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/esfilter.o(.text+0xf8): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/esfilter.o(.text+0x4c4): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/esfilter.o(.text+0x760): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/intlconv.o(.text+0x17d0): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/descrambler/caid.o(.text+0x1a8): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/input/mpegts/mpegts_mux.o(.text+0xb4c): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/input/mpegts/dvb_support.o(.text+0xcf4): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/input/mpegts/dvb_support.o(.text+0xd88): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/input/mpegts/dvb_support.o(.text+0xe0c): R_ARM_TLS_LE32 relocation not permitted in shared object root@debian-armel:~/tvheadend/tvheadend# build.linux/tvheadend -v build.linux/tvheadend: version 4.1-2141~g01c26fc-dirty
Should I worry about them? I never got those errors, but it's the first time that I build with libx264_static and libx265_static, too (normally I disabled them).
Files
History
Updated by virtual dj over 8 years ago
I've just tried to configure again adding:
--disable-libx264_static --disable-libx265_staticbut the warning messages are still there.
Updated by virtual dj over 8 years ago
Now I've tried disabling all the features that may have static builds and also "bundle" but the error it's still there.
./configure --disable-avahi --disable-libav --disable-ffmpeg_static --disable-libx264 --disable-libx264_static --disable-libx265 --disable-libx265_static --disable-libvpx --disable-libvpx_static --disable-libtheora --disable-libtheora_static --disable-libvorbis --disable-libvorbis_static --disable-libfdkaac --disable-libfdkaac_static --disable-libmfx_static --disable-dbus_1 --disable-hdhomerun_client --disable-hdhomerun_staticI'm confused on where the error comes from
Updated by virtual dj over 8 years ago
- File ld_debug.txt.gz ld_debug.txt.gz added
I'm also attaching the output of LD_DEBUG=all make when configuring as described on the previous post #2, hoping it can be useful.
I'm not able to interpret the output, though, it's far from my knowledge. The relocation not permitted errors start from line 17416:
1158: binding file /usr/lib/libbfd-2.20.1-system.20100303.so [0] to /lib/libc.so.6 [0]: normal symbol `snprintf' [GLIBC_2.4] 1158: symbol=vfprintf; lookup in file=/usr/bin/ld [0] 1158: symbol=vfprintf; lookup in file=/usr/lib/libbfd-2.20.1-system.20100303.so [0] 1158: symbol=vfprintf; lookup in file=/lib/libdl.so.2 [0] 1158: symbol=vfprintf; lookup in file=/usr/lib/libz.so.1 [0] 1158: symbol=vfprintf; lookup in file=/lib/libc.so.6 [0] 1158: binding file /usr/lib/libbfd-2.20.1-system.20100303.so [0] to /lib/libc.so.6 [0]: normal symbol `vfprintf' [GLIBC_2.4] /root/tvheadend/tvheadend/build.linux/src/http.o(.text+0x18f4): R_ARM_TLS_LE32 relocation not permitted in shared object 1158: symbol=_IO_putc; lookup in file=/usr/bin/ld [0] 1158: symbol=_IO_putc; lookup in file=/usr/lib/libbfd-2.20.1-system.20100303.so [0] 1158: symbol=_IO_putc; lookup in file=/lib/libdl.so.2 [0] 1158: symbol=_IO_putc; lookup in file=/usr/lib/libz.so.1 [0] 1158: symbol=_IO_putc; lookup in file=/lib/libc.so.6 [0] 1158: binding file /usr/lib/libbfd-2.20.1-system.20100303.so [0] to /lib/libc.so.6 [0]: normal symbol `_IO_putc' [GLIBC_2.4] /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/epg.o(.text+0x3650): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/streaming.o(.text+0x620): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/esfilter.o(.text+0xd0): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/esfilter.o(.text+0xf8): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/esfilter.o(.text+0x4c4): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/esfilter.o(.text+0x760): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/intlconv.o(.text+0x17d0): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/descrambler/caid.o(.text+0x1a8): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/input/mpegts/mpegts_mux.o(.text+0xb4c): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/input/mpegts/dvb_support.o(.text+0xcf4): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/input/mpegts/dvb_support.o(.text+0xd88): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/input/mpegts/dvb_support.o(.text+0xe0c): R_ARM_TLS_LE32 relocation not permitted in shared object 1158: symbol=_bfd_default_link_order; lookup in file=/usr/bin/ld [0] 1158: symbol=_bfd_default_link_order; lookup in file=/usr/lib/libbfd-2.20.1-system.20100303.so [0] 1158: binding file /usr/lib/libbfd-2.20.1-system.20100303.so [0] to /usr/lib/libbfd-2.20.1-system.20100303.so [0]: normal symbol `_bfd_default_link_order' 1158: symbol=_bfd_elf_swap_versym_out; lookup in file=/usr/bin/ld [0] 1158: symbol=_bfd_elf_swap_versym_out; lookup in file=/usr/lib/libbfd-2.20.1-system.20100303.so [0] 1158: binding file /usr/lib/libbfd-2.20.1-system.20100303.so [0] to /usr/lib/libbfd-2.20.1-system.20100303.so [0]: normal symbol `_bfd_elf_swap_versym_out'I always compiled TVHeadend for armel with this VM in the past and I never got this type of error.
However, it's also a lot of time that I didn't upgrade it, as the latest version that I compiled was 4.1-1648~g9f44f72.
Note: I would investigate which is the exact version that broke the build by going back with git, but using QEMU it takes a lot of time to compile and the error appears only at the end... (10 minutes later issuing make)
Updated by virtual dj over 8 years ago
I'm sorry for this long "monologue", but eventually I found the git version that broke my builds.
Version 4.1-1946~g6560e86 is the latest that works "out of the box" (see later):
CC src/descrambler/constcw.o CC src/descrambler/ffdecsa/ffdecsa_interface.o CC src/descrambler/libaesdec/libaesdec.o CC build.o CC timestamp.o CC tvheadend root@debian-armel:~/tvheadend/tvheadend# build.linux/tvheadend -v build.linux/tvheadend: version 4.1-1946~g6560e86-dirty... while 4.1-1947~g9237d88 and following give the errors:
CC src/descrambler/constcw.o CC src/descrambler/ffdecsa/ffdecsa_interface.o CC src/descrambler/libaesdec/libaesdec.o CC build.o CC timestamp.o CC tvheadend /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/http.o(.text+0x1d48): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/epg.o(.text+0x364c): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/streaming.o(.text+0x620): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/esfilter.o(.text+0xd0): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/esfilter.o(.text+0xf8): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/esfilter.o(.text+0x4c4): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/esfilter.o(.text+0x760): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/intlconv.o(.text+0x17d0): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/descrambler/caid.o(.text+0x1a8): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/input/mpegts/mpegts_mux.o(.text+0xa64): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/input/mpegts/dvb_support.o(.text+0xcf4): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/input/mpegts/dvb_support.o(.text+0xd88): R_ARM_TLS_LE32 relocation not permitted in shared object /usr/bin/ld: /root/tvheadend/tvheadend/build.linux/src/input/mpegts/dvb_support.o(.text+0xe0c): R_ARM_TLS_LE32 relocation not permitted in shared object root@debian-armel:~/tvheadend/tvheadend# build.linux/tvheadend -v build.linux/tvheadend: version 4.1-1947~g9237d88-dirtyhttps://github.com/tvheadend/tvheadend/commit/9237d88dc713bdc87a0c19a3800d643e0c40e47b
I read on the commit that "hardening" consists on implementing "PIE". So I tried adding the --disable-pie switch when configuring the latest git version it WORKED!
So, why does it work correcly without the --disable-pie when compiling the same sources on x86 and it fails on ARM using the same gcc v4.4.5 (Debian 4.4.5-8)?
I checked the configure output of x86 and it says "Options: pie ... yes". Is that an arm "defect"?
Updated by Jaroslav Kysela over 8 years ago
- Status changed from New to Invalid
It looks like a bug in binutils (only ARM is affected):
https://sourceware.org/ml/binutils/2011-06/msg00204.html
When you use '--disable-pie' the -fPIC is used instead which makes the code full relocatable (less optimizations) - but we don't require this gcc / code config for the application code.