0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00

Merge branch 'nasm-2.12.xx'

Resolved Conflicts:
	compiler.h

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin
2016-03-07 11:50:38 -08:00
5 changed files with 9 additions and 34 deletions

View File

@@ -72,12 +72,6 @@
#define __STDC_LIMIT_MACROS 1 #define __STDC_LIMIT_MACROS 1
#define __STDC_FORMAT_MACROS 1 #define __STDC_FORMAT_MACROS 1
#ifdef __GNUC__
# define _unused __attribute__((unused))
#else
# define _unused
#endif
/* Some versions of MSVC have these only with underscores in front */ /* Some versions of MSVC have these only with underscores in front */
#include <stddef.h> #include <stddef.h>
#include <stdarg.h> #include <stdarg.h>

View File

@@ -197,6 +197,8 @@ dnl PA_ADD_CFLAGS([-Wwrite-strings])
AC_ARG_ENABLE([werror], AC_ARG_ENABLE([werror],
[AC_HELP_STRING([--enable-werror], [AC_HELP_STRING([--enable-werror],
[compile with -Werror to error out on any warning])], [compile with -Werror to error out on any warning])],
[], [enable_werror=no])
AS_IF([test x"$enable_werror" != xno],
[PA_ADD_CFLAGS([-Werror])], [PA_ADD_CFLAGS([-Werror])],
[PA_ADD_CFLAGS([-Werror=implicit]) [PA_ADD_CFLAGS([-Werror=implicit])
PA_ADD_CFLAGS([-Werror=missing-braces]) PA_ADD_CFLAGS([-Werror=missing-braces])

View File

@@ -7,6 +7,12 @@
The NASM 2 series supports x86-64, and is the production version of NASM The NASM 2 series supports x86-64, and is the production version of NASM
since 2007. since 2007.
\S{cl-2.12.01} Version 2.12.01
\b Portability fixes for some platforms.
\S{cl-2.12} Version 2.12 \S{cl-2.12} Version 2.12
\b Major fixes to the \c{macho} backend (\k{machofmt}); earlier versions \b Major fixes to the \c{macho} backend (\k{machofmt}); earlier versions

View File

@@ -417,7 +417,7 @@ static void register_reloc(struct coff_Section *const sect,
return; return;
} }
} }
nasm_assert(!"relocation for unregistered symbol"); nasm_panic(0, "codeview: relocation for unregistered symbol: %s", sym);
} }
static inline void section_write32(struct coff_Section *sect, uint32_t val) static inline void section_write32(struct coff_Section *sect, uint32_t val)

View File

@@ -300,9 +300,6 @@ static uint64_t rel_padcnt = 0;
#define alignptr(x) \ #define alignptr(x) \
ALIGN(x, fmt.ptrsize) /* align x to output format width */ ALIGN(x, fmt.ptrsize) /* align x to output format width */
static void debug_reloc (struct reloc *);
static void debug_section_relocs (struct section *) _unused;
static struct section *get_section_by_name(const char *segname, static struct section *get_section_by_name(const char *segname,
const char *sectname) const char *sectname)
{ {
@@ -1595,30 +1592,6 @@ static void macho_cleanup(int debuginfo)
nasm_free(sectstab); nasm_free(sectstab);
} }
/* Debugging routines. */
static void debug_reloc (struct reloc *r)
{
fprintf (stdout, "reloc:\n");
fprintf (stdout, "\taddr: %"PRId32"\n", r->addr);
fprintf (stdout, "\tsnum: %d\n", r->snum);
fprintf (stdout, "\tpcrel: %d\n", r->pcrel);
fprintf (stdout, "\tlength: %d\n", r->length);
fprintf (stdout, "\text: %d\n", r->ext);
fprintf (stdout, "\ttype: %d\n", r->type);
}
static void debug_section_relocs (struct section *s)
{
struct reloc *r = s->relocs;
fprintf (stdout, "relocs for section %s:\n\n", s->sectname);
while (r != NULL) {
debug_reloc (r);
r = r->next;
}
}
#ifdef OF_MACHO32 #ifdef OF_MACHO32
static const struct macho_fmt macho32_fmt = { static const struct macho_fmt macho32_fmt = {
4, 4,