Skip to content

Bump runtime to load backward compatibility hacks from __swift52_hooks #28682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2019
Merged
Show file tree
Hide file tree
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
7 changes: 3 additions & 4 deletions stdlib/public/runtime/CompatibilityOverride.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ using namespace swift;
/// The definition of the contents of the override section.
///
/// The runtime looks in the main executable (not any libraries!) for a
/// __swift51_hooks section and uses the hooks defined therein. This struct
/// __swift52_hooks section and uses the hooks defined therein. This struct
/// defines the layout of that section. These hooks allow extending
/// runtime functionality when running apps built with a more recent
/// compiler. If additional hooks are needed, they may be added at the
Expand All @@ -51,9 +51,8 @@ static OverrideSection *getOverrideSectionPtr() {
static swift_once_t Predicate;
swift_once(&Predicate, [](void *) {
size_t Size;
OverrideSectionPtr = static_cast<OverrideSection *>(lookupSection("__DATA",
"__swift51_hooks",
&Size));
OverrideSectionPtr = static_cast<OverrideSection *>(
lookupSection("__DATA", "__swift52_hooks", &Size));
if (Size < sizeof(OverrideSection))
OverrideSectionPtr = nullptr;
}, nullptr);
Expand Down
2 changes: 1 addition & 1 deletion unittests/runtime/CompatibilityOverride.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ struct OverrideSection {
#include "../../stdlib/public/runtime/CompatibilityOverride.def"
};

OverrideSection Overrides __attribute__((section("__DATA,__swift51_hooks"))) = {
OverrideSection Overrides __attribute__((section("__DATA,__swift52_hooks"))) = {
0,
#define OVERRIDE(name, ret, attrs, ccAttrs, namespace, typedArgs, namedArgs) \
name ## Override,
Expand Down