public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Weird problems when upgrading to 2.17
@ 2006-06-27 21:51 Stefan Karlsson
  2006-06-28  7:58 ` Alan Modra
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Karlsson @ 2006-06-27 21:51 UTC (permalink / raw)
  To: binutils

Hello,

I have a GNU toolchain built for embedded PowerPC development (target = 
powerpc-eabi).

The toolchain runs on Cygwin and consists of the following parts:

* Binutils 2.16.1
* Newlib   1.14
* GCC      4.1.1

Today I tried to upgrade to Binutils 2.17 but when using this to build 
my target project I got the error message:

   powerpc-eabi-ld: error: no memory region specified for
   loadable section `.rela.dyn'.

I tried adding *(.rela.*) to the text section in my link script but the 
result was not very good: (1) the map file now has a huge list of 
"Discarded input sections", and (2) there is undefined references to 
_SDA_BASE_ and _SDA2_BASE_.


Does anyone have any ideas on what I should do?

-- 
Stefan









^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Weird problems when upgrading to 2.17
  2006-06-27 21:51 Weird problems when upgrading to 2.17 Stefan Karlsson
@ 2006-06-28  7:58 ` Alan Modra
  2006-06-28  8:43   ` Stefan Karlsson
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Modra @ 2006-06-28  7:58 UTC (permalink / raw)
  To: Stefan Karlsson; +Cc: binutils

On Tue, Jun 27, 2006 at 04:56:43PM +0200, Stefan Karlsson wrote:
>   powerpc-eabi-ld: error: no memory region specified for
>   loadable section `.rela.dyn'.

Did you mean to build a shared library or a dynamic executable?  If so,
you might try adding "-z nocombreloc" to the linker command line.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Weird problems when upgrading to 2.17
  2006-06-28  7:58 ` Alan Modra
@ 2006-06-28  8:43   ` Stefan Karlsson
  2006-06-29  2:24     ` Alan Modra
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Karlsson @ 2006-06-28  8:43 UTC (permalink / raw)
  To: binutils

Alan Modra wrote:
> On Tue, Jun 27, 2006 at 04:56:43PM +0200, Stefan Karlsson wrote:
>>   powerpc-eabi-ld: error: no memory region specified for
>>   loadable section `.rela.dyn'.
> 
> Did you mean to build a shared library or a dynamic executable?  If so,
> you might try adding "-z nocombreloc" to the linker command line.
> 

No, I want to build a static executable that runs from flash.

-- 
Stefan


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Weird problems when upgrading to 2.17
  2006-06-28  8:43   ` Stefan Karlsson
@ 2006-06-29  2:24     ` Alan Modra
  2006-06-29 10:36       ` Stefan Karlsson
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Modra @ 2006-06-29  2:24 UTC (permalink / raw)
  To: Stefan Karlsson; +Cc: binutils

On Wed, Jun 28, 2006 at 09:58:22AM +0200, Stefan Karlsson wrote:
> Alan Modra wrote:
> >On Tue, Jun 27, 2006 at 04:56:43PM +0200, Stefan Karlsson wrote:
> >>  powerpc-eabi-ld: error: no memory region specified for
> >>  loadable section `.rela.dyn'.
> >
> >Did you mean to build a shared library or a dynamic executable?  If so,
> >you might try adding "-z nocombreloc" to the linker command line.
> >
> 
> No, I want to build a static executable that runs from flash.

That's what I expected.  So how did the linker think you needed dynamic
relocations?  I think this can only happen if you pass -shared or -pie
to the linker, or link against shared libs.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Weird problems when upgrading to 2.17
  2006-06-29  2:24     ` Alan Modra
@ 2006-06-29 10:36       ` Stefan Karlsson
  2006-07-01  2:16         ` Alan Modra
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Karlsson @ 2006-06-29 10:36 UTC (permalink / raw)
  To: Stefan Karlsson, binutils

Alan Modra wrote:
> On Wed, Jun 28, 2006 at 09:58:22AM +0200, Stefan Karlsson wrote:
>> Alan Modra wrote:
>>> On Tue, Jun 27, 2006 at 04:56:43PM +0200, Stefan Karlsson wrote:
>>>>  powerpc-eabi-ld: error: no memory region specified for
>>>>  loadable section `.rela.dyn'.
>>> Did you mean to build a shared library or a dynamic executable?  If so,
>>> you might try adding "-z nocombreloc" to the linker command line.
>>>
>> No, I want to build a static executable that runs from flash.
> 
> That's what I expected.  So how did the linker think you needed dynamic
> relocations?  I think this can only happen if you pass -shared or -pie
> to the linker, or link against shared libs.
> 

I really don't know. I use the exact same makefile and the exact same 
source code. The only difference is that I use ld 2.17 instead of 2.16.1 
to build the thing.

-- 
Stefan



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Weird problems when upgrading to 2.17
  2006-06-29 10:36       ` Stefan Karlsson
@ 2006-07-01  2:16         ` Alan Modra
  2006-07-04  5:46           ` Stefan Karlsson
  0 siblings, 1 reply; 10+ messages in thread
From: Alan Modra @ 2006-07-01  2:16 UTC (permalink / raw)
  To: Stefan Karlsson; +Cc: binutils

