Syllable; elf-init.c in csu/stamp.os
Kristian Van Der Vliet
vanders@liqwyd.com
Mon Jan 26 18:30:00 GMT 2004
Hi,
I am currently porting Glibc 2.3.2 to Syllable (See sig). It's gone well so
far and I'm now trying to solve the last few linker errors so that I can
begin to test & debug what I have. There is one problem which has me
stumped, though.
When linking libc.so I get the following errors
/home/user/glibc-2.3.2/csu/elf-init.c:54: undefined reference to
`__preinit_array_end'
/home/user/glibc-configure/libc_pic.os(.text+0x59c):/home/user/glibc-2.3.2/csu/elf-init.c:54:
undefined reference to `__preinit_array_start'
/home/user/glibc-configure/libc_pic.os(.text+0x5c5):/home/user/glibc-2.3.2/csu/elf-init.c:66:
undefined reference to `__init_array_end'
/home/user/glibc-configure/libc_pic.os(.text+0x5cb):/home/user/glibc-2.3.2/csu/elf-init.c:66:
undefined reference to `__init_array_start'
/home/user/glibc-configure/libc_pic.os(.text+0x617): In function
`__libc_csu_fini':
/home/user/glibc-2.3.2/csu/elf-init.c:76: undefined reference to
`__fini_array_end'
It turns out that this is because elf-init.c is being included as part of
libc_pic.a, exactly where it should not be. On further investigation the
files csu/stamp.os & csu/stamp.oS appear to be incorrect. Configuring with
--build=i586-unknown-syllable --host=i586-unknown-syllable
csu/stamp.os is generated as
csu/init-first.os csu/libc-start.os csu/sysdep.os csu/version.os
csu/check_fds.os csu/elf-init.os csu/dso_handle.os csu/errno.os
csu/errno-loc.os csu/divdi3.os
(Note the inclusion of elf-init.os)
csu/stamp.oS is a 1 byte file with no files listed within it.
With the exact same codebase and configuring Glibc with
--build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
csu/stamp.os is generated correctly as
csu/init-first.os csu/libc-start.os csu/sysdep.os csu/version.os
csu/check_fds.os csu/dso_handle.os csu/errno.os csu/errno-loc.os
csu/divdi3.os
and csu/stamp.oS as
csu/elf-init.oS csu/hp-timing.oS
Can anyone shed any light on why I see different behavour for the two targets?
I can see how the stamp.o* files are generated in Makerules & o-iterator.mk
etc. but I cannot see how the list of files which are passed to these targets
is generated in the first place.
This really is one the last issues I have with building Glibc for Syllable
after several months work, so as you might understand I am quite eager to
solve this one (Especially as I have spent the previous week chasing down a
blind alley with regards to the link errors). Any help would be greatly
appreciated.
--
Vanders
http://syllable.sourceforge.net/
http://www.liqwyd.com
More information about the Libc-alpha
mailing list