Fix it so that it's compatible with the kernel and other FDPIC targets.
* elf32-sh.c (sh_elf_relocate_section): Set EF_SH_PIC flag
instead of clearing it on cross-section relocations.
(sh_elf_merge_private_data): Clear EF_SH_PIC flag by default.
+2015-09-14 Rich Felker <dalias@libc.org>
+
+ * elf32-sh.c (sh_elf_relocate_section): Set EF_SH_PIC flag
+ instead of clearing it on cross-section relocations.
+ (sh_elf_merge_private_data): Clear EF_SH_PIC flag by default.
+
2015-09-12 Helge Deller <deller@gmx.de>
PR ld/18514
input_bfd, input_section, rel->r_offset, symname);
}
- elf_elfheader (output_bfd)->e_flags &= ~EF_SH_PIC;
+ elf_elfheader (output_bfd)->e_flags |= EF_SH_PIC;
}
if (r != bfd_reloc_ok)
elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
sh_elf_set_mach_from_flags (obfd);
if (elf_elfheader (obfd)->e_flags & EF_SH_FDPIC)
- elf_elfheader (obfd)->e_flags |= EF_SH_PIC;
+ elf_elfheader (obfd)->e_flags &= ~EF_SH_PIC;
}
if (! sh_merge_bfd_arch (ibfd, obfd))