[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[1712] 2008-07-16 Pavel Roskin <address@hidden>
From: |
Pavel Roskin |
Subject: |
[1712] 2008-07-16 Pavel Roskin <address@hidden> |
Date: |
Wed, 16 Jul 2008 06:55:43 +0000 |
Revision: 1712
http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=1712
Author: proski
Date: 2008-07-16 06:55:42 +0000 (Wed, 16 Jul 2008)
Log Message:
-----------
2008-07-16 Pavel Roskin <address@hidden>
* 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.
Modified Paths:
--------------
trunk/grub2/ChangeLog
trunk/grub2/util/i386/efi/grub-mkimage.c
Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog 2008-07-15 13:29:53 UTC (rev 1711)
+++ trunk/grub2/ChangeLog 2008-07-16 06:55:42 UTC (rev 1712)
@@ -1,3 +1,10 @@
+2008-07-16 Pavel Roskin <address@hidden>
+
+ * 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.
+
2008-07-15 Pavel Roskin <address@hidden>
* kern/i386/ieee1275/init.c: Include grub/cache.h.
Modified: trunk/grub2/util/i386/efi/grub-mkimage.c
===================================================================
--- trunk/grub2/util/i386/efi/grub-mkimage.c 2008-07-15 13:29:53 UTC (rev
1711)
+++ trunk/grub2/util/i386/efi/grub-mkimage.c 2008-07-16 06:55:42 UTC (rev
1712)
@@ -272,10 +272,10 @@
}
/* 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 @@
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));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [1712] 2008-07-16 Pavel Roskin <address@hidden>,
Pavel Roskin <=