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 now requires PIE executables #17437

Closed
DanAlbert opened this issue Sep 22, 2014 · 8 comments · Fixed by #24953
Closed

Android now requires PIE executables #17437

DanAlbert opened this issue Sep 22, 2014 · 8 comments · Fixed by #24953
Labels
A-linkage Area: linking into static, shared libraries and binaries O-android Operating system: Android

Comments

@DanAlbert
Copy link
Contributor

Android's linker no longer supports non-PIE executables: https://android-review.googlesource.com/#/c/93842/

# Rust hello world on ToT AOSP:
$ adb shell /data/local/tmp/hello
error: only position independent executables (PIE) are supported.
@thestinger thestinger added A-linkage Area: linking into static, shared libraries and binaries O-android Operating system: Android labels Sep 23, 2014
@lahwran
Copy link

lahwran commented Feb 27, 2015

this issue should be closed, as there is a commit in that fixes it and says "closes". I'm not sure why it's not.

@lahwran
Copy link

lahwran commented Feb 28, 2015

except maybe not, because it still happens on latest rust. what gives?

@lahwran
Copy link

lahwran commented Feb 28, 2015

workaround, since it still seems to be broken: pass -C link-args=-pie to rustc. (makes it work on my vanilla, admittedly rooted, hammerhead/nex5.)

tamird added a commit to tamird/rust that referenced this issue Apr 29, 2015
This is OK to do given:
  - PIE is supported on Android starting with API 16.
  - The bots are running API 18.
  - API < 16 now has a 12.5% market share[0] as of 2015-04-29.

Closes rust-lang#17437.

[0] https://developer.android.com/about/dashboards/index.html
tamird added a commit to tamird/rust that referenced this issue Apr 29, 2015
This is OK to do given:
  - PIE is supported on Android starting with API 16.
  - The bots are running API 18.
  - API < 16 now has a 12.5% market share[0] as of 2015-04-29.

Unfortunately, this breaks backtrace support. See rust-lang#17520.

Closes rust-lang#17437.

[0] https://developer.android.com/about/dashboards/index.html
alexcrichton added a commit to alexcrichton/rust that referenced this issue Apr 29, 2015
This is OK to do given:
  - PIE is supported on Android starting with API 16.
  - The bots are running API 18.
  - API < 16 now has a 12.5% market share[0] as of 2015-04-29.

Closes rust-lang#17437.

[0] https://developer.android.com/about/dashboards/index.html

r? @alexcrichton
@pakoito
Copy link

pakoito commented May 1, 2015

Can anyone please update https://github.com/rust-lang/rust-wiki-backup/blob/master/Doc-building-for-android.md to reflect this change, as the build with cargo section hack seems not to be necessary anymore

@lahwran
Copy link

lahwran commented May 1, 2015

That's not the actual wiki, but I'll update the wiki

@lahwran
Copy link

lahwran commented May 1, 2015

Except wait. where did the wiki go?

@pakoito
Copy link

pakoito commented May 1, 2015

My point precisely. It's been gone for weeks.

@lahwran
Copy link

lahwran commented May 1, 2015

In that case, nope. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries O-android Operating system: Android
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants