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 262,223 of 264,096   
   hb0815 to All   
   Re: Fun trick   
   08 Jan 25 23:31:03   
   
   From: mw40171@mucweb.de   
      
   On 1/8/25 23:20, Arne Vajhøj wrote:   
   > On 1/8/2025 5:11 PM, hb0815 wrote:   
   >> On 1/8/25 02:58, Arne Vajhøj wrote:   
   >>> During some troubleshooting over at VSI forum hb told me that   
   >>> running a shareable image will execute LIB$INITIALIZE   
   >>> functions.   
   >>>   
   >>> That made me write this:   
   >>   
   >> Yeah, but ... You do not need init code for this.   
   >   
   > Oh.   
   >   
   > Can one get a transfer address into a shareable image?   
   >   
   > Arne   
   >   
   $ sh sys/noproc/full   
   OpenVMS V8.4-2L2  on node EISNER    8-JAN-2025 17:29:41.07   Uptime  3   
   22:58:56   
            AlphaServer ES40   
   $   
   $ ty s.c   
   #include    
   static int firstFunctionInThisModuleBecomesTheEntryPoint () {   
      printf ("It's the shareable, stupid!\n");   
      return 1;   
   }   
   int foo () {   
      printf ("This is %s\n", __func__);   
      return 1;   
   }   
   $ cc s/stand=rel   
   $ link/share s,tt:/opt ! symbol_v=(foo=proc)   
   symbol_v=(foo=proc)   
     Exit   
   $ r s   
   It's the shareable, stupid!   
   $   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

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


(c) 1994,  bbs@darkrealms.ca