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.
After I made a basic OS using C, I wanted to write an os using haskell. I had already written a lot of haskell programs, but never an os. However, I encounterd some problems. At my first simple try I got undefined references to a variety of ghc libraries which all depended on some c libraries. After I was finally able to include the libraries in the kernel I got a lot of the following error when linking:
/usr/lib64/ghc-7.0.4//libHSrts.a(Storage.o): In function `initStorage':
(.text+0x193): relocation truncated to fit: R_X86_64_32 against `.rodata.str1.1'
/usr/lib64/ghc-7.0.4//libHSrts.a(Storage.o): In function `initStorage':
(.text+0x2ac): relocation truncated to fit: R_X86_64_32 against `.rodata.str1.1'
Is there anyone who has experience building a kernel using haskell who can help me out, or does anyone know how to solve the error above?
Cheers
The haskell runtime got compiled as 64-bits with 32-bit offsets - an optimisation that's typically default, yet you're linking it at an 64 bit address that doesn't fit signed 32-bits. Check your linker script.
"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 ]