[llvm-objdump] Adjust spacing and field width for --section-headers

Summary:
- Expand the "Name" column past 13 characters when any of the section names are longer. Current behavior is a staggard output instead of a nice table if a single name is longer.
- Only print the required number of hex chars for addresses (i.e. 8 characters for 32-bit, 16 characters for 64-bit)
- Fix trailing spaces

Reviewers: grimar, jhenderson, espindola

Reviewed By: grimar

Subscribers: emaste, sbc100, arichardson, aheejin, seiya, llvm-commits, MaskRay

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68730

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@374795 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/ELF/got32-i386.s b/test/ELF/got32-i386.s
index 17ba09b..7506d9a 100644
--- a/test/ELF/got32-i386.s
+++ b/test/ELF/got32-i386.s
@@ -15,7 +15,7 @@
 ## 73728 == 0x12000 == ADDR(.got)
 # CHECK: Sections:
 # CHECK:  Name Size     VMA
-# CHECK:  .got 00000004 00000000004020fc
+# CHECK:  .got 00000004 004020fc
 # CHECK:       _start:
 # CHECK-NEXT:   4010f5: 8b 1d {{.*}}  movl 4202748, %ebx
 
diff --git a/test/ELF/got32x-i386.s b/test/ELF/got32x-i386.s
index c54e920..a3b7510 100644
--- a/test/ELF/got32x-i386.s
+++ b/test/ELF/got32x-i386.s
@@ -33,8 +33,8 @@
 
 ## 73728 == 0x12000 == ADDR(.got)
 # CHECK: Sections:
-# CHECK:  Name Size     VMA
-# CHECK:  .got.plt 0000000c 0000000000403134
+# CHECK:  Name     Size     VMA
+# CHECK:  .got.plt 0000000c 00403134
 # CHECK:       _start:
 # CHECK-NEXT:   401115: 8b 05 {{.*}} movl 4202800, %eax
 # CHECK-NEXT:   40111b: 8b 1d {{.*}} movl 4202800, %ebx