aboutsummaryrefslogtreecommitdiff
path: root/tccelf.c
diff options
context:
space:
mode:
authorbellard <bellard>2002-08-18 14:34:57 +0000
committerbellard <bellard>2002-08-18 14:34:57 +0000
commitf946dffd336e0dead7d06e3d9fb5d659d1be0104 (patch)
treec32bb3666b4bb8b0407b2ad392542a6333f5b724 /tccelf.c
parent524be938fd042f395254336bdb0c8eb0ec9eee93 (diff)
downloadtinycc-f946dffd336e0dead7d06e3d9fb5d659d1be0104.tar.gz
tinycc-f946dffd336e0dead7d06e3d9fb5d659d1be0104.tar.bz2
suppressed section_ptr - fixed constant string allocation
Diffstat (limited to 'tccelf.c')
-rw-r--r--tccelf.c5
1 files changed, 3 insertions, 2 deletions
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