| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Since pp_error_list_macros() was introduced, the only need for
pp_verror() is to suppress error messages in certain contexts. Replace
this function with a preprocessor callback,
preproc->pp_suppress_error(), so we can drop the nasm_verror()
function pointer entirely.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a new error level, ERR_CRITICAL, beyond which we will
minimize the amount of code that will be executed before we die; in
particular don't execute any memory allocations, and if we somehow end
up recursing, abort() immediately.
Basically, "less than panic, more than fatal."
At this point this level is used by nasm_alloc_failed().
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
There is absolutely no reason not to include <string.h> globally, and
with the inline function for mempcpy() we need it there anyway.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Change the severity parameter to the error function from "int" to an
unsigned typedef, currently uint32_t.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Resolved Conflicts:
Makefile.in
Mkfiles/msvc.mak
Mkfiles/openwcom.mak
asm/nasm.c
nasmlib/alloc.c
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is possible on memory exhaustion that nasm_fatal() might cause
another allocation error, thus calling nasm_alloc_failed() again. If
we find us in nasm_alloc_failed() for a second time, try to get a
message out and then call abort().
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nearly all instances of nasm_fatal() and nasm_panic() take a flags
argument of zero. Simplify the code by making nasm_fatal and
nasm_panic default to no flags, and add an alternate version if flags
really are desired. This also means that every call site doesn't have
to initialize a zero argument.
Furthermore, ERR_NOFILE is now often not necessary, as the error code
will no longer cause a null reference if there is no current
file. Therefore, we can remove many instances of ERR_NOFILE which only
deprives the user of information.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
-Werror now trips on implicit fallthroughs. There is also at least one
that probably should not be, although it appears to be harmless.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
| |
This reverts commit 8a7c6009fbddd7084fdfaebd9e3e3fd0baa39bc2.
|
|
|
|
|
|
|
| |
https://bugzilla.nasm.us/show_bug.cgi?id=3392465
Reported-by: Ozkan Sezer <sezeroz@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
| |
Use the same error pattern as the rest of the calls in this function.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
It isn't 100% clear what is the right thing to do in this particular
case, so this is my best attempt...
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
Checkin 8dc965347ddf9caabacc4ca0441efe3a4ec32af8 was missing this
file, causing obvious failures.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
| |
We already have abort-on-error memory allocation and I/O operations in
nasmlib, so use them for rdoff as well.
Delete long-since-obsolete rdoff Mkfiles directory.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
NSIS packages rdoff, and we really want to be able to build the full
NSIS package on an MSVC platform.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
Distribute the file generation rules to auxiliary Makefiles via
syncfiles.pl. These rules are OS- and Make-dialect-generic enough
that our mangling script handles them well enough.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
|
| |
fixes pvs-studio error 'V530 The return value of function 'freopen'
is required to be utilized.'
Signed-off-by: Martin Lindhe <martin-commit@ubique.se>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
| |
We should not include config.h "naked"; include "compiler.h".
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
If there are any errors while linking, we should not create an
output file.
Signed-off-by: Daniel Lundqvist <daniel@malarhojden.nu>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* nasm-2.12.xx:
codeview: Fix ill-formed "S_COMPILE2" record.
rdoff: Add rdf2bin input dependency
labels: Warn if new label created on pass two
Add explicit void parameter to newmembuf() function declaration.
compiler.h: always undefine __STRICT_ANSI__ for gcc
| Conflicts:
| rdoff/Makefile.in
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On host platforms where $(LN_S) is cp, need to make sure to
link rdf2bin first.
Backport of 6d67dbfa95
Signed-off-by: Fabian Giesen <fabiang@radgametools.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In rdoff/rdoff.c, the function declaration for newmembuf is written:
static memorybuf *newmembuf()
The attached diff adds an explicit void parameter.
It seems like it would be nicer with an explicit void parameter
especially since the -Werror build options seem to want to find such
things.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
On host platforms where $(LN_S) is cp, need to make sure to
link rdf2bin first.
Signed-off-by: Fabian Giesen <fabiang@radgametools.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
Make the source code easier to understand and keep track of by
organizing it into subdirectories depending on the function.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Resolved Conflicts:
.gitignore
Makefile.in
Mkfiles/msvc.mak
Mkfiles/netware.mak
Mkfiles/openwcom.mak
Mkfiles/owlinux.mak
preproc-nop.c
preproc.c
version
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
| |
| |
| |
| |
| | |
Fix bitrot in building in a separate object directory.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
| |
| |
| |
| |
| | |
Minor autoconf corner cases.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Split lib/ into nasmlib/ (for nasm-specific functions) and stdlib/
(for replacements for C library functions which may be missing.)
Rename the ersatz inttypes.h to nasmint.h so we can use a simple test
in compiler.h instead of dealing with include path magic.
Remove tests in configure.in for ancient missing functions (which will
break the build anyway.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There is no reason to not use an archive manager to build our
executables. If there really are systems which don't have any kind of
archive manager, we can simply link all the objects.
This also drops any use of configure to detect library objects.
Instead just use HAVE_* and let the archive manager delete them.
A lot of additional functions could be declared library functions and
reorganized.
***FIX*** Mkfiles/*.mak have not yet been updated.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|/
|
|
|
|
|
|
|
|
| |
nasmlib.[ch] desperately need to be broken up into smaller chunks.
Break file I/O related functions out into file.c, so at least we can
avoid the problem with P_WAIT being defined in <io.h> on Windows but
is also used as a prefix constant in "nasm.h".
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
sizeof(t = time(NULL)) doesn't ever actually call time().
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Rationale: this is useful for projects developed entirely in high-level
language and which use NASM as a backend (compilers able to generate NASM
code are e.g. ncc or Free Pascal). With this option there is no need to have
a single assembly language file for each project with just one "module NNN"
directive — it is enough now to specify the name as an argument to ldrdf.
Signed-off-by: Yuri Zaporozhets <r_tty@yahoo.co.uk>
|
|
|
|
| |
Signed-off-by: Yuri Zaporozhets <r_tty@yahoo.co.uk>
|
|
|
|
|
|
|
|
|
| |
Rationale: this is required for, e.g., FreePascal, which tends to generate
very long labels for procedures/methods that do not fit into 64 bytes.
This change does not introduce any incompatibilities.
Signed-off-by: Yuri Zaporozhets <r_tty@yahoo.co.uk>
|
|
|
|
|
|
| |
The function rdl_close() is never used, remove it.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
| |
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
| |
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
| |
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
| |
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
| |
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
| |
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Since e76a6260556d76b756ef56cdd4ca5b41e61259bc, the return type of fwritezero()
is void.
Signed-off-by: Jim Kukunas <james.t.kukunas@linux.intel.com>
|
|
|
|
|
| |
Signed-off-by: Philipp Kloke <philipp.kloke@web.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
| |
Bug found by: CppCheck 1.59 (static source analysis tool)
Signed-off-by: Philipp Kloke <philipp.kloke@web.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
| |
Bug found by: CppCheck 1.59 (static source analysis tool)
Signed-off-by: Philipp Kloke <philipp.kloke@web.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
| |
Add back a dependency which was accidentally dropped for the previous
build bug fix.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
|
|
| |
The strange dependency on nasmlib.o causes serious issues in parallel
build; hopefully fix it.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
| |
LLVM's Clang warns about this. outieee.c had a real problem.
|
|
|
|
|
|
|
|
| |
*To the best of my knowledge*, we now have authorization from everyone
who has significantly contributed to NASM in the past. As such,
change the license to the 2-clause BSD license.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|