From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@9fans.net From: Lucio De Re Date: Fri, 8 Apr 2011 19:41:07 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] Plan 9 port of the Go toolchain Topicbox-Message-UUID: ce27a9ae-ead6-11e9-9d60-3106f5b1d025 .../src/cmd/8a/asm.c, around line #900: /* This null SHdr must appear before all others */ sh = newElfShdr(elfstr[ElfStrEmpty]); My guess is that this needs to be followed by an instruction to write out the header, which in fact does not take place. I will not be able to test this until a number of other inconsistencies have been addressed, so if anyone knows whether this code could in fact be dropped, I'd appreciate not having to figure it out myself. The full diffs to asm.c look like this: 308c308 < archreloc(Reloc *r, Sym *s, vlong *val) --- > archreloc(Reloc *r, Sym *, vlong *val) 647c647 < uint32 va, fo, w, symo, startva, machlink; --- > uint32 symo, startva, machlink; 779d778 < lputl(0); /* x */ 895d893 < fo = HEADR; 897,901d894 < va = startva + fo; < w = segtext.filelen; < < /* This null SHdr must appear before all others */ < sh = newElfShdr(elfstr[ElfStrEmpty]); 1217c1210 < Bprint(&bso, "symsize = %ud\n", symsize); --- > Bprint(&bso, "symsize = %uld\n", symsize); Comments are welcome. And, no, I don't plan to publish each set of changes, I just would like anyone who cares to know that I'm embarking on this and to make as many suggestions as they deem necessary. ++L