The posix_ prefix is reserved for POSIX, and even if there never is a
posix_mktime() defined it might be confusing for programmers familiar
with this convention.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
In commit a45febd767 only part of problem has been covered.
Need to be ready for strings like
| `a
http://bugzilla.nasm.us/show_bug.cgi?id=3392295
Reported-by: Hanno Boeck <hanno@hboeck.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Looks like -Werror=missing-declarations revealed problem in
configure: the "inline" support has not been detected properly
leading to problem in building procedure.
Lets move AC_C_INLINE and etc to be tested before gcc flags.
Reported-by: NAKAI Yuta <nak5124@live.jp>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
The sequence | 0x0F 0x1B 0x75 | get matched into
one of BNDx instruction which register value 6
which is of course out of possible BND registers
implemented in hardware at the moment leading to
nil dereference.
Instead lets use a macro in whichreg() helper
which would test the registers bounds and force
the caller to try another template if register is
out of range. In the case above it simply means
ndisasm instead of crashing outputs
| 00000000 0F db 0x0f
| 00000001 1B db 0x1b
| 00000002 75 db 0x75
http://bugzilla.nasm.us/show_bug.cgi?id=3392289
Reported-by: Hanno Boeck <hanno@hboeck.de>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
A few changes here
- fix in VMOVNTPS 256 bit encoding
- fix nil dereference in memory parsing code
and access to uninitialized space when handling
strings
- fix processing of -MD option, the commit 599a982
was fixing one issue but occasionally broke visible
command line api, leading to (for example) syslinux
can't be built with previous version.
There are some more bugs which are to be addressed
but due to fix of -MD option we need to release update.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Previously -MD option didn't call for depend mode solely but
produced deps during active compilation phase allowing symbol
refereces processing as well.
Occasionally in commit 599a98 I made -MD option to handle deps
in a separate internal phase which caused problems like
| error: symbol references not supported in preprocess-only mode
leading to problems in building applications with nasm. Fix it
moving old behaviour back.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
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>