error: performing pointer arithmetic on a null pointer has undefined behavior [-Werror,-Wnull-pointer-arithmetic]
--- a/bfd.orig/elf64-ppc.c 2010-07-01 04:48:26.000000000 -0500
+++ b/bfd/elf64-ppc.c 2019-08-23 03:05:25.000000000 -0500
dot_name = bfd_alloc (abfd, len + 2);
- return (struct elf_link_hash_entry *) 0 - 1;
+ return (struct elf_link_hash_entry *)-1L;
memcpy (dot_name + 1, name, len + 1);
h = _bfd_elf_archive_symbol_lookup (abfd, info, dot_name);
--- a/bfd.orig/elflink.c 2010-04-14 03:29:33.000000000 -0500
+++ b/bfd/elflink.c 2019-08-23 03:04:48.000000000 -0500
copy = (char *) bfd_alloc (abfd, len);
- return (struct elf_link_hash_entry *) 0 - 1;
+ return (struct elf_link_hash_entry *)-1L;
memcpy (copy, name, first);
h = archive_symbol_lookup (abfd, info, symdef->name);
- if (h == (struct elf_link_hash_entry *) 0 - 1)
+ if (h == (struct elf_link_hash_entry *)-1L)