From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id 177AB3858C78 for ; Tue, 1 Mar 2022 20:18:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 177AB3858C78 Received: by mail-lj1-x231.google.com with SMTP id e8so23436252ljj.2 for ; Tue, 01 Mar 2022 12:18:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=+4NYQvUsCjltl380bF+9ddr5njlEIVE5Ik2fJB56qww=; b=7iZY9gTT7Y+d0FcE7pnNEj2cuvMxTLDpaPvUSD4ZKad0niFFP215or5jacrQEyuLkT NmqCRAYxo9QTKHGHleDTdgvgchDPDDTYZNVoEq1rXWuN4mzNZc8UFX5ohQ0vHtWJGl++ bBsIzbld9ctqJ1obbMxrav5GZB7mei4V1Rt4UYBA1uN9P3/hzuCIuOUXuOQOPot8KPzr FYF6vdi79WeqCf4bCL/pL0y10ypvlZvMoo1OZvbXdIrC+fJG44EU6qimaJ++tzu2U7iI vNF6GtnhM34UMvTFzC3UGzpBe3v4EQPzUpoEGxSc+fLZ89PQlQRhmCbuj9FiDdfZ6F4E HtFg== X-Gm-Message-State: AOAM530niDenH01lG3MjLhMW48e0yUqOWwPi9L/mOf1i7Q+AZyCDJcyh s/hF1Gkn/GCx6qsYvFV2kWUu83Wd3NwrnNqhTZLC5xCbf/I= X-Google-Smtp-Source: ABdhPJwW95tVpNzmtuXpszkYi31jnNCxuIaBMzWVCePS40/SXeKd7bVDVei5vzankZ0v9GQ1wSN1XonMjJqhfsZmk9M= X-Received: by 2002:a2e:8955:0:b0:246:133b:673c with SMTP id b21-20020a2e8955000000b00246133b673cmr17989104ljk.380.1646165888476; Tue, 01 Mar 2022 12:18:08 -0800 (PST) MIME-Version: 1.0 From: Hans L Date: Tue, 1 Mar 2022 14:17:32 -0600 Message-ID: Subject: Possible to compress debug symbols in a PE exe? (ld final link failed: bad value) To: binutils@sourceware.org X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Mar 2022 20:18:12 -0000 I am cross compiling an application from Linux to Windows, where the build uses MXE ( https://mxe.cc/ ) to bootstrap the GCC / Mingw-w64 based cross-toolchain, as well as build various library dependencies which get statically linked with the final executable. The application builds successfully under normal conditions, but debug builds are much larger than I would like them to be. (About 1GB in size, as opposed to 44MB without debug) So I wanted to see if compression could help get the filesize down to something more reasonable by adding gcc flag "-gz" in my CMakeLists.txt This results in the build failing on the final step with the message: /mxe/usr/bin/x86_64-w64-mingw32.static.posix-ld: final link failed: bad value What is the meaning of this supremely unhelpful error message? Is there something about PE format that is not capable of supporting compressed DWARF symbols? Have I run into a possible bug in ld? Or something else entirely is going on? (random guess: must the statically linked libraries themselves be built with the same "-gz" flag ?) Thanks for any help, Hans Loeblich