Hello everyone,
I just started writing a 64bit OS.
I was trying to write a module loader.
https://github.com/AdeRegt/SanderOS64/b ... c/module.c
^ ^ ^ ^ this is my attempt
https://github.com/AdeRegt/SanderOS64/b ... keyboard.c
^ ^ ^ ^ this is an example driver
now, I expect the system to print out "Hello, world!".
But the system is printing out strange characters.
What am I doing wrong? I think something with the relocation is not going well.
Thank you in advantage.
ELF 86_64 Relocatable file :: relocation issue
Re: ELF 86_64 Relocatable file :: relocation issue
You seem to be just reading the file into memory rather than loading the sections to the appropriate addresses.
Re: ELF 86_64 Relocatable file :: relocation issue
Yeah, I want to dynamically load the program. So the program must be loaded at any place that I wan.
Re: ELF 86_64 Relocatable file :: relocation issue
So you are compiling the code as position-independent?
Re: ELF 86_64 Relocatable file :: relocation issue
OK. I must have missed the switch for that in your compile command.
-
- Member
- Posts: 5563
- Joined: Mon Mar 25, 2013 7:01 pm
Re: ELF 86_64 Relocatable file :: relocation issue
What is the address of the "hello world" string?
What address is being passed to k_printf?
What address is being passed to k_printf?
Re: ELF 86_64 Relocatable file :: relocation issue
Thank you for the answer,
This was indeed the problem, I solved the issue now, thanks allot!
This was indeed the problem, I solved the issue now, thanks allot!