Skip to content

Commit 22820b9

Browse files
agregado elf con mbr symbols
1 parent 5b60f12 commit 22820b9

11 files changed

Lines changed: 4 additions & 3 deletions

File tree

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ $(TSL_SYS): build $(TSL_OBJS_LO) $(TSL_OBJS_HI) ./obj/bios16.o ./obj/bios32.o
5454
mbr: build
5555
$(ASM) -g -F DWARF -f elf64 ./asm/bios/mbr.asm -o $(OBJ_DIR)/mbr.o
5656
$(LD) -T $(LD_DIR)/mbr.ld -o ./out/mbr.sys $(OBJ_DIR)/mbr.o
57+
$(LD) --oformat=elf64-x86-64 -T $(LD_DIR)/mbr.ld -o ./elf/mbr.elf $(OBJ_DIR)/mbr.o
5758

5859
start16: build
5960
$(ASM) -g -F DWARF -f elf64 ./asm/bios/start16.asm -o $(OBJ_DIR)/start16.o

asm/bios/start16.asm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,4 +420,4 @@ msg_read_tsl_hi: db "Reading tsl hi..", 0
420420

421421

422422
;; Zero fill.
423-
times 512 - $ + $$ db 0
423+
;;;;times 512 - $ + $$ db 0

asm/lib/bios16.asm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,3 @@ failure:
7979

8080

8181
msg_halt: db "System halted", 0
82-
x: dd msg_halt

build/tsl.sys

0 Bytes
Binary file not shown.

elf/mbr.elf

6.31 KB
Binary file not shown.

elf/tsl_lo.elf

-24 Bytes
Binary file not shown.

ldScript/tsl.ld

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
OUTPUT_FORMAT("binary")
22

3+
/* TO-DO: generar simbolos ya realocados de mbr */
34
SECTIONS {
45

56
code_start16_reloc = 0x7e00;
@@ -28,7 +29,7 @@ SECTIONS {
2829
.data_low data_lo_start_reloc_aligned : AT (data_lo_start_load) {
2930
./obj/tsl_ap.o (.data)
3031
}
31-
data_lo_end_reloc_not_aligned = .;
32+
data_lo_end_reloc_not_aligned = .;
3233
. = ALIGN(0x800); /* 0x8800. Puede hacerse 0x400 pero dado que se le su */
3334
/* ma START16_SIZE quedan 0x600 y prefiero alineamint */
3435
/* o a 0x800 que a 0x200. Previo a ser relocalizado queda en 0xA00*/

obj/bios16.o

-32 Bytes
Binary file not shown.

obj/start16.o

-32 Bytes
Binary file not shown.

out/BOOTX64.EFI

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)