How to disable linker relaxation during linking phase of GCC LD?

1.9k views Asked by At

I am compiling an image for E500MC target. In one of them assembly code, I have section called ".hrfi" where there only one branch instruction to another routine present. Because of this, the linker relaxing the size of the .hrfi sector. Initially it was 0x4, but after relaxing it became 0x14.

.hrfi           0x0000000000000000       0x14
 .hrfi          0x0000000000000000       0x14 ../LIB.obj
                                          0x4 (size before relaxing)
                0x0000000000000000                rountine1

Because of this adjustment, my other sections got displaced which resulting some issues with my ELF to be loaded on my target.

I want to know if the relaxing can be disabled or not and how to disable?

1

There are 1 answers

0
vimal prathap On

--no-relax would disable relax. It worked.