Skip to content

Commit

Permalink
Merge branch 'release-0.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
acolomb committed Sep 19, 2016
2 parents f12243f + f176fc3 commit e54b6e9
Show file tree
Hide file tree
Showing 41 changed files with 81 additions and 63 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2016-09-19 André Colomb <[email protected]>

* Minor clean-ups for the build system and detection of libelf
library.
* Update the documentation with used build utility versions.

* Release version 0.5.1

2015-09-14 André Colomb <[email protected]>

* Fix possible memory access error caused by a missing check for
Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Author: André Colomb <[email protected]>
License
-------

Copyright (C) 2014, 2015 André Colomb
Copyright (C) 2014, 2015, 2016 André Colomb

elf-mangle is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
Expand Down Expand Up @@ -100,13 +100,14 @@ additional developer tools installed. The following versions are
tested:

- GNU autoconf 2.69
- GNU automake 1.14.1
- GNU libtool 2.4.2
- GNU gettext 0.19.2
- GNU automake 1.15
- GNU libtool 2.4.6
- GNU gettext 0.19.7

To fully generate the build system, run these two commands in order:
To fully generate the build system, run these three commands in order:

gnulib-tool --update # optional, see portability notes below
git submodule update --init # embedded dependencies
gnulib-tool --update # optional, see portability notes below
autoreconf -i -f


Expand Down Expand Up @@ -143,9 +144,8 @@ therefore a compatible version must be present. Several different
implementations are available, with varying licenses.

Michael Riepe has written an excellent *LGPL*-licensed implementation,
found at [www.mr511.de][libelf-lgpl]. This is the one *elf-mangle* is
developed and tested with. It is [included][libelfg0] in most
*Debian*-based Linux distributions as well as *Cygwin* and can be
found at [www.mr511.de][libelf-lgpl]. It is [included][libelfg0] in
most *Debian*-based Linux distributions as well as *Cygwin* and can be
compiled under Win32 using *MinGW*.

[libelf-lgpl]: http://www.mr511.de/software/ "libelf LGPL'ed"
Expand All @@ -159,9 +159,11 @@ is also [packaged][elfutils-deb] in *Debian*.
[elfutils-deb]: https://packages.debian.org/stable/libelf-dev

The [ELF Tool Chain Project][elftoolchain] includes another *libelf*
implementation which is *BSD*-licensed.
implementation which is *BSD*-licensed. A corresponding *Debian*
[package][libelf-freebsd] is built from their sources.

[elftoolchain]: http://sourceforge.net/projects/elftoolchain/
[libelf-freebsd]: https://packages.debian.org/jessie/libelf-freebsd-dev

Either implementation should work if it supports the BSD *GElf* API.
Just make sure the compiler finds the required headers and library.
Expand Down
26 changes: 16 additions & 10 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2014 Andre Colomb
# Copyright (C) 2014, 2016 Andre Colomb
#
# This file is part of elf-mangle.
#
Expand All @@ -17,7 +17,7 @@
# <http://www.gnu.org/licenses/>.


AC_INIT([elf-mangle], [0.5], [[email protected]])
AC_INIT([elf-mangle], [0.5.1], [[email protected]])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/elf-mangle.c])
AC_CONFIG_AUX_DIR([.])
Expand All @@ -39,16 +39,21 @@ AM_CONDITIONAL([USE_GNULIB], [test "x$gnulib" = x1])

# Checks for libraries.
m4_ifdef([gl_INIT], [gl_INIT])
AC_CHECK_LIB([elf], [elf_version],
[AC_SUBST([LIBS_ELF], [-lelf])],
[AC_MSG_ERROR([Libelf is needed to compile this software.
Specify LDFLAGS if necessary.])])
AC_SEARCH_LIBS([elf_version], [elf], [],
[AC_MSG_ERROR([Libelf is needed to compile this software,
but no library could be found.
Specify LDFLAGS and / or LIBS if necessary.
Hint: `pkg-config --libs libelf`
may be of help if installed.])])
AC_CHECK_HEADERS([gelf.h], [],
[AC_MSG_ERROR([Libelf is needed to compile this software.
Specify CPPFLAGS if necessary.])])
[AC_MSG_ERROR([Libelf is needed to compile this software,
but no working headers could be found.
Specify CPPFLAGS if necessary.
Hint: `pkg-config --cflags libelf`
may be of help if installed.])])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_NEED([need-formatstring-macros])
AM_GNU_GETTEXT_VERSION([0.18.3])
AM_GNU_GETTEXT_VERSION([0.19.7])

