]> granicus.if.org Git - llvm/commit
[yaml2obj] - Allow setting the symbol st_other field to any integer.
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 23 Aug 2019 09:31:07 +0000 (09:31 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 23 Aug 2019 09:31:07 +0000 (09:31 +0000)
commit13b31219db8d47692e59a88d332fe9bbf7571a58
tree0fd8daa6200f7388d8032f2f1c7d509fe9665de7
parentdb5694b33afbc2786622eabf5ae42e4a6410c57d
[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]