| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
So we do not need include in each file.
And indeed the macro
#define _(Str) dgettext ("elfutils", Str)
access libintl function dgettext, so it's make more sense
#include <libintl.h> in file eu-config.h
Signed-off-by: Yonggang Luo <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
error (EXIT_FAILURE, ...) should be noreturn but on some systems it
isn't. This may cause warnings about code that should not be
reachable. So have an explicit error_exit wrapper that is noreturn
(because it calls exit explicitly). Use error_exit in all tools under
the src directory.
https://bugzilla.redhat.com/show_bug.cgi?id=2068692
Signed-off-by: Mark Wielaard <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Make use of the _(Str) macro provided by <config.h>.
The change was made automatically using the following command:
$ git grep -l '\<gettext *(' src |xargs sed -i 's/\<gettext *(/_(/g'
Signed-off-by: Dmitry V. Levin <[email protected]>
|
|
|
|
|
|
|
|
|
| |
A bogus ELF file could have sh_entsize as zero. Don't divide by zero,
but just assume there are no symbols in the section.
https://sourceware.org/bugzilla/show_bug.cgi?id=23786
Signed-off-by: Mark Wielaard <[email protected]>
|
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC7 adds warnings for snprintf formatting into too small buffers.
Fix the two issues pointed out by the new warning. The ar header
fields are fixed length containing left-justified strings without
zero terminator. snprintf always adds a '\0' char at the end (which
we then don't copy into the ar header field) and numbers are decimal
strings of fixed 10 chars (-Wformat-length thinks formatting
them as size_t might overflow the buffer on 64bit arches).
Signed-off-by: Mark Wielaard <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[dwarf_getaranges.c:149]: (warning) Ineffective statement similar to '*A++;'.
Did you intend to write '(*A)++;'?
There was already an XXX statement that we weren't using the result.
Explicitly read the segment_size and check it is zero. And report an
error if it isn't, since we aren't prepared to handle such a case.
[arlib.c:62]: (error) Uninitialized variable: tmpbuf
[arlib.c:124]: (error) Uninitialized variable: tmpbuf
cppcheck is wrong. tmpbuf is initialized in the snprintf call whose result
is use in the same memcpy call. It does make the code less readable and
harder to understand. So explicitly split the snprintf and memcpy calls.
[nm.c:766]: (warning) Assert statement modifies 'cnt'.
The cnt variable was only used for this assert sanity check.
But it is bad style to do have side effects inside an assert statement.
Increase cnt after the assert.
Reported-by: David Binderman <[email protected]>
Signed-off-by: Mark Wielaard <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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]>
|
| |
|
| |
|
|
|
|
| |
and 'c22c8c43f8f68b0bffd4d5ccdb2282c958268742'
|
| |
|
|
Relax elflint in GNU ld mode for latest idiosyncracies.
|