[yaml2obj] - Allow setting the symbol st_other field to any integer.
commit2d651a0b29be0beb6ff309cfd434ff7b31e28e30
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 23 Aug 2019 09:31:07 +0000 (23 09:31 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 23 Aug 2019 09:31:07 +0000 (23 09:31 +0000)
tree0fd8daa6200f7388d8032f2f1c7d509fe9665de7
parentb0b2dbee09386408ed2878f6a2e2418f1bdd8c78
[yaml2obj] - Allow setting the symbol st_other field to any integer.

st_other field of a symbol usually contains its visibility.
Other bits are usually 0, though some targets, like
MIPS can set them using the named bit field values.

Problem is that there is no way to set an arbitrary value now,
though that might be useful for our test cases.

In this patch I introduced a way to set st_other to any numeric
value using the new StOther field.
I added a test and simplified the existent one to show the effect/benefit

Differential revision: https://reviews.llvm.org/D66583

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369742 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ObjectYAML/ELFYAML.cpp
test/tools/llvm-readobj/elf-symbol-visibility.test
test/tools/yaml2obj/elf-symbol-stother.yaml [new file with mode: 0644]