This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
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>
Attachment:
fortranExport.tgz
Description: application/compressed-tar
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |