Emphasis for 0.6.0

Other than the new optimizer, I've decided the emphasis for 0.6.0 (as shown in my updated ticket status in {3}) is going to be on new object format support. Both RDOFF2 (#73) and multi-section binary (#71) have been requested by users, and OMF (aka OBJ, #41) has been on the TODO list since the 0.2.0 days. These object formats have a definite emphasis on 16-bit programming, and as such are going to drive a number of improvements in libyasm in regards to segment and absolute address handling.

I'm presently working on a few bugs in absolute address handling that I believe I introduced when I switched to using yasm_value structures in [1419].

  • NASM allows a seg:off value such as 0040h:001Eh to be used anywhere a number would be (evaluating to 001Eh, the offset portion), whereas yasm does not.
  • Relative jump/call to an absolute address (e.g. jmp 0x500) generates bad code in yasm, but should be perfectly valid (and even generate an absolute reloc in ELF).
  • Labels in absolute sections that are declared global should be given a correct absolute value in the object format's symbol table, but aren't. For example:
    global label
    absolute 5000h
    label:
    

should generate a symbol table entry for label with a value of 5000h. Yasm currently generates a symbol table entry, but leaves the value at 0.

One interesting thing about the first of these bugs is the handling of:

label equ 0040h:001eh
jmp label               ; should this...
jmp 0040h:001eh         ; mean this?
jmp 001eh               ; or this?

NASM generates the second, I believe that yasm should generate the first. It's probably a judgement call. What do you think? Let me know by commenting!

Comment by dnegrescu@hotmail.com on Wed Oct 18 15:37:32 2006

How about adding support for the MachO format (now that the Macs are using Intel procs)? I'm doing some crossplatform development and it would be nice to use the same tool (e.g. Yasm) on both Windows and Mac.

Best regards, Dan.

Comment by dnegrescu@hotmail.com on Wed Oct 18 15:39:51 2006

How about adding support for the MachO format (now that the Macs are using Intel procs)? I'm doing some crossplatform development and it would be nice to use the same tool (e.g. Yasm) on both Windows and Mac.

Best regards, Dan.

Comment by peter@tortall.net on Wed Oct 18 16:07:35 2006

It's on the roadmap for 0.7.0. But since you're asking for it and no one is (yet) specificly asking for OMF, I suppose I could look into doing MachO first.

(the main reason I was waiting for 0.7.0 was the fact I'm planning on adding PPC support in the 0.7.0 timeframe as well)

Comment by dnegrescu@hotmail.com on Thu Oct 19 09:45:38 2006

Peter, that is great. If I could vote on this I would definitely vote for MachO format (Intel only) in 0.6.0 (actually asap) ;-)

Dan.

Add comment