[llvm-bugs] [Bug 40920] New: Dynamically adjust dynamic table Type column width
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Mar 1 08:48:25 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=40920
Bug ID: 40920
Summary: Dynamically adjust dynamic table Type column width
Product: tools
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: llvm-readobj
Assignee: unassignedbugs at nondot.org
Reporter: jh7370.2008 at my.bristol.ac.uk
CC: jh7370.2008 at my.bristol.ac.uk, llvm-bugs at lists.llvm.org
The width of the --dynamic-table "Type" column is hard-coded in. This results
in poor output for very long tags, e.g. for certain MIPS tags. There is a test
that already exhibits this behaviour (see
test/tools/llvm-readobj/elf-dynamic-tags-machine-specific.test). Here are some
example lines from that list:
...
# LLVM-MIPS-NEXT: 0x0000000070000019 MIPS_DELTA_INSTANCE 0x1000
# LLVM-MIPS-NEXT: 0x000000007000001A MIPS_DELTA_INSTANCE_NO0x1
...
# LLVM-MIPS-NEXT: 0x0000000070000025 MIPS_LOCALPAGE_GOTIDX0x1
...
# LLVM-MIPS-NEXT: 0x000000007000002D MIPS_RLD_TEXT_RESOLVE_ADDR0x8
...
Note that the test is formatted exactly like the output. A quick solution for
this would be to increase the hard-coded width, but this is not great, as it
just defers the problem until another longer tag is added. It also doesn't play
well with any downstream extensions with long tags. Better would be to
determine the width required for the Type column by iterating over the tags in
the table first, and then using that as a minimum for the width.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190301/b0f6c4ac/attachment.html>
More information about the llvm-bugs
mailing list