linker: rename load_offset to load_bias.

This patch changes the definition of the 'load_offset' field
in struct soinfo. The field is renamed because it is not the
basic load bias to add to every p_vaddr value read from the ELF
file to get the corresponding memory address.

This also slightly simplifies the relocation code.

+ Fix for proper load_bias computation for relocatable executables.

Change-Id: I72502c75a70751cba324deee7d313ae61f96609e
This commit is contained in:
David 'Digit' Turner
2012-06-18 23:38:46 +02:00
parent 23363ed750
commit bea23e59f7
2 changed files with 43 additions and 18 deletions

View File

@@ -164,10 +164,9 @@ struct soinfo
Elf32_Addr gnu_relro_start;
unsigned gnu_relro_len;
/* When you read a virtual address from the ELF file, add the load
* address (= "base" field) minus this value (= "load_offset") to get the
* real, corresponding address in the process' address space */
Elf32_Addr load_offset;
/* 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;
};