[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/12246] BFD linker plugin generates incorrect alignments for comm
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/12246] BFD linker plugin generates incorrect alignments for common symbols |
Date: |
Sat, 20 Nov 2010 15:52:21 +0000 |
http://sourceware.org/bugzilla/show_bug.cgi?id=12246
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2010-11-20 15:52:07
UTC ---
Something like this
---
diff --git a/ld/plugin.c b/ld/plugin.c
index 79b39e8..78815da 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 *) symbol)->internal_elf_sym.st_value = 1;
break;
default:
----
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
- [Bug ld/12246] New: BFD linker plugin generates incorrect alignments for common symbols, hjl.tools at gmail dot com, 2010/11/20
- [Bug ld/12246] BFD linker plugin generates incorrect alignments for common symbols, hjl.tools at gmail dot com, 2010/11/20
- [Bug ld/12246] BFD linker plugin generates incorrect alignments for common symbols, hjl.tools at gmail dot com, 2010/11/20
- [Bug ld/12246] BFD linker plugin generates incorrect alignments for common symbols,
hjl.tools at gmail dot com <=
- [Bug ld/12246] BFD linker plugin generates incorrect alignments for common symbols, hjl.tools at gmail dot com, 2010/11/20
- [Bug ld/12246] BFD linker plugin generates incorrect alignments for common symbols, hjl.tools at gmail dot com, 2010/11/20
- [Bug ld/12246] BFD linker plugin generates incorrect alignments for common symbols, davek at gcc dot gnu.org, 2010/11/20