suppressed section_ptr - fixed constant string allocation

This commit is contained in:
bellard
2002-08-18 14:34:57 +00:00
parent 524be938fd
commit f946dffd33
2 changed files with 45 additions and 54 deletions

View File

@ -1511,10 +1511,11 @@ static int tcc_load_object_file(TCCState *s1,
if (sh->sh_type != SHT_NOBITS) {
unsigned char *ptr;
lseek(fd, file_offset + sh->sh_offset, SEEK_SET);
ptr = section_ptr(s, size);
ptr = section_ptr_add(s, size);
read(fd, ptr, size);
} else {
s->data_offset += size;
}
s->data_offset += size;
}
/* second short pass to update sh_link and sh_info fields of new