Re: [PATCH v2 bpf-next] libbpf: support .text sub-calls relocations

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

 




On 1/15/20 11:08 AM, Andrii Nakryiko wrote:
> The LLVM patch https://urldefense.proofpoint.com/v2/url?u=https-3A__reviews.llvm.org_D72197&d=DwIBAg&c=5VD0RTtNlTh3ycd41b3MUw&r=DA8e1B5r073vIqRrFz7MRA&m=Pw2Bljqg1D5zPVHNmG5W7MTL_jxP_myfOOC4O-YSp_M&s=SUm2Y_ugh5NW-P8Iek263sULvuebiPSzWwtJ9J1Z330&e=  makes LLVM emit function call
> relocations within the same section. This includes a default .text section,
> which contains any BPF sub-programs. This wasn't the case before and so libbpf
> was able to get a way with slightly simpler handling of subprogram call
> relocations.
> 
> This patch adds support for .text section relocations. It needs to ensure
> correct order of relocations, so does two passes:
> - first, relocate .text instructions, if there are any relocations in it;
> - then process all the other programs and copy over patched .text instructions
> for all sub-program calls.
> 
> v1->v2:
> - break early once .text program is processed.
> 
> Cc: Yonghong Song <yhs@xxxxxx>
> Cc: Alexei Starovoitov <ast@xxxxxxxxxx>
> Signed-off-by: Andrii Nakryiko <andriin@xxxxxx>

Thanks for the quick fix!
Acked-by: Yonghong Song <yhs@xxxxxx>




[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