flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Linking a 64 bit kernel |
Author |
|
AnonymousUser 12 Aug 2014, 02:22
Sorry if I have been posting a lot of questions guys I'm a little new to OS Dev
Anyway I was having trouble linking my C++ kernel to my assembly part of the kernel It links it without any errors but It looks like It is not loading it at the proper address here is the linker script: Code: KernAddr = 0x2000; ENTRY(_Start) SECTIONS { . = KernAddr; .text : AT(ADDR(.text) - KernAddr) { _code = .; *(.text) *(.rodata*) . = ALIGN(4096); } .data : AT(ADDR(.data) - KernAddr) { _data = .; *(.data) . = ALIGN(4096); } .eh_frame : AT(ADDR(.eh_frame) - KernAddr) { _ehframe = .; *(.eh_frame) . = ALIGN(4096); } .bss : AT(ADDR(.bss) - KernAddr) { _bss = .; *(.bss) /* * You usually need to include generated COMMON symbols * under kernel BSS section or use gcc's -fno-common */ *(COMMON) . = ALIGN(4096); } _end = .; /DISCARD/ : { *(.comment) } } This is the version of the bin utils I use and how I link it: Code: GNU ld (GNU Binutils) 2.24 x86_64-elf-ld -T linkerscript.ld -o Anmu.bin Stage2.o kernel.o -nostdlib The full source code is available here: https://github.com/AnonymousUser1337/Anmu if you need to take a look at it. _________________ Thanks in advance |
|||
12 Aug 2014, 02:22 |
|
AnonymousUser 12 Aug 2014, 19:47
My mistake again I forgot to change the file name length
|
|||
12 Aug 2014, 19:47 |
|
AnonymousUser 18 Aug 2014, 01:29
sid I am still reading up on how to call the constructors for now I am just using one file any help with that would be great
Thanks in advance Anonymous user |
|||
18 Aug 2014, 01:29 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.