diff options
author | Roland McGrath <roland@gnu.org> | 1996-06-12 04:00:32 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-06-12 04:00:32 +0000 |
commit | 463e148b7581de66898a9675fc7dd5dfc88f8b0e (patch) | |
tree | 2d98d77cb503cd6aabd4bcd80a09da21924ae62e /version.c | |
parent | 8d6468d0c8aa55b319ba70a83d3b092c292ef0b1 (diff) | |
download | glibc-463e148b7581de66898a9675fc7dd5dfc88f8b0e.tar.gz |
Tue Jun 11 23:23:30 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* Makerules (LDFLAGS-c.so): Use __libc_main instead of
__libc_print_version as entry point for shared object.
* version.c [HAVE_ELF] (__libc_main): New function.
* elf/dl-load.c (_dl_map_object_from_fd): Relocate l_entry with the
load address.
Diffstat (limited to 'version.c')
-rw-r--r-- | version.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -36,6 +36,20 @@ This is free software; see the source for copying conditions.\n\ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ PARTICULAR PURPOSE."); } + +#ifdef HAVE_ELF +/* This function is the entry point for the shared object. + Running the library as a program will get here. */ + +#include <stdlib.h> + +void +__libc_main (void) +{ + __libc_print_version (); + exit (0); +} +#endif /* Local Variables: |