Unclear content of dlfcn.c

Marek Polacek mmpolacek@gmail.com
Tue Oct 19 09:56:00 GMT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I've recently come across the glibc/dlfcn/dlfcn.c file and I don't quite
understand this part of the file:

static void (*const init_array []) (int argc, char *argv[])
     __attribute__ ((section (".init_array"), aligned (sizeof (void *))))
     __attribute_used__ =
{
  init
};

Could someone explain to me, what it actually is?  It should load a
shared object at runtime, but I don't see how it works.

Thanks,

		Marek
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJMvWtYAAoJEFuhROj3AQjbyg4IAJ//lCjaWG6KPOP8A/NKN1Hy
Acn0EPuDIcdEzTqbXGBWiQNYgfjxA6L13HpS4UNkvZLE7Bg8zAthWSZ5/fDtd/xz
eGYu9bWphgtAzQ9jlJbMQE+O49MkOl3oQEEksZM3NmFwEoKQU0vhqd0XbAW+SJsF
Mnp1Ec9wn5wxZ2oO3sQ0N4kcJfrWRFcmZh7FuS+81ftaYwzyl7HsqcH7nOZ0JKHL
CURnZb6BEk6yPu3QcJgMCg+xcdoGd9oznySnauFNM2e7gSl8bYF/OyonusH3yIq9
PWyflcJNAn8zo4HZuaWSit28Fs9XSpmzvi7wM84c/RGV16sH22ZWmpUtT3lbzbk=
=o4/g
-----END PGP SIGNATURE-----



More information about the Libc-help mailing list