Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/FreeBSD]: src/external/bsd/libelf/dist Import the libelf from FreeBSD 8....



details:   https://anonhg.NetBSD.org/src/rev/dacd78036141
branches:  FreeBSD
changeset: 319379:dacd78036141
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Dec 19 05:43:39 2009 +0000

description:
Import the libelf from FreeBSD 8.0-RC3.

diffstat:

 external/bsd/libelf/dist/Makefile           |  163 ++++
 external/bsd/libelf/dist/README             |   12 +
 external/bsd/libelf/dist/Version.map        |  102 +++
 external/bsd/libelf/dist/_libelf.h          |  195 +++++
 external/bsd/libelf/dist/elf.3              |  581 +++++++++++++++++
 external/bsd/libelf/dist/elf_begin.3        |  283 ++++++++
 external/bsd/libelf/dist/elf_begin.c        |  159 ++++
 external/bsd/libelf/dist/elf_cntl.3         |  113 +++
 external/bsd/libelf/dist/elf_cntl.c         |   62 +
 external/bsd/libelf/dist/elf_data.c         |  227 ++++++
 external/bsd/libelf/dist/elf_end.3          |   78 ++
 external/bsd/libelf/dist/elf_end.c          |   91 ++
 external/bsd/libelf/dist/elf_errmsg.3       |  109 +++
 external/bsd/libelf/dist/elf_errmsg.c       |  103 +++
 external/bsd/libelf/dist/elf_errno.c        |   61 +
 external/bsd/libelf/dist/elf_fill.3         |   54 +
 external/bsd/libelf/dist/elf_fill.c         |   41 +
 external/bsd/libelf/dist/elf_flag.c         |  167 +++++
 external/bsd/libelf/dist/elf_flagdata.3     |  161 ++++
 external/bsd/libelf/dist/elf_getarhdr.3     |   99 +++
 external/bsd/libelf/dist/elf_getarhdr.c     |   51 +
 external/bsd/libelf/dist/elf_getarsym.3     |  132 ++++
 external/bsd/libelf/dist/elf_getarsym.c     |   59 +
 external/bsd/libelf/dist/elf_getbase.3      |   69 ++
 external/bsd/libelf/dist/elf_getbase.c      |   48 +
 external/bsd/libelf/dist/elf_getdata.3      |  174 +++++
 external/bsd/libelf/dist/elf_getident.3     |   85 ++
 external/bsd/libelf/dist/elf_getident.c     |   70 ++
 external/bsd/libelf/dist/elf_getphnum.3     |   89 ++
 external/bsd/libelf/dist/elf_getscn.3       |  153 ++++
 external/bsd/libelf/dist/elf_getshnum.3     |   80 ++
 external/bsd/libelf/dist/elf_getshstrndx.3  |   89 ++
 external/bsd/libelf/dist/elf_hash.3         |   59 +
 external/bsd/libelf/dist/elf_hash.c         |   57 +
 external/bsd/libelf/dist/elf_kind.3         |   73 ++
 external/bsd/libelf/dist/elf_kind.c         |   46 +
 external/bsd/libelf/dist/elf_memory.3       |  124 +++
 external/bsd/libelf/dist/elf_memory.c       |   94 ++
 external/bsd/libelf/dist/elf_next.3         |   98 ++
 external/bsd/libelf/dist/elf_next.c         |   64 +
 external/bsd/libelf/dist/elf_phnum.c        |   56 +
 external/bsd/libelf/dist/elf_rand.3         |  120 +++
 external/bsd/libelf/dist/elf_rand.c         |   61 +
 external/bsd/libelf/dist/elf_rawfile.3      |   78 ++
 external/bsd/libelf/dist/elf_rawfile.c      |   55 +
 external/bsd/libelf/dist/elf_scn.c          |  231 +++++++
 external/bsd/libelf/dist/elf_shnum.c        |   56 +
 external/bsd/libelf/dist/elf_shstrndx.c     |   72 ++
 external/bsd/libelf/dist/elf_strptr.3       |  118 +++
 external/bsd/libelf/dist/elf_strptr.c       |  136 ++++
 external/bsd/libelf/dist/elf_types.m4       |  316 +++++++++
 external/bsd/libelf/dist/elf_update.3       |  288 ++++++++
 external/bsd/libelf/dist/elf_update.c       |  919 ++++++++++++++++++++++++++++
 external/bsd/libelf/dist/elf_version.3      |   97 ++
 external/bsd/libelf/dist/elf_version.c      |   54 +
 external/bsd/libelf/dist/gelf.3             |  203 ++++++
 external/bsd/libelf/dist/gelf.h             |  115 +++
 external/bsd/libelf/dist/gelf_cap.c         |  153 ++++
 external/bsd/libelf/dist/gelf_checksum.3    |  117 +++
 external/bsd/libelf/dist/gelf_checksum.c    |   60 +
 external/bsd/libelf/dist/gelf_dyn.c         |  147 ++++
 external/bsd/libelf/dist/gelf_ehdr.c        |  170 +++++
 external/bsd/libelf/dist/gelf_fsize.3       |   96 ++
 external/bsd/libelf/dist/gelf_fsize.c       |   64 +
 external/bsd/libelf/dist/gelf_getcap.3      |  123 +++
 external/bsd/libelf/dist/gelf_getclass.3    |   63 +
 external/bsd/libelf/dist/gelf_getclass.c    |   41 +
 external/bsd/libelf/dist/gelf_getdyn.3      |  125 +++
 external/bsd/libelf/dist/gelf_getehdr.3     |  125 +++
 external/bsd/libelf/dist/gelf_getmove.3     |  122 +++
 external/bsd/libelf/dist/gelf_getphdr.3     |  143 ++++
 external/bsd/libelf/dist/gelf_getrel.3      |  123 +++
 external/bsd/libelf/dist/gelf_getrela.3     |  123 +++
 external/bsd/libelf/dist/gelf_getshdr.3     |  117 +++
 external/bsd/libelf/dist/gelf_getsym.3      |  127 +++
 external/bsd/libelf/dist/gelf_getsyminfo.3  |  117 +++
 external/bsd/libelf/dist/gelf_getsymshndx.3 |  164 ++++
 external/bsd/libelf/dist/gelf_move.c        |  159 ++++
 external/bsd/libelf/dist/gelf_newehdr.3     |  187 +++++
 external/bsd/libelf/dist/gelf_newphdr.3     |  135 ++++
 external/bsd/libelf/dist/gelf_phdr.c        |  181 +++++
 external/bsd/libelf/dist/gelf_rel.c         |  156 ++++
 external/bsd/libelf/dist/gelf_rela.c        |  159 ++++
 external/bsd/libelf/dist/gelf_shdr.c        |  134 ++++
 external/bsd/libelf/dist/gelf_sym.c         |  157 ++++
 external/bsd/libelf/dist/gelf_syminfo.c     |  154 ++++
 external/bsd/libelf/dist/gelf_symshndx.c    |  132 ++++
 external/bsd/libelf/dist/gelf_update_ehdr.3 |  125 +++
 external/bsd/libelf/dist/gelf_xlate.c       |   82 ++
 external/bsd/libelf/dist/gelf_xlatetof.3    |  249 +++++++
 external/bsd/libelf/dist/libelf.c           |   64 +
 external/bsd/libelf/dist/libelf.h           |  253 +++++++
 external/bsd/libelf/dist/libelf_align.c     |  157 ++++
 external/bsd/libelf/dist/libelf_allocate.c  |  212 ++++++
 external/bsd/libelf/dist/libelf_ar.c        |  487 ++++++++++++++
 external/bsd/libelf/dist/libelf_checksum.c  |  102 +++
 external/bsd/libelf/dist/libelf_convert.m4  |  667 ++++++++++++++++++++
 external/bsd/libelf/dist/libelf_data.c      |   89 ++
 external/bsd/libelf/dist/libelf_ehdr.c      |  207 ++++++
 external/bsd/libelf/dist/libelf_extended.c  |  139 ++++
 external/bsd/libelf/dist/libelf_fsize.m4    |  157 ++++
 external/bsd/libelf/dist/libelf_msize.m4    |  110 +++
 external/bsd/libelf/dist/libelf_phdr.c      |  160 ++++
 external/bsd/libelf/dist/libelf_shdr.c      |   58 +
 external/bsd/libelf/dist/libelf_xlate.c     |  146 ++++
 105 files changed, 14888 insertions(+), 0 deletions(-)

