This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: SH: patch for PIC and function sections


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]