From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42a.google.com (mail-pf1-x42a.google.com [IPv6:2607:f8b0:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 1F086382CE1F for ; Wed, 7 Dec 2022 02:44:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1F086382CE1F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x42a.google.com with SMTP id c13so9209699pfp.5 for ; Tue, 06 Dec 2022 18:44:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=RsS2a0+8+aXoofeiXR2KBw2fy4jgd3TcOSAuL+MF7a0=; b=PyJSUslMiLDEzXI5FGASfGVKamOfHIJudjAZPG3UhW//ciXNauCOBy5tFlsMv6hUsr Dyj2K1+QyhkdGDNiGo3rtMZZMhg5q9ZosgjQz2OFyYt3nFWU63C2TwU4coPXNocSfjeh 0hz+B07Bffml770YJ2m2cdAIiCtl7wXW0ZeLup64c6HaNlErPx+oCaQDfLkHDeU/4qp1 t6mpEuTOwXuXOEiBku/rTawmquQX21kdUOPfhUs2QWERUSwmzuEAGRGDJ6Z0eoCqOgYs IptRMQTr7ywJWjzTIb+fB+FSRtEwanac/KNodjHRGFQDJC3+skXTZWpikZOfNdHsibJ9 9dMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RsS2a0+8+aXoofeiXR2KBw2fy4jgd3TcOSAuL+MF7a0=; b=vLxvwGe/4XujKPyOtNUyfGwH9vncuq6SRuogNvYf2RThVWEy0+DDebDdhesj/V4gOk nPZ5LVMzoE2eE20UgtCAQ7JjT/SAKKL1+ITX0YLTBSuid+D519MXT8B9AZRogXhDu9Ya u70RPANIiSWux/5z5W+7vznsIzDO0oOvefDKwb2ksxeNrTI2GgjW8IKJYxTyz3KziOn1 8kkyKRKf6R3DmvNWA9GKI0C08nln5JEp9Oz8r0EqAuhlH3xFfj1tX3cgdx3ippTS3EcF LNPEBIq2RW2H5hJHzTk1oWulbIcA1ymPwg1rtT0GXQ7Gb8nuMkbpKwmKQ8kOZeF//NUi 3oHA== X-Gm-Message-State: ANoB5plx0tLHIabz4x8+kpsAwUHWO2DKpGcQv8y3+LKGxhiAz8vw1aBB BNPPyzqjzP1XLU6m56RcMBUOL0hzLKI= X-Google-Smtp-Source: AA0mqf54XekCTn/wW3IMMgk9Mbv1oDpGpVeBWkwEi4myHY7y2XLbBconiv5+gbMca9GM8W6V9+GTFg== X-Received: by 2002:a62:148f:0:b0:560:ee47:81e1 with SMTP id 137-20020a62148f000000b00560ee4781e1mr77102640pfu.63.1670381094679; Tue, 06 Dec 2022 18:44:54 -0800 (PST) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:9206:efcf:9d54:3461]) by smtp.gmail.com with ESMTPSA id jg14-20020a17090326ce00b00186b3c3e2dasm5212030plb.155.2022.12.06.18.44.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 18:44:54 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 771091141DE1; Wed, 7 Dec 2022 13:14:51 +1030 (ACDT) Date: Wed, 7 Dec 2022 13:14:51 +1030 From: Alan Modra To: binutils@sourceware.org Subject: Compression tidy and fixes Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3035.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Tidies: - Move stuff from bfd-in.h and libbfd.c to compress.c libbfd.[ch] is really supposed to be for BFD internal use only. - Delete COMPRESS_DEBUG from enum compressed_debug_section_type - Move compress_debug field out of link_info to ld_config. The idea here is to ignore what the user requested after translating to bfd flags, so there is just one place where the user request gets translated to what is supported. Similarly for gas and objcopy. Fixes: - Correct test in bfd_convert_section_setup to use obfd flags, not ibfd. - Apply bfd_applicable_file_flags to compression bfd flags added by gas and ld to the output bfd. bfd/ * bfd-in.h (enum compressed_debug_section_type), (struct compressed_type_tuple), (bfd_get_compression_algorithm), (bfd_get_compression_algorithm_name), * libbfd.c (compressed_debug_section_names), (bfd_get_compression_algorithm), (bfd_get_compression_algorithm_name): Move.. * compress.c: ..to here, deleting COMPRESS_DEBUG from enum compressed_debug_section_type. (bfd_convert_section_setup): Test obfd flags not ibfd for compression flags. * elf.c (elf_fake_sections): Replace link_info->compress_debug test with abfd->flags test. * bfd-in2.h: Regenerate. binutils/ * objcopy.c (copy_file): Tidy setting of bfd compress flags. Expand comment. gas/ * write.c (compress_debug): Test bfd compress flags rather than flag_compress_debug. (write_object_file): Apply bfd_applicable_file_flags to compress debug flags added to output bfd. include/ * bfdlink.h (struct bfd_link_info): Delete compress_debug. ld/ * ld.h (ld_config_type): Add compress_debug. * emultempl/elf.em: Replace references to link_info.compress_debug with config.compress_debug. * lexsup.c (elf_static_list_options): Likewise. * ldmain.c (main): Likewise. Apply bfd_applicable_file_flags to compress debug flags added to output bfd. diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index 82e33d400f3..dac88acd66d 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -335,25 +335,6 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); -/* Types of compressed DWARF debug sections. */ -enum compressed_debug_section_type -{ - COMPRESS_DEBUG_NONE = 0, - COMPRESS_DEBUG = 1 << 0, - COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, - COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2, - COMPRESS_DEBUG_ZSTD = COMPRESS_DEBUG | 1 << 3, - COMPRESS_UNKNOWN = 1 << 4 -}; - -/* Tuple for compressed_debug_section_type and their name. */ - -struct compressed_type_tuple -{ - enum compressed_debug_section_type type; - const char *name; -}; - /* This structure is used to keep track of stabs in sections information while linking. */ @@ -464,12 +445,6 @@ extern void bfd_free_window (bfd_window *); extern bool bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bool); - - -extern enum compressed_debug_section_type bfd_get_compression_algorithm - (const char *); -extern const char *bfd_get_compression_algorithm_name - (enum compressed_debug_section_type); /* Externally visible ELF routines. */ diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 11f88ae0c90..d407e593a6c 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -342,25 +342,6 @@ extern void bfd_hash_traverse this size. */ extern unsigned long bfd_hash_set_default_size (unsigned long); -/* Types of compressed DWARF debug sections. */ -enum compressed_debug_section_type -{ - COMPRESS_DEBUG_NONE = 0, - COMPRESS_DEBUG = 1 << 0, - COMPRESS_DEBUG_GNU_ZLIB = COMPRESS_DEBUG | 1 << 1, - COMPRESS_DEBUG_GABI_ZLIB = COMPRESS_DEBUG | 1 << 2, - COMPRESS_DEBUG_ZSTD = COMPRESS_DEBUG | 1 << 3, - COMPRESS_UNKNOWN = 1 << 4 -}; - -/* Tuple for compressed_debug_section_type and their name. */ - -struct compressed_type_tuple -{ - enum compressed_debug_section_type type; - const char *name; -}; - /* This structure is used to keep track of stabs in sections information while linking. */ @@ -471,12 +452,6 @@ extern void bfd_free_window (bfd_window *); extern bool bfd_get_file_window (bfd *, file_ptr, bfd_size_type, bfd_window *, bool); - - -extern enum compressed_debug_section_type bfd_get_compression_algorithm - (const char *); -extern const char *bfd_get_compression_algorithm_name - (enum compressed_debug_section_type); /* Externally visible ELF routines. */ @@ -7937,6 +7912,24 @@ bfd_byte *bfd_simple_get_relocated_section_contents (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table); /* Extracted from compress.c. */ +/* Types of compressed DWARF debug sections. */ +enum compressed_debug_section_type +{ + COMPRESS_DEBUG_NONE = 0, + COMPRESS_DEBUG_GNU_ZLIB = 1 << 1, + COMPRESS_DEBUG_GABI_ZLIB = 1 << 2, + COMPRESS_DEBUG_ZSTD = 1 << 3, + COMPRESS_UNKNOWN = 1 << 4 +}; + +/* Tuple for compressed_debug_section_type and their name. */ +struct compressed_type_tuple +{ + enum compressed_debug_section_type type; + const char *name; +}; + +/* Compression header ch_type values. */ enum compression_type { ch_none = 0, @@ -7969,6 +7962,10 @@ bfd_zdebug_name_to_debug (bfd *abfd, const char *name) return new_name; } +enum compressed_debug_section_type +bfd_get_compression_algorithm (const char *name); +const char *bfd_get_compression_algorithm_name + (enum compressed_debug_section_type type); void bfd_update_compression_header (bfd *abfd, bfd_byte *contents, asection *sec); diff --git a/bfd/compress.c b/bfd/compress.c index 5ea7cd95f3a..29434923543 100644 --- a/bfd/compress.c +++ b/bfd/compress.c @@ -27,11 +27,30 @@ #include "elf-bfd.h" #include "libbfd.h" #include "safe-ctype.h" +#include "libiberty.h" #define MAX_COMPRESSION_HEADER_SIZE 24 /* CODE_FRAGMENT +.{* Types of compressed DWARF debug sections. *} +.enum compressed_debug_section_type +.{ +. COMPRESS_DEBUG_NONE = 0, +. COMPRESS_DEBUG_GNU_ZLIB = 1 << 1, +. COMPRESS_DEBUG_GABI_ZLIB = 1 << 2, +. COMPRESS_DEBUG_ZSTD = 1 << 3, +. COMPRESS_UNKNOWN = 1 << 4 +.}; +. +.{* Tuple for compressed_debug_section_type and their name. *} +.struct compressed_type_tuple +.{ +. enum compressed_debug_section_type type; +. const char *name; +.}; +. +.{* Compression header ch_type values. *} .enum compression_type .{ . ch_none = 0, @@ -66,6 +85,54 @@ CODE_FRAGMENT . */ +/* Display texts for type of compressed DWARF debug sections. */ +static const struct compressed_type_tuple compressed_debug_section_names[] = +{ + { COMPRESS_DEBUG_NONE, "none" }, + { COMPRESS_DEBUG_GABI_ZLIB, "zlib" }, + { COMPRESS_DEBUG_GNU_ZLIB, "zlib-gnu" }, + { COMPRESS_DEBUG_GABI_ZLIB, "zlib-gabi" }, + { COMPRESS_DEBUG_ZSTD, "zstd" }, +}; + +/* +FUNCTION + bfd_get_compression_algorithm +SYNOPSIS + enum compressed_debug_section_type + bfd_get_compression_algorithm (const char *name); +DESCRIPTION + Return compressed_debug_section_type from a string representation. +*/ +enum compressed_debug_section_type +bfd_get_compression_algorithm (const char *name) +{ + for (unsigned i = 0; i < ARRAY_SIZE (compressed_debug_section_names); ++i) + if (strcasecmp (compressed_debug_section_names[i].name, name) == 0) + return compressed_debug_section_names[i].type; + + return COMPRESS_UNKNOWN; +} + +/* +FUNCTION + bfd_get_compression_algorithm_name +SYNOPSIS + const char *bfd_get_compression_algorithm_name + (enum compressed_debug_section_type type); +DESCRIPTION + Return compression algorithm name based on the type. +*/ +const char * +bfd_get_compression_algorithm_name (enum compressed_debug_section_type type) +{ + for (unsigned i = 0; i < ARRAY_SIZE (compressed_debug_section_names); ++i) + if (type == compressed_debug_section_names[i].type) + return compressed_debug_section_names[i].name; + + return NULL; +} + /* FUNCTION bfd_update_compression_header @@ -249,7 +316,7 @@ bfd_convert_section_setup (bfd *ibfd, asection *isec, bfd *obfd, { const char *name = *new_name; - if ((ibfd->flags & (BFD_DECOMPRESS | BFD_COMPRESS_GABI)) != 0) + if ((obfd->flags & (BFD_DECOMPRESS | BFD_COMPRESS_GABI)) != 0) { /* When we decompress or compress with SHF_COMPRESSED, convert section name from .zdebug_* to .debug_*. */ diff --git a/bfd/elf.c b/bfd/elf.c index 797ecc436d3..ac10715fa93 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -3169,8 +3169,8 @@ elf_fake_sections (bfd *abfd, asection *asect, void *fsarg) /* ld: compress DWARF debug sections with names: .debug_*. */ if (arg->link_info - && (arg->link_info->compress_debug & COMPRESS_DEBUG) != 0 - && (asect->flags & SEC_DEBUGGING) + && (abfd->flags & BFD_COMPRESS) != 0 + && (asect->flags & SEC_DEBUGGING) != 0 && name[1] == 'd' && name[6] == '_') { diff --git a/bfd/libbfd.c b/bfd/libbfd.c index 3090e0ae64b..d33f3416206 100644 --- a/bfd/libbfd.c +++ b/bfd/libbfd.c @@ -1244,39 +1244,3 @@ _bfd_generic_init_private_section_data (bfd *ibfd ATTRIBUTE_UNUSED, { return true; } - -/* Display texts for type of compressed DWARF debug sections. */ -static const struct compressed_type_tuple compressed_debug_section_names[] = -{ - { COMPRESS_DEBUG_NONE, "none" }, - { COMPRESS_DEBUG_GABI_ZLIB, "zlib" }, - { COMPRESS_DEBUG_GNU_ZLIB, "zlib-gnu" }, - { COMPRESS_DEBUG_GABI_ZLIB, "zlib-gabi" }, - { COMPRESS_DEBUG_ZSTD, "zstd" }, -}; - -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) -#endif - -/* Return compressed_debug_section_type from a string representation. */ -enum compressed_debug_section_type -bfd_get_compression_algorithm (const char *name) -{ - for (unsigned i = 0; i < ARRAY_SIZE (compressed_debug_section_names); ++i) - if (strcasecmp (compressed_debug_section_names[i].name, name) == 0) - return compressed_debug_section_names[i].type; - - return COMPRESS_UNKNOWN; -} - -/* Return compression algorithm name based on the type. */ -const char * -bfd_get_compression_algorithm_name (enum compressed_debug_section_type type) -{ - for (unsigned i = 0; i < ARRAY_SIZE (compressed_debug_section_names); ++i) - if (type == compressed_debug_section_names[i].type) - return compressed_debug_section_names[i].name; - - return NULL; -} diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 19dbb50d3e6..be08f7bd0f9 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -3804,15 +3804,17 @@ copy_file (const char *input_filename, const char *output_filename, int ofd, switch (do_debug_sections) { + case compress_gnu_zlib: + ibfd->flags |= BFD_COMPRESS; + break; case compress: case compress_zlib: - case compress_gnu_zlib: + /* The above two cases ought to just set BFD_COMPRESS for non-ELF + but we can't tell whether a file is ELF or not until after + bfd_check_format_matches. FIXME maybe: decide compression + style in BFD after bfd_check_format_matches. */ case compress_gabi_zlib: - ibfd->flags |= BFD_COMPRESS; - /* Don't check if input is ELF here since this information is - only available after bfd_check_format_matches is called. */ - if (do_debug_sections != compress_gnu_zlib) - ibfd->flags |= BFD_COMPRESS_GABI; + ibfd->flags |= BFD_COMPRESS | BFD_COMPRESS_GABI; break; case compress_zstd: ibfd->flags |= BFD_COMPRESS | BFD_COMPRESS_GABI | BFD_COMPRESS_ZSTD; diff --git a/gas/write.c b/gas/write.c index fa748eb7c79..573e0244459 100644 --- a/gas/write.c +++ b/gas/write.c @@ -1490,7 +1490,7 @@ compress_debug (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED) if (ctx == NULL) return; - if (flag_compress_debug == COMPRESS_DEBUG_GNU_ZLIB) + if ((abfd->flags & BFD_COMPRESS_GABI) == 0) header_size = 12; else header_size = bfd_get_compression_header_size (stdoutput, NULL); @@ -1601,7 +1601,7 @@ compress_debug (bfd *abfd, asection *sec, void *xxx ATTRIBUTE_UNUSED) bfd_update_compression_header (abfd, (bfd_byte *) header, sec); x = bfd_set_section_size (sec, compressed_size); gas_assert (x); - if (flag_compress_debug == COMPRESS_DEBUG_GNU_ZLIB + if ((abfd->flags & BFD_COMPRESS_GABI) == 0 && section_name[1] == 'd') { compressed_name = concat (".z", section_name + 1, (char *) NULL); @@ -2531,15 +2531,16 @@ write_object_file (void) contents of the debug sections. This needs to be done before we start writing any sections, because it will affect the file layout, which is fixed once we start writing contents. */ - if (flag_compress_debug) + if (flag_compress_debug != COMPRESS_DEBUG_NONE) { + flagword flags = BFD_COMPRESS; if (flag_compress_debug == COMPRESS_DEBUG_GABI_ZLIB) - stdoutput->flags |= BFD_COMPRESS | BFD_COMPRESS_GABI; + flags = BFD_COMPRESS | BFD_COMPRESS_GABI; else if (flag_compress_debug == COMPRESS_DEBUG_ZSTD) - stdoutput->flags |= BFD_COMPRESS | BFD_COMPRESS_GABI | BFD_COMPRESS_ZSTD; - else - stdoutput->flags |= BFD_COMPRESS; - bfd_map_over_sections (stdoutput, compress_debug, (char *) 0); + flags = BFD_COMPRESS | BFD_COMPRESS_GABI | BFD_COMPRESS_ZSTD; + stdoutput->flags |= flags & bfd_applicable_file_flags (stdoutput); + if ((stdoutput->flags & BFD_COMPRESS) != 0) + bfd_map_over_sections (stdoutput, compress_debug, (char *) 0); } bfd_map_over_sections (stdoutput, write_contents, (char *) 0); diff --git a/include/bfdlink.h b/include/bfdlink.h index 09a3ec01685..dd704800a6c 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -562,9 +562,6 @@ struct bfd_link_info /* Separator between archive and filename in linker script filespecs. */ char path_separator; - /* Compress DWARF debug sections. */ - enum compressed_debug_section_type compress_debug; - /* Default stack size. Zero means default (often zero itself), -1 means explicitly zero-sized. */ bfd_signed_vma stacksize; diff --git a/ld/emultempl/elf.em b/ld/emultempl/elf.em index 5dfc03a740c..5e96335016d 100644 --- a/ld/emultempl/elf.em +++ b/ld/emultempl/elf.em @@ -660,16 +660,16 @@ gld${EMULATION_NAME}_handle_option (int optc) break; case OPTION_COMPRESS_DEBUG: - link_info.compress_debug = bfd_get_compression_algorithm (optarg); + config.compress_debug = bfd_get_compression_algorithm (optarg); if (strcasecmp (optarg, "zstd") == 0) { #ifndef HAVE_ZSTD - if (link_info.compress_debug == COMPRESS_DEBUG_ZSTD) + if (config.compress_debug == COMPRESS_DEBUG_ZSTD) einfo (_ ("%F%P: --compress-debug-sections=zstd: ld is not built " "with zstd support\n")); #endif } - if (link_info.compress_debug == COMPRESS_UNKNOWN) + if (config.compress_debug == COMPRESS_UNKNOWN) einfo (_("%F%P: invalid --compress-debug-sections option: \`%s'\n"), optarg); break; diff --git a/ld/ld.h b/ld/ld.h index 2a95e14e3b8..3c91eeed33a 100644 --- a/ld/ld.h +++ b/ld/ld.h @@ -304,6 +304,9 @@ typedef struct /* If set, share only duplicated types in CTF, rather than sharing all types that are not in conflict. */ bool ctf_share_duplicated; + + /* Compress DWARF debug sections. */ + enum compressed_debug_section_type compress_debug; } ld_config_type; extern ld_config_type config; diff --git a/ld/ldmain.c b/ld/ldmain.c index 10f7a0538aa..a28f341784f 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -352,7 +352,7 @@ main (int argc, char **argv) link_info.spare_dynamic_tags = 5; link_info.path_separator = ':'; #ifdef DEFAULT_FLAG_COMPRESS_DEBUG - link_info.compress_debug = DEFAULT_COMPRESSED_DEBUG_ALGORITHM; + config.compress_debug = DEFAULT_COMPRESSED_DEBUG_ALGORITHM; #endif #ifdef DEFAULT_NEW_DTAGS link_info.new_dtags = DEFAULT_NEW_DTAGS; @@ -503,16 +503,23 @@ main (int argc, char **argv) else link_info.output_bfd->flags |= EXEC_P; - if ((link_info.compress_debug & COMPRESS_DEBUG)) + flagword flags = 0; + switch (config.compress_debug) { - link_info.output_bfd->flags |= BFD_COMPRESS; - if (link_info.compress_debug != COMPRESS_DEBUG_GNU_ZLIB) - { - link_info.output_bfd->flags |= BFD_COMPRESS_GABI; - if (link_info.compress_debug == COMPRESS_DEBUG_ZSTD) - link_info.output_bfd->flags |= BFD_COMPRESS_ZSTD; - } + case COMPRESS_DEBUG_GNU_ZLIB: + flags = BFD_COMPRESS; + break; + case COMPRESS_DEBUG_GABI_ZLIB: + flags = BFD_COMPRESS | BFD_COMPRESS_GABI; + break; + case COMPRESS_DEBUG_ZSTD: + flags = BFD_COMPRESS | BFD_COMPRESS_GABI | BFD_COMPRESS_ZSTD; + break; + default: + break; } + link_info.output_bfd->flags + |= flags & bfd_applicable_file_flags (link_info.output_bfd); ldwrite (); diff --git a/ld/lexsup.c b/ld/lexsup.c index d107bd7a348..673b62e21c0 100644 --- a/ld/lexsup.c +++ b/ld/lexsup.c @@ -2163,7 +2163,7 @@ elf_static_list_options (FILE *file) Compress DWARF debug sections\n")); fprintf (file, _("\ Default: %s\n"), - bfd_get_compression_algorithm_name (link_info.compress_debug)); + bfd_get_compression_algorithm_name (config.compress_debug)); fprintf (file, _("\ -z common-page-size=SIZE Set common page size to SIZE\n")); fprintf (file, _("\ -- Alan Modra Australia Development Lab, IBM