mirror of
https://github.com/bitdefender/bddisasm.git
synced 2025-04-18 03:28:59 +00:00
Change the definition of shemu_printf so that unused parameters are removed from the compiled binary (#111)
* Change the definition of shemu_printf so that unused parameters (strings etc.) are removed from the compiled binary * Syntax fix * Fix the implementation of shemu_internal_printf * Replace NULL by ND_NULL in the invocation of shemu_internal_printf
This commit is contained in:
parent
c282f06215
commit
c43ceb8a34
bdshemu
@ -12,11 +12,11 @@
|
||||
|
||||
|
||||
//
|
||||
// shemu_printf - simple version
|
||||
// shemu_internal_printf - simple version
|
||||
//
|
||||
#ifndef BDDISASM_NO_FORMAT
|
||||
void
|
||||
shemu_printf(
|
||||
shemu_internal_printf(
|
||||
SHEMU_CONTEXT *Context,
|
||||
char *formatstring,
|
||||
...
|
||||
@ -41,7 +41,7 @@ shemu_printf(
|
||||
}
|
||||
#else
|
||||
void
|
||||
shemu_printf(
|
||||
shemu_internal_printf(
|
||||
SHEMU_CONTEXT *Context,
|
||||
char *formatstring,
|
||||
...
|
||||
|
@ -12,6 +12,12 @@
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef BDDISASM_NO_FORMAT
|
||||
#define shemu_printf(Context, formatstring, ...) shemu_internal_printf(Context, formatstring, __VA_ARGS__)
|
||||
#else
|
||||
#define shemu_printf(Context, formatstring, ...) do { (void)formatstring; shemu_internal_printf(Context, ND_NULL, __VA_ARGS__); } while (0)
|
||||
#endif
|
||||
|
||||
// The SHELLBMP and STACKBMP are two bitmaps which hold the state of each shellcode byte and each stack byte.
|
||||
// Inside SHELLBMP, we store whether a shellcode byte has been fetched for execution or not, and whether it was
|
||||
// modified or not.
|
||||
@ -65,7 +71,7 @@
|
||||
|
||||
|
||||
void
|
||||
shemu_printf(
|
||||
shemu_internal_printf(
|
||||
SHEMU_CONTEXT *Context,
|
||||
char *formatstring,
|
||||
...
|
||||
|
Loading…
Reference in New Issue
Block a user