-
Notifications
You must be signed in to change notification settings - Fork 828
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
libbpf has added support for weak symbols, which end up in ELF with an STB_WEAK binding.
libbpf commits that might be relevant due to mentioning STB_WEAK:
- torvalds/linux@166750b (adds LINUX_KERNEL_VERSION)
- torvalds/linux@386b1d2
linked_maps.c fails due to:
struct {
__uint(type, BPF_MAP_TYPE_ARRAY);
__type(key, int);
__type(value, int);
__uint(max_entries, 16);
} map_weak __weak SEC(".maps");linked_funcs.c:
/* this weak instance should win because it's the first one */
__weak int set_output_weak(int x)
{
output_weak1 = x;
return x;
}There is also the following, not sure if that needs additional code:
/* here we'll force set_output_ctx2() to be __hidden in the final obj file */
__attribute__((visibility("hidden"))) extern void set_output_ctx2(__u64 *ctx);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed