From: vri vri <zxyvri@gmail.com>
To: binutils@sourceware.org
Subject: Query about compressed_debug_sections for mingw platform
Date: Sun, 24 Dec 2023 17:46:12 +0530 [thread overview]
Message-ID: <CACY6qqm6=nAYt4EnoLF2rW=xMZXMu0bhJ-sgn77aJAszFwWdKA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]
Hello,
I see that the linker ld dosent support compressed_debug_sections but
objcopy supports compressed_debug_sections for mingw platform. Is it
possible to support compressed_debug_sections with the ld linker. Details
about the objcopy and ld binaries are as follows
```
$ /ucrt64/bin/ld --version
GNU ld (GNU Binutils) 2.41
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
$ /ucrt64/bin/ld --help | grep compress
<no_output>
```
```
$ objcopy --version
GNU objcopy (GNU Binutils) 2.41
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.
$ objcopy --help | grep compress
--compress-debug-sections[={none|zlib|zlib-gnu|zlib-gabi|zstd}]
--decompress-debug-sections Decompress DWARF debug sections using zlib
```
I also verifed that I am able to use --compress-debug-sections on a hello
world binary compiled from rust like below
```
$ cargo new hello_world
$ cargo +stable-gnu build
$ ./target/debug/hello_world.exe
Hello, world!
$ objcopy --compress-debug-sections target/debug/hello_world.exe
hello_world_compress
$ ./hello_world_compress
Hello, world!
$ ls -lah ./hello_world_compress target/debug/hello_world.exe
-rwxr-xr-x 1 user user 2.4M Dec 24 16:56 ./hello_world_compress
-rwxr-xr-x 2 user user 5.4M Dec 24 16:54 target/debug/hello_world.exe
```
Thanks for the help in advance.
reply other threads:[~2023-12-24 12:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CACY6qqm6=nAYt4EnoLF2rW=xMZXMu0bhJ-sgn77aJAszFwWdKA@mail.gmail.com' \
--to=zxyvri@gmail.com \
--cc=binutils@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).