VirtualBox

Ignore:
Timestamp:
Mar 4, 2016 4:01:18 PM (9 years ago)
Author:
vboxsync
Message:

bs3kit: Eliminate BS3_MSC64_FIXUP_HACK and the associated /TP (compile as C++) option as these aren't durable workarounds for the problem. Instead do quick COFF -> OMF conversion so we can better control what WLINK will do during link. This addresses a few other issues too, like dot-prefixed segment names and incorrect fixups (not using FLAT but, symbol segment as the reference frame).

File:
1 edited

Legend:

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

    r59895 r59932  
    455455# define BS3_DATA_NM(a_Name)  a_Name
    456456#endif
    457 
    458 /** @def BS3_MSC64_FIXUP_HACK
    459  * Used to avoid IMAGE_REL_AMD64_ADDR32NB fixups where the compiler tries to
    460  * make use of __ImageBase as a base pointer instead of emitting rip relative
    461  * accesses.  Happens when there are a bunch of global data accesses in the same
    462  * function, probably to save space.
    463  *
    464  * The volatile variable in the lambda fixes it.
    465  */
    466 #if _MSC_VER && ARCH_BITS == 64
    467 # define BS3_MSC64_FIXUP_HACK(a_BaseType, a_Data) \
    468     ([]() -> a_BaseType * \
    469      { \
    470         a_BaseType * volatile x = a_Data; \
    471         return x; \
    472      }())
    473 
    474 #else
    475 # define BS3_MSC64_FIXUP_HACK(a_BaseType, a_Data) (a_Data)
    476 #endif
    477 
    478457
    479458/**
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