Correct absolute section alignment.

This commit is contained in:
Alan Modra 2000-07-22 04:23:48 +00:00
parent e9d196c53f
commit 65e68b04b1
2 changed files with 7 additions and 2 deletions

View 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,

View file

@ -303,9 +303,10 @@ frag_align (alignment, fill_character, max)
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;
}