However, this will let the linker know additional information about the function, including which TOC it is using, so it can emit the code to swap these around if necessary.
然而,这可以让链接器知道有关函数的其他信息,包括它使用的是哪个TOC,这样如果需要,就可以产生代码来在TOC之间进行切换了。
The dynamic linker can do a fair amount of work for each function linked, so most linkers are lazy.
动态链接器可以为每个被链接的函数做相当多的工作,所以大部分链接器都是不积极的。
You use.type to tell the linker that this value should be used as a function, and you use.global to tell the linker that this symbol can be referenced outside of the current file when linking.
type用来告诉链接器该值应该被用作函数,而.global则用来告诉链接器该符号在链接时可以在当前文件之外被引用。
Then, when the linker is setting up references to functions, it compares the TOC of the current function to the TOC of the function it's calling.
然后,当链接器设置对函数的引用时,就会将当前函数的TOC 与所调用的函数的 TOC 进行比较。
In some cases, the locator "s function may be hidden with in the linker".
在一些情况下,定位程序功能隐藏在连接程序中。
In some cases, the locator "s function may be hidden within the linker."
在一些情况下,定位程序功能隐藏在连接程序中。
The linker replaces that reference with the actual address at which it had loaded the function, so that the resulting binary code has the right address in place.
链接器使用加载该函数的真实地址去替换这个引用,以便生成的二进制代码在适当的位置会有正确的地址。
Your program just contains a reference to the particular function you want to use, the linker then loads the relevant part from the library when it creates your program.
你的程序只要包含了涉及到你要使用的特定功能,连接器在生成程序时就会从库里加载相关的部分。
In some cases, the locator "s function may be hidden with in the linker."
在一些情况下,定位程序功能隐藏在连接程序中。
The compiler alters the function name each time it appears in your program, and the linker matches them up appropriately.
每次函数名出现在程序中的时候编译器就替换它,然后连接器正确的把它们匹配起来。
In answer to your specific error message - the linker is telling you that it can't find the symbol for the main function.
在回答你的具体错误信息的链接告诉你它不能为主要功能,找到符号。
Finding an external function in an import library informs the linker that the code for that function is in a DLL.
若是在汇入程序库里发现外部函式,连结器便会被通知该函式的程序码是在DLL里。
You will not see this error until you create a call to the function that the linker must resolve.
您必须在建立该连结器必须解析的函式呼叫时,才会看到这个错误。
You will not see this error until you create a call to the function that the linker must resolve.
您必须在建立该连结器必须解析的函式呼叫时,才会看到这个错误。
应用推荐