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>
This commit is contained in:

committed by
Elliott Hughes

parent
155e8d1df5
commit
5ae44f302b
@@ -160,7 +160,9 @@ struct soinfo {
|
||||
/* 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;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user