From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by sourceware.org (Postfix) with ESMTPS id 87A57382CE2D for ; Wed, 7 Dec 2022 03:28:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 87A57382CE2D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=maskray.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pg1-f169.google.com with SMTP id 136so15140239pga.1 for ; Tue, 06 Dec 2022 19:28:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=WJyRJ7pMAddZWwE70B21q8tHws6FlZXDyvleGZ8SWps=; b=vVMkHrIao4SZzo4iINSJRtUhFe7je+Tfl8r6ulHlwgMyolsruqAclcr/CDJmasiZLd sluEV2hybTR7FsouIomVxNVzMaBCWDVabVjdfrUDAtXHaHf5VrPQq9JoxQsXpJmyIPB8 XlxPS5cxUBkSdFxZN1rd9FhhHopAWu5P2C5PjbZx4VoRX1cqueGbzuvg9HO8B+XWI0qb w3JoCeLil7pmdtrScCkxx/VaQlx8NUxIkTtLTsygkmeggYUkmwgU/lyN7UAlyMSfOand qbs1m3LfIImA2JjX4pyVAe5BcDCHdZf7MyRc9mbYYEs06EZTgznG/ElEHqyaXtcoLrXQ I4vQ== X-Gm-Message-State: ANoB5pn3kDyY7LGWoHpCe7Cp7wNNGP07cpKE/vob0yWtxSPcjWk3DRtv oaWYnME/zaNwsq4+xNk7pE4= X-Google-Smtp-Source: AA0mqf4TqcaQZ0UHM8s+7VDvoup6Wd7rjanFQbGBDpBG9FRXEluy1SxlYiiT+2myk/vX42KU5OB+vw== X-Received: by 2002:a63:e509:0:b0:474:4380:cca6 with SMTP id r9-20020a63e509000000b004744380cca6mr62452002pgh.229.1670383706498; Tue, 06 Dec 2022 19:28:26 -0800 (PST) Received: from localhost ([2601:647:6300:b760:989c:684f:a727:de50]) by smtp.gmail.com with ESMTPSA id n6-20020a170902d2c600b00186e2123506sm13320476plc.300.2022.12.06.19.28.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Dec 2022 19:28:26 -0800 (PST) Date: Tue, 6 Dec 2022 19:28:25 -0800 From: Fangrui Song To: Alan Modra Cc: binutils@sourceware.org Subject: Re: Compression tidy and fixes Message-ID: <20221207032825.ooufkrniqye3uegq@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_INFOUSMEBIZ,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2022-12-07, Alan Modra via Binutils wrote: >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. > If .zdebug renaming turns out to be tricky, consider making zlib-gnu output no-op. zlib-gnu is pretty obsoleted now and in the latest GCC, -gz=zlib-gnu is a no-op. (iirc) gas --compress-debug-sections=zlib-gnu doesn't compress a .debug_* if the compressed output would be larger than the uncompressed one.