#150 (Segment alignment etc.) – The Yasm Modular Assembler Project
Modify

Ticket #150 (new enhancement)

Opened 2 years ago

Last modified 2 years ago

Segment alignment etc.

Reported by: Agner@… Owned by:
Priority: P1 Milestone:
Component: Parser: NASM-compatible Version: 0.6.0
Severity: normal Keywords:
Cc:

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.

Attachments

Change History

comment:2 Changed 2 years ago by peter@…

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 2 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 2 years ago by peter@…

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.

View

Add a comment

Modify Ticket

Action
as new
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.