VirtualBox

Changeset 93253 in vbox


Ignore:
Timestamp:
Jan 16, 2022 2:27:00 AM (3 years ago)
Author:
vboxsync
Message:

IPRT/zero.asm: Try save 64KB file space on windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/zero.asm

    r93115 r93253  
    3030%include "iprt/asmdefs.mac"
    3131
    32 ; Putting it in the code segment/section for now.
     32;
     33; Section to put this in.
     34;
     35;       - PE/COFF: Unless we put this in an BSS like section, the linker will
     36;         write out 64KB of zeros.  (Tried using .rdata$zz and put it at the end
     37;         of that section, but the linker did not reduce the RawDataSize.)  The
     38;         assmebler does not let us control the write flag directly, so we emit
     39;         a linker directive that switches of the write flag for the section.
     40;
     41;       - Fallback: Code section.
     42;
     43%ifdef ASM_FORMAT_PE
     44section .drectve info
     45        db '-section:.zero,!W '
     46section .zero bss align=4096
     47%else
    3348BEGINCODE
     49%endif
    3450
    3551;;
     
    4258EXPORTEDNAME_EX g_abRTZero32K, object
    4359EXPORTEDNAME_EX g_abRTZero64K, object
     60%ifdef ASM_FORMAT_PE
     61        resb  0x10000
     62%else
    4463        times 0x10000/(16*4) dd 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0
     64%endif
    4565%ifdef ASM_FORMAT_ELF
    4666size g_abRTZeroPage     _4K
     
    5171size g_abRTZero64K     _64K
    5272%endif
     73
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette