NetBpfLoad: remove foo@1.o support

No longer needed now that we have a single loader
which can support everything.

Test: TreeHugger
Flag: EXEMPT mainline/noop
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I74c24016265a2b41d818d55c98cbabde04687dd8
This commit is contained in:
Maciej Żenczykowski 2025-07-29 16:38:57 -07:00
commit 08ad51519a

View file

@ -127,13 +127,10 @@ void validatePinDir(const char s[BPF_PIN_SUBDIR_CHAR_ARRAY_SIZE]) {
}
static string pathToObjName(const string& path) {
// extract everything after the final slash, ie. this is the filename 'foo@1.o' or 'bar.o'
// extract everything after the final slash, ie. this is the filename 'foo.o'
string filename = Split(path, "/").back();
// strip off everything from the final period onwards (strip '.o' suffix), ie. 'foo@1' or 'bar'
string name = filename.substr(0, filename.find_last_of('.'));
// strip any potential @1 suffix, this will leave us with just 'foo' or 'bar'
// this can be used to provide duplicate programs (mux based on the bpfloader version)
return name.substr(0, name.find_last_of('@'));
// strip off everything from the final period onwards (strip '.o' suffix), ie. 'foo'
return filename.substr(0, filename.find_last_of('.'));
}
typedef struct {