Author Topic: Does NASM Support Mach-O Custom Sections?  (Read 7048 times)

Offline Nobody_1707

  • Jr. Member
  • *
  • Posts: 2
Does NASM Support Mach-O Custom Sections?
« on: March 09, 2010, 09:51:25 AM »
I'm currently writing a Forth interpreter for OS X 10.6.x and would like to keep my headers in it's own separate .section, does NASM support custom sections for 64-bit Mach-O files?

Offline Keith Kanios

  • Full Member
  • **
  • Posts: 383
  • Country: us
    • Personal Homepage
Re: Does NASM Support Mach-O Custom Sections?
« Reply #1 on: March 09, 2010, 06:47:43 PM »
Based on the latest outmacho64.c source listing, I would have to say no.

The following are the currently valid section names:

  • .text
  • .data
  • .rodata
  • .bss

Looks like you might be able to utilize the .rodata (read only data) section for what you want.

Offline Nobody_1707

  • Jr. Member
  • *
  • Posts: 2
Re: Does NASM Support Mach-O Custom Sections?
« Reply #2 on: March 10, 2010, 01:46:41 AM »
That'll do for now, I just have to remember to have GCC set .rodata to be read/writable.

Thanks for the help.