Re: [PATCH 1/1] pahole: When trying to encode BTF avoid DWARF less files

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

 



On 03/04/2025 19:40, Alan Maguire wrote:
> On 02/04/2025 21:35, Arnaldo Carvalho de Melo wrote:
>> Make sure only DWARF is expected when encoding BTF. In time BTF will
>> also be accepted, to fixup or augment info produced by some producer, be
>> it gcc, clang, pahole or some other tool, for now, avoid trying to use
>> BTF when DWARF isn't available.
>>
>> Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
>> ---
>>  pahole.c | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> diff --git a/pahole.c b/pahole.c
>> index af3e1cfe224dd14a..f247ff5e88feeb95 100644
>> --- a/pahole.c
>> +++ b/pahole.c
>> @@ -3493,6 +3493,14 @@ int main(int argc, char *argv[])
>>  		goto out;
>>  	}
>>  
>> +	// Right now encoding BTF has to be from DWARF, so enforce that, otherwise
>> +	// the loading process can fall back to other formats, BTF being the case
>> +	// and as this is at this point unintended, avoid that.
>> +	// Next we need to just skip object files that don't have the format we
>> +	// expect as the source for BTF encoding, i.e. no DWARF, no BTF, no problema.
>> +	if (btf_encode && conf_load.format_path == NULL)
>> +		conf_load.format_path = "dwarf";
>> +
>>  	if (show_running_kernel_vmlinux) {
>>  		const char *vmlinux = vmlinux_path__find_running_kernel();
>>  
> 
> LGTM
> 
> Acked-by: Alan Maguire <alan.maguire@xxxxxxxxxx>
> 

applied to the next branch of

https://git.kernel.org/pub/scm/devel/pahole/pahole.git/

thanks!

Alan




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

  Powered by Linux