Adds a new Makefile variable DEBUG that controls whether a symbol file (.PDB)
is created for the executables, e. g., nmake -f Mkfiles\msvc.mak DEBUG=1
Signed-off-by: Jim Kukunas <james.t.kukunas@linux.intel.com>
In case if string is a single grave accent we
return the pointer to uninitialized space.
http://bugzilla.nasm.us/show_bug.cgi?id=3392292
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
If there is an error in evaluate() happened then @value
is NULL so that we better fail with error report instead
of trying processing it.
http://bugzilla.nasm.us/show_bug.cgi?id=3392290
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Instead of having unchecked fwrite() calls, introduce nasm_write()
which does error checking (and fatal errors if the write fails).
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
All Elf formats we're supporting at the moment have
are using same structures, move them into a header
and name then with elf_ prefix.
This makes a few fields to carry 64 bit integers while
in former Elf32|x formats they can be 32 bit wide, but
I think it's acceptable tradeoff.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
There are a number of mnemonics used in instns.pl plus
insns.dat files, lets document them.
This is first attempt to document mnemonics, so something
might be still missing, need review and updates.
No functional changes.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
45a22d9a61 changes the arguments of insns.pl
and adds a new autogenerated header iflaggen.h. Update the nmake Makefile
accordingly.
Signed-off-by: Jim Kukunas <james.t.kukunas@linux.intel.com>
It's been long time since -MF and -MD options were described
in docs but actually -MF was not implemented completely and -MD
didn't proceed into normal compilation process. Fix it.
Because we use bitmask for operating_mode selection I had to
move compilation condition one shift left.
http://bugzilla.nasm.us/show_bug.cgi?id=3392280
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Once we free allocated memory don't forget to setup variables
to NULL, otherwise they are pointing into nonexisting memory,
which might lead into sigsegv in best case.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
In commit fd52c277dd
we've started handling negative address relocations
but support Elf format only and got a typo in bin
format which leaded to endless cycle of applying
relocation due to negative argument (make test
hangs).
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
The fix for BR 3392278:
aa29b1d93f assemble.c: Don't drop rex prefix from instruction itself
... would cause multiple REX prefixes to be emitted for some
instructions. Create a new flag to indicate that REX has already been
emitted, which can be cleared for each instance of an instruction.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
It's been requested a long ago to handle '--v' option same was as
a regualar '-v'. From initial report
| NASM and yasm are in many respects compatible but yasm uses --v
| instead of -v for version. As often --v is used for version I
| end up using --v initially in NASM. This patch allows me to compile
| Mozilla apps which use yasm with NASM by merely renaming NASM to yasm
| so that the build environment does not have to be updated (Mozilla
| would not accept changes to allow use of NASM).
Reported-by: Andy Willis <abwillis1@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
It's been requested a long ago to handle '--v' option same was as
a regualar '-v'. From initial report
| NASM and yasm are in many respects compatible but yasm uses --v
| instead of -v for version. As often --v is used for version I
| end up using --v initially in NASM. This patch allows me to compile
| Mozilla apps which use yasm with NASM by merely renaming NASM to yasm
| so that the build environment does not have to be updated (Mozilla
| would not accept changes to allow use of NASM).
Reported-by: Andy Willis <abwillis1@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
There are special tools (like valgrind and etc)
to track memory leaks, no need for own trivial
tracker.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>