File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 * differ in the directive that names a section and in whether a C name carries
3030 * a leading underscore, and in nothing else. */
3131#if defined(__APPLE__ )
32+ /* The word after the four labels is not padding.
33+ *
34+ * This format's linker divides a section into atoms and an atom is what a
35+ * symbol names; a section with no content has no atom, and the four names go
36+ * with it. The link then reports them as undefined while the object that
37+ * defines them is sitting in front of it. One word of content gives the four
38+ * names something to name, and the four still share one address, which is what
39+ * makes the loops that walk between them run zero times. */
3240__asm__(
3341 ".section __DATA,__const\n"
3442 ".p2align 3\n"
35- ".globl ___init_array_start\n___init_array_start:\n"
36- ".globl ___init_array_end\n___init_array_end:\n"
37- ".globl ___fini_array_start\n___fini_array_start:\n"
38- ".globl ___fini_array_end\n___fini_array_end:\n"
43+ ".globl ___init_array_start\n"
44+ ".globl ___init_array_end\n"
45+ ".globl ___fini_array_start\n"
46+ ".globl ___fini_array_end\n"
47+ "___init_array_start:\n"
48+ "___init_array_end:\n"
49+ "___fini_array_start:\n"
50+ "___fini_array_end:\n"
51+ ".quad 0\n"
3952 ".text\n" );
4053#else
4154__asm__(
You can’t perform that action at this time.
0 commit comments