summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj/ELF/section-flags.test
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-readelf][llvm-readobj] - Reimplement the logic of section flags dumping.Georgii Rymar2019-12-181-0/+9
| | | | | | | | | | | | | | | | | Our logic that dumped the flags was buggy. For LLVM style it dumped SHF_MASKPROC/SHF_MASKOS named constants, though they are not flags, but masks. For GNU style it was just very inconsistent with GNU which has logic that is not straightforward. Imagine we have sh_flags == 0x90000000. SHF_EXCLUDE ("E") has a value of 0x80000000 and SHF_MASKPROC is 0xf0000000. GNU readelf will not print "E" or "Ep" in this case, but will print just "p". It only will print "E" when no other processor flag is set. I had to investigate the GNU source to find the algorithm and now our logic should match it. Differential revision: https://reviews.llvm.org/D71462
* [llvm-readobj] - Fix letters used for dumping section types in GNU style.Georgii Rymar2019-12-131-3/+123
| | | | | | | | | | | | | | I've noticed that when we have all regular flags set, we print "WAEXMSILoGTx" instead of "WAXMSILOGTCE" printed by GNU readelf. It happens because: 1) We print SHF_EXCLUDE at the wrong place. 2) We do not recognize SHF_COMPRESSED, we print "x" instead of "C". 3) We print "o" instead of "O" for SHF_OS_NONCONFORMING. This patch fixes differences and adds test cases. Differential revision: https://reviews.llvm.org/D71418
* [llvm-readobj][test] - Add a test for testing regular section flags and ↵Georgii Rymar2019-12-121-0/+48
cleanup flags testing. This: 1) Adds a test for testing all section flags (`section-flags.test`). 2) Renames `sec-flags.test`->`section-arch-flags.test` and performs a clean up. 3) Removes `compression.zlib.style.elf-x86-64` binary and a test case for SHF_COMPRESSED flag, because them are now excessive. 4) Adds missing MIPS flags and a test for SHF_ARM_PURECODE. Differential revision: https://reviews.llvm.org/D71333
OpenPOWER on IntegriCloud