Ticket #70 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

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

Reported by: Yvan AMILIN Assigned to: peter@tortall.net
Priority: P1 Milestone: 0.5.0
Component: Core Version: unspecified
Severity: normal Keywords:
Cc:

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.

Y. AMILIN

PS: Sorry for my bad english.

Attachments

Change History

02/24/06 00:25:25 changed by peter

  • owner set to peter@tortall.net.
  • status changed from new to assigned.

02/25/06 11:40:23 changed by peter

  • status changed from assigned to closed.
  • resolution set to fixed.

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


Add/Change #70 (Unable to change section .text alignment (whereas NASM permit it), and no warning about this)