Modify ↓
Ticket #141 (closed defect: fixed)
Macho64 format on darwin
| Reported by: | goodwillhart@… | Owned by: | peter@… |
|---|---|---|---|
| Priority: | P1 | Milestone: | |
| Component: | Object Format: macho | Version: | 0.6.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I have some gas assembler code which has been converted to Yasm. It works fine on AMD64 but on a Core 2 machine running Darwin it doesn't assemble. The problem is a reference to a global symbol, which needs to support PIC. Of course with the elf format you have wrt rip wrt ..gotpcrel, but on the Core 2 the object format I need to use is macho64. At present the yasm manual has no information on how to write PIC code for macho64, and ..gotpcrel certainly doesn't work.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

At the moment there's not support for macho64 PIC in yasm, but I'll work on fixing it (should be fairly straightforward). It will still be "wrt ..gotpcrel". See developer.apple.com/documentation/DeveloperTools/Conceptual/MachOTopics/Articles/dynamic_code.html#apple_ref/doc/uid/TP40002528-SW2 for some examples (GAS syntax however).