Dynamic link libraries in DOS

DOS specific questions.
angros47
Posts: 1425
Joined: Jun 21, 2005 19:04

Re: Dynamic link libraries in DOS

Postby angros47 » Aug 20, 2017 5:35

I have kept a copy of all of them, I can upload it
angros47
Posts: 1425
Joined: Jun 21, 2005 19:04

Re: Dynamic link libraries in DOS

Postby angros47 » Aug 20, 2017 9:34

Here is the dynamic link file: https://ufile.io/aejmc

And here is the thread patch: https://ufile.io/cpavi
rugxulo
Posts: 203
Joined: Jun 30, 2006 5:31
Location: Usono (aka, USA)
Contact:

Re: Dynamic link libraries in DOS

Postby rugxulo » Oct 15, 2017 22:03

rugxulo wrote:
marcov wrote:So that probably precludes any dead code removal options (--gc-sections and friends on gcc) too.


Last I checked, this wasn't supported by BinUtils on any COFF targets, so that won't work here. MS COFF is probably the only COFF target that will get any work done in the future, due to Windows popularity (as Cygwin and MinGW are tier two). But even that isn't "top tier" for GCC / BinUtils developers. They mostly only focus on ELF and consider COFF (and others?) as heavily deprecated (and even COFF "-gcoff" debugging since GCC 4.5.x seems broken, at least for DJGPP, in lieu of newer DWARF, e.g. v4, which is heavily favored these days).


This actually does now "mostly" seem to work with latest DJGPP BinUtils, but I wouldn't forcibly rely on it.
coderJeff
Site Admin
Posts: 2817
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Dynamic link libraries in DOS

Postby coderJeff » Jan 28, 2019 2:27

I tried a simple dll example, and it did work. I am updating the the 1.06 release to include dxe3gen.exe.

I'm using files (binaries) readily available from djgpp mirrors.

Besides that, there are some improvements to the feature that could be made:
- documentation
- fbc -dll fileX.bas creates fileX_li.a but my ld looks for libfileX.a
- statically linking will cause crash on exe load. A call to dylibopen() is needed to initialize the export table
- rebuilding libfb.a due to change in symb_reg.txt, mimimally should only need to touch src/rtlib/dos/sys_dylib.c and re-add sys_dylib.o
- or possibly, put the export table in it's own object module, that gets built and linked separately from libfb.a (but added automatically to the ld command line)

I'm not going to try and fix or change before next release.

Return to “DOS”

Who is online

Users browsing this forum: badidea and 2 guests