9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Plan 9 port of the Go toolchain
@ 2011-04-11 10:15 Lucio De Re
  2011-04-11 10:56 ` Lucio De Re
  0 siblings, 1 reply; 5+ messages in thread
From: Lucio De Re @ 2011-04-11 10:15 UTC (permalink / raw)
  To: 9fans

I have tweaked the Plan 9 native <ar.h> to allow for manual adjustment
around the different needs of Go and native Plan 9 toolchains, so now:

	#ifndef	SARNAME
	#define SARNAME	16
	#endif

SARNAME can be predefined to the "64" that Go prefers.  Unfortunately,
it's a short term solution, I'm hoping for suggestions on the way
forward from here.

++L

PS: I still can't link an executable with the version of 8l from the
Go toolchain that I built under Plan 9, but I'm hoping to get there
soon.




^ permalink raw reply	[flat|nested] 5+ messages in thread
* [9fans] Plan 9 port of the Go toolchain
@ 2011-04-08 17:41 Lucio De Re
  2011-04-09 15:21 ` Russ Cox
  0 siblings, 1 reply; 5+ messages in thread
From: Lucio De Re @ 2011-04-08 17:41 UTC (permalink / raw)
  To: 9fans

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




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-04-11 14:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-11 10:15 [9fans] Plan 9 port of the Go toolchain Lucio De Re
2011-04-11 10:56 ` Lucio De Re
2011-04-11 14:21   ` Lucio De Re
  -- strict thread matches above, loose matches on Subject: below --
2011-04-08 17:41 Lucio De Re
2011-04-09 15:21 ` Russ Cox

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