@geastack/host 0.1.18 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/host/image.cpp +11 -1
- package/package.json +1 -1
package/host/image.cpp
CHANGED
|
@@ -67,12 +67,22 @@ bool ensureMounted() {
|
|
|
67
67
|
}
|
|
68
68
|
} // namespace gea::platform::storage
|
|
69
69
|
|
|
70
|
+
// Optional hooks a generated program defines weakly. A COFF linker cannot pair
|
|
71
|
+
// a weak reference with a weak definition (each names its own default), so a
|
|
72
|
+
// target that links a default for every such hook (lld-link /alternatename)
|
|
73
|
+
// sets GEA_LINKED_HOOK_DEFAULTS and the references become ordinary ones.
|
|
74
|
+
#if defined(GEA_LINKED_HOOK_DEFAULTS) && GEA_LINKED_HOOK_DEFAULTS
|
|
75
|
+
#define GEA_PROGRAM_HOOK
|
|
76
|
+
#else
|
|
77
|
+
#define GEA_PROGRAM_HOOK __attribute__((weak))
|
|
78
|
+
#endif
|
|
79
|
+
|
|
70
80
|
namespace gea::host {
|
|
71
81
|
|
|
72
82
|
extern "C" bool gea_embedded_asset_lookup(const char *path,
|
|
73
83
|
const unsigned char **data,
|
|
74
84
|
unsigned long *length)
|
|
75
|
-
|
|
85
|
+
GEA_PROGRAM_HOOK;
|
|
76
86
|
|
|
77
87
|
namespace {
|
|
78
88
|
|