limine/common/linker_bios.ld.in

99 lines
1.9 KiB
Plaintext
Raw Normal View History

OUTPUT_FORMAT(elf32-i386)
2021-12-19 03:08:34 +03:00
OUTPUT_ARCH(i386)
ENTRY(_start)
2022-05-19 21:19:29 +03:00
PHDRS
{
text_s2 PT_LOAD FLAGS((1 << 0) | (1 << 2)) ;
data_s2 PT_LOAD FLAGS((1 << 1) | (1 << 2)) ;
text_s3 PT_LOAD FLAGS((1 << 0) | (1 << 2)) ;
data_s3 PT_LOAD FLAGS((1 << 1) | (1 << 2)) ;
2022-05-19 21:19:29 +03:00
}
SECTIONS
{
. = 0xf000;
2022-05-20 06:17:46 +03:00
.text.stage2 : {
2021-12-19 03:08:34 +03:00
*(.entry)
*(.realmode)
*.s2.o(.text .text.*)
2022-06-21 09:47:48 +03:00
*libgcc*.a:*(.text .text.*)
2022-05-19 21:19:29 +03:00
} :text_s2
2022-05-20 06:17:46 +03:00
.data.stage2 : {
build_id_s2 = .;
KEEP(*build-id.s2.o(*))
2021-12-19 03:08:34 +03:00
*.s2.o(.no_unwind)
s2_data_begin = .;
*.s2.o(.data .data.*)
2022-06-21 09:47:48 +03:00
*libgcc*.a:*(.data .data.*)
2021-12-19 03:08:34 +03:00
s2_data_end = .;
*.s2.o(.rodata .rodata.*)
2022-06-21 09:47:48 +03:00
*libgcc*.a:*(.rodata .rodata.*)
#ifdef LINKER_STAGE2ONLY
/* stage2 missing symbols overrides */
stage2_map = .;
stage3_common = .;
build_id_s3 = .;
full_map = .;
getchar = .;
menu = .;
2023-03-29 23:43:06 +03:00
flanterm_write = .;
2022-09-23 21:53:14 +03:00
term_backend = .;
term_fallback = .;
term_notready = .;
terms = .;
terms_i = .;
stage3_addr = .;
2022-09-14 03:16:05 +03:00
#else
#ifdef LINKER_NOS2MAP
2022-09-14 03:16:05 +03:00
stage2_map = .;
#else
*(.stage2_map)
2022-09-14 03:16:05 +03:00
#endif
#endif
2022-05-19 21:19:29 +03:00
} :data_s2
#ifndef LINKER_STAGE2ONLY
2022-05-20 06:17:46 +03:00
.text.stage3 : {
stage3_addr = .;
2021-12-19 03:08:34 +03:00
*(.text .text.*)
2022-05-19 21:19:29 +03:00
} :text_s3
2022-05-20 06:17:46 +03:00
.data.stage3 : {
build_id_s3 = .;
KEEP(*build-id.s3.o(*))
2021-12-19 03:08:34 +03:00
*(.rodata .rodata.*)
#ifdef LINKER_NOMAP
full_map = .;
#else
2021-12-19 03:08:34 +03:00
*(.full_map)
#endif
2021-12-19 03:08:34 +03:00
*(.no_unwind)
2021-12-12 20:40:27 +03:00
data_begin = .;
2021-12-19 03:08:34 +03:00
*(.data .data.*)
2022-05-19 21:19:29 +03:00
} :data_s3
#endif
2022-05-20 06:17:46 +03:00
.note.gnu.build-id : {
*(.note.gnu.build-id)
limine_sys_size = . - 0xf000;
2022-05-20 06:17:46 +03:00
} :data_s3
.bss : {
bss_begin = .;
*(COMMON)
2021-12-19 03:08:34 +03:00
*(.bss .bss.*)
bss_end = .;
2021-12-12 20:40:27 +03:00
data_end = .;
2022-05-19 21:19:29 +03:00
} :data_s3
/DISCARD/ : {
*(.eh_frame)
*(.note .note.*)
}
}