NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-xen/57535 (dtrace on Xen DOMU might need -x nolibs)
Synopsis: dtrace on Xen DOMU might need -x nolibs
Responsible-Changed-From-To: port-xen-maintainer->bouyer
Responsible-Changed-By: riastradh%NetBSD.org@localhost
Responsible-Changed-When: Sun, 22 Feb 2026 22:23:21 +0000
Responsible-Changed-Why:
Can I trouble you to look into how we can get at the .SUNW_ctf section
when booted in Xen?
(I'm interested in the answer for every type of Xen boot because, for
the life of me, despite having worked on this stuff from time to time
for years, I cannot remember offhand what the difference between
PV/PVH/PVHVM/HVM is and which one is applicable in which scenarios and
how they correspond to #defines in NetBSD without spending half an hour
poring over archived Xen wiki pages and diagrams and source code every
time.)
We already have some logic to get at the ELF object for a symbol table,
but (from what I understand) apparently it doesn't contain the
.SUNW_ctf section even if the original kernel did:
567 #if NKSYMS || defined(DDB) || defined(MODULAR)
568 extern int end;
569 extern int *esym;
570 #ifdef DDB
571 db_machine_init();
572 #endif
573
574 #ifdef XENPV
575 esym = xen_start_info.mod_start ?
576 (void *)xen_start_info.mod_start :
577 (void *)xen_start_info.mfn_list;
578 #endif /* XENPV */
579 /* for PVH, esym is set in locore.S */
580 ksyms_addsyms_elf(*(int *)(void *)&end,
581 ((int *)(void *)&end) + 1, esym);
582 #endif
https://nxr.netbsd.org/xref/src/sys/arch/xen/x86/hypervisor_machdep.c?r=1.47#564
Do we, in some cases, go through this multiboot2 logic that explicitly
copies the symbol table to just after the kernel? If so, can we update
it to also include .SUNW_ctf data if KDTRACE_HOOKS is enabled?
https://nxr.netbsd.org/xref/src/sys/arch/x86/x86/multiboot2.c?r=1.8#171
Do we, in some cases, get it through some kind of other bootloader
mechanism instead, so it requires cooperation from the host to save
more than just the .symtab and .strtab sections -- or add some logic in
locore.S to copy something beyond what is already copied there?
https://nxr.netbsd.org/xref/src/sys/arch/amd64/amd64/locore.S?r=1.236#1050
Home |
Main Index |
Thread Index |
Old Index