Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Fix symbol relocation errors on Android x86 #22830

Merged
merged 1 commit into from
Feb 20, 2023

Conversation

joseluismarti
Copy link
Contributor

Description

Current Android x86 builds crash at startup with the following message in the logcat:

D AndroidRuntime: Shutting down VM
E AndroidRuntime: FATAL EXCEPTION: main
E AndroidRuntime: Process: org.xbmc.kodi, PID: 5825
E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/org.xbmc.kodi-1/lib/x86/libkodi.so: has text relocations
...

This occurs because some shared objects contain text relocations. The usual reason for text relocations is non-position independent code written assembler.

We can use the scanelf tool to identify them: scanelf -qT libkodi.so

Fixed by using position independent code in ffmpeg and libass targets.

How has this been tested?

Tested on an Android 7.0 x86 image on Android Emulator

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@joseluismarti
Copy link
Contributor Author

jenkins build this please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants