Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2010 04:57 AM
11-15-2010 04:57 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2010 06:59 AM
11-15-2010 06:59 AM
Re: IA64
http://labs.hoffmanlabs.com/node/163
If that's not the particular "vector table" you're referring to, then please post a hunk of the Macro32 code involved; some additional background, context, and a reproducer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2010 07:46 AM
11-15-2010 07:46 AM
Re: IA64
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2010 09:36 AM
11-15-2010 09:36 AM
Re: IA64
.title lgi$loginout_callouts - data transfer vector holder definition
.ident /v1.4/
lgi$loginout_callouts::
.long 9
.address paalgi_init
.long 0
.address paalgi_decwinit
.address paalgi_identify
.address paalgi_authenticate
.long 0
.long 0
.address paalgi_logout
.long 0
.end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2010 10:13 AM
11-15-2010 10:13 AM
Re: IA64
So you need help declaring a VMS data structure.
For this case, I'd probably use the declarations that are present in LGIDEF, but that's your call.
Here's the data structure definition you're working with:
http://h71000.www7.hp.com/doc/731final/4493/4493pro_038.html
The necessary declarations are present in Macro32 library, in the Bliss library, and in the C library. Probably in various other language definition libraries, too.
Here's how to get a look at the C struct declaration:
$ lib sys$share:sys$lib_c.tlb/extr=LGIDEF/out=lgidef.h
Here's an introduction to C programming on VMS, and which includes a discussion of SYS$LIB_C.TLB:
http://labs.hoffmanlabs.com/node/273
Whomever coded that Macro32 module didn't do it using the system declarations (no big deal); that'd normally be a block buffer declaration (.blkb, probably) and then the Macro32 symbolic offsets from LGIDEF module. (There's no macro declaration, so what was done with that Macro32 code is functional.)
To that end, there are examples of referring to the *DEF modules in various Macro32 examples, including here:
SYS$EXAMPLES:LAT$RATING_DPT.MAR
SYS$EXAMPLES:PREFER.MAR
Those show DEF declarations, and the rest of the stuff.
.blkb LGI$S_LGIARG_VECTOR
I'd guess that the Macro32 compiler error you're hitting is related to a (missing) PSECT declaration, but I'd need to run a build on an Itanium to confirm that. Probably something like:
.PSECT $RWDATA,RD,WRT,NOEXE,NOSHR
needs to be added ahead of the declarations. But without an Itanium box and without the diagnostics, the specific error isn't clear. (That code should still build, so there's probably something pretty simple wrong with it.)
Here's an introduction to Macro32 programming on VMS:
http://labs.hoffmanlabs.com/node/1435
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2010 10:24 AM
11-15-2010 10:24 AM
Re: IA64
See the C code example attached to my response in this thread:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1182554
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2010 12:48 PM
11-15-2010 12:48 PM
Re: IA64
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2010 02:19 PM
11-15-2010 02:19 PM
Re: IA64
First, welcome to the HP ITRC OpenVMS Forum.
So that we can understand precisely what is happening, it would be extremely helpful if you could post the precise error message that you are encountering.
An alignment problem can be addressed directly by properly aligning the PSECT or by using the .ALIGN macro directive.
More information would be extremely useful.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2010 04:57 PM
11-15-2010 04:57 PM
Re: IA64
Please show use how you come to that conclusion.
The macro you present compiles to the exact same definitions/psects/references/aligment on Alpha as on Itanium. For yucks I tried using "AMAC V5.0-120" and "IMAC V5.0-120-4". They both generate a Psect: . BLANK . 00000028 (00040.) 01 (001.) NOPIC CON REL LCL NOSHR EXE RD WRT
Now as Hoff says, those Psect attribute may no longer be appropriate.
Have you read Jess's reply carefully? You only awared it 5-points suggesting it did not help, yet he points to a rather complete and working example.
Good luck!
Hein
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2010 03:51 AM
11-16-2010 03:51 AM
SolutionThe C solution is perhaps the best though.
Dan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2010 04:10 AM
11-16-2010 04:10 AM
Re: IA64
Second.....here is what I have coded so far using C based on Jess's example. My next question is if I have all of the paa routines defined in seperate .mar files, is it possible to point to those from this file?
I'm still trying to grasp the concept of vectors, so please be kind :) I assumed that my first .mar file (that I posted first) was pointing to a specific .address in memory to where the associated paa procedures were located. In the "C" code, I do not see where this is happening.
Any thoughts would be great. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2010 04:11 AM
11-16-2010 04:11 AM
Re: IA64
** INCLUDE FILES
*/
#include
#include
#include
#include
#include
#include
#include
/* System service calls */
int SYS$ASSIGN();
int SYS$QIOW();
int SYS$DASSGN();
/* Define structure for the callout routines vector */
struct LGI$CALLOUT_VECTOR {
long int LGI$L_ICR_ENTRY_COUNT;
int (*LGI$ICR_INIT) ();
int (*LGI$ICR_IACT_START) ();
int (*LGI$ICR_DECWINIT) ();
int (*LGI$ICR_IDENTIFY) ();
int (*LGI$ICR_AUTHENTICATE) ();
int (*LGI$ICR_CHKRESTRICT) ();
int (*LGI$ICR_FINISH) ();
int (*LGI$ICR_LOGOUT) ();
int (*LGI$ICR_JOBSTEP) ();
};
/* Declare the callout routines that we define below. */
static int paalgi_init();
static int paalgi_decwinit();
static int paalgi_identify();
static int paalgi_authenticate();
static int paalgi_logout();
#pragma nostandard
globaldef struct LGI$CALLOUT_VECTOR LGI$LOGINOUT_CALLOUTS =
{
9, /* argument count */
paalgi_init, /* general login init */
NULL, /* interactive start - initialized */
paalgi_decwinit, /* decwindows init */
paalgi_identify, /* identify - filled in if interactive */
paalgi_authenticate, /* authenticate - filled in if dialup */
NULL, /* check restrictions */
NULL, /* login finish */
paalgi_logout, /* logout */
NULL, /* each batch jobstep */
};
static int paalgi_init()
{
}
static int paalgi_decwinit()
{
}
static int paalgi_identify()
{
}
static int paalgi_authenticate()
{
}
static int paalgi_logout()
{
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2010 04:19 AM
11-16-2010 04:19 AM
Re: IA64
paalig_init.for
paalig_decwinit.for
paalig_identify.for
paalig_authenticate.for
paalig_logout.for
are already compiled and added into the shared images.
Thought that might help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2010 05:23 AM
11-16-2010 05:23 AM
Re: IA64
It is not happening. In that C example the LGI vector is filled in with pointers to local routines.
But we now learned that you have the service routines in independent fortra mondule.
The Macro module was, and is, just fine for that.
The .address instructs the LINKER to fill in a reference to routine which eventually the Image Activator will make real.
Isn't it about time you start to describe what went wrong, instead of what it right?
An error message perhaps?
There is a second vector in play, the transfer vector used to build the shareable.
My WAG is the problem is in the linking of the shareable or the logical name defined.
>> Jess, sorry I gave you 5 pts.
And I am sorry for reading too much into that.
Regards,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2010 05:41 AM
11-16-2010 05:41 AM
Re: IA64
Concerning your post at 12:10:43 GMT today:
A vector is simply a list of addresses. What the MACRO code does is define a set of longword (32-bit) locations that will contain pointers to the actual locations of the identified routines.
The MACRO assember/compiler (MACRO in the case of VAX; AMACRO compiler for Alpha; IMACRO in the case of IA64) will produce two outputs: the actual storage locations and a list (for the linker) of the external names that are to go into those locations).
When LINK is used to combine the object modules, the address locations will, in concept, be resolved. Actually, they will produce another list, to be used by the image activator when the image is actually loaded into memory (this is one of the foundation concepts behind shareable libraries; the actual locations of external addresses can vary from activation to activation).
While the actual addresses of entry points can change, the vectors (the address of the address) remains unchanged.
The details of this can be found in the internals and data structures manual. A simplified version can be found in the LINKER reference manual. The IDSM is available as a book; the LINKER manual is available from the documentation section of the OpenVMS www site as a PDF.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2010 11:26 AM
11-16-2010 11:26 AM
Re: IA64
Jess
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2010 11:27 AM
11-16-2010 11:27 AM
Re: IA64
>>> The .address instructs the LINKER to fill in a reference to routine which eventually the Image Activator will make real.
The linker does not see the .address: (the) MACRO (-compiler) turns that into an undefined symbol and an object relocation, because the actual address in or the offset within the image is unknown to (the) MACRO (compiler). In case the symbol is defined in another object module, which is linked into the image, the linker knows where the procedure is and resolves the undefined symbol and applies the object relocation. In terms of the source code, the linker writes the actual address of the prodecure in the data structure. In case the symbol is defined by a universal symbol from a shareable image, the linker doesn't know the procedures's address but resolves the undefined symbol and creates a fixup. The latter may be seen as a "reference". However, the fixup itself has no information whether it is for a routine or data. When the address is known, at image activation time, when for all the involved images their address space is known, the Image Activator applies the fixup, In terms of source code, the Image Activator writes the actual address of the procedure in the data structure.
>>> Actually, they will produce another list, to be used by the image activator when the image is actually loaded into memory.
The Image Activator does not load anything. I'm sure it would have been named loader instead. The Image Activator sets up the virtual address space of all the involved images: one main image and zero to many shareable images. This is usually named as mapping the images, although there is not much actual mapping done. The Image Activator assigns VAs to all the program segments (I64 term) or image sections (Alpha term). These things can be file based, global, demand zero, or pagefile VMS sections. These VMS sections are mapped, when there is real memory associated with the section. Only those sections which are touched at activation time are mapped. The section in which the source code data structure ends up is mapped, when the fixup has to be made. (Obviously it is a pagefile section.) Anything else is NOT in memory especially code and readonly data are not "loaded" into memory. That happens at run-time, that is AFTER activation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2010 11:33 AM
11-16-2010 11:33 AM
Re: IA64
Jess
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2010 12:31 PM
11-16-2010 12:31 PM
Re: IA64
I well know that the Image Activator sets up the address space and that it does not do the actual loading.
My goal was to explain as simply as possible what is going on. Obviously, the OP is not familiar with the mechanics of resolving external symbols. In all honesty, I have often found the descriptions of external symbol resolution accurate, yet not within the easy grasp of those encountering it for the first time.
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2010 07:48 AM
11-17-2010 07:48 AM
Re: IA64
Again, thanks everyone for the help. This board is very helpful because of the level of expertise here.