Skip to content

Commit

Permalink
samples: bpf: Fix build error
Browse files Browse the repository at this point in the history
GCC 10 is very strict about symbol clash, and lwt_len_hist_user contains
a symbol which clashes with libbpf:

/usr/bin/ld: samples/bpf/lwt_len_hist_user.o:(.bss+0x0): multiple definition of `bpf_log_buf'; samples/bpf/bpf_load.o:(.bss+0x8c0): first defined here
collect2: error: ld returned 1 exit status

bpf_log_buf here seems to be a leftover, so removing it.

Signed-off-by: Matteo Croce <mcroce@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20200511113234.80722-1-mcroce@redhat.com
  • Loading branch information
Matteo Croce authored and Alexei Starovoitov committed May 14, 2020
1 parent 9de5d23 commit 23ad046
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions samples/bpf/lwt_len_hist_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#define MAX_INDEX 64
#define MAX_STARS 38

char bpf_log_buf[BPF_LOG_BUF_SIZE];

static void stars(char *str, long val, long max, int width)
{
int i;
Expand Down

0 comments on commit 23ad046

Please sign in to comment.