# Use installed libcintelhex or fall back to embedded copy
cintelhex=0
Expand Down Expand Up @@ -87,13 +92,14 @@ AC_ARG_WITH([cintelhex],
AS_IF([test "x$cintelhex_internal" = x1],
[AC_MSG_NOTICE([Trying embedded internal copy of libcintelhex])
AS_UNSET([ac_cv_header_cintelhex_h])
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-I${srcdir}/libcintelhex/include $CPPFLAGS"
AC_CHECK_HEADERS([cintelhex.h],
[cintelhex=1],
[cintelhex_internal=0])
CPPFLAGS="$saved_CPPFLAGS"
],
[AS_IF([test x$cintelhex = x1], AC_SUBST([LIBS_CINTELHEX], [-lcintelhex]))])
[AS_IF([test x$cintelhex = x1], AC_SUBST([CINTELHEX_LIBS], [-lcintelhex]))])
AM_CONDITIONAL([HAVE_INTELHEX], [test x$cintelhex = x1])
AM_CONDITIONAL([HAVE_INTELHEX_INTERNAL], [test x$cintelhex_internal = x1])
AC_DEFINE_UNQUOTED([HAVE_INTELHEX], [$cintelhex], [Define if you have libcintelhex])
Expand Down
1 change: 1 addition & 0 deletions gnulib/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,4 @@
/wchar.in.h
/xsize.c
/xsize.h
/limits.in.h
1 change: 1 addition & 0 deletions m4/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,4 @@
/wchar_t.m4
/wint_t.m4
/xsize.m4
/limits-h.m4
4 changes: 2 additions & 2 deletions m4/gnulib-cache.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# Copyright (C) 2002-2016 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -27,7 +27,7 @@


# Specification in the form of a command-line invocation:
# gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --lgpl --conditional-dependencies --libtool --macro-prefix=gl argp getsubopt
# gnulib-tool --import --lib=libgnu --source-base=gnulib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --lgpl --conditional-dependencies --libtool --macro-prefix=gl argp getsubopt

# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
Expand Down
14 changes: 7 additions & 7 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2014 Andre Colomb
# Copyright (C) 2014, 2016 Andre Colomb
#
# This file is part of elf-mangle.
#
Expand All @@ -17,18 +17,18 @@
# <http://www.gnu.org/licenses/>.


AM_CPPFLAGS = -D_POSIX $(CPPFLAGS_INTELHEX_INTERNAL) $(CPPFLAGS_GNULIB)
AM_CPPFLAGS = -D_POSIX $(CINTELHEX_INTERNAL_CPPFLAGS) $(GNULIB_CPPFLAGS)
AM_CFLAGS = -Wall -Wstrict-prototypes -Wextra -fgnu89-inline
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@

if HAVE_INTELHEX_INTERNAL
CPPFLAGS_INTELHEX_INTERNAL = -I$(top_srcdir)/libcintelhex/include
LIBS_CINTELHEX += $(top_builddir)/libcintelhex/src/libcintelhex.la
CINTELHEX_INTERNAL_CPPFLAGS = -I$(top_srcdir)/libcintelhex/include
CINTELHEX_LIBS += $(top_builddir)/libcintelhex/src/libcintelhex.la
endif

if USE_GNULIB
CPPFLAGS_GNULIB = -I$(top_builddir)/gnulib -I$(top_srcdir)/gnulib
LIBS_GNULIB = $(top_builddir)/gnulib/libgnu.la
GNULIB_CPPFLAGS = -I$(top_builddir)/gnulib -I$(top_srcdir)/gnulib
GNULIB_LIBS = $(top_builddir)/gnulib/libgnu.la
endif


Expand Down Expand Up @@ -89,5 +89,5 @@ elf_mangle_SOURCES += \
custom_known_fields.c
endif

elf_mangle_LDADD = $(LIBS_CINTELHEX) $(LIBS_GNULIB) $(LIBS_ELF) $(LTLIBINTL)
elf_mangle_LDADD = $(CINTELHEX_LIBS) $(GNULIB_LIBS) $(LTLIBINTL)
elf_mangle_LDADD += libfallback.la
2 changes: 1 addition & 1 deletion src/custom_known_fields.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
///
/// For more information, please refer to <http://unlicense.org/>
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/custom_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
///
/// For more information, please refer to <http://unlicense.org/>
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/elf-mangle.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/fallback_known_fields.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/fallback_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/field_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/field_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#ifndef FIELD_LIST_H_
Expand Down
2 changes: 1 addition & 1 deletion src/field_print.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/field_print.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#ifndef FIELD_PRINT_H_
Expand Down
2 changes: 1 addition & 1 deletion src/find_string.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/find_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#ifndef FIND_STRING_H_
Expand Down
2 changes: 1 addition & 1 deletion src/image_formats.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/image_formats.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#ifndef IMAGE_FORMATS_H_
Expand Down
2 changes: 1 addition & 1 deletion src/image_ihex.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#ifndef IMAGE_IHEX_H_
Expand Down
2 changes: 1 addition & 1 deletion src/image_ihex_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/image_ihex_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/image_raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/image_raw.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#ifndef IMAGE_RAW_H_
Expand Down
2 changes: 1 addition & 1 deletion src/intl.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#ifndef INTL_H_
Expand Down
2 changes: 1 addition & 1 deletion src/known_fields.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#ifndef KNOWN_FIELDS_H_
Expand Down
2 changes: 1 addition & 1 deletion src/nvm_field.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion src/nvm_field.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#ifndef NVM_FIELD_H_
Expand Down
2 changes: 1 addition & 1 deletion src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/// License along with this program. If not, see
/// <http://www.gnu.org/licenses/>.
///
///@author Andre Colomb <andre.colomb@auteko.de>
///@author Andre Colomb <src@andre.colomb.de>


#include "config.h"
Expand Down
Loading

0 comments on commit e54b6e9

Please sign in to comment.