public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Terry Guo <flameroc@gmail.com>
To: gcc <gcc-help@gcc.gnu.org>
Subject: A possible way to link integer only library with hard float-abi app?
Date: Wed, 11 Dec 2013 09:35:00 -0000	[thread overview]
Message-ID: <CAGbRaL6-Pw7v7WhQW9DXa53w4KLo=m5QxNfQe99cC0qQ0hudQQ@mail.gmail.com> (raw)

Hi there,

Instructions in the library and hard float-abi app are all supported
by my target. And there is no floating point function call between
those two parts. So the final ELF file by linking them together should
be OK to run on my target. But such link is prevented by linker
because the integer only library is soft float-abi and the app is hard
float-abi. I know the softfp float-abi can work here. But I do need
hard float-abi for my app. I then checked the linker code and found
that if integer only library has attribute (Tag_ABI_FP_number_model ==
0), such check won't be happen, so library and app can be linked.

I am wondering if it is possible to enhance gcc to check whether the
current file uses floating point, if there is no floating point at
all, then set the Tag_ABI_FP_number_model of object file to zero.

Does this make sense? If so, where should I start? Please help.

BR,
Terry

                 reply	other threads:[~2013-12-11  9:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CAGbRaL6-Pw7v7WhQW9DXa53w4KLo=m5QxNfQe99cC0qQ0hudQQ@mail.gmail.com' \
    --to=flameroc@gmail.com \
    --cc=gcc-help@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).