Skip to content

Commit 98e4d9f

Browse files
committed
Revert "linker.ld: disable maximum size assertion, replace by map info"
This reverts commit cb075a1.
1 parent 75f25a4 commit 98e4d9f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ $(BUILD_DIR)/bootloader.bin: bootloader.asm $(BUILD_DIR)
3434
$(BUILD_DIR)/payload.bin: linker.ld $(PAYLOAD_FILES) $(ASSETS_HEADER) $(BUILD_DIR)
3535
@echo 'CC $(PAYLOAD_CODE_FILES)'
3636
@$(CC) -s -std=c11 -march=i386 -mtune=generic -m32 -masm=intel -fno-pie -mgeneral-regs-only \
37-
-Os -ffreestanding -nostdlib -Wl,--build-id=none,--hash-style=sysv,--gc-sections,--print-map \
37+
-Os -ffreestanding -nostdlib -Wl,--build-id=none,--hash-style=sysv,--gc-sections \
3838
-ffunction-sections -fdata-sections -Tlinker.ld -Wall -Wextra --param=min-pagesize=0 \
3939
-o '$@' $(PAYLOAD_CODE_FILES)
4040
@printf ' Payload size: %s bytes (%s)\n' \

linker.ld

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,7 @@ SECTIONS
2929

3030
__data_end__ = .;
3131
}
32+
33+
ASSERT(
34+
LENGTH(C_CODE_SECTORS) >= (__data_end__ - __data_start__), "The code doesn't fit on the disk sectors reserved for it"
35+
)

0 commit comments

Comments
 (0)