Path: utzoo!attcan!uunet!samsung!usc!ucsd!ucbvax!hplabs!hpfcso!hpfcdc!hpausla!brian From: brian@hpausla.aso.hp.com (Brian Coogan) Newsgroups: comp.sources.d Subject: Re: libc.a error when linking perl3.0 on HP-UX 3.10 Message-ID: <740003@hpausla.aso.hp.com> Date: 15 Nov 89 00:32:21 GMT References: <1322@iso.estec.nl> Organization: HP Australian Software Operation Lines: 45 Glen Gordon writes in comp.sys.hp: > I too had this problem on HP-UX 3.11 until I undef'd SYSCALL in > config.sh and reran the .SH scripts. After that all went well and all > the tests ran perfectly. I assume that HP's syscall, which is not > documented anywhere I know about is not intended for public consumption. The problem is that the linkage between syscall and cerror uses a short branch instruction rather than a long one. If you refer to syscall explicitly in a large binary this can results in cerror being out of range. Loading them explicitly together works around this problem. In 7.0 the branch instruction has been fixed. The problem is more likely to be that public consumption was not foreseen & tested, not so much that it was forbidden. Note that I'm not speaking for HP in this case, this is just my own understanding. Tor Lillqvist writes in comp.sys.hp: > In article <1322@iso.estec.nl> contrib@iso.estec.nl (AM Davidson) writes: > >Oh BTW, don't use Perl's own malloc - it'll go crazy. > It is possible to use perl's malloc if you patch it. I don't have > diffs handy, but I remember two changes were necessary on the > hp9000s800: Use the strut field in the overhead union: > #if defined(mips) || defined(sparc) || defined(hp9000s800) > double strut; /* alignment problems */ > #endif To use perl's malloc, you will have to add a conditional as above, though you could also use defined(hppa) which is a little more general. > and change the test for corrupt pointers to > #ifdef hp9000s800 > if (*((unsigned int*)p) != 0 && > (*((unsigned int*)p) > 0x80000000 || > *((unsigned int*)p) < 0x40000000)) > #else The corrupt pointer test is fixed at patchlevel 4, so you won't have to change that if you can update to patchlevel 4. --- Brian Coogan, Hewlett-Packard Australian Software Operation. ACSnet: brian@hpausla.oz UUCP: hplabs!hpausla!brian Internet: brian%hpausla@hplabs.hp.com Tel: +61 3 871 1648 (TZ=EST-10)