These snippets were missed in the previous bytes vs octets patch to
authorTimothy Wall <twall@alum.mit.edu>
Wed, 9 Feb 2000 14:42:48 +0000 (14:42 +0000)
committerTimothy Wall <twall@alum.mit.edu>
Wed, 9 Feb 2000 14:42:48 +0000 (14:42 +0000)
the linker.

ld/ChangeLog
ld/ldlang.c

index 8ceaf8bd0b9ab23fb81f25644811aad7ead45073..1ceee7ae6d49ac8d8c2933c8a8aa7355c9bdfdd2 100644 (file)
@@ -1,3 +1,8 @@
+2000-02-04  Timothy Wall  <twall@redhat.com>
+
+       * ldlang.c (lang_check_section_addresses): Use bytes instead of
+       octets when calculating section end addresses.
+
 2000-02-04  Timothy Wall  <twall@redhat.com>
 
        * ldlang.c (lang_size_sections): Fix typo in ALIGN_N invocation.
index 10e41c247f872e74e3b692719879191bcd1f01ea..6913a38e0667190d676c336167ce3171b4d4d403 100644 (file)
@@ -2672,8 +2672,8 @@ lang_check_section_addresses ()
             overlapping VMAs but they must have distinct LMAs.  */
          s_start  = bfd_section_lma (output_bfd, s);
          os_start = bfd_section_lma (output_bfd, os);
-         s_end    = s_start  + bfd_section_size (output_bfd, s) - 1;
-         os_end   = os_start + bfd_section_size (output_bfd, os) - 1;
+         s_end    = s_start  + bfd_section_size (output_bfd, s) / opb - 1;
+         os_end   = os_start + bfd_section_size (output_bfd, os) / opb - 1;
          
          /* Look for an overlap.  */
          if ((s_end < os_start) || (s_start > os_end))
@@ -2906,6 +2906,8 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
 
            switch (s->data_statement.type)
              {
+              default:
+                abort();
              case QUAD:
              case SQUAD:
                size = QUAD_SIZE;
@@ -3150,6 +3152,8 @@ lang_do_assignments (s, output_section_statement, fill, dot)
             int size;
             switch (s->data_statement.type)
               {
+              default:
+                abort();
               case QUAD:
               case SQUAD:
                 size = QUAD_SIZE;