diff options
Diffstat (limited to 'lib/linker.c')
-rw-r--r-- | lib/linker.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/lib/linker.c b/lib/linker.c index c66017c..b85cbb2 100644 --- a/lib/linker.c +++ b/lib/linker.c @@ -159,10 +159,8 @@ void addfile(char *nom) objects[objindex]->datastart = datasize; objects[objindex]->bssstart = bsssize; - objects[objindex]->text = - (Uint32 *) Emalloc(objects[objindex]->s_text * sizeof(Uint32)); - objects[objindex]->data = - (Uint32 *) Emalloc(objects[objindex]->s_data * sizeof(Uint32)); + objects[objindex]->text = (Uint32 *) Emalloc(objects[objindex]->s_text * sizeof(Uint32)); + objects[objindex]->data = (Uint32 *) Emalloc(objects[objindex]->s_data * sizeof(Uint32)); pushcontext(_("Reading text and data segments")); for (i = 0; i < objects[objindex]->s_text; i++) { @@ -228,13 +226,10 @@ static void dumprelog(FILE * f) decal = objects[t->objindex]->textstart + t->offset; break; case 2: - decal = - textsize + objects[t->objindex]->datastart + t->offset; + decal = textsize + objects[t->objindex]->datastart + t->offset; break; case 4: - decal = - textsize + datasize + - objects[t->objindex]->bssstart + t->offset; + decal = textsize + datasize + objects[t->objindex]->bssstart + t->offset; break; default: exception(1, _("Internal error")); @@ -254,13 +249,10 @@ static void dumprelog(FILE * f) decal = objects[t->objindex]->textstart + t->offset; break; case 2: - decal = - textsize + objects[t->objindex]->datastart + t->offset; + decal = textsize + objects[t->objindex]->datastart + t->offset; break; case 4: - decal = - textsize + datasize + - objects[t->objindex]->bssstart + t->offset; + decal = textsize + datasize + objects[t->objindex]->bssstart + t->offset; break; default: exception(1, _("Internal error")); @@ -272,8 +264,7 @@ static void dumprelog(FILE * f) s->offset, decal, s->name); #endif objects[s->objindex]->data[s->offset] += decal; - writeword(textsize + - objects[s->objindex]->datastart + s->offset, f); + writeword(textsize + objects[s->objindex]->datastart + s->offset, f); break; default: exception(1, _("Internal error")); @@ -327,8 +318,7 @@ void dumpfile(char *nom) textsize, datasize, bsssize); fprintf(stderr, _ - ("Output file size: %i words containing %i relocating offsets.\n"), - ftell(f), nbrsymbs); + ("Output file size: %i words containing %i relocating offsets.\n"), ftell(f) >> 2, nbrsymbs); fclose(f); } |