Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/gnu/dist/bfd bug fix.



details:   https://anonhg.NetBSD.org/src/rev/dff91b76f965
branches:  trunk
changeset: 504391:dff91b76f965
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Mar 01 10:39:20 2001 +0000

description:
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.

diffstat:

 gnu/dist/bfd/coff-sh.c  |  4 ++--
 gnu/dist/bfd/elf32-sh.c |  4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diffs (42 lines):

diff -r 26fbcbc15ad1 -r dff91b76f965 gnu/dist/bfd/coff-sh.c
--- a/gnu/dist/bfd/coff-sh.c    Thu Mar 01 08:35:16 2001 +0000
+++ b/gnu/dist/bfd/coff-sh.c    Thu Mar 01 10:39:20 2001 +0000
@@ -1039,7 +1039,7 @@
 
              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 @@
 
              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);
 
diff -r 26fbcbc15ad1 -r dff91b76f965 gnu/dist/bfd/elf32-sh.c
--- a/gnu/dist/bfd/elf32-sh.c   Thu Mar 01 08:35:16 2001 +0000
+++ b/gnu/dist/bfd/elf32-sh.c   Thu Mar 01 10:39:20 2001 +0000
@@ -1095,7 +1095,7 @@
 
                  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 @@
 
              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);
            }



Home | Main Index | Thread Index | Old Index