platform/upstream/nasm.git
15 years agoquote: we must do unsigned comparison to get length of octal escape
H. Peter Anvin [Wed, 15 Jul 2009 20:22:47 +0000 (16:22 -0400)]
quote: we must do unsigned comparison to get length of octal escape

When computing the length of an octal escape, we need to do an
unsigned compare, otherwise we only allocate space for one character
for bytes in the \200..\377 range, which is obviously incorrect.

Reported-by: Ed Beroset <beroset@mindspring.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoquote: don't use sprintf()
H. Peter Anvin [Tue, 14 Jul 2009 18:48:26 +0000 (14:48 -0400)]
quote: don't use sprintf()

There is no point in using sprintf(), and it adds the possibility of
either bugs due to the output not matching what the byte count loop is
expecting, or just cause people to freak out due to the notion that
"sprinf is unsafe".

Reported-by: Ed Beroset <beroset@mindspring.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agodoc: use consistent title case
H. Peter Anvin [Wed, 15 Jul 2009 13:27:10 +0000 (09:27 -0400)]
doc: use consistent title case

Section titles are in title case and don't end with a period.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agodoc: fix formatting of the bin multisection header
H. Peter Anvin [Wed, 15 Jul 2009 13:21:01 +0000 (09:21 -0400)]
doc: fix formatting of the bin multisection header

"Multisection" is not a keyword...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoNASM 2.07rc5
H. Peter Anvin [Wed, 15 Jul 2009 13:08:28 +0000 (09:08 -0400)]
NASM 2.07rc5

15 years agogitignore: add test results, *.dbg
H. Peter Anvin [Tue, 14 Jul 2009 01:27:21 +0000 (21:27 -0400)]
gitignore: add test results, *.dbg

Add test result directories and *.dbg to gitignore.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoELF: add debug support for TY_YWORD
H. Peter Anvin [Tue, 14 Jul 2009 01:25:36 +0000 (21:25 -0400)]
ELF: add debug support for TY_YWORD

Add debug support for TY_YWORD (256 bits/32 bytes).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoelf32: debug32_typevalue - fix TY_OWORD size
Cyrill Gorcunov [Mon, 13 Jul 2009 20:34:21 +0000 (00:34 +0400)]
elf32: debug32_typevalue - fix TY_OWORD size

TY_OWORD is 8 * TY_WORD = 16 bytes length

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoNASM 2.07rc4
H. Peter Anvin [Thu, 9 Jul 2009 04:43:34 +0000 (21:43 -0700)]
NASM 2.07rc4

15 years agoDocument macho64 output format
H. Peter Anvin [Thu, 9 Jul 2009 04:32:28 +0000 (21:32 -0700)]
Document macho64 output format

At least mention the 64-bit macho format in the documentation.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoRevert "NASM 2.07rc4"
Keith Kanios [Thu, 9 Jul 2009 04:28:31 +0000 (23:28 -0500)]
Revert "NASM 2.07rc4"

This reverts commit 6d67ced3a470202b511dd55d8d5ac0566ac24fd6.

15 years agoNASM 2.07rc4
Keith Kanios [Thu, 9 Jul 2009 04:21:28 +0000 (23:21 -0500)]
NASM 2.07rc4

15 years agomacho64: Manually merge macho64 branch with master branch.
Keith Kanios [Thu, 9 Jul 2009 04:04:52 +0000 (23:04 -0500)]
macho64: Manually merge macho64 branch with master branch.

15 years agooutmacho.c: fix section/relocation alignment issue
Keith Kanios [Wed, 8 Jul 2009 04:09:22 +0000 (23:09 -0500)]
outmacho.c: fix section/relocation alignment issue

15 years agoNASM 2.07rc3
H. Peter Anvin [Tue, 7 Jul 2009 23:09:55 +0000 (16:09 -0700)]
NASM 2.07rc3

