#141 ✓resolved
Peter Johnson

Segment alignment etc.

Reported by Peter Johnson | June 25th, 2011 @ 07:50 PM

Originally posted on Trac by Agner@agner.org
Original Trac Ticket

  Description

Is it possible to specify the properties of a segment, such as alignment, writeable, executable, zerofill?

I am considering to add support for YASM syntax in my disassembler, www.agner.org/optimize/objconv.zip but I need these features.

Trac Attachments

h3. Trac Comments
comment:2

              Changed 3 years ago by peter@tortall.net


Yes, they're specified as parameters to the section directive.  The exact names of the parameters depends on the object format.  What object format are you looking at?

E.g. win32 supports discard, cache, page, share, execute, read, write, base flags, as well as alignment.  You can turn off the binary flags by prefixing with "no":

section .data align=16 nodiscard cache noshare execute

If you let me know what object format you're looking at, I can give you details on the flags available for that format.

comment:3

              Changed 3 years ago by www.agner.org


Thank you, that works.
I would prefer that you put this in the manual.
I am supporting most object file formats in my disassembler (OMF, COFF/PE, ELF, MACHO).

Please remove my email address from the ticket page, I hate spam.

comment:4

              Changed 3 years ago by peter@tortall.net


It's documented for elf and bin, but not the others.  I'll try to get those documented.

Your email address should not be visible; if you see it, let me know where.

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