--section-details/-t is a GNU readelf option that produce
an output that is an alternative to --sections.
Details
Diff Detail
Event Timeline
I'm not going to have time to look at this today, and am off for the rest of the week. I'll try to look early next week. Don't forget to update the llvm-readelf documentation.
llvm-readelf -S is actually an equivalent to readelf -S --wide in terms of formatting. It probably makes sense for us to do the same with -t (i.e. match the wide formatting), with all the content except the flags on one line.
llvm/test/tools/llvm-readobj/ELF/section-details.test | ||
---|---|---|
4 | ||
20 | We should have at least one section with a long name that goes beyond the first column width, I think. | |
22 | Any reason not to have all 5s for the entsize? What about a high alignment (since the addralign field is much wider than one byte)? | |
76 | Is UNKNOWN printed for "known" OS/Processor specific flags with GNU readelf? | |
159 | When reading this comment, I was expecting to see --sections win when specified first (latter could mean the latter as specified on the command-line). | |
168 | I'd move this case to be immediately after the "standard" 64-bit case. | |
llvm/tools/llvm-readobj/ELFDumper.cpp | ||
4204 | Test case? | |
4212–4213 | Shouldn't this use reportUniqueWarning? Also, test case? | |
4266 |
llvm/test/tools/llvm-readobj/ELF/section-details.test | ||
---|---|---|
22 | Done. | |
76 | GNU readelf prints the following for sh_flags = 0xffffffffffffffff: [ffffffffffffffff]: WRITE, ALLOC, EXEC, MERGE, STRINGS, INFO LINK, LINK ORDER, OS NONCONF, GROUP, TLS, COMPRESSED, GNU_MBIND, EXCLUDE, OS (000000000ef00000), PROC (0000000070000000), UNKNOWN (ffffffff000ff008) I.e. it prints "OS", "PROC" and "UNKNOWN" separatelly. I've updated implementation to follow. | |
llvm/tools/llvm-readobj/ELFDumper.cpp | ||
4212–4213 | I've added a single test case that covers both warnings. |
LGTM, thanks.
llvm/test/tools/llvm-readobj/ELF/section-details.test | ||
---|---|---|
76 | (grumbles quietly about SHF_EXCLUDE usurping a bit from the processor-specific range making the PROC value not match SHF_MASK_PROC...) |
llvm/test/tools/llvm-readobj/ELF/section-details.test | ||
---|---|---|
76 | This is unfortunate but many architectures using this bit for other purposes are not supported by LLVM at all:) |