diff options
author | Alan Modra <amodra@gmail.com> | 2000-07-22 04:23:48 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2000-07-22 04:23:48 +0000 |
commit | 65e68b04b1bfc88c11a5a49e0ccfd636cd995a46 (patch) | |
tree | 0c724e714673a73c5a74c3aa490e0c8a5d57706d /gas/frags.c | |
parent | e9d196c53fe0ea5fd893e6312847cc9ce1e32d28 (diff) | |
download | gdb-65e68b04b1bfc88c11a5a49e0ccfd636cd995a46.zip gdb-65e68b04b1bfc88c11a5a49e0ccfd636cd995a46.tar.gz gdb-65e68b04b1bfc88c11a5a49e0ccfd636cd995a46.tar.bz2 |
Correct absolute section alignment.
Diffstat (limited to 'gas/frags.c')
-rw-r--r-- | gas/frags.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gas/frags.c b/gas/frags.c index 2b2c91d..5c31b7e 100644 --- a/gas/frags.c +++ b/gas/frags.c @@ -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; } |