GNOME Bugzilla – Bug 677661
librsvg.so has text relocations
Last modified: 2012-07-08 21:56:46 UTC
On OpenBSD, if I run "readelf -d /usr/local/lib/librsvg-2.so.38.0" there's a TEXTREL entry indicating that the dynamic linker needs to modify the normally read-only text section of librsvg-2.so at run time. The same issue should affect other operating systems as well. The issue is that rsvg_get_file_path() is marked as G_GNUC_INTERNAL in rsvg-image.h, but rsvg-io.c (the file that implements rsvg_get_file_path()) does not include this header so the compiler doesn't know it needs to compile rsvg_get_file_path() as an internal function. The diff below is one possible fix for this issue and results in a librsvg-2.so that does not contain text relocations, as evidenced by readelf. --- rsvg-io.c.orig Thu Jun 7 16:15:17 2012 +++ rsvg-io.c Thu Jun 7 16:15:17 2012 @@ -24,6 +24,7 @@ #include "rsvg-io.h" #include "rsvg-private.h" +#include "rsvg-image.h" #include <string.h>
Should be fixed on git master.
Thanks, looks good to me!
*** Bug 679603 has been marked as a duplicate of this bug. ***