summaryrefslogtreecommitdiff
path: root/lib/linker.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/linker.c')
-rw-r--r--lib/linker.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/lib/linker.c b/lib/linker.c
index 81fc507..0460d41 100644
--- a/lib/linker.c
+++ b/lib/linker.c
@@ -98,7 +98,7 @@ static char *readstring(FILE * f)
static void addsymbol(char *name, int offset, int type)
{
symbol_t *newsymbol;
-
+
newsymbol = (symbol_t *) Emalloc(sizeof(symbol_t));
newsymbol->next = NULL;
newsymbol->type = type;
@@ -223,38 +223,35 @@ static void dumprelog(FILE * f)
case 1: /* text */
switch (t->type) {
case 0:
- decal =
- objects[t->objindex]->textstart + t->offset;
+ 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"));
break;
}
- fprintf(stderr, "Relogement effectué sur %i, de %i octets pour le symbole %s\n", s->offset, decal, s->name);
+#ifdef DEBUG
+ fprintf(stderr, "Relogement effectué sur %i, de %i octets pour le symbole %s\n",
+ s->offset, decal, s->name);
+#endif
objects[s->objindex]->text[s->offset] += decal;
writeword(objects[s->objindex]->textstart + s->offset, f);
break;
case 3: /* data */
switch (t->type) {
case 0:
- decal =
- objects[t->objindex]->textstart + t->offset;
+ 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"));