VirtualBox

Ignore:
Timestamp:
Nov 6, 2015 3:31:37 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
103983
Message:

bs3kit: did the gluing of link image and boot sector - bs3-shutdown now really works. Elimited the unwanted 'text' section.

Location:
trunk/src/VBox/ValidationKit/bootsectors/bs3kit
Files:
5 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk

    r58593 r58609  
    3636VBOX_PATH_BS3KIT_SRC = $(VBOX_PATH_VALIDATIONKIT_SRC)/bootsectors/bs3kit
    3737
     38# Boot Sector post-link tool used below.
     39BLDPROGS += VBoxBs3Linker
     40VBoxBs3Linker_TEMPLATE = VBoxBldProg
     41VBoxBs3Linker_SOURCES  = $(VBOX_PATH_BS3KIT_SRC)/VBoxBs3Linker.cpp
     42
    3843# Dummy CP "linker" tool.
    3944TOOL_VBoxBsCpLd = Dummy copy linker.
     
    6267TEMPLATE_VBoxBS3KitImg_ASTOOL   = NASM
    6368TEMPLATE_VBoxBS3KitImg_ASFLAGS := -f obj -g -w+orphan-labels
    64 TEMPLATE_VBoxBS3KitImg_ASDEFS   = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__
     69TEMPLATE_VBoxBS3KitImg_ASDEFS   = ASM_FORMAT_OMF RT_NOINC_SEGMENTS ARCH_BITS=16 __NASM__
    6570TEMPLATE_VBoxBS3KitImg_ARTOOL   = OPENWATCOM-16
    6671TEMPLATE_VBoxBS3KitImg_CTOOL    = OPENWATCOM-16
     
    9196          segment BS3DATA32 \
    9297          segment DATA32
     98TEMPLATE_VBoxBS3KitImg_DEPS = \
     99        $(bs3-bootsector_1_TARGET) \
     100        $(VBoxBs3Linker_1_TARGET)
     101TEMPLATE_VBoxBS3KitImg_POST_CMDS = $(if $(eq $(tool_do),LINK_LIBRARY)\
     102        ,,$(QUIET)$(MV_EXT) -f -- "$(out)" "$(out).tmp" \
     103        $$(NLTAB)$(QUIET)$(VBoxBs3Linker_1_TARGET) -o $(out) $(bs3-bootsector_1_TARGET) $(out).tmp \
     104        $$(NLTAB)$(QUIET)$(RM_EXT) -f -- "$(out).tmp")
     105
    93106TEMPLATE_VBoxBS3KitImg_LIBS = \
    94     $(PATH_OBJ)/bs3kit-common-16/bs3kit-common-16.lib \
    95     $(PATH_OBJ)/bs3kit-common-32/bs3kit-common-32.lib \
    96     $(PATH_OBJ)/bs3kit-common-64/bs3kit-common-64.lib
     107        $(PATH_OBJ)/bs3kit-common-16/bs3kit-common-16.lib \
     108        $(PATH_OBJ)/bs3kit-common-32/bs3kit-common-32.lib \
     109        $(PATH_OBJ)/bs3kit-common-64/bs3kit-common-64.lib
    97110
    98111# BS3Kit template for 32-bit code.
     
    101114TEMPLATE_VBoxBS3KitImg32_ASTOOL   = NASM
    102115TEMPLATE_VBoxBS3KitImg32_ASFLAGS := -f obj -g --allow-64bit-code-anywhere -w+orphan-labels
    103 TEMPLATE_VBoxBS3KitImg32_ASDEFS   = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__
     116TEMPLATE_VBoxBS3KitImg32_ASDEFS   = ASM_FORMAT_OMF RT_NOINC_SEGMENTS ARCH_BITS=32 __NASM__
    104117TEMPLATE_VBoxBS3KitImg32_ARTOOL   = OPENWATCOM
    105118TEMPLATE_VBoxBS3KitImg32_CTOOL    = OPENWATCOM
     
    115128TEMPLATE_VBoxBS3KitImg64_ASTOOL   = NASM
    116129TEMPLATE_VBoxBS3KitImg64_ASFLAGS := -f obj -g --allow-64bit-code-anywhere -w+orphan-labels
    117 TEMPLATE_VBoxBS3KitImg64_ASDEFS   = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__
     130TEMPLATE_VBoxBS3KitImg64_ASDEFS   = ASM_FORMAT_OMF RT_NOINC_SEGMENTS ARCH_BITS=64 __NASM__
    118131TEMPLATE_VBoxBS3KitImg64_ARTOOL   = OPENWATCOM
    119132TEMPLATE_VBoxBS3KitImg64_INCS     = $(VBOX_PATH_BS3KIT_SRC) .
     
    130143TEMPLATE_VBoxBS3KitBS_ASTOOL   = YASM
    131144TEMPLATE_VBoxBS3KitBS_ASFLAGS := -f bin --mapfile
    132 TEMPLATE_VBoxBS3KitBS_ASDEFS   = ASM_FORMAT_BIN RT_NOINC_SEGMENTS __YASM__
     145TEMPLATE_VBoxBS3KitBS_ASDEFS   = ASM_FORMAT_BIN RT_NOINC_SEGMENTS ARCH_BITS=16 __YASM__
    133146TEMPLATE_VBoxBS3KitBS_INCS     = $(VBOX_PATH_BS3KIT_SRC) .
    134147TEMPLATE_VBoxBS3KitBS_LDTOOL   = VBoxBsCpLd
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/VBoxBs3Linker.cpp

    r58603 r58609  
    11/* $Id$ */
    22/** @file
    3  * VirtualBox Validation Kit - Boot Sector 2 "linker".
     3 * VirtualBox Validation Kit - Boot Sector 3 "linker".
    44 */
    55
     
    3333#include <stdlib.h>
    3434#include <iprt/types.h>
     35#include <iprt/assert.h>
     36
     37
     38/*********************************************************************************************************************************
     39*   Structures and Typedefs                                                                                                      *
     40*********************************************************************************************************************************/
     41#pragma pack(1)
     42typedef struct BS3BOOTSECTOR
     43{
     44    uint8_t     abJmp[3];
     45    char        abOemId[8];
     46    /** @name EBPB, DOS 4.0 style.
     47     * @{  */
     48    uint16_t    cBytesPerSector;        /**< 00bh */
     49    uint8_t     cSectorsPerCluster;     /**< 00dh */
     50    uint16_t    cReservedSectors;       /**< 00eh */
     51    uint8_t     cFATs;                  /**< 010h */
     52    uint16_t    cRootDirEntries;        /**< 011h */
     53    uint16_t    cTotalSectors;          /**< 013h */
     54    uint8_t     bMediaDescriptor;       /**< 015h */
     55    uint16_t    cSectorsPerFAT;         /**< 016h */
     56    uint16_t    cPhysSectorsPerTrack;   /**< 018h */
     57    uint16_t    cHeads;                 /**< 01ah */
     58    uint32_t    cHiddentSectors;        /**< 01ch */
     59    uint32_t    cLargeTotalSectors;     /**< 020h - We (ab)use this to indicate the number of sectors to load. */
     60    uint8_t     bBootDrv;               /**< 024h */
     61    uint8_t     bFlagsEtc;              /**< 025h */
     62    uint8_t     bExtendedSignature;     /**< 026h */
     63    uint32_t    dwSerialNumber;         /**< 027h */
     64    char        abLabel[11];            /**< 02bh */
     65    char        abFSType[8];            /**< 036h */
     66    /** @} */
     67} BS3BOOTSECTOR;
     68#pragma pack()
     69typedef BS3BOOTSECTOR *PBS3BOOTSECTOR;
     70
     71AssertCompileMemberOffset(BS3BOOTSECTOR, cLargeTotalSectors, 0x20);
     72AssertCompileMemberOffset(BS3BOOTSECTOR, abLabel, 0x2b);
     73AssertCompileMemberOffset(BS3BOOTSECTOR, abFSType, 0x36);
     74
     75#define BS3_OEMID       "BS3Kit\n\n"
     76#define BS3_FSTYPE      "RawCode\n"
     77#define BS3_LABEL       "VirtualBox\n"
     78#define BS3_MAX_SIZE    UINT32_C(491520) /* 480KB */
    3579
    3680
    3781int main(int argc, char **argv)
    3882{
    39     const char  *pszOutput   = NULL;
    40     const char **papszInputs = (const char **)calloc(argc, sizeof(const char *));
    41     unsigned     cInputs     = 0;
     83    const char  *pszOutput  = NULL;
     84    struct BS3LNKINPUT
     85    {
     86        const char *pszFile;
     87        FILE       *pFile;
     88        uint32_t    cbFile;
     89    }           *paInputs   = (struct BS3LNKINPUT *)calloc(sizeof(paInputs[0]), argc);
     90    unsigned     cInputs    = 0;
     91    uint32_t     cSectors   = 0;
    4292
    4393    /*
     
    62112                {
    63113                    fprintf(stderr, "syntax errro: Unknown options '%s'\n", pszOpt);
    64                     free(papszInputs);
     114                    free(paInputs);
    65115                    return 2;
    66116                }
     
    111161        }
    112162        else
    113             papszInputs[cInputs++] = argv[i];
     163        {
     164            /*
     165             * Add to input file collection.
     166             */
     167            paInputs[cInputs].pszFile = argv[i];
     168#if defined(RT_OS_OS2) || defined(RT_OS_WINDOWS)
     169            FILE *pFile = fopen(paInputs[cInputs].pszFile, "rb");
     170#else
     171            FILE *pFile = fopen(paInputs[cInputs].pszFile, "r");
     172#endif
     173            if (pFile)
     174            {
     175                if (fseek(pFile, 0, SEEK_END) == 0)
     176                {
     177                    paInputs[cInputs].cbFile = (uint32_t)ftell(pFile);
     178                    if (fseek(pFile, 0, SEEK_SET) == 0)
     179                    {
     180                        if (cInputs != 0 || paInputs[cInputs].cbFile == 512)
     181                        {
     182                            cSectors += RT_ALIGN_32(paInputs[cInputs].cbFile, 512) / 512;
     183                            if (cSectors <= BS3_MAX_SIZE / 512)
     184                            {
     185                                if (cSectors > 0)
     186                                {
     187                                    paInputs[cInputs].pFile = pFile;
     188                                    pFile = NULL;
     189                                }
     190                                else
     191                                    fprintf(stderr, "error: empty input file: '%s'\n", paInputs[cInputs].pszFile);
     192                            }
     193                            else
     194                                fprintf(stderr, "error: input is too big: %u bytes, %u sectors (max %u bytes, %u sectors)\n"
     195                                        "info: detected loading '%s'\n",
     196                                        cSectors * 512, cSectors, BS3_MAX_SIZE, BS3_MAX_SIZE / 512,
     197                                        paInputs[cInputs].pszFile);
     198                        }
     199                        else
     200                            fprintf(stderr, "error: first input file (%s) must be exactly 512 bytes\n", paInputs[cInputs].pszFile);
     201                    }
     202                    else
     203                        fprintf(stderr, "error: seeking to start of '%s' failed\n", paInputs[cInputs].pszFile);
     204                }
     205                else
     206                    fprintf(stderr, "error: seeking to end of '%s' failed\n", paInputs[cInputs].pszFile);
     207            }
     208            else
     209                fprintf(stderr, "error: Failed to open input file '%s' for reading\n", paInputs[cInputs].pszFile);
     210            if (pFile)
     211                return 1;
     212            cInputs++;
     213        }
    114214    }
    115215
     
    124224        return 2;
    125225    }
    126 
    127226
    128227    /*
     
    146245    for (unsigned i = 0; i < cInputs && rcExit == 0; i++)
    147246    {
    148 #if defined(RT_OS_OS2) || defined(RT_OS_WINDOWS)
    149         FILE *pInput = fopen(papszInputs[i], "rb");
    150 #else
    151         FILE *pInput = fopen(papszInputs[i], "r");
    152 #endif
    153         if (pInput)
     247        uint8_t  abBuf[4096]; /* Must be multiple of 512! */
     248        uint32_t cbToRead = paInputs[i].cbFile;
     249        while (cbToRead > 0)
    154250        {
    155             for (;;)
    156             {
    157                 /* Read a block from the input file. */
    158                 uint8_t abBuf[4096];
    159                 size_t cbRead = fread(abBuf, sizeof(uint8_t), 4096, pInput);
    160                 if (!cbRead || ferror(pInput))
    161                     break;
    162 
    163                 /* Padd the end of the file if necessary. */
    164                 if (cbRead != 4096 && !feof(pInput))
    165                 {
    166                     fprintf(stderr, "error: fread returned %u bytes, but we're not at the end of the file yet...\n",
    167                             (unsigned)cbRead);
    168                     rcExit = 1;
    169                     break;
    170                 }
    171                 if ((cbRead & 0x1ff) != 0)
    172                 {
    173                     memset(&abBuf[cbRead], 0, 4096 - cbRead);
    174                     cbRead = (cbRead + 0x1ff) & ~0x1ffU;
    175                 }
    176 
    177                 /* Write the block to the output file. */
    178                 if (fwrite(abBuf, sizeof(uint8_t), cbRead, pOutput) == cbRead)
    179                     off += cbRead;
     251            /* Read a block from the input file. */
     252            uint32_t const cbThisRead = RT_MIN(cbToRead, sizeof(abBuf));
     253            size_t cbRead = fread(abBuf, sizeof(uint8_t), cbThisRead, paInputs[i].pFile);
     254            if (cbRead != cbThisRead)
     255            {
     256                fprintf(stderr, "error: Error reading '%s' (got %d bytes, wanted %u).\n",
     257                        paInputs[i].pszFile, (int)cbRead, (unsigned)cbThisRead);
     258                rcExit = 1;
     259                break;
     260            }
     261            cbToRead -= cbThisRead;
     262
     263            /* Padd the end of the file if necessary. */
     264            if ((cbRead & 0x1ff) != 0)
     265            {
     266                memset(&abBuf[cbRead], 0, 4096 - cbRead);
     267                cbRead = (cbRead + 0x1ff) & ~0x1ffU;
     268            }
     269
     270            /* Patch the BPB of the first file. */
     271            if (off == 0)
     272            {
     273                PBS3BOOTSECTOR pBs = (PBS3BOOTSECTOR)&abBuf[0];
     274                if (   memcmp(pBs->abLabel,  RT_STR_TUPLE(BS3_LABEL))  == 0
     275                    && memcmp(pBs->abFSType, RT_STR_TUPLE(BS3_FSTYPE)) == 0
     276                    && memcmp(pBs->abOemId,  RT_STR_TUPLE(BS3_OEMID))  == 0)
     277                    pBs->cLargeTotalSectors = cSectors;
    180278                else
    181279                {
    182                     fprintf(stderr, "error: fwrite failed\n");
     280                    fprintf(stderr, "error: Didn't find magic strings in the first file (%s).\n", paInputs[i].pszFile);
    183281                    rcExit = 1;
    184                     break;
    185282                }
    186283            }
    187284
    188             if (ferror(pInput))
    189             {
    190                 fprintf(stderr, "error: Error reading '%s'.\n", papszInputs[i]);
     285            /* Write the block to the output file. */
     286            if (fwrite(abBuf, sizeof(uint8_t), cbRead, pOutput) == cbRead)
     287                off += cbRead;
     288            else
     289            {
     290                fprintf(stderr, "error: fwrite failed\n");
    191291                rcExit = 1;
    192             }
    193             fclose(pInput);
     292                break;
     293            }
    194294        }
    195         else
     295
     296        if (ferror(paInputs[i].pFile))
    196297        {
    197             fprintf(stderr, "error: Failed to open '%s' for reading.\n", papszInputs[i]);
     298            fprintf(stderr, "error: Error reading '%s'.\n", paInputs[i]);
    198299            rcExit = 1;
    199300        }
    200301    }
     302
     303    /* Close the input files. */
     304    for (unsigned i = 0; i < cInputs && rcExit == 0; i++)
     305        fclose(paInputs[i].pFile);
     306    free(paInputs);
    201307
    202308    /* Finally, close the output file (can fail because of buffered data). */
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-bootsector.asm

    r58588 r58609  
    5353        db 0ah                          ; Should be nop, but this looks better.
    5454g_OemId:                                ; 003h
    55         db 'BS3Kit', 0ah
     55        db 'BS3Kit', 0ah, 0ah
    5656
    5757;
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-first-rm.asm

    r58594 r58609  
    5757BITS 16
    5858GLOBALNAME start
     59    mov     ax, BS3DATA16
     60    mov     es, ax
     61    mov     ds, ax
    5962    call    NAME(Main_rm)
    6063    call    NAME(Bs3Shutdown_p16)
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-shutdown.c

    r58594 r58609  
     1
     2/* Just a sample. */
    13void Main_rm(void)
    24{
    3     for (;;)
    4         { }
     5//    for (;;)
     6//        { }
    57    return;
    68}
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.mac

    r58593 r58609  
    2828%define ___bs3kit_mac___
    2929
     30;
     31; Before we can include anything, we need to override NAME and switch section.
     32; If we don't do the latter we end up with an unused 'text' section.
     33;
     34
     35;; @name Segment definitions.
     36;; @{
     37%macro BS3_BEGIN_TEXT16 0
     38 %ifndef  BS3_BEGIN_TEXT16_NOT_FIRST
     39  %define BS3_BEGIN_TEXT16_NOT_FIRST
     40  %ifdef ASM_FORMAT_ELF
     41        section BS3TEXT16 align=1 progbits alloc exec nowrite
     42  %else
     43        section BS3TEXT16 align=1 CLASS=CODE16 PUBLIC USE16
     44  %endif
     45
     46 %else
     47        section BS3TEXT16
     48 %endif
     49%endmacro
     50
     51%macro BS3_BEGIN_DATA16 0
     52 %ifndef  BS3_BEGIN_DATA16_NOT_FIRST
     53  %define BS3_BEGIN_DATA16_NOT_FIRST
     54  %ifdef ASM_FORMAT_ELF
     55        section BS3DATA16 align=2 progbits alloc noexec write
     56  %else
     57        section BS3DATA16 align=2 CLASS=FAR_DATA PUBLIC USE16
     58  %endif
     59 %else
     60        section BS3DATA16
     61 %endif
     62%endmacro
     63
     64%macro BS3_BEGIN_TEXT32 0
     65 %ifndef  BS3_BEGIN_TEXT32_NOT_FIRST
     66  %define BS3_BEGIN_TEXT32_NOT_FIRST
     67  %ifdef ASM_FORMAT_ELF
     68        section BS3TEXT32 align=1 progbits alloc exec nowrite
     69  %else
     70        section BS3TEXT32 align=1 CLASS=CODE32 PUBLIC USE32
     71  %endif
     72 %else
     73        section BS3TEXT32
     74 %endif
     75%endmacro
     76
     77%macro BS3_BEGIN_DATA32 0
     78 %ifndef  BS3_BEGIN_DATA32_NOT_FIRST
     79  %define BS3_BEGIN_DATA32_NOT_FIRST
     80  %ifdef ASM_FORMAT_ELF
     81        section BS3DATA32 align=16 progbits alloc noexec write
     82  %else
     83        section BS3DATA32 align=16 CLASS=DATA32 PUBLIC USE32
     84  %endif
     85 %else
     86        section BS3DATA32
     87 %endif
     88%endmacro
     89
     90%macro BS3_BEGIN_TEXT64 0
     91 %ifndef  BS3_BEGIN_TEXT64_NOT_FIRST
     92  %define BS3_BEGIN_TEXT64_NOT_FIRST
     93  %ifdef ASM_FORMAT_ELF
     94        section BS3TEXT64 align=1 progbits alloc exec nowrite
     95  %else
     96        section BS3TEXT64 align=1 CLASS=CODE64 PUBLIC USE32
     97  %endif
     98 %else
     99        section BS3TEXT64
     100 %endif
     101%endmacro
     102
     103%macro BS3_BEGIN_DATA64 0
     104 %ifndef  BS3_BEGIN_DATA64_NOT_FIRST
     105  %define BS3_BEGIN_DATA64_NOT_FIRST
     106  %ifdef ASM_FORMAT_ELF
     107        section BS3DATA64 align=16 progbits alloc noexec write
     108  %else
     109        section BS3DATA64 align=16 CLASS=DATA64 PUBLIC USE32
     110  %endif
     111 %else
     112        section BS3DATA64
     113 %endif
     114%endmacro
     115
     116;; Default text section.
     117%macro BS3_BEGIN_DEFAULT_TEXT 0
     118 %if ARCH_BITS == 16
     119  BS3_BEGIN_TEXT16
     120 %elif ARCH_BITS == 32
     121  BS3_BEGIN_TEXT32
     122 %elif ARCH_BITS == 64
     123  BS3_BEGIN_TEXT64
     124 %else
     125  %error "ARCH_BITS must be defined as either 16, 32, or 64!"
     126  INVALID_ARCH_BITS
     127 %endif
     128%endmacro
     129
     130;; @}
     131
     132
     133;
     134; Now, ditch the default 'text' section and define our own NAME macro.
     135;
     136%ifndef ASM_FORMAT_BIN
     137 BS3_BEGIN_DEFAULT_TEXT
     138 BS3_BEGIN_DEFAULT_TEXT ; stupid nasm automagically repeats the segment attributes.
     139%endif
    30140
    31141;; When using watcom + OMF, we're using __cdecl by default, which
     
    34144 %define NAME(name) _ %+ NAME_OVERLOAD(name)
    35145%endif
     146
     147
     148;
     149; Include the standard headers from iprt.
     150;
    36151
    37152
     
    141256
    142257
    143 ;; @name Segment definitions.
    144 ;; @{
    145 %macro BS3_BEGIN_TEXT16 0
    146  %ifndef  BS3_BEGIN_TEXT16_NOT_FIRST
    147   %define BS3_BEGIN_TEXT16_NOT_FIRST
    148   %ifdef ASM_FORMAT_ELF
    149         section BS3TEXT16 align=1 progbits alloc exec nowrite
    150   %else
    151         section BS3TEXT16 align=1 CLASS=CODE16 PUBLIC USE16
    152   %endif
    153 
    154  %else
    155         section BS3TEXT16
    156  %endif
    157 %endmacro
    158 
    159 %macro BS3_BEGIN_DATA16 0
    160  %ifndef  BS3_BEGIN_DATA16_NOT_FIRST
    161   %define BS3_BEGIN_DATA16_NOT_FIRST
    162   %ifdef ASM_FORMAT_ELF
    163         section BS3DATA16 align=2 progbits alloc noexec write
    164   %else
    165         section BS3DATA16 align=2 CLASS=FAR_DATA PUBLIC USE16
    166   %endif
    167  %else
    168         section BS3DATA16
    169  %endif
    170 %endmacro
    171 
    172 %macro BS3_BEGIN_TEXT32 0
    173  %ifndef  BS3_BEGIN_TEXT32_NOT_FIRST
    174   %define BS3_BEGIN_TEXT32_NOT_FIRST
    175   %ifdef ASM_FORMAT_ELF
    176         section BS3TEXT32 align=1 progbits alloc exec nowrite
    177   %else
    178         section BS3TEXT32 align=1 CLASS=CODE32 PUBLIC USE32
    179   %endif
    180  %else
    181         section BS3TEXT32
    182  %endif
    183 %endmacro
    184 
    185 %macro BS3_BEGIN_DATA32 0
    186  %ifndef  BS3_BEGIN_DATA32_NOT_FIRST
    187   %define BS3_BEGIN_DATA32_NOT_FIRST
    188   %ifdef ASM_FORMAT_ELF
    189         section BS3DATA32 align=16 progbits alloc noexec write
    190   %else
    191         section BS3DATA32 align=16 CLASS=DATA32 PUBLIC USE32
    192   %endif
    193  %else
    194         section BS3DATA32
    195  %endif
    196 %endmacro
    197 
    198 %macro BS3_BEGIN_TEXT64 0
    199  %ifndef  BS3_BEGIN_TEXT64_NOT_FIRST
    200   %define BS3_BEGIN_TEXT64_NOT_FIRST
    201   %ifdef ASM_FORMAT_ELF
    202         section BS3TEXT64 align=1 progbits alloc exec nowrite
    203   %else
    204         section BS3TEXT64 align=1 CLASS=CODE64 PUBLIC USE32
    205   %endif
    206  %else
    207         section BS3TEXT64
    208  %endif
    209 %endmacro
    210 
    211 %macro BS3_BEGIN_DATA64 0
    212  %ifndef  BS3_BEGIN_DATA64_NOT_FIRST
    213   %define BS3_BEGIN_DATA64_NOT_FIRST
    214   %ifdef ASM_FORMAT_ELF
    215         section BS3DATA64 align=16 progbits alloc noexec write
    216   %else
    217         section BS3DATA64 align=16 CLASS=DATA64 PUBLIC USE32
    218   %endif
    219  %else
    220         section BS3DATA64
    221  %endif
    222 %endmacro
    223 
    224 ;; @}
    225 
    226258%endif
    227259
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