Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/bpf2bpf-sections'
Browse files Browse the repository at this point in the history
  • Loading branch information
dthaler committed Oct 4, 2024
2 parents 132da6d + f46ee71 commit 1dbf0bc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ebpf-samples
3 changes: 1 addition & 2 deletions src/asm_files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,7 @@ vector<raw_program> read_elf(std::istream& input_stream, const std::string& path
auto [symbol_name, symbol_section_index] = get_symbol_name_and_section_index(symbols, index);

// Queue up relocation for function symbols.
if (inst.opcode == INST_OP_CALL && inst.src == INST_CALL_LOCAL &&
reader.sections[symbol_section_index] == section.get()) {
if (inst.opcode == INST_OP_CALL && inst.src == INST_CALL_LOCAL) {
function_relocation fr{.prog_index = res.size(),
.source_offset = offset / sizeof(ebpf_inst),
.relocation_entry_index = index,
Expand Down
2 changes: 1 addition & 1 deletion src/test/test_verify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ TEST_SECTION("raw_tracepoint/filler/proc_startupdate_2")
TEST_SECTION("raw_tracepoint/filler/sys_recvfrom_x")
*/
TEST_PROGRAM_REJECT("build", "bpf2bpf.o", ".text", "plus1"); // Subprogram will fail verification.
TEST_PROGRAM("build", "bpf2bpf.o", ".text", "func"); // Subprogram can be called from main program.
TEST_PROGRAM("build", "bpf2bpf.o", "test", "func"); // Subprogram can be called from main program.
TEST_SECTION("build", "byteswap.o", ".text")
TEST_SECTION("build", "stackok.o", ".text")
TEST_SECTION("build", "packet_start_ok.o", "xdp")
Expand Down

0 comments on commit 1dbf0bc

Please sign in to comment.