Skip to content

Commit d96bed6

Browse files
committed
elf: fix to add ignoreExtra flag so that allow standalone prog
Signed-off-by: shun159 <[email protected]>
1 parent 0743fe4 commit d96bed6

File tree

7 files changed

+2
-36
lines changed

7 files changed

+2
-36
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ TARGETS := \
5151
testdata/variables \
5252
testdata/arena \
5353
testdata/struct_ops \
54-
testdata/struct_ops_autocreate \
5554
btf/testdata/relocs \
5655
btf/testdata/relocs_read \
5756
btf/testdata/relocs_read_tgt \

elf_reader.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,12 +1528,6 @@ func (ec *elfCode) associateStructOpsRelocs(
15281528
}
15291529
}
15301530

1531-
for name, p := range progs {
1532-
if p.Type == StructOps && !willAttachToMap[name] {
1533-
return fmt.Errorf("standalone struct_ops program %s: %w", name, ErrNotSupported)
1534-
}
1535-
}
1536-
15371531
return nil
15381532
}
15391533

elf_reader_test.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,13 +1028,6 @@ func TestStructOps(t *testing.T) {
10281028
qt.Assert(t, qt.CmpEquals(data, userData, csCmpOpts))
10291029
}
10301030

1031-
func TestStructOpsWithStandAloneProg(t *testing.T) {
1032-
file := testutils.NativeFile(t, "testdata/struct_ops_autocreate-%s.elf")
1033-
_, err := LoadCollectionSpec(file)
1034-
testutils.SkipIfNotSupported(t, err)
1035-
qt.Assert(t, qt.IsNil(err))
1036-
}
1037-
10381031
var (
10391032
elfPath = flag.String("elfs", os.Getenv("CI_KERNEL_SELFTESTS"), "`Path` containing libbpf-compatible ELFs (defaults to $CI_KERNEL_SELFTESTS)")
10401033
elfPattern = flag.String("elf-pattern", "*.o", "Glob `pattern` for object files that should be tested")

elf_sections.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
-1.88 KB
Binary file not shown.
-1.88 KB
Binary file not shown.

testdata/struct_ops_autocreate.c

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)