aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2005-12-30 22:13:59 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2005-12-30 22:13:59 +0000
commit46e815f309dc7b132deb81c163f64bfe114a9384 (patch)
treebd6474c3370d22333b5abef4a29490af63b9b87a /libexec
parent66e1bac2420824bcf8f24a2b8e752b6dc63ed8bb (diff)
Notes
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-elf/alpha/reloc.c4
-rw-r--r--libexec/rtld-elf/amd64/reloc.c4
-rw-r--r--libexec/rtld-elf/ia64/reloc.c4
-rw-r--r--libexec/rtld-elf/rtld.c2
-rw-r--r--libexec/rtld-elf/rtld.h4
-rw-r--r--libexec/rtld-elf/sparc64/reloc.c16
6 files changed, 17 insertions, 17 deletions
diff --git a/libexec/rtld-elf/alpha/reloc.c b/libexec/rtld-elf/alpha/reloc.c
index 74aaf9cfa8ac..e1ed135bf684 100644
--- a/libexec/rtld-elf/alpha/reloc.c
+++ b/libexec/rtld-elf/alpha/reloc.c
@@ -135,9 +135,9 @@ reloc_non_plt_obj(Obj_Entry *obj_rtld, Obj_Entry *obj, const Elf_Rela *rela,
break;
default:
- _rtld_error("%s: Unsupported relocation type %d"
+ _rtld_error("%s: Unsupported relocation type %u"
" in non-PLT relocations\n", obj->path,
- ELF_R_TYPE(rela->r_info));
+ (unsigned int)ELF_R_TYPE(rela->r_info));
return -1;
}
return(0);
diff --git a/libexec/rtld-elf/amd64/reloc.c b/libexec/rtld-elf/amd64/reloc.c
index 985b4818500d..72977d68dd92 100644
--- a/libexec/rtld-elf/amd64/reloc.c
+++ b/libexec/rtld-elf/amd64/reloc.c
@@ -312,9 +312,9 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld)
/* missing: R_X86_64_GOTPCREL, R_X86_64_32, R_X86_64_32S, R_X86_64_16, R_X86_64_PC16, R_X86_64_8, R_X86_64_PC8 */
default:
- _rtld_error("%s: Unsupported relocation type %d"
+ _rtld_error("%s: Unsupported relocation type %u"
" in non-PLT relocations\n", obj->path,
- ELF_R_TYPE(rela->r_info));
+ (unsigned int)ELF_R_TYPE(rela->r_info));
goto done;
}
}
diff --git a/libexec/rtld-elf/ia64/reloc.c b/libexec/rtld-elf/ia64/reloc.c
index d71829371457..0c1621af94d2 100644
--- a/libexec/rtld-elf/ia64/reloc.c
+++ b/libexec/rtld-elf/ia64/reloc.c
@@ -318,9 +318,9 @@ reloc_non_plt_obj(Obj_Entry *obj_rtld, Obj_Entry *obj, const Elf_Rela *rela,
break;
default:
- _rtld_error("%s: Unsupported relocation type %d"
+ _rtld_error("%s: Unsupported relocation type %u"
" in non-PLT relocations\n", obj->path,
- ELF_R_TYPE(rela->r_info));
+ (unsigned int)ELF_R_TYPE(rela->r_info));
return -1;
}
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 244b5db9b372..ca538d5fa6dc 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -449,7 +449,7 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp)
}
Elf_Addr
-_rtld_bind(Obj_Entry *obj, Elf_Word reloff)
+_rtld_bind(Obj_Entry *obj, Elf_Size reloff)
{
const Elf_Rel *rel;
const Elf_Sym *def;
diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h
index bee36aff1e70..28fe510c46be 100644
--- a/libexec/rtld-elf/rtld.h
+++ b/libexec/rtld-elf/rtld.h
@@ -122,8 +122,8 @@ typedef struct Struct_Obj_Entry {
* These two items have to be set right for compatibility with the
* original ElfKit crt1.o.
*/
- Elf_Word magic; /* Magic number (sanity check) */
- Elf_Word version; /* Version number of struct format */
+ Elf_Size magic; /* Magic number (sanity check) */
+ Elf_Size version; /* Version number of struct format */
struct Struct_Obj_Entry *next;
char *path; /* Pathname of underlying file (%) */
diff --git a/libexec/rtld-elf/sparc64/reloc.c b/libexec/rtld-elf/sparc64/reloc.c
index acc6701bcbe0..4e66211fc553 100644
--- a/libexec/rtld-elf/sparc64/reloc.c
+++ b/libexec/rtld-elf/sparc64/reloc.c
@@ -193,7 +193,7 @@ static long reloc_target_bitmask[] = {
static int reloc_nonplt_object(Obj_Entry *obj, const Elf_Rela *rela,
SymCache *cache);
-static void install_plt(Elf_Half *pltgot, Elf_Addr proc);
+static void install_plt(Elf_Word *pltgot, Elf_Addr proc);
extern char _rtld_bind_start_0[];
extern char _rtld_bind_start_1[];
@@ -280,13 +280,13 @@ reloc_nonplt_object(Obj_Entry *obj, const Elf_Rela *rela, SymCache *cache)
const Obj_Entry *defobj;
const Elf_Sym *def;
Elf_Addr *where;
- Elf_Half *where32;
+ Elf_Word *where32;
Elf_Word type;
Elf_Addr value;
Elf_Addr mask;
where = (Elf_Addr *)(obj->relocbase + rela->r_offset);
- where32 = (Elf_Half *)where;
+ where32 = (Elf_Word *)where;
defobj = NULL;
def = NULL;
@@ -468,7 +468,7 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *obj,
{
const Elf_Rela *rela = (const Elf_Rela *)rel;
Elf_Addr offset;
- Elf_Half *where;
+ Elf_Word *where;
if (rela - refobj->pltrela < 32764) {
/*
@@ -496,7 +496,7 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *obj,
* have a choice of several different relocation techniques
* which are increasingly expensive.
*/
- where = (Elf_Half *)wherep;
+ where = (Elf_Word *)wherep;
offset = ((Elf_Addr)where) - target;
if (offset <= (1L<<20) && offset >= -(1L<<20)) {
/*
@@ -687,10 +687,10 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr target, const Obj_Entry *obj,
void
init_pltgot(Obj_Entry *obj)
{
- Elf_Half *entry;
+ Elf_Word *entry;
if (obj->pltgot != NULL) {
- entry = (Elf_Half *)obj->pltgot;
+ entry = (Elf_Word *)obj->pltgot;
install_plt(&entry[0], (Elf_Addr)_rtld_bind_start_0);
install_plt(&entry[8], (Elf_Addr)_rtld_bind_start_1);
obj->pltgot[8] = (Elf_Addr)obj;
@@ -698,7 +698,7 @@ init_pltgot(Obj_Entry *obj)
}
static void
-install_plt(Elf_Half *pltgot, Elf_Addr proc)
+install_plt(Elf_Word *pltgot, Elf_Addr proc)
{
pltgot[0] = SAVE;
flush(pltgot, 0);