From 0a081d09f4f7db02d1baa4889eb218e2eff4097a Mon Sep 17 00:00:00 2001 From: marcel Date: Sun, 18 Dec 2005 04:52:37 +0000 Subject: Make our ELF64 type definitions match standards. In particular this means: o Remove Elf64_Quarter, o Redefine Elf64_Half to be 16-bit, o Redefine Elf64_Word to be 32-bit, o Add Elf64_Xword and Elf64_Sxword for 64-bit entities, o Use Elf_Size in MI code to abstract the difference between Elf32_Word and Elf64_Word. o Add Elf_Ssize as the signed counterpart of Elf_Size. MFC after: 2 weeks --- usr.sbin/crunch/crunchide/exec_elf32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'usr.sbin/crunch/crunchide') diff --git a/usr.sbin/crunch/crunchide/exec_elf32.c b/usr.sbin/crunch/crunchide/exec_elf32.c index 5558b1c..25207d2 100644 --- a/usr.sbin/crunch/crunchide/exec_elf32.c +++ b/usr.sbin/crunch/crunchide/exec_elf32.c @@ -192,7 +192,7 @@ ELFNAMEEND(hide)(int fd, const char *fn) Elf_Shdr *shdrp = NULL, *symtabshdr, *strtabshdr; Elf_Sym *symtabp = NULL; char *strtabp = NULL; - Elf_Word *symfwmap = NULL, *symrvmap = NULL, nsyms, nlocalsyms, ewi; + Elf_Size *symfwmap = NULL, *symrvmap = NULL, nsyms, nlocalsyms, ewi; struct listelem *relalist = NULL, *rellist = NULL, *tmpl; ssize_t shdrsize; int rv, i, weird; @@ -295,10 +295,10 @@ ELFNAMEEND(hide)(int fd, const char *fn) /* Prepare data structures for symbol movement. */ nsyms = xewtoh(symtabshdr->sh_size) / xewtoh(symtabshdr->sh_entsize); nlocalsyms = xe32toh(symtabshdr->sh_info); - if ((symfwmap = xmalloc(nsyms * sizeof (Elf_Word), fn, + if ((symfwmap = xmalloc(nsyms * sizeof (Elf_Size), fn, "symbol forward mapping table")) == NULL) goto bad; - if ((symrvmap = xmalloc(nsyms * sizeof (Elf_Word), fn, + if ((symrvmap = xmalloc(nsyms * sizeof (Elf_Size), fn, "symbol reverse mapping table")) == NULL) goto bad; @@ -309,7 +309,7 @@ ELFNAMEEND(hide)(int fd, const char *fn) /* move symbols, making them local */ for (ewi = nlocalsyms; ewi < nsyms; ewi++) { Elf_Sym *sp, symswap; - Elf_Word mapswap; + Elf_Size mapswap; sp = &symtabp[ewi]; -- cgit v1.1