Skip to content

Commit e305cf8

Browse files
committed
build system fixes to ensure GRUB compatibility and resolve the missing symbol issues
1 parent a4261bb commit e305cf8

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ OBJCOPY := i686-linux-gnu-objcopy
55

66
CFLAGS := -ffreestanding -O2 -Wall -Wextra -m32 -fno-pie -fno-stack-protector -nostdlib -nostdinc -Iinclude -msse -msse2
77
ASFLAGS := -f elf32
8-
LDFLAGS := -T linker.ld -nostdlib -m32
8+
LDFLAGS := -T linker.ld -nostdlib -m32 -Wl,-z,noexecstack
99

1010
SRC_DIR := src
1111
BUILD_DIR := build

linker.ld

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@ SECTIONS
55
. = 1M;
66

77
.text BLOCK(4K) : ALIGN(4K)
8-
.text : {
8+
{
99
*(.multiboot)
1010
*(.text*)
1111
}
1212

1313
.rodata BLOCK(4K) : ALIGN(4K)
14-
.rodata : {
14+
{
1515
*(.rodata*)
1616
}
1717

1818
.ai_model BLOCK(4K) : ALIGN(4K)
19-
.ai_model : {
19+
{
2020
_ai_model_start = .;
2121
KEEP(*(.ai_model*))
2222
_ai_model_end = .;
2323
}
2424

2525
.data BLOCK(4K) : ALIGN(4K)
26-
.data : {
26+
{
2727
*(.data*)
2828
}
2929

3030
.bss BLOCK(4K) : ALIGN(4K)
31-
.bss : {
31+
{
3232
*(COMMON)
3333
*(.bss*)
3434
}

0 commit comments

Comments
 (0)