• Create Account

### #ActualNypyren

Posted 27 February 2014 - 08:05 PM

Jump tables for switch statements are technically data which are typically stored in the code section after the end of the function which contains the switch statement.

Microsoft compilers output files organized like so:

Headers
Function 0
Instructions
Optional: Case mapping table (and optional padding to the next pointer-sized boundary)
Optional: Case block pointers (and optional padding to the next 16 byte boundary)
Function 1
Instructions
...ETC...
Data!
Data!
Data!
Data!
Data!
(etc...)

Other compilers (or binary compressors such as UPX) are free to rearrange anything besides the main header that they want to.

### #4Nypyren

Posted 27 February 2014 - 08:02 PM

Jump tables for switch statements are technically data which are typically stored in the code section after the end of the function which contains the switch statement.

Microsoft compilers output files organized like so:

Headers
Function 0
Instructions
Optional: Case mapping table (and optional padding to the next pointer-sized boundary)
Optional: Case block pointers (and optional padding to the next 16 byte boundary)
Function 1
Instructions
...ETC...
Data!
Import Section
Data!
Export Section
Data!
Relocation Section
Data!
Resource Section
Data!
(etc...)

Other compilers (or binary compressors such as UPX) are free to rearrange anything besides the main header that they want to.

### #3Nypyren

Posted 27 February 2014 - 08:01 PM

Jump tables for switch statements are technically data which are typically stored in the code section after the end of the function which contains the switch statement.

Microsoft compilers output files organized like so:

Headers
Function 0
Instructions
Optional: Case mapping table (and optional padding to the next pointer-sized boundary)
Optional: Case block pointers (and optional padding to the next 16 byte boundary)
Function 1
Instructions
...ETC...
Data!
Import Section
Data!
Export Section
Data!
Relocation Section
Data!
Resource Section
Data!
(etc...)


### #2Nypyren

Posted 27 February 2014 - 08:01 PM

Jump tables for switch statements are technically data which are typically stored in the code section after the end of the function which contains the switch statement.

Microsoft compilers output files organized like so:

Headers
Function 0
Instructions
Optional: Case mapping table (and optional padding to the next pointer-sized boundary)
Optional: Case block pointers (and optional padding to the next 16 byte boundary)
Function 1
Instructions
...ETC...
Data!
Import Section
Data!
Export Section
Data!
Relocation Section
Data!
Resource Section
Data!
(etc...)


### #1Nypyren

Posted 27 February 2014 - 08:00 PM

Jump tables for switch statements are technically data which are typically stored in the code section after the end of the function which contains the switch statement.

Microsoft compilers output files organized like so:

Headers
Code Section
Function 0
Instructions
Optional: Case mapping table (and optional padding to the next pointer-sized boundary)
Optional: Case block pointers (and optional padding to the next 16 byte boundary)
Function 1
Instructions
...ETC...
Initialized Data Section
Data!
Import Section
Data!
Export Section
Data!
Relocation Section
Data!
Resource Section
Data!
(etc...)


PARTNERS