[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAADnVQLjsMWw0F8FJoBGLLs_Ab2WXc-T2Lfhks=sUKVTBu1veQ@mail.gmail.com>
Date: Thu, 30 Jan 2020 16:20:53 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Yulia Kartseva <hex@...com>
Cc: bpf <bpf@...r.kernel.org>, Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Network Development <netdev@...r.kernel.org>,
Andrii Nakryiko <andriin@...com>
Subject: Re: [PATCH v3 bpf] runqslower: fix Makefile
On Thu, Jan 30, 2020 at 3:14 PM Yulia Kartseva <hex@...com> wrote:
>
> Fix undefined reference linker errors when building runqslower with
> gcc 7.4.0 on Ubuntu 18.04.
> The issue is with misplaced -lelf, -lz options in Makefile:
> $(Q)$(CC) $(CFLAGS) -lelf -lz $^ -o $@
>
> -lelf, -lz options should follow the list of target dependencies:
> $(Q)$(CC) $(CFLAGS) $^ -lelf -lz -o $@
> or after substitution
> cc -g -Wall runqslower.o libbpf.a -lelf -lz -o runqslower
>
> The current order of gcc params causes failure in libelf symbols resolution,
> e.g. undefined reference to `elf_memory'
>
> Fixes: 9c01546d26d2 ("tools/bpf: Add runqslower tool to tools/bpf")
> Signed-off-by: Julia Kartseva <hex@...com>
> Acked-by: Andrii Nakryiko <andriin@...com>
Applied. Thanks
Powered by blists - more mailing lists