Skip to content

Commit

Permalink
Set alignment of common plugin symbol to 1 for For ELF targets.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hjl-tools committed Nov 20, 2010
1 parent 2fc6a63 commit d29d060
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ld/ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions ld/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d29d060

Please sign in to comment.