RPM Community Forums

Mailing List Message of <popt-devel>

Dynamic symbol resolution for POPT tables

From: Jeff Johnson <n3npq@mac.com>
Date: Mon 14 Jun 2010 - 18:18:09 CEST
Message-id: <DF0555E5-7D47-4A34-AD05-9A7DDC20ABF7@mac.com>
This will take some thought, but looks easy enough to do.

Somehow with all the AutoFu layered in, POPT is already testing

	checking for dlfcn.h... yes

which includes a run-time ELF symbol lookup

	/* Find the run-time address in the shared object HANDLE refers to
	   of the symbol called NAME.  */
	extern void *dlsym (void *__restrict __handle,
                    __const char *__restrict __name) __THROW __nonnull ((2));

which means -- if __handle on the current application can be achieved --
that POPT could do the symbol lookup at run-time, not through traditional
linkage.

That would add the ability to, say, do arithmetic on
any ELF symbol in an application using a RPN calculator.

Whether POPT 2.0 _SHOULD__ permit this type of functionality
is a very different question.

Opinions?

73 de Jeff
Received on Mon Jun 14 18:18:43 2010
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.