Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I'm working on porting my operating system to the x64 architecture. I'm following the articles in the wiki for switching to long mode. I use gas for assembly code. The cross compile tool chain is set-up correctly. I compile the 32 bit bootstrap with the following command:
You might want to start with making sure you use the cross-compiler all the way
it can't build 32bit code into my the binary
Actually, it can't mix architectures. Instead you should tell the assembler that certain chunks are to be assembled in 32-bits (and some as 64-bits) using .code32 and .code64, instead of passing the 32-bit architecture flag on the command line
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Combuster wrote:You might want to start with making sure you use the cross-compiler all the way
Actually these are symlinks to the cross compiler. Ubuntu is doing some magic with the update-alternatives there. Probably not the greatest way for an operating system. But it's working for me and I haven't figured out a better way to say cmake which linker it should use.
Combuster wrote:Actually, it can't mix architectures. Instead you should tell the assembler that certain chunks are to be assembled in 32-bits (and some as 64-bits) using .code32 and .code64, instead of passing the 32-bit architecture flag on the command line