Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
BPF programs use single threaded LLD #6088
Multi-threaded LLD is causing only partial relocation to take place. This results in what should be a double relocation (relocation of a symbol which contains an address that is also relocated) but only the first relocation is created correctly. The second relocation requires that an offset be written to the memory location being relocated, but that offset is zero in the final ELF. It's unclear why the LLD multi-threaded configuration is causing this issue and more investigation is warranted but not necessary at this time and will be time-consuming.
Summary of Changes
Use LLD in single-thread mode. There is very little performance impact since BPF programs include a small number of small object files.
The PR also pulls in rbpf changes that force a load failure if any invalid relocations are found.
@@ Coverage Diff @@ ## master #6088 +/- ## ======================================== - Coverage 74.7% 74.3% -0.5% ======================================== Files 226 238 +12 Lines 40660 42301 +1641 ======================================== + Hits 30413 31431 +1018 - Misses 10247 10870 +623