[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#698007: mklibs: Fix undefined reference to __dso_handle problem encountered with librt.so



Christian PERRIER <bubulle@debian.org> (2013-01-12):
> ----- Forwarded message from Joe Seymour <jseymour@codesourcery.com> -----
> 
> Date: Sat, 12 Jan 2013 13:13:56 +0000
> From: Joe Seymour <jseymour@codesourcery.com>
> To: debian-boot@lists.debian.org
> Subject: [PATCH] Fix undefined reference to __dso_handle problem encountered with librt.so
> X-Mailing-List: <debian-boot@lists.debian.org> archive/latest/170862
> X-CRM114-Status: Good  ( pR: 18.8078 )
> 
> [Please CC me on any responses]
> 
> When using mklibs on a simple test application I encountered the following error
> when mklibs attempts to build a reduced librt.so:
> 
> /usr/lib64/libpthread_nonshared.a(pthread_atfork.oS): relocation R_X86_64_PC32
> against undefined hidden symbol `__dso_handle' can not be used when making a
> shared object
> ld: final link failed: Bad value
> 
> Examining the link map for librt.so, when built by EGLIBC, I see the
> __dso_handle definition used by it comes from crtbeginS.o, which isn't included
> in the link because mklibs passes -nostartfiles.
> 
> In order to create a reduced librt.so that as closely as possible resembles the
> original, it makes sense to include crtbeginS.o when dealing with librt.so.1.
> This patch does that. crtendS.o is included as a requisite of crtbeginS.o.

In a sid chroot I'm getting this, which looks to me like there's no big
issue with librt.so.1?

(sid-amd64-devel)kibi@wodi:~/debian-installer/installer/build$ for i in $(find tmp/netboot-gtk/tree/ -type f); do if objdump -x $i 2>/dev/null|grep NEEDED|grep -qs librt.so.1; then echo $i; fi; done
tmp/netboot-gtk/tree/sbin/rdnssd
tmp/netboot-gtk/tree/lib/x86_64-linux-gnu/libudev.so.1.3.5
tmp/netboot-gtk/tree/lib/systemd/systemd-udevd
tmp/netboot-gtk/tree/lib/libudev.so.1
tmp/netboot-gtk/tree/lib/udev/ata_id
tmp/netboot-gtk/tree/lib/udev/scsi_id
tmp/netboot-gtk/tree/lib/udev/cdrom_id
tmp/netboot-gtk/tree/usr/lib/libcairo.so.2.11200.16
tmp/netboot-gtk/tree/usr/lib/libasound.so.2.0.0
tmp/netboot-gtk/tree/usr/bin/espeakup
tmp/netboot-gtk/tree/bin/udevadm
tmp/netboot-gtk/tree/bin/rdisc6

If you're still having any issues with it, it would be nice to describe
a complete test case.

Mraw,
KiBi.

Attachment: signature.asc
Description: Digital signature


Reply to: