Commit Graph

1765 Commits

Author SHA1 Message Date
Keith Kanios
745560e65a outmacho.c: fix section/relocation alignment issue 2009-07-07 23:09:22 -05:00
H. Peter Anvin
52a3fbd74d NASM 2.07rc3 2009-07-07 16:09:55 -07:00
H. Peter Anvin
a7a14b2fcb changes: document listing fix
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-07 16:08:56 -07:00
H. Peter Anvin
931cab64d6 preproc: revert to older form of preprocessor user error messages
When the user generates an error via %warning, %error, or %fatal,
treat is as any other error message.  The attempt at making them stand
out really looked ugly when the preprocessor adds additional tracing
information.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-07 16:06:21 -07:00
H. Peter Anvin
8287daf2a4 preproc: always reprocess smacros after %+ - pasting
We always need to process %+ at least once, but we also always need to
reprocess smacros after pasting.  The solution to this is to make sure
we always reprocess %+ after the first expansion pass.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-07 16:00:58 -07:00
H. Peter Anvin
a23aa4a3e9 listing: preserve list file on error, include errors
Instead of removing the list file on error, keep the list file and
include the errors in the list file.  This makes it actually possible
to debug things that involve deep macro recursion, where the line
number is pretty much meaningless.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-07 12:04:12 -07:00
H. Peter Anvin
5bc87609d2 outdbg: be excrutiatingly correct...
outdbg is actually a good starting point to make a new backend, so we
really should endeavor to make it do things "right".

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-07 10:27:51 -07:00
H. Peter Anvin
62c0e8379c outdbg: fix OUT_REL*ADR, add OUT_REL8ADR
The OUT_REL*ADR types pass a pointer which points to an int64_t
which then should be truncated down to size.  This matters on
bigendian platforms.

Add OUT_REL8ADR.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-07 10:24:52 -07:00
H. Peter Anvin
215086ace8 outbin: be consistent in spelling "Intel hex" with those caps
The documentation uses "Intel hex", with that capitalization (Intel
being a proper noun, hex being descriptive) so make the help message
match.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-06 23:37:00 -07:00
H. Peter Anvin
75639312f0 NASM 2.07rc2 2009-07-06 19:28:00 -07:00
H. Peter Anvin
e227fe6f80 changes: add Mach-O alignment issue fix
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-06 19:27:33 -07:00
Keith Kanios
4e56ad2c09 Merge branch 'master' of git+ssh://repo.or.cz/srv/git/nasm 2009-07-06 21:08:12 -05:00
Keith Kanios
5051c63d7e outmacho: fixed section/relocation alignment issue 2009-07-06 21:07:15 -05:00
H. Peter Anvin
83b942d3e1 changes: document %+ behavior revert
Revert to original %+ behavior.  This is what we really wanted in the
first place, except this time we have fixed some bugs.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-06 19:00:08 -07:00
H. Peter Anvin
fc30f8c736 preproc: don't handle %+ until the final phase of smacro expansion
Revert to the earlier behavior of not expanding %+ until the final
phase of smacro expansion.  However, the previous code has:

    if (expanded && paste_tokens(&thead, true)) {

... which would inhibit paste_tokens() if expanded was false on the
first iteration.  However, if expand_mmac_params is not expanding %+,
then we cannot bypass this expansion.  Thus use:

    pasted = paste_tokens(&thead, true);
    if (expanded && pasted) {

... instead.

This seems to work with both Syslinux and x264 usage, and therefore
hopefully should be compatible with earlier versions of NASM.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-06 18:48:23 -07:00
H. Peter Anvin
740df43005 NASM 2.07rc1 2009-07-06 11:29:19 -07:00
H. Peter Anvin
fba06d2719 changes.src: document user-visible changes
Update user-visible changes so far.  Since I consider the license
change alone to be big enough of a deal to justify a "real" version
number, make this version 2.07.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-06 11:28:12 -07:00
H. Peter Anvin
ecfba9d6ab doc: update license and contact information
Update license information to 2-BSD; update contact information.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-06 11:22:58 -07:00
H. Peter Anvin
460a4fef3a spec: change License to BSD
The appropriate License tag for the 2-clause BSD license is... wait
for it... "BSD".  Make it so.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-06 11:14:38 -07:00
H. Peter Anvin
4ea9cede34 nasm.nsi: remove COPYING; add LICENSE
The licensing information has been moved into file LICENSE.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-06 11:10:42 -07:00
H. Peter Anvin
8ee2e244eb NASM: relicense under the 2-clause BSD license
*To the best of my knowledge*, we now have authorization from everyone
who has significantly contributed to NASM in the past.  As such,
change the license to the 2-clause BSD license.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-06 11:09:11 -07:00
H. Peter Anvin
0bc3bf61db outbin: minor cleanups
- add assert so we don't try to write 2^64 bytes of zero
- explicitly track the Intel hex "LBA" (64K page) instead of playing
  games with the last byte written.  This way it is more explicit
  what we're doing and why.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-06 10:58:37 -07:00
H. Peter Anvin
565be91fb7 BR 2817225: don't overrun a permts buffer with a maximum label
BR 677841 was fixed backwards, with a reverse condition.  Correct the
direction of the fix, and add an assert for the overflow condition.

Note: the bug was non-manifest in previous build, so this is not a
security issue.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 22:15:57 -07:00
H. Peter Anvin
5cc5589b73 nasm.nsi: in the "NASM shell", put NASM first in PATH
In the "NASM shell", it makes sense for NASM to be first in the PATH,
not last.  That way if the user has more than one version of NASM
installed, and one of them is global, the "NASM shell" for any one
version will still pick up the proper version.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 19:33:41 -07:00
H. Peter Anvin
84280bbf88 Change noreturn macro to no_return to avoid header file problems
Change the "noreturn" macro to "no_return", to avoid problems with
system header files which use __attribute__((noreturn)) rather than
__attribute__((__noreturn__)) as is appropriate for system headers.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 19:22:28 -07:00
H. Peter Anvin
86eb8b057f nasm.nsi: use LZMA compression
Using LZMA compression produces a significantly smaller installer
binary.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 19:17:07 -07:00
H. Peter Anvin
7ae512b5a8 More "make install" fixes... 2009-07-05 18:48:50 -07:00
H. Peter Anvin
2fa822b3b3 rdf2bin: be smarter about extracting the format from argv[0]
Consider that argv[0] may contain extensions like .exe as well as
pathname prefixes.  Handle it by searching backwards for the string
"rdf2" and then extract the alphanumeric tail that follows.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 18:31:33 -07:00
H. Peter Anvin
3692a63e0c nasm.nsi: add additional rdf2bin aliases
Add additiona rdf2bin aliases to nasm.nsi

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 18:24:30 -07:00
H. Peter Anvin
662b3fe3a4 rdoff: fix "make install"
Fix "make install" for the new rdf2bin aliases.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 17:08:46 -07:00
H. Peter Anvin
fd18c5c42b test/Makefile: add ith and srec targets
Add ith and srec targets because, well, why not...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 16:14:33 -07:00
H. Peter Anvin
224c9ac063 doc: S-records seems to usually be pluralized
Call it "S-records" not "S-record".

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 15:46:42 -07:00
H. Peter Anvin
d78fc550b8 doc: srec produces S-records, not Intel hex...
Copy and paste accident...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 15:45:45 -07:00
H. Peter Anvin
fc87e65aec doc: use the term "extensions" to mean of-specific anything
We seem to use the term "extensions" to mean anything that is specific
to an object format, so continue to do so.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 15:44:38 -07:00
H. Peter Anvin
8a3686287d doc: fix capitalization
Consistently capitalize NASM.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 15:43:23 -07:00
H. Peter Anvin
ffe782a322 outbin: when using saa_rnbytes() we have to saa_rewind()
Using saa_fpwrite() to dump a section to a file automatically does
saa_rewind(), but if we use saa_rnbytes() to do bit by bit then we
manually need to to saa_rewind() before we start.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 15:40:45 -07:00
H. Peter Anvin
31f336183c outbin: when writing S-records, write head record
When writing S-record output, we should write the head record (S0),
too.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 15:32:14 -07:00
H. Peter Anvin
4660a2b4a0 outbin: add support for Intel hex and Motorola S-records
Add support for directly generating Intel hex or Motorola S-records.
These formats are commonly used with ROM burners.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 15:29:55 -07:00
H. Peter Anvin
0cba107579 Make it possible for outputs to be either text or binary
Allow the backend to specify that an output format is either text or
binary.  For future uses, define this as a flag word so we can define
other flags in the future if it would make sense.

Currently, the ieee and dbg formats are text; all the others are
binary.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-05 14:45:12 -07:00
H. Peter Anvin
fe1ca5a09f nasmlib.h: add unlikely() to nasm_assert()
We explicitly want the compiler to pessimize the taken case of the
assert, so unlikely() is appropriate here.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-03 22:55:51 -07:00
H. Peter Anvin
7f2c476297 rdf2bin.1: add missing space
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-03 22:36:03 -07:00
H. Peter Anvin
06c05ae72a rdoff/test/Makefile: actually do build tests
Add actual Makefile rules for the rdoff tests.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-03 21:19:37 -07:00
H. Peter Anvin
20c1d4136d spec: update specfile with new rdf2bin aliases
Update the specfile to contain the new rdf2bin aliases and their man
pages.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-03 21:12:05 -07:00
H. Peter Anvin
a0374589aa rdf2bin: update man page, add link pages for aliases
Update the rdf2bin man page; add link man pages for the various
command aliases.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-03 21:11:21 -07:00
H. Peter Anvin
80c0ba7b0b Add rdf2ith and rdf2srec to .gitignore 2009-07-03 21:04:30 -07:00
H. Peter Anvin
c1f13fc80f Correct the legacy name rdf2ihx (as opposed to rdf2ith)
The more common acronym for Intel Hex seems to be "ith", but the
legacy utility was "rdf2ihx", so we allow both variants.  However, the
Makefile rule was wrong.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-03 21:02:33 -07:00
H. Peter Anvin
1e5b102109 rdf2bin: revamp so it can output bin, ith, or srec
Revamp rdf2bin so it can output binary, Intel hex, or Motorola
S-records.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-03 15:30:48 -07:00
H. Peter Anvin
099f05dce4 rdfload: make the base addresses unsigned
Make the base addresses in rdfload unsigned.  Note: this file is
really obsolete; it can't represent RDF2 with more than the 3
old-style segments.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-03 15:28:45 -07:00
H. Peter Anvin
6c98ca4ddc Remove rdf2ihx.c, since it looks unlikely we'll get it relicensed.
Remove rdf2ihx.c since I think it's unlikely we'll ever get it
relicensed -- any attempts at contacting the author has failed, and
it's easier to reconstruct it from scratch.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-03 13:40:57 -07:00
H. Peter Anvin
a8db5089b4 Correction: preproc.c is *not* in the clear just yet.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-07-03 13:39:25 -07:00