* stdlib/cxa_atexit.c (__new_exitfn): Rewrite to preserve order in
which the functions were registered.
* dlfcn/Makefile: Add rules to build and run bug-atexit1 and
bug-atexit2.
* dlfcn/bug-atext1.c: New file.
* dlfcn/bug-atext1-lib.c: New file.
* dlfcn/bug-atext2.c: New file.
* dlfcn/bug-atext2-lib.c: New file.