Page MenuHomeFreeBSD

D49362.1789644196.diff
No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None

D49362.1789644196.diff

Index: stand/efi/Makefile.inc
===================================================================
--- stand/efi/Makefile.inc
+++ stand/efi/Makefile.inc
@@ -26,6 +26,7 @@
.else
EFI_TARGET= binary
.endif
+EFI_OBJCOPY?= elfcopy
# Arbitrarily set the PE/COFF header timestamps to 1 Jan 2024 00:00:00
# for build reproducibility.
Index: stand/efi/boot1/Makefile
===================================================================
--- stand/efi/boot1/Makefile
+++ stand/efi/boot1/Makefile
@@ -96,7 +96,7 @@
exit 1; \
fi
SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \
- ${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \
+ ${EFI_OBJCOPY} -j .peheader -j .text -j .sdata -j .data \
-j .dynamic -j .dynsym -j .rel.dyn \
-j .rela.dyn -j .reloc -j .eh_frame \
--output-target=${EFI_TARGET} ${.ALLSRC} ${.TARGET}
Index: stand/efi/loader/Makefile
===================================================================
--- stand/efi/loader/Makefile
+++ stand/efi/loader/Makefile
@@ -128,7 +128,7 @@
exit 1; \
fi
SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \
- ${OBJCOPY} -j .peheader -j .text -j .sdata -j .data \
+ ${EFI_OBJCOPY} -j .peheader -j .text -j .sdata -j .data \
-j .dynamic -j .dynsym -j .rel.dyn \
-j .rela.dyn -j .reloc -j .eh_frame -j set_Xcommand_set \
-j set_X${LOADER_INTERP}_compile_set \
Index: usr.bin/Makefile
===================================================================
--- usr.bin/Makefile
+++ usr.bin/Makefile
@@ -245,7 +245,6 @@
SUBDIR.${MK_TOOLCHAIN}+= addr2line
SUBDIR.${MK_TOOLCHAIN}+= ar
SUBDIR.${MK_TOOLCHAIN}+= nm
-SUBDIR.${MK_TOOLCHAIN}+= objcopy
SUBDIR.${MK_TOOLCHAIN}+= readelf
SUBDIR.${MK_TOOLCHAIN}+= size
SUBDIR+= strings
@@ -262,6 +261,8 @@
SUBDIR.${MK_TOOLCHAIN}+= lex
SUBDIR.${MK_TOOLCHAIN}+= lorder
SUBDIR.${MK_TOOLCHAIN}+= mkstr
+# ELF Tool Chain elfcopy required for EFI objects (PR280771)
+SUBDIR.${MK_TOOLCHAIN}+= objcopy
SUBDIR.${MK_TOOLCHAIN}+= rpcgen
SUBDIR.${MK_TOOLCHAIN}+= unifdef
SUBDIR.${MK_TOOLCHAIN}+= xstr
Index: usr.bin/objcopy/Makefile
===================================================================
--- usr.bin/objcopy/Makefile
+++ usr.bin/objcopy/Makefile
@@ -7,12 +7,25 @@
.PATH: ${ELFCOPYDIR}
-PROG= objcopy
+PROG= elfcopy
+
+.if ${MK_LLVM_BINUTILS} != "no"
+
+MAN= elfcopy.1
+
+.else
+
+LINKS+= ${BINDIR}/${PROG} ${BINDIR}/objcopy
+LINKS+= ${BINDIR}/${PROG} ${BINDIR}/strip
+MAN= objcopy.1 strip.1
+
objcopy.1: elfcopy.1
sed -e 's/\.Dt ELFCOPY 1/.Dt OBJCOPY 1/' \
-e '/\.Nm elfcopy ,/d' < ${.ALLSRC} > ${.TARGET}
CLEANFILES+= objcopy.1
+.endif # MK_LLVM_BINUTILS != no
+
SRCS= archive.c ascii.c binary.c main.c pe.c sections.c segments.c symbols.c
WARNS?= 5
@@ -22,9 +35,7 @@
CFLAGS+=-I${ELFTCDIR}/libelftc -I${ELFTCDIR}/libpe -I${ELFTCDIR}/common
CFLAGS+=-DWITH_PE=1
-MAN= ${PROG}.1 strip.1
-LINKS= ${BINDIR}/${PROG} ${BINDIR}/strip
# 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

File Metadata

Mime Type
text/plain
Expires
Thu, Sep 17, 11:23 AM (5 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29727601
Default Alt Text
D49362.1789644196.diff (2 KB)

Event Timeline