Peter Johnson [Fri, 3 Feb 2006 06:38:30 +0000 (06:38 -0000)]
* dwarf2-dbgfmt.c (generate_section): Split off large chunks into gen_line_op
and finalize_locs functions, preparing for later asm-source dbg generation.
Peter Johnson [Wed, 1 Feb 2006 07:01:47 +0000 (07:01 -0000)]
Implement DWARF2 .file "foo.c" (sans file number) so that it actually sets
the source filename stored in the object file (as GAS does). The internals
of this move the source and object filename data into the yasm_object
structure and simplify the dbgfmt and objfmt interfaces to remove this
information from function parameters.
Peter Johnson [Tue, 31 Jan 2006 03:12:59 +0000 (03:12 -0000)]
* dwarf2-dbgfmt.c (dwarf2_dbgfmt_generate_section): Propogate last-label refs
to following locations in case there is no intermediate label.
* dwarf64_2loc.asm: Test for this.
Peter Johnson [Sun, 29 Jan 2006 21:11:03 +0000 (21:11 -0000)]
Add DWARF2 debugging format. Note: at the moment, this ONLY implements
passthrough information for line numbers through the use of the .loc and
.file directives in the GAS parser and does NOT generate line numbers for
raw assembly files. This will be added next, after the other Mkfiles are
updated.
* dwarf2-dbgfmt.c: New.
* elf-objfmt.c (elf_objfmt_dbgfmt_keywords): Add to list of supported dbgfmts.
* coff-objfmt.c (elf_objfmt_dbgfmt_keywords): Likewise.
* elf-objfmt.c (elf_objfmt_create_dbg_secthead): Support all DWARF2 debug_*
sections.
* dwarf2/tests: Tests for passthrough cases for ELF32, ELF64, and Win64.
Peter Johnson [Sun, 29 Jan 2006 21:06:31 +0000 (21:06 -0000)]
* arch.h (yasm_arch_min_insn_len): Get the minimum instruction length in
bytes.
(yasm_arch_get_address_size): Get the active address size in bits.
* lc3barch.c, x86arch.c: Implement.
These are needed for the DWARF2 dbgfmt, but may be useful for other things
in the future.
Peter Johnson [Sun, 29 Jan 2006 21:04:00 +0000 (21:04 -0000)]
* dbgfmt.h (yasm_dbgfmt_directive): Add section parameter to specify currently
active section at the time of the directive.
* null-dbgfmt.c, stabs-dbgfmt.c: Implement.
* gas-bison.y: Pass.
Peter Johnson [Sun, 29 Jan 2006 01:17:49 +0000 (01:17 -0000)]
Add functions to split a path into a directory and base filename.
* splitpath.c (yasm__splitpath_unix, yasm__splitpath_win): New.
* coretype.h: Prototype above and alias yasm__splitpath.
* splitpath_test.c: New test for above.
Peter Johnson [Mon, 23 Jan 2006 00:16:38 +0000 (00:16 -0000)]
Implement GAS syntax ".local" directive. This is used by GCC to generate
.local sym; .comm sym; rather than directly using .lcomm sym. Handle this
usage as well. While we're here, also implement alignment for .lcomm and
refactor .lcomm handling and alignment handling.
* gas-token.re: Recognize .local.
* gas-bison.y (DIR_LOCAL): Implement .local.
(DIR_COMM): Recognize .local ; .comm case and call define_lcomm().
(DIR_LCOMM): Move functionality into..
(define_lcomm): Here, and implement alignment with..
(gas_parser_align): That now takes raw exprs. The valparam part of that is
now implemented in..
(gas_parser_dir_align): Formerly gas_parser_align.
(DIR_ALIGN): Use gas_parser_dir_align() instead.
* symrec.c (yasm_symtab_get): New function to just get a symbol based on name
without actually "referencing" it.
* symrec.h (yasm_symtab_get): Prototype.
* coretype.h (yasm_sym_vis): Add YASM_SYM_DLOCAL for flagging that a symbol
is explicitly flagged as a local symbol (rather than just default that way).
Peter Johnson [Mon, 23 Jan 2006 00:07:00 +0000 (00:07 -0000)]
* intnum.c (yasm_intnum_set_uint): New function to set intnum to any
arbitrary integer.
(yasm_intnum_zero): Reimplement using yasm_intnum_set_uint.
* intnum.h (yasm_intnum_set_uint): Prototype.
Peter Johnson [Wed, 18 Jan 2006 02:20:06 +0000 (02:20 -0000)]
x86id.re: Fix #66 (fstp generated invalid opcode). Cleaned up fldstpt_insn
a bit as well. We were testing this but for some reason didn't check the
"golden" outputs for correctness.
Peter Johnson [Wed, 18 Jan 2006 01:51:08 +0000 (01:51 -0000)]
* yasm.c (opt_objfmt_handler): Lowercase the objfmt keyword. This forces
the __YASM_OBJFMT__ value to always be lowercase, e.g. for "-f Win32" on
the command line, __YASM_OBJFMT__ becomes "win32".
Requested by: Brian Gladman <brg@gladman.plus.com>
Peter Johnson [Tue, 17 Jan 2006 04:47:49 +0000 (04:47 -0000)]
VC8 build files cleanup. Also combines yasm32.rules and yasm64.rules into single yasm.rules.
Works for native Win32 builds, Win32->x64 cross builds, and native x64 builds.
Submitted by: Brian Gladman <brg@gladman.plus.com>
Peter Johnson [Sun, 15 Jan 2006 22:48:55 +0000 (22:48 -0000)]
* coff-objfmt.c: Add "x64" as an alias for "win64" (when selecting object
formats). This makes integration with the VC8 build tools much nicer, as
VC8 uses "x64" as the PlatformName environment setting.
* win64/Makefile.inc, Mkfiles/Makefile.flat, Mkfiles/Makefile.dj: Update
build files to look for objfmt_x64 module.
Suggested by: Brian Gladman <brg@gladman.plus.com>
Peter Johnson [Fri, 13 Jan 2006 06:41:50 +0000 (06:41 -0000)]
* elf-x86-x86.c (elf_x86_x86_write_reloc): Don't cast symbol index to
unsigned char. This was causing relocation corruption after 255 symbols,
in ELF32 only.
* elfmanysym.asm: Additional test that has exactly 257 symbols.
We actually should have caught this with the very large 32-bit elf-x86id.asm
test, but that object file (unlike the 64-bit GAS version of it) has only
been manually reviewed. This bug was only in ELF32, and wasn't in ELF64.
Fixes bug #62 submitted by: Jens von der Heydt <mailme@vdh-webservice.de>
Peter Johnson [Wed, 11 Jan 2006 05:51:32 +0000 (05:51 -0000)]
Build cleanups (mostly for warnings) for VC8.
* Mkfiles/vc8/config.h: Define _CRT_SECURE_NO_DEPRECATE to avoid most warnings about *_s functions.
Also use _stricmp directly instead of stricmp to avoid warnings.
* libyasm/strcasecmp.c: Support _stricmp usage.
* util.h: Likewise.
* tools/re2c/actions.c: Include ctype.h to define toupper/tolower.
* Mkfiles/vc8/modules/modules.vcproj: Don't include nasm-macros.c directly; this file is included
into another file and has no public variables.
* Mkfiles/vc8/yasm.sln: Allow x64 cross-builds from Win32 by building genmacro, genmodule, and
re2c for Win32 target.
Peter Johnson [Fri, 16 Dec 2005 06:06:25 +0000 (06:06 -0000)]
Rather than pulling the objfmt keyword back from the objfmt when setting
__YASM_OBJFMT__, use whatever name was specified on the command line. This
also matches the behavior of yasm preprocess-only mode (-e). Both the
mismatch between preproc/non-preproc and the internal name change (e.g. from
elf to elf32) were quite confusing.
Peter Johnson [Wed, 30 Nov 2005 06:53:06 +0000 (06:53 -0000)]
* coff-objfmt.c (coff_objfmt_output_secthead): Use sprintf instead of
snprintf when outputting /nnn section names; snprintf doesn't port well
to mingw at least. This also generates more correct output (fills with 0s).
Peter Johnson [Wed, 23 Nov 2005 07:27:41 +0000 (07:27 -0000)]
* coff-objfmt.c: Support section names >8 characters when outputting Win32
or Win64 object files, which support a string table extensison of section
names.
Peter Johnson [Fri, 11 Nov 2005 04:31:20 +0000 (04:31 -0000)]
In GAS mode, detect sections that are marked as contain code thanks to "x"
flag, not just sections named ".text".
* section.h (yasm_object_get_general): Add code flag parameter to indicate
if section is intended to contain code.
(yasm_section_is_code): New, to get value of code flag.
* section.c (yasm_section): Add flag to section structure.
(yasm_object_get_general, yasm_section_is_code): Implement flag.
* *-objfmt.c, stabs-dbgfmt.c: Update call to yasm_object_get_general,
setting code flag appropriately (only elf *really* handles this correctly,
coff still needs to handle GAS flags to work fully from GAS mode).
Peter Johnson [Mon, 7 Nov 2005 06:53:52 +0000 (06:53 -0000)]
Add ability for GAS input to set section alignment in the same way GAS does:
if the first thing in the section is a .align, that specifies the section
alignment.
* gas-bison.y (gas_parser_align): Call new yasm_objfmt_section_align() rather
than creating an align bytecode if .align is the first bytecode in the
section.
Peter Johnson [Mon, 7 Nov 2005 05:12:22 +0000 (05:12 -0000)]
Change some optimization settings so that imm8 optimizations actually get
triggered for more cases and optimize from 64-bit down to 32-bit for 64-bit
mov instructions. This change means that mov reg64, constant will be
auto-sized up to 64 bits, but mov reg64, expr/symbol will default to 32 bits.
You must use mov reg64, qword expr/symbol if you need 64 bits, or in GAS
mode use movabsq expr/symbol, reg64.
This makes the generated code smaller and default most usages into 32-bit
relocations appropriate for ELF64 and Win64. Right now, 32-bit unsigned
relocs are generated instead of 32-bit signed; this will need to be fixed.
* x86arch.h (x86_insn.postop): Add X86_POSTOP_SIGNEXT_IMM32.
* x86bc.c (x86_bc_insn_resolve): Implement.
* x86id.re (OPAP_SImm32Avail): New flag.
(MOD_Op2AddSp): New modifier to encode spare directly into 2nd opcode byte.
(arith_insn): Use MOD_Op2AddSp and add forced-size override forms.
(mov_insn): Use OPAP_SImm32Avail and add forced-size override form.
(yasm_x86__finalize_insn): Implement new flag and modifier.
Peter Johnson [Sun, 6 Nov 2005 20:27:49 +0000 (20:27 -0000)]
Fix common and 0-offset local definition of symbol. The symbol would end
up with the alignment as the offset rather than 0. The cause of this was
that elf_sym_set_nonzero was getting a 0 offset which it then did not set.
* elf.c (elf_symtab_set_nonzero): Make value a pointer so that 0 values
can actually get set if necessary.
* elf.h (elf_symtab_set_nonzero): Update prototype.
* elf-objfmt.c (elf_objfmt_symtab_append): Likewise, and ripple changes.
Peter Johnson [Sun, 6 Nov 2005 20:07:15 +0000 (20:07 -0000)]
Fix ELF64 relocations for common, global, and common+global symbols to match
GAS output. The way we were generating relocations before would make
common+global symbol usage generate a relocation against the symbol but
figure in the symbol's value into the relocation addend.
* expr.h (yasm_symrec_relocate_action): New enum, so that:
(yasm_expr_extract_symrec): can conditionalize replacing the symbol with its
value based on whether the symbol is only local (e.g. not declared global,
etc).
* expr.c (yasm_expr_extract_symrec): Update implementation.
* xdf-objfmt.c, coff-objfmt.c: Update to use new enum constants.
* elf-objfmt.c (elf_objfmt_output_expr): Only relocate against section if
symbol is only local, and change call to yasm_expr_extract_symrec to only
add in symbol value if symbol is only local.
Peter Johnson [Thu, 3 Nov 2005 05:29:42 +0000 (05:29 -0000)]
Handle instruction and prefix identifiers properly when used in other
places in GAS input. Do this by adding a tokenizer state that turns off
insn and prefix generation when inside an instruction or directive, AND
adding a special case for labels.
* gas-parser.h (state): Add INSTDIR.
* gas-token.re: Switch state back to INITIAL on ';' or newline; set state
when entering instruction or directive, add special case for labels.
* gas-bison.y: Remove non-working attempt at translating INSN and PREFIX
into string token; add special case for LABEL identifiers (generated from
special case for labels in tokenizer).
Peter Johnson [Thu, 3 Nov 2005 04:38:21 +0000 (04:38 -0000)]
* symrec.c (symrec_define): Don't error if a symbol is declared common and
then defined, and warn instead of error if a symbol is declared global and
then defined.
Peter Johnson [Thu, 3 Nov 2005 03:49:10 +0000 (03:49 -0000)]
Add warning class (YASM_WARN_UNINIT_CONTENTS) to turn off the
"uninitialized data in code/data section: zeroing" warning. This can now
be turned off using -Wno-uninit-contents on the command line.
* errwarn.h (yasm_warn_class): Add warning class.
* errwarn.c (yasm_errwarn_initialize): Default it to enabled.
* yasm.c (opt_warning_handler): Add as option.
* xdf-objfmt.c, elf-objfmt.c, bin-objfmt.c, coff-objfmt.c: Change warning
class for this warning.
Peter Johnson [Wed, 2 Nov 2005 08:24:19 +0000 (08:24 -0000)]
Add support for single-level GAS .rept directive. Nested .rept's are not
allowed at the moment. The implementation works mostly like a preproc; it
copies source lines and replays them to the lexer. A new .line directive
was added to fix up line numbers for errors and warnings.
* gas-parser.h (yasm_parser_gas): Add rept structure storage.
(gas_rept): New data structure for .rept state.
(gas_rept_line): Data structure to store source lines within .rept block.
* gas-parser.c: Initialize rept to NULL and check for unclosed rept.
* gas-bison.y: Add support for .line, .rept, and .endr directives. The
DIR_REPT handler just creates the rept structure, and the DIR_ENDR handler
just errors (.endr without .rept). All the real work is done in the lexer.
* gas-token.re (rept_input): Replays captured .rept block source lines back
to fill().
(fill): Call rept_input() instead of yasm_preproc_input() if expanding a
rept block.
(gas_parser_lex): Capture source lines and store into rept data structures.
Peter Johnson [Tue, 1 Nov 2005 08:26:19 +0000 (08:26 -0000)]
Fix the use of ELF type/size directives with local variables.
* elf.h (elf_symtab_entry): Add in_table flag.
(elf_sym_in_table): New.
* elf.c (elf_symtab_entry_create): Initialize in_table to 0.
(elf_symtab_append_entry, elf_symtab_insert_local_sym): Set flag to 1.
* elf.c (elf_symtab_insert_local_sym): Don't create the entry here, instead
take it as a parameter.
* elf-objfmt.c (elf_objfmt_symtab_append): Only add if not in table by
checking new in_table flag.
(elf_objfmt_append_local_sym): Likewise, and pull some of the logic from
the old elf_symtab_insert_local_sym function to do it.
(elf_objfmt_directive): Don't append to ELF symbol table here, as we don't
know yet if the variable is global or local.
Peter Johnson [Tue, 1 Nov 2005 04:48:15 +0000 (04:48 -0000)]
* elf.c (elf_symtab_create): Default type to STT_NOTYPE.
* elf-objfmt.c (elf_objfmt_append_local_sym, elf_objfmt_extern_declare)
(elf_objfmt_global_declare, elf_objfmt_common_declare)
(elf_objfmt_directive): Only override if actually required.
Peter Johnson [Tue, 1 Nov 2005 04:23:54 +0000 (04:23 -0000)]
* elf-objfmt.c (elf_objfmt_symtab_append): Don't append symbol a second
time if it already has associated data. This keeps global followed by
extern from generating duplicate symbol table entries.
Peter Johnson [Tue, 1 Nov 2005 03:57:42 +0000 (03:57 -0000)]
Fix implementation of r1298 and fixup testcases.
* gas-bison.y (gas_get_section, gas_switch_section): Add parameter builtin
to indicate gas flags should not be generated.
Peter Johnson [Tue, 1 Nov 2005 03:37:44 +0000 (03:37 -0000)]
Fix linker errors with GAS parser directives .data/.text/etc.
* gas-bison.y (gas_get_section): Don't create empty gas flags unless type
is also specified. This fixes .data/.text/etc section flags.
* elf-objfmt.c (elf_objfmt_section_switch): Add default flags for .comment
section; this is needed so the above change doesn't break .ident.
Peter Johnson [Wed, 26 Oct 2005 03:22:44 +0000 (03:22 -0000)]
Enhance builtin bytecode_data to support embedded NULs in character strings.
While NASM doesn't allow this, GAS does.
While we're here, greatly clean up GAS data bytecode creation by no longer
building intermediate valparam list.
* bytecode.h (yasm_dv_create_string): Add length parameter.
(yasm_bc_create_data): Add append_zero parameter for new ability to append
a single ero byte after each data value. This is used by the GAS .asciz
directive.
* bytecode.c (bytecode_data, ...): Implement the above.
* gas-bison.y (gas_define_strings, gas_define_data)
(gas_define_leb128): Remove; replace in usage with direct calls to bytecode
functions. Add str, dataval, and datavalhead to parser union. Add new
dirvals, which has valparams type, and change strvals and datavals to
datavals type.
* gas-token.re: Use new str type where STRING token is generated.
* nasm-bison.y: Add str type to union, and use for STRING token.
* nasm-token.re: Use new str type where STRING token is generated.
* coff-objfmt.c (win32_objfmt_directive): Adjust for updates to
bytecode_data.
Peter Johnson [Mon, 24 Oct 2005 04:48:37 +0000 (04:48 -0000)]
Support standalone, segment, and REX prefixes in GAS mode.
* bytecode.c (yasm_bc_create_empty_insn): New function to create empty
instruction that can have prefixes applied to it, for standalone prefixes.
* bytecode.h (yasm_bc_create_empty_insn): Prototype.
* x86arch.h (x86_parse_insn_prefix): Add prefix types for segment registers
(X86_SEGREG) and REX bytes (X86_REX).
(yasm_x86__bc_apply_prefixes): Adjust prototype to include REX pointer (as
this isn't in the x86_common structure).
* x86bc.c (yasm_x86__bc_apply_prefixes): Support the new prefix types.
* x86id.re (x86_finalize_*): Use const x86_insn_info; all insn_infos are
const so these pointers should be as well.
(yasm_x86__finalize_insn): Handle empty instruction case by pointing to new
empty_insn info.
(empty_insn): New.
(yasm_x86__parse_check_prefix): Support GAS prefix naming, and REX and jump
hint prefixes (only in GAS mode at the moment).
* gas-bison.y: Add rules to handle segreg prefixes as well as standalone
prefixes (both segreg and others).
* gas-prefix.asm: New testcase that also hits the warning cases in
yasm_x86__bc_apply_prefixes X86_REX case.
Peter Johnson [Wed, 19 Oct 2005 07:44:59 +0000 (07:44 -0000)]
* gas-bison.y: Add support for .value alias for .2byte (GAS-x86/amd64).
This is generated by GCC in debug sections.
* gas-token.re: Likewise.
* gas-bison.y: Add support for 4th parameter on .section directive, for use
with M (SHF_MERGE) ELF section flag.
* elf-objfmt.c: Add support for M, S (SHF_STRINGS), G (SHF_GROUP), and T
(SHF_TLS) section flags.
* elf.h: Declare additional SHF_* flags.
With these changes, debug information generated by GCC in GAS format is
passed through successfully. Should just need line number generation to
have full debugging for ELF-DWARF2 coming from GCC.
Only remaining thing to handle that I see at the moment for full GCC output
support is multiple instructions on one line (separated by semicolons).
Peter Johnson [Wed, 19 Oct 2005 07:18:20 +0000 (07:18 -0000)]
* elf-x86-amd64.c (elf_x86_amd64_write_reloc): Fix a crash with ELF: when an
invalid relocation is generated, this still gets called but with a NULL
addend.
* expr.c (expr_xform_bc_dist): Check return value of yasm_symrec_get_label()
to avoid crash.
* intnum.c (yasm_intnum_get_leb128, yasm_intnum_size_leb128): New.
* intnum.h (yasm_intnum_get_leb128, yasm_intnum_size_leb128): Prototype.
* leb128_test.c: New test for intnum-level LEB128 functions.
* bytecode.c (bytecode_leb128): New bytecode and supporting functions.
(yasm_bc_create_leb128): New creation function.
* bytecode.h (yasm_bc_create_leb128): Prototype.
* gas-token.re: Recognize .uleb128 and .sleb128.
* gas-bison.y: Ditto.
(gas_define_leb128): New.
* leb128.asm: New test for GAS .uleb128 and .sleb128 directives.
Peter Johnson [Mon, 10 Oct 2005 03:47:58 +0000 (03:47 -0000)]
Update all re2c input files to use case-insensitive strings. The code
generated for this is identical to the old A=[aA] way of doing this, but
this way is easier to read.
Peter Johnson [Sun, 9 Oct 2005 07:11:45 +0000 (07:11 -0000)]
Continue re2c updates. This one gets rid of the unused label warnings.
Going ahead and removing the cleanup script; a later commit will get rid
of the remaining unused variable warnings that the cleanup script took care
of as well.
Peter Johnson [Sun, 9 Oct 2005 06:08:02 +0000 (06:08 -0000)]
Update re2c to May 12, 2004 version. This adds an output file option, so
also adjust cleanup program to take input/output file name, and update
Makefiles to use it in this fashion.
Peter Johnson [Fri, 7 Oct 2005 05:15:52 +0000 (05:15 -0000)]
* x86arch.h (x86_insn): Combine shift_op, signext_imm8_op, shortmov_op, and
address16_op flags into a single postop enum.
* x86id.re (yasm_x86__finalie_insn): Set new enum rather than flags.
* x86bc.c: Use new combined enum.
Peter Johnson [Wed, 5 Oct 2005 06:57:37 +0000 (06:57 -0000)]
* x86id.re: Implement string, protection, SSE2 instructions for GAS mode.
While we're here, add 64-bit register versions of SSE2 instructions movmskps,
pextrw, pinsrw, and pmovmskb that are documented by Intel but not AMD.
Peter Johnson [Mon, 3 Oct 2005 06:49:15 +0000 (06:49 -0000)]
* bytecode.c (bc_align_tobytes): Handle cases where some code fills don't
exist (this happens in LC3b).
* lc3barch.c (lc3b_get_fill): NOP pattern is actually all 0's.
* gas-parser.h (yasm_parser_gas): Add code_section flag to indicate when to
use code fill vs. data fill.
* gas-parser.c: Initialize flag.
* gas-bison.y: Update flag in various places. Generate org bytecode.
Call gas_parser_align to generate align bytecode.
(gas_parser_align): Generate align bytecode.
Peter Johnson [Mon, 3 Oct 2005 00:12:08 +0000 (00:12 -0000)]
* x86id.re (push_insn): Turn on signed 8-bit optimization for GAS mode.
Don't do this yet for NASM mode; this could be done e.g. through use of
the strict modifier.
Peter Johnson [Sat, 1 Oct 2005 05:47:54 +0000 (05:47 -0000)]
Revert [1251]. From further investigation, ML64's generation of REL32 in
these cases seems to be a bug. If you get a linker error about ADDR32, it
means you aren't using RIP-relative instructions. Note this means to access
an array you need to do:
lea rax, [var wrt rip] ; generates RIP-relative insn and REL32 reloc
mov rcx, [rax+rbx] ; rbx is index
and not:
mov rcx, [var+rbx] ; generates ADDR32 reloc
At least when trying to build a DLL (the ADDR32 reloc fails the DLL link).
When building statically, ADDR32 should work okay and thus the latter form
can be used.
Peter Johnson [Fri, 30 Sep 2005 04:03:59 +0000 (04:03 -0000)]
* coff-objfmt.c (coff_objfmt_output_expr): Try to match the new ML64's
output better by generating relocs directly to the symbol being relocated
rather than to the section. Use a new coff_objfmt->win64 flag to
conditionalize this rather than just COFF_MACHINE_AMD64.
(coff_objfmt): New win64 flag.
(coff_objfmt_create, win32_objfmt_create, win64_objfmt_create): Initialize
flag.
(coff_objfmt_output): Turn on outputting all symbols in win64 mode so they
can be referenced by relocs. This isn't quite correct: we should only turn
on the symbols that are actually used by relocs, but having them there
doesn't hurt linking; it only exposes all of the internal symbol names.
With these changes, yasm output matches the new ML64 output except for a
very few cases:
- ML64 generates REL32 relocs when referencing objects in the same .text
section. I cannot see how this is necessary because call instructions
don't generate REL32 relocs! I currently do not plan on fixing this unless
it causes a problem.
- ML64 generates ADDR32 relocs instead of REL32 relocs when loading a
32-bit register with the address of an object. I will probably try to fix
this.