Fill in relocs_info table for C67 and fix R_C60_NUM value to really be greater than all relocation values known to TCC.
Unified · Split
| @@ -21,7 +21,17 @@ · 20 unmodified lines | |||
| 21 | 21 | ||
| 22 | #include "tcc.h" | 22 | #include "tcc.h" |
| 23 | 23 | ||
| 24 | ST_DATA struct reloc_info relocs_info[R_NUM]; | 24 | ST_DATA struct reloc_info relocs_info[R_NUM] = { |
| 25 | INIT_RELOC_INFO (R_C60_32, 0, NO_GOTPLT_ENTRY, 0) | ||
| 26 | INIT_RELOC_INFO (R_C60LO16, 0, NO_GOTPLT_ENTRY, 0) | ||
| 27 | INIT_RELOC_INFO (R_C60HI16, 0, NO_GOTPLT_ENTRY, 0) | ||
| 28 | INIT_RELOC_INFO (R_C60_GOTOFF, 0, BUILD_GOT_ONLY, 0) | ||
| 29 | INIT_RELOC_INFO (R_C60_GOTPC, 0, BUILD_GOT_ONLY, 0) | ||
| 30 | INIT_RELOC_INFO (R_C60_GOT32, 0, ALWAYS_GOTPLT_ENTRY, 0) | ||
| 31 | INIT_RELOC_INFO (R_C60_PLT32, 1, ALWAYS_GOTPLT_ENTRY, 0) | ||
| 32 | INIT_RELOC_INFO (R_C60_GLOB_DAT, 0, NO_GOTPLT_ENTRY, 0) | ||
| 33 | INIT_RELOC_INFO (R_C60_JMP_SLOT, 1, NO_GOTPLT_ENTRY, 0) | ||
| 34 | }; | ||
| 25 | 35 | ||
| 26 | void relocate_init(Section *sr) {} | 36 | void relocate_init(Section *sr) {} |
| 27 | 37 | ||
| @@ -2549,11 +2549,11 @@ typedef Elf32_Addr Elf32_Conflict; · 2548 unmodified lines | |||
| 2549 | #define R_C60_RELATIVE 8 /* Adjust by program base */ | 2549 | #define R_C60_RELATIVE 8 /* Adjust by program base */ |
| 2550 | #define R_C60_GOTOFF 9 /* 32 bit offset to GOT */ | 2550 | #define R_C60_GOTOFF 9 /* 32 bit offset to GOT */ |
| 2551 | #define R_C60_GOTPC 10 /* 32 bit PC relative offset to GOT */ | 2551 | #define R_C60_GOTPC 10 /* 32 bit PC relative offset to GOT */ |
| 2552 | /* Keep this the last entry. */ | ||
| 2553 | #define R_C60_NUM 11 | ||
| 2554 | 2552 | ||
| 2555 | #define R_C60HI16 0x55 /* high 16 bit MVKH embedded */ | ||
| 2556 | #define R_C60LO16 0x54 /* low 16 bit MVKL embedded */ | 2553 | #define R_C60LO16 0x54 /* low 16 bit MVKL embedded */ |
| 2554 | #define R_C60HI16 0x55 /* high 16 bit MVKH embedded */ | ||
| 2555 | /* Keep this the last entry. */ | ||
| 2556 | #define R_C60_NUM 0x56 | ||
| 2557 | 2557 | ||
| 2558 | /* IA-64 specific declarations. */ | 2558 | /* IA-64 specific declarations. */ |
| 2559 | 2559 | ||