Skip to content

Commit c85a881

Browse files
authored
Merge pull request #16906 from linux-on-ibm-z/s390x-relocation-fix
Mark swift sections as 1 byte aligned
2 parents e8b08de + 94ffb34 commit c85a881

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stdlib/public/runtime/SwiftRT-ELF.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
// by the linker. Otherwise, we may end up with undefined symbol references as
1919
// the linker table section was never constructed.
2020

21-
#define DECLARE_SWIFT_SECTION(name) \
22-
__asm__("\t.section " #name ",\"a\"\n"); \
23-
__attribute__((__visibility__("hidden"))) extern const char __start_##name; \
24-
__attribute__((__visibility__("hidden"))) extern const char __stop_##name;
21+
#define DECLARE_SWIFT_SECTION(name) \
22+
__asm__("\t.section " #name ",\"a\"\n"); \
23+
__attribute__((__visibility__("hidden"),__aligned__(1))) extern const char __start_##name; \
24+
__attribute__((__visibility__("hidden"),__aligned__(1))) extern const char __stop_##name;
2525

2626
extern "C" {
2727
DECLARE_SWIFT_SECTION(swift5_protocols)

0 commit comments

Comments
 (0)