summaryrefslogtreecommitdiffstats
path: root/src/nm.c
Commit message (Collapse)AuthorAgeFilesLines
* Use -Wformat=2 by default for all files.Mark Wielaard2014-01-301-44/+49
| | | | | | | | 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]>
* Fix corruption of non-C++ symbols by the demangler.Jan Kratochvil2014-01-151-8/+8
| | | | Signed-off-by: Jan Kratochvil <[email protected]>
* Fix some (harmless) cppcheck warnings.Mark Wielaard2013-11-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | [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]>
* Add missing semicolon in show_symbols_sysvMark Wielaard2012-12-111-1/+1
| | | | Signed-off-by: Mark Wielaard <[email protected]>
* nm: Fix size passed to snprintf for invalid sh_name case.Roland McGrath2012-12-111-2/+3
| | | | Signed-off-by: Roland McGrath <[email protected]>
* Reorder formatting string arguments so that there are no gaps in referencesPetr Machata2012-07-301-8/+8
| | | | | | | It is required that formatting string that uses $-style references lists all arguments. Signed-off-by: Petr Machata <[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
|
* Color code output of nm and objdumpUlrich Drepper2012-01-211-29/+65
|
* Fix nm output for sysv formatUlrich Drepper2011-10-031-9/+25
| | | | | Undefined symbols need no address and siz printed. Avoid the initial entry which is no real symbol. Avoid section symbols.
* Improve nm output for BSD and POSIX formatUlrich Drepper2011-10-031-26/+59
| | | | | | | | | The binutils version showed more information since it distinguished unique symbols, symbols in read-only and bss sections. The format is now the same. In addition handle TLS symbols correctly but differently from binutils nm since the latter drops information. Instead use a @ suffix to indicate TLS similar to * to indicate weak.
* Add demangling support to nmUlrich Drepper2011-10-021-3/+104
|
* nm.c: Remove unused if/else and parameters.Marek Polacek2011-05-121-9/+4
|
* Add aliases for elf_getshnum and elf_getshstrndx.Ulrich Drepper2009-06-131-3/+3
| | | | | | | | | | Sun in their implementation messed up the semantics of these functions. To get back to source code compatibility they asked for a solution. We simply add aliases for the two affected functions, named elf_getshdrnum and elf_getshdrstrndx. The semantics remains the same. Users of the old interfaces receive a warning for now. In future we might make it impossible to link programs which request the old interfaces (binary compatibility will of course be maintained).
* Move argp_program_version_hook and argp_program_bug_address variablesUlrich Drepper2009-01-171-2/+2
| | | | in all programs into the .rodata section.
* Unpdate copyright in messages.Ulrich Drepper2009-01-011-2/+2
|
* Fix crashes on bad sh_name/st_name offsets.Roland McGrath2008-12-111-10/+36
|
* propagate from branch 'com.redhat.elfutils.disasm' (head ↵Ulrich Drepper2008-01-021-0/+3
| | | | | | d15b4eb794e81e477f9896fe82a74cb5ecf4514c) to branch 'com.redhat.elfutils' (head eaacbf01f8cc89d043ec6eca9b5e35cb5c4cde06)
* Update copyright year.Ulrich Drepper2008-01-021-1/+1
|
* readelf register printing sort order tweakRoland McGrath2007-08-231-22/+31
|
* Prepare for 0.128 release.Ulrich Drepper2007-06-061-4/+4
| | | | | | 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)
* NEWS updatesRoland McGrath2005-10-281-2/+2
|
* Some more message unifications.Ulrich Drepper2005-09-031-2/+2
|
* 2005-08-23 Roland McGrath <[email protected]>Roland McGrath2005-08-231-7/+0
| | | | | | * dwarf_attr_integrate.c (dwarf_attr_integrate): Treat DW_AT_specification the same as DW_AT_abstract_origin.
* Adjust for monotone.Ulrich Drepper2005-07-261-0/+1282