summaryrefslogtreecommitdiffstats
path: root/src/strings.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'elfutils-0.174'Ulf Hermann2018-10-111-1/+0
|\ | | | | | | | | | | elfutils 0.174 release Change-Id: Ibcbdfca61cf0b65391ab6d0ad00f18ba61027e07
| * Consolidate error.h inclusion in system.hRoss Burton2018-07-051-1/+0
| | | | | | | | | | | | | | | | | | error.h isn't standard and so isn't part of the musl C library. To easy future porting, consolidate the inclusion of error.h into system.h. https://sourceware.org/bugzilla/show_bug.cgi?id=21008 Signed-off-by: Ross Burton <[email protected]>
* | Merge tag 'elfutils-0.173'Ulf Hermann2018-07-131-1/+1
|\| | | | | | | | | | | elfutils 0.173 release Change-Id: I83dc56dd15c26fe7acf4ce73c29df65b8b65e757
| * Use fallthrough attribute.Joshua Watt2018-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use __attribute__ ((fallthrough)) to indicate switch case fall through instead of a comment. This ensures that the fallthrough warning is not triggered even if the file is pre-processed (hence stripping the comments) before it is compiled. The actual fallback implementation is hidden behind a FALLBACK macro in case the compiler doesn't support it. Finally, the -Wimplict-fallthrough warning was upgraded to only allow the attribute to satisfy it; a comment alone is no longer sufficient. Signed-off-by: Joshua Watt <[email protected]>
* | Open files in O_BINARYUlf Hermann2017-05-081-1/+1
| | | | | | | | | | | | | | | | | | If O_BINARY is not defined, define it to 0, so that the change has no effect then. Some systems have separate binary and text modes for files, and we don't want the text mode to be used. Change-Id: If7efb5bd448c2a1c7d1eb5dab276849b1b15a3ce Reviewed-by: Christian Kandeler <[email protected]>
* | Skip fchown, fchmod, fadvise, fallocate if functions are unavailableUlf Hermann2017-05-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | If fchmod or fchown are unavailable, then the file permission model is likely to be different from what we expect there. posix_fallocate is a rather fragile affair already on linux, and not guaranteed to do anything useful. If it's not available, the result will be the same as when it's available and unreliable. fadvise is an optimization. Change-Id: I28a77e976a0198cf80397b45eb1bc8cfb30664f5 Reviewed-by: Christian Kandeler <[email protected]>
* | Define roundup() for strings.c if it doesn't existUlf Hermann2017-05-041-0/+3
|/ | | | | Change-Id: I6ea7c1f894e89bbaaecb724473c4c00e67296f05 Reviewed-by: Christian Kandeler <[email protected]>
* Move print_version into printversion.{h|c}Ulf Hermann2017-02-171-0/+1
| | | | | | | | Rename version.c so that the implementation is called after the header and the header doesn't clash with the toplevel version.h. print_version depends on argp and is only used in the tools. Signed-off-by: Ulf Hermann <[email protected]>
* http://elfutils.org/ is now hosted at http://sourceware.org/elfutils/Mark Wielaard2016-12-241-15/+0
| | | | | | | | | | | | | | | | | 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 <[email protected]>
* lib: Provide MAX and MIN in system.hAkihiko Odaki2016-10-121-1/+1
| | | | | | | | | | This change also creates a new header file libeu.h to provide the prototypes for the function of libeu. That hides the definition of function crc32, which can conflict with zlib, from libelf. It also prevents mistakes to refer those functions from a component which doesn't link with libeu, such as libelf. Signed-off-by: Akihiko Odaki <[email protected]>
* Trust AC_SYS_LARGEFILE to provide large file supportJosh Stone2015-10-091-34/+34
| | | | | | | | | | | | | | | AC_SYS_LARGEFILE defines _FILE_OFFSET_BITS in config.h if needed for LFS, and this automatically maps things like open to open64. But quite a few places used explicit 64-bit names, which won't work on platforms like FreeBSD where off_t is always 64-bit and there are no foo64 names. It's better to just trust that AC_SYS_LARGEFILE is doing it correctly. But we can verify this too, as some file could easily forget to include config.h. The new tests/run-lfs-symbols.sh checks all build targets against lfs-symbols (taken from lintian) to make sure everything was implicitly mapped to 64-bit variants when _FILE_OFFSET_BITS is set. Signed-off-by: Josh Stone <[email protected]>
* strings: Define MAP_POPULATE if not defined alreadyPino Toscano2015-06-271-0/+4
| | | | | | Currently it is available on Linux only, and it is more an hint. Signed-off-by: Pino Toscano <[email protected]>
* strings: Handle failure of getting section name on bogus section data.Mark Wielaard2015-06-191-2/+6
| | | | | | | | If there is something wrong with getting the section data it is likely we won't be able to get the actual section name because the file is somehow corrupted. Try to get the name, but handle failure gracefully. Signed-off-by: Mark Wielaard <[email protected]>
* strings: Produce error when section data falls outside file.Mark Wielaard2015-01-121-2/+15
| | | | | | | https://bugzilla.redhat.com/show_bug.cgi?id=1170810 Reported-by: Alexander Cherepanov <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
* Remove mudflap build option.Mark Wielaard2014-04-181-8/+0
| | | | | | | | | 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 <[email protected]>
* Use -Wformat=2 by default for all files.Mark Wielaard2014-01-301-10/+23
| | | | | | | | 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 <[email protected]>
* Update name, license and contributor policy.Mark Wielaard2012-06-051-19/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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 <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
* Update copyright yearUlrich Drepper2012-01-211-2/+2
|
* strings: Fix brainos in non-mmap case.Roland McGrath2010-06-301-10/+10
|
* Move argp_program_version_hook and argp_program_bug_address variablesUlrich Drepper2009-01-171-2/+2
| | | | in all programs into the .rodata section.
* Fix type in error message in strings.Ulrich Drepper2009-01-101-1/+1
|
* Unpdate copyright in messages.Ulrich Drepper2009-01-011-2/+2
|
* propagate from branch 'com.redhat.elfutils.disasm' (head ↵Ulrich Drepper2008-01-021-2/+5
| | | | | | d15b4eb794e81e477f9896fe82a74cb5ecf4514c) to branch 'com.redhat.elfutils' (head eaacbf01f8cc89d043ec6eca9b5e35cb5c4cde06)
* Update copyright year.Ulrich Drepper2008-01-021-1/+1
|
* Prepare for 0.128 release.Ulrich Drepper2007-06-061-3/+3
| | | | | | Minor fixes. Update gettext files to 0.16.1.
* Update copyright year.elfutils-0.125Ulrich Drepper2007-01-101-2/+2
|
* Fix FSF address. No exception for libdwarf.Ulrich Drepper2006-04-041-1/+1
|
* Prepare for 0.120 release.Ulrich Drepper2006-04-041-2/+2
|
* propagate from branch 'com.redhat.elfutils.roland.pending' (head ↵Ulrich Drepper2006-04-041-9/+21
| | | | | | 4f8fc821345feef58624f0aa5b470d4827577d8c) to branch 'com.redhat.elfutils' (head 76e26cb54695fd3b21ee8fb5be3036bd68200633)
* Don't use mmap when _MUDFLAP is defined.Ulrich Drepper2005-09-021-3/+11
|
* Correctly fix it.Ulrich Drepper2005-09-021-4/+2
|
* Fix little problem with handling multiple files in the same run.Ulrich Drepper2005-09-021-1/+4
|
* merge of 333c187506c852455e9f7be44fa9adc360416217Ulrich Drepper2005-08-291-0/+720
| | | | and 79955b942e3f0ddc71117feea5754df61edcc42a
* 2005-08-24 Roland McGrath <[email protected]>Roland McGrath2005-08-251-720/+0
| | | | | * line2addr.c (print_address): Omit () for DSOs.
* Implement --enable-gconv option for configure.Ulrich Drepper2005-08-281-3/+2
|
* Fix printing of location of string in strings.Ulrich Drepper2005-08-281-2/+2
| | | | | Add test for strings. spec file update.
* Add strings program.Ulrich Drepper2005-08-281-0/+721
Some more cleanups in libelf.