* Query about compressed_debug_sections for mingw platform
@ 2023-12-24 12:16 vri vri
0 siblings, 0 replies; only message in thread
From: vri vri @ 2023-12-24 12:16 UTC (permalink / raw)
To: binutils
[-- 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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-24 12:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-24 12:16 Query about compressed_debug_sections for mingw platform vri vri
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).