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.
This commit is contained in:
H.J. Lu 2010-11-20 17:34:16 +00:00
parent f9982339c9
commit 5c08b7d40e
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,9 @@
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.
2010-11-20 H.J. Lu <hongjiu.lu@intel.com>
PR ld/12247

View File

@ -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: