aboutsummaryrefslogtreecommitdiff
path: root/libbacktrace
AgeCommit message (Collapse)AuthorFilesLines
2024-01-05Update copyright years.Jakub Jelinek1-1/+1
2024-01-03Update copyright years.Jakub Jelinek41-41/+41
2024-01-03Update Copyright year in ChangeLog filesJakub Jelinek1-1/+1
2023 -> 2024
2023-12-01Daily bump.GCC Administrator1-0/+5
2023-11-30libbacktrace: support ASLR on WindowsIan Lance Taylor1-1/+23
Patch from Björn Schäpers. * pecoff.c: Include <windows.h> if available. (coff_add): On Windows call GetModuleHandle to get base address.
2023-11-30Daily bump.GCC Administrator1-0/+9
2023-11-29libbacktrace: call GetModuleFileNameA on WindowsIan Lance Taylor4-2/+66
Patch from Björn Schäpers. * fileline.c: Include <windows.h> if available. (windows_get_executable_path): New static function. (fileline_initialize): Call windows_get_executable_path. * configure.ac: Checked for windows.h * configure: Regenerate. * config.h.in: Regenerate.
2023-10-23Daily bump.GCC Administrator1-0/+5
2023-10-22Config,Darwin: Allow for configuring Darwin to use embedded runpath.Iain Sandoe2-5/+73
Recent Darwin versions place contraints on the use of run paths specified in environment variables. This breaks some assumptions in the GCC build. This change allows the user to configure a Darwin build to use '@rpath/libraryname.dylib' in library names and then to add an embedded runpath to executables (and libraries with dependents). The embedded runpath is added by default unless the user adds '-nodefaultrpaths' to the link line. For an installed compiler, it means that any executable built with that compiler will reference the runtimes installed with the compiler (equivalent to hard-coding the library path into the name of the library). During build-time configurations any "-B" entries will be added to the runpath thus the newly-built libraries will be found by exes. Since the install name is set in libtool, that decision needs to be available here (but might also cause dependent ones in Makefiles, so we need to export a conditional). This facility is not available for Darwin 8 or earlier, however the existing environment variable runpath does work there. We default this on for systems where the external DYLD_LIBRARY_PATH does not work and off for Darwin 8 or earlier. For systems that can use either method, if the value is unset, we use the default (which is currently DYLD_LIBRARY_PATH). ChangeLog: * configure: Regenerate. * configure.ac: Do not add default runpaths to GCC exes when we are building -static-libstdc++/-static-libgcc (the default). * libtool.m4: Add 'enable-darwin-at-runpath'. Act on the enable flag to alter Darwin libraries to use @rpath names. gcc/ChangeLog: * aclocal.m4: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * config/darwin.h: Handle Darwin rpaths. * config/darwin.opt: Handle Darwin rpaths. * Makefile.in: Handle Darwin rpaths. gcc/ada/ChangeLog: * gcc-interface/Makefile.in: Handle Darwin rpaths. gcc/jit/ChangeLog: * Make-lang.in: Handle Darwin rpaths. libatomic/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libbacktrace/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. libgcc/ChangeLog: * config/t-slibgcc-darwin: Generate libgcc_s with an @rpath name. * config.host: Handle Darwin rpaths. libgfortran/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths libgm2/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * libm2cor/Makefile.am: Handle Darwin rpaths. * libm2cor/Makefile.in: Regenerate. * libm2iso/Makefile.am: Handle Darwin rpaths. * libm2iso/Makefile.in: Regenerate. * libm2log/Makefile.am: Handle Darwin rpaths. * libm2log/Makefile.in: Regenerate. * libm2min/Makefile.am: Handle Darwin rpaths. * libm2min/Makefile.in: Regenerate. * libm2pim/Makefile.am: Handle Darwin rpaths. * libm2pim/Makefile.in: Regenerate. libgomp/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths libitm/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libobjc/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libphobos/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * libdruntime/Makefile.am: Handle Darwin rpaths. * libdruntime/Makefile.in: Regenerate. * src/Makefile.am: Handle Darwin rpaths. * src/Makefile.in: Regenerate. libquadmath/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libsanitizer/ChangeLog: * asan/Makefile.am: Handle Darwin rpaths. * asan/Makefile.in: Regenerate. * configure: Regenerate. * hwasan/Makefile.am: Handle Darwin rpaths. * hwasan/Makefile.in: Regenerate. * lsan/Makefile.am: Handle Darwin rpaths. * lsan/Makefile.in: Regenerate. * tsan/Makefile.am: Handle Darwin rpaths. * tsan/Makefile.in: Regenerate. * ubsan/Makefile.am: Handle Darwin rpaths. * ubsan/Makefile.in: Regenerate. libssp/ChangeLog: * Makefile.am: Handle Darwin rpaths. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac: Handle Darwin rpaths. libstdc++-v3/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. * src/Makefile.am: Handle Darwin rpaths. * src/Makefile.in: Regenerate. libvtv/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. lto-plugin/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths. zlib/ChangeLog: * configure: Regenerate. * configure.ac: Handle Darwin rpaths.
2023-08-08Daily bump.GCC Administrator1-0/+24
2023-08-07libtool.m4: augment symcode for Solaris 11Nick Alcock1-1/+1
This reports common symbols like GNU nm, via a type code of 'C'. ChangeLog: * libtool.m4 (lt_cv_sys_global_symbol_pipe): Augment symcode for Solaris 11. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate.
2023-08-07Add support for the haiku operating systemAlexander von Gluck IV1-1/+1
These are the os support patches we have been grooming and maintaining for quite a few years over on git.haiku-os.org. All of these architectures are working and most have been stable for quite some time. ChangeLog: * configure: Regenerate. * configure.ac: Add Haiku to list of ELF OSes * libtool.m4: Update sys_lib_dlsearch_path_spec on Haiku. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate.
2023-08-07libtool.m4: fix the NM="/nm/over/here -B/option/with/path" caseNick Alcock1-7/+13
My previous nm patch handled all cases but one -- if the user set NM in the environment to a path which contained an option, libtool's nm detection tries to run nm against a copy of nm with the options in it: e.g. if NM was set to "nm --blargle", and nm was found in /usr/bin, the test would try to run "/usr/bin/nm --blargle /usr/bin/nm --blargle". This is unlikely to be desirable: in this case we should run "/usr/bin/nm --blargle /usr/bin/nm". Furthermore, as part of this nm has to detect when the passed-in $NM contains a path, and in that case avoid doing a path search itself. This too was thrown off if an option contained something that looked like a path, e.g. NM="nm -B../prev-gcc"; libtool then tries to run "nm -B../prev-gcc nm" which rarely works well (and indeed it looks to see whether that nm exists, finds it doesn't, and wrongly concludes that nm -p or whatever does not work). Fix all of these by clipping all options (defined as everything including and after the first " -") before deciding whether nm contains a path (but not using the clipped value for anything else), and then removing all options from the path-modified nm before looking to see whether that nm existed. NM=my-nm now does a path search and runs e.g. /usr/bin/my-nm -B /usr/bin/my-nm NM=/usr/bin/my-nm now avoids a path search and runs e.g. /usr/bin/my-nm -B /usr/bin/my-nm NM="my-nm -p../wombat" now does a path search and runs e.g. /usr/bin/my-nm -p../wombat -B /usr/bin/my-nm NM="../prev-binutils/new-nm -B../prev-gcc" now avoids a path search: ../prev-binutils/my-nm -B../prev-gcc -B ../prev-binutils/my-nm This seems to be all combinations, including those used by GCC bootstrap (which, before this commit, fails to bootstrap when configured --with-build-config=bootstrap-lto, because the lto plugin is now using --export-symbols-regex, which requires libtool to find a working nm, while also using -B../prev-gcc to point at the lto plugin associated with the GCC just built.) Regenerate all affected configure scripts. ChangeLog: * libtool.m4 (LT_PATH_NM): Handle user-specified NM with options, including options containing paths. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate.
2023-08-07libtool.m4: fix nm BSD flag detectionNick Alcock1-44/+45
Libtool needs to get BSD-format (or MS-format) output out of the system nm, so that it can scan generated object files for symbol names for -export-symbols-regex support. Some nms need specific flags to turn on BSD-formatted output, so libtool checks for this in its AC_PATH_NM. Unfortunately the code to do this has a pair of interlocking flaws: - it runs the test by doing an nm of /dev/null. Some platforms reasonably refuse to do an nm on a device file, but before now this has only been worked around by assuming that the error message has a specific textual form emitted by Tru64 nm, and that getting this error means this is Tru64 nm and that nm -B would work to produce BSD-format output, even though the test never actually got anything but an error message out of nm -B. This is fixable by nm'ing *nm itself* (since we necessarily have a path to it). - the test is entirely skipped if NM is set in the environment, on the grounds that the user has overridden the test: but the user cannot reasonably be expected to know that libtool wants not only nm but also flags forcing BSD-format output. Worse yet, one such "user" is the top-level Cygnus configure script, which neither tests for nor specifies any BSD-format flags. So platforms needing BSD-format flags always fail to set them when run in a Cygnus tree, breaking -export-symbols-regex on such platforms. Libtool also needs to augment $LD on some platforms, but this is done unconditionally, augmenting whatever the user specified: the nm check should do the same. One wrinkle: if the user has overridden $NM, a path might have been provided: so we use the user-specified path if there was one, and otherwise do the path search as usual. (If the nm specified doesn't work, this might lead to a few extra pointless path searches -- but the test is going to fail anyway, so that's not a problem.) (Tested with NM unset, and set to nm, /usr/bin/nm, my-nm where my-nm is a symlink to /usr/bin/nm on the PATH, and /not-on-the-path/my-nm where *that* is a symlink to /usr/bin/nm.) ChangeLog: * libtool.m4 (LT_PATH_NM): Try BSDization flags with a user-provided NM, if there is one. Run nm on itself, not on /dev/null, to avoid errors from nms that refuse to work on non-regular files. Remove other workarounds for this problem. Strip out blank lines from the nm output. fixincludes/ChangeLog: * configure: Regenerate. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate.
2023-08-07GCC: Check if AR works with --plugin and rcH.J. Lu1-3/+11
AR from older binutils doesn't work with --plugin and rc: [hjl@gnu-cfl-2 bin]$ touch foo.c [hjl@gnu-cfl-2 bin]$ ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c [hjl@gnu-cfl-2 bin]$ ./ar --plugin /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so rc libfoo.a foo.c ./ar: no operation specified [hjl@gnu-cfl-2 bin]$ ./ar --version GNU ar (Linux/GNU Binutils) 2.29.51.0.1.20180112 Copyright (C) 2018 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. [hjl@gnu-cfl-2 bin]$ Check if AR works with --plugin and rc before passing --plugin to AR and RANLIB. ChangeLog: * configure: Regenerated. * libtool.m4 (_LT_CMD_OLD_ARCHIVE): Check if AR works with --plugin and rc before enabling --plugin. config/ChangeLog: * gcc-plugin.m4 (GCC_PLUGIN_OPTION): Check if AR works with --plugin and rc before enabling --plugin. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libiberty/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate.
2023-08-07Sync with binutils: GCC: Pass --plugin to AR and RANLIBH.J. Lu1-2/+25
Sync with binutils for building binutils with LTO: 50ad1254d50 GCC: Pass --plugin to AR and RANLIB Detect GCC LTO plugin. Pass --plugin to AR and RANLIB to support LTO build. ChangeLog: * Makefile.tpl (AR): Add @AR_PLUGIN_OPTION@ (RANLIB): Add @RANLIB_PLUGIN_OPTION@. * configure.ac: Include config/gcc-plugin.m4. AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION. * libtool.m4 (_LT_CMD_OLD_ARCHIVE): Pass --plugin to AR and RANLIB if possible. * Makefile.in: Regenerated. * configure: Likewise. config/ChangeLog: * gcc-plugin.m4 (GCC_PLUGIN_OPTION): New. libiberty/ChangeLog: * Makefile.in (AR): Add @AR_PLUGIN_OPTION@ (RANLIB): Add @RANLIB_PLUGIN_OPTION@. (configure_deps): Depend on ../config/gcc-plugin.m4. * configure.ac: AC_SUBST AR_PLUGIN_OPTION and RANLIB_PLUGIN_OPTION. * aclocal.m4: Regenerated. * configure: Likewise. zlib/ChangeLog: * configure: Regenerated. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgm2/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate.
2023-08-04Daily bump.GCC Administrator1-0/+5
2023-08-03[libbacktrace] fix up broken testRichard Biener1-5/+5
zstdtest has some inline data where some testcases lack the uncompressed length field. Thus it computes that but still ends up allocating memory for the uncompressed buffer based on that (zero) length. Oops. Causes memory corruption if the allocator returns non-NULL. libbacktrace/ * zstdtest.c (test_samples): Properly compute the allocation size for the uncompressed data.
2023-08-01Daily bump.GCC Administrator1-0/+7
2023-07-31libbacktrace: look for _pgmptr on WindowsIan Lance Taylor4-6/+41
Patch from Andres Freund: * configure.ac: Check for _pgmptr declaration. * fileline.c (fileline_initialize): Check for _pgmfptr before /proc/self/exec. * configure, config.h.in: Regenerate.
2023-03-29Daily bump.GCC Administrator1-0/+9
2023-03-28libbacktrace: minor fixes for zstd decompressionIan Lance Taylor1-20/+20
* elf.c (elf_zstd_read_fse): Call elf_fetch_bits after reading bits, not before. Add unlikely for error case. (elf_zstd_offset_table): Regenerate. (elf_zstd_read_huff): Clear 13 entries in weight_mark, not 12. (elf_zstd_read_literals): For a single stream adjust by total_streams_size, not compressed_size.
2023-01-21Daily bump.GCC Administrator1-0/+26
2023-01-20libbacktrace: change PC variables from uint64_t to uintptr_tIan Lance Taylor1-44/+44
Change variables holding PC values from uint64_t to uintptr_t. Patch by Björn Schäpers. * dwarf.c (struct function_addrs): Change low and high fields to uintptr_t. (struct unit_addrs): Likewise. (resolve_addr_index): Change address parameter to uintptr_t*. (add_unit_addr): Change lowpc and highpc parameters to uintptr_t. (add_function_range): Likewise. (struct pcrange): Change lowpc and highpc fields to uintptr_t. (add_low_high_range): Change add_range lowpc and highpc parameters to uintptr_t. (add_ranges_from_ranges): Likewise. (add_ranges_from_rnglists): Likewise. (add_low_high_range): Chnage lowpc and highpc variables to uintpr_t. (add_ranges_from_rnglists): Change some local variables to uintptr_t. (add_ranges_from_ranges): Change base parameter to uintptr_t. (add_ranges_from_rnglists): Likewise. (read_function_entry): Likewise. (resolve_addr_index): Add explicit casts to uintptr_t. (update_pcrange): Likewise. (add_ranges_from_ranges): Likewise. (add_ranges_from_rnglists): Likewise. (read_function_entry): Likewise.
2023-01-18Daily bump.GCC Administrator1-0/+4
2023-01-17Regenerate Makefile.in files.Martin Liska1-1/+1
libbacktrace/ChangeLog: * Makefile.in: Regenerate. libgomp/ChangeLog: * Makefile.in: Regenerate. * configure: Regenerate. libphobos/ChangeLog: * Makefile.in: Regenerate. * libdruntime/Makefile.in: Regenerate. libstdc++-v3/ChangeLog: * src/libbacktrace/Makefile.in: Regenerate.
2023-01-16Update copyright years.Jakub Jelinek41-41/+41
2023-01-07Daily bump.GCC Administrator1-0/+7
2023-01-06libbacktrace: don't run --build-id tests if it is not supportedIan Lance Taylor4-21/+78
PR libbacktrace/108297 * configure.ac: Test whether linker supports --build-id. * Makefile.am: Only run --build-id tests if supported. * configure, Makefile.in: Regenerate.
2023-01-02Update Copyright year in ChangeLog filesJakub Jelinek1-1/+1
2022 -> 2023
2022-12-18Daily bump.GCC Administrator1-0/+14
2022-12-16libbacktrace: unpack literals into output bufferIan Lance Taylor1-636/+667
* elf.c (elf_fetch_backward_init): New static function. (ZSTD_TABLE_SIZE): Use huffman scratch space size rather than literal size. (ZSTD_TABLE_WORK_LIT_SIZE): Don't define. (elf_zstd_read_huff): Use elf_fetch_backward_init. (elf_zstd_read_literals): New static function. (ZSTD_LIT_RAW, ZSTD_LIT_RLE, ZSTD_LIT_HUFF): Don't define. (struct elf_zstd_literals): Don't define. (elf_zstd_literal_output): Remove static function. (elf_zstd_decompress): Use elf_fetch_backward_init and elf_zstd_read_literals. Rewrite literal copying.<
2022-12-11Daily bump.GCC Administrator1-0/+25
2022-12-09libbacktrace: rewrite and simplify main zstd loopIan Lance Taylor1-356/+592
* elf.c (ZSTD_TABLE_*): Use elf_zstd_fse_baseline_entry. (ZSTD_ENCODE_BASELINE_BITS): Define. (ZSTD_DECODE_BASELINE, ZSTD_DECODE_BASEBITS): Define. (elf_zstd_literal_length_base): New static const array. (elf_zstd_match_length_base): Likewise. (struct elf_zstd_fse_baseline_entry): Define. (elf_zstd_make_literal_baseline_fse): New static function. (elf_zstd_make_offset_baseline_fse): Likewise. (elf_zstd_make_match_baseline_fse): Likewise. (print_table, main): Use elf_zstd_fse_baseline_entry. (elf_zstd_lit_table, elf_zstd_match_table): Likewise. (elf_zstd_offset_table): Likewise. (struct elf_zstd_seq_decode): Likewise. Remove use_rle and rle fields. (elf_zstd_unpack_seq_decode): Use elf_zstd_fse_baseline_entry, taking a conversion function. Convert RLE to FSE. (elf_zstd_literal_length_baseline): Remove. (elf_zstd_literal_length_bits): Remove. (elf_zstd_match_length_baseline): Remove. (elf_zstd_match_length_bits): Remove. (elf_zstd_decompress): Use elf_zstd_fse_baseline_entry. Rewrite and simplify main loop.
2022-12-09Daily bump.GCC Administrator1-0/+42
2022-12-07libbacktrace: support zstd decompressionIan Lance Taylor8-110/+3165
Support decompressing --compress-debug-sections=zstd. * configure.ac: Check for zstd library and --compress-debug-sections=zstd linker option. * Makefile.am (zstdtest_*): New targets. (zstdtest_alloc_*, ctestzstd_*): New targets. (BUILDTESTS): Add zstdtest, zstdtest_alloc, ctestzstd as appropriate. * elf.c (ELFCOMPRESS_ZSTD): Define. (elf_fetch_bits): Rename from elf_zlib_fetch. Update uses. (elf_fetch_bits_backward): New static function. (ZLIB_HUFFMAN_*): Rename from HUFFMAN_*. Update uses. (ZLIB_TABLE_*): Rename from ZDEBUG_TABLE_*. Update uses. (ZSTD_TABLE_*): Define. (struct elf_zstd_fse_entry): Define. (elf_zstd_read_fse): New static function. (elf_zstd_build_fse): Likewise. (lit): Define if BACKTRACE_GENERATE_ZSTD_FSE_TABLES. (match, offset, next, print_table, main): Likewise. (elf_zstd_lit_table): New static const array. (elf_zstd_match_table, elf_zstd_offset_table): Likewise. (elf_zstd_read_huff): New static function. (struct elf_zstd_seq_decode): Define. (elf_zstd_unpack_seq_decode): New static function. (ZSTD_LIT_*): Define. (struct elf_zstd_literals): Define. (elf_zstd_literal_output): New static function. (ZSTD_LITERAL_LENGTH_BASELINE_OFFSET): Define. (elf_zstd_literal_length_baseline): New static const array. (elf_zstd_literal_length_bits): Likewise. (ZSTD_MATCH_LENGTH_BASELINE_OFFSET): Define. (elf_zstd_match_length_baseline): New static const array. (elf_zstd_match_length_bits): Likewise. (elf_zstd_decompress): New static function. (ZDEBUG_TABLE_SIZE): New definition. (elf_uncompress_chdr): Support ELF_COMPRESS_ZSTD. (backtrace_uncompress_zstd): New function. (elf_add): Use ZLIB_TABLE_SIZE for zlib-gnu sections. * internal.h (backtrace_uncompress_zstd): Declare. * zstdtest.c: New file. * configure, config.h.in, Makefile.in: Regenerate.
2022-10-13Daily bump.GCC Administrator1-0/+4
2022-10-12regenerate configure filesMartin Liska1-2/+2
Needed after a recent change. gcc/ChangeLog: * configure: Regenerate. libatomic/ChangeLog: * configure: Regenerate. libbacktrace/ChangeLog: * configure: Regenerate. libcc1/ChangeLog: * configure: Regenerate. libffi/ChangeLog: * configure: Regenerate. libgfortran/ChangeLog: * configure: Regenerate. libgomp/ChangeLog: * configure: Regenerate. libitm/ChangeLog: * configure: Regenerate. libobjc/ChangeLog: * configure: Regenerate. liboffloadmic/ChangeLog: * configure: Regenerate. * plugin/configure: Regenerate. libphobos/ChangeLog: * configure: Regenerate. libquadmath/ChangeLog: * configure: Regenerate. libsanitizer/ChangeLog: * configure: Regenerate. libssp/ChangeLog: * configure: Regenerate. libstdc++-v3/ChangeLog: * configure: Regenerate. libvtv/ChangeLog: * configure: Regenerate. lto-plugin/ChangeLog: * configure: Regenerate. zlib/ChangeLog: * configure: Regenerate.
2022-10-12Daily bump.GCC Administrator1-0/+5
2022-10-11Generic configury support for shared libs on VxWorksOlivier Hainque1-0/+24
This change adds the configury bits to activate the build of shared libs on VxWorks ports configured with --enable-shared, for libraries variants where this is generally supported (rtp, code model !large - currently not compatible with -fPIC). Set lt_cv_deplibs_check_method in libtool.m4, so the build of libraries know how to establish dependencies. This is useful in configurations such as aarch64 where proper support of LSE relies on accurate dependency information between libstdc++ and libgcc_s to begin with. Regenerate configure scripts to reflect libtool.m4 change. 2022-10-09 Olivier Hainque <hainque@adacore.com> * libtool.m4 (*vxworks*): When enable_shared, set dynamic_linker and friends for rtp !large. Assume the linker has the required abilities and set lt_cv_deplibs_check_method. gcc/ * config.gcc (*vxworks*): Add t-slibgcc fragment if enable_shared. libgcc/ * config.host (*vxworks*): When enable_shared, add libgcc and crtstuff "shared" fragments for rtp except large code model. (aarch64*-wrs-vxworks7*): Remove t-slibgcc-libgcc from the list of fragments. 2022-10-09 Olivier Hainque <hainque@adacore.com> gcc/ * configure: Regenerate. libatomic/ * configure: Regenerate. libbacktrace/ * configure: Regenerate. libcc1/ * configure: Regenerate. libffi/ * configure: Regenerate. libgfortran/ * configure: Regenerate. libgomp/ * configure: Regenerate. libitm/ * configure: Regenerate. libobjc/ * configure: Regenerate. liboffloadmic/ * configure: Regenerate. liboffloadmic/ * plugin/configure: Regenerate. libphobos/ * configure: Regenerate. libquadmath/ * configure: Regenerate. libsanitizer/ * configure: Regenerate. libssp/ * configure: Regenerate. libstdc++-v3/ * configure: Regenerate. libvtv/ * configure: Regenerate. lto-plugin/ * configure: Regenerate. zlib/ * configure: Regenerate.
2022-07-09Daily bump.GCC Administrator1-0/+7
2022-07-08libbacktrace: check for sys/link.hIan Lance Taylor4-10/+27
QNX uses sys/link.h rather than link.h for dl_iterate_phdr Fixes https://github.com/ianlancetaylor/libbacktrace/issues/86 * configure.ac: Check for sys/link.h. Use either link.h or sys/link.h when checking for dl_iterate_phdr. * elf.c: Include sys/link.h if available. * configure, config.h.in: Regenerate.
2022-07-08Daily bump.GCC Administrator1-0/+11
2022-07-07libbacktrace: don't exit Mach-O dyld library loop on one failureIan Lance Taylor1-1/+1
* macho.c (backtrace_initialize) [HAVE_MACH_O_DYLD_H]: Don't exit loop if we can't find debug info for one shared library.
2022-07-07libbacktrace: don't let "make clean" remove allocfail.shIan Lance Taylor2-15/+27
For https://github.com/ianlancetaylor/libbacktrace/issues/81 * Makefile.am (MAKETESTS): New variable split out of TESTS. (CLEANFILES): Replace TESTS with BUILDTESTS and MAKETESTS. * Makefile.in: Regenerate.
2022-06-28Daily bump.GCC Administrator1-0/+5
2022-06-27libbacktrace: replace fgrep with grep in configure scriptIan Lance Taylor3-3/+3
Patch by Xi Ruoyao. * configure.ac: Use grep instead of fgrep. * configure, Makefile.in: Regenerate.
2022-05-29Daily bump.GCC Administrator1-0/+5
2022-05-28libbacktrace: update READMEIan Lance Taylor1-12/+20
PR libbacktrace/105721 * README: Update.
2022-04-06Daily bump.GCC Administrator1-0/+5