Ticket #82 (closed defect: worksforme)

Opened 2 years ago

Last modified 2 years ago

bin format, when using section .data on small file, seems to produce extra nul bytes

Reported by: rugxulo Assigned to:
Priority: P1 Milestone: 0.6.0
Component: Object Format: bin Version: 0.5.0
Severity: trivial Keywords:
Cc:

Description

I wrote a small .COM util that assembles to 257 bytes with either NASM or YASM. However, if I comment out "section .data", it outputs a file that is smaller (tested w/ latest stable, 0.5.0, and development, r1645, DJGPP versions).

Attachments

lfndir5.zip (3.2 kB) - added by rugxulo@gmail.com on 10/11/06 16:13:28.
small LFN dir lister for Win XP (or DOS w/ DOSLFN 0.40d)

Change History

10/11/06 16:13:28 changed by rugxulo

  • attachment lfndir5.zip added.

small LFN dir lister for Win XP (or DOS w/ DOSLFN 0.40d)

10/11/06 17:23:23 changed by peter

Sections in binary output default to 4-byte alignment. Thus if the .text section is not a multiple of 4 in size, yasm pads the output so that .data starts on a 4-byte boundary. This can be overridden using "section .data align=1".

10/12/06 13:41:52 changed by anonymous

  • status changed from new to closed.
  • resolution set to worksforme.

Add/Change #82 (bin format, when using section .data on small file, seems to produce extra nul bytes)