From 2654e0d8ea98fdd5aea9ea75a537fd47f64885b4 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 30 Apr 2002 21:05:12 +0000 Subject: [PATCH] NASM 0.98.19 --- nasm.h | 2 +- outelf.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nasm.h b/nasm.h index 2cc77e6..3ad5bb4 100644 --- a/nasm.h +++ b/nasm.h @@ -13,7 +13,7 @@ #define NASM_MAJOR_VER 0 #define NASM_MINOR_VER 98 -#define NASM_VER "0.98.18" +#define NASM_VER "0.98.19" #ifndef NULL #define NULL 0 diff --git a/outelf.c b/outelf.c index 50cd36b..38f4a56 100644 --- a/outelf.c +++ b/outelf.c @@ -554,7 +554,7 @@ static void elf_add_reloc (struct Section *sect, long segment, r->symbol = 0; for (i=0; iindex) - r->symbol = i+2; + r->symbol = i+3; if (!r->symbol) r->symbol = GLOBAL_TEMP_BASE + raa_read(bsym, segment); } @@ -928,13 +928,13 @@ static struct SAA *elf_build_symtab (long *len, long *local) * Now some standard symbols defining the segments, for relocation * purposes. */ - for (i = 1; i <= nsects; i++) { + for (i = 1; i <= nsects+1; i++) { p = entry; WRITELONG (p, 0); /* no symbol name */ WRITELONG (p, 0); /* offset zero */ WRITELONG (p, 0); /* size zero */ WRITESHORT (p, 3); /* local section-type thing */ - WRITESHORT (p, i); /* the section id */ + WRITESHORT (p, (i==1 ? SHN_ABS : i-1)); /* the section id */ saa_wbytes (s, entry, 16L); *len += 16; (*local)++; @@ -992,7 +992,7 @@ static struct SAA *elf_build_reltab (long *len, struct Reloc *r) { long sym = r->symbol; if (sym >= GLOBAL_TEMP_BASE) - sym += -GLOBAL_TEMP_BASE + (nsects+2) + nlocals; + sym += -GLOBAL_TEMP_BASE + (nsects+3) + nlocals; p = entry; WRITELONG (p, r->address); -- 2.7.4