Skip to content

Commit

Permalink
xglobals: Preserve special variables when LTO is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
lhmouse committed Dec 12, 2024
1 parent c1412ad commit 55d0a45
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mcfgthread/xglobals.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ extern const PVOID __safe_se_handler_table[];
extern const ULONG __safe_se_handler_count;
# endif

IMAGE_LOAD_CONFIG_DIRECTORY _load_config_used =
__attribute__((__used__))
const IMAGE_LOAD_CONFIG_DIRECTORY _load_config_used =
{
.Size = sizeof(IMAGE_LOAD_CONFIG_DIRECTORY),
# if defined __i386__ && defined _MSC_VER
Expand All @@ -376,7 +377,8 @@ IMAGE_LOAD_CONFIG_DIRECTORY _load_config_used =
};

# if defined _MSC_VER
int _fltused = 0x9875; /* dunno what it does but LINK complains. */
__attribute__((__used__))
const int _fltused = 0x9875; /* dunno what it does but LINK complains. */
# endif

#else /* __MCF_IN_DLL */
Expand Down

0 comments on commit 55d0a45

Please sign in to comment.