GNOME Bugzilla – Bug 742633
Android binaries have text relocations. Prevents usage on Android >= 5.0
Last modified: 2018-11-05 18:51:49 UTC
From adb logcat: > W/linker(16348): libgstreamer_android.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
How is it built? Can you run eu-findtextrel (from the elfutils package) on it?
Created attachment 295509 [details] eu-findtextrel libs/armeabi/libgstreamer_android.so > android-textrel.txt
It's not just a warning, it will actually prevent the app from loading
That probably depends on the device or version
seems caused by libav. Removing it from the list of plugins used for the app fixes the issue. Maybe this fixes it completely ? https://git.libav.org/?p=libav.git;a=commit;h=c00365b46d464ce47716315c1801818d811bdb9a
x264 also introduces some text relocation also. Removing both x264 and libav from list of plugins included results in a clean .so.
Hi guys, is there a way to get rid of this message (without removing libav and x264 plugins) ? The problem is that on Android platform since Android M libraries having text relocation are not allowed anymore with apps targeting Android M.
You would have to find a way to build libav and x264 without causing text relocations. Someone will have to research on the Internet if someone else did that already (I'm sure you'll find information about it), then fixup the code and build system of both and provide the patches to the two projects. We can then merge it here on our side.
This is supposed to be fixed in ffmpeg upstream, Edward gave me this link earlier: https://github.com/FFmpeg/FFmpeg/commit/59cee42d7d22530e66a155305389e29679b11f78
Hi guys, I got same problem , but only for android x86 arch - /lib/x86/libgstreamer_android.so has text relocations. Any advice how I can fix that (except solution with targetSdkVersion)? (gstreamer-1.0-android-universal-1.14.4, NDK17)
Created attachment 373953 [details] eu-findtextre result
Hi, I confirm I have exact same issue, the "has text relocations" error is gone with arm arch but unfortunately still occurs with X86 arch. This is very annoying because as you may know Android apps have now to use a targetSdkVersion >= 26. Is there any easy fix to this ? Thank you very much.
Can you please threat it as important because this bug prevents apps from being updated to Play Store, so that is really a problem. Thank you.
Is anyone looking at this please ? It is now impossible (from November 1st) to publish to Google an Android app embedded with Gstreamer on x86 arch because of this. Thank you.
First of all someone needs to figure out which libraries are the actual problems here. It looks like ffmpeg, openh264 and possibly x264? Then someone needs to fix *these* libraries and then we can import the new versions into our builds. Alternatively you could disable the plugins using those libraries.
well I found that most of the errors were coming from openh264 plugin, but there was still an error after removing it: elf/aesni-x86.s not compiled with -fpic/-fPIC I don't know how to avoid this one... do you think it is caused by a plugin ?
That's from gnutls, used by the glib-networking TLS module. You could remove that module, or one could probably change gnutls to not build with aesni instruction support. Or update to a newer version of gnutls (a good idea anyway) and hope the problem goes away.
Unlikely that anything got fixed in newer versions: https://github.com/gnutls/gnutls/commits/master/lib/accelerated/x86/elf/aesni-x86.s
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/cerbero/issues/8.
I commented on gitlab but I am not sure participants are notified, did you receive notification about it on gitlab ? Can you please check comment at gitlab ? Thanks.
There was a slight issue with cerbero (which was the test module for migration). You can re-subscribe on the gitlab interface (the notifications slider on the bottom right).
Here is my comment made at gitlab, I am still not sure if someone was able to see it: *** I cannot get rid of the last error (elf/aesni-x86.s not compiled with -fpic/-fPIC), I tried to disable glib-networking module by disabling G_IO_MODULES := gnutls line from Android.mk, but the error is still there. Is there another way to properly remove gnutls ? Or could it be caused by another module/plugin ? (by the way I also tried to remove libav) Thanks. *** Thanks for any help on this issue.
Yes, see https://gitlab.freedesktop.org/gstreamer/cerbero/issues/8#note_56718