xy zou wrote:
I list symbol from udpcdialog/lib.a
1) cd busybox-1.13.2/udpcdialog
2) nm lib.a | grep "_IO_cleanup"
get result:
U _IO_cleanup
00000000 T __bring_in_IO_cleanup
00000000 d __elf_set___libc_atexit_element__IO_cleanup__
_IO_cleanup not defined in busybox-1.13.2/udpcdialog/lib.a why ???
The purpose of __bring_in_IO_cleanup is to force the linker to include
the function _IO_cleanup , which is responsible for flushing IO buffers
before exit. Because of static linking the linker "forgets" to include
this, unless such tricks are used.
Without it, some data that application write right before exit might get
lost.
Regards,
Alain