[rtems-tools commit] rtemstoolkit: Update elftoolchain to the latest code.

Chris Johns chrisj at rtems.org
Sun Apr 29 02:10:24 UTC 2018


Module:    rtems-tools
Branch:    master
Commit:    0c5db2dd13b8270bb80c497d5f53ae2471f8a819
Changeset: http://git.rtems.org/rtems-tools/commit/?id=0c5db2dd13b8270bb80c497d5f53ae2471f8a819

Author:    Chris Johns <chrisj at rtems.org>
Date:      Sun Apr 29 11:55:37 2018 +1000

rtemstoolkit: Update elftoolchain to the latest code.

The update is taken from https://github.com/elftoolchain/elftoolchain.

Update #3417

---

 rtemstoolkit/elftoolchain/common/Makefile          |   8 +-
 rtemstoolkit/elftoolchain/common/_elftc.h          |   6 +-
 rtemstoolkit/elftoolchain/common/elfdefinitions.h  |  17 +-
 rtemstoolkit/elftoolchain/common/native-elf-format |   5 +-
 rtemstoolkit/elftoolchain/common/os.Linux.mk       |   2 +-
 rtemstoolkit/elftoolchain/common/uthash.h          |   2 -
 rtemstoolkit/elftoolchain/libelf/Makefile          |   2 +-
 rtemstoolkit/elftoolchain/libelf/README            |  12 ++
 rtemstoolkit/elftoolchain/libelf/README.build      |  66 +++++++
 rtemstoolkit/elftoolchain/libelf/Version.map       |  13 +-
 rtemstoolkit/elftoolchain/libelf/_libelf.h         |  24 ++-
 rtemstoolkit/elftoolchain/libelf/_libelf_ar.h      |   2 -
 rtemstoolkit/elftoolchain/libelf/_libelf_config.h  |  50 +-----
 rtemstoolkit/elftoolchain/libelf/elf.3             |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf.c             |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_begin.3       |  35 ++--
 rtemstoolkit/elftoolchain/libelf/elf_begin.c       | 193 +++++----------------
 rtemstoolkit/elftoolchain/libelf/elf_cntl.3        |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_cntl.c        |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_data.c        |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_end.3         |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_end.c         |  12 +-
 rtemstoolkit/elftoolchain/libelf/elf_errmsg.3      |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_errmsg.c      |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_errno.c       |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_fill.3        |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_fill.c        |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_flag.c        |  12 +-
 rtemstoolkit/elftoolchain/libelf/elf_flagdata.3    |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_getarhdr.3    |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_getarhdr.c    |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_getarsym.3    |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_getarsym.c    |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_getbase.3     |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_getbase.c     |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_getdata.3     |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_getident.3    |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_getident.c    |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_getphdrnum.3  |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_getphnum.3    |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_getscn.3      |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_getshdrnum.3  |   2 +-
 .../elftoolchain/libelf/elf_getshdrstrndx.3        |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_getshnum.3    |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_getshstrndx.3 |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_hash.3        |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_hash.c        |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_kind.3        |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_kind.c        |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_memory.3      |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_memory.c      |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_next.3        |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_next.c        |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_phnum.c       |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_rand.3        |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_rand.c        |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_rawfile.3     |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_rawfile.c     |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_scn.c         |   4 +-
 rtemstoolkit/elftoolchain/libelf/elf_shnum.c       |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_shstrndx.c    |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_strptr.3      |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_strptr.c      |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_types.m4      |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_update.3      |   2 +-
 rtemstoolkit/elftoolchain/libelf/elf_update.c      |  69 +++-----
 rtemstoolkit/elftoolchain/libelf/elf_version.3     |   6 +-
 rtemstoolkit/elftoolchain/libelf/elf_version.c     |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf.3            |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf.h            |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_cap.c        |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_checksum.3   |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_checksum.c   |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_dyn.c        |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_ehdr.c       |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_fsize.3      |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_fsize.c      |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_getcap.3     |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_getclass.3   |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_getclass.c   |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_getdyn.3     |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_getehdr.3    |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_getmove.3    |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_getphdr.3    |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_getrel.3     |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_getrela.3    |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_getshdr.3    |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_getsym.3     |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_getsyminfo.3 |   2 +-
 .../elftoolchain/libelf/gelf_getsymshndx.3         |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_move.c       |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_newehdr.3    |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_newphdr.3    |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_phdr.c       |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_rel.c        |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_rela.c       |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_shdr.c       |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_sym.c        |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_syminfo.c    |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_symshndx.c   |   2 +-
 .../elftoolchain/libelf/gelf_update_ehdr.3         |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_xlate.c      |   2 +-
 rtemstoolkit/elftoolchain/libelf/gelf_xlatetof.3   |   2 +-
 rtemstoolkit/elftoolchain/libelf/libelf.h          |   2 +-
 rtemstoolkit/elftoolchain/libelf/libelf_align.c    |   2 +-
 rtemstoolkit/elftoolchain/libelf/libelf_allocate.c |   2 +-
 rtemstoolkit/elftoolchain/libelf/libelf_ar.c       |   2 +-
 rtemstoolkit/elftoolchain/libelf/libelf_ar_util.c  |   2 +-
 rtemstoolkit/elftoolchain/libelf/libelf_checksum.c |   2 +-
 rtemstoolkit/elftoolchain/libelf/libelf_convert.m4 |   2 +-
 rtemstoolkit/elftoolchain/libelf/libelf_data.c     |   2 +-
 rtemstoolkit/elftoolchain/libelf/libelf_ehdr.c     |   2 +-
 rtemstoolkit/elftoolchain/libelf/libelf_extended.c |   2 +-
 rtemstoolkit/elftoolchain/libelf/libelf_fsize.m4   |   2 +-
 rtemstoolkit/elftoolchain/libelf/libelf_msize.m4   |   2 +-
 rtemstoolkit/elftoolchain/libelf/libelf_phdr.c     |   2 +-
 rtemstoolkit/elftoolchain/libelf/libelf_shdr.c     |   2 +-
 rtemstoolkit/elftoolchain/libelf/libelf_xlate.c    |   2 +-
 rtemstoolkit/elftoolchain/libelf/os.FreeBSD.mk     |   2 +-
 rtemstoolkit/elftoolchain/libelf/os.NetBSD.mk      |   2 +-
 120 files changed, 306 insertions(+), 434 deletions(-)

diff --git a/rtemstoolkit/elftoolchain/common/Makefile b/rtemstoolkit/elftoolchain/common/Makefile
index b7b5372..d13e806 100644
--- a/rtemstoolkit/elftoolchain/common/Makefile
+++ b/rtemstoolkit/elftoolchain/common/Makefile
@@ -1,15 +1,13 @@
-# $Id: Makefile 2140 2011-11-10 14:27:03Z jkoshy $
+# $Id$
 
 TOP=	..
 
 INCS=	elfdefinitions.h
 INCSDIR?=	/usr/include
 
-.PHONY:	all clean clobber depend obj
+all obj depend:
 
-all depend obj:
-
-clean clobber:
+clean:
 	rm -f ${CLEANFILES}
 
 .include "${TOP}/mk/elftoolchain.inc.mk"
diff --git a/rtemstoolkit/elftoolchain/common/_elftc.h b/rtemstoolkit/elftoolchain/common/_elftc.h
index 9ee8db1..e01e7cd 100644
--- a/rtemstoolkit/elftoolchain/common/_elftc.h
+++ b/rtemstoolkit/elftoolchain/common/_elftc.h
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: _elftc.h 2064 2011-10-26 15:12:32Z jkoshy $
+ * $Id$
  */
 
 /**
@@ -78,12 +78,8 @@
 #endif
 
 #if defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
-#if defined(__GNUC__)
-#define	ELFTC_VCSID(ID)		__asm__(".ident\t\"" ID "\"")
-#else
 #define	ELFTC_VCSID(ID)		/**/
 #endif
-#endif
 
 #if defined(__NetBSD__)
 #define	ELFTC_VCSID(ID)		__RCSID(ID)
diff --git a/rtemstoolkit/elftoolchain/common/elfdefinitions.h b/rtemstoolkit/elftoolchain/common/elfdefinitions.h
index 79b6e7f..2c357d1 100644
--- a/rtemstoolkit/elftoolchain/common/elfdefinitions.h
+++ b/rtemstoolkit/elftoolchain/common/elfdefinitions.h
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: elfdefinitions.h 2132 2011-11-10 08:27:41Z jkoshy $
+ * $Id$
  */
 
 /*
@@ -867,22 +867,12 @@ _ELF_DEFINE_PT(PT_PHDR,             6,				\
 _ELF_DEFINE_PT(PT_TLS,              7, "thread local storage")	\
 _ELF_DEFINE_PT(PT_LOOS,             0x60000000UL,		\
 	"start of OS-specific range")				\
-_ELF_DEFINE_PT(PT_SUNW_UNWIND,      0x6464E550UL,		\
-	"Solaris/amd64 stack unwind tables")			\
 _ELF_DEFINE_PT(PT_GNU_EH_FRAME,     0x6474E550UL,		\
-	"GCC generated .eh_frame_hdr segment")			\
+	"GCC generated .eh_frame_hdr segment ")			\
 _ELF_DEFINE_PT(PT_GNU_STACK,	    0x6474E551UL,		\
 	"Stack flags")						\
 _ELF_DEFINE_PT(PT_GNU_RELRO,	    0x6474E552UL,		\
 	"Segment becomes read-only after relocation")		\
-_ELF_DEFINE_PT(PT_SUNWBSS,          0x6FFFFFFAUL,		\
-	"A Solaris .SUNW_bss section")				\
-_ELF_DEFINE_PT(PT_SUNWSTACK,        0x6FFFFFFBUL,		\
-	"A Solaris process stack")				\
-_ELF_DEFINE_PT(PT_SUNWDTRACE,       0x6FFFFFFCUL,		\
-	"Used by dtrace(1)")					\
-_ELF_DEFINE_PT(PT_SUNWCAP,          0x6FFFFFFDUL,		\
-	"Special hardware capability requirements")		\
 _ELF_DEFINE_PT(PT_HIOS,             0x6FFFFFFFUL,		\
 	"end of OS-specific range")				\
 _ELF_DEFINE_PT(PT_LOPROC,           0x70000000UL,		\
@@ -909,8 +899,6 @@ enum {
 
 /* synonyms. */
 #define	PT_ARM_UNWIND	PT_ARM_EXIDX
