summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-11-01Provide a bit more clarity in the README file for updating.Dale Curtis
BUG=766721 Change-Id: I0d62c8e718714ad227f579d5c41ed34a77c47110
2018-11-01Fix windows build warning / error.Dale Curtis
2018-11-01Just use the built-in msvc.h instead of a hand generated Windows one.Dale Curtis
Per local benchmarks on test/avx512f.asm, a config.h generated using Cygwin plus clang-cl yielded a compilation time of ~450ms, while just using the built in msvc.h yielded ~405ms. So this is a no brainer: one less platform to generate and it's faster. BUG=766721 Change-Id: Ic6e930bce1a99adef037ac3fd56fef205696febc
2018-11-01Fix comment characters in config.hDale Curtis
2018-11-01Merge "Add codereview.settings file to suppress warning spam."Dale Curtis
2018-11-01Change config.h into a platform specific includer. Mac needs config.Dale Curtis
Unfortunately Mac needs its own build config, possibly Windows does too, so we need to create special configs per platform. Since the nasm source also explicitly include "config/config.h" we need to change the base config.h into one that includes the right platform config. This only fixes Mac for the moment, I'll send a fix for Windows once I've tried clang-cl on my Windows machine. At present the config-win.h file is just a copy of the Linux one. BUG=766721 Change-Id: Ib92a2aa5ad8a0ecb651072a7e7d91f3d8ad6478d
2018-11-01Add codereview.settings file to suppress warning spam.Dale Curtis
I don't think this is used for anything anymore, but this clones the file from the ffmpeg repository to avoid spam when operating with some depot tools. BUG=766721 R=davidben Change-Id: I424d550edf59c47b1c764e9cf8e68b8ac83140f7
2018-10-31Add all the chromium stuff necessary to build nasm.Dale Curtis
This adds the BUILD file and configuration davidben at chromium.org wrote originally on https://chromium-review.googlesource.com/c/chromium/src/+/1119211 This is the last CL enabling nasm usage in Chromium (fingers crossed), but may need some tweaks to build on Windows mac. A subsequent Chromium CL adding the DEP will test this theory. BUG=766721 Change-Id: I481fc8d7f1747dad74cd0a02a251a65cfd78a134
2018-10-31Add all sources generated by "make perlreq"Dale Curtis
This step is required to turn source templates into sources. A later commit will document this process in README.chromium. This is one of the initial commits preparing NASM for use in Chrome. BUG=766721
2018-10-31Apply deterministic build patch.Dale Curtis
This removes __DATE__ from a few places to ensure the build is always the same. Patch originally authored by davidben at chromium.org This is one of the initial commits preparing NASM for use in Chrome. BUG=766721 Change-Id: I4217f9ffed1455b8f244b024dc10dbb8c5c0664d
2018-10-31Update .gitignore not to ignore generated files Chrome needs.Dale Curtis
By default any file generated by "make perlreq" is hidden by the .gitignore. This may require ongoing maintanence, so a PRESUBMIT has been added to prevent future regressions. This is the first of the commits preparing NASM for use in Chrome. BUG=766721 TEST=none Change-Id: Ib6cae0b2e6ad0420185a01497e2184c094cc105e
2018-10-28test: nasm-t -- Add UTF testcaseCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-28stabs: Convert style and add commentsCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-28elf: Convert header to linux styleCyrill Gorcunov
No functional changes. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-28misc: Nindent -- Drop expand tabs with space optionCyrill Gorcunov
Currently out code is rather a mix of space/tabs with sometime different indent level. Mostly because some of developers are came from kernel space. Lets shift to kernel coding standart with small steps, file by file. It really helps when you're sitting in front of laptop more than 10 hours long. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-28dwarf: Update header and drop redundant spaceCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-28dwarf: Update definitions for v4 and v5Cyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-28.gitignore: Add patches directoryCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-25strlist: use a hash tableH. Peter Anvin (Intel)
Use a hash table to enforce uniqueness in a string list. It is still an ordered list, however, and can be walked in insertion order. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2018-10-25output: macho -- Rename sect_attribs to macho_known_section_attrCyrill Gorcunov
To unify with macho_known_section in namings. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-25output: macho -- Use lookup_known_section helperCyrill Gorcunov
To make it similar to elf code. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-24output: macho -- Beautify known sectionsCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-24output: macho -- Move constants into the headerCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-21Merge branch 'nasm-2.14.xx'Cyrill Gorcunov
* nasm-2.14.xx: doc: Update changes
2018-10-21doc: Update changesCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-21Merge branch 'nasm-2.14.xx'Cyrill Gorcunov
* nasm-2.14.xx: preproc: Make the preprocessor use nasm_catfile for include path: nasm_catfile -- Fix incorrect return of filename only
2018-10-19preproc: Make the preprocessor use nasm_catfile for includenight199uk
All include paths to nasm must already have a trailing separator prefix which is uncommon among tools. Change to using nasm_catfile which gives a more normal behaviour. https://bugzilla.nasm.us/show_bug.cgi?id=3392205 Signed-off-by: night199uk <night199uk@hermitcrabslab.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-19path: nasm_catfile -- Fix incorrect return of filename onlynight199uk
nasm_catfile returns an incorrect (already incremented) pointer. https://bugzilla.nasm.us/show_bug.cgi?id=3392205 Signed-off-by: night199uk <night199uk@hermitcrabslab.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-17test: nasm-t -- Add alonesym-obj testcaseCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-17test: nasm-t -- Use new syntax for updateCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-17travis: Disable osx for a whileCyrill Gorcunov
osx update takes too long, disable it for a while. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-17Add travis status into readmeCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-17test: travis -- Add some of converted testsCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-17test: travis -- Add initial supportCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-17README: Update link to licenseCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-17Convert README to md formatCyrill Gorcunov
And update it a bit. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-15Merge branch 'nasm-2.14.xx'Cyrill Gorcunov
* nasm-2.14.xx: (83 commits) NASM 2.14rc16 doc: Update changes preproc: expand_smacro -- Fix nil dereference on error path eval: Eliminate division by zero doc: Update changes opflags: Convert is_class and is_reg_class to helpers preproc: Fix out of range access in expand mmacro doc: Update changes parser: Fix sigsegv on certain equ instruction parsing labels: Make sure nil label is never passed labels: Don't nil dereference if no label provided macho: Add warning message in macho_output() macho/reloc: Fix addr size sensitive conditions macho/reloc: Fix macho_output() to get the offset adjustments by add_reloc() macho/reloc: Fixed offset adjustment in add_reloc() macho/reloc: Allow absolute relocation when forcing a symbol reference macho/reloc: Adjust SUB relocation information macho/reloc: Fixed in handling GOT/GOTLOAD/TLV relocations macho/reloc: Simplified relocation for REL/BRANCH macho/sym: Record initial symbol number always ... Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-15NASM 2.14rc16Cyrill Gorcunov
2018-10-14doc: Update changesCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-14preproc: expand_smacro -- Fix nil dereference on error pathCyrill Gorcunov
When error happened earlier we might have a.mac already handled and set to nil. https://bugzilla.nasm.us/show_bug.cgi?id=3392508 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-14eval: Eliminate division by zeroCyrill Gorcunov
When doing division we should detect if the value we're divided by is not zero. Instead of is_unknown() helper we should use is_just_unknown(). https://bugzilla.nasm.us/show_bug.cgi?id=3392515 https://bugzilla.nasm.us/show_bug.cgi?id=3392473 Reported-by: Jun <jxx13@psu.edu> Reported-by: stuartly <situlingyun@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-13doc: Update changesCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-13opflags: Convert is_class and is_reg_class to helpersCyrill Gorcunov
So we can test for out of bound access and make helpers safe to use. https://bugzilla.nasm.us/show_bug.cgi?id=3392447 Reported-by: Jun <jxx13@psu.edu> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-13preproc: Fix out of range access in expand mmacroCyrill Gorcunov
On specially crafetd malformed input file the params might be zapped (say due to invalid syntax) so we might access out of bound having nil dereference in best case. Note the later code in this helper uses tok_isnt_ helper which already has similar check. https://bugzilla.nasm.us/show_bug.cgi?id=3392518 Reported-by: Jordan Zebor <j.zebor@f5.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-13doc: Update changesCyrill Gorcunov
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-13parser: Fix sigsegv on certain equ instruction parsingCyrill Gorcunov
We should check for bounds when accessing nasm_reg_flags. Seems this bug was for long time already. https://bugzilla.nasm.us/show_bug.cgi?id=3392516 Reported-by: Jordan Zebor <j.zebor@f5.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-13labels: Make sure nil label is never passedCyrill Gorcunov
We already catched a case where we've missed test for non nil label and in result got sigsegv, lets rather panic next time. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-13labels: Don't nil dereference if no label providedCyrill Gorcunov
An equ without label may cause nil dereference | equ 0x100 Fixes 98578071b9d71ecaa2344dd9c185237c1765041e Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-10-09macho: Add warning message in macho_output()Chang S. Bae
Based-on-code-from: zenith432 <zenith432@users.sourceforge.net> Signed-off-by: Chang S. Bae <changseok.bae@gmail.com>
2018-10-09macho/reloc: Fix addr size sensitive conditionsChang S. Bae
TLVP relocation helps GOT that is 64-bit only. Based-on-code-from: zenith432 <zenith432@users.sourceforge.net> Signed-off-by: Chang S. Bae <changseok.bae@gmail.com>