bug fix.
from ChangeLog: > * coff-sh.c (sh_relax_delete_bytes): Correct address comparisons > when handling 32 bit immediate relocs. > * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
This commit is contained in:
parent
db6f3bcf39
commit
67087bcc78
4
gnu/dist/bfd/coff-sh.c
vendored
4
gnu/dist/bfd/coff-sh.c
vendored
@ -1039,7 +1039,7 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
|
||||
|
||||
val = bfd_get_32 (abfd, contents + nraddr);
|
||||
val += sym.n_value;
|
||||
if (val >= addr && val < toaddr)
|
||||
if (val > addr && val < toaddr)
|
||||
bfd_put_32 (abfd, val - count, contents + nraddr);
|
||||
}
|
||||
start = stop = addr;
|
||||
@ -1275,7 +1275,7 @@ sh_relax_delete_bytes (abfd, sec, addr, count)
|
||||
|
||||
val = bfd_get_32 (abfd, ocontents + irelscan->r_vaddr - o->vma);
|
||||
val += sym.n_value;
|
||||
if (val >= addr && val < toaddr)
|
||||
if (val > addr && val < toaddr)
|
||||
bfd_put_32 (abfd, val - count,
|
||||
ocontents + irelscan->r_vaddr - o->vma);
|
||||
|
||||
|
4
gnu/dist/bfd/elf32-sh.c
vendored
4
gnu/dist/bfd/elf32-sh.c
vendored
@ -1095,7 +1095,7 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
|
||||
|
||||
val = bfd_get_32 (abfd, contents + nraddr);
|
||||
val += sym.st_value;
|
||||
if (val >= addr && val < toaddr)
|
||||
if (val > addr && val < toaddr)
|
||||
bfd_put_32 (abfd, val - count, contents + nraddr);
|
||||
}
|
||||
}
|
||||
@ -1318,7 +1318,7 @@ sh_elf_relax_delete_bytes (abfd, sec, addr, count)
|
||||
|
||||
val = bfd_get_32 (abfd, ocontents + irelscan->r_offset);
|
||||
val += sym.st_value;
|
||||
if (val >= addr && val < toaddr)
|
||||
if (val > addr && val < toaddr)
|
||||
bfd_put_32 (abfd, val - count,
|
||||
ocontents + irelscan->r_offset);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user