mirror of
git://repo.or.cz/tinycc.git
synced 2026-06-20 20:04:20 +08:00
Fix problem with large section size.
In tcc_load_object_file use unsigned long for size/offset. This avoids strange sizes of sections in case of overflow. The sections that are now larger then 4G may not work. This avoids a hang on macos in realloc.
This commit is contained in:
parent
676755f6ee
commit
d1fa89a11f
3
tccelf.c
3
tccelf.c
@ -3002,7 +3002,8 @@ ST_FUNC int tcc_load_object_file(TCCState *s1,
|
||||
{
|
||||
ElfW(Ehdr) ehdr;
|
||||
ElfW(Shdr) *shdr, *sh;
|
||||
int size, i, j, offset, offseti, nb_syms, sym_index, ret, seencompressed;
|
||||
unsigned long size, offset, offseti;
|
||||
int i, j, nb_syms, sym_index, ret, seencompressed;
|
||||
char *strsec, *strtab;
|
||||
int stab_index, stabstr_index;
|
||||
int *old_to_new_syms;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user