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>
diff --git a/linker/linker.h b/linker/linker.h
index 54563bb..cb33602 100644
--- a/linker/linker.h
+++ b/linker/linker.h
@@ -160,7 +160,9 @@
/* When you read a virtual address from the ELF file, add this
* value to get the corresponding address in the process' address space */
Elf32_Addr load_bias;
- int has_text_relocations;
+
+ bool has_text_relocations;
+ bool has_DT_SYMBOLIC;
};