if (data == NULL)
return NULL;
+ /* Decompress sections unless dumping the section contents. */
+ if (!dump_section_contents || decompressed_dumps)
+ data->flags |= BFD_DECOMPRESS;
+
if (! bfd_check_format (data, bfd_object))
return NULL;
file_on_host delete $output
}
-proc test_build_id_debuglink {} {
+proc test_build_id_debuglink {option} {
global srcdir
global subdir
global env
global CFLAGS_FOR_TARGET
global exe
- set test "build-id-debuglink"
+ set test "build-id-debuglink ($option)"
# Use a fixed build-id.
if { [info exists CFLAGS_FOR_TARGET] } {
set save_CFLAGS_FOR_TARGET $CFLAGS_FOR_TARGET
}
- set CFLAGS_FOR_TARGET "-g -Wl,--build-id=0x12345678abcdef01"
+ set CFLAGS_FOR_TARGET "-g -Wl,--build-id=0x12345678abcdef01,--compress-debug-sections=$option"
if { [target_compile $srcdir/$subdir/testprog.c tmpdir/testprog${exe} executable debug] != "" } {
unsupported "$test (build)"
}
if {[is_elf_format]} then {
- test_build_id_debuglink
+ test_build_id_debuglink none
+ test_build_id_debuglink zlib
}
# Test objdump -Wk on a file containing debug links.