OSDN Git Service

linker: stat /proc/self/exe instead of executable_path
authorDimitry Ivanov <dimitry@google.com>
Thu, 25 Aug 2016 21:53:35 +0000 (14:53 -0700)
committerDimitry Ivanov <dimitry@google.com>
Thu, 25 Aug 2016 21:58:22 +0000 (14:58 -0700)
commit7da4bbbe87a7eca742c6c45a76aaf191aa70d948
tree12caad3e273e245325378cc7a1b7b4b97a398685
parent56762e036ba4dafee2c25dabddd4dc6f7b65f2a6
linker: stat /proc/self/exe instead of executable_path

The absolute path to an executable may no longer be valid for
example when the file is unlinked immediately after exec.
Using /proc/self/exe instead of absolute path solves this problem.

Bug: http://b/31084669
Test: Run the app from http://b/31084669 make sure executable starts
Test: by checking ps and /proc/<pid>/exe
Change-Id: I5c819f39ef0fc4fc71b05de71e8af9ede611f04c
linker/linker.cpp