aboutsummaryrefslogtreecommitdiff
path: root/lib/libelftc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libelftc')
-rw-r--r--lib/libelftc/Makefile66
-rw-r--r--lib/libelftc/Makefile.depend13
-rw-r--r--lib/libelftc/elftc_version.c9
3 files changed, 88 insertions, 0 deletions
diff --git a/lib/libelftc/Makefile b/lib/libelftc/Makefile
new file mode 100644
index 000000000000..a6079b817d87
--- /dev/null
+++ b/lib/libelftc/Makefile
@@ -0,0 +1,66 @@
+.include <bsd.own.mk>
+
+PACKAGE= toolchain
+INTERNALLIB=
+
+ELFTCDIR= ${SRCTOP}/contrib/elftoolchain
+
+.PATH: ${ELFTCDIR}/libelftc
+
+LIB= elftc
+
+SRCS= elftc_bfdtarget.c \
+ elftc_copyfile.c \
+ elftc_demangle.c \
+ elftc_reloc_type_str.c \
+ elftc_set_timestamps.c \
+ elftc_string_table.c \
+ elftc_timestamp.c \
+ elftc_version.c \
+ libelftc_bfdtarget.c \
+ libelftc_dem_arm.c \
+ libelftc_dem_gnu2.c \
+ libelftc_dem_gnu3.c \
+ libelftc_hash.c \
+ libelftc_vstr.c
+
+INCS= libelftc.h
+CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/common
+
+MAN+= elftc.3 \
+ elftc_bfd_find_target.3 \
+ elftc_copyfile.3 \
+ elftc_demangle.3 \
+ elftc_reloc_type_str.3 \
+ elftc_set_timestamps.3 \
+ elftc_timestamp.3 \
+ elftc_string_table_create.3 \
+ elftc_version.3
+
+MLINKS+= \
+ elftc_bfd_find_target.3 elftc_bfd_target_class.3 \
+ elftc_bfd_find_target.3 elftc_bfd_target_byteorder.3 \
+ elftc_bfd_find_target.3 elftc_bfd_target_flavor.3 \
+ elftc_bfd_find_target.3 elftc_bfd_target_machine.3 \
+ elftc_string_table_create.3 elftc_string_table_destroy.3 \
+ elftc_string_table_create.3 elftc_string_table_from_section.3 \
+ elftc_string_table_create.3 elftc_string_table_image.3 \
+ elftc_string_table_create.3 elftc_string_table_insert.3 \
+ elftc_string_table_create.3 elftc_string_table_lookup.3 \
+ elftc_string_table_create.3 elftc_string_table_remove.3 \
+ elftc_string_table_create.3 elftc_string_table_to_string.3
+
+# This same hack is in lib/libelf/Makefile and usr.bin/readelf/Makefile
+# We need to link against the correct version of these files. One
+# solution is to include ../../sys in the include path. This causes
+# problems when a header file in sys depends on a file in another
+# part of the tree, e.g. a machine dependent header.
+#
+SRCS+= sys/elf_common.h
+CLEANDIRS= sys
+CFLAGS+= -I.
+sys/elf_common.h: ${SRCTOP}/sys/${.TARGET} .NOMETA
+ mkdir -p ${.OBJDIR}/sys
+ ln -sf ${.ALLSRC} ${.TARGET}
+
+.include <bsd.lib.mk>
diff --git a/lib/libelftc/Makefile.depend b/lib/libelftc/Makefile.depend
new file mode 100644
index 000000000000..2c564fe515ff
--- /dev/null
+++ b/lib/libelftc/Makefile.depend
@@ -0,0 +1,13 @@
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libelf \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libelftc/elftc_version.c b/lib/libelftc/elftc_version.c
new file mode 100644
index 000000000000..def790f7ed6c
--- /dev/null
+++ b/lib/libelftc/elftc_version.c
@@ -0,0 +1,9 @@
+
+#include <sys/types.h>
+#include <libelftc.h>
+
+const char *
+elftc_version(void)
+{
+ return "elftoolchain r3769";
+}