delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/28/15:00:18.1

From: "Tim \"Zastai\" Van Holder" <zastai AT hotmail DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <14978418 DOT 80f58605 AT usw-ex0108-061 DOT remarq DOT com> <393ebb7e$0$80802 AT SSP1NO17 DOT highway DOT telekom DOT at> <1a08df04 DOT 53d45f41 AT usw-ex0108-061 DOT remarq DOT com>
Subject: Re: Using libraries in a DLX (?)
Lines: 51
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <bCr65.111063$6t3.157718@afrodite.telenet-ops.be>
Date: Wed, 28 Jun 2000 18:37:59 GMT
NNTP-Posting-Host: 213.224.63.5
X-Complaints-To: abuse AT pandora DOT be
X-Trace: afrodite.telenet-ops.be 962217479 213.224.63.5 (Wed, 28 Jun 2000 20:37:59 MET DST)
NNTP-Posting-Date: Wed, 28 Jun 2000 20:37:59 MET DST
Organization: Pandora-- Met vlotte tred op Internet
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

[snip]
>         ((FUNC)DLXGetEntry(myd1,"testproc"))(); /* GPF!!! */
Aside from any othe consideration, you should ALWAYS catch a function
pointer like this in a variable and make sure it's not NULL. Either GetEntry
isn't finding your function (maybe try "_testproc"), or there is some bug in
DLX.

> - and a second problem: "extended DLX" does not support C++:
It probably does, but doesn't now it yet. The problem is most likely that
the linker script it probably comes with doesn't yet mention
the sections introduced by gcc 2.95. Something similar to this is required:
----
OUTPUT_FORMAT("coff-go32")
FORCE_COMMON_ALLOCATION
SECTIONS {
  .dlxdata : {
    *(.text)
    *(.gnu.linkonce.t*)
    *(.const*)
    *(.ro*)
    *(.gnu.linkonce.r*)
    etext  =  . ; _etext = .;
    dlx_first_ctor = . ;
    *(.ctor)
    dlx_last_ctor = . ;
    dlx_first_dtor = . ;
    *(.dtor)
    dlx_last_dtor = . ;
    *(.data)
    *(.gnu.linkonce.d*)
    ___EH_FRAME_BEGIN__ = . ;
    *(.eh_fram*)
    ___EH_FRAME_END__ = . ;
    LONG(0)
    *(.gcc_exc*)
    edata  =  . ; _edata = .;
    _object.2 = . ;
    . += 24 ;
    *(.bss)
    *(COMMON)
    end = . ; _end = .;
  }
}
-----

This is taken from my own patched DLX library, which includes exception
support and compression.

Zastai


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019