diff --git a/fernlader.ld b/fernlader.ld index 17c6f00..f40031d 100644 --- a/fernlader.ld +++ b/fernlader.ld @@ -1,7 +1,12 @@ +PHDRS { + all PT_LOAD; +} SECTIONS { .text 0x7C00: { - lboot.o(.text*, .data*) - loader.o(.text*, .data*, .bss*) - } + lboot.o(.text) + *(.text) + *(.data) + *(.bss, COMMON) + } :all memmap = ALIGN(8); } diff --git a/lboot.S b/lboot.S index 1ac006a..af17760 100644 --- a/lboot.S +++ b/lboot.S @@ -286,6 +286,29 @@ read_file: pxe_call PXE_TFTP_OPEN add $14+128, %sp + + + .set PXE_TFTP_READ, 0x0022 + push %cs + push $tx_buf + push $0 + push $0 + push $0 + pxe_call PXE_TFTP_READ + add $10, %sp + + + + .set PXE_TFTP_CLOSE, 0x0021 + push $0 + pxe_call PXE_TFTP_CLOSE + add $2, %sp + + + + mov $tx_buf, %si + call print + ret // print: print NUL-terminated string pointed to by SI