[mingw - C/C++] RE: Is it MinGW's error?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[mingw - C/C++] RE: Is it MinGW's error?

SourceForge.net

Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=3208000
By: yaroslavsky_a

Hm, by --oformat binary you mean you want a *.com file? That's not possible
with mingw as far as I know. Without this switch the code compiles ok, but I'm
not sure if that is what you need.

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=286529


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: [mingw - C/C++] RE: Is it MinGW's error?

Mark Junker
SourceForge.net schrieb:

>Hm, by --oformat binary you mean you want a *.com file? That's not possible
>with mingw as far as I know. Without this switch the code compiles ok, but I'm
>not sure if that is what you need.
>  
>
He might try using objcopy.

Regards,
Mark



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

RE: [mingw - C/C++] RE: Is it MinGW's error?

Julien Lecomte
 

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Mark Junker
> Sent: samedi 18 juin 2005 14:40
> To: [hidden email]
> Subject: Re: [Mingw-users] [mingw - C/C++] RE: Is it MinGW's error?
>
> SourceForge.net schrieb:
>
> >Hm, by --oformat binary you mean you want a *.com file? That's not
> >possible with mingw as far as I know. Without this switch the code
> >compiles ok, but I'm not sure if that is what you need.
> >  
> >
> He might try using objcopy.
>
> Regards,
> Mark
>

I've had fun at some point making boot diskette programs. The easiest way
with mingw is to use a LD script. Objcopy also works, but it's just much
simpler with a LD script.
For more information, you should google on keywords such as "ld script" /
"linker script" and/or "boot loader".

For com files (not pure binary), it should probably be the same; the
Sourceforge project FreeDOS might give some good information on how to.

J

Here's a simple LD script for a boot loader (pure binary) program (notice
that entry point is for a bootloader):

OUTPUT_FORMAT("pe-i386")
OUTPUT_ARCH(i386)

ENTRY(_start)

SECTIONS
{
        . = 0x7C00;
        .text :
        {
                *(.text)
        }
}



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users