-#define	PT_HISUNW	PT_HIOS
-#define	PT_LOSUNW	PT_SUNWBSS
 
 /*
  * Section flags.
@@ -1601,7 +1589,6 @@ _ELF_DEFINE_RELOC(R_MIPS_GOT16,		9)	\
 _ELF_DEFINE_RELOC(R_MIPS_PC16,		10)	\
 _ELF_DEFINE_RELOC(R_MIPS_CALL16,	11)	\
 _ELF_DEFINE_RELOC(R_MIPS_GPREL32,	12)	\
-_ELF_DEFINE_RELOC(R_MIPS_64,		18)	\
 _ELF_DEFINE_RELOC(R_MIPS_GOTHI16,	21)	\
 _ELF_DEFINE_RELOC(R_MIPS_GOTLO16,	22)	\
 _ELF_DEFINE_RELOC(R_MIPS_CALLHI16,	30)	\
diff --git a/rtemstoolkit/elftoolchain/common/native-elf-format b/rtemstoolkit/elftoolchain/common/native-elf-format
index 4b06672..f239e30 100755
--- a/rtemstoolkit/elftoolchain/common/native-elf-format
+++ b/rtemstoolkit/elftoolchain/common/native-elf-format
@@ -1,7 +1,5 @@
 #!/bin/sh
 #
-# $Id: native-elf-format 2064 2011-10-26 15:12:32Z jkoshy $
-#
 # Find the native ELF format for a host platform by compiling a
 # test object and examining the resulting object.
 #
@@ -19,7 +17,7 @@ touch ${tmp_c}
 echo "/* Generated by ${program} on `date` */"
 
 cc -c ${tmp_c} -o ${tmp_o}
-LANG="C" readelf -h ${tmp_o} | awk '
+readelf -h ${tmp_o} | awk '
 $1 ~ "Class:" {
         sub("ELF","",$2); elfclass = $2;
     }
@@ -44,3 +42,4 @@ END {
     printf("#define	ELFTC_ARCH	%s\n", elfarch);
     printf("#define	ELFTC_BYTEORDER	ELFDATA2%s\n", elfdata);
 }'
+
diff --git a/rtemstoolkit/elftoolchain/common/os.Linux.mk b/rtemstoolkit/elftoolchain/common/os.Linux.mk
index 2339e2a..f077a88 100644
--- a/rtemstoolkit/elftoolchain/common/os.Linux.mk
+++ b/rtemstoolkit/elftoolchain/common/os.Linux.mk
@@ -1,7 +1,7 @@
 #
 # Build recipes for Linux based operating systems.
 #
-# $Id: os.Linux.mk 2064 2011-10-26 15:12:32Z jkoshy $
+# $Id$
 
 _NATIVE_ELF_FORMAT = native-elf-format
 
diff --git a/rtemstoolkit/elftoolchain/common/uthash.h b/rtemstoolkit/elftoolchain/common/uthash.h
index 8428b9c..ffdc6cd 100644
--- a/rtemstoolkit/elftoolchain/common/uthash.h
+++ b/rtemstoolkit/elftoolchain/common/uthash.h
@@ -21,8 +21,6 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-/* $Id: uthash.h 2064 2011-10-26 15:12:32Z jkoshy $ */
-
 #ifndef UTHASH_H
 #define UTHASH_H 
 
diff --git a/rtemstoolkit/elftoolchain/libelf/Makefile b/rtemstoolkit/elftoolchain/libelf/Makefile
index 41e902a..6fb27d0 100644
--- a/rtemstoolkit/elftoolchain/libelf/Makefile
+++ b/rtemstoolkit/elftoolchain/libelf/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile 1345 2011-01-01 11:17:52Z jkoshy $
+# $Id$
 
 TOP=	${.CURDIR}/..
 
