VirtualBox

Changeset 108256 in vbox


Ignore:
Timestamp:
Feb 17, 2025 11:17:28 AM (4 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167578
Message:

iprt/asmdefs.mac: ELF .data & .text (BEGINCONST) section alignment fixes for yasm.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/asmdefs.mac

    r108254 r108256  
    752752
    753753;
    754 ; Do OMF and Mach-O/Yasm segment definitions
    755 ;
    756 ; Both format requires this to get the segment order right, in the Mach-O/Yasm case
    757 ; it's only to make sure the .bss section ends up last (it's not declared here).
     754; Do OMF, Mach-O/Yasm and ELF/Yasm segment definitions.
     755;
     756; For OMF and Mach-O it is to get the segment order right. For Mach-O it's only
     757; to make sure the .bss section ends up last (it's not declared here).
     758;
     759; Neither Mach-O nor ELF have data alignments propagated to the section
     760; alignment, so we have to explictly set the .data section and .rodata/.text
     761; alignments here to 16 bytes to ensure we can cope with most stuff.
     762; TODO: Check what nasm does!
    758763;
    759764%ifdef ASM_FORMAT_OMF
     
    808813%ifdef ASM_FORMAT_MACHO
    809814 %ifdef __YASM__
    810   section .text
    811   section .data align=16
    812   section .rodata align=16
     815  %ifndef RT_NOINC_SEGMENTS
     816   section .text
     817   section .data   align=16
     818   section .rodata align=16
     819  %endif
     820 %endif
     821%endif
     822
     823%ifdef ASM_FORMAT_ELF
     824 %ifdef __YASM__
     825  %ifndef RT_NOINC_SEGMENTS
     826   section .text align=16
     827   section .data align=16
     828  %endif
    813829 %endif
    814830%endif
Note: See TracChangeset for help on using the changeset viewer.

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