Sharon Clay (src++at++rose.asd.sgi.com)
Tue, 21 Jan 1997 01:22:25 -0800
Yup - if you can edit your program to call API anyway, then this is a better soln.
FYI, I'll go ahead and put the "tricky rld WAR previously requested
at the end of this email.
->
->Now, the question on my mind is: What on earth would tell Irix to
->allocate shared arena right at the brk point, and why does it only do
->this under certain circumstances?
An IRIX bug that is fixed in IRIX 6.4.
->
->-Chris
->
->--
->
->Chris Volpe Phone: (518) 387-7766
->GE Corporate R&D Fax: (518) 387-6560
->PO Box 8 Email: volpecr++at++crd.ge.com
->Schenectady, NY 12301 Web: http://www.crd.ge.com/~volpecr
rld init WAR (thx Don Hatch)
This causes rld to load a DSO with a fix routine in it and upon loading that
DSO call the routine pfInitFix().
Notes:
1) separate compiled versions will be needed for N32 and O32
2) on ficus between different methods of just compiling perfly
different base addresses are needed and so these addresses
may not even work for all programs.
======== shell script to run pf program:
#!/bin/csh
#
# runpf shell script to set Performer shared arena base
# to run:
# runpf progname progargs
setenv _RLD_LIST ./pfInitFix.so:DEFAULT
#setenv PFSHAREDBASE 0x5fa80000 # for DSO
setenv PFSHAREDBASE 0x18000000 # for static built
$*
========= pfInitFix.c
/*
* Compile with:
cc -g -fullwarn -shared -Wl,-init,pfInitFix pfInitFix.c -o pfInitFix.so
* Run with:
setenv PFSHAREDBASE 0xWhatever
setenv _RLD_LIST ./pfInitFix.so:DEFAULT
* or
setenv _RLD_LIST libdmalloc.so:./pfInitFix.so:DEFAULT
*/
#include <stdlib.h>
#include <dlfcn.h>
#include <Performer/pr.h>
pfInitFix()
{
void *myself = dlopen(NULL, RTLD_LAZY);
if (dlsym(myself, "pfSharedArenaBase"))
{
char *e = getenv("PFSHAREDBASE");
if (e != NULL)
{
void *base = (*e ? (void *)strtoull(e, NULL, 0) : 0);
pfNotify(PFNFY_INFO, PFNFY_PRINT,
"Requesting shared arena base %#0*llx",
2+2*sizeof(base),
(unsigned long long)base);
pfSharedArenaBase(base);
}
}
dlclose(myself);
}
--
-----{-----{---++at++ -----{----{---++at++ -----{----{---++at++ -----{----{---++at++
Sharon Rose Clay (Fischler) - Silicon Graphics, Advanced Systems Dev.
src++at++sgi.com (415) 933 - 1002 FAX: (415) 965 - 2658 MS 8U-590
-----{-----{---++at++ -----{----{---++at++ -----{----{---++at++ -----{----{---++at++
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
Submissions: info-performer++at++sgi.com
Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:54:24 PDT