diff options
Diffstat (limited to 'bfd/elf-strtab.c')
-rw-r--r-- | bfd/elf-strtab.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bfd/elf-strtab.c b/bfd/elf-strtab.c index ec9002f..cc1dcb3 100644 --- a/bfd/elf-strtab.c +++ b/bfd/elf-strtab.c @@ -271,6 +271,12 @@ _bfd_elf_strtab_size (struct elf_strtab_hash *tab) } bfd_size_type +_bfd_elf_strtab_len (struct elf_strtab_hash *tab) +{ + return tab->size; +} + +bfd_size_type _bfd_elf_strtab_offset (struct elf_strtab_hash *tab, size_t idx) { struct elf_strtab_hash_entry *entry; @@ -285,6 +291,19 @@ _bfd_elf_strtab_offset (struct elf_strtab_hash *tab, size_t idx) return tab->array[idx]->u.index; } +const char * +_bfd_elf_strtab_str (struct elf_strtab_hash *tab, size_t idx, + bfd_size_type *offset) +{ + if (idx == 0) + return 0; + BFD_ASSERT (idx < tab->size); + BFD_ASSERT (tab->sec_size); + if (offset) + *offset = tab->array[idx]->u.index; + return tab->array[idx]->root.string; +} + bfd_boolean _bfd_elf_strtab_emit (register bfd *abfd, struct elf_strtab_hash *tab) { |