Peter Johnson [Tue, 20 Feb 2007 05:18:47 +0000 (05:18 -0000)]
CV8: Don't put any ".name" symbols into the debug symbol table. These
aren't really useful to the user, and caused issues with things like .xdata
and .pdata, which can't be referenced in other sections.
Peter Johnson [Tue, 13 Feb 2007 07:31:11 +0000 (07:31 -0000)]
Update to gettext 0.16.1.
Note that due to an m4 bug, you need at least m4 1.4.5, and autoconf built
with the newer version of m4, to run autoconf on the source now (this does
not apply if you're just running ./configure from a tarball).
Peter Johnson [Mon, 12 Feb 2007 03:48:53 +0000 (03:48 -0000)]
Add support for Win64 structured exception handling (aka .xdata and .pdata).
Requested by: Myria Chan, Brian Gladman, several others
Helped by: Brian Gladman (format documentation pointers)
This commit adds the necessary directives and some higher-level macros to
make it easier to generate the .xdata and .pdata sections needed for
structured exception handling on Win64. The overall construction mirrors
MASM very closely, so it should be possible for near-direct translation of
MASM code to Yasm; see for example objfmts/win64/tests/sce3.masm and
objfmts/win64/tests/sce4.asm. This commit does *not* break generating these
yourself (which you may want to do if you're a compiler).
This commit adds special proc macros so the function layout will look like:
The "raw pseudo operations" (.directives) as described in MSDN
(http://msdn2.microsoft.com/en-us/library/ms235231(VS.80).aspx)
have been exactly mirrored in Yasm, as follows:
[pushreg], [setframe], [allocstack], [savereg], [savexmm128], [pushframe],
[endprolog]
Note the [] are required.
Additionally, the following macros have been implemented that MASM provides
in ksamd64.inc, and as documented in MSDN
(http://msdn2.microsoft.com/en-us/library/ms235217(VS.80).aspx):
push_reg, rex_push_reg, push_eflags, rex_push_eflags, alloc_stack,
save_reg, save_xmm128, push_frame, set_frame, end_prologue
I'll next work on getting all of this documented in the user manual.
Peter Johnson [Mon, 5 Feb 2007 08:11:52 +0000 (08:11 -0000)]
Support forced identifiers ($foo) in directives. This makes yasm match
NASM behavior with regards to e.g. extern $foo.
Unfortunately this makes yasm start not matching NASM behavior with regards
to the RDF module directive. In NASM, module $foo results in a literal $foo
reference; yasm now requires either a double $ (e.g. $$foo) or quotes (e.g.
"$foo"). The special case for section (section $foo --> literal $foo) is
still present, but keeping this for other directives is extremely difficult.
Peter Johnson [Sun, 4 Feb 2007 00:41:42 +0000 (00:41 -0000)]
Fix #98. Fix implemented by merging any reserve multiple into the main
bytecode multiple.
strucsize.asm tests both creation and instantiation of a nested structure.
[1751] and [1752] fix bugs found during the testing of the instantiation
portion of this testcase.
A side effect of this change is that some errors are found in different
phases, and the error messages are slightly different. Split
reserve-error.asm testcase into two parts to still get full coverage.
Peter Johnson [Mon, 29 Jan 2007 03:32:37 +0000 (03:32 -0000)]
Massive Python/Pyrex wrapper cleanup. We now use Pyxelator to generate
the C function and data structure wrappers for Pyrex. We now require
Pyrex 0.9.5 to build the Python wrappers, as only >=0.9.5 has working
weakref support. We actually need 0.9.5.1, but it's not yet released
(0.9.5 has a crash bug in enum wrapping that we trigger).
Pyxelator works a lot better with non-anonymous enums/structs, so libyasm
has been scrubbed for this.
Peter Johnson [Sat, 27 Jan 2007 08:42:48 +0000 (08:42 -0000)]
Fix #96 by setting the timestamp in the COFF header. VC2005's incremental linker uses the
timestamp to determine if the object file has been updated, so not setting it makes for
bad behavior (the object file gets updated, but when the executable is linked it uses the
older "internal" version).
To keep tests passing, check an environment variable (YASM_TEST_SUITE); if this exists, the
timestamp is set to 0. Set this environment variable in out_test.sh.
Peter Johnson [Sat, 20 Jan 2007 05:52:32 +0000 (05:52 -0000)]
Fix bug in [1737]. Using a valid environment variable after a non-existent
one would result in the part of the string prior to the non-existent one
getting dropped.
Peter Johnson [Sat, 13 Jan 2007 19:34:04 +0000 (19:34 -0000)]
Initial commit of Mach-O object format.
Contributed by: Henryk Richter <henryk.richter@comlab.uni-rostock.de>
This adds 3 object format keywords: macho, macho32, macho64. These work in
the same way as elf, elf32, and elf64. The object format is still a work
in progress; amongst other things it does not yet support full cross-section
references (othersym1-othersym2), dynamic linking, or GAS input syntax. We
will continue to improve and work on these features in the near future.
Peter Johnson [Sat, 30 Dec 2006 02:48:17 +0000 (02:48 -0000)]
NASM parser bugfixes, and add support for section names that include "-"
(such as the common .note.GNU-stack section). While Yasm allows such section
names by enclosing with double-quotes, NASM allows this, so for compatibility
it makes sense for Yasm to as well.
Peter Johnson [Sat, 23 Dec 2006 10:20:51 +0000 (10:20 -0000)]
NASM parser: change from Bison parser to hand-written recursive descent
parser with one token of lookahead. This allows for better error handling
and proper handling of things like "xxxx"/5. There may be a minor speedup
but it's probably a wash.
Still TODO:
- Unify the expression parser with the NASM preproc one.
- Change the GAS parser to recursive descent.
Only had to change one test result; this is due to re-ordering of symrec
creation versus symrec use in data expressions such as x db y. With the
Bison parser, the symrec use (y) would come first, now the symrec creation
(x) comes first.
Peter Johnson [Sat, 23 Dec 2006 06:45:14 +0000 (06:45 -0000)]
Rename yasm_dvs_destroy() to yasm_dvs_delete() to match the fact it's an
initialized not allocated, so the function doesn't actually free the
provided pointer.
Peter Johnson [Thu, 14 Dec 2006 07:39:01 +0000 (07:39 -0000)]
Push down GAS .ident directive handling into objfmts. Note this makes it
such that only ELF and COFF actually handle .ident; all other object
formats silently ignore it.
In Win32/Win64, the .ident contents are dumped into the .rdata$zzz section
rather than the .comment section as in COFF and ELF; this is due to the
fact the GNU linker for Win32 is broken and puts .comment in the output
executable as a separate section, breaking the executable. The .rdata$zzz
name matches that used by GAS to work around this same linker bug.
Reported and tracked down by: Peter Tanski <p.tanski@gmail.com>
Peter Johnson [Tue, 12 Dec 2006 07:16:45 +0000 (07:16 -0000)]
Pyxelator: Rip out code wrapper generation. Reindent. Add yasm wrapper
generator script. Still needs additional tweaks before it can be tied
into the build.
Peter Johnson [Sun, 10 Dec 2006 07:05:06 +0000 (07:05 -0000)]
Take [1423] to the next logical step by supporting the general case of
(sym in other section)-(sym in this section) rather than just
(sym in other section)-(curpos) (e.g. sym-$). Unfortunately supporting
this required precbc to be flowed down to the value_finalize functions,
but it's relatively reasonable to do so, as all of the _finalize() routines
have access to precbc.
Peter Johnson [Sun, 26 Nov 2006 20:50:23 +0000 (20:50 -0000)]
GAS parser: match .file and .line handling to that of GAS. In GAS, both
.file (sans file number) and .line need to be given before error messages
start having the file/line numbers specified.
This temporarily breaks .rept error reporting somewhat (as the current code
outputs just .line for .rept expansion), but this will be fixed soon.