Commit graph

3512 commits

Author SHA1 Message Date
H. Peter Anvin
cf96845bf6 nasm.spec: sync with Fedora spec file, auto-generate Perl depends
Sync up with how the Fedora spec file has evolved.
Auto-generate the Perl build dependencies.
Add --enable-lto: it makes especally the rdoff files much smaller.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-23 18:33:53 -07:00
H. Peter Anvin
3e555483b3 labels, outelf: remove casts for allocations
Remove casts from allocations.  This is simply Not How To Do Things:
every cast carries a potential risk of being a toxic type misuse
(e.g. pointer as integer) and so any unnecessary cast is actively
harmful.

Note that a lot of allocations here are completely unnecessary: the
core code now guarantees that all filenames are permanently allocated
for the duration of the assembly, and so should be turned into const
char * without any further allocation.  Any remaining malloc+strcpy
should be turned into nasm_strdup(), and nasm_new[n]() used whereever
possible.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-23 17:02:46 -07:00
Chang S. Bae
4dfbd9aec5 macho: add file path to the dwarf debugging output
Apple's linker requires file path along with file name to produce
debug notes.

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-23 16:46:45 -07:00
H. Peter Anvin
9f94136c33 NASM 2.13rc21 2017-04-20 18:04:42 -07:00
H. Peter Anvin
57e08284a6 doc, html: switch to a columnar layout for a very wide window
If we open in a very wide window, split the text into columns so it
can actually be conveniently read.

Also, change the body margin to 8px, as that seems to be the more
common browser default.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-20 18:03:10 -07:00
Henrik Gramner
16d4db3aab Fix ModR/M.mod for EVEX instructions
It was incorrectly set to 01b in some cases when where it should be 10b.

Fixes BR 3392402.

Signed-off-by: Henrik Gramner <henrik@gramner.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-20 17:48:44 -07:00
H. Peter Anvin
32b9824f5c doc: formatting fixes to the warnings documentation
Formatting and language consistency cleanups to the sections about
disabling and enabling warning classes.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-20 02:03:59 -07:00
H. Peter Anvin
c2f371c0b9 Merge branch 'master' of ssh://repo.or.cz/nasm 2017-04-20 01:39:42 -07:00
H. Peter Anvin
4d993a1c03 doc: update links to ABI documents
We have a separate namespace for ABI documents.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-20 01:36:57 -07:00
H. Peter Anvin
b68edcac72 tools/release: make doesn't like MAKE in the environment, so call it makej
make really doesn't like something called MAKE in the environment, so
call it makej like buildall.sh on the server.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-18 10:52:05 -07:00
H. Peter Anvin
5f46eea191 tools/release: don't double-quote $MAKE
We actually want it broken down into words... (e.g. make -jX).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-18 10:39:07 -07:00
H. Peter Anvin
ab8c1d2ee5 tools/release: allow invoking make as a parallel build
If the variable MAKE is set in the environment, use it.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-18 10:35:15 -07:00
H. Peter Anvin
7e9d4fdf8d nasmdoc.pdf: always begin a chapter on an odd page
If we want to print the document, we really want each chapter to start
on an odd (right-facing) page; otherwise it gets rather strange.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-17 16:01:31 -07:00
H. Peter Anvin
84deac219d rdoff.c: one more unsafe use of fread()
Use the same error pattern as the rest of the calls in this function.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-17 14:25:13 -07:00
H. Peter Anvin
6edeb335f0 rdflib.c: fix(?) one more unsafe use of fread()
It isn't 100% clear what is the right thing to do in this particular
case, so this is my best attempt...

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-17 14:22:32 -07:00
H. Peter Anvin
f20f1878f5 NASM 2.13rc20 2017-04-17 14:15:51 -07:00
H. Peter Anvin
3d6d7331ab rdoff: add back rdfutils.h missing from previous checkin
Checkin 8dc965347d was missing this
file, causing obvious failures.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-17 14:14:26 -07:00
H. Peter Anvin
cea308b3dc changes.src: document DWARF support for Mach-O
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-17 14:05:51 -07:00
H. Peter Anvin
3e66fcd8f8 NASM 2.13rc19 2017-04-17 14:02:38 -07:00
Chang S. Bae
5431732560 Fix errors uncovered by clang warnings
1. One incorrect variable use(!)
2. One possibly uninitialized variable.

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-17 14:01:33 -07:00
Chang S. Bae
d685bdd65c outmacho: dwarf debug (4/4)
line information added in dwarf output

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-17 14:00:20 -07:00
Chang S. Bae
2c2272a86d outmacho: dwarf debug (3/4)
debug information sections now generated.

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-17 14:00:20 -07:00
Chang S. Bae
6d14596476 outmacho: dwarf debug (2/4)
file and section list added for managing debug line info
also, now macho parts get to call debug interfaces

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-17 14:00:18 -07:00
Chang S. Bae
6a912a3c90 outmacho: dwarf debug (1/4)
skeletion interfaces

MachO Dwarf is basically porting of ELF's DWARF implementations
and it includes debug line information and some debug meta data

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-17 14:00:16 -07:00
Chang S. Bae
3b26c45e7f outmacho: align filesize together with vmsize
According to the Mach-O spec this should not be necessary for .o
files, but it seems that we get problems with extracted dsyms if this
is not done, so do this for now -- we might be able to troubleshoot
this later.

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-17 14:00:07 -07:00
H. Peter Anvin
ef1ea87c3c Merge branch 'master' of ssh://repo.or.cz/nasm 2017-04-17 13:57:59 -07:00
H. Peter Anvin
8dc965347d rdoff: use nasm-provided safe memory allocation and I/O
We already have abort-on-error memory allocation and I/O operations in
nasmlib, so use them for rdoff as well.

