Skip to content

Commit

Permalink
BPF name should be appended after _core/_noncore (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
darren committed May 16, 2024
1 parent 4e7db09 commit 5e666ac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions user/module/imodule.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import (
"context"
"errors"
"fmt"
"os"
"strings"

"github.com/cilium/ebpf"
"github.com/cilium/ebpf/perf"
"github.com/cilium/ebpf/ringbuf"
Expand All @@ -27,8 +30,6 @@ import (
"github.com/gojue/ecapture/user/config"
"github.com/gojue/ecapture/user/event"
"github.com/rs/zerolog"
"os"
"strings"
)

type IModule interface {
Expand Down Expand Up @@ -163,7 +164,7 @@ func (m *Module) geteBPFName(filename string) string {
}
//
if m.isKernelLess5_2 {
newFilename = strings.Replace(filename, ".o", KernelLess52Prefix, 1)
newFilename = strings.Replace(newFilename, ".o", KernelLess52Prefix, 1)
}

return newFilename
Expand Down

0 comments on commit 5e666ac

Please sign in to comment.