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:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user