[gst-devel] interposing / dup. symbols interest ...
Stefan Kost
ensonic at hora-obscura.de
Fri Dec 16 07:07:08 CET 2005
Hi michael,
I've followed your findings a bit on your blog. When I run you
objectdump line agains some of the plugin I have in my own application I
get a rather long list. Any ideas how I can/should shorten it.
The bt_song_io_detect and *_get_type functions are the only ones that
really matters.
Stefan
objdump -T ~/buzztard/lib/songio/libbtbsl.so | grep -v '\*UND'
/home/ensonic/buzztard/lib/songio/libbtbsl.so: file format elf32-i386
DYNAMIC SYMBOL TABLE:
00001104 l d .init 00000000 .init
000014e0 l d .text 00000000 .text
00004f34 l d .fini 00000000 .fini
00004f50 l d .rodata 00000000 .rodata
00005884 l d .eh_frame 00000000 .eh_frame
00006888 l d .ctors 00000000 .ctors
00006890 l d .dtors 00000000 .dtors
00006898 l d .jcr 00000000 .jcr
000068a0 l d .data.rel.ro 00000000 .data.rel.ro
00006b0c l d .data 00000000 .data
00006b1c l d .bss 00000000 .bss
000068c4 g DO *ABS* 00000000 Base _DYNAMIC
00001104 g DF .init 00000000 Base _init
00006b20 g DO .bss 00000004 Base bt_bsl_debug
000016d0 g DF .text 0000004c Base bt_song_io_buzz_get_type
00006b1c g D *ABS* 00000000 Base __bss_start
00004f34 g DF .fini 00000000 Base _fini
00006b1c g D *ABS* 00000000 Base _edata
00006b2c g D *ABS* 00000000 Base _end
000015d0 g DF .text 00000100 Base bt_song_io_detect
michael meeks schrieb:
> On Tue, 2005-12-13 at 14:19 +0100, Benjamin Otte wrote:
>>FWIW GStreamer uses a regex to only export [_](gst|Gst|GST)_*
>>symbols, both from core and plugins. (as you can see in his list, all
>>symbols start with gst there, so it works ;)) I'd have made it stricter
>>but couldn't in 0.8 since plugins were allowed to link to plugins back
>>then. This should have been removed by David's stuff during the 0.10
>>transition so it would be a good idea to make plugins only export
>>gst_plugin_desc in 0.10. Or am I missing something?
>
> Sure - it'd be a great idea to ensure 2 things really:
>
> a) that the plugin exports as few symbols as possible
> objdump -T foo.so | grep -v '\*UND' | wc -l
> just 1 or two external symbols is fine as you say.
>
> and b) that you g_module_open the plugin with G_MODULE_BIND_LOCAL
>
> b) of course stops other symbol lookup by applications becoming slower
> by having to examine all the plugins in the global scope. [ to test that
> use '$ LD_DEBUG=symbols gst-foo'.
>
> HTH,
>
> Michael.
>
More information about the gstreamer-devel
mailing list