Add section .data

This commit is contained in:
Alex Kotov 2022-01-28 00:16:37 +05:00
parent ca6447cd14
commit 1cef081aed
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
2 changed files with 8 additions and 1 deletions

View File

@ -19,5 +19,10 @@ SECTIONS
*(.rodata);
}
.data : ALIGN(4)
{
*(.data);
}
program_end = .;
}

View File

@ -9,7 +9,6 @@
.global _start
.section .rodata
disk: .byte 0
newline: .string "\r\n"
hello: .string "Hello from stage 1!\r\n"
size_str: .string "Stage 2 size: "
@ -19,6 +18,9 @@ parenth: .string " ("
of: .string " of "
to_address: .string ") to address "
.section .data
disk: .byte 0
.section .text
_start:
mov %dl, disk