DSPRelated.com
Forums

Linker error : relocation value truncated

Started by behcsiang January 9, 2003
Dear All,

I'm using CCS 2.1. / C6415.
I'm working on a video encoder. Most of my codes
are written in C language. Some in Linear Assembly.

Previously, my codes work well.. until recently when
I add more codes to the program.
When I compile, I get many linker error messages, which
look like this :

>> error: relocation value truncated at 0x5b4 in section .text, file

The help file says that this means the function call is
outside the range / far from call site.

May I know what is the solution to this type of problem ?
Generally, how can we avoid this problem in the C code ?

Thank you.
Happy New Year 2003..

--
BehCS



Hi,
this is due to the huge C code which is compiled by the compiler.
To remove this error goto your project options advanced  and change the memory models to "Far calls" and data and RTS calls to "Are Far". this should solve your problem.
Hope this helps.
Ganesh
----- Original Message -----
From: ">behcsiang <b...@hotmail.com>
To: c...@yahoogroups.com
Sent: Thursday, January 09, 2003 8:14 AM
Subject: [c6x] Linker error : relocation value truncated

Dear All,
 
   I'm using CCS 2.1. / C6415.
I'm working on a video encoder. Most of my codes
are written in C language. Some in Linear Assembly.

   Previously, my codes work well.. until recently when
I add more codes to the program.
When I compile, I get many linker error messages, which
look like this :

>>  error: relocation value truncated at 0x5b4 in section .text, file

   The help file says that this means the function call is
outside the range / far from call site.

   May I know what is the solution to this type of problem ?
Generally, how can we avoid this problem in the C code ?

   Thank you.
   Happy New Year 2003..

--
BehCS
_____________________________________
Note: If you do a simple "reply" with your email client, only the author of this message will receive your answer.  You need to do a "reply all" if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:  Send an email to c...@yahoogroups.com

To Post:  Send an email to c...@yahoogroups.com

To Leave: Send an email to c...@yahoogroups.com

Archives: http://www.yahoogroups.com/group/c6x

Other Groups: http://www.dsprelated.com
 

">http://docs.yahoo.com/info/terms/




You might need to use a different memory model. Se the the -ml option
in the compiler manual.

/Regards, Par Ligander

On Thu, 9 Jan 2003, behcsiang <> wrote:

> Dear All,
>
> I'm using CCS 2.1. / C6415.
> I'm working on a video encoder. Most of my codes
> are written in C language. Some in Linear Assembly.
>
> Previously, my codes work well.. until recently when
> I add more codes to the program.
> When I compile, I get many linker error messages, which
> look like this :
>
> >> error: relocation value truncated at 0x5b4 in section .text, file
>
> The help file says that this means the function call is
> outside the range / far from call site.
>
> May I know what is the solution to this type of problem ?
> Generally, how can we avoid this problem in the C code ?
>
> Thank you.
> Happy New Year 2003..
>
> --
> BehCS >
> _____________________________________
> Note: If you do a simple "reply" with your email client, only the author of
this message will receive your answer. You need to do a "reply all" if you want
your answer to be distributed to the entire group.
>
> _____________________________________
> About this discussion group:
>
> To Join: Send an email to
>
> To Post: Send an email to
>
> To Leave: Send an email to
>
> Archives: http://www.yahoogroups.com/group/c6x
>
> Other Groups: http://www.dsprelated.com > ">http://docs.yahoo.com/info/terms/ >





See also

Bug entry (SDSsq27328) on CCS 2.1

Sometimes this linker error is generated when everything is fine.

Andrew E.

At 06:35 PM 1/9/2003 +0530, Ganesh Vijayan wrote:
>Hi,
>this is due to the huge C code which is compiled by the compiler.
>To remove this error goto your project options advanced and change the memory
models to "Far calls" and data and RTS calls to "Are Far". this should solve
your problem.
>Hope this helps.
>Ganesh
>----- Original Message -----
>From: <mailto:>>behcsiang <>
>To: <mailto:>
>Sent: Thursday, January 09, 2003 8:14 AM
>Subject: [c6x] Linker error : relocation value truncated
>
>Dear All,
>
> I'm using CCS 2.1. / C6415.
>I'm working on a video encoder. Most of my codes
>are written in C language. Some in Linear Assembly.
>
> Previously, my codes work well.. until recently when
>I add more codes to the program.
>When I compile, I get many linker error messages, which
>look like this :
>
>>> error: relocation value truncated at 0x5b4 in section .text, file
>
> The help file says that this means the function call is
>outside the range / far from call site.
>
> May I know what is the solution to this type of problem ?
>Generally, how can we avoid this problem in the C code ?
>
> Thank you.
> Happy New Year 2003..
>
>--
>BehCS >
>