exporting symbols, help with export list
Robert Schweikert
rjschwei@abaqus.com
Thu Aug 5 17:00:00 GMT 2004
I have another question/problem with respect to the symbol exporting
discussed earlier this week.
How does this work with Fortran common blocks?
The basic idea is as follows:
I have a common block in shared library A as well as some other code.
The code and common block are exported in a version script like so:
{
global:
setcommon_;
cdp_;
local: *;
};
where cdp is the common block declared as follows:
common/cdp/joutp
In shared library B I call setcommon_ which sets the value of the common
block varaible. Then I read the value of the common block directly in B
and if I use export lists the value is incorrect. When not using export
lists the value is correct.
Attached is a simple example, and here is the output:
No export list
-> ./noExport.x
Test common blocks with export lists
Value before setCommon: 0
Set the common block value to: 10
Value after setCommon: 10
Common value in readvales: 10
With export list
-> ./export.x
Test common blocks with export lists
Value before setCommon: 0
Set the common block value to: 10
Value after setCommon: 0
Common value in readvales: 0
What is the trick to get the correct behavior when using export lists?
Help is much approciated.
Thanks,
Robert
--
Robert Schweikert <rjschwei@abaqus.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fortranExport.tgz
Type: application/x-compressed-tar
Size: 957 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20040805/5b30341e/attachment.bin>
More information about the Binutils
mailing list