Re: Linker strangeness

From: Debs (debs-agent_at_dwiles.demon.co.uk)
Date: 12/18/04


Date: Sat, 18 Dec 2004 03:57:58 +0000

On Fri, 17 Dec 2004 22:55:37 +0300, "Alexei A. Frounze"
<alexfru@chat.ru> wrote:

>> When I link the code to produce a com file I get the error message
>> "ID_Reset.obj(ID_Reset.asm) : error L2029: '_start' : unresolved
>> external".

>
>Can it be MASM package that doesn't support DOS executable formats anymore?
>Can it be that LINK wants certain kind of entry point?
>
I wish it was that simple. Unfortunately this is the same version of
link that was distributed as part of Visual C++ 1.52, the last of the
16-bit compilers they released. I also had problems linking with TLink
and ALink. In each case I was able to produce a com file of the same
size as the original, but it didn't execute correctly.

The com file I produced from a single input file executes under 16-bit
DOS, but not under windows (thecommand interpreter just freezes). The
versions which don't work tried to print an endless stream of text,
and also produced no end of beeps. The non-working versions also
produced no end of screen garbage under DOS and couldn't be shut down,
whereas the single file version without a linking issue works
perfectly (at least, it would be perfect if it was up-to-date and was
not such a large file that I can't maintain it properly).

What I decided to do until I figure out either a linker that can cope
or how to use the linkers that are available is to separate out
modules, but to use %include directives to include them in the main
source file. It's not ideal, as it prevents me setting up an object
library for later use, but at least it works and allows me to use
files that are small enough to be manageable. It also means that when
I add the processor initialise code, and move on to add code turning
it into a second stage loader, I won't end up with a source file that
is over 1M in size.

If you know of a linker that has reasonable documentation and will
allow me to link mixed-mode code (the loader will start in 16-bit and
set up 32-bit mode) then I would appreciate it. Even if I have to pay
for it, although I would far rather use Open Source or GPL tools where
possible (mainly because I want to release all my code under a license
similar to GPL and/or BSD, and I want to know that users who only use
free tools can use my code without modification if they so wish).

Debs

A friend in need is a strain on the purse

To reply via email, remove "-agent" from return address



Relevant Pages

  • Re: Programs compiled with Intels ASM86 wont run under DOS operating system
    ... The linker will produce an .exe file which you can execute in ... > DOS. ...
    (comp.arch.embedded)
  • RE: [Full-Disclosure] Oldest Hack Sept. 1970 Just for Fun
    ... So who first discovered the execute bug in 7090? ... DoS a BASIC programmable caluclator with an infinite loop. ... > year that computer programming was offered if I remember correctly. ...
    (Full-Disclosure)
  • Re: Downsides to madvise/fadvise(willneed) for application startup
    ... layout is basically random). ... the linker scrambles the executable's block ordering. ... who compile their own web browser and execute it from the file which ld ... people compile their own browser to get a perfect layout. ...
    (Linux-Kernel)
  • Re: Linker strangeness
    ... but it didn't execute correctly. ... > DOS, but not under windows. ... package, used separate full MASM package, v5.xx or v6.xx, v6.11 is the ... binary (NASM is able to do this w/o external linker) and then include it ...
    (alt.lang.asm)
  • Re: Write Access Error When Using CFileDialog
    ... The error you report is a linker error caused by having a running instance of the program. ... error only occurs when I push my 'browse' button and execute the code ... and rebuild it, and when I rebuild it, it tells me this: ...
    (microsoft.public.vc.mfc)