diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/compress.exp | 26 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/compressed1a.d | 10 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/compressed1b.d | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/compressed1c.d | 10 |
5 files changed, 64 insertions, 2 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index ef54e67..cfa22f4 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2015-04-08 H.J. Lu <hongjiu.lu@intel.com> + + * ld-elf/compress.exp: Add a test for + --compress-debug-sections=zlib-gabi. + (build_tests): Add 2 tests for --compress-debug-sections=zlib-gabi. + (run_tests): Likewise. + Verify linker output with zlib-gabi compressed debug input. + * ld-elf/compressed1a.d: New file. + * ld-elf/compressed1b.d: Likewise. + * ld-elf/compressed1c.d: Likewise. + 2015-04-07 Alan Modra <amodra@gmail.com> * ld-arm/tls-gdesc-nlazy.g: Adjust for readelf note. diff --git a/ld/testsuite/ld-elf/compress.exp b/ld/testsuite/ld-elf/compress.exp index 682811a..adb7fc2 100644 --- a/ld/testsuite/ld-elf/compress.exp +++ b/ld/testsuite/ld-elf/compress.exp @@ -40,6 +40,10 @@ if { ![ld_assemble $as "--compress-debug-sections $srcdir/$subdir/empty.s" tmpdi fail "linker compressed debug sections" } +if { ![ld_assemble $as "--compress-debug-sections=zlib-gabi $srcdir/$subdir/empty.s" tmpdir/emptyzlib.o ] } { + fail "linker compressed debug sections" +} + set build_tests { {"Build libfoo.so with compressed debug sections" "-shared" "-fPIC -g -Wa,--compress-debug-sections" @@ -47,13 +51,31 @@ set build_tests { {"Build libbar.so with compressed debug sections" "-shared" "-fPIC -g -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" + {foo.c} {} "libfoozlib.so"} + {"Build libbarzlib.so with compressed debug sections with zlib-gabi" + "-shared" "-fPIC -g -Wa,--compress-debug-sections=zlib-gabi" + {begin.c end.c} {} "libbarzlib.so"} } set run_tests { {"Run normal with libfoo.so with compressed debug sections" - "tmpdir/begin.o tmpdir/libfoo.so tmpdir/end.o" "-Wa,--compress-debug-sections" - {main.c} "normal" "normal.out"} + "tmpdir/begin.o tmpdir/libfoo.so tmpdir/end.o" "" + {main.c} "normal" "normal.out" "-Wa,--compress-debug-sections"} + {"Run normal with libfoo.so with compressed debug sections with zlib-gabi" + "tmpdir/begin.o tmpdir/libfoozlib.so tmpdir/end.o" "" + {main.c} "normal" "normal.out" "-Wa,--compress-debug-sections=zlib-gabi"} } run_cc_link_tests $build_tests run_ld_link_exec_tests [] $run_tests + +set test_name "Link with zlib-gabi compressed debug input" +send_log "cmp tmpdir/libfoo.so tmpdir/libfoozlib.so\n" +if { [catch {exec cmp tmpdir/libfoo.so tmpdir/libfoozlib.so}] } then { + send_log "tmpdir/libfoo.so tmpdir/libfoozlib.so differ.\n" + fail "$test_name" +} else { + pass "$test_name" +} diff --git a/ld/testsuite/ld-elf/compressed1a.d b/ld/testsuite/ld-elf/compressed1a.d new file mode 100644 index 0000000..653c203 --- /dev/null +++ b/ld/testsuite/ld-elf/compressed1a.d @@ -0,0 +1,10 @@ +#source: compress1.s +#as: --compress-debug-sections=zlib-gabi +#ld: -e func_cu2 +#readelf: -t +#notarget: alpha-* + +#failif +#... + .*COMPRESSED.* +#... diff --git a/ld/testsuite/ld-elf/compressed1b.d b/ld/testsuite/ld-elf/compressed1b.d new file mode 100644 index 0000000..83dc60f --- /dev/null +++ b/ld/testsuite/ld-elf/compressed1b.d @@ -0,0 +1,9 @@ +#source: compress1.s +#as: --compress-debug-sections=zlib-gabi +#ld: -r +#readelf: -t + +#failif +#... + .*COMPRESSED.* +#... diff --git a/ld/testsuite/ld-elf/compressed1c.d b/ld/testsuite/ld-elf/compressed1c.d new file mode 100644 index 0000000..64f75be --- /dev/null +++ b/ld/testsuite/ld-elf/compressed1c.d @@ -0,0 +1,10 @@ +#source: compress1.s +#as: --compress-debug-sections=zlib-gabi +#ld: -shared +#readelf: -t +#target: *-*-linux* *-*-gnu* + +#failif +#... + .*COMPRESSED.* +#... |