diff --git a/rtemstoolkit/elftoolchain/libelf/README b/rtemstoolkit/elftoolchain/libelf/README
new file mode 100644
index 0000000..726fcc9
--- /dev/null
+++ b/rtemstoolkit/elftoolchain/libelf/README
@@ -0,0 +1,12 @@
+# $FreeBSD$
+# $NetBSD$
+
+libelf: a BSD-licensed implementation of the ELF(3)/GELF(3) API.
+
+Documentation:
+ * Manual page elf.3 contains an overview of the library.  Other
+   manual pages document individual APIs in the library.
+ * A tutorial "libelf by Example" is available at:
+   http://people.freebsd.org/~jkoshy/download/libelf/article.html
+	
+For ongoing development please see http://elftoolchain.sourceforge.net/
diff --git a/rtemstoolkit/elftoolchain/libelf/README.build b/rtemstoolkit/elftoolchain/libelf/README.build
new file mode 100644
index 0000000..7975182
--- /dev/null
+++ b/rtemstoolkit/elftoolchain/libelf/README.build
@@ -0,0 +1,66 @@
+: README.build -- notes on the build process
+
+The "Makefile" in this directory uses BSD make(1) syntax.  If you are
+trying to build this library on a platform that does not have a
+pre-built BSD compatible make(1), then you could try porting NetBSD's
+make(1).  NetBSD's make(1) is available at:
+
+    http://www.crufty.net/help/sjg/bmake.html
+
+
+: Supporting cross builds
+
+In the general case, libelf may be built for a target operating system
+and machine architecture that is different from the host operating
+system and machine architecture that the compilation is happening on.
+For example, compilation could be running on a Linux/i386 host, with
+target binaries being created for a NetBSD/sparc64 system.
+
+To support cross building:
+- The top-level "Makefile" pulls in the appropriate make rules for the
+  target system.
+
+  Inside of makefiles, we determine the target OS by looking at the
+  contents of the ${unix} make variable.  The top-level makefile then
+  includes any target specific makefiles if they exist.
+
+- Operating systems differ in the names and locations of the headers
+  where their ELF types are defined.  They also differ in the set of
+  ELF types supported.
+
+  Instead of relying on the host operating system to provide ELF related
+  types and symbols, we define these in header <common/elfdefinitions.h>.
+
+- The file "_libelf_config.h" defines the 'native' architecture, byte order
+  and word size for libelf.
+
+: OS Specific Configuration :
+
+:: Debian ::
+
+The following packages are needed for the build:
+- `build-essential'
+- `m4'
+- `freebsd-buildutils' or `freebsd5-buildutils'
+
+You would need to use `freebsd-make' instead of GNU make to build
+the tools.  You would also need to place /usr/lib/freebsd in the
+shell's `PATH', preferably at the beginning.
+
+:: FreeBSD ::
+
+libelf should build out of the box on FreeBSD versions later than 6.0.
+
+:: NetBSD ::
+
+libelf should build out of the box on NetBSD versions later than 4.0.
+
+:: Ubuntu ::
+
+See the section on 'Debian' above.
+
+
+: Porting resources on the 'net
+
+The 'predef' project [http://predef.sourceforge.net/] has a
+comprehensive list of CPP macros predefined by various OSes.
diff --git a/rtemstoolkit/elftoolchain/libelf/Version.map b/rtemstoolkit/elftoolchain/libelf/Version.map
index 2c595ea..18e6473 100644
--- a/rtemstoolkit/elftoolchain/libelf/Version.map
+++ b/rtemstoolkit/elftoolchain/libelf/Version.map
@@ -1,6 +1,4 @@
 /*
- * $Id: Version.map 2033 2011-10-23 09:21:13Z jkoshy $
- * 
  * $FreeBSD: src/lib/libelf/Version.map,v 1.3 2007/04/29 14:05:22 deischen Exp $
  */
 FBSD_1.0 {
@@ -95,3 +93,14 @@ global:
 local:
 	*;
 };
+
+/*
+ * Private symbols, mostly test hooks
+ */
+FBSDprivate_1.0 {
+global:
+	_libelf_set_error;
+	_libelf_get_max_error;
+	_libelf_get_no_error_message;
+	_libelf_get_unknown_error_message;
+};
diff --git a/rtemstoolkit/elftoolchain/libelf/_libelf.h b/rtemstoolkit/elftoolchain/libelf/_libelf.h
index ef15642..4470e40 100644
--- a/rtemstoolkit/elftoolchain/libelf/_libelf.h
+++ b/rtemstoolkit/elftoolchain/libelf/_libelf.h
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2006,2008-2011 Joseph Koshy
+ * Copyright (c) 2006,2008-2010 Joseph Koshy
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: _libelf.h 1921 2011-09-23 08:04:02Z jkoshy $
+ * $Id$
  */
 
 #ifndef	__LIBELF_H_
@@ -66,17 +66,15 @@ extern struct _libelf_globals _libelf;
 #define	LIBELF_ADJUST_AR_SIZE(S)	(((S) + 1U) & ~1U)
 
 /*
- * Flags for library internal use.  These use the upper 16 bits of the
- * `e_flags' field.
+ * Flags for library internal use.  These use the upper 16 bits of a
+ * flags field.
  */
-#define	LIBELF_F_API_MASK	0x00FFFF  /* Flags defined by the API. */
-#define	LIBELF_F_AR_HEADER	0x010000  /* translated header available */
-#define	LIBELF_F_AR_VARIANT_SVR4 0x020000 /* BSD style ar(1) archive */
-#define	LIBELF_F_DATA_MALLOCED	0x040000 /* whether data was malloc'ed */
-#define	LIBELF_F_RAWFILE_MALLOC	0x080000 /* whether e_rawfile was malloc'ed */
-#define	LIBELF_F_RAWFILE_MMAP	0x100000 /* whether e_rawfile was mmap'ed */
-#define	LIBELF_F_SHDRS_LOADED	0x200000 /* whether all shdrs were read in */
-#define	LIBELF_F_SPECIAL_FILE	0x400000 /* non-regular file */
+#define	LIBELF_F_DATA_MALLOCED	0x010000 /* whether data was malloc'ed */
+#define	LIBELF_F_MMAP		0x020000 /* whether e_rawfile was mmap'ed */
+#define	LIBELF_F_SHDRS_LOADED	0x040000 /* whether all shdrs were read in */
+#define	LIBELF_F_AR_VARIANT_SVR4 0x080000 /* BSD style ar(1) archive */
+#define	LIBELF_F_AR_HEADER	0x100000  /* translated header available */
+#define	LIBELF_F_MASK		0x00FFFF  /* Flags defined by the API. */
 
 struct _Elf {
 	int		e_activations;	/* activation count */
@@ -84,7 +82,7 @@ struct _Elf {
 	int		e_class;	/* ELFCLASS*  */
 	Elf_Cmd		e_cmd;		/* ELF_C_* used at creation time */
 	int		e_fd;		/* associated file descriptor */
-	unsigned int	e_flags;	/* ELF_F_* & LIBELF_F_* flags */
+	unsigned int	e_flags;	/* ELF_F_*, LIBELF_F_* flags */
 	Elf_Kind	e_kind;		/* ELF_K_* */
 	Elf		*e_parent; 	/* non-NULL for archive members */
 	char		*e_rawfile;	/* uninterpreted bytes */
diff --git a/rtemstoolkit/elftoolchain/libelf/_libelf_ar.h b/rtemstoolkit/elftoolchain/libelf/_libelf_ar.h
index d6b15a7..2de929b 100644
--- a/rtemstoolkit/elftoolchain/libelf/_libelf_ar.h
+++ b/rtemstoolkit/elftoolchain/libelf/_libelf_ar.h
@@ -22,8 +22,6 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
- *
- * $Id: _libelf_ar.h 2032 2011-10-23 09:07:00Z jkoshy $
  */
 
 #ifndef	__LIBELF_AR_H_
diff --git a/rtemstoolkit/elftoolchain/libelf/_libelf_config.h b/rtemstoolkit/elftoolchain/libelf/_libelf_config.h
index 120f090..9e4f21a 100644
--- a/rtemstoolkit/elftoolchain/libelf/_libelf_config.h
+++ b/rtemstoolkit/elftoolchain/libelf/_libelf_config.h
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2008-2011 Joseph Koshy
+ * Copyright (c) 2008 Joseph Koshy
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -22,8 +22,6 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
- *
- * $Id: _libelf_config.h 2032 2011-10-23 09:07:00Z jkoshy $
  */
 
 #ifdef __FreeBSD__
@@ -115,30 +113,6 @@
 
 #endif	/* __NetBSD__ */
 
-#ifdef __APPLE__
-
-#define	LIBELF_VCSID(ID)
-
-#if	defined(__amd64__)
-
-#define	LIBELF_ARCH		EM_X86_64
-#define	LIBELF_BYTEORDER	ELFDATA2LSB
-#define	LIBELF_CLASS		ELFCLASS64
-
-#elif	defined(__i386__)
-
-#define	LIBELF_ARCH		EM_386
-#define	LIBELF_BYTEORDER	ELFDATA2LSB
-#define	LIBELF_CLASS		ELFCLASS32
-
-#else
-#error	Unknown Apple architecture.
-#endif
-
-#define	roundup2	roundup
-
-#endif  /* __APPLE__ */
-
 /*
  * GNU & Linux compatibility.
  *
@@ -173,25 +147,3 @@
 #define	roundup2	roundup
 
 #endif /* defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) */
-
-#if defined(__WIN32__) || defined(__CYGWIN__)
-
-#define	LIBELF_VCSID(ID)
-
-#if	defined(__amd64__)
-
-#define	LIBELF_ARCH		EM_X86_64
-#define	LIBELF_BYTEORDER	ELFDATA2LSB
-#define	LIBELF_CLASS		ELFCLASS64
-
-#elif	defined(__i386__)
-
-#define	LIBELF_ARCH		EM_386
-#define	LIBELF_BYTEORDER	ELFDATA2LSB
-#define	LIBELF_CLASS		ELFCLASS32
-
-#else
-#error	Unknown Apple architecture.
-#endif
-
-#endif  /* __APPLE__ */
diff --git a/rtemstoolkit/elftoolchain/libelf/elf.3 b/rtemstoolkit/elftoolchain/libelf/elf.3
index 5d86f60..f4d872a 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf.3 1730 2011-08-14 10:03:34Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 14, 2011
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf.c b/rtemstoolkit/elftoolchain/libelf/elf.c
index e3ef7f3..d7cf30f 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf.c
@@ -28,7 +28,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf.c 1345 2011-01-01 11:17:52Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 struct _libelf_globals _libelf = {
 	.libelf_arch		= LIBELF_ARCH,
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_begin.3 b/rtemstoolkit/elftoolchain/libelf/elf_begin.3
index 5a013a4..ec865c1 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_begin.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_begin.3
@@ -21,9 +21,9 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_begin.3 1925 2011-09-23 09:34:05Z jkoshy $ 
+.\" $Id$ 
 .\"
-.Dd September 23, 2011
+.Dd July 20, 2011
 .Os
 .Dt ELF_BEGIN 3
 .Sh NAME
@@ -87,7 +87,7 @@ and
 .Ar elf .
 It can be used for both
 .Xr ar 1
-archives and for ELF objects.
+archives and for regular ELF files.
 .Pp
 If argument
 .Ar elf
@@ -134,7 +134,7 @@ then the value of the argument
 is ignored.
 .It Dv ELF_C_RDWR
 This command is used to prepare an ELF file for reading and writing.
-This command is not supported for
+This command is not valid for
 .Xr ar 1
 archives.
 .Pp
@@ -170,7 +170,8 @@ Argument
 should have been opened for writing.
 Argument
 .Ar elf
-is ignored, and the previous contents of file referenced by argument
+is ignored, and the previous contents of file referenced by
+argument
 .Ar fd
 are overwritten.
 .El
@@ -247,9 +248,8 @@ The archive denoted by argument
 .Ar elf
 could not be parsed.
 .It Bq Er ELF_E_ARGUMENT
-The value in argument
-.Ar cmd
-was unrecognized.
+An unrecognized value was specified in argument
+.Ar cmd .
 .It Bq Er ELF_E_ARGUMENT
 A non-null value for argument
 .Ar elf
@@ -276,22 +276,11 @@ archive was opened with with
 .Ar cmd
 set to
 .Dv ELF_C_RDWR .
-.It Bq Er ELF_E_ARGUMENT
-The file referenced by argument
-.Ar fd
-was empty.
-.It Bq Er ELF_E_ARGUMENT
-The underlying file for argument
-.Ar fd
-was of an unsupported type.
-.It Bq Er ELF_E_IO
-The file descriptor in argument
-.Ar fd
-was invalid.
 .It Bq Er ELF_E_IO
-The file descriptor in argument
-.Ar fd
-could not be read or written to.
+Function
+.Fn elf_begin
+was unable to truncate a file opened for writing using
+.Dv ELF_C_WRITE .
 .It Bq Er ELF_E_RESOURCE
 An out of memory condition was encountered.
 .It Bq Er ELF_E_SEQUENCE
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_begin.c b/rtemstoolkit/elftoolchain/libelf/elf_begin.c
index a6c9e4a..e7ebcb4 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_begin.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_begin.c
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2006,2008-2011 Joseph Koshy
+ * Copyright (c) 2006,2008 Joseph Koshy
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -32,186 +32,69 @@
 #include <sys/stat.h>
 
 #include <ar.h>
-#include <assert.h>
 #include <ctype.h>
 #include <errno.h>
 #include <libelf.h>
-#include <stdlib.h>
 #include <unistd.h>
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_begin.c 1923 2011-09-23 09:01:13Z jkoshy $");
-
-#define	_LIBELF_INITSIZE	(64*1024)
-
-/*
- * Read from a device file, pipe or socket.
- */
-static void *
-_libelf_read_special_file(int fd, size_t *fsz)
-{
-	ssize_t readsz;
-	size_t bufsz, datasz;
-	unsigned char *buf, *t;
-
-	datasz = 0;
-	readsz = 0;
-	bufsz = _LIBELF_INITSIZE;
-	if ((buf = malloc(bufsz)) == NULL)
-		goto resourceerror;
-
-	/*
-	 * Read data from the file descriptor till we reach EOF, or
-	 * till an error is encountered.
-	 */
-	do {
-		/* Check if we need to expand the data buffer. */
-		if (datasz == bufsz) {
-			bufsz *= 2;
-			if ((t = realloc(buf, bufsz)) == NULL)
-				goto resourceerror;
-			buf = t;
-		}
-
-		do {
-			readsz = bufsz - datasz;
-			t = buf + datasz;
-			if ((readsz = read(fd, t, readsz)) <= 0)
-				break;
-			datasz += readsz;
-		} while (datasz < bufsz);
-
-	} while (readsz > 0);
-
-	if (readsz < 0) {
-		LIBELF_SET_ERROR(IO, errno);
-		goto error;
-	}
-
-	assert(readsz == 0);
-
-	/*
-	 * Free up extra buffer space.
-	 */
-	if (bufsz > datasz) {
-		if (datasz > 0) {
-			if ((t = realloc(buf, datasz)) == NULL)
-				goto resourceerror;
-			buf = t;
-		} else {	/* Zero bytes read. */
-			LIBELF_SET_ERROR(ARGUMENT, 0);
-			free(buf);
-			buf = NULL;
-		}
-	}
-
-	*fsz = datasz;
-	return (buf);
-
-resourceerror:
-	LIBELF_SET_ERROR(RESOURCE, 0);
-error:
-	if (buf != NULL)
-		free(buf);
-	return (NULL);
-}
-
+LIBELF_VCSID("$Id$");
 
 static Elf *
 _libelf_open_object(int fd, Elf_Cmd c)
 {
 	Elf *e;
 	void *m;
-	mode_t mode;
-	size_t fsize;
 	struct stat sb;
-	unsigned int flags;
-
-	assert(c == ELF_C_READ || c == ELF_C_RDWR || c == ELF_C_WRITE);
 
+	/*
+	 * 'Raw' files are always mapped with 'PROT_READ'.  At
+	 * elf_update(3) time for files opened with ELF_C_RDWR the
+	 * mapping is unmapped, file data is written to using write(2)
+	 * and then the raw data is immediately mapped back in.
+	 */
 	if (fstat(fd, &sb) < 0) {
 		LIBELF_SET_ERROR(IO, errno);
 		return (NULL);
 	}
 
-	mode = sb.st_mode;
-	fsize = (size_t) sb.st_size;
-
 	/*
-	 * Reject unsupported file types.
+	 * Restrict elf_begin(3) to regular files.
+	 *
+	 * In some operating systems, some special files can appear to
+	 * contain ELF objects (for example, /dev/ksyms in NetBSD).
+	 * If such files need to be processed using libelf,
+	 * applications can use elf_memory(3) on an appropriately
+	 * populated memory arena.
 	 */
-	if (!S_ISREG(mode) && !S_ISCHR(mode) && !S_ISFIFO(mode) &&
-	    !S_ISSOCK(mode)) {
+	if (!S_ISREG(sb.st_mode)) {
 		LIBELF_SET_ERROR(ARGUMENT, 0);
 		return (NULL);
 	}
 
-	/*
-	 * For ELF_C_WRITE mode, allocate and return a descriptor.
-	 */
-	if (c == ELF_C_WRITE) {
-		if ((e = _libelf_allocate_elf()) != NULL) {
-			_libelf_init_elf(e, ELF_K_ELF);
-			e->e_byteorder = LIBELF_PRIVATE(byteorder);
-			e->e_fd = fd;
-			e->e_cmd = c;
-			if (!S_ISREG(mode))
-				e->e_flags |= LIBELF_F_SPECIAL_FILE;
-		}
-
-		return (e);
-	}
-
-
-	/*
-	 * ELF_C_READ and ELF_C_RDWR mode.
-	 */
 	m = NULL;
-	flags = 0;
-	if (S_ISREG(mode)) {
-		/*
-		 * Always map regular files in with 'PROT_READ'
-		 * permissions.
-		 *
-		 * For objects opened in ELF_C_RDWR mode, when
-		 * elf_update(3) is called, we remove this mapping,
-		 * write file data out using write(2), and map the new
-		 * contents back.
-		 */
-		if ((m = mmap(NULL, fsize, PROT_READ, MAP_PRIVATE, fd,
-		    (off_t) 0)) == MAP_FAILED) {
-			LIBELF_SET_ERROR(IO, errno);
-			return (NULL);
-		}
-
-		flags = LIBELF_F_RAWFILE_MMAP;
-	} else if ((m = _libelf_read_special_file(fd, &fsize)) != NULL)
-		flags = LIBELF_F_RAWFILE_MALLOC | LIBELF_F_SPECIAL_FILE;
-	else
+	if ((m = mmap(NULL, (size_t) sb.st_size, PROT_READ, MAP_PRIVATE, fd,
+	    (off_t) 0)) == MAP_FAILED) {
+		LIBELF_SET_ERROR(IO, errno);
 		return (NULL);
+	}
 
-	if ((e = elf_memory(m, fsize)) == NULL) {
-		assert((flags & LIBELF_F_RAWFILE_MALLOC) ||
-		    (flags & LIBELF_F_RAWFILE_MMAP));
-		if (flags & LIBELF_F_RAWFILE_MMAP)
-			(void) munmap(m, fsize);
-		else
-			free(m);
+	if ((e = elf_memory(m, (size_t) sb.st_size)) == NULL) {
+		(void) munmap(m, (size_t) sb.st_size);
 		return (NULL);
 	}
 
-	/* ar(1) archives aren't supported in RDWR mode. */
+	e->e_flags |= LIBELF_F_MMAP;
+	e->e_fd = fd;
+	e->e_cmd = c;
+
 	if (c == ELF_C_RDWR && e->e_kind == ELF_K_AR) {
 		(void) elf_end(e);
 		LIBELF_SET_ERROR(ARGUMENT, 0);
 		return (NULL);
 	}
 
-	e->e_flags |= flags;
-	e->e_fd = fd;
-	e->e_cmd = c;
-
 	return (e);
 }
 
@@ -232,12 +115,28 @@ elf_begin(int fd, Elf_Cmd c, Elf *a)
 		return (NULL);
 
 	case ELF_C_WRITE:
+
+		if (a != NULL) { /* not allowed for ar(1) archives. */
+			LIBELF_SET_ERROR(ARGUMENT, 0);
+			return (NULL);
+		}
+
 		/*
-		 * The ELF_C_WRITE command is required to ignore the
-		 * descriptor passed in.
+		 * Check writeability of `fd' immediately and fail if
+		 * not writeable.
 		 */
-		a = NULL;
-		break;
+		if (ftruncate(fd, (off_t) 0) < 0) {
+			LIBELF_SET_ERROR(IO, errno);
+			return (NULL);
+		}
+
+		if ((e = _libelf_allocate_elf()) != NULL) {
+			_libelf_init_elf(e, ELF_K_ELF);
+			e->e_byteorder = LIBELF_PRIVATE(byteorder);
+			e->e_fd = fd;
+			e->e_cmd = c;
+		}
+		return (e);
 
 	case ELF_C_RDWR:
 		if (a != NULL) { /* not allowed for ar(1) archives. */
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_cntl.3 b/rtemstoolkit/elftoolchain/libelf/elf_cntl.3
index 32649d1..7391f19 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_cntl.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_cntl.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_cntl.3 289 2009-01-08 08:26:08Z jkoshy $ 
+.\" $Id$ 
 .\"
 .Dd August 9, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_cntl.c b/rtemstoolkit/elftoolchain/libelf/elf_cntl.c
index 2021917..797934b 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_cntl.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_cntl.c
@@ -28,7 +28,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_cntl.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 int
 elf_cntl(Elf *e, Elf_Cmd c)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_data.c b/rtemstoolkit/elftoolchain/libelf/elf_data.c
index 5ac6453..77e58ac 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_data.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_data.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_data.c 1765 2011-08-22 05:59:05Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 Elf_Data *
 elf_getdata(Elf_Scn *s, Elf_Data *d)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_end.3 b/rtemstoolkit/elftoolchain/libelf/elf_end.3
index 8649faa..5130c92 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_end.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_end.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_end.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd June 29, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_end.c b/rtemstoolkit/elftoolchain/libelf/elf_end.c
index 136ed9a..488cdb0 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_end.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_end.c
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2006,2008-2009,2011 Joseph Koshy
+ * Copyright (c) 2006,2008 Joseph Koshy
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -34,7 +34,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_end.c 1922 2011-09-23 08:04:33Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 int
 elf_end(Elf *e)
@@ -76,12 +76,8 @@ elf_end(Elf *e)
 			break;
 		}
 
-		if (e->e_rawfile) {
-			if (e->e_flags & LIBELF_F_RAWFILE_MMAP)
-				(void) munmap(e->e_rawfile, e->e_rawsize);
-			else if (e->e_flags & LIBELF_F_RAWFILE_MALLOC)
-				free(e->e_rawfile);
-		}
+		if (e->e_flags & LIBELF_F_MMAP)
+			(void) munmap(e->e_rawfile, e->e_rawsize);
 
 		sv = e;
 		if ((e = e->e_parent) != NULL)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_errmsg.3 b/rtemstoolkit/elftoolchain/libelf/elf_errmsg.3
index 822ba6a..88cabf4 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_errmsg.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_errmsg.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_errmsg.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd June 11, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_errmsg.c b/rtemstoolkit/elftoolchain/libelf/elf_errmsg.c
index 7a6e552..258e002 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_errmsg.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_errmsg.c
@@ -32,7 +32,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_errmsg.c 1345 2011-01-01 11:17:52Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 /*
  * Retrieve a human readable translation for an error message.
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_errno.c b/rtemstoolkit/elftoolchain/libelf/elf_errno.c
index 95e91b9..f20e7bc 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_errno.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_errno.c
@@ -30,7 +30,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_errno.c 1345 2011-01-01 11:17:52Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 int
 elf_errno(void)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_fill.3 b/rtemstoolkit/elftoolchain/libelf/elf_fill.3
index ab42a42..b26e91e 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_fill.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_fill.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_fill.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd June 11, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_fill.c b/rtemstoolkit/elftoolchain/libelf/elf_fill.c
index ac9e02e..50ef2db 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_fill.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_fill.c
@@ -30,7 +30,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_fill.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 void
 elf_fill(int fill)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_flag.c b/rtemstoolkit/elftoolchain/libelf/elf_flag.c
index 9d31719..b4eab78 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_flag.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_flag.c
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2006,2008-2009,2011 Joseph Koshy
+ * Copyright (c) 2006,2008 Joseph Koshy
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -30,7 +30,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_flag.c 1918 2011-09-22 10:42:06Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 unsigned int
 elf_flagarhdr(Elf_Arhdr *a, Elf_Cmd c, unsigned int flags)
@@ -51,7 +51,7 @@ elf_flagarhdr(Elf_Arhdr *a, Elf_Cmd c, unsigned int flags)
 	else
 		r = a->ar_flags &= ~flags;
 
-	return (r & LIBELF_F_API_MASK);
+	return (r & LIBELF_F_MASK);
 }
 
 unsigned int
@@ -73,7 +73,7 @@ elf_flagdata(Elf_Data *d, Elf_Cmd c, unsigned int flags)
 	else
 		r = d->d_flags &= ~flags;
 
-	return (r & LIBELF_F_API_MASK);
+	return (r & LIBELF_F_MASK);
 }
 
 unsigned int
@@ -135,7 +135,7 @@ elf_flagelf(Elf *e, Elf_Cmd c, unsigned int flags)
 		r = e->e_flags |= flags;
 	else
 		r = e->e_flags &= ~flags;
-	return (r & LIBELF_F_API_MASK);
+	return (r & LIBELF_F_MASK);
 }
 
 unsigned int
@@ -185,7 +185,7 @@ elf_flagscn(Elf_Scn *s, Elf_Cmd c, unsigned int flags)
 		r = s->s_flags |= flags;
 	else
 		r = s->s_flags &= ~flags;
-	return (r & LIBELF_F_API_MASK);
+	return (r & LIBELF_F_MASK);
 }
 
 unsigned int
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_flagdata.3 b/rtemstoolkit/elftoolchain/libelf/elf_flagdata.3
index d4fd420..5c197e8 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_flagdata.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_flagdata.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_flagdata.3 221 2008-08-10 04:56:27Z jkoshy $
+.\" $Id$
 .\"
 .Dd October 22, 2007
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getarhdr.3 b/rtemstoolkit/elftoolchain/libelf/elf_getarhdr.3
index 1aab71c..d5970e7 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getarhdr.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getarhdr.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_getarhdr.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 15, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getarhdr.c b/rtemstoolkit/elftoolchain/libelf/elf_getarhdr.c
index 43ceafd..7f4d514 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getarhdr.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getarhdr.c
@@ -30,7 +30,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_getarhdr.c 1341 2011-01-01 04:28:29Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 Elf_Arhdr *
 elf_getarhdr(Elf *e)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getarsym.3 b/rtemstoolkit/elftoolchain/libelf/elf_getarsym.3
index cda0511..b1ed5db 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getarsym.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getarsym.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_getarsym.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 15, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getarsym.c b/rtemstoolkit/elftoolchain/libelf/elf_getarsym.c
index 1852262..5709178 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getarsym.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getarsym.c
@@ -30,7 +30,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_getarsym.c 1360 2011-01-08 08:27:41Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 Elf_Arsym *
 elf_getarsym(Elf *ar, size_t *ptr)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getbase.3 b/rtemstoolkit/elftoolchain/libelf/elf_getbase.3
index fa17353..c1cd4ae 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getbase.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getbase.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_getbase.3 978 2010-06-06 12:40:19Z jkoshy $
+.\" $Id$
 .\"
 .Dd June 6, 2010
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getbase.c b/rtemstoolkit/elftoolchain/libelf/elf_getbase.c
index 30058ca..0d5479e 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getbase.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getbase.c
@@ -30,7 +30,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_getbase.c 977 2010-06-06 11:50:31Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 off_t
 elf_getbase(Elf *e)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getdata.3 b/rtemstoolkit/elftoolchain/libelf/elf_getdata.3
index 8816a5a..d3a83c1 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getdata.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getdata.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_getdata.3 1766 2011-08-22 06:01:03Z jkoshy $
+.\" $Id$
 .\"
 .Dd January 26, 2011
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getident.3 b/rtemstoolkit/elftoolchain/libelf/elf_getident.3
index 01d7f97..6e9ed47 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getident.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getident.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_getident.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd July 3, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getident.c b/rtemstoolkit/elftoolchain/libelf/elf_getident.c
index c17f3a5..b368e02 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getident.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getident.c
@@ -32,7 +32,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_getident.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 char *
 elf_getident(Elf *e, size_t *sz)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getphdrnum.3 b/rtemstoolkit/elftoolchain/libelf/elf_getphdrnum.3
index f0fae5e..55d51ea 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getphdrnum.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getphdrnum.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_getphdrnum.3 467 2009-08-05 18:18:49Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 5, 2009
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getphnum.3 b/rtemstoolkit/elftoolchain/libelf/elf_getphnum.3
index 95c7540..97aa9bc 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getphnum.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getphnum.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_getphnum.3 467 2009-08-05 18:18:49Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 5, 2009
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getscn.3 b/rtemstoolkit/elftoolchain/libelf/elf_getscn.3
index 0afe443..ba53da7 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getscn.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getscn.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_getscn.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd October 22, 2007
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getshdrnum.3 b/rtemstoolkit/elftoolchain/libelf/elf_getshdrnum.3
index e2bf354..00da4ca 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getshdrnum.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getshdrnum.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_getshdrnum.3 467 2009-08-05 18:18:49Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 4, 2009
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getshdrstrndx.3 b/rtemstoolkit/elftoolchain/libelf/elf_getshdrstrndx.3
index b02e715..51c80fc 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getshdrstrndx.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getshdrstrndx.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_getshdrstrndx.3 467 2009-08-05 18:18:49Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 5, 2009
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getshnum.3 b/rtemstoolkit/elftoolchain/libelf/elf_getshnum.3
index 615aa71..8521c7f 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getshnum.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getshnum.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_getshnum.3 467 2009-08-05 18:18:49Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 5, 2009
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_getshstrndx.3 b/rtemstoolkit/elftoolchain/libelf/elf_getshstrndx.3
index 71c6f95..534ddfb 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_getshstrndx.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_getshstrndx.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_getshstrndx.3 467 2009-08-05 18:18:49Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 5, 2009
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_hash.3 b/rtemstoolkit/elftoolchain/libelf/elf_hash.3
index f099558..70c4ac5 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_hash.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_hash.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_hash.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 15, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_hash.c b/rtemstoolkit/elftoolchain/libelf/elf_hash.c
index 12c764d..8f3f276 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_hash.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_hash.c
@@ -30,7 +30,7 @@
 
 #include "_libelf_config.h"
 
-LIBELF_VCSID("$Id: elf_hash.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 /*
  * This elf_hash function is defined by the System V ABI.
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_kind.3 b/rtemstoolkit/elftoolchain/libelf/elf_kind.3
index a5bbf9d..d5275d2 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_kind.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_kind.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_kind.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd June 1, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_kind.c b/rtemstoolkit/elftoolchain/libelf/elf_kind.c
index 0b4251a..16098bd 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_kind.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_kind.c
@@ -30,7 +30,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_kind.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 Elf_Kind
 elf_kind(Elf *e)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_memory.3 b/rtemstoolkit/elftoolchain/libelf/elf_memory.3
index 2f9da44..7943d5e 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_memory.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_memory.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_memory.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd June 28, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_memory.c b/rtemstoolkit/elftoolchain/libelf/elf_memory.c
index 691beaf..c7990cc 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_memory.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_memory.c
@@ -32,7 +32,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_memory.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 Elf *
 elf_memory(char *image, size_t sz)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_next.3 b/rtemstoolkit/elftoolchain/libelf/elf_next.3
index 859d06c..d36538a 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_next.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_next.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_next.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd June 17, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_next.c b/rtemstoolkit/elftoolchain/libelf/elf_next.c
index d6ca552..bcf87b7 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_next.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_next.c
@@ -32,7 +32,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_next.c 1678 2011-07-28 04:36:34Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 Elf_Cmd
 elf_next(Elf *e)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_phnum.c b/rtemstoolkit/elftoolchain/libelf/elf_phnum.c
index d63c490..84488da 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_phnum.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_phnum.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_phnum.c 466 2009-08-04 17:17:42Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 static int
 _libelf_getphdrnum(Elf *e, size_t *phnum)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_rand.3 b/rtemstoolkit/elftoolchain/libelf/elf_rand.3
index e5affd6..1190e1c 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_rand.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_rand.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_rand.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd June 17, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_rand.c b/rtemstoolkit/elftoolchain/libelf/elf_rand.c
index 2e7328a..953ff4d 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_rand.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_rand.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_rand.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 off_t
 elf_rand(Elf *ar, off_t offset)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_rawfile.3 b/rtemstoolkit/elftoolchain/libelf/elf_rawfile.3
index a713b42..3b0b929 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_rawfile.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_rawfile.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_rawfile.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd July 3, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_rawfile.c b/rtemstoolkit/elftoolchain/libelf/elf_rawfile.c
index 22a9f95..cce0637 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_rawfile.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_rawfile.c
@@ -30,7 +30,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_rawfile.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 char *
 elf_rawfile(Elf *e, size_t *sz)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_scn.c b/rtemstoolkit/elftoolchain/libelf/elf_scn.c
index 80444fd..232efaf 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_scn.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_scn.c
@@ -36,7 +36,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_scn.c 1077 2010-08-09 15:37:40Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 /*
  * Load an ELF section table and create a list of Elf_Scn structures.
@@ -95,7 +95,7 @@ _libelf_load_section_headers(Elf *e, void *ehdr)
 	if (!STAILQ_EMPTY(&e->e_u.e_elf.e_scn)) {
 		assert(STAILQ_FIRST(&e->e_u.e_elf.e_scn) ==
 		    STAILQ_LAST(&e->e_u.e_elf.e_scn, _Elf_Scn, s_next));
-    
+
 		i = 1;
 		src += fsz;
 	}
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_shnum.c b/rtemstoolkit/elftoolchain/libelf/elf_shnum.c
index 515027a..ba0447e 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_shnum.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_shnum.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_shnum.c 466 2009-08-04 17:17:42Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 static int
 _libelf_getshdrnum(Elf *e, size_t *shnum)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_shstrndx.c b/rtemstoolkit/elftoolchain/libelf/elf_shstrndx.c
index bac14b4..0fe2f9f 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_shstrndx.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_shstrndx.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_shstrndx.c 466 2009-08-04 17:17:42Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 static int
 _libelf_getshdrstrndx(Elf *e, size_t *strndx)
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_strptr.3 b/rtemstoolkit/elftoolchain/libelf/elf_strptr.3
index 31e0f83..e4882e9 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_strptr.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_strptr.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_strptr.3 1081 2010-08-14 02:23:48Z jkoshy $
+.\" $Id$
 .\"
 .Dd December 16, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_strptr.c b/rtemstoolkit/elftoolchain/libelf/elf_strptr.c
index bfa39de..b96a7dd 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_strptr.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_strptr.c
@@ -29,7 +29,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_strptr.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 /*
  * Convert an ELF section#,offset pair to a string pointer.
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_types.m4 b/rtemstoolkit/elftoolchain/libelf/elf_types.m4
index 9e9680d..e23cfd9 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_types.m4
+++ b/rtemstoolkit/elftoolchain/libelf/elf_types.m4
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: elf_types.m4 321 2009-03-07 16:59:14Z jkoshy $
+ * $Id$
  */
 
 /*
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_update.3 b/rtemstoolkit/elftoolchain/libelf/elf_update.3
index 40a1e40..71b3437 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_update.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_update.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_update.3 1729 2011-08-14 09:13:00Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 14, 2011
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_update.c b/rtemstoolkit/elftoolchain/libelf/elf_update.c
index 9806131..34b944e 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_update.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_update.c
@@ -25,7 +25,6 @@
  */
 
 #include <sys/mman.h>
-#include <sys/stat.h>
 
 #include <assert.h>
 #include <errno.h>
@@ -37,7 +36,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_update.c 1922 2011-09-23 08:04:33Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 /*
  * Layout strategy:
@@ -987,7 +986,7 @@ _libelf_write_elf(Elf *e, off_t newsize, struct _Elf_Extent_List *extents)
 	struct _Elf_Extent *ex;
 
 	assert(e->e_kind == ELF_K_ELF);
-	assert(e->e_cmd == ELF_C_RDWR || e->e_cmd == ELF_C_WRITE);
+	assert(e->e_cmd != ELF_C_READ);
 	assert(e->e_fd >= 0);
 
 	if ((newfile = malloc((size_t) newsize)) == NULL) {
@@ -1038,57 +1037,35 @@ _libelf_write_elf(Elf *e, off_t newsize, struct _Elf_Extent_List *extents)
 	assert(rc == newsize);
 
 	/*
-	 * For regular files, throw away existing file content and
-	 * unmap any existing mappings.
+	 * Write out the constructed contents and remap the file in
+	 * read-only.
 	 */
-	if ((e->e_flags & LIBELF_F_SPECIAL_FILE) == 0) {
-		if (ftruncate(e->e_fd, (off_t) 0) < 0 ||
-		    lseek(e->e_fd, (off_t) 0, SEEK_SET)) {
-			LIBELF_SET_ERROR(IO, errno);
-			goto error;
-		}
-		if (e->e_flags & LIBELF_F_RAWFILE_MMAP) {
-			assert(e->e_rawfile != NULL);
-			assert(e->e_cmd == ELF_C_RDWR);
-			if (munmap(e->e_rawfile, e->e_rawsize) < 0) {
-				LIBELF_SET_ERROR(IO, errno);
-				goto error;
-			}
-		}
+
+	if (e->e_rawfile && munmap(e->e_rawfile, e->e_rawsize) < 0) {
+		LIBELF_SET_ERROR(IO, errno);
+		goto error;
 	}
 
-	/*
-	 * Write out the new contents.
-	 */
-	if (write(e->e_fd, newfile, (size_t) newsize) != newsize) {
+	if (write(e->e_fd, newfile, (size_t) newsize) != newsize ||
+	    lseek(e->e_fd, (off_t) 0, SEEK_SET) < 0) {
 		LIBELF_SET_ERROR(IO, errno);
 		goto error;
 	}
 
-	/*
-	 * For files opened in ELF_C_RDWR mode, set up the new 'raw'
-	 * contents.
-	 */
-	if (e->e_cmd == ELF_C_RDWR) {
-		assert(e->e_rawfile != NULL);
-		if (e->e_flags & LIBELF_F_RAWFILE_MMAP) {
-			if ((e->e_rawfile = mmap(NULL, (size_t) newsize,
-			    PROT_READ, MAP_PRIVATE, e->e_fd, (off_t) 0)) ==
-			    MAP_FAILED) {
-				LIBELF_SET_ERROR(IO, errno);
-				goto error;
-			}
-		} else if (e->e_flags & LIBELF_F_RAWFILE_MALLOC) {
-			free(e->e_rawfile);
-			e->e_rawfile = newfile;
-			newfile = NULL;
+	if (e->e_cmd != ELF_C_WRITE) {
+
+		if (e->e_rawsize > (size_t) newsize &&
+		    ftruncate(e->e_fd, newsize) < 0) {
+			LIBELF_SET_ERROR(IO, errno);
+			goto error;
 		}
 
-		/* Record the new size of the file. */
+		if ((e->e_rawfile = mmap(NULL, (size_t) newsize, PROT_READ,
+		    MAP_PRIVATE, e->e_fd, (off_t) 0)) == MAP_FAILED) {
+			LIBELF_SET_ERROR(IO, errno);
+			goto error;
+		}
 		e->e_rawsize = newsize;
-	} else {
-		/* File opened in ELF_C_WRITE mode. */
-		assert(e->e_rawfile == NULL);
 	}
 
 	/*
@@ -1118,9 +1095,7 @@ _libelf_write_elf(Elf *e, off_t newsize, struct _Elf_Extent_List *extents)
 		e->e_u.e_elf.e_phdr.e_phdr64 = NULL;
 	}
 
-	/* Free the temporary buffer. */
-	if (newfile)
-		free(newfile);
+	free(newfile);
 
 	return (rc);
 
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_version.3 b/rtemstoolkit/elftoolchain/libelf/elf_version.3
index b09fb47..3c5e01a 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_version.3
+++ b/rtemstoolkit/elftoolchain/libelf/elf_version.3
@@ -21,9 +21,9 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: elf_version.3 2123 2011-11-09 15:40:09Z jkoshy $
+.\" $Id$
 .\"
-.Dd November 9, 2011
+.Dd June 1, 2006
 .Os
 .Dt ELF_VERSION 3
 .Sh NAME
@@ -80,7 +80,7 @@ operating version and check for an error using the following code
 snippet:
 .Bd -literal -offset indent
 if (elf_version(EV_CURRENT) == EV_NONE)
-	err(EXIT_FAILURE, "ELF library too old");
+	err(EX_SOFTWARE, "ELF library too old");
 .Ed
 .Sh ERRORS
 Function
diff --git a/rtemstoolkit/elftoolchain/libelf/elf_version.c b/rtemstoolkit/elftoolchain/libelf/elf_version.c
index 48950f4..71b3108 100644
--- a/rtemstoolkit/elftoolchain/libelf/elf_version.c
+++ b/rtemstoolkit/elftoolchain/libelf/elf_version.c
@@ -30,7 +30,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: elf_version.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 unsigned int
 elf_version(unsigned int v)
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf.3 b/rtemstoolkit/elftoolchain/libelf/gelf.3
index a5d68ce..42dc938 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd September 1, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf.h b/rtemstoolkit/elftoolchain/libelf/gelf.h
index 0a7dc24..cb5135c 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf.h
+++ b/rtemstoolkit/elftoolchain/libelf/gelf.h
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: gelf.h 1168 2010-09-04 01:03:25Z jkoshy $
+ * $Id$
  */
 
 #ifndef	_GELF_H_
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_cap.c b/rtemstoolkit/elftoolchain/libelf/gelf_cap.c
index af0b388..8ed864e 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_cap.c
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_cap.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: gelf_cap.c 1166 2010-09-04 00:54:36Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 GElf_Cap *
 gelf_getcap(Elf_Data *d, int ndx, GElf_Cap *dst)
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_checksum.3 b/rtemstoolkit/elftoolchain/libelf/gelf_checksum.3
index e5f845f..03d4022 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_checksum.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_checksum.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_checksum.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 29, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_checksum.c b/rtemstoolkit/elftoolchain/libelf/gelf_checksum.c
index 30fbb97..10c7b47 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_checksum.c
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_checksum.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: gelf_checksum.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 long
 elf32_checksum(Elf *e)
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_dyn.c b/rtemstoolkit/elftoolchain/libelf/gelf_dyn.c
index 6a2885c..fd568aa 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_dyn.c
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_dyn.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: gelf_dyn.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 GElf_Dyn *
 gelf_getdyn(Elf_Data *d, int ndx, GElf_Dyn *dst)
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_ehdr.c b/rtemstoolkit/elftoolchain/libelf/gelf_ehdr.c
index 37ccce8..b237295 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_ehdr.c
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_ehdr.c
@@ -33,7 +33,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: gelf_ehdr.c 1678 2011-07-28 04:36:34Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 Elf32_Ehdr *
 elf32_getehdr(Elf *e)
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_fsize.3 b/rtemstoolkit/elftoolchain/libelf/gelf_fsize.3
index ac7996f..48b7320 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_fsize.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_fsize.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_fsize.3 317 2009-03-06 17:29:22Z jkoshy $
+.\" $Id$
 .\"
 .Dd February 5, 2008
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_fsize.c b/rtemstoolkit/elftoolchain/libelf/gelf_fsize.c
index 0e38d14..c02e91b 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_fsize.c
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_fsize.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: gelf_fsize.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 size_t
 elf32_fsize(Elf_Type t, size_t c, unsigned int v)
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_getcap.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getcap.3
index ed8eb02..960bf8f 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_getcap.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_getcap.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_getcap.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 29, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_getclass.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getclass.3
index 3504569..84cc652 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_getclass.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_getclass.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_getclass.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd July 3, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_getclass.c b/rtemstoolkit/elftoolchain/libelf/gelf_getclass.c
index 349a9cd..82fd50e 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_getclass.c
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_getclass.c
@@ -30,7 +30,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: gelf_getclass.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 int
 gelf_getclass(Elf *e)
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_getdyn.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getdyn.3
index f8c1778..0624824 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_getdyn.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_getdyn.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_getdyn.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 29, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_getehdr.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getehdr.3
index 56bdcd4..2f81239 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_getehdr.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_getehdr.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_getehdr.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd December 16, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_getmove.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getmove.3
index 871a040..a3e70c0 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_getmove.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_getmove.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_getmove.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 29, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_getphdr.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getphdr.3
index f2d38aa..fe863f2 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_getphdr.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_getphdr.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_getphdr.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd October 21, 2007
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_getrel.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getrel.3
index c7566e6..66aefa1 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_getrel.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_getrel.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_getrel.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 29, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_getrela.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getrela.3
index c77d52a..341c821 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_getrela.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_getrela.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_getrela.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 29, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_getshdr.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getshdr.3
index e92d414..cef1dc3 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_getshdr.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_getshdr.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_getshdr.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 27, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_getsym.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getsym.3
index 98d886f..4ce8a38 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_getsym.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_getsym.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_getsym.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 29, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_getsyminfo.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getsyminfo.3
index a1169f8..ed60335 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_getsyminfo.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_getsyminfo.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_getsyminfo.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 29, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_getsymshndx.3 b/rtemstoolkit/elftoolchain/libelf/gelf_getsymshndx.3
index b635aac..7d5a19c 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_getsymshndx.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_getsymshndx.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_getsymshndx.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd November 5, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_move.c b/rtemstoolkit/elftoolchain/libelf/gelf_move.c
index 753aba9..da99c10 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_move.c
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_move.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: gelf_move.c 1166 2010-09-04 00:54:36Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 GElf_Move *
 gelf_getmove(Elf_Data *d, int ndx, GElf_Move *dst)
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_newehdr.3 b/rtemstoolkit/elftoolchain/libelf/gelf_newehdr.3
index 180fea9..88fc0d1 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_newehdr.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_newehdr.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_newehdr.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd October 22, 2007
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_newphdr.3 b/rtemstoolkit/elftoolchain/libelf/gelf_newphdr.3
index 931385e..b8e7072 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_newphdr.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_newphdr.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_newphdr.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd October 22, 2007
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_phdr.c b/rtemstoolkit/elftoolchain/libelf/gelf_phdr.c
index 47000d8..0a9ae5f 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_phdr.c
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_phdr.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: gelf_phdr.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 Elf32_Phdr *
 elf32_getphdr(Elf *e)
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_rel.c b/rtemstoolkit/elftoolchain/libelf/gelf_rel.c
index 7d0b6af..dcff3d1 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_rel.c
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_rel.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: gelf_rel.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 GElf_Rel *
 gelf_getrel(Elf_Data *d, int ndx, GElf_Rel *dst)
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_rela.c b/rtemstoolkit/elftoolchain/libelf/gelf_rela.c
index 722c1ad..56e57a4 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_rela.c
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_rela.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: gelf_rela.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 GElf_Rela *
 gelf_getrela(Elf_Data *d, int ndx, GElf_Rela *dst)
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_shdr.c b/rtemstoolkit/elftoolchain/libelf/gelf_shdr.c
index 47e56e9..9aabef0 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_shdr.c
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_shdr.c
@@ -32,7 +32,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: gelf_shdr.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 Elf32_Shdr *
 elf32_getshdr(Elf_Scn *s)
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_sym.c b/rtemstoolkit/elftoolchain/libelf/gelf_sym.c
index 3f84a17..86a34a8 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_sym.c
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_sym.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: gelf_sym.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 GElf_Sym *
 gelf_getsym(Elf_Data *d, int ndx, GElf_Sym *dst)
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_syminfo.c b/rtemstoolkit/elftoolchain/libelf/gelf_syminfo.c
index 2e8d9d8..57ad5be 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_syminfo.c
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_syminfo.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: gelf_syminfo.c 1166 2010-09-04 00:54:36Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 GElf_Syminfo *
 gelf_getsyminfo(Elf_Data *d, int ndx, GElf_Syminfo *dst)
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_symshndx.c b/rtemstoolkit/elftoolchain/libelf/gelf_symshndx.c
index ab3549c..4a8a6d3 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_symshndx.c
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_symshndx.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: gelf_symshndx.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 GElf_Sym *
 gelf_getsymshndx(Elf_Data *d, Elf_Data *id, int ndx, GElf_Sym *dst,
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_update_ehdr.3 b/rtemstoolkit/elftoolchain/libelf/gelf_update_ehdr.3
index f5e041d..6bba9cd 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_update_ehdr.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_update_ehdr.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_update_ehdr.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd August 27, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_xlate.c b/rtemstoolkit/elftoolchain/libelf/gelf_xlate.c
index 6cdf705..6573a02 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_xlate.c
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_xlate.c
@@ -32,7 +32,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: gelf_xlate.c 1678 2011-07-28 04:36:34Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 Elf_Data *
 elf32_xlatetof(Elf_Data *dst, const Elf_Data *src, unsigned int encoding)
diff --git a/rtemstoolkit/elftoolchain/libelf/gelf_xlatetof.3 b/rtemstoolkit/elftoolchain/libelf/gelf_xlatetof.3
index ca90002..c7443c8 100644
--- a/rtemstoolkit/elftoolchain/libelf/gelf_xlatetof.3
+++ b/rtemstoolkit/elftoolchain/libelf/gelf_xlatetof.3
@@ -21,7 +21,7 @@
 .\" out of the use of this software, even if advised of the possibility of
 .\" such damage.
 .\"
-.\" $Id: gelf_xlatetof.3 189 2008-07-20 10:38:08Z jkoshy $
+.\" $Id$
 .\"
 .Dd July 24, 2006
 .Os
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf.h b/rtemstoolkit/elftoolchain/libelf/libelf.h
index 60b0f1c..3974cf1 100644
--- a/rtemstoolkit/elftoolchain/libelf/libelf.h
+++ b/rtemstoolkit/elftoolchain/libelf/libelf.h
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $Id: libelf.h 1345 2011-01-01 11:17:52Z jkoshy $
+ * $Id$
  */
 
 #ifndef	_LIBELF_H_
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf_align.c b/rtemstoolkit/elftoolchain/libelf/libelf_align.c
index 55a65f9..34a2845 100644
--- a/rtemstoolkit/elftoolchain/libelf/libelf_align.c
+++ b/rtemstoolkit/elftoolchain/libelf/libelf_align.c
@@ -32,7 +32,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: libelf_align.c 1169 2010-09-04 01:06:31Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 struct align {
 	int a32;
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf_allocate.c b/rtemstoolkit/elftoolchain/libelf/libelf_allocate.c
index a753e8e..2ebcf05 100644
--- a/rtemstoolkit/elftoolchain/libelf/libelf_allocate.c
+++ b/rtemstoolkit/elftoolchain/libelf/libelf_allocate.c
@@ -40,7 +40,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: libelf_allocate.c 1341 2011-01-01 04:28:29Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 Elf *
 _libelf_allocate_elf(void)
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf_ar.c b/rtemstoolkit/elftoolchain/libelf/libelf_ar.c
index 14b383d..879a570 100644
--- a/rtemstoolkit/elftoolchain/libelf/libelf_ar.c
+++ b/rtemstoolkit/elftoolchain/libelf/libelf_ar.c
@@ -35,7 +35,7 @@
 #include "_libelf.h"
 #include "_libelf_ar.h"
 
-LIBELF_VCSID("$Id: libelf_ar.c 1341 2011-01-01 04:28:29Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 #define	LIBELF_NALLOC_SIZE	16
 
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf_ar_util.c b/rtemstoolkit/elftoolchain/libelf/libelf_ar_util.c
index 7051fe8..f26a04a 100644
--- a/rtemstoolkit/elftoolchain/libelf/libelf_ar_util.c
+++ b/rtemstoolkit/elftoolchain/libelf/libelf_ar_util.c
@@ -34,7 +34,7 @@
 #include "_libelf.h"
 #include "_libelf_ar.h"
 
-LIBELF_VCSID("$Id: libelf_ar_util.c 2066 2011-10-26 15:40:28Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 /*
  * Convert a string bounded by `start' and `start+sz' (exclusive) to a
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf_checksum.c b/rtemstoolkit/elftoolchain/libelf/libelf_checksum.c
index 0bece9a..dbedf98 100644
--- a/rtemstoolkit/elftoolchain/libelf/libelf_checksum.c
+++ b/rtemstoolkit/elftoolchain/libelf/libelf_checksum.c
@@ -30,7 +30,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: libelf_checksum.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 static unsigned long
 _libelf_sum(unsigned long c, const unsigned char *s, size_t size)
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf_convert.m4 b/rtemstoolkit/elftoolchain/libelf/libelf_convert.m4
index 9b1679a..4b68607 100644
--- a/rtemstoolkit/elftoolchain/libelf/libelf_convert.m4
+++ b/rtemstoolkit/elftoolchain/libelf/libelf_convert.m4
@@ -32,7 +32,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: libelf_convert.m4 1734 2011-08-16 09:55:07Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 /* WARNING: GENERATED FROM __file__. */
 
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf_data.c b/rtemstoolkit/elftoolchain/libelf/libelf_data.c
index 8044c74..c5424f4 100644
--- a/rtemstoolkit/elftoolchain/libelf/libelf_data.c
+++ b/rtemstoolkit/elftoolchain/libelf/libelf_data.c
@@ -30,7 +30,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: libelf_data.c 1264 2010-11-12 14:53:23Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 int
 _libelf_xlate_shtype(uint32_t sht)
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf_ehdr.c b/rtemstoolkit/elftoolchain/libelf/libelf_ehdr.c
index affe541..8b04fc0 100644
--- a/rtemstoolkit/elftoolchain/libelf/libelf_ehdr.c
+++ b/rtemstoolkit/elftoolchain/libelf/libelf_ehdr.c
@@ -33,7 +33,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: libelf_ehdr.c 1677 2011-07-28 04:35:53Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 /*
  * Retrieve counts for sections, phdrs and the section string table index
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf_extended.c b/rtemstoolkit/elftoolchain/libelf/libelf_extended.c
index 10590bb..985f7d5 100644
--- a/rtemstoolkit/elftoolchain/libelf/libelf_extended.c
+++ b/rtemstoolkit/elftoolchain/libelf/libelf_extended.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: libelf_extended.c 1360 2011-01-08 08:27:41Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 /*
  * Retrieve section #0, allocating a new section if needed.
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf_fsize.m4 b/rtemstoolkit/elftoolchain/libelf/libelf_fsize.m4
index 4829789..436fbcf 100644
--- a/rtemstoolkit/elftoolchain/libelf/libelf_fsize.m4
+++ b/rtemstoolkit/elftoolchain/libelf/libelf_fsize.m4
@@ -28,7 +28,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: libelf_fsize.m4 1724 2011-08-13 05:35:42Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 /* WARNING: GENERATED FROM __file__. */
 
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf_msize.m4 b/rtemstoolkit/elftoolchain/libelf/libelf_msize.m4
index 95621fb..4340947 100644
--- a/rtemstoolkit/elftoolchain/libelf/libelf_msize.m4
+++ b/rtemstoolkit/elftoolchain/libelf/libelf_msize.m4
@@ -32,7 +32,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: libelf_msize.m4 1724 2011-08-13 05:35:42Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 /* WARNING: GENERATED FROM __file__. */
 
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf_phdr.c b/rtemstoolkit/elftoolchain/libelf/libelf_phdr.c
index 5a5bb5f..e01b8ee 100644
--- a/rtemstoolkit/elftoolchain/libelf/libelf_phdr.c
+++ b/rtemstoolkit/elftoolchain/libelf/libelf_phdr.c
@@ -33,7 +33,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: libelf_phdr.c 1677 2011-07-28 04:35:53Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 void *
 _libelf_getphdr(Elf *e, int ec)
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf_shdr.c b/rtemstoolkit/elftoolchain/libelf/libelf_shdr.c
index a696cef..c96e59d 100644
--- a/rtemstoolkit/elftoolchain/libelf/libelf_shdr.c
+++ b/rtemstoolkit/elftoolchain/libelf/libelf_shdr.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: libelf_shdr.c 189 2008-07-20 10:38:08Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 void *
 _libelf_getshdr(Elf_Scn *s, int ec)
diff --git a/rtemstoolkit/elftoolchain/libelf/libelf_xlate.c b/rtemstoolkit/elftoolchain/libelf/libelf_xlate.c
index ace4e09..4633af9 100644
--- a/rtemstoolkit/elftoolchain/libelf/libelf_xlate.c
+++ b/rtemstoolkit/elftoolchain/libelf/libelf_xlate.c
@@ -31,7 +31,7 @@
 
 #include "_libelf.h"
 
-LIBELF_VCSID("$Id: libelf_xlate.c 316 2009-02-28 16:08:44Z jkoshy $");
+LIBELF_VCSID("$Id$");
 
 /*
  * Translate to/from the file representation of ELF objects.
diff --git a/rtemstoolkit/elftoolchain/libelf/os.FreeBSD.mk b/rtemstoolkit/elftoolchain/libelf/os.FreeBSD.mk
index 72834b7..209b6fa 100644
--- a/rtemstoolkit/elftoolchain/libelf/os.FreeBSD.mk
+++ b/rtemstoolkit/elftoolchain/libelf/os.FreeBSD.mk
@@ -1,7 +1,7 @@
 #
 # Building for a FreeBSD target.
 #
-# $Id: os.FreeBSD.mk 710 2010-02-17 14:21:38Z jkoshy $
+# $Id$
 
 # Symbol versioning support [FreeBSD 7.X and later]
 VERSION_MAP=		${.CURDIR}/Version.map
diff --git a/rtemstoolkit/elftoolchain/libelf/os.NetBSD.mk b/rtemstoolkit/elftoolchain/libelf/os.NetBSD.mk
index 96b8335..3c7d6f7 100644
--- a/rtemstoolkit/elftoolchain/libelf/os.NetBSD.mk
+++ b/rtemstoolkit/elftoolchain/libelf/os.NetBSD.mk
@@ -1,7 +1,7 @@
 #
 # Build recipes for NetBSD.
 #
-# $Id: os.NetBSD.mk 710 2010-02-17 14:21:38Z jkoshy $
+# $Id$
 #
 
 MKLINT=		no		# lint dies with a sigbus




More information about the vc mailing list