This is the mail archive of the libc-help@sourceware.org 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]
Other format: [Raw text]

Error building for arm: shlib.lds:149: syntax error


I am trying to build glibc 2.13 (yes, I know it's one rev back, but...)
for ARM, and I am running into a weird behavior - when I build glibc, I
get an error on shlib.lds:

arm-linux-gnueabi-gcc   -nostdlib -nostartfiles -r -o
Build/arm-linux-gnueabi/glibc_main/libc_pic.os \
	 -Wl,-d -Wl,--whole-archive Build/arm-linux-gnueabi/glibc_main/libc_pic.a
arm-linux-gnueabi-gcc   -shared -Wl,-O1 \
		  -nostdlib -nostartfiles \
		   -Wl,-dynamic-linker=/lib/ld-linux.so.3 -Wl,-z,combreloc -Wl,-z,relro
-Wl,--hash-style=both \
		  -Wl,--verbose 2>&1 | \
	  sed > Build/arm-linux-gnueabi/glibc_main/shlib.ldsT \
	      -e '/^=========/,/^=========/!d;/^=========/d' \
	       -e 's/^.*\.gnu\.hash[ 	]*:.*$/  .note.ABI-tag : { *(.note.ABI-tag)
} &/' -e '/^[ 	]*\.hash[ 	]*:.*$/{h;d;}' -e
'/DATA_SEGMENT_ALIGN/{H;g}'  \
	      -e 's/^.*\*(\.dynbss).*$/& \
		 PROVIDE(__start___libc_freeres_ptrs = .); \
		 *(__libc_freeres_ptrs) \
		 PROVIDE(__stop___libc_freeres_ptrs = .);/'\
	      -e 's@^.*\*(\.jcr).*$@& \
		 PROVIDE(__start__es : {subfreeres = .);\
		 __libc_subfreeres : { *(__libc_subfreeres) }\
		 PROVIDE(__stop___libc_subfreeres = .);\
		 PROVIDE(__start___libc_atexit = .);\
		 __libc_atexit : { *(__libc_atexit) }\
		 PROVIDE(__stop___libc_atexit = .);\
		 PROVIDE(__start___libc_thread_subfreeres = .);\
		 __libc_thread_subfreeres : { *(__libc_thread_subfreeres) }\
		 PROVIDE(__stop___libc_thread_subfreeres = .);\
		 /DISCARD/ : { *(.gnu.glibc-stub.*) }@'
mv -f Build/arm-linux-gnueabi/glibc_main/shlib.ldsT
Build/arm-linux-gnueabi/glibc_main/shlib.lds
<snip a buch of items>
Build/arm-linux-gnueabi/glibc_main/elf/ld.so -lgcc
ld:Build/arm-linux-gnueabi/glibc_main/shlib.lds:149: syntax error

The error is:
	 PROVIDE(__start__es : {subfreeres = .);
(note the unbalanced { and ))

But I cannot for the life of me work out where that is coming from. In
glibc-2.13/Makerules there is the following:


ifeq (yes,$(elf))
# binutils only position loadable notes into the first page for binaries,
# not for shared objects
$(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
	$(LINK.o) -shared -Wl,-O1 \
		  -nostdlib -nostartfiles \
		  $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS.so) \
		  -Wl,--verbose 2>&1 | \
	  sed > $@T \
	      -e '/^=========/,/^=========/!d;/^=========/d' \
	      $(if $(filter yes,$(have-hash-style)), \
		   -e 's/^.*\.gnu\.hash[ 	]*:.*$$/  .note.ABI-tag : { *(.note.ABI-tag) }
&/' \
		   -e '/^[ 	]*\.hash[ 	]*:.*$$/{h;d;}' \
		   -e '/DATA_SEGMENT_ALIGN/{H;g}' \
		, \
		   -e 's/^.*\.hash[ 	]*:.*$$/  .note.ABI-tag : { *(.note.ABI-tag) } &/' \
	       ) \
	      -e 's/^.*\*(\.dynbss).*$$/& \
		 PROVIDE(__start___libc_freeres_ptrs = .); \
		 *(__libc_freeres_ptrs) \
		 PROVIDE(__stop___libc_freeres_ptrs = .);/'\
	      -e 's@^.*\*(\.jcr).*$$@& \
		 PROVIDE(__start___libc_subfreeres = .);\
		 __libc_subfreeres : { *(__libc_subfreeres) }\
		 PROVIDE(__stop___libc_subfreeres = .);\
		 PROVIDE(__start___libc_atexit = .);\
		 __libc_atexit : { *(__libc_atexit) }\
		 PROVIDE(__stop___libc_atexit = .);\
		 PROVIDE(__start___libc_thread_subfreeres = .);\
		 __libc_thread_subfreeres : { *(__libc_thread_subfreeres) }\
		 PROVIDE(__stop___libc_thread_subfreeres = .);\
		 /DISCARD/ : { *(.gnu.glibc-stub.*) }@'
	mv -f $@T $@

but there is no element corresponding to the faulty line in there, nor, as
far as I can grep, anywhere within the tools.

Searching the web shows I'm not the only person seeing this: I see files
in pastebin with the same error, but no links to why.

If I could find where this came from, I could fix it, but it seems to be
beaming in from e-space!




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