New upstream version 1.71.63
Tomasz Buchert
6 years ago
Binary diff not shown
Binary diff not shown
1703 | 1703 | sub edx,eax |
1704 | 1704 | mov al,1 |
1705 | 1705 | call lseek |
1706 | jc resource_headers_ok | |
1706 | 1707 | resource_file_alignment_ok: |
1707 | 1708 | mov [esi],eax |
1708 | 1709 | lea edx,[esi+12] |
1748 | 1749 | resource_header_name_ok: |
1749 | 1750 | xor al,al |
1750 | 1751 | call lseek |
1751 | jmp read_resource_headers | |
1752 | jnc read_resource_headers | |
1752 | 1753 | resource_headers_ok: |
1754 | cmp esi,[free_additional_memory] | |
1755 | je invalid_file_format | |
1753 | 1756 | xor eax,eax |
1754 | 1757 | mov [esi],eax |
1755 | 1758 | mov [resource_data],edi |
3102 | 3105 | elf_closed: |
3103 | 3106 | ret |
3104 | 3107 | elf_formatter: |
3108 | mov ecx,edi | |
3109 | sub ecx,[code_start] | |
3110 | neg ecx | |
3111 | and ecx,111b | |
3112 | test [format_flags],8 | |
3113 | jnz align_elf_structures | |
3114 | and ecx,11b | |
3115 | align_elf_structures: | |
3116 | xor al,al | |
3117 | rep stos byte [edi] | |
3105 | 3118 | push edi |
3106 | 3119 | call prepare_default_section |
3107 | 3120 | mov esi,[symbols_stream] |
3392 | 3405 | mov ebx,[code_start] |
3393 | 3406 | mov eax,edi |
3394 | 3407 | sub eax,[free_additional_memory] |
3408 | xor ecx,ecx | |
3409 | sub ecx,eax | |
3395 | 3410 | test [format_flags],8 |
3396 | 3411 | jnz finish_elf64_header |
3412 | and ecx,11b | |
3413 | add eax,ecx | |
3397 | 3414 | mov [ebx+20h],eax |
3398 | 3415 | mov eax,[current_section] |
3399 | 3416 | inc ax |
3404 | 3421 | mov [ebx+30h],ax |
3405 | 3422 | jmp elf_header_finished |
3406 | 3423 | finish_elf64_header: |
3424 | and ecx,111b | |
3425 | add eax,ecx | |
3407 | 3426 | mov [ebx+28h],eax |
3408 | 3427 | mov eax,[current_section] |
3409 | 3428 | inc ax |
3414 | 3433 | mov [ebx+3Ch],ax |
3415 | 3434 | elf_header_finished: |
3416 | 3435 | xor eax,eax |
3417 | mov ecx,10 | |
3418 | rep stos dword [edi] | |
3436 | add ecx,10*4 | |
3437 | rep stos byte [edi] | |
3419 | 3438 | test [format_flags],8 |
3420 | 3439 | jz elf_null_section_ok |
3421 | mov ecx,6 | |
3422 | rep stos dword [edi] | |
3440 | mov ecx,6*4 | |
3441 | rep stos byte [edi] | |
3423 | 3442 | elf_null_section_ok: |
3424 | 3443 | mov esi,ebp |
3425 | 3444 | xor ecx,ecx |