#68 ✓resolved
Peter Johnson

Unable to change section .text alignment (whereas NASM permit it), and no warning about this

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

Originally posted on Trac by Yvan AMILIN
Original Trac Ticket

  Description

Unable to change section .text alignment (format win32 and elf, yasm0.5rc1).
For example:

section .text align=32

dumpbin reports


SECTION HEADER #1
   .text name
       0 physical address
       0 virtual address
       0 size of raw data
       0 file pointer to raw data
       0 file pointer to relocation table
       0 file pointer to line numbers
       0 number of relocations
       0 number of line numbers
60500020 flags
         Code
         16 byte align
         Execute Read

I know this is because the .text section is created by default but at least we should have a warning. In fact, there
are two calls to coff_objfmt_section_switch (coff-objfmt.c) first with align=16 when the default .text is created and
a second with align=32 when text is redeclared. Obviously, you should search for a .text section before creating a default one.

AMILIN

PS: Sorry for my bad english.

Trac Attachments

h3. Trac Comments
comment:1

              Changed 5 years ago by peter@tortall.net


      comment:1

                  Changed 5 years ago by peter@tortall.net

      Owner
        set to peter@tortall.net
    
      Status
        changed from new to assigned

      Owner
        set to peter@tortall.net
    
      Status
        changed from new to assigned

comment:2

              Changed 5 years ago by peter@tortall.net


Fixed in [1390].  Thanks for the bug report!

      comment:2

                  Changed 5 years ago by peter@tortall.net

      Status
        changed from assigned to closed
    
      Resolution
        set to fixed

Fixed in [1390].  Thanks for the bug report!

      Status
        changed from assigned to closed
    
      Resolution
        set to fixed

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

Tags

Pages