[Info-vax] Status of the PostgreSQL port?
hb
end.of at inter.net
Tue Jun 30 13:31:01 EDT 2015
On 06/30/2015 05:12 PM, Stephen Hoffman wrote:
> On 2015-06-30 08:15:40 +0000, hb said:
>> That's what the alias name in the linker option symbol_vector offers
>> and/or on the other hand one might want to use #defines to continue
>> using "foo" in the sources. In other words, the owner of the shareable
>> image and the developer are responsible to offer and use the correct
>> interface. It's not the job of the linker to make a match just by
>> magic: do what I mean.
>
> Ayup. It's where the linker and the compilers start to uppercase stuff
> that gets ugly. And as has been discussed recently, there is not a
> clean mapping.
I'm not sure I understand what you referring to with "the linker ...
start[s] to uppercase stuff". The only thing the linker, by default,
uppercases are the options. This can be switched off with
"case_sensitive=yes" (only the stuff after the "=" is affected so you
sure have to switch it back with "case_sensitive=NO").
> There are tools other than the linker and lib$find_image_symbol that use
> the external symbols. I'm in the midst of writing one
> <http://labs.hoffmanlabs.com/node/1906>, as a workaround for having
> uppercase-only symbols in the symbol table. Currently sorting out the
> handling of data entries as part of an update. There are other tools
> around that access the symbols, as well.
Yes, there are other tools, but not so many in VMS. Yes, I forgot
LIBRARIAN which creates image libraries.
>From what I read in the referred to html page, you can something similar
by using the "imgexp" tool (on Alpha and I64) like:
$ type xapp.c
#include <stdio.h>
extern int bar;
extern int foo();
int main() {
printf ("bar: %i\n", bar);
foo();
return 1;
}
$ cc xapp
$ link xapp,tt:/opt
xshr/share
^Z
$ def /user xshr sys$disk:[]xshr
$ r xapp
bar: 4711
foo
$
$ cc/names=as_is xapp
$ link xapp,tt:/opt
xshr/share
Exit
%LINK-W-NUDFSYMS, 2 undefined symbols:
%LINK-I-UDFSYM, bar
%LINK-I-UDFSYM, foo
%LINK-W-USEUNDEF, undefined symbol bar referenced
in psect $LINK$ offset %X00000030
in module XAPP file EISNER$DRA3:[DECUSERVE_USER.USER]XAPP.OBJ;2
%LINK-W-USEUNDEF, undefined symbol foo referenced
in psect $LINK$ offset %X00000040
in module XAPP file EISNER$DRA3:[DECUSERVE_USER.USER]XAPP.OBJ;2
$
$ bash
bash-4.3$ usrexe/imgexp -v xshr.exe |egrep MAT |sed s/MAT/GSMATCH=/
>dummy.opt
bash-4.3$ echo CASE=YES >>dummy.opt
bash-4.3$ usrexe/imgexp xshr.exe |grep "type is procedure" |tr 'A-Z'
'a-z' |awk '{print
"symbol_vector=("$1"/uniqueProcedureSymbol=PROCEDURE)"}' |sed s/,//
>>dummy.opt
bash-4.3$ usrexe/imgexp xshr.exe |grep "type is data" |tr 'A-Z' 'a-z'
|awk '{print "symbol_vector=("$1"/uniqueDataSymbol=DATA)"}' |sed s/,//
>>dummy.opt
bash-4.3$ exit
$ cre dummy.c
void uniqueProcedureSymbol(){}
int uniqueDataSymbol;
$
$ cc/names=as_is dummy
$ link/share dummy,;/opt
$ def/user xshr sys$disk:[]dummy.exe;
$ link xapp,tt:/opt
xshr/share
^Z
$ def/user xshr sys$disk:[]xshr
$ r xapp
bar: 4711
foo
$
And for the readers, who don't want ot try it themselves:
$ imgexp -v xshr.exe
Image Exports (Alpha), version 1.7
MATEQU, 22, 12083108
FOO, type is procedure, offset: 0x0, value: 0x0
BAR, type is data, offset: 0x10, value: 0x10000
$
$ type dummy.opt
GSMATCH=EQU, 22, 12083108
CASE=YES
symbol_vector=(foo/uniqueProcedureSymbol=PROCEDURE)
symbol_vector=(bar/uniqueDataSymbol=DATA)
$
More information about the Info-vax
mailing list