diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-06-19 22:59:48 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-06-19 22:59:48 +0000 |
commit | 9be09e060fcb211d3e53fc93098f57b74df2cb67 (patch) | |
tree | 4abc7be287b872bf34a7a88453e31d5186e88b1a /sysdeps/generic/ldsodefs.h | |
parent | ae1ad3aebbc397212b4bb2eec92ff19f8c1f913a (diff) | |
download | glibc-9be09e060fcb211d3e53fc93098f57b74df2cb67.tar.gz glibc-9be09e060fcb211d3e53fc93098f57b74df2cb67.tar.xz glibc-9be09e060fcb211d3e53fc93098f57b74df2cb67.zip |
* sysdeps/generic/ldsodefs.h (rtld_global): Reorder some elements
to fill in holes (rtld_global_ro): Likewise. 2007-06-18 Jakub Jelinek <jakub@redhat.com> * elf/dl-addr.c (_dl_addr): Skip PT_LOAD checking if l_contiguous. Move PT_LOAD checking to... (_dl_addr_inside_object): ... here, new function. * elf/dl-sym.c (do_sym): If not l_contiguous, call _dl_addr_inside_object. * elf/dl-iteratephdr.c (__dl_iterate_phdr): Likewise. * dlfcn/dlinfo.c (dlinfo_doit): Likewise. * elf/dl-open.c (dl_open_worker): Likewise. (_dl_addr_inside_object): New function if IS_IN_rtld. * elf/dl-load.c (_dl_map_object_from_fd): Set l_contiguous if no holes are present or are PROT_NONE protected. * include/link.h (struct link_map): Add l_contiguous field. * sysdeps/generic/ldsodefs.h (_dl_addr_inside_object): New prototype.
Diffstat (limited to 'sysdeps/generic/ldsodefs.h')
-rw-r--r-- | sysdeps/generic/ldsodefs.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 5205c41493..c910ed59c4 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -439,18 +439,18 @@ struct rtld_global EXTERN void (*_dl_rtld_unlock_recursive) (void *); #endif - /* Prevailing state of the stack, PF_X indicating it's executable. */ - EXTERN ElfW(Word) _dl_stack_flags; - /* If loading a shared object requires that we make the stack executable when it was not, we do it by calling this function. It returns an errno code or zero on success. */ EXTERN int (*_dl_make_stack_executable_hook) (void **) internal_function; - /* Highest dtv index currently needed. */ - EXTERN size_t _dl_tls_max_dtv_idx; + /* Prevailing state of the stack, PF_X indicating it's executable. */ + EXTERN ElfW(Word) _dl_stack_flags; + /* Flag signalling whether there are gaps in the module ID allocation. */ EXTERN bool _dl_tls_dtv_gaps; + /* Highest dtv index currently needed. */ + EXTERN size_t _dl_tls_max_dtv_idx; /* Information about the dtv slots. */ EXTERN struct dtv_slotinfo_list { @@ -534,15 +534,15 @@ struct rtld_global_ro #define DL_DEBUG_HELP (1 << 9) #define DL_DEBUG_PRELINK (1 << 10) - /* Cached value of `getpagesize ()'. */ - EXTERN size_t _dl_pagesize; - /* OS version. */ EXTERN unsigned int _dl_osversion; /* Platform name. */ EXTERN const char *_dl_platform; EXTERN size_t _dl_platformlen; + /* Cached value of `getpagesize ()'. */ + EXTERN size_t _dl_pagesize; + /* Copy of the content of `_dl_main_searchlist' at startup time. */ EXTERN struct r_scope_elem _dl_initial_searchlist; @@ -571,9 +571,6 @@ struct rtld_global_ro /* Expected cache ID. */ EXTERN int _dl_correct_cache_id; - /* 0 if internal pointer values should not be guarded, 1 if they should. */ - EXTERN int _dl_pointer_guard; - /* Mask for hardware capabilities that are available. */ EXTERN uint64_t _dl_hwcap; @@ -657,6 +654,9 @@ struct rtld_global_ro /* List of auditing interfaces. */ struct audit_ifaces *_dl_audit; unsigned int _dl_naudit; + + /* 0 if internal pointer values should not be guarded, 1 if they should. */ + EXTERN int _dl_pointer_guard; }; # define __rtld_global_attribute__ # ifdef IS_IN_rtld @@ -1061,6 +1061,8 @@ extern struct link_map *_dl_update_slotinfo (unsigned long int req_modid); but never touch anything. Return null if it's not allocated yet. */ extern void *_dl_tls_get_addr_soft (struct link_map *l) internal_function; +extern int _dl_addr_inside_object (struct link_map *l, const ElfW(Addr) addr) + internal_function attribute_hidden; __END_DECLS |