home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.os.vms      DEC's VAX* line of computers & VMS.      264,096 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 263,444 of 264,096   
   John Reagan to All   
   Re: Cross gcc targeting VMS   
   29 Sep 25 18:04:03   
   
   From: johnrreagan@earthlink.net   
      
   On 9/29/2025 4:01 PM, hb0815 wrote:   
   > On 9/29/25 18:17, Waldek Hebisch wrote:   
   >   
   >> Now about troubles.  VMS C functions use different name at C level   
   >> and different in libraries.  Moreover, while offically function is   
   >> available in "imagelib.olb", actual function is in a different library   
   >> and this library is needed for succesful linking.  So, one needs   
   >> to know real name of a given function and teach gcc to use it.   
   >   
   > Yes, for example, printf in the source code is changed  to DECC$GXPRINTF   
   > in the object module. DECC$GXPRINTF is a symbol in the shareable image   
   > library IMAGELIB.OLB. Symbols in a library must be unique. That explains   
   > the DECC$ prefix. I don't know what the GX means or where it comes from.   
   > I also don't know where the mapping/replacement table is.   
   >   
   > IMAGELIB.OLB contains only the symbol and a link to the shareable image.   
   > The actual code (and data) is in the shareable image, not in a library.   
   > So if you link using IMAGELIB.OLB you link with DECC$SHR. At least on   
   > Alpha, the symbol DECC$GXPRINTF is also in STARLET.OLB. By default this   
   > OLB is not used, by default you dynamically link and not statically. Do   
   > a link on VMS/Alpha with a map file. In the map you will only see   
   > DECC$SHR, no STARLET.OLB and no IMAGELIB.OLB.   
   >   
   >   
   The CRTL's mapping table is in the CRTL and is read by the compiler.   
   The format isn't documented (I think) and contains more than just names.   
     It nothing (well, almost nothing) is hard-coded into the compiler.   
      
   There is also the SYS$LIBRARY:DECC$CRTLMAP.EXE file which is just the   
   mapping table.  The building of the CRTL needs to known which names get   
   mapped in the source.  Think of case where we are adding a new routine   
   to the RTL.  The RTL in the build environment doesn't have the routine   
   and its mapping table.  We need to get it mapped just to build the first   
   time.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca