Questions tagged [mach-o]

Executable file format utilized by Darwin.

Mach-O is the file format used for executables, shared libraries and object files on OS X and iOS. It supports both single-architecture and multiple-architecture ("fat") binaries.

371 questions
0
votes
1 answer

How to use xcrun to compile to AppleTV?

I'm using xcrun to compile a dynamic library that I want to use in AppleTV application. Using this command, I can compile my dylib and use in OS X: ➜ logger git:(master) ✗ ls main.swift ➜ logger git:(master) ✗ xcrun swiftc -emit-library…
macabeus
  • 4,156
  • 5
  • 37
  • 66
0
votes
1 answer

unable to build binutils on macosx

I need to build ld from sources on OSX 10.12.3 (16D32). I cloned the last version from git://sourceware.org/git/binutils-gdb.git and tried to build it: ./configure --prefix=/usr --disable-werror (there are a lot of warnings, so I disable…
AC-93
  • 85
  • 1
  • 7
0
votes
1 answer

yasm writing to PAGEZERO in x86_64 mach-o format

I'm following a assembly book which uses the yasm assembler and ld linker. I'm on OSX 10.12 and I'm trying to assembly to Mach-O format. Unfortunately, I'm receiving a segmentation fault. This is the original .asm file: BITS 64 segment .data a dd…
0
votes
1 answer

What is the impact of inlining a jpg data into code instead of loading it as external resource

For various reasons which I don't want to get into, it is very convenient for me to inline the data of a JPG into the source code. So rather than loading the image through the regular APIs such as [UIImage imageNamed:@"error.jpg"] I would like to…
Avba
  • 14,822
  • 20
  • 92
  • 192
0
votes
1 answer

Programly add empty section to iOS MachO file?

It seems that adding -Wl,-sectcreate,__RESTRICT,__restrict,/dev/null in Other Linker Flags will add an empty section. And in code we can __attribute((used,section("segmentname,sectionname"))) to declare a var or function. But how to declare an empty…
Karl
  • 665
  • 4
  • 19
0
votes
1 answer

Interpreting Mach-O Data

I am trying to tinker with the appearance of the Dock in OS X. I have the raw data from the Dock's Mach-O executable, but I do not know much about them. I am trying to figure out where I might find the segments/sections where the Dock actually gets…
mdl00
  • 11
  • 3
0
votes
0 answers

How to specify entry address for a macho file

I have an asm file test.S: .text .globl start start: movw %cs, %ax movw %ax, %ds Then I execute clang -m32 -fno-builtin -Wall -ggdb -nostdinc -fno-stack-protector -O0 -nostdinc -c test.S -o test.o ld test.o -o test.bin gobjdump -S test.bin I…
Shangtong Zhang
  • 1,579
  • 1
  • 11
  • 18
0
votes
0 answers

How to start Mach-O file

I have created a small Cocoa application and built a Mach-O file using cross-platform tools. It is working Ok. If I bring the Mach-O file to Mac (MacBook Pro OSX 10.11) it appears with Terminal icon in the Finder. If I double-click it, it opens unix…
PineForestRanch
  • 473
  • 2
  • 11
0
votes
0 answers

How to define the entry point of a library?

While tracing a bug in a static library we use in our iOS application I stumbled upon the following question: The library we use has code that is automatically executed during the launch of our application, before our application's main method is…
Michael Ochs
  • 2,846
  • 3
  • 27
  • 33
0
votes
0 answers

Can't figure out how to find library -lPods

Library not found for -lPods! Can't figure out why it's not linking properly 'Ld /Users/joelwasserman/Library/Developer/Xcode/DerivedData/SyllaSync-cbjytqyyaytulbdwahjgpinpgktm/Build/Products/Debug-iphoneos/SyllaSync.app/SyllaSync normal arm64 …
JoelWass
  • 575
  • 1
  • 5
  • 6
0
votes
0 answers

Soomla + Cardboard = Linker error in xCode

I am developing an app using Google Cardboard SDK as well as Soomla for social network functionality. Since adding soomla and the FB sdk to the project I have encountered a nasty linker error: symbols for architecture arm64: …
dustin
  • 1
  • 1
0
votes
1 answer

Classic Linker Mach error in C++

I don't know C++ very well and I'm teaching myself about ADT's and data structures. Unfortunately every time I need to compile the code I get the classic xcode error: mach link error. I tend to understand these errors when they're in objective-c…
KFDoom
  • 772
  • 1
  • 6
  • 19
0
votes
3 answers

Apple Mach-O Linker Error: 1 duplicate symbol for architechture

This is the error I get when I run my project in Xcode: duplicate symbol _coinsTotal…
LodgeApps
  • 344
  • 1
  • 2
  • 21
0
votes
1 answer

Xcode Obj-C linking errors

I am building a library for iOS, using an existing 3rd-party SDK. Got the code to compile and the library is generated. However, when linking against the resulting/my library, Xcode reports two missing symbols. I checked my library with nm(1) and…
Moshe Shmukler
  • 1,270
  • 2
  • 21
  • 43
0
votes
1 answer

Parse In Today Extension "Mach-O Linked Error"

I am using Parse in my main application "App Delegate" but I also need to use it in my Today App Extension (Widget). So I have added all the necessary frameworks to my app extension, as well as made a bridging header for parse to my app extension,…
Vishnu Murale
  • 173
  • 14