Remove Elf_Sym_Iter.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 29 Jun 2015 12:38:31 +0000 (12:38 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 29 Jun 2015 12:38:31 +0000 (12:38 +0000)
commite8f07a7eb3974cedc5b3884552f8c15f2d1866b2
tree53f272d117c6371866a4da28f990ddc536e47105
parent546178bfe574fa0dde9a76521c81718ae9d7eae3
Remove Elf_Sym_Iter.

It was a fairly broken concept for an ELF only class.

An ELF file can have two symbol tables, but they have exactly the same
format. There is no concept of a dynamic or a static symbol. Storing this
on the iterator also makes us do more work per symbol than necessary. To fetch
a name we would:

* Find if we had a static or a dynamic symbol.
* Look at the corresponding symbol table and find the string table section.
* Look at the string table section to fetch its contents.
* Compute the name as a substring of the string table.

All but the last step can be done per symbol table instead of per symbol. This
is a step in that direction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240939 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/ELF.h
include/llvm/Object/ELFObjectFile.h
tools/llvm-objdump/llvm-objdump.cpp
tools/llvm-readobj/ARMEHABIPrinter.h
tools/llvm-readobj/ELFDumper.cpp
tools/obj2yaml/elf2yaml.cpp