From: amodra Date: Thu, 14 Apr 2005 00:27:15 +0000 (+0000) Subject: * merge.c (merge_strings): Round up section size for alignment. X-Git-Tag: pre_wait_sig_exit~2123 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=ac479470aac22c24785698b8eb7fdd4edada2f24;p=pf3gnuchains%2Fpf3gnuchains4x.git * merge.c (merge_strings): Round up section size for alignment. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ae13e06a7d..6e66048939 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2005-04-14 Alan Modra + + * merge.c (merge_strings): Round up section size for alignment. + 2005-04-14 David S. Miller Add TLS support for 64-bit Sparc ELF. diff --git a/bfd/merge.c b/bfd/merge.c index 3efbd43773..da826c7175 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. */