Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7ad6a3d3b6 | |||
| a6497217a3 | |||
| e3705a5d5c | |||
| ae54bb7b92 |
4
Makefile
4
Makefile
|
|
@ -1,5 +1,5 @@
|
||||||
server: main.o func.o
|
server: link.ld main.o func.o
|
||||||
gcc main.o func.o -o server -nostdlib -static
|
gcc -T link.ld main.o func.o -o server -nostdlib -static
|
||||||
|
|
||||||
main.o: main.S
|
main.o: main.S
|
||||||
gcc -c main.S
|
gcc -c main.S
|
||||||
|
|
|
||||||
10
link.ld
Normal file
10
link.ld
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
ENTRY(_start)
|
||||||
|
|
||||||
|
SECTIONS {
|
||||||
|
. = 4M + SIZEOF_HEADERS;
|
||||||
|
.text ALIGN(16) : { *(.text) }
|
||||||
|
.rodata ALIGN(16) : { *(.rodata) }
|
||||||
|
. += 4K; /* put .data in the next page in memory while not actually moving it in the file */
|
||||||
|
.data ALIGN(16) : { *(.data) }
|
||||||
|
.bss ALIGN(4K) : { *(COMMON) *(.bss) }
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user