summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Replace external dependencies on <ctype.h> with an internal tablectypeH. Peter Anvin2016-03-0336-97/+228
| | | | | | | Don't rely on the platform <ctype.h>; hopefully this can avoid problems. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* test: add test for cv8 structure bug (BR 3392342 and 3392343)H. Peter Anvin2016-03-031-0/+8
| | | | | | Add test case for bugs 3392342 and 3392343. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Output preprocessor warnings to the listing fileH. Peter Anvin2016-03-031-17/+41
| | | | | | | | | | | | | Most preprocessor warnings are ERR_PASS1, but we want to see them in the listing file too. If we make it to the code-generation pass, ignore ERR_PASS* for the purpose of emitting warnings to the list file. While we are at it, allow ERR_DEBUG to specify ERR_PASS* too. From master branch checkin 4a8d10c1a004ace853dd3019814329065dda5050 Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Additional ERR_PANIC/ERR_FATAL -> nasm_panic/nasm_fatal changesH. Peter Anvin2016-03-033-12/+12
| | | | | | | | | | Additional places where we can change ERR_PANIC and ERR_FATAL to nasm_panic and nasm_fatal. Note that nasm_panic and nasm_fatal should *aways* be expected to be fatal; they should never be used in a suppressed context. It is critical that we verify that this doesn't break anything. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Get rid of a bunch of unnecessary indirectionsH. Peter Anvin2016-03-0322-450/+419
| | | | | | | | | | | | | | | | | We pass around a whole bunch of function pointers in arguments, which then just get stashed in static variables. Clean this mess up and in particular handle the error management in the preprocessor using nasm_set_verror() which already exists. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> From master branch checkin 130736c0cfcad28ee16cec6c14bb22999d982e5a Resolved Conflicts: nasm.c preproc-nop.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Replace nasm_error(ERR_FATAL/ERR_PANIC) with nasm_fatal/nasm_panicH. Peter Anvin2016-03-0318-89/+89
| | | | | | | | Replace all instances of ERR_FATAL or ERR_PANIC with nasm_fatal or nasm_panic so the compiler knows that these functions cannot return, *and* we trigger abort() if we were to ever violate that constraint. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasmlib: add nasm_fatal() like nasm_panic()H. Peter Anvin2016-03-032-5/+15
| | | | | | | | | Just like nasm_panic(), nasm_fatal() tells the compiler that we can never return from this call. From master branch checkin bbbf50839479a63841169b8995f285fb1c8a3fc5 Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* codeview: be a bit more explicit about the nature of a panicH. Peter Anvin2016-03-031-1/+1
| | | | | | | | When we have to die due to an assertion violation, then show the missing symbol. Also, use nasm_panic() rather than nasm_assert() for this purpose. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* changes.src: begin documentation for 2.12.01H. Peter Anvin2016-03-031-0/+6
| | | | | | | We probably ought to release 2.12.01 in the short term. So far the changes that have accumulated have all been build fixes. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Make --disable-werror workH. Peter Anvin2016-03-031-0/+2
| | | | | | | | | autoconf's handling of --without and --disable are a bit counterintuitive: instead of calling the "not given" branch of the conditional, they instead call the "given" part of the conditional with an argument of "no". Make --disable-werror work as expected. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* outmacho: remove unused debugging functionsH. Peter Anvin2016-03-032-33/+0
| | | | | | | Remove unused debugging functions, and the _unused macro which turned out to cause compilation problems on Linux/PowerPC. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* md5: use "compiler.h", WORDS_LITTLEENDIAN and make functions staticH. Peter Anvin2016-03-022-9/+8
| | | | | | | | Look for WORDS_LITTLEENDIAN instead of the gcc-specific __BYTE_ORDER. Use our existing "compiler.h" portability layer. Make functions which are not exported static. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Remove unnecessary C99-ismsH. Peter Anvin2016-03-029-26/+28
| | | | | | | | | | | | | | | | In order to make it more likely to compile cleanly with "C90 plus long long" style compilers, remove existing constructs (mostly commas at the end of enums) that aren't compliant. Ironically enough this was most likely an unintentional omission in C90... From master branch checkin 7214d18b405f883010a74a3f8281c7906a5a21ca Resolved Conflicts: output/outelf32.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* configure.in: add -fwrapv to gcc and compatible compilersH. Peter Anvin2016-02-271-0/+1
| | | | | | | | Add the -fwrapv to gcc and compatible C compilers, to enforce deterministic 2's-complement behavior with regards to signed and unsigned integer types. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Remove unnecessary C99 features which break Visual C++ 2010Knut St. Osmundsen2016-02-262-10/+10
| | | | | | | | Fixes Visual C++ 2010 breakage in recently added Codeview 8 code; these are C99 features which were not necessary to introduce. Signed-off-by: Knut St. Osmundsen <bird-nasm@anduin.net> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* doc: Remove --allow-64-bit leftover from help text.Knut St. Osmundsen2016-02-261-3/+0
| | | | | | | | Removes help text left behind when --allow-64-bit was turned into default behavior + warning. Signed-off-by: Knut St. Osmundsen <bird-nasm@anduin.net> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.12nasm-2.12H. Peter Anvin2016-02-261-1/+1
|
* changes.src: document Win64 buildH. Peter Anvin2016-02-261-0/+2
| | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* nasm.spec.in: document buildrequires properlyH. Peter Anvin2016-02-231-1/+1
| | | | | | | We need asciidoc, xmlto, ghostscript, texinfo in order to be able to build the documentation. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.12rc7nasm-2.12rc7H. Peter Anvin2016-02-231-1/+1
|
* outmacho: correctly handle references between sectionsH. Peter Anvin2016-02-231-19/+41
| | | | | | | | | Correctly generate references between sections. The previous version would work correctly as long as all relative references came from the first section, which is usually __TEXT,__text and so it usually worked. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* nasm.spec: change release to 0 to avoid distro conflictsH. Peter Anvin2016-02-221-1/+1
| | | | | | | Change the RPM release number to 0 so that distribution-produced RPMs will take precedence in all cases. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.12rc6nasm-2.12rc6H. Peter Anvin2016-02-211-1/+1
|
* misc/tag-release: default to --no-pushH. Peter Anvin2016-02-211-3/+5
| | | | | | --no-push is by far the safer default. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* misc/tag-release: die on unknown optionsH. Peter Anvin2016-02-211-0/+4
| | | | | | | If someone specifies an unknown option, they proabably typoed something. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM --rel=2.12rc6H. Peter Anvin2016-02-211-1/+1
|
* outmacho: make a best effort at separating SIGNED from BRANCH relocsH. Peter Anvin2016-02-211-17/+46
| | | | | | | | | | | For 64 bits, a BRANCH reloc is sometimes needed to fix up PIC problems. Make a best effort at generating BRANCH relocs just as we make a best effort at distinguishing GOTLOAD from GOT. This needs to be replaced with information from the assembler to the backend. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* test/Makefile: add a rule for nasm itselfH. Peter Anvin2016-02-181-0/+3
| | | | | | If NASM needs to be rebuilt, build it in the proper directory. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* configure.in: add --enable-werror optionH. Peter Anvin2016-02-181-8/+11
| | | | | | | | Add an option to compile with -Werror, useful for development. Change --with-ccache to --enable-ccache to match guidelines. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Platform compatibility improvementsH. Peter Anvin2016-02-182-0/+4
| | | | | | | | | | Windows: indicate that we support multibyte character sets in file names. Unix: support gigantic input and output files. Might be useful especially in the presence of the INCBIN directive. Signed-off-by: H. Peter Anvin <hpa@linux.kernel.org>
* NASM 2.12rc5nasm-2.12rc5H. Peter Anvin2016-02-181-1/+1
|
* doc: update documentation for a version 2.12 releaseH. Peter Anvin2016-02-182-24/+85
| | | | | | Add documentation updates for version 2.12. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* doc/rdsrc.pl: escape braces in regular expression to support newer PerlH. Peter Anvin2016-02-181-22/+22
| | | | | | | Newer versions of Perl require literal braces in regular expressions to be escaped. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* outmacho: default section flags should depend on section name onlyH. Peter Anvin2016-02-181-5/+2
| | | | | | | | The __TEXT segment in particular contains both code and data. The most consistent thing is to look only at the section name, and have the same behavior across sections. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* realpath: if we can't get the full path, return the known portionH. Peter Anvin2016-02-181-16/+16
| | | | | | | | | | Right now, we don't check the return value from nasm_realpath(); furthermore doing so and failing is probably not the ideal behavior. If we can't get the full canonical path, then punt and just return nasm_strdup() of the known path name; better than nothing. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* listing: remove unused variableH. Peter Anvin2016-02-171-1/+0
| | | | | | The previous commit contained an unused variable, remove it. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* listing: change the line numbers to match the source codeH. Peter Anvin2016-02-172-7/+11
| | | | | | | Instead of completely useless sequential line numbers, emit line numbers corresponding to the line numbers in the source code. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Merge tag 'nasm-2.12rc4'H. Peter Anvin2016-02-171-1/+1
|\ | | | | | | | | | | NASM 2.12rc4 Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * NASM 2.12rc4nasm-2.12rc4H. Peter Anvin2016-02-161-1/+1
| |
* | changes.src: more updates for 2.12H. Peter Anvin2016-02-171-4/+10
| | | | | | | | | | | | More updates in preparation for NASM 2.12. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | outmacho: make a copy of "fmt" instead of making it a pointerH. Peter Anvin2016-02-171-20/+20
| | | | | | | | | | | | | | | | Make a point of the output format constants instead of making it a pointer. The output format is set only once, but it is accessed all the time. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | docs: Fix typo in previous commitCyrill Gorcunov2016-02-171-1/+1
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | docs: changes -- Prepare for 2.12Cyrill Gorcunov2016-02-171-0/+19
|/ | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* outmacho: correct handling of GOT relocation, add TLVP relocationsH. Peter Anvin2016-02-161-101/+183
| | | | | | | | Correct the handling of GOT relocations, as they need a symbol reference. Add handling of TLVP relocations; it is unclear to me if non-local relocations in TLVP space is permitted. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* outmacho: fix the .rodata -> __TEXT,__const mappingH. Peter Anvin2016-02-161-17/+18
| | | | | | | | For the mapping of .rodata to __TEXT,__const in the absence of relocations, it would help if we changed the segment name *before* we emit that part of the load command. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* raa: move private parts of the implementation into raa.cH. Peter Anvin2016-02-162-44/+46
| | | | | | | Move the private aspects of the implementation into raa.c instead of exposing it to raa.h. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* outmacho: sanitize the handling of sectionsH. Peter Anvin2016-02-161-30/+18
| | | | | | | Sanitize the handling of sections in outmacho somewhat. This should bring further performance improvements. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Simplify handling of segments and segalignH. Peter Anvin2016-02-162-11/+9
| | | | | | | Slightly simplify the handling of segment number allocation. If we are in absolute space, never push a segalign down to the backend. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* outmacho: if .rodata contains no relocations, change it to __TEXT,__constH. Peter Anvin2016-02-161-3/+17
| | | | | | | | | | | If we specify .rodata as opposed to the explicit __DATA,__const, and we end up with no relocations, change it to __TEXT,__const per the Mach-O ABI. However, it is generally better for the programmer to explicitly specify the items that should go into __TEXT,__const as otherwise a single relocatable item will force the whole thing into __DATA. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* outmacho: Allow arbitrary MachO sections, avoid bss lookupH. Peter Anvin2016-02-161-108/+151
| | | | | | | | | | Allow specifying sections with arbitary MachO segment and section names, as opposed to having a fixed list of supported sections (especially __DATA,__const is wrong in some cases.) Furthermore, we do a completely unnecessary lookup of the bss section *for every call to macho_output()* which is just plain crazy. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>