Mail Archives: djgpp/1996/08/17/14:13:53
On Fri, 16 Aug 1996, Alaric B. Williams wrote:
>"Sam Phillips" <sphillips AT sphillips DOT reno DOT nv DOT us> wrote:
>
>>I was wondering if there was a way to create some code to put into a boot
>>sector, and then after having it is there a painless method to put the code
>>in the bootsector.
>
>This sounds similar to something I was trying... a boostrap written
>with as that loads a 'kernel image' from disk, engages pmode, and
>jumps to it. This kernel image would be constructed from a COFF file.
>
>I looked at how Linux did it, and it used some wierd ld switch I'd
>never seen before, and my DJGPP ld didn't like it.
But the *real* startup code is still written in 16-bit ASM, right? And the
image produced by ld with the switch is a relocated ELF image (I think).
Linux GCC produces ELF objects that can be used as shared libraries. AFAIK,
COFF doesn't support that kind of image (don't quote me, but I think it is
so).
On second thought, isn't there in ld an option to create ROM images (I mean in
the script language for ld)? This would do the trick.
>
>How do I create a code image, prelocated for a specific base address,
>that can be just loaded and jumped to???
>
See above.
Mark
/************************************************************/
/** Maybe it was infatuation or the thrill of a chase? **/
/** Maybe you were always beyond my reach and my heart **/
/** was playing safe? ***********/
/** But was that love in your eyes I saw, **/
/** or the reflection of mine? **/
/** I'll never really know for sure, **/
/** You never really gave me time! **/
/** Won't you give me that time? **/
/** "Cindirella Search" **/
/********************************/
Visit my homepage: http://ananke.amu.edu.pl/~grendel
- Raw text -