diff options
| author | Michael Matz <matz@suse.de> | 2017-12-10 06:18:27 +0100 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2017-12-10 06:50:58 +0100 |
| commit | 8490c54dbd756130962825adf32ab955137da8a4 (patch) | |
| tree | f86e81108aca1053fc810f6fdc77c62ef547a976 /tcc.h | |
| parent | 3ae1a2af1c10f9b64631d8e18d948498e14b283d (diff) | |
| download | tinycc-8490c54dbd756130962825adf32ab955137da8a4.tar.gz tinycc-8490c54dbd756130962825adf32ab955137da8a4.tar.bz2 | |
Fix some multi-file corner cases with asm
for this we have to create also asm symbols as VT_STATIC initially
except if there's an indication that it should be global (.globl
or undefined at end of unit). For this to work we need to
be able to globalize symbols after they were local and enter them
into the ELF hash tables, and also adjust the symbols that were
potentially already used in relocs when they were still local.
The easiest is to do a proper symbol resolution step also in multi-file
mode, for regular symbols (the non-dynamic ones, i.e. not from shared
libs).
Diffstat (limited to 'tcc.h')
| -rw-r--r-- | tcc.h | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -911,7 +911,6 @@ struct filespec { /* symbol was created by tccasm.c first */ #define VT_ASM (VT_VOID | VT_UNSIGNED) -#define VT_ASM_GLOBAL VT_DEFSIGN #define IS_ASM_SYM(sym) (((sym)->type.t & (VT_BTYPE | VT_ASM)) == VT_ASM) /* token values */ @@ -1426,11 +1425,10 @@ ST_FUNC void put_stabs_r(const char *str, int type, int other, int desc, unsigne ST_FUNC void put_stabn(int type, int other, int desc, int value); ST_FUNC void put_stabd(int type, int other, int desc); -ST_FUNC void relocate_common_syms(void); +ST_FUNC void resolve_regular_syms(void); ST_FUNC void relocate_syms(TCCState *s1, Section *symtab, int do_resolve); ST_FUNC void relocate_section(TCCState *s1, Section *s); -ST_FUNC void tcc_add_linker_symbols(TCCState *s1); ST_FUNC int tcc_object_type(int fd, ElfW(Ehdr) *h); ST_FUNC int tcc_load_object_file(TCCState *s1, int fd, unsigned long file_offset); ST_FUNC int tcc_load_archive(TCCState *s1, int fd); |
