summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ldso/include/dl-hash.h17
-rw-r--r--ldso/ldso/dl-elf.c2
-rw-r--r--ldso/ldso/dl-hash.c6
-rw-r--r--ldso/ldso/ldso.c8
4 files changed, 14 insertions, 19 deletions
diff --git a/ldso/include/dl-hash.h b/ldso/include/dl-hash.h
index b12b36f3b..ad5c16318 100644
--- a/ldso/include/dl-hash.h
+++ b/ldso/include/dl-hash.h
@@ -1,6 +1,6 @@
/* vi: set sw=4 ts=4: */
/*
- * Copyright (C) 2000-2005 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 by Erik Andersen <andersen@codepoet.org>
*
* GNU Lesser General Public License version 2.1 or later.
*/
@@ -17,7 +17,7 @@ struct init_fini {
unsigned long nlist; /* Number of entries in init_fini */
};
-struct dyn_elf{
+struct dyn_elf {
struct elf_resolve * dyn;
struct dyn_elf * next_handle; /* Used by dlopen et al. */
struct init_fini init_fini;
@@ -25,7 +25,7 @@ struct dyn_elf{
struct dyn_elf * prev;
};
-struct elf_resolve{
+struct elf_resolve {
/* These entries must be in this order to be compatible with the interface used
by gdb to obtain the list of symbols. */
ElfW(Addr) loadaddr; /* Base address shared object is loaded at. */
@@ -76,11 +76,11 @@ extern struct dyn_elf * _dl_symbol_tables;
extern struct elf_resolve * _dl_loaded_modules;
extern struct dyn_elf * _dl_handles;
-extern struct elf_resolve * _dl_add_elf_hash_table(const char * libname,
- char * loadaddr, unsigned long * dynamic_info,
+extern struct elf_resolve * _dl_add_elf_hash_table(const char * libname,
+ ElfW(Addr) loadaddr, unsigned long * dynamic_info,
unsigned long dynamic_addr, unsigned long dynamic_size);
-extern char * _dl_find_hash(const char * name, struct dyn_elf * rpnt1,
+extern char * _dl_find_hash(const char * name, struct dyn_elf * rpnt1,
struct elf_resolve *mytpnt, int type_class);
extern int _dl_linux_dynamic_link(void);
@@ -95,7 +95,6 @@ static inline int _dl_symbol(char * name)
return 1;
}
-
#define LD_ERROR_NOFILE 1
#define LD_ERROR_NOZERO 2
#define LD_ERROR_NOTELF 3
@@ -107,8 +106,4 @@ static inline int _dl_symbol(char * name)
#define LD_BAD_HANDLE 9
#define LD_NO_SYMBOL 10
-
-
#endif /* _LD_HASH_H_ */
-
-
diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c
index d0ea4dac7..9c5b3b4fb 100644
--- a/ldso/ldso/dl-elf.c
+++ b/ldso/ldso/dl-elf.c
@@ -588,7 +588,7 @@ struct elf_resolve *_dl_load_elf_shared_library(int secure,
#endif
}
- tpnt = _dl_add_elf_hash_table(libname, (char *) libaddr, dynamic_info,
+ tpnt = _dl_add_elf_hash_table(libname, libaddr, dynamic_info,
dynamic_addr, 0);
tpnt->relro_addr = relro_addr;
tpnt->relro_size = relro_size;
diff --git a/ldso/ldso/dl-hash.c b/ldso/ldso/dl-hash.c
index ed55031ed..be702be50 100644
--- a/ldso/ldso/dl-hash.c
+++ b/ldso/ldso/dl-hash.c
@@ -4,7 +4,7 @@
* after resolving ELF shared library symbols
*
* Copyright (C) 2004 by Joakim Tjernlund <joakim.tjernlund@lumentis.se>
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 by Erik Andersen <andersen@codepoet.org>
* Copyright (c) 1994-2000 Eric Youngdale, Peter MacDonald,
* David Engel, Hongjiu Lu and Mitch D'Souza
*
@@ -83,7 +83,7 @@ static inline Elf_Symndx _dl_elf_hash(const char *name)
* externals properly.
*/
struct elf_resolve *_dl_add_elf_hash_table(const char *libname,
- char *loadaddr, unsigned long *dynamic_info, unsigned long dynamic_addr,
+ ElfW(Addr) loadaddr, unsigned long *dynamic_info, unsigned long dynamic_addr,
attribute_unused unsigned long dynamic_size)
{
Elf_Symndx *hash_addr;
@@ -117,7 +117,7 @@ struct elf_resolve *_dl_add_elf_hash_table(const char *libname,
hash_addr += tpnt->nbucket;
tpnt->chains = hash_addr;
}
- tpnt->loadaddr = (ElfW(Addr))loadaddr;
+ tpnt->loadaddr = loadaddr;
for (i = 0; i < DYNAMIC_SIZE; i++)
tpnt->dynamic_info[i] = dynamic_info[i];
return tpnt;
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index 2234623e3..4fe2bd1cb 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -4,7 +4,7 @@
* after resolving ELF shared library symbols
*
* Copyright (C) 2005 by Joakim Tjernlund
- * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org>
+ * Copyright (C) 2000-2006 by Erik Andersen <andersen@codepoet.org>
* Copyright (c) 1994-2000 Eric Youngdale, Peter MacDonald,
* David Engel, Hongjiu Lu and Mitch D'Souza
*
@@ -173,7 +173,7 @@ static void __attribute__ ((destructor)) __attribute_used__ _dl_fini(void)
}
}
-void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr,
+void _dl_get_ready_to_run(struct elf_resolve *tpnt, ElfW(Addr) load_addr,
ElfW(auxv_t) auxvt[AT_EGID + 1], char **envp,
char **argv)
{
@@ -346,7 +346,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr,
continue;
#endif
/* OK, we have what we need - slip this one into the list. */
- app_tpnt = _dl_add_elf_hash_table(_dl_progname, (char *)app_tpnt->loadaddr,
+ app_tpnt = _dl_add_elf_hash_table(_dl_progname, app_tpnt->loadaddr,
app_tpnt->dynamic_info, ppnt->p_vaddr + app_tpnt->loadaddr, ppnt->p_filesz);
_dl_loaded_modules->libtype = elf_executable;
_dl_loaded_modules->ppnt = (ElfW(Phdr) *) auxvt[AT_PHDR].a_un.a_val;
@@ -718,7 +718,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr,
ElfW(Phdr) *myppnt = (ElfW(Phdr) *) (load_addr + epnt->e_phoff);
int j;
- tpnt = _dl_add_elf_hash_table(tpnt->libname, (char *)load_addr,
+ tpnt = _dl_add_elf_hash_table(tpnt->libname, load_addr,
tpnt->dynamic_info,
(unsigned long)tpnt->dynamic_addr,
0);