diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2010-11-20 17:34:16 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2010-11-20 17:34:16 +0000 |
commit | 5c08b7d40e284da08c08afaef5efd4d50a36cb89 (patch) | |
tree | f069a90ae40d47a43df00801ad1b3c51f7481c0b /ld | |
parent | f9982339c9d56624fd9da4ded33a08272ef9b1cc (diff) | |
download | gdb-5c08b7d40e284da08c08afaef5efd4d50a36cb89.zip gdb-5c08b7d40e284da08c08afaef5efd4d50a36cb89.tar.gz gdb-5c08b7d40e284da08c08afaef5efd4d50a36cb89.tar.bz2 |
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')
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/plugin.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 9b8826c..330b547 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,11 @@ 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 * lexsup.c (parse_args): Properly report loading plugin error. diff --git a/ld/plugin.c b/ld/plugin.c index 79b39e8..c4337d9 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: |