Index: uClibc/include/elf.h =================================================================== RCS file: /var/lib/cvs/uClinux-dist/uClibc/include/elf.h,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.1.2.2 diff -u -r1.1.1.2 -r1.1.1.1.2.2 --- a/uClibc/include/elf.h 18 Apr 2004 14:13:53 -0000 1.1.1.2 +++ b/uClibc/include/elf.h 18 May 2004 09:36:55 -0000 1.1.1.1.2.2 @@ -2494,6 +2494,50 @@ #define R_V850_NUM 25 +#define R_H8_NONE 0 +#define R_H8_DIR32 1 +#define R_H8_DIR32_28 2 +#define R_H8_DIR32_24 3 +#define R_H8_DIR32_16 4 +#define R_H8_DIR32U 6 +#define R_H8_DIR32U_28 7 +#define R_H8_DIR32U_24 8 +#define R_H8_DIR32U_20 9 +#define R_H8_DIR32U_16 10 +#define R_H8_DIR24 11 +#define R_H8_DIR24_20 12 +#define R_H8_DIR24_16 13 +#define R_H8_DIR24U 14 +#define R_H8_DIR24U_20 15 +#define R_H8_DIR24U_16 16 +#define R_H8_DIR16 17 +#define R_H8_DIR16U 18 +#define R_H8_DIR16S_32 19 +#define R_H8_DIR16S_28 20 +#define R_H8_DIR16S_24 21 +#define R_H8_DIR16S_20 22 +#define R_H8_DIR16S 23 +#define R_H8_DIR8 24 +#define R_H8_DIR8U 25 +#define R_H8_DIR8Z_32 26 +#define R_H8_DIR8Z_28 27 +#define R_H8_DIR8Z_24 28 +#define R_H8_DIR8Z_20 29 +#define R_H8_DIR8Z_16 30 +#define R_H8_PCREL16 31 +#define R_H8_PCREL8 32 +#define R_H8_BPOS 33 +#define R_H8_PCREL32 34 +#define R_H8_GOT32O 35 +#define R_H8_GOT16O 36 +#define R_H8_DIR16A8 59 +#define R_H8_DIR16R8 60 +#define R_H8_DIR24A8 61 +#define R_H8_DIR24R8 62 +#define R_H8_DIR32A16 63 +#define R_H8_ABS32 65 +#define R_H8_ABS32A16 127 + __END_DECLS #endif /* elf.h */ Index: user/busybox/Makefile =================================================================== RCS file: /var/lib/cvs/uClinux-dist/user/busybox/Makefile,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 Makefile --- a/user/busybox/Makefile 18 Apr 2004 14:14:12 -0000 1.1.1.2 +++ b/user/busybox/Makefile 30 Apr 2004 04:19:07 -0000 @@ -164,7 +164,6 @@ endif OPTIMIZATIONS:=$(OPTIMIZATION) -fomit-frame-pointer - #-------------------------------------------------------- # If you're going to do a lot of builds with a non-vanilla configuration, # it makes sense to adjust parameters above, so you can type "make" Index: user/busybox/insmod.c =================================================================== RCS file: /var/lib/cvs/uClinux-dist/user/busybox/insmod.c,v retrieving revision 1.1.1.1 retrieving revision 1.4 diff -u -r1.1.1.1 -r1.4 --- a/user/busybox/insmod.c 25 Jul 2003 16:56:20 -0000 1.1.1.1 +++ b/user/busybox/insmod.c 24 May 2004 15:19:58 -0000 1.4 @@ -206,6 +206,16 @@ #endif +#if defined(__H8300H__) || defined(__H8300S__) +#define BB_USE_SINGLE + +#define MATCH_MACHINE(x) (x == EM_H8_300) +#define SHT_RELM SHT_RELA +#define Elf32_RelM Elf32_Rela + +#define ELFCLASSM ELFCLASS32 +#define SYMBOL_PREFIX "_" +#endif #ifndef SHT_RELM #error Sorry, but insmod.c does not yet support this architecture... @@ -1132,6 +1142,35 @@ *loc = v - got; break; +#elif defined(__H8300H__) || defined(__H8300S__) + case R_H8_DIR24R8: + loc = (ElfW(Addr) *)((ElfW(Addr))loc - 1); + *loc = (*loc & 0xff000000) | ((*loc & 0xffffff) + v); + break; + case R_H8_DIR24A8: + if (ELF32_R_SYM(rel->r_info)) + *loc += v; + break; + case R_H8_DIR32: + case R_H8_DIR32A16: + *loc += v; + break; + case R_H8_PCREL16: + v -= dot + 2; + if ((Elf32_Sword)v > 0x7fff || + (Elf32_Sword)v < -(Elf32_Sword)0x8000) + ret = obj_reloc_overflow; + else + *(unsigned short *)loc = v; + break; + case R_H8_PCREL8: + v -= dot + 1; + if ((Elf32_Sword)v > 0x7f || + (Elf32_Sword)v < -(Elf32_Sword)0x80) + ret = obj_reloc_overflow; + else + *(unsigned char *)loc = v; + break; #endif default: