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

x86 build contains textrels #36

Open
Newbytee opened this issue Nov 7, 2020 · 5 comments
Open

x86 build contains textrels #36

Newbytee opened this issue Nov 7, 2020 · 5 comments

Comments

@Newbytee
Copy link

Newbytee commented Nov 7, 2020

When building this for x86 I noticed that the code contained textrels, which is undesirable in hardening contexts and not okay in some Linux distributions like Alpine Linux. I'm not sure if this is because I built it incorrectly, but they only appeared on x86, not x86_64, armv7, aarch64, nor ppc64le. I did build all platforms with -fPIC.

In case it is of use, here is the package I created: https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/14384/diffs

@Newbytee Newbytee changed the title x86 build leaves textrels in object code x86 build contains textrels Nov 7, 2020
@ilya-fedin
Copy link
Contributor

What is textrels?

@Newbytee
Copy link
Author

Newbytee commented Nov 13, 2020

What is textrels?

I could try to explain myself, but I think these are better than anything I could do:
https://wiki.gentoo.org/wiki/Hardened/Textrels_Guide
https://flameeyes.blog/2016/01/16/textrels-text-relocations-and-their-impact-on-hardening-techniques/

I understand this might not be a high priority issue for you, but I wanted to track it here nonetheless. I may look into this myself eventually as I'd like to have Telegram Desktop on Alpine Linux x86.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Nov 13, 2020

This is an issue of asm optimizations? I'm afraid you've chosen a wrong place for your issue, this repo just provides cmake build files for the Google's WebRTC Library.

@Newbytee
Copy link
Author

This is an issue of asm optimizations?

Sort of. It is an issue of the code generated from building this when building for the x86 architecture. The code works, but it's undesirable to have textrels in some contexts.

this repo just provides cmake build files for the Google's WebRTC Library.

It would be great if this was explained in a readme.

@ilya-fedin
Copy link
Contributor

It would be great if this was explained in a readme.

There's no readme and @john-preston has no plans to document this somehow AFAIK. He maintains this just for his own needs and if someone needs something different, they should create a PR

Sort of. It is an issue of the code generated from building this when building for the x86 architecture. The code works, but it's undesirable to have textrels in some contexts.

Oh, unfortunately, I don't understand :(

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

No branches or pull requests

2 participants