changes to the dbgfmt interface, and other assorted updates, including:
* yasm.c now calls df->initialize() and df->generate()
* a dbgfmt bytecode type with associated handling
* yasm_output_reloc_func type for use particularly by dbgfmts
* df: initialize updated; generate, bc_dbgfmt_data_{output|delete|print} added
* null-dbgfmt structure brought in line with these additions
* elf-objfmt made aware of stabs sections, and what to do with them
The bad news:
* just enough stabs output to support line number information in GDB
* GDB identifies function labels off by 3 bytes in my test, but line
numbers remain correct, somehow. Unknown whether stabs-dbgfmt or GDB
at fault.
svn path=/trunk/yasm/; revision=1037
module users to ensure the module interface they're using matches the
interface the module was compiled with. The #define YASM_module_VERSION
should be incremented on every functional change to the module interface.
svn path=/trunk/yasm/; revision=1021
differentiate e.g. AMD64 from x86. Doesn't prohibit anything in x86 yet,
but does standardize unsupported warnings across objfmts (most objfmts will
not support all machines and/or all architectures).
svn path=/trunk/yasm/; revision=1020
use of configure.ac's --enable-warnerror, which was set up to disable
conversion errors due to flex's warning-prone generated code. As we no
longer use flex, fix configure.ac to not disable conversion errors.
svn path=/trunk/yasm/; revision=1018
- Switch to bit-based output, including shift capability
- This means the standard intnum output functions can be used for non-byte
oriented archs like LC-3b (implemented)
- Default out of range (overflow) warnings for intnum (bugzilla bug 14)
- Change floating point overflow/underflow errors to warnings
To do (hooks but not implemented):
- Shifting floatnums into destination
- Floatnum destinations larger than floatnum value
- Big endian support for intnum and floatnum
Related simultaneous changes:
- Use bc instead of ep in objfmt output_expr() functions; while bc->line
should == (*ep)->line, in case they differ, we want to use the bc->line
so as not to confuse users.
- lc3b-mp22NC test was not properly offsetting the accessed variables, but
since the variable "sections" started at an aligned offset, the output
was actually correct. The new intnum warnings uncovered this issue, so
fix code to be correct (and not generate warnings).
svn path=/trunk/yasm/; revision=1017
expression line number instead of the start line number (which may be 0,
which isn't nearly as useful as the expression line number).
svn path=/trunk/yasm/; revision=1016
all <32 bit positive numbers are collapsed into ul form.
yasm_intnum_is_neg1(): fix bug which would equate 0xffffffff as -1.
svn path=/trunk/yasm/; revision=1010
intnum folding on and leveling performed would result in terms getting copied
over due to hitting o != i case after i++ but no o++.
Bugzilla: #12.
Reported by: meor@softhome.net
svn path=/trunk/yasm/; revision=1009
yasm_intnum_get_int(): Properly overflow and handle INTNUM_UL properly
Elsewhere: use wordptr instead of intptr.
yasm_intnum_check_size() is still broken, but the interface for this will be
changing soon, so fix it then.
svn path=/trunk/yasm/; revision=1008
defining __NO_STRING_INLINES in strsep.c. Due to string.h inclusion in
util.h, extra level of indirection is needed
(NO_STRING_INLINES->__NO_STRING_INLINES).
svn path=/trunk/yasm/; revision=1004
- Up internal format size to 128 bit.
- Use full internal format size for all calculations.
- Always store negative numbers using full internal size
(avoids 0xffffffff == -1?? issue)
This fixes many inconsistencies in handling of >32-bit intnums.
svn path=/trunk/yasm/; revision=995
of [ORG] in bin objfmt. Still need to assess impact of self-referential
(invalid) ORG, and how to detect for that condition.
svn path=/trunk/yasm/; revision=990
similar label names).
Test also found a bug in COFF parsing of section options; this will be fixed
and a separate test added explicitly for it.
svn path=/trunk/yasm/; revision=982
Also, don't abort(), just exit()... unlike internal errors, which we want a
backtrace for, fatal errors may happen during normal operation.
svn path=/trunk/yasm/; revision=975
problem, adding this required adding some fields to x86_jmprel (now a
misnomer, as FAR jumps are absolute) to save the far opcode, and additional
support in libyasm's yasm_expr_* to properly handle the YASM_EXPR_SEGOFF
operator.
svn path=/trunk/yasm/; revision=954
WRT, and ':' (SEGOFF) usage. This change also brings the yasm_intnum_calc()
interface in line with the yasm_floatnum_calc() interface.
Note: This may not be the final place we want these error messages to reside,
but the lindex addition should remain for the sake of consistency.
svn path=/trunk/yasm/; revision=953
- Move config.h and util.h from libyasm (and installed libyasm) to top level.
- Move yasm_* functions from util.h to coretype.h.
- Remove a number of autoconf-related YASM_*_INTERNAL options from libyasm.h.
- Rename YASM_INTERNAL to YASM_LIB_INTERNAL; it now actually means what the
comment describes: enables definitions that violate the yasm_* namespace.
While we're at it, no longer define YASM_LIB_INTERNAL from yasm frontend, so
it's closer to what a real typical libyasm-using application would look like.
svn path=/trunk/yasm/; revision=944
defined, the structures for the list heads are not defined, so the existing
yasm_bcs_initialize() and yasm_sections_initialize() were impossible to use.
Instead, rename these functions to yasm_bcs_new() and yasm_sections_new() and
make them allocate the space internally. Update yasm_bcs_delete() and
yasm_sections_delete() to free the internally-allocated space.
svn path=/trunk/yasm/; revision=942
the only way to allocate a section is when making it a part of a section list,
and at present, the list is singly-linked internally.
svn path=/trunk/yasm/; revision=940
key headers in certain situations (config.h when compiling with Visual C++ for
one), and is also more correct in general.
svn path=/trunk/yasm/; revision=887