lkml.org 
[lkml]   [2017]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 7/7] DWARF: add the config option
On Mon, May 22, 2017 at 4:34 AM, Jiri Kosina <jikos@kernel.org> wrote:
> On Sat, 20 May 2017, H.J. Lu wrote:
>
>> >>>> pushq %whatever
>> >>>> .cfi_adjust_sp -8
>> >>>> ...
>> >>>> popq %whatever
>> >>>> .cfi_adjust_sp 8
>> >>>>
>> >>
>> >> Np. Compiler needs to generate this.
>> >>
>> >
>> > How would the compiler generate this when inline asm is involved? For
>> > the kernel, objtool could get around the need to have these
>> > annotations, but not so much for user code? Is the compiler supposed
>> > to parse the inline asm? Would the compiler provide some magic % code
>> > to represent the current CFA base register?
>>
>> Here is one example of inline asm with call frame info:
>>
>> https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/x86_64/sigaction.c;h=be058bac436d1cc9794b2b03107676ed99f6b872;hb=HEAD
>
> That brings us basically pretty close to square one though; having to
> maintain "manual" anotations. Something we're pretty much trying to avoid
> through this excercise.

Assembler only encodes instructions. You need to a different tool
to figure out what an instruction does.


--
H.J.

\
 
 \ /
  Last update: 2017-05-22 16:41    [W:0.078 / U:3.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site