<div dir="ltr">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?</div><br><div class="gmail_quote"><div dir="ltr">On Mon, Dec 3, 2018 at 2:06 PM Friedman, Eli via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 12/3/2018 12:34 PM, Andrew Kelley via llvm-dev wrote:<br>
> Context: <a href="https://bugs.llvm.org/show_bug.cgi?id=39862" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=39862</a><br>
><br>
> I'm trying to enable stack traces in an OS kernel. To do that the kernel<br>
> needs access to its own debug info.<br>
<br>
Unwind info is usually emitted into an allocatable section, so you can <br>
compute a stack trace without looking at debug info. Of course, that <br>
doesn't include any symbol information, but you can compute the <br>
corresponding symbols offline.<br>
<br>
IIRC the Linux kernel uses a custom format for symbol information; the <br>
build system post-processes the object files to compute the relevant <br>
information, and uses objcopy to insert the information into an <br>
allocatable section.<br>
<br>
-Eli<br>
<br>
-- <br>
Employee of Qualcomm Innovation Center, Inc.<br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project<br>
<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>