Allow common symbols to have an alignment of 1 if explicitly requested, and
authorNick Clifton <nickc@redhat.com>
Thu, 24 Aug 2000 17:41:40 +0000 (17:41 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 24 Aug 2000 17:41:40 +0000 (17:41 +0000)
not overridden by other definitions.

bfd/ChangeLog
bfd/elflink.h

index 9808b4155a8bca8aabdee8563398859256b09c03..e0ba4d1b73aafd47d5e3b9ddba87517b576622c1 100644 (file)
@@ -1,3 +1,9 @@
+2000-08-24  Denis Chertykov  <denisc@overta.ru> & Nick Clifton  <nickc@redhat.com>
+
+       * elflink.h (elf_link_add_object_symbols): Allow common
+       symbols to have an alignment of 1 if explicitly requested, and
+       not overridden by other definitions.
+
 2000-08-22  Doug Kwan <dkwan@transmeta.com>
 
        * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
index cd55664836c5376483bf1b1ec16073fcb7d144f1..a808673d6ece4706e7350096acf7e606b3be0195 100644 (file)
@@ -1615,7 +1615,10 @@ elf_link_add_object_symbols (abfd, info)
          unsigned int align;
 
          align = bfd_log2 (sym.st_value);
-         if (align > old_alignment)
+         if (align > old_alignment
+             /* Permit an alignment power of zero if an alignment of one
+                is specified and no other alignments have been specified.  */
+             || (sym.st_value == 1 && old_alignment == 0))
            h->root.u.c.p->alignment_power = align;
        }