On Thu, Oct 7, 2021 at 5:04 PM <andrii.nakryiko@xxxxxxxxx> wrote: > > From: Andrii Nakryiko <andrii@xxxxxxxxxx> > > Remove internal libbpf assumption that there can be only one .rodata, > .data, and .bss map per BPF object. To achieve that, extend and > generalize the scheme that was used for keeping track of relocation ELF > sections. Now each ELF section has a temporary extra index that keeps > track of logical type of ELF section (relocations, data, read-only data, > BSS). Switch relocation to this scheme, as well as .rodata/.data/.bss > handling. > > We don't yet allow multiple .rodata, .data, and .bss sections, but no > libbpf internal code makes an assumption that there can be only one of > each and thus they can be explicitly referenced by a single index. Next > patches will actually allow multiple .rodata and .data sections. > > Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx> Acked-by: Song Liu <songliubraving@xxxxxx>