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
1 changed files with 2 additions and 1 deletions
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 a new issue