From 84b74b498eb690e5a856c23b9abc71f9680b81a6 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 24 Jul 2015 04:14:04 -0700 Subject: [PATCH] Replace -g with -ggdb3 in ld compress tests Use -ggdb3 to generate .debug_macro sections, which are bigger and are always compressed. * ld-elf/compress.exp (build_tests): Replace -g with -ggdb3. * ld-elf/zlibbegin.rS: Also expect "GC". * ld-elf/zlibnormal.rS: Likewise. --- ld/testsuite/ChangeLog | 6 ++++++ ld/testsuite/ld-elf/compress.exp | 20 ++++++++++---------- ld/testsuite/ld-elf/zlibbegin.rS | 2 +- ld/testsuite/ld-elf/zlibnormal.rS | 2 +- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 5d29426e23a..1e5334b1e97 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-07-24 H.J. Lu + + * ld-elf/compress.exp (build_tests): Replace -g with -ggdb3. + * ld-elf/zlibbegin.rS: Also expect "GC". + * ld-elf/zlibnormal.rS: Likewise. + 2015-07-16 Jiong Wang * ld-aarch64/tls-tiny-ld.s: New file. diff --git a/ld/testsuite/ld-elf/compress.exp b/ld/testsuite/ld-elf/compress.exp index 4a3a27841a3..f9caa9c6f72 100644 --- a/ld/testsuite/ld-elf/compress.exp +++ b/ld/testsuite/ld-elf/compress.exp @@ -46,41 +46,41 @@ if { ![ld_assemble $as "--compress-debug-sections=zlib-gabi $srcdir/$subdir/empt set build_tests { {"Build libfoo.so with compressed debug sections" - "-shared" "-fPIC -g -Wa,--compress-debug-sections" + "-shared" "-fPIC -ggdb3 -Wa,--compress-debug-sections" {foo.c} {} "libfoo.so"} {"Build libbar.so with compressed debug sections" "-shared -Wl,--compress-debug-sections=none" - "-fPIC -g -Wa,--compress-debug-sections" + "-fPIC -ggdb3 -Wa,--compress-debug-sections" {begin.c end.c} {} "libbar.so"} {"Build libfoozlib.so with compressed debug sections with zlib-gabi" - "-shared" "-fPIC -g -Wa,--compress-debug-sections=zlib-gabi" + "-shared" "-fPIC -ggdb3 -Wa,--compress-debug-sections=zlib-gabi" {foo.c} {} "libfoozlib.so"} {"Build libbarzlib.so with compressed debug sections with zlib-gabi" - "-shared" "-fPIC -g -Wa,--compress-debug-sections=zlib-gabi" + "-shared" "-fPIC -ggdb3 -Wa,--compress-debug-sections=zlib-gabi" {begin.c end.c} {} "libbarzlib.so"} {"Build libzlibfoo.so with zlib compressed debug sections" "-shared -Wl,--compress-debug-sections=zlib" - "-fPIC -g -Wa,--compress-debug-sections=zlib" + "-fPIC -ggdb3 -Wa,--compress-debug-sections=zlib" {foo.c} {} "libzlibfoo.so"} {"Build libgnufoo.so with zlib-gnu compressed debug sections" "-shared -Wl,--compress-debug-sections=zlib-gnu" - "-fPIC -g -Wa,--compress-debug-sections=zlib-gnu" + "-fPIC -ggdb3 -Wa,--compress-debug-sections=zlib-gnu" {foo.c} {} "libgnufoo.so"} {"Build libgabifoo.so with zlib-gabi compressed debug sections" "-shared -Wl,--compress-debug-sections=zlib-gabi" - "-fPIC -g -Wa,--compress-debug-sections=zlib-gabi" + "-fPIC -ggdb3 -Wa,--compress-debug-sections=zlib-gabi" {foo.c} {} "libgabifoo.so"} {"Build zlibbegin.o with zlib compressed debug sections" "-r -nostdlib -Wl,--compress-debug-sections=zlib" - "-g -Wa,--compress-debug-sections=zlib" + "-ggdb3 -Wa,--compress-debug-sections=zlib" {begin.c} {} "zlibbegin.o"} {"Build gnubegin.o with zlib-gnu compressed debug sections" "-r -nostdlib -Wl,--compress-debug-sections=zlib-gnu" - "-g -Wa,--compress-debug-sections=zlib-gnu" + "-ggdb3 -Wa,--compress-debug-sections=zlib-gnu" {begin.c} {} "gnubegin.o"} {"Build gabiend.o with zlib-gabi compressed debug sections" "-r -nostdlib -Wl,--compress-debug-sections=zlib-gabi" - "-g -Wa,--compress-debug-sections=zlib-gnu" + "-ggdb3 -Wa,--compress-debug-sections=zlib-gnu" {end.c} {} "gabiend.o"} } diff --git a/ld/testsuite/ld-elf/zlibbegin.rS b/ld/testsuite/ld-elf/zlibbegin.rS index 294fdb4416c..dbab80c2ac8 100644 --- a/ld/testsuite/ld-elf/zlibbegin.rS +++ b/ld/testsuite/ld-elf/zlibbegin.rS @@ -1,3 +1,3 @@ #... - +\[[ 0-9]+\] .debug_.* +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ [0-9a-f]+ +C +0 +0 +1 + +\[[ 0-9]+\] .debug_.* +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ [0-9a-f]+ +G?C +0 +0 +1 #pass diff --git a/ld/testsuite/ld-elf/zlibnormal.rS b/ld/testsuite/ld-elf/zlibnormal.rS index 294fdb4416c..dbab80c2ac8 100644 --- a/ld/testsuite/ld-elf/zlibnormal.rS +++ b/ld/testsuite/ld-elf/zlibnormal.rS @@ -1,3 +1,3 @@ #... - +\[[ 0-9]+\] .debug_.* +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ [0-9a-f]+ +C +0 +0 +1 + +\[[ 0-9]+\] .debug_.* +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ [0-9a-f]+ +G?C +0 +0 +1 #pass -- 2.30.2