Page 1 of 1

[SOLVED] How to link executable of different architectures ?

Posted: Wed Dec 11, 2013 2:46 pm
by wichtounet
Hi,

I'm developing a 64bit kernel. Until now, I had an assembly step after the bootloader that is doing the 16 -> 32 -> 64 stuff and then it calls the kernel main function that is placed at a specific address by the linker.

I'm now trying to integrate this part inside my C++ kernel instead of creating two separated executables.

I figured out how to create 16-bit compatible and 32 bit executables, but now how do I put together the three C++ generated parts (16, 32, 64).

Is there a way to link them together ?

Thanks

Re: How can I link executable of different architectures ?

Posted: Sun Dec 15, 2013 2:30 pm
by wichtounet
I've been able to find a solution. It is necessary to convert the 16 and 32 bit executables in elf-x86-64 format before linking and then everything works fine.