#80 ✓resolved
Peter Johnson

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

Reported by Peter Johnson | June 25th, 2011 @ 07:49 PM | in 0.6.0 (closed)

Originally posted on Trac by rugxulo@gmail.com
Original Trac Ticket

  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).

h3. Trac Attachments
http://www.tortall.net:80//projects/yasm/attachment/ticket/82/lfndi...
http://www.tortall.net:80//projects/yasm/raw-attachment/ticket/82/l...
http://www.tortall.net:80//projects/yasm/timeline?from=2006-10-11T1...
h3. Trac Comments
Changed 5 years ago by rugxulo@gmail.com



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

                  Changed 5 years ago by rugxulo@gmail.com

      attachment
        lfndir5.zip​
          added

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

      attachment
        lfndir5.zip​
          added

comment:1

              Changed 5 years ago by peter@tortall.net


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".

comment:2

              Changed 5 years ago by anonymous


      comment:2

                  Changed 5 years ago by anonymous

      Status
        changed from new to closed
    
      Resolution
        set to worksforme

      Status
        changed from new to closed
    
      Resolution
        set to worksforme

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Yasm Modular Assembler Project

Shared Ticket Bins

People watching this ticket

Pages