elfdbg/.git
9 months agoEnable cirrus continous integration task for freebsd
Sofian Brabez [Tue, 16 Feb 2021 13:27:15 +0000 (13:27 +0000)]
Enable cirrus continous integration task for freebsd

17 months agoFix C99 compilation warning on OpenBSD
Sofian Brabez [Sat, 27 Jun 2020 17:56:31 +0000 (19:56 +0200)]
Fix C99 compilation warning on OpenBSD

Similar to Linux, OpenBSD does not defined `strnstr()`, this change
define the function implementation and chase the C99 warning implicit
declaration

warning: implicit declaration of function 'strnstr' is invalid in C99 [-Wimplicit-function-declaration]

Thx mpi@ gaston@

17 months agoRename function elf_debug() to elf_debug_count()
Sofian Brabez [Mon, 1 Jun 2020 16:26:25 +0000 (18:26 +0200)]
Rename function elf_debug() to elf_debug_count()

This function count the number of debug sections so it's more
logic to rename it elf_debug_count()

17 months agoRe-indent using clang-format
Sofian Brabez [Mon, 1 Jun 2020 16:24:05 +0000 (18:24 +0200)]
Re-indent using clang-format

17 months agoAdd support for Linux
Sofian Brabez [Mon, 1 Jun 2020 15:36:11 +0000 (17:36 +0200)]
Add support for Linux

17 months agoSkip sections which are not PROGBITS
Sofian Brabez [Mon, 1 Jun 2020 14:56:05 +0000 (16:56 +0200)]
Skip sections which are not PROGBITS

ELF debug sections type are all SHT_PROGBITS so avoid looping on all other
types for nothing

17 months agoUpdate readme
Sofian Brabez [Mon, 1 Jun 2020 14:16:52 +0000 (16:16 +0200)]
Update readme

17 months agoDisplay output when ATF test case is failing
Sofian Brabez [Mon, 1 Jun 2020 14:04:55 +0000 (16:04 +0200)]
Display output when ATF test case is failing

17 months agoAdd arguments flag -q for quiet mode and -v for verbose mode
Sofian Brabez [Mon, 1 Jun 2020 13:59:01 +0000 (15:59 +0200)]
Add arguments flag -q for quiet mode and -v for verbose mode

Quiet mode is not printing any output and verbose mode is listing the
name of the debug sections in standard output.

Quiet mode is designed to be used in shell script like above:

if elfdbg -q /bin/date; then
    echo "No symbols"
else
    echo "Binary with debug symbols"
fi

17 months agoError handling when argument file is not ELF object and style(9)
Sofian Brabez [Mon, 1 Jun 2020 13:57:27 +0000 (15:57 +0200)]
Error handling when argument file is not ELF object and style(9)

18 months agoRewrite ELF parsing from scratch w/o dependency of elf(3) and gelf(3)
Sofian Brabez [Tue, 19 May 2020 18:25:20 +0000 (20:25 +0200)]
Rewrite ELF parsing from scratch w/o dependency of elf(3) and gelf(3)

In order to make it portable on other Unix operating systems, use ELF
structure definitions and memory mapping to parse the ELF binary.

19 months agoAdd tests cases for expected output
Sofian Brabez [Thu, 16 Apr 2020 23:25:20 +0000 (01:25 +0200)]
Add tests cases for expected output

Use [kyua](https://github.com/jmmv/kyua) FreeBSD test suite framework to
add elfdbg test cases to cover with symbols and without symbols.

The FreeBSD test suite framework require a Kyuafile and to declare the
AFT test case. Everything is documented in kyua(1), atf(7) and tests(7)
man pages.

19 months agoAdd usage and avoid execution when there is no argument
Sofian Brabez [Thu, 16 Apr 2020 01:42:12 +0000 (03:42 +0200)]
Add usage and avoid execution when there is no argument

19 months agoUpdate makefile
Sofian Brabez [Thu, 16 Apr 2020 01:08:29 +0000 (03:08 +0200)]
Update makefile

We do not to define BINDIR, DESTDIR and library flags should be handed
by LDADD. Also install manpage properly.

6 years agoFormat elfdbg source code using clang-format
Sofian Brabez [Tue, 20 Jan 2015 20:00:00 +0000 (20:00 +0000)]
Format elfdbg source code using clang-format

6 years agoInitial commit
Sofian Brabez [Tue, 20 Jan 2015 19:43:47 +0000 (19:43 +0000)]
Initial commit