diffs (truncated from 15308 to 300 lines):

diff -r c9b27ecad83f -r dacd78036141 external/bsd/libelf/dist/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libelf/dist/Makefile Sat Dec 19 05:43:39 2009 +0000
@@ -0,0 +1,163 @@
+# $FreeBSD: src/lib/libelf/Makefile,v 1.6.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $
+
+LIB=   elf
+
+SRCS=  elf_begin.c                                             \
+       elf_cntl.c                                              \
+       elf_end.c elf_errmsg.c elf_errno.c                      \
+       elf_data.c                                              \
+       elf_fill.c                                              \
+       elf_flag.c                                              \
+       elf_getarhdr.c                                          \
+       elf_getarsym.c                                          \
+       elf_getbase.c                                           \
+       elf_getident.c                                          \
+       elf_hash.c                                              \
+       elf_kind.c                                              \
+       elf_memory.c                                            \
+       elf_next.c                                              \
+       elf_rand.c                                              \
+       elf_rawfile.c                                           \
+       elf_phnum.c                                             \
+       elf_shnum.c                                             \
+       elf_shstrndx.c                                          \
+       elf_scn.c                                               \
+       elf_strptr.c                                            \
+       elf_update.c                                            \
+       elf_version.c                                           \
+       gelf_cap.c                                              \
+       gelf_checksum.c                                         \
+       gelf_dyn.c                                              \
+       gelf_ehdr.c                                             \
+       gelf_getclass.c                                         \
+       gelf_fsize.c                                            \
+       gelf_move.c                                             \
+       gelf_phdr.c                                             \
+       gelf_rel.c                                              \
+       gelf_rela.c                                             \
+       gelf_shdr.c                                             \
+       gelf_sym.c                                              \
+       gelf_syminfo.c                                          \
+       gelf_symshndx.c                                         \
+       gelf_xlate.c                                            \
+       libelf.c                                                \
+       libelf_align.c                                          \
+       libelf_allocate.c                                       \
+       libelf_ar.c                                             \
+       libelf_checksum.c                                       \
+       libelf_data.c                                           \
+       libelf_ehdr.c                                           \
+       libelf_extended.c                                       \
+       libelf_phdr.c                                           \
+       libelf_shdr.c                                           \
+       libelf_xlate.c                                          \
+       ${GENSRCS}
+INCS=  libelf.h gelf.h
+
+GENSRCS=       libelf_fsize.c libelf_msize.c libelf_convert.c
+CLEANFILES=    ${GENSRCS}
+CFLAGS+=       -I. -I${.CURDIR}
+
+SHLIB_MAJOR=   1
+
+WARNS?=        6
+
+MAN=   elf.3                                                   \
+       elf_begin.3                                             \
+       elf_cntl.3                                              \
+       elf_end.3 elf_errmsg.3                                  \
+       elf_fill.3                                              \
+       elf_flagdata.3                                          \
+       elf_getarhdr.3                                          \
+       elf_getarsym.3                                          \
+       elf_getbase.3                                           \
+       elf_getdata.3                                           \
+       elf_getident.3                                          \
+       elf_getscn.3                                            \
+       elf_getphnum.3                                          \
+       elf_getshnum.3                                          \
+       elf_getshstrndx.3                                       \
+       elf_hash.3                                              \
+       elf_kind.3                                              \
+       elf_memory.3                                            \
+       elf_next.3                                              \
+       elf_rawfile.3                                           \
+       elf_rand.3                                              \
+       elf_strptr.3                                            \
+       elf_update.3                                            \
+       elf_version.3                                           \
+       gelf.3                                                  \
+       gelf_checksum.3                                         \
+       gelf_fsize.3                                            \
+       gelf_getcap.3                                           \
+       gelf_getclass.3                                         \
+       gelf_getdyn.3                                           \
+       gelf_getehdr.3                                          \
+       gelf_getmove.3                                          \
+       gelf_getphdr.3                                          \
+       gelf_getrel.3                                           \
+       gelf_getrela.3                                          \
+       gelf_getshdr.3                                          \
+       gelf_getsym.3                                           \
+       gelf_getsyminfo.3                                       \
+       gelf_getsymshndx.3                                      \
+       gelf_newehdr.3                                          \
+       gelf_newphdr.3                                          \
+       gelf_update_ehdr.3                                      \
+       gelf_xlatetof.3
+
+MLINKS+= \
+       elf_errmsg.3 elf_errno.3                \
+       elf_flagdata.3 elf_flagehdr.3           \
+       elf_flagdata.3 elf_flagelf.3            \
+       elf_flagdata.3 elf_flagphdr.3           \
+       elf_flagdata.3 elf_flagscn.3            \
+       elf_flagdata.3 elf_flagshdr.3           \
+       elf_getdata.3 elf_newdata.3             \
+       elf_getdata.3 elf_rawdata.3             \
+       elf_getscn.3 elf_ndxscn.3               \
+       elf_getscn.3 elf_newscn.3               \
+       elf_getscn.3 elf_nextscn.3              \
+       elf_getshstrndx.3 elf_setshstrndx.3     \
+       gelf_getcap.3 gelf_update_cap.3         \
+       gelf_getdyn.3 gelf_update_dyn.3         \
+       gelf_getmove.3 gelf_update_move.3       \
+       gelf_getrel.3 gelf_update_rel.3         \
+       gelf_getrela.3 gelf_update_rela.3       \
+       gelf_getsym.3 gelf_update_sym.3         \
+       gelf_getsyminfo.3 gelf_update_syminfo.3 \
+       gelf_getsymshndx.3 gelf_update_symshndx.3 \
+       gelf_update_ehdr.3 gelf_update_phdr.3   \
+       gelf_update_ehdr.3 gelf_update_shdr.3   \
+       gelf_xlatetof.3 gelf_xlatetom.3
+
+.for E in 32 64
+MLINKS+= \
+       gelf_checksum.3 elf${E}_checksum.3      \
+       gelf_fsize.3    elf${E}_fsize.3         \
+       gelf_getehdr.3  elf${E}_getehdr.3       \
+       gelf_getphdr.3  elf${E}_getphdr.3       \
+       gelf_getshdr.3  elf${E}_getshdr.3       \
+       gelf_newehdr.3  elf${E}_newehdr.3       \
+       gelf_newphdr.3  elf${E}_newphdr.3       \
+       gelf_xlatetof.3 elf${E}_xlatetof.3      \
+       gelf_xlatetof.3 elf${E}_xlatetom.3
+.endfor
+
+VERSION_MAP=           ${.CURDIR}/Version.map
+
+LIBELF_TEST_HOOKS?=    1
+.if defined(LIBELF_TEST_HOOKS) && (${LIBELF_TEST_HOOKS} > 0)
+CFLAGS+= -DLIBELF_TEST_HOOKS
+.endif
+
+libelf_convert.c:      elf_types.m4 libelf_convert.m4
+libelf_fsize.c:                elf_types.m4 libelf_fsize.m4
+libelf_msize.c:                elf_types.m4 libelf_msize.m4
+
+.include <bsd.lib.mk>
+
+# Keep the .SUFFIXES line after the include of bsd.lib.mk
+.SUFFIXES:     .m4 .c
+.m4.c:
+       m4 -D SRCDIR=${.CURDIR} ${.IMPSRC} > ${.TARGET}
diff -r c9b27ecad83f -r dacd78036141 external/bsd/libelf/dist/README
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libelf/dist/README   Sat Dec 19 05:43:39 2009 +0000
@@ -0,0 +1,12 @@
+# $FreeBSD: src/lib/libelf/README,v 1.1.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $
+# $NetBSD: README,v 1.1.1.1 2009/12/19 05:43:41 thorpej Exp $
+
+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 -r c9b27ecad83f -r dacd78036141 external/bsd/libelf/dist/Version.map
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libelf/dist/Version.map      Sat Dec 19 05:43:39 2009 +0000
@@ -0,0 +1,102 @@
+/*
+ * $FreeBSD: src/lib/libelf/Version.map,v 1.3.10.1.2.1 2009/10/25 01:10:29 kensmith Exp $
+ */
+FBSD_1.0 {
+global:
+       elf32_checksum;
+       elf32_fsize;
+       elf32_getehdr;
+       elf32_getphdr;
+       elf32_getshdr;
+       elf32_newehdr;
+       elf32_newphdr;
+       elf32_xlatetof;
+       elf32_xlatetom;
+       elf64_checksum;
+       elf64_fsize;
+       elf64_getehdr;
+       elf64_getphdr;
+       elf64_getshdr;
+       elf64_newehdr;
+       elf64_newphdr;
+       elf64_xlatetof;
+       elf64_xlatetom;
+       elf_begin;
+       elf_cntl;
+       elf_end;
+       elf_errmsg;
+       elf_errno;
+       elf_fill;
+       elf_flagdata;
+       elf_flagehdr;
+       elf_flagelf;
+       elf_flagphdr;
+       elf_flagscn;
+       elf_flagshdr;
+       elf_getarhdr;
+       elf_getarsym;
+       elf_getbase;
+       elf_getdata;
+       elf_getident;
+       elf_getscn;
+       elf_getphnum;
+       elf_getshnum;
+       elf_getshstrndx;
+       elf_hash;
+       elf_kind;
+       elf_memory;
+       elf_ndxscn;
+       elf_newdata;
+       elf_newscn;
+       elf_next;
+       elf_nextscn;
+       elf_rand;
+       elf_rawdata;
+       elf_rawfile;
+       elf_setshstrndx;
+       elf_strptr;
+       elf_update;
+       elf_version;
+       gelf_checksum;
+       gelf_fsize;
+       gelf_getcap;
+       gelf_getclass;
+       gelf_getdyn;
+       gelf_getehdr;
+       gelf_getmove;
+       gelf_getphdr;
+       gelf_getrel;
+       gelf_getrela;
+       gelf_getshdr;
+       gelf_getsym;
+       gelf_getsyminfo;
+       gelf_getsymshndx;
+       gelf_newehdr;
+       gelf_newphdr;
+       gelf_update_cap;
+       gelf_update_dyn;
+       gelf_update_ehdr;
+       gelf_update_move;
+       gelf_update_phdr;
+       gelf_update_rel;
+       gelf_update_rela;
+       gelf_update_shdr;
+       gelf_update_sym;
+       gelf_update_syminfo;
+       gelf_update_symshndx;
+       gelf_xlatetof;
+       gelf_xlatetom;
+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 -r c9b27ecad83f -r dacd78036141 external/bsd/libelf/dist/_libelf.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/bsd/libelf/dist/_libelf.h        Sat Dec 19 05:43:39 2009 +0000
@@ -0,0 +1,195 @@
+/*     $NetBSD: _libelf.h,v 1.1.1.1 2009/12/19 05:43:39 thorpej Exp $  */
+
+/*-
+ * Copyright (c) 2006 Joseph Koshy
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without



Home | Main Index | Thread Index | Old Index