RouteMapper
RouteMapper

Reputation: 2560

Can a compiler optimize out a function preamble in assembly?

I am attempting to build a decompiler for x86 executables and was wondering if I can safely assume that function preambles/prologues will remain intact. Is it possible compilers could optimize them out of the assembly?

Upvotes: 2

Views: 250

Answers (1)

Drew McGowen
Drew McGowen

Reputation: 11706

Yes, things like leaf functions (see here) might be optimized, as well as any function that doesn't use any local variables.

Upvotes: 5

Related Questions