Re: [PATCH bpf-next v3 6/8] bpftool: Add LLVM as default library for disassembling JIT-ed programs

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

 



On Thu, Oct 20, 2022 at 5:37 AM Quentin Monnet <quentin@xxxxxxxxxxxxx> wrote:
>
> +
> +/* This callback to set the ref_type is necessary to have the LLVM disassembler
> + * print PC-relative addresses instead of byte offsets for branch instruction
> + * targets.
> + */
> +static const char *
> +symbol_lookup_callback(__maybe_unused void *disasm_info,
> +                      __maybe_unused uint64_t ref_value,
> +                      uint64_t *ref_type, __maybe_unused uint64_t ref_PC,
> +                      __maybe_unused const char **ref_name)
> +{
> +       *ref_type = LLVMDisassembler_ReferenceType_InOut_None;
> +       return NULL;
> +}

Could you give an example before/after for asm
that contains 'call foo' instructions?
I'm not sure that above InOut_None will not break
symbolization.



[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