summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/dl-hash.c2
-rw-r--r--ldso/ldso/i386/dl-startup.h4
-rw-r--r--ldso/ldso/ldso.c9
-rw-r--r--ldso/libdl/libdl.c12
4 files changed, 13 insertions, 14 deletions
diff --git a/ldso/ldso/dl-hash.c b/ldso/ldso/dl-hash.c
index 2247207a6..ed55031ed 100644
--- a/ldso/ldso/dl-hash.c
+++ b/ldso/ldso/dl-hash.c
@@ -84,7 +84,7 @@ static inline Elf_Symndx _dl_elf_hash(const char *name)
*/
struct elf_resolve *_dl_add_elf_hash_table(const char *libname,
char *loadaddr, unsigned long *dynamic_info, unsigned long dynamic_addr,
- unsigned long dynamic_size)
+ attribute_unused unsigned long dynamic_size)
{
Elf_Symndx *hash_addr;
struct elf_resolve *tpnt;
diff --git a/ldso/ldso/i386/dl-startup.h b/ldso/ldso/i386/dl-startup.h
index 95609bbb3..cfa412621 100644
--- a/ldso/ldso/i386/dl-startup.h
+++ b/ldso/ldso/i386/dl-startup.h
@@ -41,9 +41,9 @@ asm(
#define GET_ARGV(ARGVP, ARGS) ARGVP = (((unsigned long*) & ARGS)+1)
/* Handle relocation of the symbols in the dynamic loader. */
-static inline
+static __always_inline
void PERFORM_BOOTSTRAP_RELOC(ELF_RELOC *rpnt, unsigned long *reloc_addr,
- unsigned long symbol_addr, unsigned long load_addr, Elf32_Sym *symtab)
+ unsigned long symbol_addr, unsigned long load_addr, attribute_unused Elf32_Sym *symtab)
{
switch (ELF32_R_TYPE(rpnt->r_info))
{
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c
index 65295a2f1..fe4c46726 100644
--- a/ldso/ldso/ldso.c
+++ b/ldso/ldso/ldso.c
@@ -122,7 +122,8 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr,
ElfW(Phdr) *ppnt;
ElfW(Dyn) *dpnt;
char *lpntstr;
- int i, unlazy = 0, trace_loaded_objects = 0;
+ unsigned int i;
+ int unlazy = 0, trace_loaded_objects = 0;
struct dyn_elf *rpnt;
struct elf_resolve *tcurr;
struct elf_resolve *tpnt1;
@@ -178,8 +179,8 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr,
* Note that for SUID programs we ignore the settings in
* LD_LIBRARY_PATH.
*/
- if ((auxvt[AT_UID].a_un.a_val == -1 && _dl_suid_ok()) ||
- (auxvt[AT_UID].a_un.a_val != -1 &&
+ if ((auxvt[AT_UID].a_un.a_val == (size_t)-1 && _dl_suid_ok()) ||
+ (auxvt[AT_UID].a_un.a_val != (size_t)-1 &&
auxvt[AT_UID].a_un.a_val == auxvt[AT_EUID].a_un.a_val &&
auxvt[AT_GID].a_un.a_val == auxvt[AT_EGID].a_un.a_val)) {
_dl_secure = 0;
@@ -227,7 +228,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, unsigned long load_addr,
* different from what the ELF header says for ET_DYN/PIE executables.
*/
{
- int i;
+ unsigned int i;
ElfW(Phdr) *ppnt = (ElfW(Phdr) *) auxvt[AT_PHDR].a_un.a_val;
for (i = 0; i < auxvt[AT_PHNUM].a_un.a_val; i++, ppnt++)
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
index 477ec423a..72e8f52dc 100644
--- a/ldso/libdl/libdl.c
+++ b/ldso/libdl/libdl.c
@@ -144,7 +144,7 @@ void *dlopen(const char *libname, int flag)
void (*dl_brk) (void);
int now_flag;
struct init_fini_list *tmp, *runp, *runp2, *dep_list;
- int nlist, i;
+ unsigned int nlist, i;
struct elf_resolve **init_fini_list;
/* A bit of sanity checking... */
@@ -297,7 +297,7 @@ void *dlopen(const char *libname, int flag)
}
/* Sort the INIT/FINI list in dependency order. */
for (runp2 = dep_list; runp2; runp2 = runp2->next) {
- int j, k;
+ unsigned int j, k;
for (j = 0; init_fini_list[j] != runp2->tpnt; ++j)
/* Empty */;
for (k = j + 1; k < nlist; ++k) {
@@ -468,7 +468,7 @@ static int do_dlclose(void *vhandle, int need_fini)
void (*dl_brk) (void);
struct dyn_elf *handle;
unsigned int end;
- int i = 0, j;
+ unsigned int i, j;
handle = (struct dyn_elf *) vhandle;
if (handle == _dl_symbol_tables)
@@ -669,16 +669,14 @@ int dladdr(const void *__address, Dl_info * __info)
{
char *strtab;
ElfW(Sym) *symtab;
- int hn, si;
- int sf;
- int sn = 0;
+ unsigned int hn, si, sn, sf;
ElfW(Addr) sa;
sa = 0;
symtab = (ElfW(Sym) *) (pelf->dynamic_info[DT_SYMTAB]);
strtab = (char *) (pelf->dynamic_info[DT_STRTAB]);
- sf = 0;
+ sf = sn = 0;
for (hn = 0; hn < pelf->nbucket; hn++) {
for (si = pelf->elf_buckets[hn]; si; si = pelf->chains[si]) {
ElfW(Addr) symbol_addr;