Revert "Generate PLT thumb stub only when necessary"

Revert commit 891dfcdf3f since it assumes
*all* architectures supported by tcc have GOT offsets aligned on 2. A
rework of this commit is being done since without it all PLT entries
grow by 4 bytes.
This commit is contained in:
Thomas Preud'homme
2012-11-12 23:14:21 +01:00
parent 3c986eeae3
commit 1af3bca4ea
2 changed files with 26 additions and 61 deletions

11
tcc.h
View File

@ -33,7 +33,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
@ -525,15 +524,11 @@ struct TCCState {
Section **priv_sections;
int nb_priv_sections; /* number of private sections */
/* got & plt handling */
/* got handling */
Section *got;
Section *plt;
struct {
unsigned long plt_thumb_stub:1;
/* mult by 2 (or left shift by 1) before use */
unsigned long got_offset:(sizeof(long)*CHAR_BIT-1);
} *sym_infos;
int nb_sym_infos;
unsigned long *got_offsets;
int nb_got_offsets;
/* give the correspondance from symtab indexes to dynsym indexes */
int *symtab_to_dynsym;