summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objdump
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2019-08-30 13:39:22 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2019-08-30 13:39:22 +0000
commit4e71702cd4ab2c77aaa753770e99526085e5e6eb (patch)
treefb308e11191a98566bfb05c1dec6c83ad37cb812 /llvm/test/tools/llvm-objdump
parent336766966827431d73ddb66c80bdca9d6f50499d (diff)
downloadbcm5719-llvm-4e71702cd4ab2c77aaa753770e99526085e5e6eb.tar.gz
bcm5719-llvm-4e71702cd4ab2c77aaa753770e99526085e5e6eb.zip
[yaml2obj][obj2yaml] - Use a single "Other" field instead of "Other", "Visibility" and "StOther".
Currenly we can encode the 'st_other' field of symbol using 3 fields. 'Visibility' is used to encode STV_* values. 'Other' is used to encode everything except the visibility, but it can't handle arbitrary values. 'StOther' is used to encode arbitrary values when 'Visibility'/'Other' are not helpfull enough. 'st_other' field is used to encode symbol visibility and platform-dependent flags and values. Problem to encode it is that it consists of Visibility part (STV_* values) which are enumeration values and the Other part, which is different and inconsistent. For MIPS the Other part contains flags for all STO_MIPS_* values except STO_MIPS_MIPS16. (Like comment in ELFDumper says: "Someones in their infinite wisdom decided to make STO_MIPS_MIPS16 flag overlapped with other ST_MIPS_xxx flags."...) And for PPC64 the Other part might actually encode any value. This patch implements custom logic for handling the st_other and removes 'Visibility' and 'StOther' fields. Here is an example of a new YAML style this patch allows: - Name: foo Other: [ 0x4 ] - Name: bar Other: [ STV_PROTECTED, 4 ] - Name: zed Other: [ STV_PROTECTED, STO_MIPS_OPTIONAL, 0xf8 ] Differential revision: https://reviews.llvm.org/D66886 llvm-svn: 370472
Diffstat (limited to 'llvm/test/tools/llvm-objdump')
-rw-r--r--llvm/test/tools/llvm-objdump/elf-symbol-visibility.test6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/test/tools/llvm-objdump/elf-symbol-visibility.test b/llvm/test/tools/llvm-objdump/elf-symbol-visibility.test
index 48539f633bb..113e05fe0d3 100644
--- a/llvm/test/tools/llvm-objdump/elf-symbol-visibility.test
+++ b/llvm/test/tools/llvm-objdump/elf-symbol-visibility.test
@@ -23,13 +23,13 @@ Symbols:
- Name: default
Section: .text
- Name: internal
- Visibility: STV_INTERNAL
+ Other: [ STV_INTERNAL ]
Section: .text
- Name: hidden
- Visibility: STV_HIDDEN
+ Other: [ STV_HIDDEN ]
Section: .text
- Name: protected
- Visibility: STV_PROTECTED
+ Other: [ STV_PROTECTED ]
Section: .text
- Name: mips_pic
Other: [ STO_MIPS_PIC ]
OpenPOWER on IntegriCloud