public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ilija Kocho <ilijak@siva.com.mk>
To: Kai Ruottu <kai.ruottu@wippies.com>
Cc: gcc-help@gcc.gnu.org
Subject: Re: gcc Cortex M4 bug ?
Date: Fri, 14 Jun 2013 13:37:00 -0000	[thread overview]
Message-ID: <51BB1C87.3050204@siva.com.mk> (raw)
In-Reply-To: <51B9F7EF.5010007@wippies.com>

On 13.06.2013 18:48, Kai Ruottu wrote:
> 13.6.2013 12:25, matti h kirjoitti:
>> Hi,
>> Im trying to implement a dynamic linker for M4 mcu's.
>> But the generated code from gcc seems incorrect to me: im compiling
>> using
>> arm-none-eabi-gcc: -mcpu=cortex-m4 -mthumb -O2 -ggdb 
>> -Wstrict-prototypes
>> -Wunused-parameter -lmylib main.c -o test
>
> For me this all looks insane :(
>
> I would expect the 'arm-eabi' target being purely static and not
> knowing anything about
> shared libraries and dynamic linking, something equivalent to the
> 'arm-elf' target but with
> somehow different object format. Meanwhile targets like 'arm-linux*',
> 'arm-*bsd' etc. will
> support dynamic linking. If we look at the Wikipedia page :
>
> http://en.wikipedia.org/wiki/Application_binary_interface
>
> there is told :
>
> "The main differences of an EABI with respect to an ABI for general
> purpose operating
> systems are that privileged instructions are allowed in application
> code, dynamic linking
> is not required (sometimes it is completely disallowed), and a more
> compact stack frame
> organization is used to save memory."

/Not required/ doesn't mean /not desirable/ (though /disallowed/
implies). It also doesn't mean that EABI hinders dynamic object loading.
An example is eCos (http://ecos.sourceware.org) that uses ARM EABI and
yet supports dynamic object loading.

Ilija

      reply	other threads:[~2013-06-14 13:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-13  9:25 matti h
2013-06-13 16:50 ` Kai Ruottu
2013-06-14 13:37   ` Ilija Kocho [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=51BB1C87.3050204@siva.com.mk \
    --to=ilijak@siva.com.mk \
    --cc=gcc-help@gcc.gnu.org \
    --cc=kai.ruottu@wippies.com \
    /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).