X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Felf32-sh64.c;h=dac8bb4d4481d940625fb5339e64a6aae895c0f6;hb=0bf60745767d2465c81ee57ae7705a62d6d8fafe;hp=8fe837794d3c1986bf749ee340361088a736d940;hpb=9553c6388c435343a5adf77888647ace94808024;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/elf32-sh64.c b/bfd/elf32-sh64.c index 8fe837794d..dac8bb4d44 100644 --- a/bfd/elf32-sh64.c +++ b/bfd/elf32-sh64.c @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ #define SH64_ELF @@ -63,7 +63,7 @@ static bfd_boolean sh64_elf_link_output_symbol_hook (struct bfd_link_info *, const char *, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *); static bfd_boolean sh64_backend_section_from_shdr - (bfd *, Elf_Internal_Shdr *, const char *); + (bfd *, Elf_Internal_Shdr *, const char *, int); static void sh64_elf_final_write_processing (bfd *, bfd_boolean); static bfd_boolean sh64_bfd_elf_copy_private_section_data @@ -253,13 +253,14 @@ sh64_elf_merge_private_data (bfd *ibfd, bfd *obfd) } /* Handle a SH64-specific section when reading an object file. This - is called when elfcode.h finds a section with an unknown type. + is called when bfd_section_from_shdr finds a section with an unknown + type. We only recognize SHT_SH5_CR_SORTED, on the .cranges section. */ bfd_boolean sh64_backend_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, - const char *name) + const char *name, int shindex) { flagword flags = 0; @@ -284,7 +285,7 @@ sh64_backend_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, return FALSE; } - if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name)) + if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) return FALSE; if (flags @@ -753,10 +754,43 @@ sh64_elf_merge_symbol_attribute (struct elf_link_hash_entry *h, return; } -static struct bfd_elf_special_section const sh64_elf_special_sections[]= +static struct bfd_elf_special_section const + sh64_special_sections_c[] = { { ".cranges", 8, 0, SHT_PROGBITS, 0 }, - { NULL, 0, 0, 0, 0 } + { NULL, 0, 0, 0, 0 } +}; + +static struct bfd_elf_special_section const * + sh64_elf_special_sections[27]= +{ + NULL, /* 'a' */ + NULL, /* 'b' */ + sh64_special_sections_c, /* 'c' */ + NULL, /* 'd' */ + NULL, /* 'e' */ + NULL, /* 'f' */ + NULL, /* 'g' */ + NULL, /* 'h' */ + NULL, /* 'i' */ + NULL, /* 'j' */ + NULL, /* 'k' */ + NULL, /* 'l' */ + NULL, /* 'm' */ + NULL, /* 'n' */ + NULL, /* 'o' */ + NULL, /* 'p' */ + NULL, /* 'q' */ + NULL, /* 'r' */ + NULL, /* 's' */ + NULL, /* 't' */ + NULL, /* 'u' */ + NULL, /* 'v' */ + NULL, /* 'w' */ + NULL, /* 'x' */ + NULL, /* 'y' */ + NULL, /* 'z' */ + NULL /* other */ }; #undef TARGET_BIG_SYM