Re: [PATCH dwarves v1] btf_encoder: handle .BTF_ids section endianness when cross-compiling

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

 



On Fri, 2024-11-22 at 10:08 -0800, Eduard Zingerman wrote:

[...]

> So I assumed that this is hacky but not that bad.
> Given that current patch depends on implementation details it is
> probably better to switch to one of the alternatives:
> a. allocate new Elf_Data object using elf_newdata() API;
> b. just allocate a fake instance of Elf_Data on stack in btf_encoder__tag_kfuncs().
> 
> (a) seems to be an Ok option, wdyt?

Meh, any of these raise some questions about validity of API usage.
I'll just add a custom wrapper:

  struct converted_elf_data {
	void *d_buf;
        size_t d_size;
        size_t d_off;
        bool owns_buf;
  };

[...]






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux