summaryrefslogtreecommitdiff
path: root/gold/testsuite/discard_locals_relocatable_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'gold/testsuite/discard_locals_relocatable_test.c')
-rw-r--r--gold/testsuite/discard_locals_relocatable_test.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gold/testsuite/discard_locals_relocatable_test.c b/gold/testsuite/discard_locals_relocatable_test.c
index d46151e42ce..f7f8b279202 100644
--- a/gold/testsuite/discard_locals_relocatable_test.c
+++ b/gold/testsuite/discard_locals_relocatable_test.c
@@ -31,6 +31,15 @@
in the output object file. */
asm (".Lshould_be_discarded:");
+#ifdef __powerpc__
+/* Test wants to keep one local. Satisfy it. */
+#ifdef __powerpc64__
+asm (".reloc 0,R_PPC64_NONE,.LC0");
+#else
+asm (".reloc 0,R_PPC_NONE,.LC0");
+#endif
+#endif
+
extern void print_func (const char* s);
extern int func (void);