This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Remove the getpagesize system call from ia64


On Wed, Jan 10, 2001 at 07:03:31PM -0800, Ulrich Drepper wrote:
> "H . J . Lu" <hjl@valinux.com> writes:
> 
> > Here is a patch to implement the second suggestion.
> 
> Hide this ugly mess in IA-64 specific macros.  It can be reused on
> whatever platform it is necessary but should not be there in general.
> 

I have another idea. elf/dl-libc.c (do_dlopen) can do

#ifdef DL_STATIC_INIT
  DL_STATIC_INIT (map)
#endif

ia64 can do

#define DL_STATIC_INIT(map) _dl_static_init (map)

void
_dl_static_init ()
{
  void *array [] = { &xxx, &xxx, ...};
  
  f = dlsym (map, "_dl_var_init");
  f (array):
}

_dl_var_init is a new function in ld.so and "array" is an array of
addresses which can be used to initialize variables in ld.so from
static binaries. Each platform can define its own DL_STATIC_INIT.
If we are lucky, we may be able to get dlopen -> dlopen to work in
static binaries.

-- 
H.J. Lu (hjl@valinux.com)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]