15 years agochanges: document listing fix
H. Peter Anvin [Tue, 7 Jul 2009 23:08:56 +0000 (16:08 -0700)]
changes: document listing fix

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agopreproc: revert to older form of preprocessor user error messages
H. Peter Anvin [Tue, 7 Jul 2009 23:06:21 +0000 (16:06 -0700)]
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>
15 years agopreproc: always reprocess smacros after %+ - pasting
H. Peter Anvin [Tue, 7 Jul 2009 23:00:58 +0000 (16:00 -0700)]
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>
15 years agolisting: preserve list file on error, include errors
H. Peter Anvin [Tue, 7 Jul 2009 19:04:12 +0000 (12:04 -0700)]
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>
15 years agooutdbg: be excrutiatingly correct...
H. Peter Anvin [Tue, 7 Jul 2009 17:27:51 +0000 (10:27 -0700)]
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>
15 years agooutdbg: fix OUT_REL*ADR, add OUT_REL8ADR
H. Peter Anvin [Tue, 7 Jul 2009 17:24:52 +0000 (10:24 -0700)]
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>
15 years agooutbin: be consistent in spelling "Intel hex" with those caps
H. Peter Anvin [Tue, 7 Jul 2009 06:37:00 +0000 (23:37 -0700)]
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>
15 years agoNASM 2.07rc2
H. Peter Anvin [Tue, 7 Jul 2009 02:28:00 +0000 (19:28 -0700)]
NASM 2.07rc2

15 years agochanges: add Mach-O alignment issue fix
H. Peter Anvin [Tue, 7 Jul 2009 02:27:33 +0000 (19:27 -0700)]
changes: add Mach-O alignment issue fix

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMerge branch 'master' of git+ssh://repo.or.cz/srv/git/nasm
Keith Kanios [Tue, 7 Jul 2009 02:08:12 +0000 (21:08 -0500)]
Merge branch 'master' of git+ssh://repo.or.cz/srv/git/nasm

15 years agooutmacho: fixed section/relocation alignment issue
Keith Kanios [Tue, 7 Jul 2009 02:07:15 +0000 (21:07 -0500)]
outmacho: fixed section/relocation alignment issue

15 years agochanges: document %+ behavior revert
H. Peter Anvin [Tue, 7 Jul 2009 02:00:08 +0000 (19:00 -0700)]
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>
15 years agopreproc: don't handle %+ until the final phase of smacro expansion
H. Peter Anvin [Tue, 7 Jul 2009 01:48:23 +0000 (18:48 -0700)]
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>
15 years agoNASM 2.07rc1
H. Peter Anvin [Mon, 6 Jul 2009 18:29:19 +0000 (11:29 -0700)]
NASM 2.07rc1

15 years agochanges.src: document user-visible changes
H. Peter Anvin [Mon, 6 Jul 2009 18:28:12 +0000 (11:28 -0700)]
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>
15 years agodoc: update license and contact information
H. Peter Anvin [Mon, 6 Jul 2009 18:22:58 +0000 (11:22 -0700)]
doc: update license and contact information

Update license information to 2-BSD; update contact information.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agospec: change License to BSD
H. Peter Anvin [Mon, 6 Jul 2009 18:14:38 +0000 (11:14 -0700)]
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>
15 years agonasm.nsi: remove COPYING; add LICENSE
H. Peter Anvin [Mon, 6 Jul 2009 18:10:42 +0000 (11:10 -0700)]
nasm.nsi: remove COPYING; add LICENSE

The licensing information has been moved into file LICENSE.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoNASM: relicense under the 2-clause BSD license
H. Peter Anvin [Mon, 6 Jul 2009 18:09:11 +0000 (11:09 -0700)]
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>
15 years agooutbin: minor cleanups
H. Peter Anvin [Mon, 6 Jul 2009 17:58:37 +0000 (10:58 -0700)]
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>
15 years agoBR 2817225: don't overrun a permts buffer with a maximum label
H. Peter Anvin [Mon, 6 Jul 2009 05:15:57 +0000 (22:15 -0700)]
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>
15 years agonasm.nsi: in the "NASM shell", put NASM first in PATH
H. Peter Anvin [Mon, 6 Jul 2009 02:33:41 +0000 (19:33 -0700)]
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>
15 years agoChange noreturn macro to no_return to avoid header file problems
H. Peter Anvin [Mon, 6 Jul 2009 02:22:28 +0000 (19:22 -0700)]
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>
15 years agonasm.nsi: use LZMA compression
H. Peter Anvin [Mon, 6 Jul 2009 02:17:07 +0000 (19:17 -0700)]
nasm.nsi: use LZMA compression

