From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Sat, 9 Apr 2011 11:21:18 -0400 Message-ID: Subject: Re: [9fans] Plan 9 port of the Go toolchain From: Russ Cox To: lucio@proxima.alt.za, Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: ce466a24-ead6-11e9-9d60-3106f5b1d025 > .../src/cmd/8a/asm.c, around line #900: > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* This null SHdr = must appear before all others */ > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0sh =3D 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. The code is corect. newElfShdr updates a global table. You can delete the "sh =3D " but not the whole line. > =C2=A0 =C2=A0 =C2=A0 =C2=A0308c308 > =C2=A0 =C2=A0 =C2=A0 =C2=A0< archreloc(Reloc *r, Sym *s, vlong *val) > =C2=A0 =C2=A0 =C2=A0 =C2=A0--- > =C2=A0 =C2=A0 =C2=A0 =C2=A0> archreloc(Reloc *r, Sym *, vlong *val) If you insert USED(s) as a statement in the body of the function, we can take back the change. Russ