summaryrefslogtreecommitdiff
path: root/bfd/merge.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2005-04-14 00:27:20 +0000
committerAlan Modra <amodra@bigpond.net.au>2005-04-14 00:27:20 +0000
commit78ab403f86c37365076e457c513c8a289a3855d0 (patch)
treefbdf7c9e3db2a565de5c56e5404d8f3363578e40 /bfd/merge.c
parent31e94932c293487d5f7e43a0d000d8426fd54531 (diff)
downloadgdb-78ab403f86c37365076e457c513c8a289a3855d0.tar.gz
* merge.c (merge_strings): Round up section size for alignment.
Diffstat (limited to 'bfd/merge.c')
-rw-r--r--bfd/merge.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/merge.c b/bfd/merge.c
index 3efbd43773e..da826c7175e 100644
--- a/bfd/merge.c
+++ b/bfd/merge.c
@@ -656,6 +656,11 @@ alloc_failure:
}
}
secinfo->sec->size = size;
+ if (secinfo->sec->alignment_power != 0)
+ {
+ bfd_size_type align = (bfd_size_type) 1 << secinfo->sec->alignment_power;
+ secinfo->sec->size = (secinfo->sec->size + align - 1) & -align;
+ }
/* And now adjust the rest, removing them from the chain (but not hashtable)
at the same time. */