www.digitalmars.com         C & C++   DMDScript  

c++.command-line - Linker question

reply Alexander Beletsky <Alexander_member pathlink.com> writes:
Folks, with GNU linker (ld) I can tell that my 'text' segment to be at the 1mb
memory mark by this instruction:

 ld main.obj -o main.bin --oformat binary -Ttext 0x100000
How can I do the same with Digital Mars linker. Thanks in advance!
Aug 06 2004
parent reply "Walter" <newshound digitalmars.com> writes:
Try the /BASE switch. See www.digitalmars.com/ctg/ctgLinkSwitches.html


"Alexander Beletsky" <Alexander_member pathlink.com> wrote in message
news:cevbo5$2vra$1 digitaldaemon.com...
 Folks, with GNU linker (ld) I can tell that my 'text' segment to be at the
1mb
 memory mark by this instruction:

 ld main.obj -o main.bin --oformat binary -Ttext 0x100000
How can I do the same with Digital Mars linker. Thanks in advance!
Aug 06 2004
parent reply Alexander Beletsky <Alexander_member pathlink.com> writes:
Seems it doesn't help. The map file still the same. /BASE sets the base of
executable image but I need to produce binary.

In article <cf0mb5$r51$1 digitaldaemon.com>, Walter says...
Try the /BASE switch. See www.digitalmars.com/ctg/ctgLinkSwitches.html


"Alexander Beletsky" <Alexander_member pathlink.com> wrote in message
news:cevbo5$2vra$1 digitaldaemon.com...
 Folks, with GNU linker (ld) I can tell that my 'text' segment to be at the
1mb
 memory mark by this instruction:

 ld main.obj -o main.bin --oformat binary -Ttext 0x100000
How can I do the same with Digital Mars linker. Thanks in advance!
Aug 06 2004
parent reply "Walter" <newshound digitalmars.com> writes:
What is the binary for?

"Alexander Beletsky" <Alexander_member pathlink.com> wrote in message
news:cf123b$13l3$1 digitaldaemon.com...
 Seems it doesn't help. The map file still the same. /BASE sets the base of
 executable image but I need to produce binary.

 In article <cf0mb5$r51$1 digitaldaemon.com>, Walter says...
Try the /BASE switch. See www.digitalmars.com/ctg/ctgLinkSwitches.html


"Alexander Beletsky" <Alexander_member pathlink.com> wrote in message
news:cevbo5$2vra$1 digitaldaemon.com...
 Folks, with GNU linker (ld) I can tell that my 'text' segment to be at
the
1mb
 memory mark by this instruction:

 ld main.obj -o main.bin --oformat binary -Ttext 0x100000
How can I do the same with Digital Mars linker. Thanks in advance!
Aug 06 2004
parent reply Alexander Beletsky <Alexander_member pathlink.com> writes:
For OS kernel. :) Actually it is possible to create ussual PE file because of
GRUB can boot any MultiBoot compatipable binaries.

In article <cf15pk$15i0$1 digitaldaemon.com>, Walter says...
What is the binary for?

"Alexander Beletsky" <Alexander_member pathlink.com> wrote in message
news:cf123b$13l3$1 digitaldaemon.com...
 Seems it doesn't help. The map file still the same. /BASE sets the base of
 executable image but I need to produce binary.

 In article <cf0mb5$r51$1 digitaldaemon.com>, Walter says...
Try the /BASE switch. See www.digitalmars.com/ctg/ctgLinkSwitches.html


"Alexander Beletsky" <Alexander_member pathlink.com> wrote in message
news:cevbo5$2vra$1 digitaldaemon.com...
 Folks, with GNU linker (ld) I can tell that my 'text' segment to be at
the
1mb
 memory mark by this instruction:

 ld main.obj -o main.bin --oformat binary -Ttext 0x100000
How can I do the same with Digital Mars linker. Thanks in advance!
Aug 07 2004
parent "Walter" <newshound digitalmars.com> writes:
What you can do is write a simple program to just strip the binary data out
of the PE file.

"Alexander Beletsky" <Alexander_member pathlink.com> wrote in message
news:cf2534$1maj$1 digitaldaemon.com...
 For OS kernel. :) Actually it is possible to create ussual PE file because
of
 GRUB can boot any MultiBoot compatipable binaries.

 In article <cf15pk$15i0$1 digitaldaemon.com>, Walter says...
What is the binary for?

"Alexander Beletsky" <Alexander_member pathlink.com> wrote in message
news:cf123b$13l3$1 digitaldaemon.com...
 Seems it doesn't help. The map file still the same. /BASE sets the base
of
 executable image but I need to produce binary.

 In article <cf0mb5$r51$1 digitaldaemon.com>, Walter says...
Try the /BASE switch. See www.digitalmars.com/ctg/ctgLinkSwitches.html


"Alexander Beletsky" <Alexander_member pathlink.com> wrote in message
news:cevbo5$2vra$1 digitaldaemon.com...
 Folks, with GNU linker (ld) I can tell that my 'text' segment to be
at
the
1mb
 memory mark by this instruction:

 ld main.obj -o main.bin --oformat binary -Ttext 0x100000
How can I do the same with Digital Mars linker. Thanks in advance!
Aug 07 2004