-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Link executable files using non PIC object files. #4678
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
Conversation
…erhead and improves performance.
@nikic do you see any problems? |
The patch makes x86_64 Linux PHP build ~100K smaller and ~1% faster on WP. |
Looks conceptually right to me, but full implications not totally clear. For example, may people be building PIE for use with ASLR? |
PHP build system and libtool don't provide any special support for PIE. However, I see Fedora provides PIE binaries. To properly support PIE without full PIC overhead, libtool should build non-PIC object with -fPIE. |
Sounds ok with me. |
I'm OK with this as well. I'm curious as to how this works though :-) |
This breaks oss-fuzz build: https://oss-fuzz-build-logs.storage.googleapis.com/log-66ab74a7-4ece-4e14-b21b-f60527dd7244.txt |
Adding "--with-pic" to PHP ./configure and full rebuild, should negate the changes of this patch. |
Looks like this change break out of sources tree build
|
@dstogov can you please have a look ? |
Do you really miss Zend/zend.o? |
The problem occurs only if CLI and apache SAPIs are built at once (using single configure script). |
Indeed, in build-cgi (no apache SAPI), build is ok
And in build-apache which is broken
|
Fixed by db094b4 |
@dstogov thanks Side effects, embed build now start producing libphp7.a |
This reduces PIC overhead and improves performance.