VirtualBox

Changeset 74643 in vbox for trunk


Ignore:
Timestamp:
Oct 6, 2018 7:39:41 PM (6 years ago)
Author:
vboxsync
Message:

IPRT: More adjustments to the LX and Mach-O loader code from kStuff. bugref:9232

Location:
trunk/src/VBox/Runtime
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/Makefile.kmk

    r74638 r74643  
    272272        IPRT_WITH_OPENSSL \
    273273        NOFILEID
    274 #       += LDR_WITH_MACHO
     274ifeq ($(USERNAME),bird)
     275 RuntimeR3_DEFS += LDR_WITH_MACHO
     276endif
    275277if1of ($(KBUILD_TARGET_ARCH), amd64 x86)
    276278 RuntimeR3_DEFS         += \
  • trunk/src/VBox/Runtime/common/ldr/ldrLX.cpp

    r74642 r74643  
    546546
    547547
    548 /** @copydoc kLdrModQuerySymbol */
    549548static int kldrModLXQuerySymbol(PRTLDRMODINTERNAL pMod, const void *pvBits, RTLDRADDR BaseAddress, uint32_t iSymbol,
    550549                                const char *pchSymbol, size_t cchSymbol, const char *pszVersion,
     
    11491148
    11501149
    1151 /** @copydoc kLdrModGetImport */
    11521150static int kldrModLXGetImport(PKLDRMODLX pModLX, const void *pvBits, uint32_t iImport, char *pszName, size_t cchName,
    11531151                              size_t *pcbNeeded)
     
    12921290
    12931291
    1294 /** @copydoc kLdrModHasDbgInfo */
    12951292static int kldrModLXHasDbgInfo(PRTLDRMODINTERNAL pMod, const void *pvBits)
    12961293{
     
    22542251                union
    22552252                {
    2256 
    22572253                    const uint8_t          *pb;
    22582254                    const struct r32_rlc   *prlc;
     
    25402536 * @param   pbPage      The page in which to apply the fixup.
    25412537 * @param   off         Page relative offset of where to apply the offset.
     2538 * @param   PageAddress The page address.
     2539 * @param   prlc        The relocation record.
     2540 * @param   iSelector   Selector value, -1 if flat.
    25422541 * @param   uValue      The target value.
    25432542 * @param   fKind       The target kind.
  • trunk/src/VBox/Runtime/common/ldr/ldrMachO.cpp

    r74641 r74643  
    508508 * @param   pRdr            The file reader.
    509509 * @param   offImage        The image header (FAT fun).
     510 * @param   fOpenFlags      RTLDR_O_XXX.
    510511 * @param   pcSegments      Where to store the segment count.
    511512 * @param   pcSegments      Where to store the section count.
     
    514515 * @param   pLinkAddress    Where to store the image link address (i.e. the
    515516 *                          lowest segment address).
    516  */
    517 static int  kldrModMachOPreParseLoadCommands(uint8_t *pbLoadCommands, const mach_header_32_t *pHdr, PRTLDRREADER pRdr, RTFOFF   offImage,
    518                                              uint32_t fOpenFlags, uint32_t *pcSegments, uint32_t *pcSections, uint32_t *pcbStringPool,
    519                                              bool *pfCanLoad, PRTLDRADDR pLinkAddress, uint8_t *puEffFileType)
     517 * @param   puEffFileType   Where to store the effective file type.
     518 */
     519static int kldrModMachOPreParseLoadCommands(uint8_t *pbLoadCommands, const mach_header_32_t *pHdr, PRTLDRREADER pRdr,
     520                                            RTFOFF offImage, uint32_t fOpenFlags, uint32_t *pcSegments, uint32_t *pcSections,
     521                                            uint32_t *pcbStringPool, bool *pfCanLoad, PRTLDRADDR pLinkAddress,
     522                                            uint8_t *puEffFileType)
    520523{
    521524    union
     
    25302533 * @returns IPRT status code.
    25312534 * @param   pThis           The Mach-O module interpreter instance.
     2535 * @param   BaseAddress     The module base address.
    25322536 * @param   pfnGetImport    The callback for resolving an imported symbol.
    25332537 * @param   pvUser          User argument to the callback.
     
    26792683 * @param   pvMapping       The mapping to fixup.
    26802684 * @param   NewBaseAddress  The address to fixup the mapping to.
    2681  * @param   OldBaseAddress  The address the mapping is currently fixed up to.
    26822685 */
    26832686static int  kldrModMachOObjDoFixups(PKLDRMODMACHO pThis, void *pvMapping, RTLDRADDR NewBaseAddress)
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