Small updates.

This commit is contained in:
Markus F.X.J. Oberhumer
2007-01-23 13:50:39 +01:00
parent 6e32dff2ad
commit 7271ae9611
3 changed files with 15 additions and 4 deletions
+10 -2
View File
@@ -619,7 +619,11 @@ void ElfLinkerAMD64::relocate1(const Relocation *rel, upx_byte *location,
if (strcmp(type, "8") == 0)
{
#if (ACC_CC_PGI)
int displ = * (signed char *) location + (int) value; // CBUG
#else
int displ = (signed char) *location + (int) value;
#endif
if (displ < -128 || displ > 127)
{
printf("target out of range (%d) in reloc %s:%x\n",
@@ -823,10 +827,14 @@ void ElfLinkerX86::relocate1(const Relocation *rel, upx_byte *location,
if (strcmp(type, "8") == 0)
{
#if (ACC_CC_PGI)
int displ = * (signed char *) location + (int) value; // CBUG
#else
int displ = (signed char) *location + (int) value;
#endif
if (range_check && (displ < -128 || displ > 127)) {
printf("target out of range (%d) in reloc %s:%x\n",
displ, rel->section->name, rel->offset);
printf("target out of range (%d,%d,%d) in reloc %s:%x\n",
displ, *location, value, rel->section->name, rel->offset);
abort();
}
*location += value;