Skip to content

Comments

Add PIE option to Makefile to build position independent executables#1036

Merged
rustyrussell merged 1 commit intoElementsProject:masterfrom
icota:add-pie-option-makefile
Feb 20, 2018
Merged

Add PIE option to Makefile to build position independent executables#1036
rustyrussell merged 1 commit intoElementsProject:masterfrom
icota:add-pie-option-makefile

Conversation

@icota
Copy link
Contributor

@icota icota commented Feb 19, 2018

As of version 5.0 Android requires all dynamically linked executables to support PIE. This allows programs to be loaded at a different addresses, making it harder for attackers to target.

Enable with PIE=1
Somewhat related to #653

As of version 5.0 Android requires all dynamically linked executables to support PIE. This allows programs to be loaded at a different addresses, making it harder for attackers to target.
Enable with PIE=1
@practicalswift
Copy link
Contributor

Concept ACK

Hardening is good

@ZmnSCPxj
Copy link
Contributor

I begin to wonder if we should do something closer to:

# User can add flags here on "make" command line
# e.g. make CFLAGS="-fPIC -fPIE"
CFLAGS =

MY_CFLAGS = # whatever is currently in CFLAGS in current version

COMPILE = $(CC) $(MY_CFLAGS) $(CFLAGS)
.c.o:
        $(COMPILE) $< -o $@

And similar for linking.... hmmm.

Thoughts?

@icota
Copy link
Contributor Author

icota commented Feb 19, 2018

I'm fine either way really. Did it this way cause DEV_CFLAGS were already in there. Didn't want to mess with the way things were done I guess.

@cdecker
Copy link
Member

cdecker commented Feb 19, 2018

utACK 3c7cf2a

@icota are you trying to get c-lightning running on android? That'd be huge 😃

@icota
Copy link
Contributor Author

icota commented Feb 19, 2018

@cdecker I have it running on my phone already. A couple more PRs and we will be good to go. 🍾

Copy link
Contributor

@rustyrussell rustyrussell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 3c7cf2a

@rustyrussell rustyrussell merged commit d4d1c4a into ElementsProject:master Feb 20, 2018
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

Successfully merging this pull request may close these issues.

5 participants