Using LZMA compression produces a significantly smaller installer
binary.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMore "make install" fixes...
H. Peter Anvin [Mon, 6 Jul 2009 01:48:50 +0000 (18:48 -0700)]
More "make install" fixes...

15 years agordf2bin: be smarter about extracting the format from argv[0]
H. Peter Anvin [Mon, 6 Jul 2009 01:31:33 +0000 (18:31 -0700)]
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>
15 years agonasm.nsi: add additional rdf2bin aliases
H. Peter Anvin [Mon, 6 Jul 2009 01:24:30 +0000 (18:24 -0700)]
nasm.nsi: add additional rdf2bin aliases

Add additiona rdf2bin aliases to nasm.nsi

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agordoff: fix "make install"
H. Peter Anvin [Mon, 6 Jul 2009 00:08:46 +0000 (17:08 -0700)]
rdoff: fix "make install"

Fix "make install" for the new rdf2bin aliases.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agotest/Makefile: add ith and srec targets
H. Peter Anvin [Sun, 5 Jul 2009 23:14:33 +0000 (16:14 -0700)]
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>
15 years agodoc: S-records seems to usually be pluralized
H. Peter Anvin [Sun, 5 Jul 2009 22:46:42 +0000 (15:46 -0700)]
doc: S-records seems to usually be pluralized

Call it "S-records" not "S-record".

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agodoc: srec produces S-records, not Intel hex...
H. Peter Anvin [Sun, 5 Jul 2009 22:45:45 +0000 (15:45 -0700)]
doc: srec produces S-records, not Intel hex...

Copy and paste accident...

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agodoc: use the term "extensions" to mean of-specific anything
H. Peter Anvin [Sun, 5 Jul 2009 22:44:38 +0000 (15:44 -0700)]
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>
15 years agodoc: fix capitalization
H. Peter Anvin [Sun, 5 Jul 2009 22:43:23 +0000 (15:43 -0700)]
doc: fix capitalization

Consistently capitalize NASM.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agooutbin: when using saa_rnbytes() we have to saa_rewind()
H. Peter Anvin [Sun, 5 Jul 2009 22:40:45 +0000 (15:40 -0700)]
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>
15 years agooutbin: when writing S-records, write head record
H. Peter Anvin [Sun, 5 Jul 2009 22:32:14 +0000 (15:32 -0700)]
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>
15 years agooutbin: add support for Intel hex and Motorola S-records
H. Peter Anvin [Sun, 5 Jul 2009 22:29:55 +0000 (15:29 -0700)]
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>
15 years agoMake it possible for outputs to be either text or binary
H. Peter Anvin [Sun, 5 Jul 2009 21:45:12 +0000 (14:45 -0700)]
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>
15 years agonasmlib.h: add unlikely() to nasm_assert()
H. Peter Anvin [Sat, 4 Jul 2009 05:55:51 +0000 (22:55 -0700)]
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>
15 years agordf2bin.1: add missing space
H. Peter Anvin [Sat, 4 Jul 2009 05:36:03 +0000 (22:36 -0700)]
rdf2bin.1: add missing space

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agordoff/test/Makefile: actually do build tests
H. Peter Anvin [Sat, 4 Jul 2009 04:19:37 +0000 (21:19 -0700)]
rdoff/test/Makefile: actually do build tests

Add actual Makefile rules for the rdoff tests.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agospec: update specfile with new rdf2bin aliases
H. Peter Anvin [Sat, 4 Jul 2009 04:12:05 +0000 (21:12 -0700)]
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>
15 years agordf2bin: update man page, add link pages for aliases
H. Peter Anvin [Sat, 4 Jul 2009 04:11:21 +0000 (21:11 -0700)]
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>
15 years agoAdd rdf2ith and rdf2srec to .gitignore
H. Peter Anvin [Sat, 4 Jul 2009 04:04:30 +0000 (21:04 -0700)]
Add rdf2ith and rdf2srec to .gitignore

15 years agoCorrect the legacy name rdf2ihx (as opposed to rdf2ith)
H. Peter Anvin [Sat, 4 Jul 2009 04:02:33 +0000 (21:02 -0700)]
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>
15 years agordf2bin: revamp so it can output bin, ith, or srec
H. Peter Anvin [Fri, 3 Jul 2009 22:30:48 +0000 (15:30 -0700)]
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>
15 years agordfload: make the base addresses unsigned
H. Peter Anvin [Fri, 3 Jul 2009 22:28:45 +0000 (15:28 -0700)]
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>
15 years agoRemove rdf2ihx.c, since it looks unlikely we'll get it relicensed.
H. Peter Anvin [Fri, 3 Jul 2009 20:40:57 +0000 (13:40 -0700)]
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>
15 years agoCorrection: preproc.c is *not* in the clear just yet.
H. Peter Anvin [Fri, 3 Jul 2009 20:39:25 +0000 (13:39 -0700)]
Correction: preproc.c is *not* in the clear just yet.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoNASM 2.06.01rc1
H. Peter Anvin [Thu, 2 Jul 2009 21:32:43 +0000 (14:32 -0700)]
NASM 2.06.01rc1

15 years agoBeginnings of a crude utility to dump the contents of an OMF file
H. Peter Anvin [Thu, 2 Jul 2009 06:11:15 +0000 (23:11 -0700)]
Beginnings of a crude utility to dump the contents of an OMF file

Beginnings of a crude utility to dump the contents of an OMF (obj)
file.  At this point all it does it breaks it down into the individual
records and dumps those, but it is still easier to read than a pure
hexdump.

See http://www.azillionmonkeys.com/qed/Omfg.pdf for the format spec.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoFix early report_error(); avoid nuisance phase warnings
H. Peter Anvin [Thu, 2 Jul 2009 05:12:59 +0000 (22:12 -0700)]
Fix early report_error(); avoid nuisance phase warnings

Fix report_error() to (hopefully) not fault if used without ERR_NOFILE
if no filename is available.

Avoid nuisance phase error between passes warnings if we have detected
other errors.  In those case, the phase error is almost certainly
spurious.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agooutobj: handle the case of SEG <undefined> in pass 0
H. Peter Anvin [Thu, 2 Jul 2009 05:04:11 +0000 (22:04 -0700)]
outobj: handle the case of SEG <undefined> in pass 0

SEG <undefined> can happen, validly, for a common symbol during the
optimization passes.  It better not happen during the real passes,
however!

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agonasmlib: add nasm_assert(); use const char * for filenames
H. Peter Anvin [Thu, 2 Jul 2009 05:02:54 +0000 (22:02 -0700)]
nasmlib: add nasm_assert(); use const char * for filenames

Add new nasm_assert() function, and add "const" to the declarations
which take filenames, as well as to the nasm_strdup/strndup functions.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agocompiler.h: new macro for a non-returning function
H. Peter Anvin [Thu, 2 Jul 2009 05:01:07 +0000 (22:01 -0700)]
compiler.h: new macro for a non-returning function

Add a new macro for a non-returning function.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agooutmacho: change license to 2-BSD
H. Peter Anvin [Wed, 1 Jul 2009 04:17:07 +0000 (21:17 -0700)]
outmacho: change license to 2-BSD

Received authorization from Apple to change the license of outmacho.c
to the 2-clause BSD license.  Thanks!

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoELF64: fix incorrect type for the .strtab section header
Cyrill Gorcunov [Tue, 30 Jun 2009 20:37:36 +0000 (00:37 +0400)]
ELF64: fix incorrect type for the .strtab section header

