Since position independent executables do work when using C code, but I can’t get the linker to output relocation information,my solution is to use gcc’s variable __attribute__ ( (section(.reloc))) tag to place the pointer I want to relocate into its own ELF section, this is obviously easy for my Loader to locate and then write the correct value to.
This feels a little hacky, but it works really well.
Relocatable ELF Object Help
Re: Relocatable ELF Object Help
CuriOS: A single address space GUI based operating system built upon a fairly pure Microkernel/Nanokernel. Download latest bootable x86 Disk Image: https://github.com/h5n1xp/CuriOS/blob/main/disk.img.zip
Discord:https://discord.gg/zn2vV2Su
Discord:https://discord.gg/zn2vV2Su