public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Per Arnold Blaasmo <per-arnold.blaasmo@atmel.com>
To: Carlos de Sa <desa.carlos@gmail.com>
Cc: <crossgcc@sourceware.org>
Subject: Re: Newlib complains of undefined references to __bss_start__, __bss_end__ & __end__
Date: Wed, 08 Aug 2012 06:54:00 -0000	[thread overview]
Message-ID: <50220D2C.9090101@atmel.com> (raw)
In-Reply-To: <CAOvs798oNWAyYhKYch0gh=kvDPXOWvrucin=zGitYAww7J2-zA@mail.gmail.com>

On 07. aug. 2012 16:00, Carlos de Sa wrote:
> Hi,
> 
> I'm trying to build an arm-eabi toolchain using gcc 4.7.1, binutils
> 2.22 and newlib 1.20. This appears to build sucessfully. However when
> testing a simple c program it complains -
> 
> crosstool-ng-1.15.3/.build/src/newlib-1.20.0/newlib/libc/sys/arm/crt0.S:406:
> error: undefined reference to '__bss_start__'
> crosstool-ng-1.15.3/.build/src/newlib-1.20.0/newlib/libc/sys/arm/crt0.S:406:
> error: undefined reference to '__bss_end__'
> crosstool-ng-1.15.3/.build/src/newlib-1.20.0/newlib/libc/sys/arm/crt0.S:406:
> error: undefined reference to '__end__'
> collect2: error: ld returned 1 exit status
> 
>From the above it appears that the generated toolchain in
> ~/x-tools/arm-unknown-eabi/ still has references to the build
> directory in crosstool-ng-1.15.3/.build also also undefined linker
> symbols?
> 
> any idea how to solve this?
> 
> TIA.
> 
> Regards
> Carlos
> 

That seems to me to be a mismatch between the start up code in crt0.S
and the linker script you use.

From what I have understood when building an ARM toolchain you do not
use the start up code and linker scripts from newlib. You supply your
own in your project.

How does your .config file look like?

Regards
Per A.



--
For unsubscribe information see http://sourceware.org/lists.html#faq

      reply	other threads:[~2012-08-08  6:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-07 14:00 Carlos de Sa
2012-08-08  6:54 ` Per Arnold Blaasmo [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=50220D2C.9090101@atmel.com \
    --to=per-arnold.blaasmo@atmel.com \
    --cc=crossgcc@sourceware.org \
    --cc=desa.carlos@gmail.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).