This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Build problem, current CVS on PPC


On Thu, 07 Sep 2000, Andreas Jaeger wrote:
> >>>>> Franz Sirl writes:
>
> Franz> At 15:31 07.09.00, Andreas Jaeger wrote:
> >> >>>>> Franz Sirl writes:
> >> >
> >> > Hi,
> >> > I'm getting this build abort:
> >>
> >> [...]
> >>
> >> > /home/fsirl/rh70/glibc/BUILD/glibc-2.1.93/build-ppc-linux/libc_pic.os:
> >> > In function `_dl_vsym':
> >> >
> >> > /home/fsirl/rh70/glibc/BUILD/glibc-2.1.93/elf/dl-sym.c:137: undefined
> >> > reference to `_dl_init@@GLIBC_2.2'
> >>
> >> _dl_init is defined in elf/dl-init.c and ends in ld.so.  Please run
> >> readelf/objdump on those files and check also ld.map.
>
> Franz> readelf -a elf/ld.so reports:
>
> Franz> in .dynsym:
> Franz>      41: 0000db88   680 FUNC    GLOBAL DEFAULT    8
> _dl_init@@GLIBC_2.2
>
> So everything should be fine - but why do you get the link failure?
> Did you recently upgrade binutils?

Found it. dl-start.S must not be linked into libc*, only into ld.so. The 
appended patch fixes it.

Franz.

	* elf/Makefile (all-rtld-routines): Evaluate $(sysdep-rtld-routines) too.
	* sysdeps/powerpc/Makefile (sysdep-rtld-routines): New variable.
	(sysdep_routines): Remove dl-start.

Index: elf/Makefile
===================================================================
RCS file: /cvs/glibc/libc/elf/Makefile,v
retrieving revision 1.173
diff -u -p -r1.173 Makefile
--- elf/Makefile	2000/09/05 01:44:58	1.173
+++ elf/Makefile	2000/09/07 21:04:11
@@ -36,7 +36,7 @@ elide-routines.os = $(all-dl-routines) d
 # ld.so uses those routines, plus some special stuff for being the program
 # interpreter and operating independent of libc.
 rtld-routines	:= rtld $(dl-routines) dl-sysdep dl-environ dl-minimal
-all-rtld-routines = $(rtld-routines) $(sysdep-dl-routines)
+all-rtld-routines = $(rtld-routines) $(sysdep-rtld-routines)
 
 distribute	:= $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
 		   dl-cache.h dl-hash.h soinit.c sofini.c ldd.bash.in \
Index: sysdeps/powerpc/Makefile
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/powerpc/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- sysdeps/powerpc/Makefile	2000/09/06 00:05:01	1.11
+++ sysdeps/powerpc/Makefile	2000/09/07 21:04:11
@@ -41,6 +41,9 @@ CFLAGS-memcmp.c += -Wno-uninitialized
 endif
 
 ifeq ($(subdir),elf)
+# extra shared linker files to link into dl-allobjs.so and libc
 sysdep-dl-routines += dl-machine
-sysdep_routines += dl-machine dl-start
+sysdep_routines += dl-machine
+# extra shared linker files to link only into dl-allobjs.so
+sysdep-rtld-routines += dl-machine dl-start
 endif

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]