9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Lucio De Re <lucio@proxima.alt.za>
To: 9fans@9fans.net
Subject: [9fans] Plan 9 port of the Go toolchain
Date: Fri,  8 Apr 2011 19:41:07 +0200	[thread overview]
Message-ID: <b18544348b53648a68fa267c10c518c4@proxima.alt.za> (raw)

.../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




             reply	other threads:[~2011-04-08 17:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08 17:41 Lucio De Re [this message]
2011-04-09 15:21 ` Russ Cox
2011-04-11 10:15 Lucio De Re
2011-04-11 10:56 ` Lucio De Re
2011-04-11 14:21   ` Lucio De Re

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b18544348b53648a68fa267c10c518c4@proxima.alt.za \
    --to=lucio@proxima.alt.za \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).