Page 2 of 2

Re: Using string literals

Posted: Wed Dec 23, 2009 1:35 am
by Firestryke31
Aphex wrote:Out of curiosity, what makes you think I am not trying to execute a fully functioning executable or binary file?
Aphex wrote: ld -e _call_start -Ttext 0x1000 -o kernel.o main.o
ld -i -e _call_start -Ttext 0x1000 -o kernel.o main.o
The fact that you were specifying an .o file (intermediate object) to output, though once again I had not fully processed the thread and so was simply throwing a potential possibility out there. Without seeing the full process you use to compile your kernel in the order you perform it in (all I saw at a glance were a couple of commands scattered through your post) I could not tell for sure. AFAIK that does produce a "working" executable, just with an odd extension, but I was a bit pressed for time and could not think through what all those commands do.

Re: Using string literals

Posted: Wed Dec 23, 2009 2:45 am
by Combuster
Aphex wrote:Still, does anyone know a solution to the problem of my original post? I know its not really your job to solve such trivial questions so, I'll learn about linker scripts, can anyone reccomend and tutorials abotu linker scripts? I think they are hard to find.
I suggest you read my posts again... (especially the first)

Maybe I should fix the wikipedia page, since it suggests the wrong thing, and lacks some quality. (for one, the dictionary disagrees with WP; it equals a binary to an executable file, which is in some cases a subset of object files as mentioned above, but not the same as wikipedia suggests)