Commit 1f6cc10
committed
build system stabilization and symbol resolution tasks
1. Update Makefile Link Order & Objects
- Link Order : Modified the Makefile to place -lgcc at the very end of the link command. This ensures that any implicit 64-bit math symbols (like __udivdi3 ) required by the object files are correctly resolved by the compiler's support library.
- LDFLAGS : Cleaned up LDFLAGS to focus on -T linker.ld -nostdlib -m32 , letting the link command handle the output and library ordering.
- Object Inclusion : Verified that all critical objects (from src/arch/ , src/cpu/ , etc.) are automatically included in the build via the wildcard and patsubst rules.
2. Fix framebuffer.c
- Splash Function : Implemented a non-static vga_display_splash directly in framebuffer.c .
- Modern Driver : This version uses the modern fb_console and fb_clear APIs, providing a clean, colorized boot splash that works with the current linear framebuffer driver while maintaining compatibility with the kernel's initialization sequence.
3. Standardize linker.ld
- Simplified Layout : Rewrote the linker script to follow a standard, robust layout.
- PHDR Prevention : Replaced complex address offsets with standard BLOCK(4K) : ALIGN(4K) directives. This prevents "Program Header" errors and ensures sections like .text (which now correctly includes .multiboot ), .rodata , and .data are properly aligned on 4KB page boundaries.
4. Assembly Export Check
- Symbol Visibility : Updated isr.s to explicitly mark isr_handler and irq_handler as global in addition to extern . This ensures the assembly stubs can correctly "talk" to the C implementations in isr.c .1 parent 3ee4e21 commit 1f6cc10
4 files changed
Lines changed: 61 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 5 | + | |
11 | 6 | | |
| 7 | + | |
12 | 8 | | |
| 9 | + | |
13 | 10 | | |
14 | 11 | | |
15 | 12 | | |
| 13 | + | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
19 | 17 | | |
| 18 | + | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
489 | 489 | | |
490 | 490 | | |
491 | 491 | | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
492 | 542 | | |
493 | 543 | | |
494 | 544 | | |
| |||
0 commit comments