Sparc函数编译对齐

Sparc函数编译对齐

本文介绍了Sparc函数编译对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我想要我的程序,使二进制中的每个函数在结束后剩下一些空间。所以后来如果需要一些细微的变化,只有这个功能会随着额外的空间而变化,作为会计小变化的空间。 -falign功能可以做到这一点,但是它不会给出一致的空间。有没有办法呢还是更好的办法呢?

解决方案

如果您正在使用足够新的编译器,他们最近添加了一个新选项: -fprolog -pad = N -fprolog-pad = M,N 这意味着在函数N之后发出M nops。


I want my program such that each function in the binary has some space left after it ends. So that later if some minor change is required only that function is changed with the extra space acting as room for accounting the minor change. -falign-function can do the job but it will not give consistent space. Is there anyway to do it? Or better way to do it?

解决方案

If you are using a sufficiently new compiler, they have recently added a new option: -fprolog-pad=N and -fprolog-pad=M,N which means issue M nops before the function an N nops after it.

这篇关于Sparc函数编译对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 08:57