Hehe, indeed, I wasn’t too sure where to post my question since the blog doesn’t allow comments.
thanks for the explanation and link to godbolt, it really varies wildly with different compilers for the same language.
Hehe, indeed, I wasn’t too sure where to post my question since the blog doesn’t allow comments.
thanks for the explanation and link to godbolt, it really varies wildly with different compilers for the same language.
Thanks for the appreciation! It was fun writing that article, and weirdly it’s the article that was the easiest to write and that I wrote in the least amount of time (one day I think, as opposed to a week for most of my other articles).
To answer @vrata, no, you can’t compile the C code that you write at the same time because it is often pseudo code, and it usually helps you understand what the function does, then you can rewrite it in your own style, so it will most often not even compile. Besides, as @Caliga said, the arguments given to the compiler, and the specific version of the compiler will make a huge difference in the resulting code, so it might take you forever, just to find the right combination of compiler+options to get it to match… Besides, “if (x > 0)” is the same as “if (0 <= x)” but the compiler might decide to generate different output depending on which you use, so you can’t really go back to the same original source, even if you have the same compiler+options.
@Caliga: Thanks for that godbolt.org link, If I had it before I had the article, it might have been useful to add for people to play with it. I might try to do an edit and insert it.
Back to the topic of this thread (btw, @vrata, you could have created a new thread ‘discussion about reverse engineering post’ for example), I’m happy to say that we now have a wiki setup! It’s been a few days at least (maybe weeks? I just wasn’t notified). I tried to create an account in it though and whatever username I enter, it says the username is already in use. Also, we already got one viagra spam on it somehow, since it’s publicly editable, so for now, i won’t share the link (not hard to guess though) to avoid bots picking up on it, but yeah, i’m asking the sysadmin now to see what’s wrong with the account registration, and we’ll try to get some saner settings/moderation/writing groups setup before we make it public! so… yeay!