// SHT_NOTE sections in a group are subject to garbage collection.
return !sec->nextInSectionGroup;
default:
+ // Support SHT_PROGBITS .init_array for a while
+ // (https://golang.org/issue/50295).
StringRef s = sec->name;
- return s == ".init" || s == ".fini" || s == ".jcr" ||
+ return s == ".init" || s == ".fini" || s == ".init_array" || s == ".jcr" ||
s.startswith(".ctors") || s.startswith(".dtors");
}
}
# NOGC: Name: .tbss
# NOGC: Name: .ctors
# NOGC: Name: .dtors
+# NOGC: Name: .init_array
+# NOGC: Name: .preinit_array
# NOGC: Name: .jcr
# NOGC: Name: .jcr_x
# NOGC: Name: .debug_pubtypes
# GC1: Name: .tbss
# GC1: Name: .ctors
# GC1: Name: .dtors
+# GC1: Name: .init_array
+# GC1: Name: .preinit_array
# GC1: Name: .jcr
# GC1: Name: .debug_pubtypes
# GC1: Name: .comment
# GC2: Name: .tbss
# GC2: Name: .ctors
# GC2: Name: .dtors
+# GC2: Name: .init_array
+# GC2: Name: .preinit_array
# GC2: Name: .jcr
# GC2: Name: .debug_pubtypes
# GC2: Name: .comment
.section .fini,"ax"
.quad 0
+# https://golang.org/cl/373734
+.section .init_array,"aw",@progbits
+ .quad 0
+
.section .preinit_array,"aw",@preinit_array
.quad 0