On Thu, Jun 29, 2006 at 09:49:29AM +0200, Stefan Karlsson wrote:
> Alan Modra wrote:
> >On Wed, Jun 28, 2006 at 09:58:22AM +0200, Stefan Karlsson wrote:
> >>Alan Modra wrote:
> >>>On Tue, Jun 27, 2006 at 04:56:43PM +0200, Stefan Karlsson wrote:
> >>>> powerpc-eabi-ld: error: no memory region specified for
> >>>> loadable section `.rela.dyn'.
> >>>Did you mean to build a shared library or a dynamic executable?  If so,
> >>>you might try adding "-z nocombreloc" to the linker command line.
> >>>
> >>No, I want to build a static executable that runs from flash.
> >
> >That's what I expected.  So how did the linker think you needed dynamic
> >relocations?  I think this can only happen if you pass -shared or -pie
> >to the linker, or link against shared libs.
> 
> I really don't know. I use the exact same makefile and the exact same 
> source code. The only difference is that I use ld 2.17 instead of 2.16.1 
> to build the thing.

Can we see the linker command line?  Better still, can you package up
all the object files involved in the link so someone can debug the
problem?

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Weird problems when upgrading to 2.17
  2006-07-01  2:16         ` Alan Modra
@ 2006-07-04  5:46           ` Stefan Karlsson
  2006-07-04  8:01             ` Alan Modra
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Karlsson @ 2006-07-04  5:46 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

Alan Modra wrote:
> 
> Can we see the linker command line?  Better still, can you package up
> all the object files involved in the link so someone can debug the
> problem?
> 

I have attached a minimal project that builds cleanly with ld 2.16.1
but doesn't build with ld 2.17.

In case they might be of help, the binaries and map file from the
clean build are included. Notice that ".rela.dyn" shows up in the
map file (but without causing any trouble).

Here is the output from the failed build:

powerpc-eabi-as -o crt0.o crt0.s
powerpc-eabi-g++ -o main.o -c main.cpp
powerpc-eabi-ld crt0.o main.o -Tlink.ld -o test.elf -Map test.map
powerpc-eabi-ld: error: no memory region specified for loadable section 
`.rela.dyn'


[-- Attachment #2: ld-test.tar.gz --]
[-- Type: application/gzip, Size: 2135 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Weird problems when upgrading to 2.17
  2006-07-04  5:46           ` Stefan Karlsson
@ 2006-07-04  8:01             ` Alan Modra
  2006-07-04 13:29               ` Daniel Jacobowitz
  2006-07-04 14:34               ` Stefan Karlsson
  0 siblings, 2 replies; 10+ messages in thread
From: Alan Modra @ 2006-07-04  8:01 UTC (permalink / raw)
  To: Stefan Karlsson; +Cc: binutils

On Tue, Jul 04, 2006 at 07:45:56AM +0200, Stefan Karlsson wrote:
> Alan Modra wrote:
> >
> >Can we see the linker command line?  Better still, can you package up
> >all the object files involved in the link so someone can debug the
> >problem?
> >
> 
> I have attached a minimal project that builds cleanly with ld 2.16.1
> but doesn't build with ld 2.17.

Thanks.  The problem is that 2.17 is missing a patch of mine.  Apply
http://sources.redhat.com/ml/binutils/2006-05/msg00319.html to 2.17 and
you should find the error disappears.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Weird problems when upgrading to 2.17
  2006-07-04  8:01             ` Alan Modra
@ 2006-07-04 13:29               ` Daniel Jacobowitz
  2006-07-04 14:34               ` Stefan Karlsson
  1 sibling, 0 replies; 10+ messages in thread
From: Daniel Jacobowitz @ 2006-07-04 13:29 UTC (permalink / raw)
  To: binutils; +Cc: Stefan Karlsson

On Tue, Jul 04, 2006 at 05:31:27PM +0930, Alan Modra wrote:
> On Tue, Jul 04, 2006 at 07:45:56AM +0200, Stefan Karlsson wrote:
> > Alan Modra wrote:
> > >
> > >Can we see the linker command line?  Better still, can you package up
> > >all the object files involved in the link so someone can debug the
> > >problem?
> > >
> > 
> > I have attached a minimal project that builds cleanly with ld 2.16.1
> > but doesn't build with ld 2.17.
> 
> Thanks.  The problem is that 2.17 is missing a patch of mine.  Apply
> http://sources.redhat.com/ml/binutils/2006-05/msg00319.html to 2.17 and
> you should find the error disappears.

Thanks!  I've merged this to the branch, in case there's a 2.17.1.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Weird problems when upgrading to 2.17
  2006-07-04  8:01             ` Alan Modra
  2006-07-04 13:29               ` Daniel Jacobowitz
@ 2006-07-04 14:34               ` Stefan Karlsson
  1 sibling, 0 replies; 10+ messages in thread
From: Stefan Karlsson @ 2006-07-04 14:34 UTC (permalink / raw)
  To: binutils

Alan Modra wrote:

> Thanks.  The problem is that 2.17 is missing a patch of mine.  Apply
> http://sources.redhat.com/ml/binutils/2006-05/msg00319.html to 2.17 and
> you should find the error disappears.
> 

Thank you!


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2006-07-04 14:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-27 21:51 Weird problems when upgrading to 2.17 Stefan Karlsson
2006-06-28  7:58 ` Alan Modra
2006-06-28  8:43   ` Stefan Karlsson
2006-06-29  2:24     ` Alan Modra
2006-06-29 10:36       ` Stefan Karlsson
2006-07-01  2:16         ` Alan Modra
2006-07-04  5:46           ` Stefan Karlsson
2006-07-04  8:01             ` Alan Modra
2006-07-04 13:29               ` Daniel Jacobowitz
2006-07-04 14:34               ` Stefan Karlsson

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).