From: H.J. Lu Date: Sat, 20 Nov 2010 17:34:16 +0000 (+0000) Subject: Set alignment of common plugin symbol to 1 for For ELF targets. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5c08b7d40e284da08c08afaef5efd4d50a36cb89;p=binutils-gdb.git Set alignment of common plugin symbol to 1 for For ELF targets. 2010-11-20 H.J. Lu PR ld/12246 * plugin.c (asymbol_from_plugin_symbol): Set alignment of common symbol to 1 for For ELF targets. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index 9b8826c5965..330b5474538 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2010-11-20 H.J. Lu + + PR ld/12246 + * plugin.c (asymbol_from_plugin_symbol): Set alignment of + common symbol to 1 for For ELF targets. + 2010-11-20 H.J. Lu PR ld/12247 diff --git a/ld/plugin.c b/ld/plugin.c index 79b39e8b285..c4337d9743c 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -292,6 +292,9 @@ asymbol_from_plugin_symbol (bfd *abfd, asymbol *asym, flags = BSF_GLOBAL; section = bfd_com_section_ptr; asym->value = ldsym->size; + /* For ELF targets, set alignment of common symbol to 1. */ + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) + ((elf_symbol_type *) asym)->internal_elf_sym.st_value = 1; break; default: