OSDN Git Service

Restore protection flags for ifunc during relocs.
authorDmitriy Ivanov <dimitry@google.com>
Sun, 26 Jul 2015 14:37:09 +0000 (07:37 -0700)
committerDmitriy Ivanov <dimitry@google.com>
Sun, 26 Jul 2015 15:23:01 +0000 (08:23 -0700)
commitec83a61c8b5e00c67c35c9b8f72031c55e7868b9
tree0e871a06eed25813a137c73f812e6713c9babc4f
parentadc5795fb7b674e6d40d1f190c675607c1379343
Restore protection flags for ifunc during relocs.

IFUNC relocations require executable flag for the load
segment containing .text. When dso has text relocs linker
removes exec which causes crash during ifunc relocations.

This patch fixes this problem by restoring segments protection
for ifunc relocs.

Bug: http://b/22611399
Change-Id: Icbf3be0fec0e42bf805bcad7533e2032a2e11b9c
(cherry picked from commit de0fb393ae8136a5958fe17eee0c6285e2f7f91a)
linker/linker.cpp