#102 (macho: custom sections) – The Yasm Modular Assembler Project
Modify

Ticket #102 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

macho: custom sections

Reported by: bird-yasm@… Owned by:
Priority: P1 Milestone:
Component: Object Format: macho Version: 0.6.0
Severity: normal Keywords:
Cc:

Description

Permit definition of section other than the standard ones recognized by yasm. This is sometimes required to aggregate lists and such like in assembly code.

Attachments

birds-segment-patch.diff Download (3.8 KB) - added by bird-yasm-spam@… 3 years ago.
Patch proposal (sorry about the missing tabs).
birds-segment-patch-2.diff Download (3.9 KB) - added by bird-yasm-spam@… 3 years ago.
a sligtly better version

Change History

Changed 3 years ago by bird-yasm-spam@…

Patch proposal (sorry about the missing tabs).

comment:1 Changed 3 years ago by bird-yasm-spam@…

The patch is a bit rough perhaps. What it does is this:

If the section isn't one of the default ones I use the specified name for the section, and defaults it to the TEXT segment, the S_ATTR_SOME_INSTRUCTIONS flag, and byte alignment. The segment can be overridden by a "segname " parameter to the section directive. (I wanted segname= to make it similar to the "CLASS" parameter in NASM/OMF, but I couldn't figure out how to convert parameter to a string.)

Changed 3 years ago by bird-yasm-spam@…

a sligtly better version

comment:2 Changed 3 years ago by peter

  • Status changed from new to closed
  • Resolution set to fixed

(In [1852]) Fix #102: Permit non-standard macho section names.

Two forms are legal ({} are replaceables): SECTION {segname} {sectname} SECTION {sectname} segname={segname} Also, SECTION {sectname} where sectname is unrecognized is also legal, defaults segname to TEXT, and generates a warning.

Contributed by: bird-yasm@…

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.