(original) (raw)

I think Eli made a good point. In addition to that, if you are writing a OS kernel, I guess you are also writing a loader, so you can map anything as you want, no?

On Mon, Dec 3, 2018 at 2:06 PM Friedman, Eli via llvm-dev <llvm-dev@lists.llvm.org> wrote:
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

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
LLVM Developers mailing list
llvm-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev