am 0b9e1c60: linker: initialize system properties

* commit '0b9e1c6051a6c75bf9040fd1da6109988900d0ac':
  linker: initialize system properties
This commit is contained in:
Dmitriy Ivanov 2015-04-30 00:04:23 +00:00 committed by Android Git Automerger
commit bbd88ad57b

View File

@ -3022,6 +3022,8 @@ static void init_linker_info_for_gdb(ElfW(Addr) linker_base) {
insert_soinfo_into_debug_map(linker_soinfo_for_gdb);
}
extern "C" int __system_properties_init(void);
/*
* This code is called after the linker has linked itself and
* fixed it's own GOT. It is safe to make references to externs
@ -3036,6 +3038,9 @@ static ElfW(Addr) __linker_init_post_relocation(KernelArgumentBlock& args, ElfW(
// Initialize environment functions, and get to the ELF aux vectors table.
linker_env_init(args);
// Initialize system properties
__system_properties_init(); // may use 'environ'
// If this is a setuid/setgid program, close the security hole described in
// ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-02:23.stdio.asc
if (get_AT_SECURE()) {