Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [mach-o]

Executable file format utilized by Darwin.

0 votes
1 answer
39 views

LLDB can't list function nor set a breakpoint

I'm having some trouble using lldb, I want to set a breakpoint for a macho file at the start label and at a function called Function1. Ideally i'd like to list all the functions like in gdb with the '...
IRP_HANDLER's user avatar
1 vote
0 answers
48 views

Using llvm-objcopy to remove symbols from static library (mach-o)

I am trying to use llvm-objcopy (or llvm-strip) to remove a symbol from a static library (mach-o). I am doing the following: $ llvm-objcopy --strip-symbol "...
Francisco Ryan Tolmasky I's user avatar
0 votes
0 answers
50 views

Error trying to run a FAT binary on iOS device: incompatible architecture message while correct architecture is included

I've been trying to Google similar issues, but it seems I'm the only one so far, to my surprise ... I am trying to build Tesseract for iOS. There's various build scripts online that I've tried, but ...
Wolfgang Schreurs's user avatar
0 votes
1 answer
53 views

Why is data loaded bigger than expected using ADRP, ADD, and LDR instructions?

I am learning assembly for Apple M1 arm64 and noticed something odd on trying to load a data from a label on the data segment. It seems to be loading the content not just of the label I asked for ...
maxcnunes's user avatar
  • 3,027
1 vote
0 answers
152 views

How does "arch -arch" work to enable Rosetta and force binary architecture?

When using Rosetta on macOS running on an ARM processor, the arch command can be used to force a wrapped command to execute as a specific architecture. In other words, arch -arch x86_64 mycommand will ...
Zac B's user avatar
  • 4,058
1 vote
1 answer
203 views

Decompiling ARM64 and understanding branch targets bounderies

When decompiling code from arm64, how can one know if an unconditional branch instruction b is a branch to a label in the same function and not to some other function? How do state of the art ...
Jorayen's user avatar
  • 1,941
1 vote
1 answer
480 views

A “universal” binary?

Is there a way to combine ELF, Mach-O and PE compiled code in the general case, so there could be one “binary” file for all modern systems? (Windows, macOS, Linux) I remember there are stories of old ...
JP.'s user avatar
  • 5,594
0 votes
0 answers
40 views

Mach-O file structure

I used Xcode 14.3.1 and iOS version 16.2.I wanted to understand the process of Mach-O binding symbols, but the offset address of the NSLog function is very different from others: other's: I looked ...
Littletiger's user avatar
0 votes
0 answers
35 views

Mach-O Could Not Be Built

Everytime i try to code something this happens Proof:Mach-O file couldn’t be generated. I tried to make the best car hud but that happened. My expectations:I expected it to start. I really don’t like ...
M7md Zuhair9 Gamer's user avatar
0 votes
1 answer
631 views

Modifying the mach-o executable file .text section to be writable caused a crash

;) What I want to ask is why modifying the .text section in the mach-o executable file (ARM64) will cause runtime crashes? I use some executable file editor (eg: MachOView) to do this。 before ...
hopy's user avatar
  • 589
0 votes
1 answer
208 views

Interposing or wrapping syscall made from a linked framework

I have a executable, which links to one system framework on Mac. The system framework makes some system calls. I'm interested in socket and connect calls, to redirect the socket connection to some ...
nisargjhaveri's user avatar
1 vote
1 answer
271 views

How does Mach-O store pointers to Objective-C Metadata entities?

A somewhat lengthy question so please bear with me. I am writing a parser to extract Objective-C metadata entities from input Mach-O binaries. And I want to better understand how pointers to metadata ...
Kareem Ergawy's user avatar
1 vote
0 answers
128 views

difference between __got section and __nl_symbol_ptr section

Both of them are labeled as S_NON_LAZY_SYMBOL_POINTERS and are bound at load time. However, I only see the __DATA__CONST.__got section in most Mach-O files. What's the difference between them and why ...
Evan's user avatar
  • 432
0 votes
1 answer
304 views

Why is partial linking making all symbols non-global?

I'm trying to reduce the disk size of a big static library libIn.a that contains a lot (~3000) of small object files (.o), by combining all the object files into a single .o file; as far as I ...
Giovanni Beri's user avatar
0 votes
0 answers
129 views

Call shared function from assembly ARM mac

This code works but isn't what I want. I'd like to build from linux which will complain it can't find _write. On my mac I can compile this just fine. Notice the bl _write after the svc. Without it the ...
Stan's user avatar
  • 199

15 30 50 per page
1
2 3 4 5
25