#ifndef MODUTILS_MODULE_H
static const int MODUTILS_MODULE_H = 1;
-#ident "$Id: insmod.c,v 1.65 2001/05/24 14:16:28 andersen Exp $"
+#ident "$Id: insmod.c,v 1.66 2001/06/19 15:00:52 andersen Exp $"
/* This file contains the structures used by the 2.0 and 2.1 kernels.
We do not use the kernel headers directly because we do not wish
#ifndef MODUTILS_OBJ_H
static const int MODUTILS_OBJ_H = 1;
-#ident "$Id: insmod.c,v 1.65 2001/05/24 14:16:28 andersen Exp $"
+#ident "$Id: insmod.c,v 1.66 2001/06/19 15:00:52 andersen Exp $"
/* The relocatable object is manipulated using elfin types. */
#define ELFCLASSM ELFCLASS32
-#if (defined(__m68k__))
+#if (defined(__mc68000__))
#define ELFDATAM ELFDATA2MSB
#endif
#define Elf32_RelM Elf32_Rel
#define ELFDATAM ELFDATA2LSB
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
#define MATCH_MACHINE(x) (x == EM_68K)
#define SHT_RELM SHT_RELA
case R_ARM_NONE:
#elif defined(__i386__)
case R_386_NONE:
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_NONE:
#elif defined(__powerpc__)
case R_PPC_NONE:
case R_ARM_ABS32:
#elif defined(__i386__)
case R_386_32:
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_32:
#elif defined(__powerpc__)
case R_PPC_ADDR32:
#endif
*loc += v;
break;
-#if defined(__m68k__)
+#if defined(__mc68000__)
case R_68K_8:
if (v > 0xff)
ret = obj_reloc_overflow;
ret = obj_reloc_overflow;
*(short *)loc = v;
break;
-#endif /* __m68k__ */
+#endif /* __mc68000__ */
#if defined(__powerpc__)
case R_PPC_ADDR16_HA:
case R_386_PC32:
*loc += v - dot;
break;
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_PC8:
v -= dot;
if ((Elf32_Sword)v > 0x7f || (Elf32_Sword)v < -(Elf32_Sword)0x80)
case R_386_JMP_SLOT:
*loc = v;
break;
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_GLOB_DAT:
case R_68K_JMP_SLOT:
*loc = v;
case R_386_RELATIVE:
*loc += f->baseaddr;
break;
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_RELATIVE:
*(int *)loc += f->baseaddr;
break;
case R_ARM_GOT32:
#elif defined(__i386__)
case R_386_GOT32:
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_GOT32:
#endif
assert(isym != NULL);
/* make the reloc with_respect_to_.got */
#if defined(__sh__)
*loc += isym->gotent.offset + rel->r_addend;
-#elif defined(__i386__) || defined(__arm__) || defined(__m68k__)
+#elif defined(__i386__) || defined(__arm__) || defined(__mc68000__)
*loc += isym->gotent.offset;
#endif
break;
/* address relative to the got */
-#if !defined(__m68k__)
+#if !defined(__mc68000__)
#if defined(__sh__)
case R_SH_GOTOFF:
#elif defined(__arm__)
case R_ARM_GOTOFF:
#elif defined(__i386__)
case R_386_GOTOFF:
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_GOTOFF:
#endif
assert(got != 0);
*loc += v - got;
break;
-#endif // __m68k__
+#endif // __mc68000__
#endif /* BB_USE_GOT_ENTRIES */
#elif defined(__i386__)
case R_386_GOT32:
break;
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_GOT32:
break;
#endif
#ifndef MODUTILS_MODULE_H
static const int MODUTILS_MODULE_H = 1;
-#ident "$Id: insmod.c,v 1.65 2001/05/24 14:16:28 andersen Exp $"
+#ident "$Id: insmod.c,v 1.66 2001/06/19 15:00:52 andersen Exp $"
/* This file contains the structures used by the 2.0 and 2.1 kernels.
We do not use the kernel headers directly because we do not wish
#ifndef MODUTILS_OBJ_H
static const int MODUTILS_OBJ_H = 1;
-#ident "$Id: insmod.c,v 1.65 2001/05/24 14:16:28 andersen Exp $"
+#ident "$Id: insmod.c,v 1.66 2001/06/19 15:00:52 andersen Exp $"
/* The relocatable object is manipulated using elfin types. */
#define ELFCLASSM ELFCLASS32
-#if (defined(__m68k__))
+#if (defined(__mc68000__))
#define ELFDATAM ELFDATA2MSB
#endif
#define Elf32_RelM Elf32_Rel
#define ELFDATAM ELFDATA2LSB
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
#define MATCH_MACHINE(x) (x == EM_68K)
#define SHT_RELM SHT_RELA
case R_ARM_NONE:
#elif defined(__i386__)
case R_386_NONE:
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_NONE:
#elif defined(__powerpc__)
case R_PPC_NONE:
case R_ARM_ABS32:
#elif defined(__i386__)
case R_386_32:
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_32:
#elif defined(__powerpc__)
case R_PPC_ADDR32:
#endif
*loc += v;
break;
-#if defined(__m68k__)
+#if defined(__mc68000__)
case R_68K_8:
if (v > 0xff)
ret = obj_reloc_overflow;
ret = obj_reloc_overflow;
*(short *)loc = v;
break;
-#endif /* __m68k__ */
+#endif /* __mc68000__ */
#if defined(__powerpc__)
case R_PPC_ADDR16_HA:
case R_386_PC32:
*loc += v - dot;
break;
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_PC8:
v -= dot;
if ((Elf32_Sword)v > 0x7f || (Elf32_Sword)v < -(Elf32_Sword)0x80)
case R_386_JMP_SLOT:
*loc = v;
break;
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_GLOB_DAT:
case R_68K_JMP_SLOT:
*loc = v;
case R_386_RELATIVE:
*loc += f->baseaddr;
break;
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_RELATIVE:
*(int *)loc += f->baseaddr;
break;
case R_ARM_GOT32:
#elif defined(__i386__)
case R_386_GOT32:
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_GOT32:
#endif
assert(isym != NULL);
/* make the reloc with_respect_to_.got */
#if defined(__sh__)
*loc += isym->gotent.offset + rel->r_addend;
-#elif defined(__i386__) || defined(__arm__) || defined(__m68k__)
+#elif defined(__i386__) || defined(__arm__) || defined(__mc68000__)
*loc += isym->gotent.offset;
#endif
break;
/* address relative to the got */
-#if !defined(__m68k__)
+#if !defined(__mc68000__)
#if defined(__sh__)
case R_SH_GOTOFF:
#elif defined(__arm__)
case R_ARM_GOTOFF:
#elif defined(__i386__)
case R_386_GOTOFF:
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_GOTOFF:
#endif
assert(got != 0);
*loc += v - got;
break;
-#endif // __m68k__
+#endif // __mc68000__
#endif /* BB_USE_GOT_ENTRIES */
#elif defined(__i386__)
case R_386_GOT32:
break;
-#elif defined(__m68k__)
+#elif defined(__mc68000__)
case R_68K_GOT32:
break;
#endif