TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Invoke is Too High Level (2018)

22 点作者 niDistinct大约 4 年前

3 条评论

twic大约 4 年前
&gt; See our first call to &#x27;syscalls.40201B&#x27;, it&#x27;s jumping past our first string. A call normally knows how to return to where we came from by pushing the address of the next instruction to the stack. In this case though, our program doesn&#x27;t intend to return to this at all, it is using that pushed address as a side effect, as that address really is the first byte of our string, it serves as a pointer to it, and it is now on the stack conveniently as an argument.<p>Nasty. I love it.<p>What is the rationale for doing this, rather than putting the strings in the rodata section or whatever they have in PE files, and pushing addresses as immediates?<p>Do the strings end up in the instruction cache? They are never interpreted as instructions, but they will be on the same cache lines as real instructions.
lmz大约 4 年前
This sounds like a pretty weird thing to complain about (especially coming from the reversing direction).<p>Is the problem merely that they don&#x27;t like how the strings are inlined in the code section? (Where else would you put it? Automagically putting them in the data section would also be non-obvious). Or is the problem that they think invoke should error out if the parameter is not an integral type that can be a directly pushed? Or is the problem with macro assemblers and high-level features in general?<p>The reason for such a macro is because it makes calling Windows functions more similar to how they are documented. I think it&#x27;s still possible to use an assembler yet want such a macro for common uses (like calling Windows functions).
评论 #26294747 未加载
评论 #26295599 未加载
Something1234大约 4 年前
So I&#x27;ve never heard of invoke or high level assembly so this is interesting to hear about.