From 6d93c360042c6c748fc090561c479d1b7bb6d742 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 14 Nov 1995 22:20:12 +0000 Subject: [PATCH] * dlltool.c (fill_ordinals): Correct memset call. --- binutils/ChangeLog | 4 ++++ binutils/dlltool.c | 25 ++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 58dac2571da..025cf41286d 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +Tue Nov 14 17:19:11 1995 Ian Lance Taylor + + * dlltool.c (fill_ordinals): Correct memset call. + Sun Nov 12 12:56:05 1995 Stan Shebs * mpw-make.sed (DEMANGLER_PROG): Edit out attempts to do anything diff --git a/binutils/dlltool.c b/binutils/dlltool.c index 8a1e1027514..421675a5d23 100644 --- a/binutils/dlltool.c +++ b/binutils/dlltool.c @@ -214,6 +214,7 @@ int killat; static int verbose; FILE *output_def; FILE *base_file; + #ifdef DLLTOOL_ARM static char *mname = "arm"; #endif @@ -221,6 +222,11 @@ static char *mname = "arm"; #ifdef DLLTOOL_I386 static char *mname = "i386"; #endif + +#ifdef DLLTOOL_PPC +static char *mname = "ppc"; +#endif + #define PATHMAX 250 /* What's the right name for this ? */ /* This bit of assemly does jmp * .... @@ -231,6 +237,11 @@ unsigned char i386_jtab[] = { 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90}; unsigned char arm_jtab[] = { 0x00, 0xc0, 0x9f, 0xe5, 0x00, 0xf0, 0x9c, 0xe5, 0, 0, 0, 0}; +/* If I understand what is going on here, this will need more for ppc + support, but this lets the program start. Kim Knuttila (krk@cygnus.com) */ + +unsigned char ppc_jtab[] = { 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90}; + char outfile[PATHMAX]; struct mac { @@ -268,6 +279,12 @@ mtable[] i386_jtab,sizeof(i386_jtab),2, } , + { +#define MPPC 2 + "ppc", ".byte", ".short", ".long", ".asciz", "#", "jmp *", ".global", ".space", ".align\t2",".align\t4","pe-powerpcle",bfd_arch_powerpc, + ppc_jtab,sizeof(ppc_jtab),2, + } + , { 0} }; @@ -282,6 +299,8 @@ rvaafter (machine) return ""; case M386: return ""; + case MPPC: + return ""; } return ""; } @@ -296,6 +315,8 @@ rvabefore (machine) return ".rva\t"; case M386: return ".rva\t"; + case MPPC: + return ".rva\t"; } return ""; } @@ -310,6 +331,8 @@ int machine; return ""; case M386: return "_"; + case MPPC: + return ""; } return ""; } @@ -1694,7 +1717,7 @@ fill_ordinals (d_export_vec) ptr = (char *) malloc (65536); - memset (ptr, 65536, 0); + memset (ptr, 0, 65536); /* Mark in our large vector all the numbers that are taken */ for (i = 0; i < d_nfuncs; i++) -- 2.30.2