public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* ld problems
@ 2003-08-07 12:34 Hylla, Kai
  2003-08-07 13:15 ` Alan Modra
  2003-08-07 13:36 ` Nick Clifton
  0 siblings, 2 replies; 6+ messages in thread
From: Hylla, Kai @ 2003-08-07 12:34 UTC (permalink / raw)
  To: binutils

Hi together!

At first I must say, that my English isn't very good, so please be
patient with me.

I'm developing software on a win32 Host for a ppc-elf embedded target. I
use 

gcc 2.95.2
as  2.10
ld  2.10


I have a problem with the ld. It seems that the ld doesn't relocate the
addresses correct. If I try to branch absolut (using ba) to an address
between 0x0200_0000 and 0xFE00_0000 it calculates the wrong value. The
calcultated value is 0xFE00_000 to high. If I try to use the correct
value as an constant (i.e. ba 0x02400238) I get an error:

     Error: operand out of range (37757824 not between -33554432 and
33554431)


Has anyone an idea what causes this problem and how to solve it?

Regards,
Kai


---
K. Hylla
Abt. NJT T3

STN ATLAS Elektronik GmbH
Sebaldsbruecker Heerstr. 235
D-28305 Bremen

Tel.: +49 421 457-3231
Fax : +49 421 457-1702 

^ permalink raw reply	[flat|nested] 6+ messages in thread
* ld problems
@ 2004-09-11 14:43 Mattias Jansson
  2004-09-13  0:24 ` Alan Modra
  0 siblings, 1 reply; 6+ messages in thread
From: Mattias Jansson @ 2004-09-11 14:43 UTC (permalink / raw)
  To: binutils


Please excuse me if this is the wrong place for this kind of questions,
but I've been banging my head against this particular wall for a while
now, and don't think I'll find a solution on my own.

I am linking a a program consisting of a single C++ object file (a test
suite) with a rather large static library also written in C++ (my 3D
game engine). Everything has worked fine for quite some time, but
recently I started getting an annoying error during the link phase of
the program (compiling the static library archive itself is just fine,
no problems there). The error I'm getting is

g++ -o build/scons/debug/test/test-font-debug
build/scons/debug/test/font/application.o -Lbuild/scons/debug/engine
-Lsrc -L/usr/X11R6/lib -lneoapplication-debug -lneoengine-debug -lGL
-lXxf86vm -lX11
typeinfo for neo::scene::Object: discarded in section
`.gnu.linkonce.r._ZTIN3neo5scene6ObjectE' from
build/scons/debug/engine/libneoengine-debug.a(object.o)
collect2: ld returned 1 exit status

where 'libneoengine-debug.a' is the engine static library archive.

I have searched for a better description of the problem and what to do
about it, but can't seem to find anything. 

The problem goes away if I rename the neo::scene::Object class to
something else, but that's not a solution. 

It also goes away if I add a --whole-archive / --no-whole-archive block
around -lneoengine-debug, but that sounds like a hack rather than a
solution to me.

Does anybody have an idea of what the problem might be and how to fix
it? Or simply describe this error in more detail to point me in the
right direction? If you need more information or the source, just tell
me.

Thanks!

/ Mattias


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

end of thread, other threads:[~2004-09-13  9:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-07 12:34 ld problems Hylla, Kai
2003-08-07 13:15 ` Alan Modra
2003-08-07 13:36 ` Nick Clifton
2004-09-11 14:43 Mattias Jansson
2004-09-13  0:24 ` Alan Modra
2004-09-13  9:26   ` Mattias Jansson

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