Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-25-2004, 12:02 PM   #1
LQ Newbie
Registered: Mar 2004
Posts: 4

Rep: Reputation: 0
Linker problems

I have compiled my code successfully on red hat 9.0 on an i386 machine with no linker errors and the programs run fine. With that said....
I am now trying to port this code to red hat 2.1 AS (Advanced Server) on A64 X455 IBM machine. I am using the following linker and compiler versions:

$ ld -v
GNU ld version (with BFD
$ cc -v
Reading specs from /usr/lib/gcc-lib/ia64-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-124.7.2)

The compile options are below:
-g -Wall -fno-rtti -fno-exceptions -L/usr/shlib -lpthread -lm \
-pthread -D_THREAD_SAFE -lpthread -lc -lrt -ldl -rdynamic \

The individual c program compiles fine as they all do!! Am I missing a compile option or do I have one I don't need?

Here are a couple of the linker error messages:
/home/l.c:5028: relocation truncated to fit:PCREL21B __divdf3
/home/l.c:6512: relocation truncated to fit: PCREL21B __divdf3
/home/l.c:7496: relocation truncated to fit: PCREL21B __divdf3
/home/l.c:8620: relocation truncated to fit: PCREL21B __divdf3

Someone please HELP me!!!!!!

Old 03-29-2004, 05:36 AM   #2
Registered: Apr 2003
Location: Russia, Khotkovo
Distribution: Debian
Posts: 146

Rep: Reputation: 15
Update your binutils version
Old 03-29-2004, 02:36 PM   #3
Registered: Aug 2003
Location: 63123
Distribution: OpenSuSE/Ubuntu
Posts: 419

Rep: Reputation: 35
Are you mixing 32 and 64 bit code?
Old 03-31-2005, 05:08 PM   #4
LQ Newbie
Registered: Mar 2005
Posts: 1

Rep: Reputation: 0
I ran into this recently and noticed that multiply-definded routines were causing the "relax"
mode to be disabled.

I could see the same failure if I did the link *without* the -relax flag.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
linker question dalelane Programming 2 11-09-2004 11:26 AM
problems with linking objects -- must know some nasm\ASM\linker Paul6253 Programming 1 10-26-2004 08:33 PM
Problems with GNU linker ld chip1081 Linux - Software 5 10-15-2004 04:46 PM
Linker Error dim79 Programming 2 06-28-2003 09:53 AM
Linker problems on Mandrake 9.1 stodge Programming 0 05-07-2003 11:58 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:07 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration