mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
nasm: missing patchset.
This commit is contained in:
77
dev-lang/nasm/patches/nasm-2.12.patchset
Normal file
77
dev-lang/nasm/patches/nasm-2.12.patchset
Normal file
@@ -0,0 +1,77 @@
|
||||
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 2f5bb69..84a33fa 100644
|
||||
--- a/output/codeview.c
|
||||
+++ b/output/codeview.c
|
||||
@@ -59,15 +59,15 @@ static void cv8_output(int type, void *param);
|
||||
static void cv8_cleanup(void);
|
||||
|
||||
struct dfmt df_cv8 = {
|
||||
- .fullname = "Codeview 8",
|
||||
- .shortname = "cv8",
|
||||
- .init = cv8_init,
|
||||
- .linenum = cv8_linenum,
|
||||
- .debug_deflabel = cv8_deflabel,
|
||||
- .debug_directive = null_debug_directive,
|
||||
- .debug_typevalue = cv8_typevalue,
|
||||
- .debug_output = cv8_output,
|
||||
- .cleanup = cv8_cleanup,
|
||||
+ "Codeview 8",
|
||||
+ "cv8",
|
||||
+ cv8_init,
|
||||
+ cv8_linenum,
|
||||
+ cv8_deflabel,
|
||||
+ null_debug_directive,
|
||||
+ cv8_typevalue,
|
||||
+ cv8_output,
|
||||
+ cv8_cleanup,
|
||||
};
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -89,7 +89,7 @@ enum symbol_type {
|
||||
SYMTYPE_LDATA,
|
||||
SYMTYPE_GDATA,
|
||||
|
||||
- SYMTYPE_MAX,
|
||||
+ SYMTYPE_MAX
|
||||
};
|
||||
|
||||
struct cv8_symbol {
|
||||
@@ -390,16 +390,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)) {
|
||||
@@ -417,6 +419,7 @@ static void register_reloc(struct coff_Section *const sect,
|
||||
return;
|
||||
}
|
||||
}
|
||||
+}
|
||||
nasm_assert(!"relocation for unregistered symbol");
|
||||
}
|
||||
|
||||
--
|
||||
2.7.0
|
||||
|
||||
Reference in New Issue
Block a user