aboutsummaryrefslogtreecommitdiff
path: root/src/libmach/crackelf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libmach/crackelf.c')
-rw-r--r--src/libmach/crackelf.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libmach/crackelf.c b/src/libmach/crackelf.c
index e80d9ec3..22f4307e 100644
--- a/src/libmach/crackelf.c
+++ b/src/libmach/crackelf.c
@@ -4,7 +4,7 @@
#include "elf.h"
#include "dwarf.h"
-static int mapelf(Fhdr *fp, ulong base, Map *map, Regs**);
+static int mapelf(Fhdr *fp, u64int base, Map *map, Regs**);
static int unpacknote(Elf *elf, uchar *a, uchar *ea, ElfNote *note, uchar **pa);
static struct
@@ -21,6 +21,7 @@ static struct
ElfMachArm, MARM, nil, "arm",
ElfMachPower, MPOWER, nil, "powerpc",
ElfMachPower64, MNONE, nil, "powerpc64",
+ ElfMachAmd64, MAMD64, &machamd64, "amd64",
};
static struct
@@ -44,7 +45,8 @@ static struct
{ /* Font Tab 4 */
M386, ALINUX, elfcorelinux386,
M386, ANONE, elfcorelinux386, /* [sic] */
-/* M386, AFREEBSD, elfcorefreebsd386, */
+// M386, AFREEBSD, elfcorefreebsd386,
+ MAMD64, AFREEBSD, elfcorefreebsdamd64,
};
int
@@ -202,13 +204,13 @@ err:
}
static int
-mapelf(Fhdr *fp, ulong base, Map *map, Regs **regs)
+mapelf(Fhdr *fp, u64int base, Map *map, Regs **regs)
{
int i;
Elf *elf;
ElfProg *p;
- ulong sz;
- ulong lim;
+ u64int sz;
+ u64int lim;
Seg s;
elf = fp->elf;