aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2016-12-28 13:22:44 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2017-01-20 09:05:41 +0000
commit1737c64030af533c520dd1ed1ec2787302cdf830 (patch)
tree0d53bbd08db4031d5a9d51d7d46a12111b7f9150 /ld
parent2132fe850322e10313d94d505f7ea268f9524ba0 (diff)
downloadgdb-1737c64030af533c520dd1ed1ec2787302cdf830.zip
gdb-1737c64030af533c520dd1ed1ec2787302cdf830.tar.gz
gdb-1737c64030af533c520dd1ed1ec2787302cdf830.tar.bz2
objdump: Better objdump section headers in wide mode
When displaying the section headers table using objdump (-h), the column containing the section header name is currently fixed at 13 characters. A section name that is longer than 13 characters will overflow the column causing the table to become miss-aligned. In this commit I change the behaviour so that _in wide mode_ (-w -h) the section name column is dynamically resized to fit the longest section name we plan to display. In wide mode the column still retains a minimum width of 13 characters. In non-wide more the behaviour is completely unchanged. While I was changing the dump_headers function I have unified the two printf lines that handled the different address widths into a single printf, the address width is now passed into printf using the '*' field width format character. binutils/ChangeLog: * objdump.c (dump_section_header): Extract max section name length from data parameter, use this when formatting output. (find_longest_section_name): New function. (dump_headers): Calculate longest section name when in wide mode, reformat to unify printing of header line. ld/ChangeLog: * testsuite/ld-elf/eh-frame-hdr.d: Update expected results.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/testsuite/ld-elf/eh-frame-hdr.d2
2 files changed, 5 insertions, 1 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 37224a0..6e77d00 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2017-01-20 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * testsuite/ld-elf/eh-frame-hdr.d: Update expected results.
+
2017-01-18 Maciej W. Rozycki <macro@imgtec.com>
PR ld/20995
diff --git a/ld/testsuite/ld-elf/eh-frame-hdr.d b/ld/testsuite/ld-elf/eh-frame-hdr.d
index a76ac73..08b12d8 100644
--- a/ld/testsuite/ld-elf/eh-frame-hdr.d
+++ b/ld/testsuite/ld-elf/eh-frame-hdr.d
@@ -5,5 +5,5 @@
#xfail: avr*-*-* or1k*-*-elf or1k*-*-rtems* pru-*-* visium-*-*
# These targets support CFI generation but not shared libraries.
#...
- [0-9] .eh_frame_hdr 0*[12][048c] .*
+ [0-9] .eh_frame_hdr +0*[12][048c] .*
#pass