The .strtab section is SHT_STRTAB, not SHT_SYMTAB.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoNASM 2.06
H. Peter Anvin [Tue, 30 Jun 2009 01:02:34 +0000 (18:02 -0700)]
NASM 2.06

15 years agoheaders/doc: copyright header for documentation files
H. Peter Anvin [Mon, 29 Jun 2009 00:35:08 +0000 (17:35 -0700)]
headers/doc: copyright header for documentation files

15 years agoAdd new copyright headers to the rdoff code
H. Peter Anvin [Mon, 29 Jun 2009 00:33:50 +0000 (17:33 -0700)]
Add new copyright headers to the rdoff code

To the best of my knowledge, the only file which we don't have 2-BSD
relicensing permission for at this stage is rdf2ihx.c.  That file
probably should just be rewritten, if anyone cares.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoAdd new copyright headers to the output modules
H. Peter Anvin [Mon, 29 Jun 2009 00:25:15 +0000 (17:25 -0700)]
Add new copyright headers to the output modules

Add new copyright headers to the new output modules.  As far as I
know, the only module which we still don't have a green light to
release under 2-BSD is outmacho.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoAdd copyright headers to standard macro packages
H. Peter Anvin [Mon, 29 Jun 2009 00:18:13 +0000 (17:18 -0700)]
Add copyright headers to standard macro packages

These are all recent and written by me.  BSD license them.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoAdd copyright headers to macro files
H. Peter Anvin [Mon, 29 Jun 2009 00:16:54 +0000 (17:16 -0700)]
Add copyright headers to macro files

These are definitely overly restrictive, need auditing to pare them
down to proper BSD licensing.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMacro file copyright header
H. Peter Anvin [Mon, 29 Jun 2009 00:14:51 +0000 (17:14 -0700)]
Macro file copyright header

15 years agoAdd copyright headers to the *.c/*.h files in the main directory
H. Peter Anvin [Mon, 29 Jun 2009 00:13:04 +0000 (17:13 -0700)]
Add copyright headers to the *.c/*.h files in the main directory

Add copyright headers to the *.c/*.h files in the main directory.  For
files where I'm sure enough that we have all the approvals, I have
given them the 2-BSD license, the others have been given the "LGPL for
now" license header.  Most of them can probably be changed after
auditing.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoIn memory of Chuck...
H. Peter Anvin [Mon, 29 Jun 2009 00:12:37 +0000 (17:12 -0700)]
In memory of Chuck...

Let the 2.06 release be in memory of Chuck.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoAdd copyright header to nasmdoc.src
H. Peter Anvin [Mon, 29 Jun 2009 00:00:48 +0000 (17:00 -0700)]
Add copyright header to nasmdoc.src

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoLICENSE: include the actual BSD license
H. Peter Anvin [Sun, 28 Jun 2009 23:59:47 +0000 (16:59 -0700)]
LICENSE: include the actual BSD license

15 years agoAdd copyright notices to other *.dat files
H. Peter Anvin [Sun, 28 Jun 2009 23:58:10 +0000 (16:58 -0700)]
Add copyright notices to other *.dat files

Add copyright notices to the other *.dat files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoAdd copyright notice to insns.dat
H. Peter Anvin [Sun, 28 Jun 2009 23:56:19 +0000 (16:56 -0700)]
Add copyright notice to insns.dat

15 years agoAdd copyright verbiage to Perl scripts; update LICENSE
H. Peter Anvin [Sun, 28 Jun 2009 23:52:56 +0000 (16:52 -0700)]
Add copyright verbiage to Perl scripts; update LICENSE

This adds copyright verbiage to the Perl scripts.  Scripts that are
known to be clean w.r.t. the 2-clause BSD license are given that
license; unclear ones are given the "LGPL for now".

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoStandard copyright verbiage headers
H. Peter Anvin [Sun, 28 Jun 2009 23:50:50 +0000 (16:50 -0700)]
Standard copyright verbiage headers

15 years agoLICENSE: give the current license status.
H. Peter Anvin [Sun, 28 Jun 2009 23:34:15 +0000 (16:34 -0700)]
LICENSE: give the current license status.

15 years agoNASM 2.06rc16
H. Peter Anvin [Sun, 28 Jun 2009 07:05:26 +0000 (00:05 -0700)]
NASM 2.06rc16

15 years agoRun make alldeps
H. Peter Anvin [Sun, 28 Jun 2009 05:16:33 +0000 (22:16 -0700)]
Run make alldeps

15 years agoMove prototypes for null_debug to outform.h and outlib.h
H. Peter Anvin [Sun, 28 Jun 2009 05:15:25 +0000 (22:15 -0700)]
Move prototypes for null_debug to outform.h and outlib.h

Move the prototypes for the null debugging format to outform.h (for
the top-level structure declaration only) and outlib.h (for the
internal routines.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoMove backend-specific code to output/; break out null debug stuff
H. Peter Anvin [Sun, 28 Jun 2009 05:07:33 +0000 (22:07 -0700)]
Move backend-specific code to output/; break out null debug stuff

Move backend-specific code into the output/ directory, and make the
null debugging backend a separate file (it certainly isn't needed for
ndisasm...)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agodebug: make *all* the null debug routines available as a library
H. Peter Anvin [Sun, 28 Jun 2009 04:58:21 +0000 (21:58 -0700)]
debug: make *all* the null debug routines available as a library

Make all the null debug routines available as a library, so we can use
them whenever appropriate.  We really don't need to have a bunch of
dummy functions scattered all over the code.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agooutput: call debug init from a central location
H. Peter Anvin [Sun, 28 Jun 2009 04:54:10 +0000 (21:54 -0700)]
output: call debug init from a central location

We already call current_dfmt->init in the same place (at the very end
of ofmt->init) in all the backends that do it; instead call it
centrally in nasm.c after ofmt->init.

This fixes invalid ELF files with when compiling with -F dwarf, since
the dwarf initialization routine never got called.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agotest/Makefile: add rule to produce a .dbg file
H. Peter Anvin [Sun, 28 Jun 2009 04:28:09 +0000 (21:28 -0700)]
test/Makefile: add rule to produce a .dbg file

Add a rule to produce a .dbg file, that is, a dump of all the calls to
the back end.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agooutform: build ALL formats by default, including DBG
H. Peter Anvin [Sun, 28 Jun 2009 04:12:13 +0000 (21:12 -0700)]
outform: build ALL formats by default, including DBG

There really is no point to ever excluding a backend anymore... all it
leads to is bitrot.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agooutelf.c: add appropriate #ifdefs
H. Peter Anvin [Sun, 28 Jun 2009 04:10:09 +0000 (21:10 -0700)]
outelf.c: add appropriate #ifdefs

Only build outelf.c if ELF32 or ELF64 is included.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agooutdbg: make outdbg.c compile cleanly
H. Peter Anvin [Sun, 28 Jun 2009 04:05:42 +0000 (21:05 -0700)]
outdbg: make outdbg.c compile cleanly

Make outdbg.c compile cleanly again.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoNASM 2.06rc15
H. Peter Anvin [Sat, 27 Jun 2009 23:32:55 +0000 (16:32 -0700)]
NASM 2.06rc15

15 years agoBR 2781900: handle common labels while optimizing
H. Peter Anvin [Sat, 27 Jun 2009 23:30:00 +0000 (16:30 -0700)]
BR 2781900: handle common labels while optimizing

When optimizing, we have to keep track of common labels, since a
common symbol cannot be optimized -- only the linker will know where
it will end up.  In that sense it is similar to an EXTERN symbol.

Thus, allow them to be entered in the symbol table but make sure we
don't holler too hard on redefinition.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
15 years agoparser.c: fix stylistic nitpick
H. Peter Anvin [Sat, 27 Jun 2009 23:26:25 +0000 (16:26 -0700)]
parser.c: fix stylistic nitpick

Fix stray blank line in parser.c

Signed-off-by: H. Peter Anvin <hpa@zytor.com>