[llvm-dev] workaround to force LLD to make dwarf info sections mappable/loadable?

Friedman, Eli via llvm-dev llvm-dev at lists.llvm.org
Mon Dec 3 14:05:57 PST 2018


On 12/3/2018 12:34 PM, Andrew Kelley via llvm-dev wrote:
> Context: https://bugs.llvm.org/show_bug.cgi?id=39862
>
> I'm trying to enable stack traces in an OS kernel. To do that the kernel
> needs access to its own debug info.

Unwind info is usually emitted into an allocatable section, so you can 
compute a stack trace without looking at debug info. Of course, that 
doesn't include any symbol information, but you can compute the 
corresponding symbols offline.

IIRC the Linux kernel uses a custom format for symbol information; the 
build system post-processes the object files to compute the relevant 
information, and uses objcopy to insert the information into an 
allocatable section.

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project



More information about the llvm-dev mailing list