OSDN Git Service

linker: handle R_ARM_COPY relocations in a proper way
authorArd Biesheuvel <ard.biesheuvel@gmail.com>
Thu, 30 Aug 2012 10:48:32 +0000 (12:48 +0200)
committerElliott Hughes <enh@google.com>
Wed, 31 Oct 2012 00:09:21 +0000 (17:09 -0700)
commit5ae44f302b7d1d19f25c4c6f125e32dc369961d9
tree1dde02285286f2f48e4becd2c89d8b2ffc1085db
parent155e8d1df5b8fdfeabda3e7b61d95beb5b8d1467
linker: handle R_ARM_COPY relocations in a proper way

If an executable contain copy relocations, other references
to the symbol it points to should be preempted and made to
point to the copy instead.

Also, the linker should make sure the target area has
sufficient space to contain the copy. It also checks
whether the library that supplies the symbol is built
with -Bsymbolic, and errors out if this is the case.

Change-Id: If135c83590092741cfd8f82f54816f363a4a4a3b
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@gmail.com>
linker/dlfcn.cpp
linker/linker.cpp
linker/linker.h