Correct absolute section alignment.
authorAlan Modra <amodra@gmail.com>
Sat, 22 Jul 2000 04:23:48 +0000 (04:23 +0000)
committerAlan Modra <amodra@gmail.com>
Sat, 22 Jul 2000 04:23:48 +0000 (04:23 +0000)
gas/ChangeLog
gas/frags.c

index bca4ec028ec757f2958d8245c34fc4d37fb3faf8..f7501d0e785b8f03a7a0edc47db69135779c5145 100644 (file)
@@ -1,3 +1,7 @@
+2000-07-22  Alan Modra  <alan@linuxcare.com.au>
+
+       * frags.c (frag_align): Correct absolute section alignment.
+
 2000-07-20  DJ Delorie  <dj@redhat.com>
 
        * config/obj-coff.c (obj_frob_symbol): revert previous change,
 2000-07-20  DJ Delorie  <dj@redhat.com>
 
        * config/obj-coff.c (obj_frob_symbol): revert previous change,
index 2b2c91d41d5591ce2531eb0396b07ea352a4dbfa..5c31b7e89318d527d9154691b739c7a442aff131 100644 (file)
@@ -303,9 +303,10 @@ frag_align (alignment, fill_character, max)
   if (now_seg == absolute_section)
     {
       addressT new_off;
   if (now_seg == absolute_section)
     {
       addressT new_off;
+      addressT mask;
 
 
-      new_off = ((abs_section_offset + alignment - 1)
-                &~ ((1 << alignment) - 1));
+      mask = (~ (addressT) 0) << alignment;
+      new_off = (abs_section_offset + ~ mask) & mask;
       if (max == 0 || new_off - abs_section_offset <= (addressT) max)
        abs_section_offset = new_off;
     }
       if (max == 0 || new_off - abs_section_offset <= (addressT) max)
        abs_section_offset = new_off;
     }
This page took 0.032884 seconds and 4 git commands to generate.