Skip to content

Commit a5af302

Browse files
committed
[stdlib] RuntimeMetadata: Register newly added "runtime attributes" section
1 parent a98a35e commit a5af302

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

stdlib/public/SwiftShims/swift/shims/MetadataSections.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ struct MetadataSections {
9696
MetadataSectionRange swift5_capture;
9797
MetadataSectionRange swift5_mpenum;
9898
MetadataSectionRange swift5_accessible_functions;
99+
MetadataSectionRange swift5_runtime_attributes;
99100
};
100101

101102
#ifdef __cplusplus

stdlib/public/runtime/ImageInspectionCommon.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
/// The Mach-O section name for the section containing accessible functions.
3838
/// This lives within SEG_TEXT.
3939
#define MachOAccessibleFunctionsSection "__swift5_acfuncs"
40+
/// The Mach-O section name for the section containing runtime attributes.
41+
/// This lives within SEG_TEXT.
42+
#define MachORuntimeAttributesSection "__swift5_rattrs"
4043

4144
#define MachOTextSegment "__TEXT"
4245

stdlib/public/runtime/SwiftRT-COFF.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ DECLARE_SWIFT_SECTION(sw5bltn)
5454
DECLARE_SWIFT_SECTION(sw5cptr)
5555
DECLARE_SWIFT_SECTION(sw5mpen)
5656
DECLARE_SWIFT_SECTION(sw5acfn)
57+
DECLARE_SWIFT_SECTION(sw5ratt)
5758
}
5859

5960
namespace {
@@ -86,6 +87,7 @@ static void swift_image_constructor() {
8687
SWIFT_SECTION_RANGE(sw5cptr),
8788
SWIFT_SECTION_RANGE(sw5mpen),
8889
SWIFT_SECTION_RANGE(sw5acfn),
90+
SWIFT_SECTION_RANGE(sw5ratt),
8991
};
9092

9193
#undef SWIFT_SECTION_RANGE

stdlib/public/runtime/SwiftRT-ELF.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ DECLARE_SWIFT_SECTION(swift5_builtin)
4242
DECLARE_SWIFT_SECTION(swift5_capture)
4343
DECLARE_SWIFT_SECTION(swift5_mpenum)
4444
DECLARE_SWIFT_SECTION(swift5_accessible_functions)
45+
DECLARE_SWIFT_SECTION(swift5_runtime_attributes)
4546
}
4647

4748
#undef DECLARE_SWIFT_SECTION
@@ -77,6 +78,7 @@ static void swift_image_constructor() {
7778
SWIFT_SECTION_RANGE(swift5_capture),
7879
SWIFT_SECTION_RANGE(swift5_mpenum),
7980
SWIFT_SECTION_RANGE(swift5_accessible_functions),
81+
SWIFT_SECTION_RANGE(swift5_runtime_attributes),
8082
};
8183

8284
#undef SWIFT_SECTION_RANGE

0 commit comments

Comments
 (0)