Skip to content

Commit bd9ee54

Browse files
committed
*): Make launchd link work.
1 parent 6c43bab commit bd9ee54

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ch03/build_launchd.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ export PLATFORM=/Applications/Xcode.app/Contents/Developer/Platforms/
55
-arch armv7 -c syscalls.S -o syscalls.o
66

77
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang \
8-
-arch armv7 -c launchd.c -o launchd.o \
8+
-arch armv7 -fno-stack-protector -c launchd.c -o launchd.o \
99
-isysroot $PLATFORM/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk \
1010
-I$PLATFORM/Developer/SDKs/iPhoneOS.sdk/usr/include \
1111
-I.
1212

1313
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang \
1414
-arch armv7 -o launchd launchd.o syscalls.o \
15-
-static -nostartfiles -nodefaultlibs -nostdlib -Wl,-e,_main
15+
-static -nostdlib -Wl,-e,_main
1616

ch03/syscalls.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.text
22

3+
.align 4
4+
35
.globl _exit
46
.globl _fork
57
.globl _read

0 commit comments

Comments
 (0)