A question about ld relaxation.

bjgnu@sunnorth.com.cn bjgnu@sunnorth.com.cn
Wed May 23 02:51:00 GMT 2007


Hello binutils experts,

I see it is reliable to relax pc-relative instructions,
like bl-32bits relax to bl-16bits (for function call) for the
pc-relative offset can be calculated correctly?

I have some questions about the relaxation issue here.

1, Can ld relax direct jump instructions? 
Such as jump-32bits relax to jump-16bits. It is not the final link,
and all global symbol address is not fixed. In the relaxation stage,
can i directly use the global symbol address as the final address? 

2, Does ld handle pc-relative relaxation and direct jump relaxation 
the same way?

3, Almost all the targets shrink the instruction size during relaxation.
Can i enlarge the instruction? like bl32-bits relax to bl-48bits?

Any help will be appreciated!

Best regards,
Qinwei



More information about the Binutils mailing list