Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpfcso!mjs From: mjs@hpfcso.FC.HP.COM (Marc Sabatella) Newsgroups: comp.sys.hp Subject: Re: Demand-loaded vs. Shared binaries Message-ID: <7370417@hpfcso.FC.HP.COM> Date: 24 Jun 91 18:15:41 GMT References: <4670@bnr-rsc.UUCP> Organization: Hewlett-Packard, Fort Collins, CO, USA Lines: 32 > We are in the middle of a debate about the exact definition of demand-loaded >versus shared binaries on our HP-UX 9000/300 and 9000/800 computers. I'll try to clear things up a little: HP-UX binaries come in three flavors: EXEC_MAGIC, SHARE_MAGIC, and DEMAND_MAGIC. This is determined by the magic number in the first few bytes of the executable, and in some cases by the padding done around the various sections of the file. The basic scoop is: EXEC_MAGIC - not actually directly executable on 800; executable but not shared on 300 - in fact, the text segment is not even write-protected. SHARE_MAGIC - executable and text is shared on both architectures. On some OS versions on the 800, the text segment may actually be demand loaded. DEMAND_MAGIC - executable and text is shared on both architectures; plus text segment is demand loaded. On some OS versions on the 800, the data segment may also be loaded on demand. With 8.0, there is also SHL_MAGIC, which is basically just like DEMAND_MAGIC except it is not directly executable, but is rather usable as a shared library. Basically then, the implication that the 800 does not support demand loading is incorrect. chatr(1) simply changes the magic number; there is no concept of separately settable attributes. But in particular, DEMAND_MAGIC always implies both demand loading and sharing; SHARE_MAGIC always implies at least sharing. -------------- Marc Sabatella (marc@hpmonk.fc.hp.com) Disclaimers: 2 + 2 = 3, for suitably small values of 2 Bill and Dave may not always agree with me