修复的定义?

发布于 2024-07-26 17:16:41 字数 101 浏览 4 评论 0原文

我在 Python Lisp 编译器和一些 C 链接器的源代码中看到过这个术语。

我的猜测是,修复只是汇编例程的一些包装,以确保对齐正确,但我对这里的任何事情都不确定。

I've seen this term in the Python Lisp compiler and some C linker's sources.

My guess is that a fix-up is just some wrapper around an Assembly routine that makes sure the alignment is right, but I'm not sure at all about anything here.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

執念 2024-08-02 17:16:41

“修复”是链接器术语。 这里有一个很好的讨论:

http://www.microsoft.com/msj/ 0797/hood0797.aspx

每当目标文件(.o、.obj)引用某个外部符号时,它都会输出占位符代码,如“将地址 0 放入寄存器 5”以及一条注释,显示“用 0 填充该 0”符号“foo”的实际地址”。 其他一些目标文件将定义“foo”,链接器然后将返回并将 0“修复”为正确的地址。

顺便说一句,如果没有人定义“foo”,您会收到复古 50 年代风格的错误消息,其中包含诸如“找不到对 _foo 的引用”之类的内容,或者如果您使用 C++,则更难以理解。

当“foo”的地址不适合链接器想要放置的位置时,很少会出现“修复错误”。 通常,这来自需要太大相对偏移的修复。

A "fixup" is a linker term. There's a pretty good discussion of it here:

http://www.microsoft.com/msj/0797/hood0797.aspx

Whenever a object file (.o, .obj) refers to some external symbol it will output placeholder code like "Put address 0 to register 5" and a note that says "Fill in that 0 with the actual address of symbol 'foo'". Some other object file will define 'foo', the linker will then go back and "fix up" the 0 to be the correct address.

Incidentally, if nobody defines 'foo' you get that retro 50's style error message blithering something like 'can't find reference to _foo' or even less comprehensible if you're using C++.

And pretty rarely you'll get a "fixup error" when the address of 'foo' doesn't fit where the linker wants to put it. Generally this comes from a fixup that requires a relative offset that is too large.

似最初 2024-08-02 17:16:41

Linker and Loaders 是一个有趣的 Inker 资源,它解释了很多术语,并且还包含非 x86 cpu:

http://www.iecc.com/linker/

来自 comp.compilers 版主的

Linker and Loaders is an interesting inker resource that explains a lot of jargon, and includes non x86 cpus here and there too:

http://www.iecc.com/linker/

from the comp.compilers moderator.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文