diff options
author | Nick Clifton <nickc@redhat.com> | 2020-07-02 11:30:52 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2020-07-02 11:30:52 +0100 |
commit | 0942c7ab94e554657c3e11ab85ae7f15373ee80d (patch) | |
tree | b9a60c0257ad7aa26fe5985f5ae279db2e4528cd /ld/testsuite | |
parent | 1cdf9e33eadd3bf091fe64ed30daa0263f736ea2 (diff) | |
download | gdb-0942c7ab94e554657c3e11ab85ae7f15373ee80d.zip gdb-0942c7ab94e554657c3e11ab85ae7f15373ee80d.tar.gz gdb-0942c7ab94e554657c3e11ab85ae7f15373ee80d.tar.bz2 |
Change readelf's display of symbol names (when not in --wide mode) so that if they are going to be truncated then "[...]" is displayed at the end. Add a comment line option to disable this enhancement and restore the old behaviour.
PR 26028
binutils* readelf.c (print_symbol): Handle truncation of symbol names.
(options): Add -T/--silent-truncation option.
(parse_args): Handle the option.
(print_dynamic_symbol): Correct calculation of width available to
display symbol name.
* doc/binutils.texi: Document the -T option to readelf.
* NEWS: Mention the new feature.
gas * testsuite/gas/ia64/group-2.d: Add -T option to readelf
command line.
* testsuite/gas/ia64/unwind.d: Likewise.
* testsuite/gas/mmix/bspec-1.d: Likewise.
* testsuite/gas/mmix/bspec-2.d: Likewise.
* testsuite/gas/mmix/comment-1.d: Likewise.
* testsuite/gas/tic6x/scomm-directive-4.d: Likewise.
ld * testsuite/ld-powerpc/powerpc.exp: Add -T option to readelf
command line when running some tests.
* testsuite/ld-arm/arm-elf.exp: Likewise.
* testsuite/ld-mips-elf/mips-elf.exp: Likewise.
* testsuite/ld-mmix/local1.d: Likewise.
* testsuite/ld-mmix/local3.d: Likewise.
* testsuite/ld-mmix/local5.d: Likewise.
* testsuite/ld-mmix/local7.d: Likewise.
* testsuite/ld-powerpc/powerpc.exp: Likewise.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ld-arm/arm-elf.exp | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-mips-elf/mips-elf.exp | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-mmix/local1.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-mmix/local3.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-mmix/local5.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-mmix/local7.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/powerpc.exp | 6 |
7 files changed, 12 insertions, 12 deletions
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index 0bd4cca..1289317 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -794,7 +794,7 @@ set armeabitests_nonacl { "--section-start .gnu.sgstubs=0x20000 --out-implib=tmpdir/cmse-implib.lib --cmse-implib" "" "-march=armv8-m.base -mthumb --defsym VER=1" {cmse-implib.s} - {{readelf {-s tmpdir/cmse-implib.lib} cmse-implib.rd} + {{readelf {-s --wide tmpdir/cmse-implib.lib} cmse-implib.rd} {readelf {-h tmpdir/cmse-implib.lib} cmse-implib.type}} "cmse-implib"} {"Input secure gateway import library" @@ -802,7 +802,7 @@ set armeabitests_nonacl { "-march=armv8-m.base -mthumb --defsym VER=2" {cmse-implib.s} {{ld cmse-new-implib.out} - {readelf {-s tmpdir/cmse-new-implib.lib} cmse-new-implib.rd}} + {readelf {-s --wide tmpdir/cmse-new-implib.lib} cmse-new-implib.rd}} "cmse-new-implib"} {"Input secure gateway import library: no output import library" "--section-start .gnu.sgstubs=0x20000 --in-implib=tmpdir/cmse-implib.lib --cmse-implib" "" @@ -832,7 +832,7 @@ set armeabitests_nonacl { "--section-start .gnu.sgstubs=0x20000 --out-implib=tmpdir/cmse-new-comeback-implib.lib --in-implib=tmpdir/cmse-implib.lib --cmse-implib" "" "-march=armv8-m.base -mthumb --defsym VER=3" {cmse-implib.s} - {{readelf {-s tmpdir/cmse-new-comeback-implib.lib} cmse-new-comeback-implib.rd}} + {{readelf {-s --wide tmpdir/cmse-new-comeback-implib.lib} cmse-new-comeback-implib.rd}} "cmse-new-comeback-implib"} {"Input secure gateway import library: entry function change" "--section-start .gnu.sgstubs=0x20000 --out-implib=tmpdir/cmse-new-wrong-implib.lib --in-implib=tmpdir/cmse-implib.lib --cmse-implib" "" diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp index 3d62051..e98429c 100644 --- a/ld/testsuite/ld-mips-elf/mips-elf.exp +++ b/ld/testsuite/ld-mips-elf/mips-elf.exp @@ -29,7 +29,7 @@ if {[istarget "mips*-*-vxworks"]} { {"VxWorks executable test 1 (dynamic)" \ "tmpdir/libvxworks1.so -Tvxworks1.ld -q --force-dynamic" "" "-mips2" {vxworks1.s} - {{readelf --relocs vxworks1.rd} {objdump -dr vxworks1.dd}} + {{readelf {--relocs -T} vxworks1.rd} {objdump -dr vxworks1.dd}} "vxworks1"} {"VxWorks executable test 2 (dynamic)" \ "-Tvxworks1.ld -q --force-dynamic" "" @@ -1575,7 +1575,7 @@ proc run_mips_undefweak_test { name abi args } { [list \ [list objdump -d pr21375${objsuf}.dd] \ [list readelf -A pr21375${rdesuf}.gd] \ - [list readelf --dyn-syms pr21375${rdesuf}${irixsuf}.sd] \ + [list readelf {--dyn-syms --wide} pr21375${rdesuf}${irixsuf}.sd] \ [list readelf -h pr21375${abisuf}.hd]] \ "pr21375${binsuf}${dsosuf}"]] } diff --git a/ld/testsuite/ld-mmix/local1.d b/ld/testsuite/ld-mmix/local1.d index 41a67c2..7519ea1 100644 --- a/ld/testsuite/ld-mmix/local1.d +++ b/ld/testsuite/ld-mmix/local1.d @@ -4,7 +4,7 @@ #source: regext1.s #source: start.s #ld: -m elf64mmix -#readelf: -Ssx1 -x2 +#readelf: -Ssx1 -T -x2 # We check that the externally visible symbol ext1 is a local register # (different meaning of "local" than for symbol), which can be seen as diff --git a/ld/testsuite/ld-mmix/local3.d b/ld/testsuite/ld-mmix/local3.d index 74840d3..e5d5893 100644 --- a/ld/testsuite/ld-mmix/local3.d +++ b/ld/testsuite/ld-mmix/local3.d @@ -4,7 +4,7 @@ #source: ext1.s #source: start.s #ld: -m elf64mmix -#readelf: -Ssx1 -x2 +#readelf: -Ssx1 -T -x2 # Like local1, but ext1 is here a constant, not a global register. diff --git a/ld/testsuite/ld-mmix/local5.d b/ld/testsuite/ld-mmix/local5.d index ae81364..2dccb2e 100644 --- a/ld/testsuite/ld-mmix/local5.d +++ b/ld/testsuite/ld-mmix/local5.d @@ -5,7 +5,7 @@ #source: regext1.s #source: start.s #ld: -m elf64mmix -#readelf: -Ssx1 -x2 +#readelf: -Ssx1 -T -x2 # Like local1, but with two checks for a local register. diff --git a/ld/testsuite/ld-mmix/local7.d b/ld/testsuite/ld-mmix/local7.d index 6d80cc9..5754c34 100644 --- a/ld/testsuite/ld-mmix/local7.d +++ b/ld/testsuite/ld-mmix/local7.d @@ -5,7 +5,7 @@ #source: ext1.s #source: start.s #ld: -m elf64mmix -#readelf: -Ssx1 -x2 +#readelf: -Ssx1 -T -x2 # Like local1, but ext1 is here a constant, not a global register and two # local-register checks. diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp index 1297871..3e458e4 100644 --- a/ld/testsuite/ld-powerpc/powerpc.exp +++ b/ld/testsuite/ld-powerpc/powerpc.exp @@ -32,13 +32,13 @@ if {[istarget "*-*-vxworks"]} { {"VxWorks shared library test 1" "-shared --hash-style=sysv -Tvxworks1.ld" "" "-mregnames" {vxworks1-lib.s} - {{readelf --relocs vxworks1-lib.rd} {objdump -dr vxworks1-lib.dd} + {{readelf {--relocs -T} vxworks1-lib.rd} {objdump -dr vxworks1-lib.dd} {readelf --symbols vxworks1-lib.nd} {readelf -d vxworks1-lib.td}} "libvxworks1.so"} {"VxWorks executable test 1 (dynamic)" \ "tmpdir/libvxworks1.so -Tvxworks1.ld -q --force-dynamic --hash-style=sysv" "" "-mregnames" {vxworks1.s} - {{readelf --relocs vxworks1.rd} {objdump -dr vxworks1.dd}} + {{readelf {--relocs -T} vxworks1.rd} {objdump -dr vxworks1.dd}} "vxworks1"} {"VxWorks executable test 2 (dynamic)" \ "-Tvxworks1.ld -q --force-dynamic --hash-style=sysv" "" @@ -58,7 +58,7 @@ if {[istarget "*-*-vxworks"]} { {"VxWorks relocatable relax test" "-Tvxworks1.ld -r --relax -q --hash-style=sysv" "" "-mregnames" {vxworks-relax-2.s} - {{readelf --relocs vxworks-relax-2.rd}} + {{readelf {--relocs -T} vxworks-relax-2.rd}} "vxworks-relax-2"} } run_ld_link_tests $ppcvxtests |