Skip to content

cmd/link: remove text relocations from android libraries #9210

Closed
@gopherbot

Description

@gopherbot

by momchil.dev:

What does 'go version' print?

go version go1.4rc2 darwin/amd64

What happened?

I am compiling a shared library for android/arm. I then use this library from a
Java-based android application. 

When I run the application on a Nexus 5 device with Lollipop, I get a
"libexample.so has text relocations. This is wasting memory and prevents security
hardening. Please fix."

If I run the same application on an old Kitkat Asus Transformer Pad TF301T, I don't get
any errors at all and everything works as expected.

Please provide any additional information below.

I don't have much experience in developing native libraries but the fact that it works
on one device and not the other seems strange.

You can find the code for the library here:
https://github.com/momchil-atanasov/go-android-lib
You can find the code for the android app here:
https://github.com/momchil-atanasov/go-android-app

Hope this helps! Can't wait for the official release of 1.4.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions