History

Add missing relocation info for C67 target

Fill in relocs_info table for C67 and fix R_C60_NUM value to really be greater than all relocation values known to TCC.

Thomas Preud'homme committed 9 years ago

Commit ee2108d1 parent 11747fe2 files · +14 −4Browse files

Unified · Split

2 files
  1. c67-link.c +11 −1
  2. elf.h +3 −3
c67-link.c+11−1
@@ -21,7 +21,17 @@ · 20 unmodified lines
2121
2222 #include "tcc.h"
2323
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+};
2535
2636 void relocate_init(Section *sr) {}
2737
elf.h+3−3
@@ -2549,11 +2549,11 @@ typedef Elf32_Addr Elf32_Conflict; · 2548 unmodified lines
25492549 #define R_C60_RELATIVE 8 /* Adjust by program base */
25502550 #define R_C60_GOTOFF 9 /* 32 bit offset to GOT */
25512551 #define R_C60_GOTPC 10 /* 32 bit PC relative offset to GOT */
2552−/* Keep this the last entry. */
2553−#define R_C60_NUM 11
25542552
2555−#define R_C60HI16 0x55 /* high 16 bit MVKH embedded */
25562553 #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
25572557
25582558 /* IA-64 specific declarations. */
25592559

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t