summaryrefslogtreecommitdiff
path: root/src/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* findtextrel: do not use unbound allocaDmitry V. Levin2021-09-091-1/+0
| | | | | | | | This fixes the following compilation warning: findtextrel.c:184:1: warning: stack usage might be unbounded [-Wstack-usage=] Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
* src: add -Wno-error=stack-usage= to AM_LDFLAGSDmitry V. Levin2021-09-091-1/+1
| | | | | | | | | | While -Wstack-usage= is already excluded from AM_CFLAGS for various tools in src using *_no_Wstack_usage variables, this obviously does not help when LTO is enabled, so add -Wno-error=stack-usage= to AM_LDFLAGS for linking tools in src. References: https://sourceware.org/bugzilla/show_bug.cgi?id=24498 Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
* Support building when fts and obstack aren't part of libc.Érico Rolim2020-11-031-3/+3
| | | | | | | | - Make configure.ac test for fts and obstack availability; - Add fts and obstack ldflags to all files that need them; - Add missing argp ldflags to programs in debuginfod/. Signed-off-by: Érico Rolim <erico.erc@gmail.com>
* Fix BUILD_STATIC build and enable gcov for debuginfod.Mark Wielaard2019-11-261-1/+1
| | | | | | | | libdw now always needs -lpthread and -ld even when BUILD_STATIC. BUILD_STATIC is only used when doing a gcov enabled build. Enable gcov coverage also for debuginfod. Signed-off-by: Mark Wielaard <mark@klomp.org>
* Don't use dlopen() for libebl modulesOmar Sandoval2019-08-291-10/+10
| | | | | | | | | | | | Currently, architecture-specific code for libebl exists in separate libebl_$ARCH.so libraries which libebl loads with dlopen() at runtime. This makes it impossible to have standalone, statically-linked binaries which use libdwfl if they depend on any architecture-specific functionality. Additionally, when these libraries cannot be found, the failure modes are non-obvious. So, let's get rid of libebl_$arch.so and move it all into libdw.so/libdw.a, which simplifies things considerably. Signed-off-by: Omar Sandoval <osandov@fb.com>
* elfclassify: New tool to analyze ELF objects.Florian Weimer2019-08-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Usage: elfclassify [OPTION...] FILE... Determine the type of an ELF file. All of the classification options must apply at the same time to a particular file. Classification options can be negated using a "--not-" prefix. Since modern ELF does not clearly distinguish between programs and dynamic shared objects, you should normally use either --executable or --shared to identify the primary purpose of a file. Only one of the --shared and --executable checks can pass for a file. If you want to know whether an ELF object might a program or a shared library (but could be both), then use --program or --library. Some ELF files will classify as both a program and a library. If you just want to know whether an ELF file is loadable (as program or library) use --loadable. Note that files that only contain (separate) debug information (--debug-only) are never --loadable (even though they might contain program headers). Linux kernel modules are also not --loadable (in the normal sense). Without any of the --print options, the program exits with status 0 if the requested checks pass for all input files, with 1 if a check fails for any file, and 2 if there is an environmental issue (such as a file read error or a memory allocation error). When printing file names, the program exits with status 0 even if no file names are printed, and exits with status 2 if there is an environmental issue. On usage error (e.g. a bad option was given), the program exits with a status code larger than 2. The --quiet or -q oose_filestion suppresses some error warning output, but doesn't change the exit status. Classification options --core File is an ELF core dump file --debug-only File is a debug only ELF file (separate .debug, .dwo or dwz multi-file) --elf File looks like an ELF object or archive/static library (default) --elf-archive File is an ELF archive or static library --elf-file File is an regular ELF object (not an archive/static library) --executable File is (primarily) an ELF program executable (not primarily a DSO) --library File is an ELF shared object (DSO) (might also be an executable) --linux-kernel-module File is a linux kernel module --loadable File is a loadable ELF object (program or shared object) --program File is an ELF program executable (might also be a DSO) --shared File is (primarily) an ELF shared object (DSO) (not primarily an executable) --unstripped File is an ELF file with symbol table or .debug_* sections and can be stripped further Input flags -f, --file Only classify regular (not symlink nor special device) files --no-stdin Do not read files from standard input (default) --stdin Also read file names to process from standard input, separated by newlines --stdin0 Also read file names to process from standard input, separated by ASCII NUL bytes -z, --compressed Try to open compressed files or embedded (kernel) ELF images Output flags --matching If printing file names, print matching files (default) --no-print Do not output file names --not-matching If printing file names, print files that do not match --print Output names of files, separated by newline --print0 Output names of files, separated by ASCII NUL Additional flags -q, --quiet Suppress some error output (counterpart to --verbose) -v, --verbose Output additional information (can be specified multiple times) -?, --help Give this help list --usage Give a short usage message -V, --version Print program version Report bugs to https://sourceware.org/bugzilla. Signed-off-by: Florian Weimer <fweimer@redhat.com> Signed-off-by: Mark Wielaard <mark@klomp.org>
* http://elfutils.org/ is now hosted at http://sourceware.org/elfutils/Mark Wielaard2016-12-241-3/+3
| | | | | | | | | | | | | | | | | fedorahosted used to be our home, but we are now hosted at sourceware. Change the elfutils project home to http://elfutils.org/ Point hosted services (email, release, git, bug tracker and web pages) to https://sourceware.org/elfutils/ Move design notes from README to NOTES. Add URLs for home, releases, bugs, git and mailinglist to README. Make the --version output of all tools the same by using a common print_version function and update the publicly shown copyright holder to the elfutils developers. Signed-off-by: Mark Wielaard <mark@klomp.org>
* dwelf: Add string table functions from ebl.Mark Wielaard2016-08-031-1/+1
| | | | | | | | | | | | | | | | Move the strtab functions from libebl to libdw. Programs often want to create ELF/DWARF string tables. We don't want (static) linking against ebl since those are internal functions that might change. This introduces dwelf_strtab_init, dwelf_strtab_add, dwelf_strtab_add_len, dwelf_strtab_finalize, dwelf_strent_off, dwelf_strent_str and dwelf_strtab_free. Documentation for each has been added to libdwelf.h. The add fucntion got a variant that takes the length explicitly and finalize was changed to return NULL on out of memory instead of aborting. All code and tests now uses the new functions. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* Remove eu-ld and unused code.Mark Wielaard2016-08-031-76/+5
| | | | | | | | Nobody has hacked on eu-ld in a very long time. It didn't really work. And we didn't install it by default in the spec file. Remove sources, the build rules and any (now) unused code. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* elfcompress: New utility.Mark Wielaard2016-01-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Usage: elfcompress [OPTION...] FILE... Compress or decompress sections in an ELF file. -f, --force Force compression of section even if it would become larger -n, --name=SECTION SECTION name to (de)compress, SECTION is an extended wildcard pattern (defaults to '.?(z)debug*') -o, --output=FILE Place (de)compressed output into FILE -p, --permissive Relax a few rules to handle slightly broken ELF files -q, --quiet Be silent when a section cannot be compressed -t, --type=TYPE What type of compression to apply. TYPE can be 'none' (decompress), 'zlib' (ELF ZLIB compression, the default, 'zlib-gabi' is an alias) or 'zlib-gnu' (.zdebug GNU style compression, 'gnu' is an alias) -v, --verbose Print a message for each section being (de)compressed -?, --help Give this help list --usage Give a short usage message -V, --version Print program version Signed-off-by: Mark Wielaard <mjw@redhat.com>
* Make zlib mandatory.Mark Wielaard2015-10-261-2/+2
| | | | | | Explicitly link libelf and libdw with -lz. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* ldlex: Fix sign-compare warning, suppress -Wstack-usage.Mark Wielaard2015-10-121-0/+1
| | | | Signed-off-by: Mark Wielaard <mjw@redhat.com>
* Improve AM_SILENT_RULES coverageJosh Stone2015-10-061-5/+5
| | | | | | | | | | | Note, elfutils does not explicitly enable AM_SILENT_RULES. It's only available starting from automake 1.11, but starting from automake 1.13 silent rules are always generated, defaulting to verbose. $(AM_V_foo) additions should be no-ops on systems that don't support silent rules. To be silent, use "./configure --enable-silent-rules" or "make V=0". Signed-off-by: Josh Stone <jistone@redhat.com>
* config: Add -Wstack-usage=262144 (256K) warning check.Mark Wielaard2015-05-271-0/+14
| | | | | | | | All library code now builds with this warning and -Werror enabled. Add exceptions for most of the src tools (ldgeneric, readelf, nm, size, strip, elflint, findtextrel, elfcmp objdump, ranlib, ar and unstrip). Signed-off-by: Mark Wielaard <mjw@redhat.com>
* addr2line: Add demangler support.Mark Wielaard2015-05-271-1/+1
| | | | | | | Makes the -C, --demangle option visible and implements it (ignoring the demangle style argument). Adds a new test with sample output. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* Link against standalone argp libraryAnthony G. Basile2015-05-041-15/+15
| | | | | | | | | | | | | | argp is not part of POSIX standards and not provided by uClibc or some other standard C libraries. However, it is possible to link against a breakout argp library. One is provided at http://www.lysator.liu.se/~nisse/misc/ This patch tests if libc provides argp otherwise it adds the linker flag -largp where needed in the build system. Signed-off-by: Anthony G. Basile <blueness@gentoo.org> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
* avoid scary command outputUlrich Drepper2014-12-181-1/+1
| | | | | | The commands to check for invalid text relocations in the generated DSOs shouldn't be displayed. They contain an echo which prints the text. This patch suppresses the commands from being printed.
* Prevent premature @AR@ replacement in a sed expression.elfutils-0.160Josh Stone2014-08-251-1/+1
| | | | | | | | | | | | The Makefile rule for make-debug-archive has a sed expression to replace @AR@ will the installed name, but this was itself getting replaced when the Makefile was configured, for a pattern like "s,ar,/path/prefix-,g". Havoc ensued in the resulting make-debug-archive. The fix matches it using a regex bracket expression, "[@]AR[@]", so sed will still match it, but it's immune to configure's replacement. Signed-off-by: Josh Stone <jistone@redhat.com>
* libdwelf: New DWARF ELF Low-level Functions. Add dwelf_elf_gnu_debuglink.Mark Wielaard2014-04-241-2/+2
| | | | | | | | New public header elfutils/libdwelf.h for low-level DWARF/ELF helper functions. The new function dwelf_elf_gnu_debuglink returns the name and crc as found in the .gnu_debuglink section of an ELF file. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* Remove mudflap build option.Mark Wielaard2014-04-181-18/+15
| | | | | | | | | The --enable-mudflap configure build has been broken for 2 years without anybody apparently noticing. GCC 4.9 removed mudflap support. Before release we now run make distcheck with valgrind support. Removal of the mudflap configure option simplifies the build a little. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* Use -Wformat=2 by default for all files.Mark Wielaard2014-01-301-5/+1
| | | | | | | | This just makes sure that all format strings are given as literals to printf like functions so the compiler can see and check them. Remove all no_Wformat, add -Wformat=2 unconditionally to AM_CFLAGS. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* stack: Add --quiet to not resolve addresses, add --raw to not demangle.Mark Wielaard2013-12-311-1/+2
| | | | | | | | | Resolving addresses to function symbol names can be expensive. Use -q to only print addresses (use together with --build-id to process later). Demangle names by default, but add the -r option to not demangle and show the raw names. Signed-off-by: Mark Wielaard <mjw@redhat.com>
* Unwinder for x86*.Jan Kratochvil2013-11-071-2/+3
| | | | | Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com> Signed-off-by: Mark Wielaard <mjw@redhat.com>
* Updates for Automake 1.13.Mark Wielaard2013-04-261-1/+1
| | | | | | | autoreconf will install config/test-driver, ignore it. Update gettext m4 and po files to version 0.18.2. Use AM_CPPFLAGS instead of INCLUDES. All changes are backward compatible with Automake 1.11.
* Update name, license and contributor policy.Mark Wielaard2012-06-051-18/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change name from "Red Hat elfutils" to "elfutils". * Update license of standalone tools and test from GPLv2 to GPLv3+. * Change license of libraries from GPLv2+exception to GPLv2/LGPLv3+. * Add Developer Certificate of Origin based contributor policy. top-level: - COPYING: Upgraded from GPLv2 to GPLv3. - CONTRIBUTING, COPYING-GPLv2, COPYING-LGPLv3: New files. - NEWS: Added note about new contribution and license policy. - Makefile.am: Updated to GPLv3, added new files to EXTRA_DIST. - configure.ac: Update to GPLv3, changed AC_INIT name to 'elfutils'. backends, lib, libasm, libcpu, libdw, libdwfl, libebl, libelf: - All files updated to GPLv2/LGPLv3+. Except some very small files (<5 lines) which didn't have any headers at all before, the linker .maps files and the libcpu/defs files which only contain data and libelf/elf.h which comes from glibc and is under LGPLv2+. config: - elfutils.spec.in: Add new License: headers and new %doc files. - Update all license headers to GPLv2/LGPLv3+ for files used by libs. src, tests: - All files updated to GPLv3+. Except for the test bz2 data files, the linker maps and script files and some very small files (<5 lines) that don't have any headers. Signed-off-by: Richard Fontana <rfontana@redhat.com> Signed-off-by: Mark Wielaard <mjw@redhat.com>
* Support -D in ranlib as in ar.Roland McGrath2012-01-201-2/+2
|
* Add demangling support to nmUlrich Drepper2011-10-021-5/+10
|
* Clean up and consolidate automake magic to reduce duplication and to work ↵Roland McGrath2010-02-151-34/+11
| | | | with --disable-dependency-tracking.
* Explicitly link addr2line with libelf.Mark Wielaard2009-07-251-1/+1
|
* Add missing dependencies on compression libraries for static builds.Ulrich Drepper2009-04-231-1/+1
|
* Fix error handling in a few programs.Ulrich Drepper2009-02-011-1/+0
|
* no_Wformat means -Wno-format.Roland McGrath2009-01-221-1/+1
|
* Tiny build nits.Roland McGrath2009-01-221-1/+2
|
* propagate from branch 'com.redhat.elfutils.disasm' (head ↵Ulrich Drepper2008-01-021-4/+7
| | | | | | d15b4eb794e81e477f9896fe82a74cb5ecf4514c) to branch 'com.redhat.elfutils' (head eaacbf01f8cc89d043ec6eca9b5e35cb5c4cde06)
* merge of '92c36bfdbc6468d1711c043b530e0dfe5abb6dec'Ulrich Drepper2007-10-161-1/+16
| | | | and 'c22c8c43f8f68b0bffd4d5ccdb2282c958268742'
* 2007-04-24 Roland McGrath <roland@redhat.com>Roland McGrath2007-04-251-1/+2
| | | | | * run-strip-test.sh: When we saved the debug info, test unstrip too.
* Implement ar program.Ulrich Drepper2007-02-051-7/+11
| | | | Relax elflint in GNU ld mode for latest idiosyncracies.
* propagate from branch 'com.redhat.elfutils' (head ↵Roland McGrath2006-12-171-3/+3
| | | | | | b4944cf70801d9dac056f4f80ef1334e5acb8bdc) to branch 'com.redhat.elfutils.roland.pending' (head e7e402c668fb0670fc5f6b6a522853ae88f32f11)
* 2006-10-09 Roland McGrath <roland@redhat.com>Roland McGrath2006-10-101-0/+2
| | | | | * ia64_symbol.c (ia64_reloc_simple_type): Treat SECREL types as simple.
* merge of 2d5572f10b65f0ac7fdf54361b4dae41ebbd51d0Ulrich Drepper2006-07-071-2/+11
| | | | and fda3a25581b7bfac581504e9e887e9b97f234f86
* New spec file.elfutils-0.121Ulrich Drepper2006-06-151-11/+2
|
* Linker work.Ulrich Drepper2006-07-051-2/+11
| | | | | GNU hash support. 64-bit SysV hash support.
* Fix FSF address. No exception for libdwarf.Ulrich Drepper2006-04-041-1/+1
|
* propagate from branch 'com.redhat.elfutils.roland.pending' (head ↵Ulrich Drepper2006-04-041-8/+20
| | | | | | 4f8fc821345feef58624f0aa5b470d4827577d8c) to branch 'com.redhat.elfutils' (head 76e26cb54695fd3b21ee8fb5be3036bd68200633)
* src/Roland McGrath2006-03-091-1/+3
| | | | | | | | | | | 2006-03-09 Roland McGrath <roland@redhat.com> * Makefile.am (AM_LDFLAGS): New variable. tests/ 2006-03-09 Roland McGrath <roland@redhat.com> * Makefile.am (AM_LDFLAGS): Define to pass -rpath-link.
* merge of 333c187506c852455e9f7be44fa9adc360416217Ulrich Drepper2005-08-291-3/+5
| | | | and 79955b942e3f0ddc71117feea5754df61edcc42a
* 2005-08-24 Roland McGrath <roland@redhat.com>Roland McGrath2005-08-251-5/+3
| | | | | * line2addr.c (print_address): Omit () for DSOs.
* Implement --enable-gconv option for configure.Ulrich Drepper2005-08-281-2/+2
|
* Add strings program.Ulrich Drepper2005-08-281-1/+3
| | | | Some more cleanups in libelf.
* Correct build programs caused by commit from devel tree.Ulrich Drepper2005-08-151-3/+2
| | | | elf_begin robustification.