VirtualBox

Changeset 100276 in vbox for trunk


Ignore:
Timestamp:
Jun 23, 2023 11:03:48 PM (18 months ago)
Author:
vboxsync
Message:

iprt/asmdefs-arm.h,Config.kmk: Use ASM_FORMAT_ELF and ASM_FORMAT_MACHO to in asmdefs-arm.h to determin how to start sections. bugref:10457

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r100229 r100276  
    18361836 endif
    18371837else  # ifn1of ($(KBUILD_TARGET_ARCH), amd64 x86)
    1838  VBOX_ASTOOL =# No tool, just use the compiler one.
    1839  VBOX_LDR_FMT_2_FLAGS.elf  := -DASM_FORMAT_ELF
     1838 VBOX_ASTOOL      = $(VBOX_GCC_TOOL)
     1839 VBOX_LDR_FMT_2_FLAGS.elf   := -DASM_FORMAT_ELF
    18401840 VBOX_LDR_FMT_2_FLAGS.macho := -DASM_FORMAT_MACHO
    1841  VBOX_LDR_FMT_2_FLAGS.pe   := -DASM_FORMAT_PE
    1842  VBOX_ASFLAGS  := -g $(VBOX_LDR_FMT_2_FLAGS.$(VBOX_LDR_FMT))
    1843  VBOX_ASFLAGS32 := -g $(VBOX_LDR_FMT_2_FLAGS.$(VBOX_LDR_FMT32))
    1844  VBOX_ASFLAGS64 := -g $(VBOX_LDR_FMT_2_FLAGS.$(VBOX_LDR_FMT64))
     1841 VBOX_LDR_FMT_2_FLAGS.pe    := -DASM_FORMAT_PE
     1842 VBOX_ASFLAGS    := -g $(VBOX_LDR_FMT_2_FLAGS.$(VBOX_LDR_FMT))
     1843 VBOX_ASFLAGS32  := -g $(VBOX_LDR_FMT_2_FLAGS.$(VBOX_LDR_FMT32))
     1844 VBOX_ASFLAGS64  := -g $(VBOX_LDR_FMT_2_FLAGS.$(VBOX_LDR_FMT64))
    18451845 if1of ($(KBUILD_TARGET_ARCH), sparc32 sparc64)
    1846   VBOX_ASFLAGS += -m$(VBOX_HC_ARCH_BITS)
     1846  VBOX_ASFLAGS   += -m$(VBOX_HC_ARCH_BITS)
    18471847  VBOX_ASFLAGS32 += -m32
    18481848  VBOX_ASFLAGS64 += -m64
  • trunk/include/iprt/asmdefs-arm.h

    r100275 r100276  
    4949 */
    5050
    51 /** @todo Should the selection be done by object format (ELF, MachO, ...) maybe?. */
    52 
    5351/** Marks the beginning of a code section. */
    54 #if defined(__clang__)
     52#ifdef ASM_FORMAT_MACHO
    5553# define BEGINCODE .section __TEXT,__text,regular,pure_instructions
    56 #elif defined(__GNUC__)
     54#elif defined(ASM_FORMAT_ELF)
    5755# define BEGINCODE .section .text
    5856#else
     
    6159
    6260/** Marks the end of a code section. */
    63 #if defined(__clang__)
     61#if ASM_FORMAT_MACHO
    6462# define ENDCODE
    65 #elif defined(__GNUC__)
     63#elif defined(ASM_FORMAT_ELF)
    6664# define ENDCODE
    6765#else
     
    7169
    7270/** Marks the beginning of a data section. */
    73 #if defined(__clang__)
     71#if ASM_FORMAT_MACHO
    7472# define BEGINDATA .section __DATA,__data
    75 #elif defined(__GNUC__)
     73#elif defined(ASM_FORMAT_ELF)
    7674# define BEGINDATA .section .data
    7775#else
     
    8078
    8179/** Marks the end of a data section. */
    82 #if defined(__clang__)
     80#if ASM_FORMAT_MACHO
    8381# define ENDDATA
    84 #elif defined(__GNUC__)
     82#elif defined(ASM_FORMAT_ELF)
    8583# define ENDDATA
    8684#else
     
    9088
    9189/** Marks the beginning of a readonly data section. */
    92 #if defined(__clang__)
     90#if ASM_FORMAT_MACHO
    9391# define BEGINCONST .section __RODATA,__rodata
    94 #elif defined(__GNUC__)
     92#elif defined(ASM_FORMAT_ELF)
    9593# define BEGINCONST .section .rodata
    9694#else
     
    9997
    10098/** Marks the end of a readonly data section. */
    101 #if defined(__clang__)
     99#if ASM_FORMAT_MACHO
    102100# define ENDCONST
    103 #elif defined(__GNUC__)
     101#elif defined(ASM_FORMAT_ELF)
    104102# define ENDCONST
    105103#else
     
    109107
    110108/** Marks the beginning of a readonly C strings section. */
    111 #if defined(__clang__)
     109#if ASM_FORMAT_MACHO
    112110# define BEGINCONSTSTRINGS .section __TEXT,__cstring,cstring_literals
    113 #elif defined(__GNUC__)
     111#elif defined(ASM_FORMAT_ELF)
    114112# define BEGINCONSTSTRINGS .section .rodata
    115113#else
     
    118116
    119117/** Marks the end of a readonly C strings section. */
    120 #if defined(__clang__)
     118#if ASM_FORMAT_MACHO
    121119# define ENDCONSTSTRINGS
    122 #elif defined(__GNUC__)
     120#elif defined(ASM_FORMAT_ELF)
    123121# define ENDCONSTSTRINGS
    124122#else
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