Sujet : Re: Fun trick
De : mw40171 (at) *nospam* mucweb.de (hb0815)
Groupes : comp.os.vmsDate : 08. Jan 2025, 23:31:03
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vlmub7$2vndn$2@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
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 <stdio.h>
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!
$