__cxa_atexit and __cxa_finalize implementation

Stephen Warren swarren at wwwdotorg.org
Sat Sep 24 05:30:31 UTC 2005


Peter S. Mazinger wrote:
> On Fri, 16 Sep 2005, Peter S. Mazinger wrote:
> 
> 
>>On Thu, 15 Sep 2005, Stephen Warren wrote:
>>
>>Attached are my patches:
>>nonshared:
>>-adds support generally for any files to uclibc_nonshared.a
>>-creates the needed linker script
>>-it does not check for existence of files (fails if no nonshared_obj.* 
>>file is present)
>>
>>atexit:
>>adds atexit to nonshared lib, applies after the cxa_atexit... patch
>>
>>Be aware, this will for sure kill most of the apps (all that used atexit() 
>>) it will be an incompatible change to uClibc.
> 
> 
> I have "created" a compat old_atexit (really a copy of the new atexit, 
> but not hidden), with weak_alias to atexit (that could allow updating)

There's a small issue with the "z3" patch. It lists "old_atexit.c" not 
"old_atexit.o" in MOBJS2 in libc/stdlib/Makefile.

Now, I'm trying to test this....

Previously, I've built everything from scratch each time (2 or 3 
compiler passes, one uclibc pass, plus libncurses and gdb) using 
buildroot. That takes a while! I figured there should be a better way...

So, I built the toolchain using just my own atexit patch and installed 
it into /some/path. I then built SVN uClibc using that compiler, and did 
a "make PREFIX=/some/path install". Then, I tried to build my DSO test 
app, and I get this error:

/opt/gcc-3.4.3-uclibc-0.9.27-i486/bin/i486-linux-uclibc-g++ \
     -o dl-2 '-DDSO_NAME="./dso-2.so"' dl.cpp -ldl

/mnt/severn_home_nobackup/swarren/gcc-3.4.3-uclibc-0.9.27-i486/bin/../lib/gcc/i486-linux-uclibc/3.4.3/../../../../i486-linux-uclibc/lib/crt1.o(.text+0x20): 
In function `_start':
crt0.S: undefined reference to `__uClibc_start_main'
collect2: ld returned 1 exit status

So, my question is this:

Are my testing steps valid - should this kind of thing work?

If not, how do people test incremental uClibc builds without rebuilding 
the whole toolchain?

If the above steps are valid, then there's an issue with one of your 
patches.

-- 
Stephen Warren, Software Engineer, NVIDIA, Fort Collins, CO
swarren at wwwdotorg.org     http://www.wwwdotorg.org/pgp.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20050923/0c6aa8ea/attachment.pgp 


More information about the uClibc mailing list