Subject: Re: CLD symbol table object on Itanium From: hoff@hp.nospam (Hoff Hoffman) Date: Fri, 25 Mar 2005 22:05:24 GMT Newsgroups: comp.os.vms In article <00A414B5.06C91059@SendSpamHere.ORG>, VAXman- @SendSpamHere.ORG writes: :So how are you supposed to use CLD symbol tables on Itanium? The linker :balks at them when I try to link. A chunk of code around was playing fast-n-loose with the externals for command tables, and it got caught -- what was once an effectively identical external reference can now differ; routine references not necessarily the same as structure references. A bogus external reference to the command tables can lead to the CLI callback error: %CLI-E-INVTAB, command tables have invalid format - see documentation In some of the OpenVMS VAX and OpenVMS Alpha code I've seen, the command definition file reference was erroneously declared as a routine pointer, and the success of that syntax was actually somewhat of a fluke. Here's what was used in some of the Bliss I've seen: EXTERNAL ROUTINE cmdtbl; and that should be coded (for all OpenVMS platforms) as: EXTERNAL cmdtbl; In C, something like the following should typically be used: extern void *cmdtbl; In Fortran, external is a routine declaration, and what you need here is an attributes extern and something like the following: integer cmdtbl cDEC$ attributes extern :: cmdtbl -- As for C references for lib$table_parse state table and key table references, here is what I am using -- though the void shown above can and does also work -- to force the external reference processing with C pragmas: #pragma extern_model save #pragma extern_model strict_refdef extern unsigned int mumble$STATE_fratz, mumble$KEY_fratz; #pragma extern_model restore -- And for C references for cli$dcl_parse, here is what I am using: .. extern void *mumble$$CLI_TABLES; .. Do remember you need to use `&mumble$$CLI_TABLES' to reference the external symbol in the cli$dcl_parse call; you need to pass it by reference. -- Here are a couple of references to the error I've located: http://h71000.www7.hp.com/wizardi64/wizi64_0009.html http://h71000.www7.hp.com/DOC/82final/6673/6673pro_003.html The latter is the porting manual. I can probably dredge up a few other references. ---------------------------- #include ----------------------------- For additional, please see the OpenVMS FAQ -- www.hp.com/go/openvms/faq --------------------------- pure personal opinion --------------------------- Hoff (Stephen) Hoffman OpenVMS Engineering hoff[at]hp.com