public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ramana at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/62287] gcc generates near call for extern weak function
Date: Thu, 15 Jan 2015 11:22:00 -0000	[thread overview]
Message-ID: <bug-62287-4-NjGk26d0nS@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-62287-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62287

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |ramana at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #1 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
If you use -mlong-calls in these particular cases, you should be able to work
around the problem.


The documentation for this feature states the following. 

 Even if this switch is enabled, not all function calls are turned
into long calls.  The heuristic is that static functions, functions
that have the @code{short_call} attribute, functions that are inside
the scope of a @code{#pragma no_long_calls} directive, and functions whose
definitions have already been compiled within the current compilation
unit are not turned into long calls.  The exceptions to this rule are
that weak function definitions, functions with the @code{long_call}
attribute or the @code{section} attribute, and functions that are within
the scope of a @code{#pragma long_calls} directive are always
turned into long calls.


I would read the exceptions to the rule as part of the #pragma no_long_calls
directive rather than anythign else. I'm not sure there's much for the compiler
to do here.


      reply	other threads:[~2015-01-15 11:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27 21:31 [Bug c/62287] New: " breiten at lexmark dot com
2015-01-15 11:22 ` ramana at gcc dot gnu.org [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=bug-62287-4-NjGk26d0nS@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).