0004-shfdpicflag.diff 790 B

123456789101112131415161718192021
  1. diff -ur binutils-2.25.1.orig/bfd/elf32-sh.c binutils-2.25.1/bfd/elf32-sh.c
  2. --- binutils-2.25.1.orig/bfd/elf32-sh.c 2015-09-03 21:52:17.000000000 +0000
  3. +++ binutils-2.25.1/bfd/elf32-sh.c 2015-09-14 17:08:48.114426847 +0000
  4. @@ -5487,7 +5487,7 @@
  5. input_bfd, input_section, rel->r_offset, symname);
  6. }
  7. - elf_elfheader (output_bfd)->e_flags &= ~EF_SH_PIC;
  8. + elf_elfheader (output_bfd)->e_flags |= EF_SH_PIC;
  9. }
  10. if (r != bfd_reloc_ok)
  11. @@ -6644,7 +6644,7 @@
  12. elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
  13. sh_elf_set_mach_from_flags (obfd);
  14. if (elf_elfheader (obfd)->e_flags & EF_SH_FDPIC)
  15. - elf_elfheader (obfd)->e_flags |= EF_SH_PIC;
  16. + elf_elfheader (obfd)->e_flags &= ~EF_SH_PIC;
  17. }
  18. if (! sh_merge_bfd_arch (ibfd, obfd))