mirror of
https://github.com/frida/tinycc
synced 2025-01-03 02:24:24 +03:00
Remove now useless pltoff_addend reloc info
Last use for pltoff_addend field of relocs_info array was removed in
commit 25927df3b7
. It is now useless so
this commit removes it and all initialization related to it.
This commit is contained in:
parent
ee2108d07d
commit
d31226c873
42
arm-link.c
42
arm-link.c
@ -27,27 +27,27 @@ enum float_abi {
|
||||
#include "tcc.h"
|
||||
|
||||
ST_DATA struct reloc_info relocs_info[R_NUM] = {
|
||||
INIT_RELOC_INFO (R_ARM_PC24, 1, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_CALL, 1, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_JUMP24, 1, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_PLT32, 1, ALWAYS_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_THM_PC22, 1, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_THM_JUMP24, 1, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_MOVT_ABS, 0, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_MOVW_ABS_NC, 0, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_THM_MOVT_ABS, 0, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_THM_MOVW_ABS_NC, 0, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_PREL31, 1, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_ABS32, 0, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_REL32, 0, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_GOTPC, 0, BUILD_GOT_ONLY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_GOTOFF, 0, BUILD_GOT_ONLY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_GOT32, 0, ALWAYS_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_COPY, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_V4BX, 1, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_GLOB_DAT, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_JUMP_SLOT, 1, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_NONE, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_ARM_PC24, 1, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_CALL, 1, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_JUMP24, 1, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_PLT32, 1, ALWAYS_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_THM_PC22, 1, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_THM_JUMP24, 1, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_MOVT_ABS, 0, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_MOVW_ABS_NC, 0, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_THM_MOVT_ABS, 0, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_THM_MOVW_ABS_NC, 0, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_PREL31, 1, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_ABS32, 0, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_REL32, 0, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_GOTPC, 0, BUILD_GOT_ONLY)
|
||||
INIT_RELOC_INFO (R_ARM_GOTOFF, 0, BUILD_GOT_ONLY)
|
||||
INIT_RELOC_INFO (R_ARM_GOT32, 0, ALWAYS_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_COPY, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_V4BX, 1, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_GLOB_DAT, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_JUMP_SLOT, 1, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_ARM_NONE, 0, NO_GOTPLT_ENTRY)
|
||||
};
|
||||
|
||||
void relocate_init(Section *sr) {}
|
||||
|
28
arm64-link.c
28
arm64-link.c
@ -21,20 +21,20 @@
|
||||
#include "tcc.h"
|
||||
|
||||
ST_DATA struct reloc_info relocs_info[R_NUM] = {
|
||||
INIT_RELOC_INFO (R_AARCH64_ABS32, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_AARCH64_ABS64, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_AARCH64_MOVW_UABS_G0_NC, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_AARCH64_MOVW_UABS_G1_NC, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_AARCH64_MOVW_UABS_G2_NC, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_AARCH64_MOVW_UABS_G3, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_AARCH64_ADR_PREL_PG_HI21, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_AARCH64_ADD_ABS_LO12_NC, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_AARCH64_JUMP26, 1, AUTO_GOTPLT_ENTRY, 1)
|
||||
INIT_RELOC_INFO (R_AARCH64_CALL26, 1, AUTO_GOTPLT_ENTRY, 1)
|
||||
INIT_RELOC_INFO (R_AARCH64_ADR_GOT_PAGE, 0, ALWAYS_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_AARCH64_LD64_GOT_LO12_NC, 0, ALWAYS_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_AARCH64_GLOB_DAT, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_AARCH64_JUMP_SLOT, 1, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_AARCH64_ABS32, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_AARCH64_ABS64, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_AARCH64_MOVW_UABS_G0_NC, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_AARCH64_MOVW_UABS_G1_NC, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_AARCH64_MOVW_UABS_G2_NC, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_AARCH64_MOVW_UABS_G3, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_AARCH64_ADR_PREL_PG_HI21, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_AARCH64_ADD_ABS_LO12_NC, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_AARCH64_JUMP26, 1, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_AARCH64_CALL26, 1, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_AARCH64_ADR_GOT_PAGE, 0, ALWAYS_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_AARCH64_LD64_GOT_LO12_NC, 0, ALWAYS_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_AARCH64_GLOB_DAT, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_AARCH64_JUMP_SLOT, 1, NO_GOTPLT_ENTRY)
|
||||
};
|
||||
|
||||
void relocate_init(Section *sr) {}
|
||||
|
18
c67-link.c
18
c67-link.c
@ -22,15 +22,15 @@
|
||||
#include "tcc.h"
|
||||
|
||||
ST_DATA struct reloc_info relocs_info[R_NUM] = {
|
||||
INIT_RELOC_INFO (R_C60_32, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_C60LO16, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_C60HI16, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_C60_GOTOFF, 0, BUILD_GOT_ONLY, 0)
|
||||
INIT_RELOC_INFO (R_C60_GOTPC, 0, BUILD_GOT_ONLY, 0)
|
||||
INIT_RELOC_INFO (R_C60_GOT32, 0, ALWAYS_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_C60_PLT32, 1, ALWAYS_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_C60_GLOB_DAT, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_C60_JMP_SLOT, 1, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_C60_32, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_C60LO16, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_C60HI16, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_C60_GOTOFF, 0, BUILD_GOT_ONLY)
|
||||
INIT_RELOC_INFO (R_C60_GOTPC, 0, BUILD_GOT_ONLY)
|
||||
INIT_RELOC_INFO (R_C60_GOT32, 0, ALWAYS_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_C60_PLT32, 1, ALWAYS_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_C60_GLOB_DAT, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_C60_JMP_SLOT, 1, NO_GOTPLT_ENTRY)
|
||||
};
|
||||
|
||||
void relocate_init(Section *sr) {}
|
||||
|
22
i386-link.c
22
i386-link.c
@ -23,17 +23,17 @@
|
||||
|
||||
static ElfW_Rel *qrel; /* ptr to next reloc entry reused */
|
||||
ST_DATA struct reloc_info relocs_info[R_NUM] = {
|
||||
INIT_RELOC_INFO (R_386_32, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_386_PC32, 1, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_386_PLT32, 1, ALWAYS_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_386_GLOB_DAT, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_386_JMP_SLOT, 1, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_386_GOTPC, 0, BUILD_GOT_ONLY, 0)
|
||||
INIT_RELOC_INFO (R_386_GOTOFF, 0, BUILD_GOT_ONLY, 0)
|
||||
INIT_RELOC_INFO (R_386_GOT32, 0, ALWAYS_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_386_GOT32X, 0, ALWAYS_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_386_16, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_386_PC16, 1, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_386_32, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_386_PC32, 1, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_386_PLT32, 1, ALWAYS_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_386_GLOB_DAT, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_386_JMP_SLOT, 1, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_386_GOTPC, 0, BUILD_GOT_ONLY)
|
||||
INIT_RELOC_INFO (R_386_GOTOFF, 0, BUILD_GOT_ONLY)
|
||||
INIT_RELOC_INFO (R_386_GOT32, 0, ALWAYS_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_386_GOT32X, 0, ALWAYS_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_386_16, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_386_PC16, 1, AUTO_GOTPLT_ENTRY)
|
||||
};
|
||||
|
||||
void relocate_init(Section *sr)
|
||||
|
5
tcc.h
5
tcc.h
@ -1326,11 +1326,10 @@ struct reloc_info {
|
||||
int known; /* true for known relocation */
|
||||
int code_reloc; /* if false, that's a data reloc */
|
||||
int gotplt_entry; /* wether and when to create a GOT/PLT entry */
|
||||
int pltoff_addend; /* wether to store the PLT offset in addend */
|
||||
};
|
||||
|
||||
#define INIT_RELOC_INFO(rtype, code_reloc, gotplt_entry, pltoff_addend) \
|
||||
[rtype] = {1, code_reloc, gotplt_entry, pltoff_addend},
|
||||
#define INIT_RELOC_INFO(rtype, code_reloc, gotplt_entry) \
|
||||
[rtype] = {1, code_reloc, gotplt_entry},
|
||||
ST_DATA struct reloc_info relocs_info[R_NUM];
|
||||
|
||||
ST_DATA Section *text_section, *data_section, *bss_section; /* predefined sections */
|
||||
|
@ -23,18 +23,18 @@
|
||||
|
||||
static ElfW_Rel *qrel; /* ptr to next reloc entry reused */
|
||||
ST_DATA struct reloc_info relocs_info[R_NUM] = {
|
||||
INIT_RELOC_INFO (R_X86_64_64, 0, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_X86_64_32, 0, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_X86_64_32S, 0, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_X86_64_PC32, 1, AUTO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_X86_64_PLT32, 1, ALWAYS_GOTPLT_ENTRY, 1)
|
||||
INIT_RELOC_INFO (R_X86_64_GLOB_DAT, 0, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_X86_64_JUMP_SLOT, 1, NO_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_X86_64_GOTPCREL, 0, ALWAYS_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_X86_64_GOTPCRELX, 0, ALWAYS_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_X86_64_REX_GOTPCRELX, 0, ALWAYS_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_X86_64_GOTTPOFF, 0, BUILD_GOT_ONLY, 0)
|
||||
INIT_RELOC_INFO (R_X86_64_GOT32, 0, ALWAYS_GOTPLT_ENTRY, 0)
|
||||
INIT_RELOC_INFO (R_X86_64_64, 0, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_X86_64_32, 0, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_X86_64_32S, 0, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_X86_64_PC32, 1, AUTO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_X86_64_PLT32, 1, ALWAYS_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_X86_64_GLOB_DAT, 0, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_X86_64_JUMP_SLOT, 1, NO_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_X86_64_GOTPCREL, 0, ALWAYS_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_X86_64_GOTPCRELX, 0, ALWAYS_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_X86_64_REX_GOTPCRELX, 0, ALWAYS_GOTPLT_ENTRY)
|
||||
INIT_RELOC_INFO (R_X86_64_GOTTPOFF, 0, BUILD_GOT_ONLY)
|
||||
INIT_RELOC_INFO (R_X86_64_GOT32, 0, ALWAYS_GOTPLT_ENTRY)
|
||||
};
|
||||
|
||||
void relocate_init(Section *sr)
|
||||
|
Loading…
Reference in New Issue
Block a user