Subject: Re: crtend.o : how to find the Holy Graal ?
To: <>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 10/25/2002 23:06:37
> /usr/local/libexec/rox/ROX-Filer:     file format elf32-i386
> (...)
> Dynamic Section:
>   NEEDED      libgtk-x11-2.0.so.0
>   NEEDED      libgdk-x11-2.0.so.0
>   NEEDED      libatk-1.0.so.0
>   NEEDED      libgdk_pixbuf-2.0.so.0
>   NEEDED      libm.so.0
>   NEEDED      libpangoxft-1.0.so.0
>   NEEDED      libpangox-1.0.so.0
>   NEEDED      libpango-1.0.so.0
>   NEEDED      libgobject-2.0.so.0
>   NEEDED      libgmodule-2.0.so.0
>   NEEDED      libglib-2.0.so.0
>   NEEDED      libintl.so.0
>   NEEDED      libiconv.so.3
>   NEEDED      libxml2.so.6
>   NEEDED      libz.so.0
>   NEEDED      libICE.so.6
>   NEEDED      libSM.so.6
>   NEEDED      libc.so.12
>   NEEDED      crtend.o

I've just built sysutils/rox (ROX-Filer) on my system which is 1.6I
(but a week or so old).  The needed list is almost the same as that
above, except that I don't have libpangoxft, and I have libX11.so.6
in place of crtend.o - this is much more reasonable.

Except that I don't think anything should be coming after libc???

The final link command expands to:
cc -o ROX-Filer action.o appinfo.o appmenu.o bind.o choices.o collection.o
	dir.o diritem.o display.o dnd.o filer.o find.o fscache.o
	gconvert.o gtksavebox.o gui_support.o i18n.o icon.o infobox.o
	main.o menu.o minibuffer.o modechange.o mount.o options.o
	panel.o pinboard.o pixmaps.o remote.o rox_gettext.o run.o
	support.o sc.o session.o toolbar.o type.o usericons.o
	-L/oldroot/usr/bsd-current/pkgsrc/sysutils/rox/work/.buildlink/lib
	-L/usr/pkg/share/x11-links/lib
	-Wl,-R/usr/X11R6/lib
	-Wl,-R/usr/pkg/lib
	-Wl,-R/usr/pkg/lib
	-L/oldroot/usr/bsd-current/pkgsrc/sysutils/rox/work/.buildlink/lib
	-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm
	-lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
	-lintl -liconv  
	-lintl
	-Wl,-R/usr/pkg/lib
	-L/oldroot/usr/bsd-current/pkgsrc/sysutils/rox/work/.buildlink/lib
	-lgdk_pixbuf-2.0 -lm -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl
	-liconv
	-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lxml2 -lz
	-L/usr/pkg/lib -liconv -lm
	-lICE -lSM

So libX11.so.6 isn't explicitly requested in for the link.
There are NEEDED entries for it in libpangox and libgdk-x11 but these
shouldn't cause the program to have such an entry (should they?).

Looks to me like ld is adding on a extra NEEDED extry with a
random string in it?

	David

-- 
David Laight: david@l8s.co.uk