On Thu, Jul 12, 2012 at 6:51 AM, Ethan Grammatikidis
<[email protected]> wrote:
> On Wed, 11 Jul 2012 17:15:26 +0100
> "Steve Simon" <[email protected]> wrote:
>
>> Various projects have worked on 8c to make it generate code for other OSs,
>> have any of these resulted in code that could generate a very _very_ simple
>> ELF shared library sutiable for linux?
>>
>> -Steve
>>
>
> The 8l in Go can produce ELF binaries -- it's the linker rather than
> the compiler you want to look at for this. Last I heard, Go's 8l wasn't
> compatible with Plan 9's 8c, but there's an 8c in Go so that doesn't
> matter too much. I'm sure some Go fans want to use system C libraries
> by dynamic linking, but I'm not so sure about producing a linkable
> library.

There has been demand for this in Go-land for a long time, see:
http://code.google.com/p/go/issues/detail?id=256

I'm sure many people, including the core Go team, would be very happy
if somebody worked on this.

Even given my visceral hatred for dynamic linking, this would be quite
useful for things like creating Python modules in Go and other such
tasks.

So please, if you are going to work on this feature for other reasons,
consider doing it via improving the Go toolchain.

Uriel

> Thinking it over, I'd rather use the regular Linux toolchain for the
> task. You can still write sensible C for gcc to compile, and I think
> you'll have a lot less work to do. Besides, it's the approach taken by
> p9p, inferno, and drawterm, it works well for them. If you're concerned
> about compile time just lower the optimisation level or choose a
> generic architecture to optimise for.
>
> --
> This is obviously some strange usage of the
> word "simple" that I was previously unaware of.
>

Reply via email to