This fixes the elflint self test when the compiler is configured for PIE
default.
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
+2017-06-15 Andreas Schwab <schwab@linux-m68k.org>
+
+ * ppc_symbol.c (ppc_machine_flag_check): New function.
+ * ppc_init.c (ppc_init): Hook it.
+
2017-05-30 Mark Wielaard <mark@klomp.org>
* ppc64_unwind.c: New file.
eh->name = "PowerPC";
ppc_init_reloc (eh);
HOOK (eh, reloc_simple_type);
+ HOOK (eh, machine_flag_check);
HOOK (eh, dynamic_tag_name);
HOOK (eh, dynamic_tag_check);
HOOK (eh, check_special_symbol);
}
+/* Check whether machine flags are valid. */
+bool
+ppc_machine_flag_check (GElf_Word flags)
+{
+ return ((flags &~ (EF_PPC_EMB
+ | EF_PPC_RELOCATABLE
+ | EF_PPC_RELOCATABLE_LIB)) == 0);
+}
+
+
const char *
ppc_dynamic_tag_name (int64_t tag, char *buf __attribute__ ((unused)),
size_t len __attribute__ ((unused)))