Operating System - OpenVMS
1752565 Members
5481 Online
108788 Solutions
New Discussion

Re: Global Section Problem of IA64

 
SOLVED
Go to solution
H.Becker
Honored Contributor

Re: Global Section Problem of IA64

On both platforms, the default extern model is RELAXED_REFDEF

On Alpha the compiler creates storage for a releaxed refdef: an ovr psect. On I64 the compiler creates just a symbol.

On I64 the linker has to check if there is alrady storage for a releaxed refdef symbol. If there is one, the linker uses that storage. If there is none, the linker creates the storage.

On I64, if you mix the extern models, you can end up with a section from one module and a symbol from the other. In the case the section is smaller than the symbol you end up with only the storage from the section.

You can argue that the linker could do better here and a) give a warning or b) create a bigger section. On the other hand, one can argue that the extern model in the application is broken.

With the TMP/HELPER example:

$ cc tmp/extern=common
$ cc helper/extern=relaxed
$ link/map/full tmp,helper
$ search tmp.map "PLGRP_TABLE",GBL/match=and/wind=(0,3)
PLGRP_TABLE 01610000 01619C3F 00009C40 ( 40000.) PAGE 1
6 OVR,REL,GBL,NOSHR,NOEXE, WRT,NOVEC,NOMOD
TMP 01610000 01619C3F 00009C40 ( 40000.) PAGE 1
6

PWASH_QUE_BOT 01619C40 01619C43 00000004 ( 4.) OCTA
4 OVR,REL,GBL,NOSHR,NOEXE, WRT,NOVEC,NOMOD
$