path: root/sys
diff options
authorConrad Meyer <cem@FreeBSD.org>2020-04-17 20:20:03 +0000
committerConrad Meyer <cem@FreeBSD.org>2020-04-17 20:20:03 +0000
commitf953e7317acaefe1098afa7e2f86768c0600622f (patch)
tree48da0f4578e4563120315f26a5909d4804496aaf /sys
parenta449a1eb9ba0da1ea57ef112d9284c4f6da42e2e (diff)
xen-locore: Silence DWARF2 section warning
Silence the "DWARF2 can only represent one section per compilation unit" warning in amd64 GENERIC builds by disabling Clang's debuginfo generation for this assembler file (-g0). The message is replaced by a warning from ctfconvert that there is no debuginfo to convert (future work). The file contains some metadata (several ELF notes) and some code. The code does not appear to have anything that debuginfo would aid. I looked at the generated debuginfo (readelf -w xen-locore.o) prior to this change, and the metadata that would be disabled are things like associated between binary offset and code line number (not especially useful with a disassembler), and label metadata for the entry points (not especially useful as this is already in the symbol table). Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D24384
Notes: svn path=/head/; revision=360054
Diffstat (limited to 'sys')
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64
index adb804a80b13..81ce867f7a41 100644
--- a/sys/conf/files.amd64
+++ b/sys/conf/files.amd64
@@ -112,7 +112,8 @@ amd64/amd64/in_cksum.c optional inet | inet6
amd64/amd64/initcpu.c standard
amd64/amd64/io.c optional io
amd64/amd64/locore.S standard no-obj
-amd64/amd64/xen-locore.S optional xenhvm
+amd64/amd64/xen-locore.S optional xenhvm \
+ compile-with "${NORMAL_S} -g0"
amd64/amd64/machdep.c standard
amd64/amd64/mem.c optional mem
amd64/amd64/minidump_machdep.c standard