Commit Graph

1535 Commits

Author SHA1 Message Date
H. Peter Anvin
695a171ec9 test: add test for BR 2222615
Add a test for %ifmacro, per BR 2222615.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-11-04 14:25:12 -08:00
H. Peter Anvin
ec86b6ffe3 preproc: BR 2222615: fix segfault on bogus %ifmacro
BR 2222615: Fix segmentation fault on %ifmacro without an argument.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-11-04 14:24:34 -08:00
Charles Crayne
e2dea103db Prevent erroneous extra "final" pass
Specifically check for end of final pass.
2008-11-03 18:21:24 -08:00
H. Peter Anvin
e263d04544 doc/changes.src: document ELF TLS
Add ELF TLS to the release notes.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-11-02 20:41:29 -08:00
H. Peter Anvin
76fab7ab17 doc: minor edit to the TLS documentation examples.
Minimize the TLS documentation examples (we don't need "dword" in a
mov from ebx, for example.)  This is just to avoid user confusion.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-11-02 20:40:16 -08:00
Charles Crayne
81afb49809 Document differences between TLS coding in ELF32 and ELF64
Absolute relocation wrt ..tlsie for ELF32
Relative relocation wrt ..gottpoff for ELF64
2008-11-01 17:09:36 -07:00
Charles Crayne
5fb6a39bc9 ELF32 support for offset to IE GOT entry
Add new WRT type ..tlsie.
Generate R_386_TLS_IE relocation entries
for references to thread local variables.
2008-11-01 16:48:31 -07:00
H. Peter Anvin
b6e36102e6 version.pl: snapshot releases *only* have digits in the tail
Snapshot releases have *only* digits in the tail.  "git describe"
produces tails that have digits in them, but aren't numeric.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-11-01 12:57:05 -07:00
H. Peter Anvin
4b9358928b Move all version strings to a single compilation unit (ver.c)
Move all the version strings to a single compilation unit, ver.c; this
does not include the version macros, which are fed into macros.c.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-31 16:53:49 -07:00
Charles Crayne
dcd3a21145 ELF32 bit support of .tdata and .tbss sections
Set default attributes for .tdata and .tbss sections
Implement new attribute 'tls' for arbitrary section names
Flag variables in sections with tls attribute with STT_TLS
2008-10-30 21:59:42 -07:00
H. Peter Anvin
e8873121aa rbtree: drop the data pointer; instead rely on being embedded
Drop the data pointer, and instead assume the struct rbtree will be
embedded in a bigger data structure (to be extracted via
container_of()).

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-30 10:58:28 -07:00
H. Peter Anvin
9656a581cd compiler.h: add offsetof() and container_of()
offsetof() is a C99 construct; provided here as an ersatz for older
systems.

container_of() is a nonstandard but highly useful construct, which
allows data structure control items like tree structures to be
embedded in larger data structures without the penalty of extra
pointers and allocations.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-30 10:54:55 -07:00
H. Peter Anvin
3e364fe274 Left-leaning red-black tree data structure
Implement library functions for "left-leaning red-black trees" with
uint64_t keys.  This is meant for looking up symbols by address in the
backends that need to do so, e.g. ELF.

A good question is if there is a better way to do this, that recovers
the original symbol, but that's a future issue.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 23:31:56 -07:00
H. Peter Anvin
034b009e51 Fix header guards for outlib.h
Fix typo in header guards for outlib.h

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 23:31:56 -07:00
H. Peter Anvin
5da04b035c make alldeps
Run "make alldeps"

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 21:03:17 -07:00
H. Peter Anvin
8321866bb5 doc: cross-reference macro parameter concatenation with %[...]
Explicitly document that %[...] and macro parameters concatenate the
same way, and cross-reference the two.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 21:02:30 -07:00
H. Peter Anvin
ad3d21fdb6 Merge branch 'nasm-2.05.xx' 2008-10-29 20:47:58 -07:00
H. Peter Anvin
79ced5ad36 doc: fix typo in the description of %unmacro
The description of %unmacro used %unmacro in a place which should
obviously have been %macro.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 20:47:47 -07:00
H. Peter Anvin
c84fa31d04 doc: fix capitalization
Make the capitalization of "The -t Option" consistent with the other
options.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 20:47:40 -07:00
H. Peter Anvin
3b142db39e doc: remove duplicate entry for the "error" warning class
Remove duplicate entry for the "error" warning class; leave at the end
with "all", as being another meta-warning class.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 20:47:32 -07:00
H. Peter Anvin
d37e5232b4 doc: retroactively document updates to the warning options
Retroactively document the following changes to the warning options:

  - gcc-like syntax (-Wfoo, -Wno-foo)
  - "all" alias
  - "error" metawarning

Added in 2.00rc1 but never documented.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 20:47:25 -07:00
H. Peter Anvin
6c9f6f8e3d doc: fix typo in the description of %unmacro
The description of %unmacro used %unmacro in a place which should
obviously have been %macro.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 20:46:30 -07:00
H. Peter Anvin
2d9ceaa3ee doc: fix capitalization
Make the capitalization of "The -t Option" consistent with the other
options.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 18:17:59 -07:00
H. Peter Anvin
b7aaf0b9e5 doc: remove duplicate entry for the "error" warning class
Remove duplicate entry for the "error" warning class; leave at the end
with "all", as being another meta-warning class.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 18:16:31 -07:00
H. Peter Anvin
8a2f145260 doc: retroactively document updates to the warning options
Retroactively document the following changes to the warning options:

  - gcc-like syntax (-Wfoo, -Wno-foo)
  - "all" alias
  - "error" metawarning

Added in 2.00rc1 but never documented.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 18:14:03 -07:00
H. Peter Anvin
fd366a9db4 Merge commit 'nasm-2.05.01'
Conflicts:
	doc/changes.src
2008-10-29 10:53:37 -07:00
H. Peter Anvin
32f58028da NASM 2.05.01 2008-10-29 10:52:53 -07:00
H. Peter Anvin
7714ced1d9 doc/changes.src: document -W/-w fix as a NASM 2.05.01 feature.
Make -W/-w fix a release note for NASM 2.05.01.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-29 10:51:51 -07:00
Charles Crayne
ea2c1f9b46 Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm 2008-10-27 22:54:38 -07:00
Charles Crayne
ee5245a9f2 Initial documentation for ELF64 TLS
More to come.
2008-10-27 22:53:40 -07:00
H. Peter Anvin
03c4f90afa output: add common file outlib.c for common functions; realsize()
Add a common file, outlib.c, for output formats.  Add the function
realsize() instead of open-coded variants in almost every backend.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-27 22:19:59 -07:00
H. Peter Anvin
67c637236a preproc: merge expand_mmac_params() and expand_indirect()
These two really need to be done together, in order for constructs
such as %[%1] to work properly.  Furthermore, fix a token-pasting bug
in expand_mmac_params().

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-26 23:49:00 -07:00
Charles Crayne
429265163e Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm 2008-10-26 17:33:43 -07:00
Charles Crayne
10a863d87e ELF64 support for PC relative offset to IE GOT entry
Add new WRT type ..gottpoff.
Generate R_X86_64_GOTTPOFF relocation entries
for references to thread local variables.
2008-10-26 17:32:38 -07:00
H. Peter Anvin
15c6be8d75 Merge branch 'nasm-2.05.xx' 2008-10-26 09:00:45 -07:00
H. Peter Anvin
9a65f71d64 Better description of the number-overflow warning
Better grammar and fix incorrect description of the number-overflow
warning (it is not just limited to 64-bit arithmetic overflow, it also
triggers when trying to squeeze in a value which is too large into an
immediate.)

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-26 08:59:04 -07:00
H. Peter Anvin
6f4e92b760 BR: 2196966: make the -w/-W options work again
The code to parse the -w/-W options was updating warning_on[], not
warning_on_global[], but warning_on[] is reset at the beginning of
each pass (to let the warning directive work); as a result the -w/-W
options don't actually do anything at all.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-26 08:57:13 -07:00
Charles Crayne
b0e0718267 Merge branch 'master' of git+ssh://ccrayne@repo.or.cz/srv/git/nasm 2008-10-25 19:32:48 -07:00
Charles Crayne
efb515b98e Flag thread local symbols in symbol table
Set STT_TLS in symbol table for symbols declared
in thread local storage sections. Note that,
for now at least, such symbols must also be
declared as GLOBAL.
2008-10-25 19:31:09 -07:00
H. Peter Anvin
a168ab1e01 smartalign: clean up unnecessary duplication; tweak dependencies
Remove unnecessary duplicated patterns; with indirection we can handle
lists of any length.

For 16-bit generic padding, alternate between SI and DI dependencies.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-25 17:48:33 -07:00
Charles Crayne
4adf21c08c ELF64 segment definitions for TLS
Add default definitions for .tdata & .tbss sections
Add definition for SHF_TLS section header flag
Add support for "tls" keyword on section statement
2008-10-25 15:23:30 -07:00
H. Peter Anvin
9ee0ceadff For snapshot releases, expand out the mangled version numbers.
For snapshot releases, expand out the mangled version number,
e.g. 2.05.00.0.20081025.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-25 12:41:29 -07:00
H. Peter Anvin
92d36121b9 disasm: introduce opy
Introduce the opy pointer into the disassembler, and use it where
appropriate.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-25 00:42:51 -07:00
H. Peter Anvin
ae64c9d819 assemble: use opx and opy in a few more places
Use opx and opy in a few more places where we can do so.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-25 00:41:00 -07:00
H. Peter Anvin
c83f9de3b4 doc/changes.src: retroactively document anonymous %push
Retroactively document the anonymous %push, which was added in version
2.04 but not documented.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-24 16:53:53 -07:00
H. Peter Anvin
264b7b982c preproc: don't macro-expand the argument to %use
Use expand_id() for the argument to %use, instead of expand_smacro().
This really makes more sense for a "naked" argument.  This is a
semantic change, but is unlikely to break any real code.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-24 16:38:17 -07:00
H. Peter Anvin
0b7d903ec8 doc: document %pop with argument
Document that %pop can now take an argument, and what it does.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-24 16:27:11 -07:00
H. Peter Anvin
42b5639664 preproc: allow %pop to take an identifier, unify %push/%repl/%pop
Allow the %pop directive to take an identifier (an assert on the
context name); unify the parsing parts of %push, %repl,  and %pop.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-24 16:24:21 -07:00
H. Peter Anvin
59c2e54f25 doc: document anonymous %push
The anonymous %push was never documented, document it now.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-24 16:19:03 -07:00
H. Peter Anvin
b34fce7111 doc/changes.src: begin the release notes for 2.06
The next version will presumably be called 2.06; begin collecting
release notes.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2008-10-24 16:05:19 -07:00