@@ -1216,36 +1216,36 @@ SUFFIX (relocate_addrs) (Elf_Ehdr *e, struct section_metadata *smd,
1216
1216
case R_MIPS_26 :
1217
1217
{
1218
1218
grub_uint32_t * t32 = (grub_uint32_t * ) target ;
1219
- grub_addr_t addr = grub_host_to_target64 (sym_addr );
1220
- * t32 = ((* t32 ) & 0xfc000000U ) | ((addr >> 2 ) & 0x3ffffffUL );
1219
+ grub_uint64_t addr = grub_host_to_target64 (sym_addr );
1220
+ * t32 = ((* t32 ) & 0xfc000000U ) | ((addr >> 2 ) & 0x3ffffffULL );
1221
1221
}
1222
1222
break ;
1223
1223
case R_MIPS_LO16 :
1224
1224
{
1225
1225
grub_int16_t * t16 = (grub_int16_t * ) target ;
1226
- grub_addr_t addr = grub_host_to_target64 (sym_addr );
1226
+ grub_uint64_t addr = grub_host_to_target64 (sym_addr );
1227
1227
* t16 = (grub_int16_t ) addr ;
1228
1228
}
1229
1229
break ;
1230
1230
case R_MIPS_HI16 :
1231
1231
{
1232
1232
grub_int16_t * t16 = (grub_int16_t * ) target ;
1233
- grub_addr_t addr = grub_host_to_target64 (sym_addr );
1234
- * t16 = (grub_int16_t ) ((addr + 0x8000UL ) >> 16 );
1233
+ grub_uint64_t addr = grub_host_to_target64 (sym_addr );
1234
+ * t16 = (grub_int16_t ) ((addr + 0x8000ULL ) >> 16 );
1235
1235
}
1236
1236
break ;
1237
1237
case R_MIPS_HIGHER :
1238
1238
{
1239
1239
grub_int16_t * t16 = (grub_int16_t * ) target ;
1240
- grub_addr_t addr = grub_host_to_target64 (sym_addr );
1241
- * t16 = (grub_int16_t ) ((addr + 0x80008000UL ) >> 32 );
1240
+ grub_uint64_t addr = grub_host_to_target64 (sym_addr );
1241
+ * t16 = (grub_int16_t ) ((addr + 0x80008000ULL ) >> 32 );
1242
1242
}
1243
1243
break ;
1244
1244
case R_MIPS_HIGHEST :
1245
1245
{
1246
1246
grub_uint16_t * t16 = (grub_uint16_t * ) target ;
1247
- grub_addr_t addr = grub_host_to_target64 (sym_addr );
1248
- * t16 = (grub_uint16_t ) ((addr + 0x800080008000UL ) >> 48 );
1247
+ grub_uint64_t addr = grub_host_to_target64 (sym_addr );
1248
+ * t16 = (grub_uint16_t ) ((addr + 0x800080008000ULL ) >> 48 );
1249
1249
}
1250
1250
break ;
1251
1251
default :
@@ -1901,19 +1901,19 @@ translate_relocation_pe (struct translate_context *ctx,
1901
1901
/* Hi */
1902
1902
ctx -> current_address
1903
1903
= add_fixup_entry (& ctx -> lst , 0 ,
1904
- (grub_int16_t ) ((target & 0x8000UL ) >> 16 ),
1904
+ (grub_int16_t ) ((target & 0x8000ULL ) >> 16 ),
1905
1905
0 , ctx -> current_address ,
1906
1906
image_target );
1907
1907
/* Higher */
1908
1908
ctx -> current_address
1909
1909
= add_fixup_entry (& ctx -> lst , 0 ,
1910
- (grub_int16_t ) ((target & 0x80008000UL ) >> 32 ),
1910
+ (grub_int16_t ) ((target & 0x80008000ULL ) >> 32 ),
1911
1911
0 , ctx -> current_address ,
1912
1912
image_target );
1913
1913
/* Highest */
1914
1914
ctx -> current_address
1915
1915
= add_fixup_entry (& ctx -> lst , 0 ,
1916
- (grub_uint16_t ) ((target & 0x800080008000UL ) >> 48 ),
1916
+ (grub_uint16_t ) ((target & 0x800080008000ULL ) >> 48 ),
1917
1917
0 , ctx -> current_address ,
1918
1918
image_target );
1919
1919
}
@@ -1936,13 +1936,13 @@ translate_relocation_pe (struct translate_context *ctx,
1936
1936
/* Higher */
1937
1937
ctx -> current_address
1938
1938
= add_fixup_entry (& ctx -> lst , 0 ,
1939
- (grub_int16_t ) ((target & 0x80008000UL ) >> 32 ),
1939
+ (grub_int16_t ) ((target & 0x80008000ULL ) >> 32 ),
1940
1940
0 , ctx -> current_address ,
1941
1941
image_target );
1942
1942
/* Highest */
1943
1943
ctx -> current_address
1944
1944
= add_fixup_entry (& ctx -> lst , 0 ,
1945
- (grub_uint16_t ) ((target & 0x800080008000UL ) >> 48 ),
1945
+ (grub_uint16_t ) ((target & 0x800080008000ULL ) >> 48 ),
1946
1946
0 , ctx -> current_address ,
1947
1947
image_target );
1948
1948
}
@@ -1965,13 +1965,13 @@ translate_relocation_pe (struct translate_context *ctx,
1965
1965
/* Hi */
1966
1966
ctx -> current_address
1967
1967
= add_fixup_entry (& ctx -> lst , 0 ,
1968
- (grub_int16_t ) ((target & 0x8000UL ) >> 16 ),
1968
+ (grub_int16_t ) ((target & 0x8000ULL ) >> 16 ),
1969
1969
0 , ctx -> current_address ,
1970
1970
image_target );
1971
1971
/* Highest */
1972
1972
ctx -> current_address
1973
1973
= add_fixup_entry (& ctx -> lst , 0 ,
1974
- (grub_uint16_t ) ((target & 0x800080008000UL ) >> 48 ),
1974
+ (grub_uint16_t ) ((target & 0x800080008000ULL ) >> 48 ),
1975
1975
0 , ctx -> current_address ,
1976
1976
image_target );
1977
1977
}
@@ -1994,13 +1994,13 @@ translate_relocation_pe (struct translate_context *ctx,
1994
1994
/* Hi */
1995
1995
ctx -> current_address
1996
1996
= add_fixup_entry (& ctx -> lst , 0 ,
1997
- (grub_int16_t ) ((target & 0x8000UL ) >> 16 ),
1997
+ (grub_int16_t ) ((target & 0x8000ULL ) >> 16 ),
1998
1998
0 , ctx -> current_address ,
1999
1999
image_target );
2000
2000
/* Higher */
2001
2001
ctx -> current_address
2002
2002
= add_fixup_entry (& ctx -> lst , 0 ,
2003
- (grub_int16_t ) ((target & 0x80008000UL ) >> 32 ),
2003
+ (grub_int16_t ) ((target & 0x80008000ULL ) >> 32 ),
2004
2004
0 , ctx -> current_address ,
2005
2005
image_target );
2006
2006
}
0 commit comments