Add libpe for elfcopy(1) PE/COFF support
Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
a4a7c8254c
commit
c1da297433
@ -1638,6 +1638,7 @@ _binutils= gnu/usr.bin/binutils
|
|||||||
.endif
|
.endif
|
||||||
.if ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no"
|
.if ${MK_ELFTOOLCHAIN_BOOTSTRAP} != "no"
|
||||||
_elftctools= lib/libelftc \
|
_elftctools= lib/libelftc \
|
||||||
|
lib/libpe \
|
||||||
usr.bin/elfcopy \
|
usr.bin/elfcopy \
|
||||||
usr.bin/nm \
|
usr.bin/nm \
|
||||||
usr.bin/size \
|
usr.bin/size \
|
||||||
@ -1650,6 +1651,7 @@ _elftctools+= usr.bin/addr2line
|
|||||||
# If cross-building with an external binutils we still need to build strip for
|
# If cross-building with an external binutils we still need to build strip for
|
||||||
# the target (for at least crunchide).
|
# the target (for at least crunchide).
|
||||||
_elftctools= lib/libelftc \
|
_elftctools= lib/libelftc \
|
||||||
|
lib/libpe \
|
||||||
usr.bin/elfcopy
|
usr.bin/elfcopy
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
@ -80,6 +80,7 @@ SUBDIR= ${SUBDIR_ORDERED} \
|
|||||||
libopie \
|
libopie \
|
||||||
libpam \
|
libpam \
|
||||||
libpcap \
|
libpcap \
|
||||||
|
${_libpe} \
|
||||||
libpjdlog \
|
libpjdlog \
|
||||||
${_libpmc} \
|
${_libpmc} \
|
||||||
${_libproc} \
|
${_libproc} \
|
||||||
@ -184,6 +185,7 @@ _cuse= libcuse
|
|||||||
|
|
||||||
.if ${MK_TOOLCHAIN} != "no"
|
.if ${MK_TOOLCHAIN} != "no"
|
||||||
_libelftc= libelftc
|
_libelftc= libelftc
|
||||||
|
_libpe= libpe
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if ${MK_FILE} != "no"
|
.if ${MK_FILE} != "no"
|
||||||
|
34
lib/libpe/Makefile
Normal file
34
lib/libpe/Makefile
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
.include <bsd.own.mk>
|
||||||
|
|
||||||
|
INTERNALLIB=
|
||||||
|
|
||||||
|
ELFTCDIR= ${.CURDIR}/../../contrib/elftoolchain
|
||||||
|
|
||||||
|
.PATH: ${ELFTCDIR}/libpe
|
||||||
|
|
||||||
|
LIB= pe
|
||||||
|
|
||||||
|
SRCS= libpe_buffer.c \
|
||||||
|
libpe_coff.c \
|
||||||
|
libpe_dos.c \
|
||||||
|
libpe_init.c \
|
||||||
|
libpe_rich.c \
|
||||||
|
libpe_section.c \
|
||||||
|
libpe_utils.c \
|
||||||
|
pe_buffer.c \
|
||||||
|
pe_cntl.c \
|
||||||
|
pe_coff.c \
|
||||||
|
pe_dos.c \
|
||||||
|
pe_flag.c \
|
||||||
|
pe_init.c \
|
||||||
|
pe_rich.c \
|
||||||
|
pe_section.c \
|
||||||
|
pe_symtab.c \
|
||||||
|
pe_update.c
|
||||||
|
|
||||||
|
CFLAGS+=-I${ELFTCDIR}/libpe -I${ELFTCDIR}/common
|
||||||
|
|
||||||
|
MAN=
|
||||||
|
|
||||||
|
.include <bsd.lib.mk>
|
@ -39,6 +39,7 @@ _INTERNALLIBS= \
|
|||||||
openbsd \
|
openbsd \
|
||||||
opts \
|
opts \
|
||||||
parse \
|
parse \
|
||||||
|
pe \
|
||||||
readline \
|
readline \
|
||||||
sl \
|
sl \
|
||||||
sm \
|
sm \
|
||||||
@ -367,6 +368,9 @@ LDADD+= ${LDADD_${_l}}
|
|||||||
LIBELFTCDIR= ${OBJTOP}/lib/libelftc
|
LIBELFTCDIR= ${OBJTOP}/lib/libelftc
|
||||||
LIBELFTC?= ${LIBELFTCDIR}/libelftc.a
|
LIBELFTC?= ${LIBELFTCDIR}/libelftc.a
|
||||||
|
|
||||||
|
LIBPEDIR= ${OBJTOP}/lib/libpe
|
||||||
|
LIBPE?= ${LIBPEDIR}/libpe.a
|
||||||
|
|
||||||
LIBREADLINEDIR= ${OBJTOP}/gnu/lib/libreadline/readline
|
LIBREADLINEDIR= ${OBJTOP}/gnu/lib/libreadline/readline
|
||||||
LIBREADLINE?= ${LIBREADLINEDIR}/libreadline.a
|
LIBREADLINE?= ${LIBREADLINEDIR}/libreadline.a
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user