linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: Johannes Berg <johannes@sipsolutions.net>, linux-um@lists.infradead.org
Cc: Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH] um: add __weak for exported functions
Date: Sun, 12 Feb 2023 13:34:38 -0800	[thread overview]
Message-ID: <e3f6699b-4b6e-b2b4-9561-1b6d828a740b@infradead.org> (raw)
In-Reply-To: <20230212203204.34cef454b288.I409a7567fcf846cd8f79e7788eb8c8869547463e@changeid>



On 2/12/23 11:32, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> If the exported glibc functions don't exist, we get link
> failures. Avoid that by adding __weak so they're allowed
> to not exist.
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>

Thanks.

> ---
>  arch/um/os-Linux/user_syms.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c
> index fd575ecbcaec..54722c7f884f 100644
> --- a/arch/um/os-Linux/user_syms.c
> +++ b/arch/um/os-Linux/user_syms.c
> @@ -39,7 +39,7 @@ EXPORT_SYMBOL(printf);
>   * good; so the versions of these symbols will always match
>   */
>  #define EXPORT_SYMBOL_PROTO(sym)       \
> -	int sym(void);                  \
> +	int sym(void) __weak; \
>  	EXPORT_SYMBOL(sym);
>  
>  extern void readdir64(void) __attribute__((weak));

-- 
~Randy

_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um

      reply	other threads:[~2023-02-12 21:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-12 19:32 [PATCH] um: add __weak for exported functions Johannes Berg
2023-02-12 21:34 ` Randy Dunlap [this message]

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=e3f6699b-4b6e-b2b4-9561-1b6d828a740b@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=johannes.berg@intel.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-um@lists.infradead.org \
    /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).