[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference vaxaxp::alphanotes

Title:Alpha Support Conference
Notice:This is a new Alphanotes, please read note 2.2
Moderator:VAXAXP::BERNARDO
Created:Thu Jan 02 1997
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:128
Total number of notes:617

89.0. "Problems linking against shareable image on ALPHA" by GALVIA::FOX_F () Fri Apr 25 1997 12:23


I am having a problem with shareable images on an application port from 
VAX to ALPHA. Maybe someone could help. I have tried to summarise the problem 
below. 

The code being ported was written in BASIC and MACRO. 

The BASIC code needs to be able to write to the PSECT TDB which is 
defined in MACRO and is part of the shareable image. 


! Basic file maps a PSECT named TDB 

MY_TEST.BAS 
-----------
	MAP ( TDB ) & 
		LONG 	TEST_LONG 

! Link option file for MY_test is as follows 

TESTOPT.OPT
-----------
MY$SHR.EXE/SHARE 

! Macro File defines the PSECT name TDB 

MY$DATA.MAR 
-----------
	.PSECT	TDB	PIC,USR,OVR,REL,GBL,SHR,NOEXE,RD,WRT,PAGE
INT_TDBADR::	.LONG	0		; DEFINE SYMBOL FOR TDB
	.END 
	

! Shareable image built from MY$DATA.OBJ 

MY$SHR.EXE 
----------
$ LINK/NONATIVE/SYSEXE/DEBUG/SYM/TRACE/MAP=MY$SHR.MAP - 
	/FULL/CROSS/SHAREABLE=MY$SHR.EXE - 
	  MY$DATA.OBJ +	MYSHR/OPT

! Shareable option file looks like this 
MYSHR.OPT
---------

PSECT_ATTR=TDB,SHR


! Build command file for all of the above 

$ BASIC /OPTIMIZE/WARN/LIST/CROSS/DEBUG/OBJ=MY_TEST.OBJ MY_TEST.BAS
$ MACRO /MIGRATE /OBJ=MY$DATA.OBJ MY$DATA.MAR 
$ LINK/NONATIVE/SYSEXE/DEBUG/SYM/TRACE/MAP=MY$SHR.MAP - 
	/FULL/CROSS/SHAREABLE=MY$SHR.EXE - 
	  MY$DATA.OBJ +	MYSHR/OPT
$ LINK/NONATIVE/SYSEXE/DEBUG/SYM/TRACE/MAP=MY_TEST.MAP/ - 
	FULL/CROSS/EXECUTEABLE=MY_TEST.EXE -
	 MY_TEST.OBJ + TESTOPT/OPT

----------------------------------------------------------------------

On the VAX when I look in the MAP files for MY_TEST and for MY$SHR the 
address for the TDB section are the same. On the ALPHA they are not. 

Can anyone point out what the attributes for the PSECTs should be for 
the ALPHA so that I can access the TDB psect from the BASIC code.  

I feel I should be using a symbol_vector in the myshr.opt file but 
if I use the Psect name (TDB) the linker tells me I have an undefined symbol.

If I compile and link the code against a .OLB that contains the 
TDB PSECT - the code works perfectly on the ALPHA it is only when the 
shareable image is used that problems arise. 

Thanks for any help. 

Regards, 
John. 



 

    
T.RTitleUserPersonal
Name
DateLines
89.1The VMS Notes conference is at VAXAXP::VMSNotesCSC64::BLAYLOCKIf at first you doubt,doubt again.Fri Apr 25 1997 13:373
SYMBOL_VECTOR=(tdb=psect, INT_TDBADR=data)

Is probably more inline with what you want.
89.2Moving to VMSNOTES GALVIA::FOX_FMon Apr 28 1997 05:484
    
    Ooops, I will move this note to the VMS notesfile.