This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[crosstool-ng] [patch] glibc-2.9/eglibc-2_9 patch for "undefined reference to `_begin'"


On Wed, Apr 22, 2009 at 12:23:40PM -0400, venetis@mail.capsl.udel.edu wrote:
> Yes, I see it on Alpha. See the Makefile changes in glibc here:
> 
> http://sourceware.org/cgi-bin/cvsweb.cgi/libc/elf/?cvsroot=glibc
> 
> If I understood correctly, this happens due to some changes in binutils
> 2.19.51.0.2 and later.

Attached are both patches for eglibc and glibc; i don't see that either
are the trunk yet

-- 
Nye Liu
nliu@mrv.com
(818) 772-6235x248
(818) 772-0576 fax

"Who would be stupid enough to quote a fictitious character?"
	-- Don Quixote
Index: patches/glibc/2.9/540-2.9-elf-begin.patch
===================================================================
--- patches/glibc/2.9/540-2.9-elf-begin.patch	(.../vendor/crosstool-ng/current)	(revision 0)
+++ patches/glibc/2.9/540-2.9-elf-begin.patch	(.../trunk/tools/crosstool-ng)	(revision 12574)
@@ -0,0 +1,29 @@
+[ALL  ]    powerpc-860-linux-gnu-gcc       -nostdlib -nostartfiles -shared                        -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs -Wl,--verbose 2>&1 |                    LC_ALL=C                sed -e '/^=========/,/^=========/!d;/^=========/d'                          -e 's/. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/'              > /local/nyet-build/crosstool-ng-svn/targets/powerpc-860-linux-gnu/build/build-libc/elf/ld.so.lds
+[ALL  ]    powerpc-860-linux-gnu-gcc       -nostdlib -nostartfiles -shared -o /local/nyet-build/crosstool-ng-svn/targets/powerpc-860-linux-gnu/build/build-libc/elf/ld.so                                         -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs                         /local/nyet-build/crosstool-ng-svn/targets/powerpc-860-linux-gnu/build/build-libc/elf/librtld.os -Wl,--version-script=/local/nyet-build/crosstool-ng-svn/targets/powerpc-860-linux-gnu/build/build-libc/ld.map                                  -Wl,-soname=ld.so.1 -T /local/nyet-build/crosstool-ng-svn/targets/powerpc-860-linux-gnu/build/build-libc/elf/ld.so.lds
+[ALL  ]    /local/nyet-build/crosstool-ng-svn/targets/powerpc-860-linux-gnu/build/build-libc/elf/librtld.os: In function `_dl_start_final':
+[ALL  ]    rtld.c:(.text+0x2fe): undefined reference to `_begin'
+[ALL  ]    /local/nyet-build/crosstool-ng-svn/targets/powerpc-860-linux-gnu/build/gcc-core-shared/lib/gcc/powerpc-860-linux-gnu/4.3.3/../../../../powerpc-860-linux-gnu/bin/ld: /local/nyet-build/crosstool-ng-svn/targets/powerpc-860-linux-gnu/build/build-libc/elf/ld.so: hidden symbol `_begin' isn't defined
+[ALL  ]    /local/nyet-build/crosstool-ng-svn/targets/powerpc-860-linux-gnu/build/gcc-core-shared/lib/gcc/powerpc-860-linux-gnu/4.3.3/../../../../powerpc-860-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output
+[ALL  ]    collect2: ld returned 1 exit status
+[ERROR]    make[3]: *** [/local/nyet-build/crosstool-ng-svn/targets/powerpc-860-linux-gnu/build/build-libc/elf/ld.so] Error 1
+[ALL  ]    make[3]: Leaving directory `/local/nyet-build/crosstool-ng-svn/targets/src/glibc-2.9/elf'
+[ERROR]    make[2]: *** [elf/subdir_lib] Error 2
+[ALL  ]    make[2]: Leaving directory `/local/nyet-build/crosstool-ng-svn/targets/src/glibc-2.9'
+[ERROR]    make[1]: *** [all] Error 2
+[ALL  ]    make[1]: Leaving directory `/local/nyet-build/crosstool-ng-svn/targets/powerpc-860-linux-gnu/build/build-libc'
+[ERROR]    Build failed in step 'Installing C library'
+[ERROR]    Error happened in '/local/nyet-build/crosstool-ng-svn/scripts/functions' in function 'CT_DoExecLog' (line unknown, sorry)
+[ERROR]          called from '/local/nyet-build/crosstool-ng-svn/scripts/build/libc/glibc.sh' at line # 504 in function 'do_libc'
+[ERROR]          called from '/local/nyet-build/crosstool-ng-svn/scripts/crosstool-NG.sh' at line # 478 in function 'main'
+
+--- glibc-2.9_orig/elf/Makefile	2009-03-26 20:26:42.000000000 -0700
++++ glibc-2.9/elf/Makefile	2009-03-26 20:14:11.000000000 -0700
+@@ -304,7 +304,7 @@
+ 		  $(LDFLAGS-rtld) -Wl,-z,defs -Wl,--verbose 2>&1 |	\
+ 		  LC_ALL=C \
+ 		  sed -e '/^=========/,/^=========/!d;/^=========/d'	\
+-		      -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
++		      -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
+ 		  > $@.lds
+ 	$(LINK.o) -nostdlib -nostartfiles -shared -o $@			\
+ 		  $(LDFLAGS-rtld) -Wl,-z,defs $(z-now-$(bind-now))	\

