This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: SH: patch for PIC and function sections
- To: Andrew Haley <aph at cambridge dot redhat dot com>
- Subject: Re: SH: patch for PIC and function sections
- From: Manfred Hollstein <manfred dot h at gmx dot net>
- Date: Mon, 17 Sep 2001 14:27:22 +0200
- CC: gcc-patches at gcc dot gnu dot org
- References: <15269.59520.542354.540014@cuddles.cambridge.redhat.com>
- Reply-To: manfred dot h at gmx dot net
Andrew Haley wrote:
[...]
> Index: config/sh/sh.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
> retrieving revision 1.118
> diff -w -p -2 -c -r1.118 sh.c
> *** sh.c 2001/08/31 14:49:37 1.118
> --- sh.c 2001/09/17 12:01:05
> *************** sh_can_redirect_branch (branch1, branch2
> *** 5553,5556 ****
> --- 5553,5570 ----
> insn && distance < 256;
> insn = NEXT_INSN (insn))
> +
> + /* Return true if a function call needs to use the PLT. This is true
> + iff the destination has SYMBOL_REF_FLAG clear -- in which case it's
> + either global or in a named section -- or the current function is
> + in a named section. With function-sections everything needs the
> + PLT. */
> + int
> + sh_call_needs_plt (op)
> + rtx op;
> + {
> + return (SYMBOL_REF_FLAG (op) == 0
> + || DECL_SECTION_NAME (current_function_decl)
> + || flag_function_sections);
> + }
> {
> if (insn == dest)
This patch doesn't look right, either.
Cheers.
l8er
manfred