This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tic6x: relocation truncated to fit: R_C6000_PCR_S21


Hi Timon,

Can anyone give me some pointers on how to instruct the assembler, or
linker to generate different branch/call instructions?

The usual method is called "relaxation". You have the compiler, or assembler, generate the longest instruction sequence, ie one that is guaranteed to work no matter what the offset. Then in the linker, once the actual offset is known, you "relax" the instruction sequence, replacing it with a smaller sequence, if that is viable.


Several ports do this. Search for the string "relax" in the BFD sources.

Cheers
  Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]