LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 03-25-2004, 12:02 PM   #1
daveyboy685
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 2.11.90.0.8 (with BFD 2.11.90.0.8)
$ 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 \
-D_GNU_SOURCE -D_LARGEFILE_SOURCE64 -D_FILE_OFFSET_BITS=64 \

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!!!!!!

David
 
Old 03-29-2004, 05:36 AM   #2
yuray
Member
 
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
jinksys
Member
 
Registered: Aug 2003
Location: 63123
Distribution: OpenSuSE/Ubuntu
Posts: 417

Rep: Reputation: 31
Are you mixing 32 and 64 bit code?
 
Old 03-31-2005, 05:08 PM   #4
sheridan02478
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.
 
  


Reply


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


All times are GMT -5. The time now is 08:53 AM.

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