Skip to content

Commit

Permalink
Merge branch 'release-0.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
acolomb committed Nov 3, 2016
2 parents e54b6e9 + f1b2122 commit e774d3a
Show file tree
Hide file tree
Showing 31 changed files with 803 additions and 203 deletions.
14 changes: 14 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
2016-11-02 André Colomb <[email protected]>

* Fix offset output showing wrong numbers when using the
length-prefixed string search function (--strings option).
* Refactor internal handling of binary blobs to allow loading an
image file into memory for later processing.
* Add the lpstrings utility, similar to the standard POSIX
strings(1) command.
* Fix a corner case in build system configuration which would
overwrite user-supplied CPPFLAGS / LDFLAGS variables.
* Update German translation.

* Release version 0.6

2016-09-19 André Colomb <[email protected]>

* Minor clean-ups for the build system and detection of libelf
Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,34 @@ format with a length prefix byte, and usually operates on all
initialized and loaded sections of the object file.


#### Length-Prefixed Strings in Binary Image Files ####

Similar to the standard POSIX `strings(1)` utility, *elf-mangle*
includes a separate binary called `lpstrings` that applies the search
algorithm described above to a given binary data image. In contrast to
`elf-mangle`, it works without an ELF file as input, but directly
scans a binary file in any supported format, as documented for the
`--input-format` option.

The default output format used by `lpstrings` is the same as for
*elf-mangle*, but can be simplified if either the `--output-separator`
or `--radix` options are given. The former allows specifying a custom
delimiter between located strings, which is a newline by default. If
given, the `--radix` option causes the start offset to be prepended to
each string, as an octal (`o`), decimal (`d`) or hexadecimal (`x`)
number.

As an extension to the POSIX options, `lpstrings` may print the
string length in bytes without NUL terminator for each string if the
`--length` option is given in addition to `--radix`. It is appended
after the offset with a plus sign and uses the same radix.

In contrast to POSIX `strings(1)`, processing the standard input or
more than one file given on the command line is not possible. A
positive exit status indicates the number of strings found, negative
values indicate errors.


Application Extensions
----------------------

Expand Down
8 changes: 0 additions & 8 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@
Issues list for elf-mangle
==========================

## String search without ELF map ##

The `--strings` option should be usable without an ELF symbol map,
e.g. to find which one needs to be used.

Factor out an `idc-strings` utility for supported image file formats.


## Override data from binary files ##

Symbol override data must be passed as hex bytes on the command line.
Expand Down
24 changes: 14 additions & 10 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# <http://www.gnu.org/licenses/>.


AC_INIT([elf-mangle], [0.5.1], [[email protected]])
AC_INIT([elf-mangle], [0.6], [[email protected]])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/elf-mangle.c])
AC_CONFIG_AUX_DIR([.])
Expand All @@ -27,15 +27,17 @@ AM_INIT_AUTOMAKE([foreign -Wall -Werror])
# Checks for programs.
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC_C99
AM_PROG_AR
LT_INIT

# Use GNU Gnulib if required macros are present
m4_ifdef([gl_EARLY],
[gl_EARLY
gnulib=1], [gnulib=0])
AM_CONDITIONAL([USE_GNULIB], [test "x$gnulib" = x1])

# More checks for programs.
AM_PROG_AR
LT_INIT


# Checks for libraries.
m4_ifdef([gl_INIT], [gl_INIT])
Expand Down Expand Up @@ -71,15 +73,17 @@ AC_ARG_WITH([cintelhex],
[cintelhex=1], [cintelhex_internal=1])],
[cintelhex_internal=1])],
[internal], [cintelhex_internal=1],
[saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-I$with_cintelhex/include $CPPFLAGS"
[AC_SUBST([CINTELHEX_CPPFLAGS], [-I$with_cintelhex/include])
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CINTELHEX_CPPFLAGS $CPPFLAGS"
AC_CHECK_HEADERS([cintelhex.h],
[saved_LDFLAGS="$LDFLAGS"
LDFLAGS="-L$with_cintelhex/lib $LDFLAGS"
[AC_SUBST([CINTELHEX_LDFLAGS], [-L$with_cintelhex/lib])
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$CINTELHEX_LDFLAGS $LDFLAGS"
AC_CHECK_LIB([cintelhex], [ihex_byte_copy],
[cintelhex=1],
[LDFLAGS="$saved_LDFLAGS"])],
[CPPFLAGS="$saved_CPPFLAGS"])
[cintelhex=1])
LDFLAGS="$saved_LDFLAGS"])
CPPFLAGS="$saved_CPPFLAGS"
])
],
[AC_MSG_RESULT([--with-cintelhex not specified])
Expand Down
5 changes: 4 additions & 1 deletion po/POTFILES.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ src/image_formats.c
src/image_ihex_input.c
src/image_ihex_output.c
src/image_raw.c
src/lpstrings.c
src/nvm_field.c
src/options.c
src/options_elf-mangle.c
src/options_lpstrings.c
src/override.c
src/print_symbols.c
src/symbol_map.c
src/transform.c
Loading

0 comments on commit e774d3a

Please sign in to comment.