]> granicus.if.org Git - yasm/commit
- Fix much brokenness in absolute value handling, particularly in regards to
authorPeter Johnson <peter@tortall.net>
Fri, 29 Sep 2006 07:18:45 +0000 (07:18 -0000)
committerPeter Johnson <peter@tortall.net>
Fri, 29 Sep 2006 07:18:45 +0000 (07:18 -0000)
commit3e8d2c2e7a162cc7a8d20f07e60f6f009914e795
treeb2ebe82cdff8684829f809d3fd73633eedf29e88
parent096e2eb79a83c8da2d9e7f4841c2cb853be5befc
- Fix much brokenness in absolute value handling, particularly in regards to
  PC-relative relocations (jumps and calls).
- Allow SEG:OFF to be used as just an offset portion (like NASM does).
- Labels in absolute sections that are declared global are given the correct
  absolute value in the symbol table.

One difference from NASM:
  label equ 0040h:001eh
  jmp label
in NASM means the same as:
  jmp 001eh  (a near jump)
but yasm will treat this the same as:
  jmp 0040h:001eh  (a far jump)

I'm still not completely happy with this implementation, but it's workable
and fixes all the bugs I've found so far in absolute handling.

svn path=/trunk/yasm/; revision=1634
23 files changed:
libyasm/expr-int.h
libyasm/expr.c
libyasm/expr.h
libyasm/symrec.c
libyasm/symrec.h
libyasm/value.c
libyasm/value.h
modules/arch/x86/x86arch.h
modules/arch/x86/x86bc.c
modules/arch/x86/x86expr.c
modules/arch/x86/x86id.c
modules/objfmts/bin/bin-objfmt.c
modules/objfmts/bin/tests/Makefile.inc
modules/objfmts/bin/tests/bin-farabs.asm [new file with mode: 0644]
modules/objfmts/bin/tests/bin-farabs.hex [new file with mode: 0644]
modules/objfmts/elf/elf-objfmt.c
modules/objfmts/elf/elf.c
modules/objfmts/elf/tests/Makefile.inc
modules/objfmts/elf/tests/elfabssect.asm
modules/objfmts/elf/tests/elfabssect.hex
modules/objfmts/elf/tests/elfequabs.asm [new file with mode: 0644]
modules/objfmts/elf/tests/elfequabs.hex [new file with mode: 0644]
modules/objfmts/elf/tests/elfmanysym.hex