public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@plumgrid•com>
To: Daniel Borkmann <daniel@iogearbox•net>, davem@davemloft•net
Cc: fengguang.wu@intel•com, netdev@vger•kernel.org
Subject: Re: [PATCH net-next] ebpf: bpf_map_*: fix linker error on avr32 and openrisc arch
Date: Thu, 05 Mar 2015 18:35:43 -0800	[thread overview]
Message-ID: <54F9127F.8090501@plumgrid.com> (raw)
In-Reply-To: <dc0fc4f224a95f2a9813079229cb9cc0ac069d52.1425594286.git.daniel@iogearbox.net>

On 3/5/15 2:27 PM, Daniel Borkmann wrote:
> Fengguang reported, that on openrisc and avr32 architectures, we
> get the following linker errors on *_defconfig builds that have
> no bpf syscall support:
>
>    net/built-in.o:(.rodata+0x1cd0): undefined reference to `bpf_map_lookup_elem_proto'
>    net/built-in.o:(.rodata+0x1cd4): undefined reference to `bpf_map_update_elem_proto'
>    net/built-in.o:(.rodata+0x1cd8): undefined reference to `bpf_map_delete_elem_proto'
>
> Fix it up by providing built-in weak definitions of the symbols,
> so they can be overridden when the syscall is enabled. I think
> the issue might be that gcc is not able to optimize all that away.
> This patch fixes the linker errors for me, tested with Fengguang's
> make.cross [1] script.
>
>    [1] https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
>
> Reported-by: Fengguang Wu <fengguang.wu@intel•com>
> Fixes: d4052c4aea0c ("ebpf: remove CONFIG_BPF_SYSCALL ifdefs in socket filter code")
> Signed-off-by: Daniel Borkmann <daniel@iogearbox•net>

Acked-by: Alexei Starovoitov <ast@plumgrid•com>

thanks :)

  reply	other threads:[~2015-03-06  2:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05 22:27 [PATCH net-next] ebpf: bpf_map_*: fix linker error on avr32 and openrisc arch Daniel Borkmann
2015-03-06  2:35 ` Alexei Starovoitov [this message]
2015-03-06  6:05 ` David Miller
2015-03-06  7:20 ` Or Gerlitz
2015-03-06  7:35   ` Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54F9127F.8090501@plumgrid.com \
    --to=ast@plumgrid$(echo .)com \
    --cc=daniel@iogearbox$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=fengguang.wu@intel$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox