[gst-devel] saving relocation entries

Stefan Kost ensonic at hora-obscura.de
Thu May 10 16:43:05 CEST 2007


after reading
and studying the gobject change described here

I did something simillar for gstreamer. First I added
gst_type_register_static_full() to utils.c and change GST_BOILERPLATE  
macro to use it. This is the before and after for the coreelements

$ readelf -d /usr/lib/gstreamer-0.10/libgstcoreelements.so  | grep REL
  0x00000002 (PLTRELSZ)                   1912 (bytes)
  0x00000014 (PLTREL)                     REL
  0x00000017 (JMPREL)                     0x3550
  0x00000011 (REL)                        0x2e38
  0x00000012 (RELSZ)                      1816 (bytes)
  0x00000013 (RELENT)                     8 (bytes)
  0x6ffffffa (RELCOUNT)                   214

$ readelf -d /usr/lib/gstreamer-0.10/libgstcoreelements.so  | grep REL
  0x00000002 (PLTRELSZ)                   1920 (bytes)
  0x00000014 (PLTREL)                     REL
  0x00000017 (JMPREL)                     0x344c
  0x00000011 (REL)                        0x2e6c
  0x00000012 (RELSZ)                      1504 (bytes)
  0x00000013 (RELENT)                     8 (bytes)
  0x6ffffffa (RELCOUNT)                   175

So its saves 39 relocations there (should be 48, need to check).

The same scheme can be initialized to other datastructures like e.g.  
GstElementDetails (see  
http://bugzilla.gnome.org/show_bug.cgi?id=437457). What do you think?

Next I will do the same for Interfaces and proprose
g_type_register_static_full(), g_type_add_interface_static_simple|full().


More information about the gstreamer-devel mailing list