diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-07-14 12:27:03 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-07-14 12:27:03 +0000 |
commit | b998ae0611fc9abb6b093209a6c67aeb833e46ad (patch) | |
tree | a9be4d01684a45f9b56e8585b695e8aea3c2645f /ldso/libdl | |
parent | e79b93975e4a949e77e372083b86f1093f6de29c (diff) |
Based on a patch from Alexandre Oliva, make sure _dl_malloc returns a nicely
aligned pointer that may be aligned up to page_size. Also add _dl_free,
Diffstat (limited to 'ldso/libdl')
-rw-r--r-- | ldso/libdl/libdl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c index ca39473f1..d7cbed733 100644 --- a/ldso/libdl/libdl.c +++ b/ldso/libdl/libdl.c @@ -54,6 +54,7 @@ extern struct elf_resolve *_dl_loaded_modules __attribute__ ((__weak__)); extern struct r_debug *_dl_debug_addr __attribute__ ((__weak__)); extern unsigned long _dl_error_number __attribute__ ((__weak__)); extern void *(*_dl_malloc_function)(size_t) __attribute__ ((__weak__)); +extern void (*_dl_free_function) (void *p) __attribute__ ((__weak__)); #ifdef USE_CACHE int _dl_map_cache(void) __attribute__ ((__weak__)); int _dl_unmap_cache(void) __attribute__ ((__weak__)); @@ -95,6 +96,7 @@ struct r_debug *_dl_debug_addr = NULL; static unsigned char *_dl_malloc_addr, *_dl_mmap_zero; void *(*_dl_malloc_function) (size_t size); int _dl_errno = 0; +void (*_dl_free_function) (void *p); int _dl_fixup(struct dyn_elf *rpnt, int lazy); #include "../ldso/dl-progname.h" /* Pull in the name of ld.so */ #include "../ldso/dl-hash.c" @@ -164,6 +166,7 @@ void *_dlopen(const char *libname, int flag) if (!dl_init) { dl_init++; _dl_malloc_function = malloc; + _dl_free_function = free; } /* Cover the trivial case first */ |