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.
it just seems that i can't get a k-printf function to work.
i managed to display one character to the screen but when i go further and try to display a string well it just won't.
i would appretiate it if someone is willing to help or give me some kind of hint .
This is a very common problem (stuff working, except when you use strings), usually caused by not including or linking .rodata (.gnuanything.rodata, .rdata or something like that) in the executable. Less common cases include setting wrong offsets or forgetting to load the bit of the executable that contains the actual string.
In some minor cases people have forgotten to map the memory they're writing to, have accidentally used a base segment or were expecting a 32-bit address to work normally in real-mode.
Since pretty much all of these common cases could apply and since we can't check many of then not knowing the rest of your environment, you might be able to check them yourselves.
We'd be interested in:
- Windows or other development platform (_-stuff)
- Compiler used (platform native, cygwin, djgpp, MSVC, Borland, crosscompiler)
- Build script (makefile)
- Link script (for this case especially this one)
thanks a lot, i searched the web voor .rodata and i inserted it in my linker script and know it works. but i don't really understand the linker script.. if someone knows a good site that explains it would be great.
thanks a lot, i searched the web voor .rodata and i inserted it in my linker script and know it works. but i don't really understand the linker script.. if someone knows a good site that explains it would be great.
thanks a lot
greetings oasix
You could start with the LD manpage and some example linker scripts plus loose descriptions of what they do. Lots of linker scripts have been posted to this forum in the past, with lots of criticism and comment on how they work, so you should be able to find them useful. Try searching for "linker".