mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-29 06:42:03 +03:00
Update.
* sysdeps/generic/ldsodefs.h: Add declaration for _dl_all_dirs and _dl_all_init_dirs. * include/link.h (struct r_search_path_struct): New. (struct link_map): Use it for l_rpath_dirs and l_runpath_dirs. * elf/Versions [ld] (GLIBC_2.2): Add _dl_all_dirs and _dl_all_init_dirs. * elf/dl-close.c (_dl_close): Free l_rpath_dirs and l_runpath_dirs. * elf/dl-libc.c (free_mem): Free _dl_all_dirs list except elements added at startup time. * elf/dl-load.c: Fix memory handling. r_search_path_struct contains element to remember fact that we can free memory. (all_dirs): Renamed to _dl_all_dirs. Made global. (_dl_init_all_dirs): New variable. (fillin_rpath): Save one malloc call. (decompose_rpath): Change interface. New first parameter points to r_search_path_struct. (_dl_init_paths): Adjust for changes. Mark all memory as not deletable. Set _dl_init_all_paths value. (open_path): Remove may_free_dirs parameter. r_search_path_elem *** parameter replaced with r_search_path_struct *. Information about freeing now contained in r_search_path_struct. (_dl_map_object): Adjust for above changes. * elf/dl-open.c (dl_open_worker): Change format of debug info a bit.
This commit is contained in:
@@ -101,6 +101,14 @@ struct r_scope_elem
|
||||
};
|
||||
|
||||
|
||||
/* Structure to record search path and allocation mechanism. */
|
||||
struct r_search_path_struct
|
||||
{
|
||||
struct r_search_path_elem **dirs;
|
||||
int malloced;
|
||||
};
|
||||
|
||||
|
||||
/* Structure describing a loaded shared object. The `l_next' and `l_prev'
|
||||
members form a chain of all the shared objects loaded at startup.
|
||||
|
||||
@@ -176,7 +184,7 @@ struct link_map
|
||||
struct r_found_version *l_versions;
|
||||
|
||||
/* Collected information about own RPATH directories. */
|
||||
struct r_search_path_elem **l_rpath_dirs;
|
||||
struct r_search_path_struct l_rpath_dirs;
|
||||
|
||||
/* Collected results of relocation while profiling. */
|
||||
ElfW(Addr) *l_reloc_result;
|
||||
@@ -205,7 +213,7 @@ struct link_map
|
||||
ino64_t l_ino;
|
||||
|
||||
/* Collected information about own RUNPATH directories. */
|
||||
struct r_search_path_elem **l_runpath_dirs;
|
||||
struct r_search_path_struct l_runpath_dirs;
|
||||
|
||||
/* List of object in order of the init and fini calls. */
|
||||
struct link_map **l_initfini;
|
||||
|
Reference in New Issue
Block a user