Skip to content

Commit ad8b2d1

Browse files
committed
Fix for Xcode 16.3: don't depend on section order
1 parent bb492b0 commit ad8b2d1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2019-2023 checkra1n team
2+
# Copyright (C) 2019-2025 checkra1n team
33
# This file is part of pongoOS.
44
#
55
# Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -112,7 +112,7 @@ ifdef DEV_BUILD
112112
endif
113113

114114
# Pongo options
115-
PONGO_LD_FLAGS ?= -static -L$(LIB)/fixup -lc -Wl,-preload -Wl,-no_uuid -Wl,-e,start -Wl,-order_file,$(SRC)/sym_order.txt -Wl,-image_base,0x100000000 -Wl,-sectalign,__DATA,__common,0x8 -Wl,-segalign,0x4000 $(PONGO_LDFLAGS)
115+
PONGO_LD_FLAGS ?= -static -L$(LIB)/fixup -lc -Wl,-preload -Wl,-no_uuid -Wl,-e,start -Wl,-order_file,$(SRC)/sym_order.txt -Wl,-image_base,0x100000000 -Wl,-merge_zero_fill_sections -Wl,-sectalign,__DATA,__zerofill,0x8 -Wl,-segalign,0x4000 $(PONGO_LDFLAGS)
116116
PONGO_CC_FLAGS ?= -Os -moutline -DPONGO_VERSION='"$(PONGO_VERSION)"' -DPONGO_BUILD='"$(PONGO_BUILD)"' -DPONGO_PRIVATE=1 -I$(SRC)/lib -I$(INC) -Iapple-include -I$(SRC)/kernel -I$(SRC)/drivers $(PONGO_LD_FLAGS) $(PONGO_CFLAGS)
117117

118118
# KPF options

src/boot/entry.S

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* pongoOS - https://checkra.in
33
*
4-
* Copyright (C) 2019-2023 checkra1n team
4+
* Copyright (C) 2019-2025 checkra1n team
55
*
66
* This file is part of pongoOS.
77
*
@@ -39,9 +39,9 @@ start:
3939
// Since we wanna be at the very start of SRAM, we don't need to check the direction of copying
4040
.loh AdrpAdd Lloh0, Lloh1
4141
Lloh0:
42-
adrp x6, section$end$__DATA$__pongo_exports@PAGE
42+
adrp x6, section$start$__DATA$__zerofill@PAGE
4343
Lloh1:
44-
add x6, x6, section$end$__DATA$__pongo_exports@PAGEOFF
44+
add x6, x6, section$start$__DATA$__zerofill@PAGEOFF
4545
copyloop:
4646
ldp x7, x8, [x4], 0x10
4747
stp x7, x8, [x5], 0x10
@@ -60,9 +60,9 @@ L_relocated:
6060
.loh AdrpAdd Lloh2, Lloh3
6161
.loh AdrpAdd Lloh4, Lloh5
6262
Lloh2:
63-
adrp x2, section$start$__DATA$__common@PAGE
63+
adrp x2, section$start$__DATA$__zerofill@PAGE
6464
Lloh3:
65-
add x2, x2, section$start$__DATA$__common@PAGEOFF
65+
add x2, x2, section$start$__DATA$__zerofill@PAGEOFF
6666
Lloh4:
6767
adrp x3, segment$end$__DATA@PAGE
6868
Lloh5:

0 commit comments

Comments
 (0)