git: 513c5cd8276c - main - linux64: Don't pass unnecessary -S and -g to objcopy

Jessica Clarke jrtc27 at FreeBSD.org
Thu Jan 21 01:56:15 UTC 2021


The branch main has been updated by jrtc27:

URL: https://cgit.FreeBSD.org/src/commit/?id=513c5cd8276c262e4f81e5d3a717f3725a835d56

commit 513c5cd8276c262e4f81e5d3a717f3725a835d56
Author:     Jessica Clarke <jrtc27 at FreeBSD.org>
AuthorDate: 2021-01-21 01:54:52 +0000
Commit:     Jessica Clarke <jrtc27 at FreeBSD.org>
CommitDate: 2021-01-21 01:54:52 +0000

    linux64: Don't pass unnecessary -S and -g to objcopy
    
    Since we use --input-type binary these options are rather meaningless. Both
    binutils and elftoolchain ignore the option in this case, but LLVM does not,
    and instead strips all symbols from the output file, causing missing symbols at
    run time if building with llvm-objcopy. Thus simply remove the options; the
    linux module has never included them for building its VDSO (added in r283407),
    but for some reason the original commit of linux64 (r283424) added them.
    
    These should however eventually be changed to use template assembly files as is
    now done for firmware and MFS_IMAGE.
    
    Reviewed by:    emaste, trasz
    Differential Revision:  https://reviews.freebsd.org/D27740
---
 sys/modules/linux64/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile
index 91b419558d82..ebc69168bd4a 100644
--- a/sys/modules/linux64/Makefile
+++ b/sys/modules/linux64/Makefile
@@ -50,7 +50,7 @@ OBJCOPY_TARGET=--output-target elf64-x86-64 --binary-architecture i386:x86-64
 .error ${MACHINE_CPUARCH} not yet supported by linux64
 .endif
 ${VDSO}.so: linux_locore.o
-	${OBJCOPY} --input-target binary ${OBJCOPY_TARGET} -S -g \
+	${OBJCOPY} --input-target binary ${OBJCOPY_TARGET} \
 	    linux_locore.o ${.TARGET}
 	${STRIPBIN} -N _binary_linux_locore_o_size ${.TARGET}
 


More information about the dev-commits-src-all mailing list