Property changes on: patches/glibc/2.9
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /vendor/crosstool-ng/1.4.0/patches/glibc/2.9:r12569
   Merged /vendor/crosstool-ng/current/patches/glibc/2.9:r12263-12568


Property changes on: patches/glibc/ports-2.9
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /vendor/crosstool-ng/1.4.0/patches/glibc/ports-2.9:r12569
   Merged /vendor/crosstool-ng/current/patches/glibc/ports-2.9:r12263-12568


Property changes on: patches/strace/4.5.18
___________________________________________________________________
Deleted: svn:mergeinfo


Property changes on: patches/uClibc/0.9.30.1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /vendor/crosstool-ng/1.4.0/patches/uClibc/0.9.30.1:r12569
   Merged /vendor/crosstool-ng/current/patches/uClibc/0.9.30.1:r12263-12568


Property changes on: patches/eglibc/2_8
___________________________________________________________________
Deleted: svn:mergeinfo

Index: patches/eglibc/2_9/110-binutils-elf-begin.patch
===================================================================
--- patches/eglibc/2_9/110-binutils-elf-begin.patch	(.../vendor/crosstool-ng/current)	(revision 0)
+++ patches/eglibc/2_9/110-binutils-elf-begin.patch	(.../trunk/tools/crosstool-ng)	(revision 12574)
@@ -0,0 +1,12 @@
+diff -ru eglibc-2_9_orig/elf/Makefile eglibc-2_9/elf/Makefile
+--- eglibc-2_9_orig/elf/Makefile	2009-01-26 07:31:40.000000000 -0800
++++ eglibc-2_9/elf/Makefile	2009-05-06 16:52:28.000000000 -0700
+@@ -305,7 +305,7 @@
+ 		  $(LDFLAGS-rtld) -Wl,-z,defs -Wl,--verbose 2>&1 |	\
+ 		  LC_ALL=C \
+ 		  sed -e '/^=========/,/^=========/!d;/^=========/d'	\
+-		      -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
++		      -e 's/\. = .* + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
+ 		      -e 's/\. = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
+ 		  > $@.lds
+ 	$(LINK.o) -nostdlib -nostartfiles -shared -o $@			\

Property changes on: patches/binutils/2.18.50.0.9
___________________________________________________________________
Deleted: svn:mergeinfo


Property changes on: patches/ltrace/0.5
___________________________________________________________________
Deleted: svn:mergeinfo


Property changes on: patches/gcc/4.3.2
___________________________________________________________________
Deleted: svn:mergeinfo


Property changes on: patches/gcc/4.3.3
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /vendor/crosstool-ng/current/patches/gcc/4.3.3:r12263-12568
   Merged /vendor/crosstool-ng/1.4.0/patches/gcc/4.3.3:r12569


Property changes on: docs
___________________________________________________________________
Added: svn:ignore
   + ct-ng.1*



Property changes on: config/arch
___________________________________________________________________
Deleted: svn:mergeinfo


Property changes on: .
___________________________________________________________________
Added: svn:mergeinfo
   Merged /vendor/crosstool-ng/1.4.0:r12569
   Merged /vendor/crosstool-ng/current:r11432-12568


--
For unsubscribe information see http://sourceware.org/lists.html#faq

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