summaryrefslogtreecommitdiff
path: root/sbin/modload
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-12-28 09:05:19 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-12-28 09:05:19 +0000
commit8d33036015f44a2b77b897b8f5bd2271c9ac95f9 (patch)
tree1048481f8313ee1af11931c918ada5740a6cca6f /sbin/modload
parent3a9a2ae390ad1180c88b8df627466788ef2be777 (diff)
use __LP64__; miod
Diffstat (limited to 'sbin/modload')
-rw-r--r--sbin/modload/elf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sbin/modload/elf.c b/sbin/modload/elf.c
index 00d8b4e33b6..fe223ece602 100644
--- a/sbin/modload/elf.c
+++ b/sbin/modload/elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: elf.c,v 1.6 2003/09/18 18:00:13 deraadt Exp $ */
+/* $OpenBSD: elf.c,v 1.7 2004/12/28 09:05:18 deraadt Exp $ */
/* $NetBSD: elf.c,v 1.8 2002/01/03 21:45:58 jdolecek Exp $ */
/*
@@ -31,7 +31,7 @@
#include <sys/param.h>
-#if defined(__alpha__) || defined(__arch64__) || defined(__x86_64__)
+#if defined(__LP64__)
#define ELFSIZE 64
#else
#define ELFSIZE 32
@@ -121,7 +121,7 @@ read_sections(int fd, Elf_Ehdr *ehdr, char *shstrtab, struct elf_section **head)
(u_long)sizeof(*s));
s->name = shstrtab + shdr.sh_name;
s->type = shdr.sh_type;
- s->addr = (void*)shdr.sh_addr;
+ s->addr = (void *)shdr.sh_addr;
s->offset = shdr.sh_offset;
s->size = shdr.sh_size;
s->align = shdr.sh_addralign;
@@ -270,12 +270,12 @@ elf_mod_sizes(int fd, size_t *modsize, int *strtablen,
* XXX try to get rid of the hole before the data
* section that GNU-ld likes to put there
*/
- if (strcmp(s->name, ".data") == 0 && s->addr > (void*)off) {
+ if (strcmp(s->name, ".data") == 0 && s->addr > (void *)off) {
data_offset = roundup(off, s->align);
if (debug)
fprintf(stderr, ".data section forced to "
"offset %p (was %p)\n",
- (void*)data_offset, s->addr);
+ (void *)data_offset, s->addr);
/* later remove size of compressed hole from off */
data_hole = (ssize_t)s->addr - data_offset;
}
@@ -402,7 +402,7 @@ elf_mod_load(int fd)
free_sections(head);
free(shstrtab);
- return (void*)ehdr.e_entry;
+ return (void *)ehdr.e_entry;
}
extern int devfd, modfd;