Its been a long time but I have finally checked Glibc 2.3.2 into Syllable CVS. I am merging in a bunch of changes to the Syllable headers as I type this. The port is still not complete, but I am hoping for a volounteer or two who will help me to port the Syllable code forward onto the latest CVS version of Glibc.
I've been able to link & run "Hello World!" against libc.so.2 (Glibc 2.3.2) so I know that is at least possible. My next step is to fill in the missing parts so that libcgcc_s.so doesn't fail when you try to link it with libc.so.2, and also complete the last warts in the Makefiles so that "make all" completes and I can actually run "make install" and get all the binaries in one place. The next big test will be to create a testbed with the new libraries installed so that GCC uses them by default, which will make development and testing much easier.
It works! I have been able to load and execute an executable which was linked against Glibc 2.3.2 libc.so There were only a handful of bugs in the Syllable portions of Glibc itself and I have whipped up a quick hack for the Syllable ELF loader which enables me to load the library itself. Now my main focus is in getting the code into a usable and maintainable state as quickly as possible.
Well the last of the compilation errors are gone. It links! Yes folks, glibc-2.3.2 now compiles and links libc.so, libc_nonshared.a & libm.so and it is possible to link an application against these libraries without any linker errors.
I now have to go back over my Syllable-specific code and fix up a lot of it. It seems I had a braino and have incorrectly coded the function declarations. This means that at the moment you cannot use what should be external functions E.g. dbprintf(), because the symbols for those functions are not exported from the DSO correctly. Silly me. It shouldn't take too long to fix though, and once I have that sorted it will be time for the big test..building on Syllable and then linking & running "Hello world!" with the new library..
Some of the toughest errors have finally been solved. The current stderr output of make currently leaves me with the following errors:
/home/user/glibc-configure/libc_pic.a(fdatasync.os)(.text+0x18): In function `fdatasync':
/home/user/glibc-configure/libc_pic.a(truncate.os)(.text+0x34): In function `truncate':
/home/user/glibc-configure/libc_pic.os(.text+0x2f2): In function `deinit_images':
/home/user/glibc-configure/libc_pic.os(.text+0x373): In function `__libc_start_main':
collect2: ld returned 1 exit status
make[1]: *** [/home/user/glibc-configure/libc.so] Error 1
make: *** [all] Error 2
__deinit_images() and __init_main_image() are both "internal" Syllable-specific routines which will take little effort to complete. fdatasync() & ftruncate() are only warnings & will not stop the final generation of libc.so Once I have the (ELF) image handling functions in place I should finally have a linking libc.so which I can start testing against. Finally!
No Christmas presents from Glibc at the moment. I am still working through each Undefined Symbol error and fixing it as I go, but a single error can lead to a huge amount of work! I am currently working on filling in some internal libc semaphore/locking functions and slowly fixing what I perceive as a lot of problems with the original AtheOS port of Glibc 2.1 To give you an idea of the current status, the output from make 2>>error.txt is 14143 bytes (14k) and the glibc-2.3.2/sysdeps/unix/sysv/syllable/ directory (Which holds most of the Syllable specific code) is currently 282624 bytes in total (276K)
Things are going quite smoothly at the moment. I now have Glibc all the way upto the linking stage. All I have to do is fill in the missing bits to satisfy all the "missing symbol" errors. This hopefully isn't as much work as it sounds! I'm also still fiddling with some of the Glibc configure/Make files in an effort to remove the dependency on ld.so; Syllable does not need nor does it use ld.so as it has a kernel loader & runtime linker, so we don't want Glibc to build or require ld.so nor libdl.so. I think I've cracked it now though, so hopefully that will work as I want it to.
I have already started work on creating a default configuration of Glibc 2.2.3 which can at least be correctly configured and compiled for Syllable. So far this has simply involved tweaking Autoconf and Automake scripts, adding a few Syllable directories and a few tweaks to standard kernel headers. Now that 0.4.5 has been released I can start making changes to the kernel where needed and keep my work on Glibc and Syllable in sync. Currently I have a copy of Glibc 2.2.3 which can be configured and will compile over 50% of the standard Glibc source before an error; development upto this point has been fairly easy. Hopefully this will remain the case!
| Syllable | ToDo | Changes | Preferences | Search This page is read-only | View other revisions | Last edited June 9, 2004 15:20 (diff) Not logged in | Login | New User |