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