From f946dffd336e0dead7d06e3d9fb5d659d1be0104 Mon Sep 17 00:00:00 2001 From: bellard Date: Sun, 18 Aug 2002 14:34:57 +0000 Subject: suppressed section_ptr - fixed constant string allocation --- tccelf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tccelf.c') diff --git a/tccelf.c b/tccelf.c index cd654ce..0704ab0 100644 --- a/tccelf.c +++ b/tccelf.c @@ -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 -- cgit v1.3.1