Ticket #102 (closed enhancement: fixed)
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
Change History
Changed 3 years ago by bird-yasm-spam@…
-
attachment
birds-segment-patch.diff
added
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@…
-
attachment
birds-segment-patch-2.diff
added
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@…

Patch proposal (sorry about the missing tabs).