bincode_return.hss 950 B

1234567891011121314151617
  1. [Main]
  2. Title=Return Sequence Optimization
  3. [Top]
  4. The TIGCC linker can optimize function return sequences. If a section ends
  5. with a subroutine branch followed by a simple return instruction, the
  6. subroutine branch is converted into a simple unconditional branch (jump),
  7. and the return instruction is removed. Note that this may fail easily if
  8. there is a branch to the return instruction somewhere; if the return
  9. instruction is removed, the branch will point to arbitrary code or data.
  10. You can make this less likely by telling the assembler to emit all local
  11. labels, so the linker knows it cannot optimize a return sequence because
  12. there is a label in front of the return instruction. With the
  13. <A HREF="$$INFOLINK(gnuasm)">GNU Assembler</A>, this is done by using the
  14. <B>'--keep-locals'</B> option, which is included automatically if
  15. range-cutting is enabled. With the <A HREF="$$INFOLINK(a68k)">A68k Assembler</A>,
  16. the <B>'-d'</B> switch does the job.