- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying out the mac 11.1 fortran compiler and have discovered that if a subroutine with a named common block is linked into the executable then a subroutine which is not in the execution tree (i.e. dead code) and also contains that named common block then it will also be linked in along with any dependent subroutines it contains. When I use the "-why_live" linker option I see something like this,
0x104595040 _tgrf3d_ from lib/trgraf.a(tgrf3d.o)
0x1044954b0 _grf3f1_ from lib/trgraf.a(grf3f1.o)
0x103d735b0 _plfryw_ from lib/rplot_sub.a(plfryw.o)
0x103d764f0 _trace@0 from lib/rplot_sub.a(plfryw.o)
PLFRYW should never have gotten linked in but it shares a named common block with something which was linked and if I remove that named common block, it doesn't get linked in. Whatever _trace@0 is, it seems to be resolving this dependence. I wonder if this is related to
Is there any way to control this behaviour perhaps by marking references as weak? Thanks.
Link Copied
0 Replies

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