Linux-flashplugin7 & rtld - RFC

Norikatsu Shigemura nork at FreeBSD.org
Sun Jul 2 13:54:16 UTC 2006


On Mon, 26 Jun 2006 15:06:33 -0400 (EDT)
Daniel Eischen <deischen at freebsd.org> wrote:
> The check for the object providing the correct version should
> still be done, but it needs to be checking the correct (libmap'd)
> object.

	Eureka!!!

	I understand why my approch should be integrated to libc/libm/
	libpthread, and deischen's approch failuer.  So I can sperate
	library from libc/libm/libpthread.

	deischen's LPW:
	$ readelf -Ws flash7.so | fgrep open
	    71: 00001760    54 FUNC    LOCAL  DEFAULT   11 popen
	   110: 000025e0    54 FUNC    LOCAL  DEFAULT   11 iconv_open
	   185: 00001520    54 FUNC    LOCAL  DEFAULT   11 fopen
	   198: 000016e0    54 FUNC    LOCAL  DEFAULT   11 opendir
	These are bad.

	$ readelf -Ws flash7.so | fgrep pthread_
		:
	    27: 00000000   117 FUNC    GLOBAL DEFAULT  UND _pthread_mutex_init at LIBTHREAD_1_0 (13)
		:
	    70: 00000f80    94 FUNC    LOCAL  DEFAULT   11 pthread_mutex_init at GLIBC_2.0
		:
	These are good.

	So it should be fixed like following:
flash7.so:      flash7.map ${FLASH7OBJ}
	${CC} -shared -o $@ ${CFLAGS} ${FLASH7OBJ} \
		-Wl,--version-script=flash7.map -lc -lm -lpthread -lstdc++
		                               ~~~~


More information about the freebsd-current mailing list