1
0

alpha-remove-coff.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. diff -Nur linux-4.14.39.orig/arch/alpha/boot/tools/objstrip.c linux-4.14.39/arch/alpha/boot/tools/objstrip.c
  2. --- linux-4.14.39.orig/arch/alpha/boot/tools/objstrip.c 2018-05-01 21:58:27.000000000 +0200
  3. +++ linux-4.14.39/arch/alpha/boot/tools/objstrip.c 2018-05-22 12:36:55.166124565 +0200
  4. @@ -192,38 +192,8 @@
  5. prog_name, (long) elf_phdr->p_vaddr,
  6. elf_phdr->p_vaddr + fil_size, offset);
  7. }
  8. - } else
  9. -#endif
  10. - {
  11. - aout = (struct exec *) buf;
  12. -
  13. - if (!(aout->fh.f_flags & COFF_F_EXEC)) {
  14. - fprintf(stderr, "%s: %s is not in executable format\n",
  15. - prog_name, inname);
  16. - exit(1);
  17. - }
  18. -
  19. - if (aout->fh.f_opthdr != sizeof(aout->ah)) {
  20. - fprintf(stderr, "%s: %s has unexpected optional header size\n",
  21. - prog_name, inname);
  22. - exit(1);
  23. - }
  24. -
  25. - if (N_MAGIC(*aout) != OMAGIC) {
  26. - fprintf(stderr, "%s: %s is not an OMAGIC file\n",
  27. - prog_name, inname);
  28. - exit(1);
  29. - }
  30. - offset = N_TXTOFF(*aout);
  31. - fil_size = aout->ah.tsize + aout->ah.dsize;
  32. - mem_size = fil_size + aout->ah.bsize;
  33. -
  34. - if (verbose) {
  35. - fprintf(stderr, "%s: extracting %#016lx-%#016lx (at %lx)\n",
  36. - prog_name, aout->ah.text_start,
  37. - aout->ah.text_start + fil_size, offset);
  38. - }
  39. }
  40. +#endif
  41. if (lseek(fd, offset, SEEK_SET) != offset) {
  42. perror("lseek");