Re: [PATCH 0/1] btf_loader support for subprogram linkage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 23, 2024 at 05:28:30PM -0400, Will Hawkins wrote:
> First, 
> 
> I am a huge fan of pahole (and friends). I volunteered to work on
> helping to edit the BTF spec for the IETF and so I've started to look
> more deeply at BTF and the tools. 
> 
> Second, I hope that what I am offering is being sent to the right place
> and is in the right format. I tried to follow what seems to be the
> "right thing" by looking at mailing list archives.
> 
> This patch add supports to the btf_loader for subprogram (BTF_KIND_FUNC)
> linkages. For example,
> 
> ```
> $ cat a.c
> static int x() {
>   return 5;
> }
> $ gcc -gbtf -g -O0 -c a.c 
> $ ~/code/pahole/build/pfunct -Fbtf --compile a.o
> int x(void) /* linkage=static */
> {
> 	return 0;
> }
> ```

So, I'm changing this to become:

  $ ~/code/pahole/build/pfunct -Fbtf --compile a.o
  static int x(void)
  {
  	return 0;
  }

As --compile is supposed to generate compileable code that is as much as
possible from the type information similar to the original code, ok?

Thanks!

- Arnaldo
 
> Sincerely,
> Will
> 
> Will Hawkins (1):
>   btf_loader: Support linkages for BTF subprograms
> 
>  btf_loader.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> -- 
> 2.45.2
> 
> 




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux