- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a common block that contains pointers to P2 space structures. Routine umap in shareable image #1 maps and loads all the pointer values. Routine uload in shareable image #2 loads and processes that data. From a user program that is linked with both shareable images I call umap and uload. If my main program includes the common block and then calls umap, upon return the pointer values are set. However, when I call uload, uload doesn't know about them. Am I missing a FORTRAN and/or LINKER option when doing this? Is it possible to do this?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To make this work, all three images need to agree on where the common block is defined. My preference for this sort of thing is to separate out the common into a BLOCK DATA subprogram and link that as its own shareable image. Then you would link the two other shareable images to the one with the common. I think that umap isn't linking against a shareable image that defines the common.
Be sure that you have set up your linker options file to specify the PSECT_ATTR directive that makes the common block "export" from the shareable image (and you have to change the NOSHR attribute to SHR throughout. See the Fortran for OpenVMS User Manual for details.
Steve
Be sure that you have set up your linker options file to specify the PSECT_ATTR directive that makes the common block "export" from the shareable image (and you have to change the NOSHR attribute to SHR throughout. See the Fortran for OpenVMS User Manual for details.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Finally found it. If I add shareable image #1 to the linker option file for shareable image #2, the symbols will be available.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right - #2 needs to link against #1 (or they both need to link against a "#0") to all see the same memory.
Steve
Steve

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page