mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
2008-07-16 Pavel Roskin <proski@gnu.org>
* util/i386/efi/grub-mkimage.c (get_target_address): Return a pointer, not an integer. This fixes a warning and prevents precision loss on 64-bit systems. (relocate_addresses): Remove unneeded cast.
This commit is contained in:
1 parent
506b2b3e2b
commit
59652a208f
2 files changed
+10
-4
No files matched your search
@@ -272,10 +272,10 @@ get_symbol_address (Elf32_Ehdr *e, Elf32_Shdr *s, Elf32_Word i)
|
||||
}
|
||||
|
||||
/* Return the address of a modified value. */
|
||||
static Elf32_Addr
|
||||
static Elf32_Addr *
|
||||
get_target_address (Elf32_Ehdr *e, Elf32_Shdr *s, Elf32_Addr offset)
|
||||
{
|
||||
return (Elf32_Addr) e + grub_le_to_cpu32 (s->sh_offset) + offset;
|
||||
return (Elf32_Addr *) ((char *) e + grub_le_to_cpu32 (s->sh_offset) + offset);
|
||||
}
|
||||
|
||||
/* Deal with relocation information. This function relocates addresses
|
||||
@@ -333,8 +333,7 @@ relocate_addresses (Elf32_Ehdr *e, Elf32_Shdr *sections,
|
||||
Elf32_Addr *target;
|
||||
|
||||
offset = grub_le_to_cpu32 (r->r_offset);
|
||||
target = (Elf32_Addr *) get_target_address (e, target_section,
|
||||
offset);
|
||||
target = get_target_address (e, target_section, offset);
|
||||
info = grub_le_to_cpu32 (r->r_info);
|
||||
sym_addr = get_symbol_address (e, symtab_section,
|
||||
ELF32_R_SYM (info));
|
||||
|
||||
Reference in new issue
Block a user