Simplify getStringTableIndex.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 1 Nov 2016 20:56:15 +0000 (20:56 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 1 Nov 2016 20:56:15 +0000 (20:56 +0000)
commit7fc4f5083809a1c139ac3650641709d32cb556aa
treec9218b42e6dda8bf4f217521fb73b26b5fd77b71
parentb9c6f01a817c32b2a7ff444046fe80150a78d12c
Simplify getStringTableIndex.

The description in the ELF spec is just

---------------------------
If the section name string table section index is greater than or
equal to SHN_LORESERVE (0xff00), this member has the value SHN_XINDEX
(0xffff) and the actual index of the section name string table section
is contained in the sh_link field of the section header at index 0.
---------------------------

So we only have to check for it being SHN_XINDEX. Also, sh_link is
always 32 bits, so don't return an uintX_t.

llvm-svn: 285747
llvm/include/llvm/Object/ELF.h