/* Lose our funky encoding stuff so it doesn't contaminate the stub. */
symb = (*targetm.strip_name_encoding) (symb);
-
length = strlen (symb);
symbol_name = XALLOCAVEC (char, length + 32);
GEN_SYMBOL_NAME_FOR_SYMBOL (symbol_name, symb, length);
lazy_ptr_name = XALLOCAVEC (char, length + 32);
GEN_LAZY_PTR_NAME_FOR_SYMBOL (lazy_ptr_name, symb, length);
- if (flag_pic == 2)
- switch_to_section (darwin_sections[machopic_picsymbol_stub1_section]);
- else
- switch_to_section (darwin_sections[machopic_symbol_stub1_section]);
-
- if (flag_pic == 2)
+ if (MACHOPIC_PURE)
{
+ switch_to_section (darwin_sections[machopic_picsymbol_stub1_section]);
fprintf (file, "\t.align 5\n");
fprintf (file, "%s:\n", stub);
sprintf (local_label_0, "L%u$spb", label);
fprintf (file, "\tmflr r0\n");
- if (TARGET_LINK_STACK)
- {
- char name[32];
- get_ppc476_thunk_name (name);
- fprintf (file, "\tbl %s\n", name);
- fprintf (file, "%s:\n\tmflr r11\n", local_label_0);
- }
- else
- {
- fprintf (file, "\tbcl 20,31,%s\n", local_label_0);
- fprintf (file, "%s:\n\tmflr r11\n", local_label_0);
- }
+ fprintf (file, "\tbcl 20,31,%s\n", local_label_0);
+ fprintf (file, "%s:\n\tmflr r11\n", local_label_0);
fprintf (file, "\taddis r11,r11,ha16(%s-%s)\n",
lazy_ptr_name, local_label_0);
fprintf (file, "\tmtlr r0\n");
fprintf (file, "\tmtctr r12\n");
fprintf (file, "\tbctr\n");
}
- else
+ else /* mdynamic-no-pic or mkernel. */
{
+ switch_to_section (darwin_sections[machopic_symbol_stub1_section]);
fprintf (file, "\t.align 4\n");
fprintf (file, "%s:\n", stub);