This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RS6000] Weak functions may not be file local
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Alan Modra <amodra at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 1 Sep 2015 10:06:27 -0400
- Subject: Re: [RS6000] Weak functions may not be file local
- Authentication-results: sourceware.org; auth=none
- References: <20150901075113 dot GQ24814 at bubble dot grove dot modra dot org>
On Tue, Sep 1, 2015 at 3:51 AM, Alan Modra <amodra@gmail.com> wrote:
> A weak symbol defined in the current object file may not turn out to
> be the definition used at link time, if other copies of the symbol
> exist. This means they can't be considered file local; Calls to
> weak functions need a nop so that the linker can replace it with a toc
> restoring insn if the function uses a different toc pointer to its
> caller (for linker grouping of TOC into multiple sections).
>
> Bootstrapped and regression tested powerpc64-linux. OK for active
> branches?
>
> PR target/67417
> * config/rs6000/predicates.md (current_file_function_operand): Don't
> return true for weak symbols.
> * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Likewise.
Okay.
Thanks, David