binutils-gdb/ld/testsuite
Fangrui Song 2cac01e3ff binutils, gdb: support zstd compressed debug sections
PR29397 PR29563: Add new configure option --with-zstd which defaults to
auto.  If pkgconfig/libzstd.pc is found, define HAVE_ZSTD and support
zstd compressed debug sections for most tools.

* bfd: for addr2line, objdump --dwarf, gdb, etc
* gas: support --compress-debug-sections=zstd
* ld: support ELFCOMPRESS_ZSTD input and --compress-debug-sections=zstd
* objcopy: support ELFCOMPRESS_ZSTD input for
  --decompress-debug-sections and --compress-debug-sections=zstd
* gdb: support ELFCOMPRESS_ZSTD input.  The bfd change references zstd
  symbols, so gdb has to link against -lzstd in this patch.

If zstd is not supported, ELFCOMPRESS_ZSTD input triggers an error.  We
can avoid HAVE_ZSTD if binutils-gdb imports zstd/ like zlib/, but this
is too heavyweight, so don't do it for now.

```
% ld/ld-new a.o
ld/ld-new: a.o: section .debug_abbrev is compressed with zstd, but BFD is not built with zstd support
...

% ld/ld-new a.o --compress-debug-sections=zstd
ld/ld-new: --compress-debug-sections=zstd: ld is not built with zstd support

% binutils/objcopy --compress-debug-sections=zstd a.o b.o
binutils/objcopy: --compress-debug-sections=zstd: binutils is not built with zstd support

% binutils/objcopy b.o --decompress-debug-sections
binutils/objcopy: zstd.o: section .debug_abbrev is compressed with zstd, but BFD is not built with zstd support
...
```
2022-09-26 19:50:13 -07:00
..
config ld/testsuite: allow to force another directory for gcc linker 2022-09-22 09:23:18 +02:00
ld-aarch64 ld: aarch64: Adjust TLS relaxation condition 2022-08-02 12:10:01 +01:00
ld-alpha Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-arc Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-arm readelf: print 0x0 as 0, and remove trailing spaces 2022-08-13 14:11:27 +09:30
ld-auto-import Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-avr Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-bootstrap binutils, gdb: support zstd compressed debug sections 2022-09-26 19:50:13 -07:00
ld-bpf Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-cdtest Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-checks Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-cris Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-crx Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-csky Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-ctf Modify ld-ctf test files to suit ARM 2022-09-14 10:19:57 +09:30
ld-cygwin Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-d10v Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-discard Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-dynamic Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-elf binutils, gdb: support zstd compressed debug sections 2022-09-26 19:50:13 -07:00
ld-elfcomm Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-elfvers Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-elfweak Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-fastcall Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-frv Add linker warning for when it creates an executable stack. 2022-04-20 13:39:05 +01:00
ld-gc Add linker warning for when it creates an executable stack. 2022-04-20 13:39:05 +01:00
ld-h8300 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-i386 i386: Don't allow GOTOFF relocation against IFUNC symbol for PIC 2022-07-21 11:40:27 -07:00
ld-ia64 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-ifunc i386: Don't allow GOTOFF relocation against IFUNC symbol for PIC 2022-07-21 11:40:27 -07:00
ld-libs Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-linkonce Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-loongarch-elf LoongArch: Fix R_LARCH_IRELATIVE insertion after elf_link_sort_relocs 2022-09-20 17:16:06 +08:00
ld-m68hc11 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-m68k Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-mep Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-metag Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-mips-elf BFD_RELOC_MIPS_16 2022-06-14 10:03:55 +09:30
ld-misc Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-mmix Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-mn10300 Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-msp430-elf Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-nds32 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-nios2 Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-or1k Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-pdp11 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-pe Re: Missing linking test case for pe dll using a def file 2022-08-21 07:53:12 +09:30
ld-pie Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-plugin LTO: Handle __real_SYM reference in IR 2022-05-04 16:26:51 -07:00
ld-powerpc PowerPC32 ld test fails with --enable-targets=all 2022-07-26 22:14:20 +09:30
ld-pru Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-riscv-elf RISC-V: Always generate R_RISCV_CALL_PLT reloc for call in assembler. 2022-09-21 09:45:58 +08:00
ld-s12z Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-s390 Revert "elf: Remove the 1-page gap before the RELRO segment" 2022-02-07 13:42:41 +10:30
ld-scripts ld testsuite xcoff XPASS 2022-04-21 15:30:50 +09:30
ld-selective Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-sh PR10372, SH: ld test with sim/sh/run fails always 2022-08-25 13:33:39 +09:30
ld-shared Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-size Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-sparc Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-spu Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-srec Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-tic6x Trailing spaces in objdump -r header 2022-05-31 11:25:09 +09:30
ld-tilegx Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-tilepro Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-undefined Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-unique Add linker warning for when it creates an executable stack. 2022-04-20 13:39:05 +01:00
ld-v850 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-vax-elf Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-visium Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-vsb ld: add hidden and internal visibility support for XCOFF 2022-01-12 09:08:25 +01:00
ld-vxworks Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-x86-64 BFD library: Use entry 0 in directory and filename tables of DWARF-5 debug info. 2022-08-30 16:01:20 +01:00
ld-xstormy16 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-xtensa xtensa: bfd: fix TLS relocations generated for PIE 2022-09-02 09:54:49 -07:00
ld-z8k Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
ld-z80 Update year range in copyright notice of binutils files 2022-01-02 12:04:28 +10:30
lib ld, testsuite: improve CTF-availability test 2022-03-23 13:38:16 +00:00
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-9303