svn commit: r1311 - in trunk/yasm: libyasm modules/dbgfmts/stabs/tests modules/objfmts/elf modules/objfmts/elf/tests modules/objfmts/elf/tests/gas64 modules/objfmts/xdf

peter at tortall.net peter at tortall.net
Sun Nov 6 12:07:22 PST 2005


Author: peter
Date: Sun Nov  6 12:07:15 2005
New Revision: 1311

Added:
   trunk/yasm/modules/objfmts/elf/tests/gas64/
   trunk/yasm/modules/objfmts/elf/tests/gas64/Makefile.inc
   trunk/yasm/modules/objfmts/elf/tests/gas64/elf_gas64_reloc.asm
   trunk/yasm/modules/objfmts/elf/tests/gas64/elf_gas64_reloc.errwarn
   trunk/yasm/modules/objfmts/elf/tests/gas64/elf_gas64_test.sh   (contents, props changed)
Modified:
   trunk/yasm/libyasm/expr.c
   trunk/yasm/libyasm/expr.h
   trunk/yasm/modules/dbgfmts/stabs/tests/stabs-elf.hex
   trunk/yasm/modules/objfmts/coff/coff-objfmt.c
   trunk/yasm/modules/objfmts/elf/elf-objfmt.c
   trunk/yasm/modules/objfmts/elf/tests/Makefile.inc
   trunk/yasm/modules/objfmts/elf/tests/elftest.hex
   trunk/yasm/modules/objfmts/xdf/xdf-objfmt.c
Changeset:
   http://www.tortall.net/projects/yasm/changeset/1311

Log:
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.

* stabs-elf.hex, elftest.hex: Update for changes.

* elf_gas64_reloc.asm: New test.



More information about the yasm-cvs mailing list