Ticket #102 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

macho: custom sections

Reported by: bird-yasm@anduin.net Assigned to:
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 (3.8 kB) - added by bird-yasm-spam@anduin.net on 03/11/07 21:38:46.
Patch proposal (sorry about the missing tabs).
birds-segment-patch-2.diff (3.9 kB) - added by bird-yasm-spam@anduin.net on 03/12/07 04:21:32.
a sligtly better version

Change History

03/11/07 21:38:46 changed by bird-yasm-spam@anduin.net

  • attachment birds-segment-patch.diff added.

Patch proposal (sorry about the missing tabs).

03/11/07 21:41:03 changed by bird-yasm-spam@anduin.net

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.)

03/12/07 04:21:32 changed by bird-yasm-spam@anduin.net

  • attachment birds-segment-patch-2.diff added.

a sligtly better version

05/28/07 01:52:19 changed 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@anduin.net


Add/Change #102 (macho: custom sections)