DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCHv3 2/3] rte_compat: Add MAP_STATIC_SYMBOL macro
Date: Fri, 26 Jun 2015 14:52:50 +0200	[thread overview]
Message-ID: <3172025.YLFsvjgh6J@xps13> (raw)
In-Reply-To: <1435242949-31520-2-git-send-email-nhorman@tuxdriver.com>

2015-06-25 10:35, Neil Horman:
> +/*
> + * MAP_STATIC_SYMBOL
> + * If a function has been bifurcated into multiple versions, none of which
> + * are defined as the exported symbol name in the map file, this macro can be
> + * used to alias a specific version of the symbol to its exported name.  For
> + * example, if you have 2 versions of a function foo_v1 and foo_v2, where the
> + * former is mapped to foo@DPDK_1 and the latter is mapped to foo@DPDK_2 when
> + * building a shared library, this macro can be used to map either foo_v1 or
> + * foo_v2 to the symbol foo when building a static library, e.g.:
> + * MAP_STATIC_SYMBOL(void foo(), foo_v2);
> + */
> +#define MAP_STATIC_SYMBOL(f, p)
> +
>  #else
>  /*
>   * No symbol versioning in use
> @@ -104,7 +105,7 @@
>  #define __vsym
>  #define BASE_SYMBOL(b, n)
>  #define BIND_DEFAULT_SYMBOL(b, e, n)
> -
> +#define MAP_STATIC_SYMBOL(f, p) f  __attribute__((alias( RTE_STR(p))))

Is it working with clang and icc?
Why not just define foo as foo_v2?
As this is the equivalent of BIND_DEFAULT_SYMBOL for the static case,
it would be easier to mix them in only one macro.

  parent reply	other threads:[~2015-06-26 12:53 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-23 19:33 [dpdk-dev] [PATCH 1/2] rte_compat.h : Clean up some typos Neil Horman
2015-06-23 19:33 ` [dpdk-dev] [PATCH 2/2] ABI: Add some documentation Neil Horman
2015-06-24 11:21   ` Mcnamara, John
2015-06-24 11:23 ` [dpdk-dev] [PATCH 1/2] rte_compat.h : Clean up some typos Mcnamara, John
2015-06-24 18:06   ` Neil Horman
2015-06-24 18:34 ` [dpdk-dev] [PATCHv2 " Neil Horman
2015-06-24 18:34   ` [dpdk-dev] [PATCHv2 2/2] ABI: Add some documentation Neil Horman
2015-06-24 21:09     ` Thomas Monjalon
2015-06-25 11:35       ` Neil Horman
2015-06-25 13:22         ` Thomas Monjalon
2015-06-25  7:19     ` Zhang, Helin
2015-06-25  7:42       ` Gonzalez Monroy, Sergio
2015-06-25  8:00         ` Gonzalez Monroy, Sergio
2015-06-25 12:25       ` Neil Horman
2015-06-29 16:35         ` [dpdk-dev] [PATCH] lib: remove redundant definition of local symbols Thomas Monjalon
2015-06-30 15:50           ` Thomas Monjalon
2015-06-24 19:41   ` [dpdk-dev] [PATCHv2 1/2] rte_compat.h : Clean up some typos Thomas Monjalon
2015-06-24 20:15     ` Neil Horman
2015-06-24 20:49       ` Thomas Monjalon
2015-06-25  7:37 ` [dpdk-dev] [PATCH " Gajdzica, MaciejX T
2015-06-25 12:28   ` Neil Horman
2015-06-25 14:35 ` [dpdk-dev] [PATCHv3 1/3] " Neil Horman
2015-06-25 14:35   ` [dpdk-dev] [PATCHv3 2/3] rte_compat: Add MAP_STATIC_SYMBOL macro Neil Horman
2015-06-26 10:13     ` Gajdzica, MaciejX T
2015-06-26 12:52     ` Thomas Monjalon [this message]
2015-06-26 14:30       ` Neil Horman
2015-06-28 20:13         ` Thomas Monjalon
2015-06-29 13:44           ` Neil Horman
2015-06-25 14:35   ` [dpdk-dev] [PATCHv3 3/3] ABI: Add some documentation Neil Horman
2015-06-26 13:00     ` Thomas Monjalon
2015-06-26 14:54       ` Neil Horman
2015-06-28 20:24         ` Thomas Monjalon
2015-06-29 13:53           ` Neil Horman
2015-06-26 12:45   ` [dpdk-dev] [PATCHv3 1/3] rte_compat.h : Clean up some typos Thomas Monjalon
2015-06-29 13:59 ` [dpdk-dev] [PATCHv4 1/4] " Neil Horman
2015-06-29 13:59   ` [dpdk-dev] [PATCHv4 2/4] rte_compat: Add MAP_STATIC_SYMBOL macro Neil Horman
2015-06-29 13:59   ` [dpdk-dev] [PATCHv4 3/4] rte_compat: remove BASE_SYMBOL Neil Horman
2015-06-29 13:59   ` [dpdk-dev] [PATCHv4 4/4] ABI: Add some documentation Neil Horman
2015-06-29 15:07     ` Thomas Monjalon
2015-07-08  9:52   ` [dpdk-dev] [PATCHv4 1/4] rte_compat.h : Clean up some typos Thomas Monjalon
2015-07-08 11:04     ` Neil Horman

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=3172025.YLFsvjgh6J@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=nhorman@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).