Delete long-since-obsolete rdoff Mkfiles directory.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-17 13:56:50 -07:00
H. Peter Anvin
aa319b93e9 doc: add the version number to the HTML output
Add the subtitle (e.g. "version XXXX...") to the HTML output.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-17 02:18:50 -07:00
H. Peter Anvin
984c6011ba doc/genps: make sure we pick up nasmlogo.eps when building cross-dir
When building in a different directory, we still want to make sure we
pick up nasmlogo.eps.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-17 01:38:41 -07:00
H. Peter Anvin
d31a74e301 doc: add a local.css specifically to be overridden locally
Add a file local.css which is referenced *after* nasmdoc.css, thus
overriding the latter.  This file intentionally has no actual content,
which means it can be overridden locally for any desired content,
e.g. indexing into web fonts or overriding any of the style.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-16 23:52:23 -07:00
Ed Beroset
74fa0a736a configure.ac, doc/Makefile.in: fix out-of-directory build
Missed some necessary updates.

Signed-off-by: Ed Beroset <beroset@ieee.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-14 15:28:18 -07:00
H. Peter Anvin
8106a9c2ad nasmdoc.css: no need to go overboard with the yellow highlight...
Make the yellow highlight for the link target a little bit less
bright, so that it is still instantly visible but less immediately
demanding of attention.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-14 12:50:17 -07:00
H. Peter Anvin
b4f2409d41 nasmdoc.src: move bug reporting to appendix, mention forums
Move information about the bug reporting to the appendix.  Split
building from source and website/community info into separate
appendices.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-14 12:26:16 -07:00
H. Peter Anvin
289f9e4429 nasmdoc.css: highlight the target of an #-link
It is much easier to spot if we get a nice highlight...

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-14 12:25:43 -07:00
H. Peter Anvin
8c81ae0363 doc/rdsrc: make sure HTML tags are properly closed
The last file wouldn't necessarily close all the tags.  Sigh.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-14 12:25:10 -07:00
H. Peter Anvin
9a5595ceba nasmdoc.css: specify #-link position in terms of vertical height
Using ems breaks because the header font sizes aren't the same as the
navbar font size.  We could work around that by explicitly specifying
sizes for all of them, but for now, just specify that the link target
should end up 10% below the top of the window.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-14 11:31:43 -07:00
H. Peter Anvin
48e2009f62 doc: in the HTML navbar, be explicit about the target
Show thinks like "Chapter 2" and "Chapter 4" instead of "Previous
Chapter"/"Next Chapter".

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-14 10:27:13 -07:00
H. Peter Anvin
704c2c6b70 nasmdoc.css: adjust the top of #-links
Use a css trick to make sure that the targets of #-links don't end up
underneath the navbar.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-14 10:18:39 -07:00
Ed Beroset
d219c55643 configure, doc/Makefile.in: fix out-of-directory build
Fix bit rot for out of directory builds.

Signed-off-by: Ed Beroset <beroset@mindspring.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-14 09:54:17 -07:00
H. Peter Anvin
8c8234bf68 NASM 2.13rc18 2017-04-14 03:02:24 -07:00
H. Peter Anvin
ebb8a46386 doc: don't try to install info files we no longer build
No more info files, so don't try to install them...

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-14 02:55:37 -07:00
H. Peter Anvin
22fe5b0760 doc: generate proper XHTML for the contents and index
The table of contents and index needed rework to be valid (X)HTML.
The TOC in particular needed some fairly significant rework - it is
supposed to be an ordered list, after all.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-14 01:50:13 -07:00
H. Peter Anvin
322401fcbc doc: remove obsolete and, quite frankly, condecending information
Remove some highly obsolete and, quite frankly, condecending
introductory content.  For most users, downloading and especially
compiling is no longer an immediate issue, so move that information to
an appendix.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-14 00:35:33 -07:00
H. Peter Anvin
2760e76ef9 NASM 2.13rc17 2017-04-14 00:03:00 -07:00
H. Peter Anvin
d6616be3cf nasmdoc.css: format link better for our needs
The way links are done in the NASM documentation it makes more sense
not to underline them.  Also inhibit coloring for printing.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-14 00:02:43 -07:00
H. Peter Anvin
30aa2ec5f7 tools/release: update the list of binary files
Update the patterns for binary files.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-13 23:16:08 -07:00
H. Peter Anvin
5194f77bfd doc: add indented paragraphs, valid XHTML, CSS style sheet
Add indented paragraphs, which can be used to continue an item in a
bulleted list.

Produce valid strict XHTML, and include a style sheet with a navbar
and other fancy things.

Remove archaic output formats.  Now only text, XHTML, and PDF are
supported.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-13 22:12:05 -07:00
H. Peter Anvin
b1778ef7dd doc/genps.pl: move all formatting options to the front
Move all the formatting options to the beginning of the file.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-04-13 17:14:09 -07:00
H. Peter Anvin
f13effec22 doc: add the option to generate an uncompressed PDF
An uncompressed PDF is about twice as big, but if one is using an
external compression program (e.g. .pdf.xz) it compresses far better.
Use it for the RPM specfile.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-10 16:10:28 -07:00
H. Peter Anvin
c11e23004f nasm.spec.in: drop nasmdoc.ps.gz, compress .txt and .pdf with xz
Drop nasmdoc.ps(.gz), being redundant and inferior to nasmdoc.pdf.

Tools now generally support xz compression out of the box so use xz
compression for these files.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2017-04-10 15:42:02 -07:00