Error on unrecognized relocations

This commit is contained in:
Thomas Preud'homme
2016-12-05 20:58:00 +00:00
parent 557c5c1f11
commit e22249b81c
2 changed files with 6 additions and 1 deletions

3
tcc.h
View File

@ -1323,13 +1323,14 @@ enum gotplt_entry {
/* what kind of relocation is it */
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] = {code_reloc, gotplt_entry, pltoff_addend},
[rtype] = {1, code_reloc, gotplt_entry, pltoff_addend},
ST_DATA struct reloc_info relocs_info[R_NUM];
ST_DATA Section *text_section, *data_section, *bss_section; /* predefined sections */