diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2013-03-31 21:52:03 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2013-03-31 21:52:03 +0000 |
commit | d54fbe4007bc35441a81861d2f6707cbfb993fde (patch) | |
tree | f08d65835679e34d0e3c5d1309cd81dab9e5577a /gnu | |
parent | 369edcd5873fb67b558946f0bcafc7b70dc1b8e9 (diff) |
Replace the common_definition method in mips BFD backends with a routine
which correctly recognizes SHN_MIPS_ACOMMON and SHN_MIPS_SCOMMON as
common symbols; this allows them to correctly be aligned to their natural
alignment.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.c | 8 | ||||
-rw-r--r-- | gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.h | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.c b/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.c index 47cf31cfee8..9df8823ae5c 100644 --- a/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.c +++ b/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.c @@ -11133,3 +11133,11 @@ _bfd_mips_elf_ignore_undef_symbol (struct elf_link_hash_entry *h) { return ELF_MIPS_IS_OPTIONAL (h->other) ? TRUE : FALSE; } + +bfd_boolean +_bfd_mips_elf_common_definition (Elf_Internal_Sym *sym) +{ + return (sym->st_shndx == SHN_COMMON + || sym->st_shndx == SHN_MIPS_ACOMMON + || sym->st_shndx == SHN_MIPS_SCOMMON); +} diff --git a/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.h b/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.h index 6c3c9a30f6e..88e83f1a7d4 100644 --- a/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.h +++ b/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.h @@ -141,6 +141,9 @@ extern bfd_boolean _bfd_mips_elf_ignore_undef_symbol extern const struct bfd_elf_special_section _bfd_mips_elf_special_sections []; +extern bfd_boolean _bfd_mips_elf_common_definition (Elf_Internal_Sym *); + +#define elf_backend_common_definition _bfd_mips_elf_common_definition #define elf_backend_name_local_section_symbols \ _bfd_mips_elf_name_local_section_symbols #define elf_backend_special_sections _bfd_mips_elf_special_sections |