Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions engine/src/mode_installer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ asm (".section .project, \"aw\", \"nobits\"; .global MCcapsule; MCcapsule: .alig
#define PAYLOAD_SECTION_NAME "__PAYLOAD"
#define PROJECT_SECTION_NAME "__PROJECT"

__attribute__((section("__PROJECT,__project"))) volatile MCCapsuleInfo MCcapsule = {};
__attribute__((section("__PROJECT,__project"),__used__)) volatile MCCapsuleInfo MCcapsule = {};

#endif

Expand Down Expand Up @@ -244,7 +244,11 @@ class MCInternalPayloadOpen: public MCStatement
if (t_payload_data == nil)
{
#ifdef _MACOSX
// On Mac OS X, the payload is in a separate file.
// Force a reference to the project section to prevent extra-clever
// optimising linkers from discarding the section.
(void)MCcapsule.size;

// On Mac OS X, the payload is in a separate file.
// MM-2011-03-23: Refactored code to use method call.
MCAutoStringRef t_payload_file;
uindex_t t_last_slash;
Expand Down