Skip to content

Commit b7e0373

Browse files
committed
vdso: Build without debug info
The debug info is not very useful and embeds build paths because elf-vdso.so.o is built without CFLAGS, breaking reproducibility of elf-vdso.so.o and thus the kernel. Just stop passing debug flags to amd64_vdso.sh. Reviewed by: kib MFC after: 2 weeks Sponsored by: Klara, Inc. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52129
1 parent ad13dc1 commit b7e0373

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

sys/conf/files.amd64

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ include "conf/files.x86"
1313
#
1414
elf-vdso.so.o standard \
1515
dependency "$S/amd64/amd64/sigtramp.S assym.inc $S/conf/vdso_amd64.ldscript $S/tools/amd64_vdso.sh" \
16-
compile-with "env AWK='${AWK}' NM='${NM}' LD='${LD}' CC='${CC}' DEBUG='${DEBUG}' OBJCOPY='${OBJCOPY}' ELFDUMP='${ELFDUMP}' S='${S}' sh $S/tools/amd64_vdso.sh" \
16+
compile-with "env AWK='${AWK}' NM='${NM}' LD='${LD}' CC='${CC}' OBJCOPY='${OBJCOPY}' ELFDUMP='${ELFDUMP}' S='${S}' sh $S/tools/amd64_vdso.sh" \
1717
no-ctfconvert \
1818
no-implicit-rule before-depend \
1919
clean "elf-vdso.so.o elf-vdso.so.1 vdso_offsets.h sigtramp.pico"
2020
#
2121
elf-vdso32.so.o optional compat_freebsd32 \
2222
dependency "$S/amd64/ia32/ia32_sigtramp.S ia32_assym.h $S/conf/vdso_amd64_ia32.ldscript $S/tools/amd64_ia32_vdso.sh" \
23-
compile-with "env AWK='${AWK}' NM='${NM}' LD='${LD}' CC='${CC}' DEBUG='${DEBUG}' OBJCOPY='${OBJCOPY}' ELFDUMP='${ELFDUMP}' S='${S}' sh $S/tools/amd64_ia32_vdso.sh" \
23+
compile-with "env AWK='${AWK}' NM='${NM}' LD='${LD}' CC='${CC}' OBJCOPY='${OBJCOPY}' ELFDUMP='${ELFDUMP}' S='${S}' sh $S/tools/amd64_ia32_vdso.sh" \
2424
no-ctfconvert \
2525
no-implicit-rule before-depend \
2626
clean "elf-vdso32.so.o elf-vdso32.so.1 vdso_ia32_offsets.h ia32_sigtramp.pico"

sys/tools/amd64_ia32_vdso.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ then
5858
exit 1
5959
fi
6060

61-
${CC} ${DEBUG} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \
61+
${CC} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \
6262
-o elf-vdso32.so.o -I. -I"${S}" -include opt_global.h \
6363
-DVDSO_NAME=elf_vdso32_so_1 -DVDSO_FILE=\"elf-vdso32.so.1\" \
6464
"${S}"/tools/vdso_wrap.S

sys/tools/amd64_vdso.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ then
6767
exit 1
6868
fi
6969

70-
${CC} ${DEBUG} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \
70+
${CC} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \
7171
-o elf-vdso.so.o -I. -I"${S}" -include opt_global.h \
7272
-DVDSO_NAME=elf_vdso_so_1 -DVDSO_FILE=\"elf-vdso.so.1\" \
7373
"${S}"/tools/vdso_wrap.S

0 commit comments

Comments
 (0)