summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* NASM 2.11.08nasm-2.11.08nasm-2.11.xxCyrill Gorcunov2015-02-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix section length computation in bin backend which leaded in incorrect relocation records. - Add a warning for numeric preprocessor definitions passed via command line which might have unexpected results otherwise. - Add ability to specify a module name record in rdoff linker with -mn option. - Increase label length capacity up to 256 bytes in rdoff backend for FreePascal sake, which tends to generate very long labels for procedures. - Fix segmentation failure when rip addressing is used in macho64 backend. - Fix access on out of memory when handling strings with a single grave. We have sixed similar problem in previous release but not all cases were covered. - Fix NULL dereference in disassembled on BND instruction. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* doc: changes -- Prepare for 2.11.08Cyrill Gorcunov2015-02-211-0/+22
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* output: dbg,aout,elf32 -- Fix out for signed relocationsCyrill Gorcunov2015-02-213-5/+5
| | | | | | | | @size might be negative for signed relocations but its length is abs value. This is rather a fix for future use because at moment we can't hit this problems but better be on a safe side. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* output: bin -- Fix section length miscalc for OUT_ADDRESSCyrill Gorcunov2015-02-151-0/+6
| | | | | | | | | | | | While we using proper @asize variable for relocation itself we miss the fact that @size variable (which might be negative for signed relocations since fd52c277dd6) is used to calculate section size increment. http://bugzilla.nasm.us/show_bug.cgi?id=3392299 Reported-by: Ben de Waal <ben@dewaals.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* preproc: Warn if someone predefines non ID as definitionCyrill Gorcunov2015-02-081-0/+4
| | | | | | | | | | | Not sure if someone is used this but to not break backward compatibility lets simply yield error but don't stop processing. http://bugzilla.nasm.us/show_bug.cgi?id=3392300 Reported-by: Dave Shields <thedaveshields@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* rdoff/ldrdf.c: Add option to specify target RDF module name in command lineYuri Zaporozhets2015-01-201-9/+51
| | | | | | | | | | 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>
* Correct name spelling and email addressYuri Zaporozhets2015-01-184-27/+27
| | | | Signed-off-by: Yuri Zaporozhets <r_tty@yahoo.co.uk>
* rdoff: increase EXIM_LABEL_MAX to 256 bytesYuri Zaporozhets2015-01-111-1/+1
| | | | | | | | | 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>
* output: maco 64 -- Fix data conversionCyrill Gorcunov2015-01-111-3/+3
| | | | | | | | Looks like were a typo in first place http://bugzilla.nasm.us/show_bug.cgi?id=3392298 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* output: maco 64 -- Fix get_closest_section_symbol_by_offsetCyrill Gorcunov2015-01-111-1/+5
| | | | | | | - fixup comparision it should be GE - make sure we never return nil here Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* rdoff/rdlib.c: Remove unused function rdl_close()H. Peter Anvin2015-01-051-7/+0
| | | | | | The function rdl_close() is never used, remove it. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Change posix_mktime() to make_posix_time()H. Peter Anvin2015-01-051-3/+3
| | | | | | | | 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>
* quote: Fix returning out of string pointer, take 2Cyrill Gorcunov2014-12-201-1/+1
| | | | | | | | | | | | 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>
* doc: Add missing closing braceCyrill Gorcunov2014-12-201-1/+1
| | | | | | | http://bugzilla.nasm.us/show_bug.cgi?id=3392284 Reported-by: Nick Rowan <nnrowan@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* disasm: Add explicit type conversion to placate compilerCyrill Gorcunov2014-12-201-1/+1
| | | | | | | | | Otherwise getting | disasm.c:200:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] | return GET_REGISTER(nasm_rd_bndreg, regval); Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* configure.in: Move AC_C_INLINE and friends to be checked before PA_ADD_CFLAGSCyrill Gorcunov2014-12-201-14/+13
| | | | | | | | | | | 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>
* ndisasm: Prevent nil dereference on registerd decodingCyrill Gorcunov2014-12-141-16/+20
| | | | | | | | | | | | | | | | | | | | | | | 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>
* disasm: matches -- Use proper return typeCyrill Gorcunov2014-12-141-51/+51
| | | | | | | matches() declared as int and better return explicit zero here instead of @false. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* NASM 2.11.07nasm-2.11.07Cyrill Gorcunov2014-12-091-1/+1
| | | | | | | | | | | | | | | | | | 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>
* doc: Update changes for 2.11.07Cyrill Gorcunov2014-12-091-0/+12
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* insns.dat: Fix 256-bit vmovntpsHenrik Gramner2014-11-301-1/+1
| | | | | Signed-off-by: Henrik Gramner <henrik@gramner.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* nasm: Fix -MD operating modeCyrill Gorcunov2014-11-291-1/+1
| | | | | | | | | | | | | | | | 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>
* compiler: Fix typo for HAVE__VSNPRINTFCyrill Gorcunov2014-11-261-1/+1
| | | | | Reported-by: Michael Murashkin <ragnarokkx@inbox.ru> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* configure.in: Remove redundant -Werror=trigraphsH. Peter Anvin2014-11-251-1/+0
| | | | | | As obnoxious as trigraphs are, we don't need to -Werror them twice. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add missing static declarations in rdoff/segtab.cH. Peter Anvin2014-11-251-3/+3
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add missing static declarations in rdoff/rdoff.cH. Peter Anvin2014-11-251-6/+6
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add missing static declaration in rdoff/rdlib.cH. Peter Anvin2014-11-251-2/+2
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add missing static declarations in rdoff/rdflib.cH. Peter Anvin2014-11-251-2/+2
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add missing static declaration in rdoff/rdfdump.cH. Peter Anvin2014-11-251-2/+2
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* configure.in: promote some C warnings to errorsH. Peter Anvin2014-11-251-0/+11
| | | | | | | Promote some C warnings to errors, especially ones relating to missing prototypes. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run "make alldeps" to add missing header file dependenciesH. Peter Anvin2014-11-255-29/+31
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add missing prototype in tokhash.c (from tokhash.pl)H. Peter Anvin2014-11-251-1/+2
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add missing static declarations in rdoff/ldrdf.cH. Peter Anvin2014-11-251-8/+8
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add missing static declarations in output/outobj.cH. Peter Anvin2014-11-251-2/+2
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add missing static declaration in output/outdbg.cH. Peter Anvin2014-11-251-1/+1
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add missing static declaration in output/outieee.cH. Peter Anvin2014-11-251-1/+1
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add missing static declaration in output/outcoff.cH. Peter Anvin2014-11-251-2/+2
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add missing header file in output/nulldbg.cH. Peter Anvin2014-11-251-1/+2
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add missing header file in labels.cH. Peter Anvin2014-11-251-1/+2
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add missing header file in crc64.cH. Peter Anvin2014-11-251-1/+2
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasmlib: Fix typo in fwriteint32_t()Jim Kukunas2014-11-251-1/+1
| | | | Signed-off-by: Jim Kukunas <james.t.kukunas@linux.intel.com>
* msvc.mak: Add support for generating PDBs for debuggingJim Kukunas2014-11-251-4/+12
| | | | | | | 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>
* quote: Fix returning out of string pointerCyrill Gorcunov2014-11-231-1/+3
| | | | | | | | | 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>
* parser: Check for eval error before memory reference parsingCyrill Gorcunov2014-11-221-0/+2
| | | | | | | | | | 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>
* rdoff: don't check fwritezero() return value.Jim Kukunas2014-11-101-2/+1
| | | | | | | Since e76a6260556d76b756ef56cdd4ca5b41e61259bc, the return type of fwritezero() is void. Signed-off-by: Jim Kukunas <james.t.kukunas@linux.intel.com>
* Replace unchecked fwrite() callsH. Peter Anvin2014-10-2113-64/+63
| | | | | | | 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>
* NASM 2.11.06nasm-2.11.06Jim Kukunas2014-10-171-1/+1
|
* doc: Document -MF/-MD and updated AVX512 instructionsJim Kukunas2014-10-171-0/+9
| | | | | | Document changes for 2.11.06 Signed-off-by: Jim Kukunas <james.t.kukunas@linux.intel.com>
* Sync to public Intel EAS version 021.Mark Charney2014-10-166-651/+1649
| | | | | | * http://www.intel.com/software/isa * Signed-off-by: Mark Charney <mark.charney@intel.com>
* output: elf -- Use common elf_ structuresCyrill Gorcunov2014-09-213-188/+77
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>