summaryrefslogtreecommitdiffstats
path: root/linker/linker_environ.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Statically linked executables should honor AT_SECURE.Elliott Hughes2015-06-101-191/+0
| | | | | | Bug: http://b/19647373 Change-Id: I10e7682d9cec26a523f1a3597ca5326c3ca42ebe (cherry picked from commit 1801db3d3fe17df543e721b9fb355e5c882dc6cc)
* linker: use libc's environ variable to store envpDmitriy Ivanov2015-04-281-5/+4
| | | | | | | | | This is to make getenv() work correctly. Bug: http://b/20567629 (cherry picked from commit a85bcc2e99739420b5b4f9a5c337af1d26ac652b) Change-Id: I7c2289279b331793335029dc17a792d416efff4b
* linker_environ: clear MALLOC_CONF when AT_SECURE=1Nick Kralevich2015-03-271-0/+2
| | | | | | Clear JE_MALLOC_CONF and MALLOC_CONF Change-Id: Ia76e263783194ecaa362e8ccafbe13a28a4a1ba6
* Add missing includes.Elliott Hughes2015-01-281-0/+1
| | | | Change-Id: Ibf549266a19a67eb9158d341a69dddfb654be669
* Replace NULL with nullptrDmitriy Ivanov2014-08-291-15/+15
| | | | Change-Id: Iad50be617d318ca98883b843229c960ad5b9afa9
* Fix x86_64 build, clean up intermediate libraries.Elliott Hughes2013-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | The x86_64 build was failing because clone.S had a call to __thread_entry which was being added to a different intermediate .a on the way to making libc.so, and the linker couldn't guarantee statically that such a relocation would be possible. ld: error: out/target/product/generic_x86_64/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a(clone.o): requires dynamic R_X86_64_PC32 reloc against '__thread_entry' which may overflow at runtime; recompile with -fPIC This patch addresses that by ensuring that the caller and callee end up in the same intermediate .a. While I'm here, I've tried to clean up some of the mess that led to this situation too. In particular, this removes libc/private/ from the default include path (except for the DNS code), and splits out the DNS code into its own library (since it's a weird special case of upstream NetBSD code that's diverged so heavily it's unlikely ever to get back in sync). There's more cleanup of the DNS situation possible, but this is definitely a step in the right direction, and it's more than enough to get x86_64 building cleanly. Change-Id: I00425a7245b7a2573df16cc38798187d0729e7c4
* Clean up the argc/argv/envp/auxv handling.Elliott Hughes2013-02-071-24/+13
| | | | | | | | There's now only one place where we deal with this stuff, it only needs to be parsed once by the dynamic linker (rather than by each recipient), and it's now easier for us to get hold of auxv data early on. Change-Id: I6314224257c736547aac2e2a650e66f2ea53bef5
* Revert "Filter ANDROID_PROPERTY_WORKSPACE"Guang Zhu2013-01-181-1/+0
| | | | | | | | | Temporarily revert the change since DNS resolution seems broken right now in ping util. Bug: 8029617 This reverts commit a0f64756a4a55ab48b2b5511d4e7c45583dac44b.
* Filter ANDROID_PROPERTY_WORKSPACENick Kralevich2013-01-151-0/+1
| | | | | | | | | When executing a setuid executable, filter out ANDROID_PROPERTY_WORKSPACE from the environment. Some applications implicitly trust the property space and don't realize that it's passed by an environment variable which can be modified by the caller. Change-Id: I3e3a98941f0a1f249a2ff983ecbcfe1278aa9159
* Cleaning the linker environment as we initialize it requires less API.Elliott Hughes2012-11-021-80/+58
| | | | Change-Id: I612fd699e46833a411589478564a1f859223c380
* More dynamic linker cleanup.Elliott Hughes2012-10-301-0/+222
I still want to break linker_format out into its own library so we can reuse it for malloc debugging and so forth. (There are many similar pieces of code in bionic, but the linker's one seems to be the most complete/functional.) Change-Id: If3721853d28937c8e821ca1d23cf200e228a409a