Files
haikuports/dev-lang/nasm/patches/nasm-2.12.01.patchset

44 lines
1.1 KiB
Plaintext

From 4b8582300df1cd8107869ad5d4fca95132eac30b Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 10 Mar 2016 18:18:16 +0000
Subject: gcc2 build fix
diff --git a/output/codeview.c b/output/codeview.c
index f9750bf..988475d 100644
--- a/output/codeview.c
+++ b/output/codeview.c
@@ -375,16 +375,18 @@ static void register_reloc(struct coff_Section *const sect,
r->type = type;
r->symbol = 0;
- for (int i = 0; i < coff_nsects; i++) {
+{ int i;
+ for (i = 0; i < coff_nsects; i++) {
sec = coff_sects[i];
if (!strcmp(sym, sec->name)) {
return;
}
r->symbol += 2;
}
-
+}
saa_rewind(coff_syms);
- for (uint32_t i = 0; i < coff_nsyms; i++) {
+{ uint32_t i;
+ for (i = 0; i < coff_nsyms; i++) {
struct coff_Symbol *s = saa_rstruct(coff_syms);
r->symbol++;
if (s->strpos == -1 && !strcmp(sym, s->name)) {
@@ -402,6 +404,7 @@ static void register_reloc(struct coff_Section *const sect,
return;
}
}
+}
nasm_panic(0, "codeview: relocation for unregistered symbol: %s", sym);
}
--
2.7.0