Skip to content

Commit 54fd8ff

Browse files
committed
fixup linker script and package.swift
1 parent 2e928e1 commit 54fd8ff

File tree

6 files changed

+26
-8
lines changed

6 files changed

+26
-8
lines changed

rpi-4b-blink/Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ let package = Package(
1414
.executableTarget(
1515
name: "Application",
1616
dependencies: [
17-
.product(name: "MMIO", package: "swift-mmio")
17+
.product(name: "MMIO", package: "swift-mmio"),
18+
"Support",
1819
]),
1920
.target(name: "Support"),
2021
])

rpi-4b-blink/Sources/Support/linkerscript.ld

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
SECTIONS
22
{
3-
. = 0x80000; /* Kernel load address for AArch64 */
3+
/* Kernel load address for AArch64 */
4+
. = 0x80000;
45
.text : { KEEP(*(.text.boot)) *(.text .text.* .gnu.linkonce.t*) }
56
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r*) }
67
PROVIDE(_data = .);
@@ -14,6 +15,13 @@ SECTIONS
1415
}
1516
_end = .;
1617

17-
/DISCARD/ : { *(.comment) *(.gnu*) *(.note*) *(.eh_frame*) }
18+
/DISCARD/ : {
19+
*(.comment)
20+
*(.gnu*)
21+
*(.note*)
22+
*(.eh_frame*)
23+
*(.swift_modhash)
24+
}
1825
}
19-
__bss_size = (__bss_end - __bss_start)>>3;
26+
27+
__bss_size = (__bss_end - __bss_start) >> 3;

rpi-5-blink/Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ let package = Package(
1414
.executableTarget(
1515
name: "Application",
1616
dependencies: [
17-
.product(name: "MMIO", package: "swift-mmio")
17+
.product(name: "MMIO", package: "swift-mmio"),
18+
"Support",
1819
]),
1920
.target(name: "Support"),
2021
])

rpi-5-blink/Sources/Support/linkerscript.ld

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
SECTIONS
22
{
3-
. = 0x80000; /* Kernel load address for AArch64 */
3+
/* Kernel load address for AArch64 */
4+
. = 0x80000;
45
.text : { KEEP(*(.text.boot)) *(.text .text.* .gnu.linkonce.t*) }
56
.rodata : { *(.rodata .rodata.* .gnu.linkonce.r*) }
67
PROVIDE(_data = .);
@@ -14,6 +15,13 @@ SECTIONS
1415
}
1516
_end = .;
1617

17-
/DISCARD/ : { *(.comment) *(.gnu*) *(.note*) *(.eh_frame*) }
18+
/DISCARD/ : {
19+
*(.comment)
20+
*(.gnu*)
21+
*(.note*)
22+
*(.eh_frame*)
23+
*(.swift_modhash)
24+
}
1825
}
19-
__bss_size = (__bss_end - __bss_start)>>3;
26+
27+
__bss_size = (__bss_end - __bss_start) >> 3;

0 commit comments

Comments
 (0)