[Bug 227552] w, uptime i386 cordeump
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Apr 28 12:40:22 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227552
--- Comment #11 from Dimitry Andric <dim at FreeBSD.org> ---
I'm now not so sure anymore about the TLS section being a problem. On a
stable/11 i386 box with r332318 (as of 2018-04-09), I do *not* see crashes in w
or uptime, even though the TLS section appears to be 0x50 bytes:
$ ldd /usr/bin/uptime
/usr/bin/uptime:
libkvm.so.7 => /lib/libkvm.so.7 (0x28070000)
libsbuf.so.6 => /lib/libsbuf.so.6 (0x2807d000)
libxo.so.0 => /lib/libxo.so.0 (0x28080000)
libutil.so.9 => /lib/libutil.so.9 (0x28099000)
libc.so.7 => /lib/libc.so.7 (0x280ab000)
libelf.so.2 => /lib/libelf.so.2 (0x2820a000)
$ uptime
2:36PM up 21 mins, 1 user, load averages: 0.32, 0.26, 0.23
$ readelf -l /lib/libxo.so.0 | grep 'Type\|TLS'
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
TLS 0x017160 0x00018764 0x00018764 0x00000 0x00050 R 0x8
$ readelf -l /usr/obj/usr/src/lib/libxo/libxo.so.0.full | grep 'Type\|TLS'
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
TLS 0x017160 0x00018160 0x00018160 0x00000 0x00658 R 0x8
$ readelf -l /usr/obj/usr/src/lib/libxo/libxo.so.0 | grep 'Type\|TLS'
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
TLS 0x017160 0x00018160 0x00018160 0x00000 0x00654 R 0x8
So, libxo.so.0.full, the actual output of the link stage, has a TLS MemSize of
0x658 bytes, libxo.so.0, which is produced by:
objcopy --strip-debug --add-gnu-debuglink=libxo.so.0.debug libxo.so.0.full
libxo.so.0
has a TLS MemSize of 0x654 bytes, and the final version installed by
installworld, and stripped during that time, has a TLS MemSize of 0x50 bytes.
However, at this revision, r332318, it does not crash.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list