Operating System - HP-UX
1834008 Members
2067 Online
110063 Solutions
New Discussion

Re: Linker DEMAND_MAGIC Question

 
SOLVED
Go to solution
Frank Fitch_1
Advisor

Linker DEMAND_MAGIC Question

Hi,

I'm running HP-UX 11.11 with Oracle 9.2.0.3 (64 bit) on an HP9000. I have linker patch PHSS_30968 installed. I wish to link or set via chatr the executable such that the text segment is readonly shared among the several Oracle processes that run on my system. Presumably, this is a reasonable thing to wish to do. Be gentle, I am neither a linker expert or an Oracle expert.

From the ld manpage (chatr manpage is similar):

-n This option is accepted but ignored by the 64-bit ld. Generate an executable output file with file type SHARE_MAGIC. This is the default. This option is incompatible with -N and -q.
..............................................................................................
..............................................................................................

-q This option is ignored for 64-bit links. Generate an executable output file with file type DEMAND_MAGIC. This option is incompatible with -n, -N, and -Q.

When I run the command "chatr -q" on a test copy of the oracle executable, I get the following output:

# chatr -q oracle.faf
Ignoring options "-q" for files: oracle.faf

oracle.faf:
64-bit ELF executable
...........................
...........................


Ditto "-n". Any idea why these options would be ignored for 64 bit executables? Thanks in advance for your help....... Frank
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Linker DEMAND_MAGIC Question

Essentially, you are trying to apply 32-bit thinking to a 64-bit world. 32-bit executables under HP-UX divided the 4GB virtual address space into 4 1GB quadrants; normally text (instructions) would be in one quadrant, data in another, shared memory in another, ... . It's a little complicated because sometimes data and text could be in the same quadrant. You did this sort of thing so that, for example, shared memory might extend past a quandrant boundary and thus break the 1GB barrier -- at the expense of some other chunk of data.

64-bit code does away with the concept of quandrants and that is why the linker flags you are trying to play with don't apply. In your particular case, if data and text were in the same quadrant then text could not be shared among processes.

Not to worry, the text and shared libraries code is shared among processes in 64-bit land.
If it ain't broke, I can fix that.
Frank Fitch_1
Advisor

Re: Linker DEMAND_MAGIC Question

Thank you for you prompt reply and explanation for my problem !!! Frank