summaryrefslogtreecommitdiff
path: root/ld/plugin.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2010-11-20 17:34:16 +0000
committerH.J. Lu <hjl.tools@gmail.com>2010-11-20 17:34:16 +0000
commitd29d0607572af5d0eddead6dbc39c09695de7903 (patch)
tree769517ebcb053971481d9183f6ca5f18332421b0 /ld/plugin.c
parent2fc6a631a9afcf20dfe10c1c12296830cf27a2bd (diff)
downloadbinutils-redhat-d29d0607572af5d0eddead6dbc39c09695de7903.tar.gz
Set alignment of common plugin symbol to 1 for For ELF targets.
2010-11-20 H.J. Lu <hongjiu.lu@intel.com> PR ld/12246 * plugin.c (asymbol_from_plugin_symbol): Set alignment of common symbol to 1 for For ELF targets.
Diffstat (limited to 'ld/plugin.c')
-rw-r--r--ld/plugin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ld/plugin.c b/ld/plugin.c
index 79b39e8b28..c4337d9743 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: