Browse Source

clang: finish up libmach

Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Ronald G. Minnich 8 years ago
parent
commit
471be6a983
2 changed files with 3 additions and 7 deletions
  1. 3 6
      sys/src/libmach/executable.c
  2. 0 1
      sys/src/libmach/libmach.json

+ 3 - 6
sys/src/libmach/executable.c

@@ -31,10 +31,7 @@ typedef struct {
 			int32_t	spsz;		/* size of pc/sp offset table */
 			int32_t	pcsz;		/* size of pc/line number table */
 		};
-#ifdef HARVEY32
-		Ehdr;			/* elf.h */
-#endif
-		E64hdr;
+		E64hdr E64hdr;
 	} e;
 	int32_t dummy;			/* padding to ensure extra long */
 } ExecHdr;
@@ -633,7 +630,7 @@ elf64dotout(int fd, Fhdr *fp, ExecHdr *hp)
 	int i, it, id, is, phsz;
 	uint64_t uvl;
 
-	ep = &hp->e;
+	ep = &hp->e.E64hdr;
 	if(ep->ident[DATA] == ELFDATA2LSB) {
 		swab = leswab;
 		swal = leswal;
@@ -894,7 +891,7 @@ elfdotout(int fd, Fhdr *fp, ExecHdr *hp)
 	E64hdr *ep;
 
 	/* bitswap the header according to the DATA format */
-	ep = &hp->e;
+	ep = &hp->e.E64hdr;
 //	if(ep->ident[CLASS] == ELFCLASS32)
 //		return elf32dotout(fd, fp, hp);
 //	else if(ep->ident[CLASS] == ELFCLASS64)

+ 0 - 1
sys/src/libmach/libmach.json

@@ -1,7 +1,6 @@
 {
 	"libmach": {
 		"Cflags": [
-			"-fplan9-extensions",
 			"-I", "/",
 			"-Werror"
 		],