9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] a question on style
       [not found] <af2f03a68f1be3c97a367093315a9f56@quanstro.net>
@ 2008-07-31 22:19 ` ron minnich
  2008-08-01 15:37   ` Steve Simon
  0 siblings, 1 reply; 15+ messages in thread
From: ron minnich @ 2008-07-31 22:19 UTC (permalink / raw)
  To: erik quanstrom; +Cc: 9fans

On Thu, Jul 31, 2008 at 3:17 PM, erik quanstrom <quanstro@quanstro.net> wrote:
>> >> OK, am I just out of date or is there a real reason for linker
>> >> sets?This question just came up in linuxbios v3 and I am wondering if
>> >> I am a stubborn old coot (likely) or if there really is merit to my
>> >> dislike of linker sets.
>> >
>> > why can't both be true?
>> >
>>
>> I suspect both are true ...
>
> would i be rude to agree with you?
>

I have kids. Trust me, you're not being rude.

ron



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

* Re: [9fans] a question on style
  2008-07-31 22:19 ` [9fans] a question on style ron minnich
@ 2008-08-01 15:37   ` Steve Simon
  2008-08-01 16:28     ` Pietro Gagliardi
  2008-08-05 22:38     ` erik quanstrom
  0 siblings, 2 replies; 15+ messages in thread
From: Steve Simon @ 2008-08-01 15:37 UTC (permalink / raw)
  To: 9fans

> OK, am I just out of date or is there a real reason for linker
> sets?

I see it this way:

	using linker sets means you have to learn and understand the linkers language
	to understand how the system is configured (when trying to track down a problem)

	using a bit of script to generate some tables of C code you just need to
	know C.

This combined with the theroy that there is too much to learn and the less new stuff
I need to learn to get a job done the better makes the choice easy (IMHO).

-Steve



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

* Re: [9fans] a question on style
  2008-08-01 15:37   ` Steve Simon
@ 2008-08-01 16:28     ` Pietro Gagliardi
  2008-08-01 17:24       ` Charles Forsyth
  2008-08-03 11:27       ` bblochl
  2008-08-05 22:38     ` erik quanstrom
  1 sibling, 2 replies; 15+ messages in thread
From: Pietro Gagliardi @ 2008-08-01 16:28 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Aug 1, 2008, at 11:37 AM, Steve Simon wrote:

>> OK, am I just out of date or is there a real reason for linker
>> sets?
>
> I see it this way:
>
> 	using linker sets means you have to learn and understand the
> linkers language
> 	to understand how the system is configured (when trying to track
> down a problem)
>
> 	using a bit of script to generate some tables of C code you just
> need to
> 	know C.
>
> This combined with the theroy that there is too much to learn and
> the less new stuff
> I need to learn to get a job done the better makes the choice easy
> (IMHO).
>
> -Steve
>

Plus, linker sets are nonportable. I don't see 8l supporting them, so
I don't think we'll be using them... but all the world uses GCC
nowadays, so why bother with portability anymore?




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

* Re: [9fans] a question on style
  2008-08-01 16:28     ` Pietro Gagliardi
@ 2008-08-01 17:24       ` Charles Forsyth
  2008-08-01 22:29         ` erik quanstrom
  2008-08-03 11:27       ` bblochl
  1 sibling, 1 reply; 15+ messages in thread
From: Charles Forsyth @ 2008-08-01 17:24 UTC (permalink / raw)
  To: 9fans

> but all the world uses GCC
> nowadays, so why bother with portability anymore?

and then when you look at compiling for particular platforms you get to ask
"which gcc?" because code can be non-portable between them
(for the same processor), and the options that work are different too.  such fun.




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

* Re: [9fans] a question on style
  2008-08-01 17:24       ` Charles Forsyth
@ 2008-08-01 22:29         ` erik quanstrom
  0 siblings, 0 replies; 15+ messages in thread
From: erik quanstrom @ 2008-08-01 22:29 UTC (permalink / raw)
  To: forsyth, 9fans

> > but all the world uses GCC
> > nowadays, so why bother with portability anymore?
>
> and then when you look at compiling for particular platforms you get to ask
> "which gcc?" because code can be non-portable between them
> (for the same processor), and the options that work are different too.  such fun.

hey!  less portable than assembly language.  what a feat.

- erik



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

* Re: [9fans] a question on style
  2008-08-01 16:28     ` Pietro Gagliardi
  2008-08-01 17:24       ` Charles Forsyth
@ 2008-08-03 11:27       ` bblochl
  1 sibling, 0 replies; 15+ messages in thread
From: bblochl @ 2008-08-03 11:27 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Pietro Gagliardi schrieb:
> On Aug 1, 2008, at 11:37 AM, Steve Simon wrote:
>
>>> OK, am I just out of date or is there a real reason for linker
>>> sets?
>>
>> I see it this way:
>>
>> using linker sets means you have to learn and understand the linkers
>> language
>> to understand how the system is configured (when trying to track down
>> a problem)
>>
>> using a bit of script to generate some tables of C code you just need to
>> know C.
>>
>> This combined with the theroy that there is too much to learn and the
>> less new stuff
>> I need to learn to get a job done the better makes the choice easy
>> (IMHO).
>>
>> -Steve
>>
>
> Plus, linker sets are nonportable. I don't see 8l supporting them, so
> I don't think we'll be using them... but all the world uses GCC
> nowadays, so why bother with portability anymore?
>
>
>
Beside all that different opinions - I don`t want to meddle - there is a
port of gcc for plan9 on http://plan9.bell-labs.com/sources/extra/gcc/.
Never tried it.

Regards

BB



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

* Re: [9fans] a question on style
  2008-08-01 15:37   ` Steve Simon
  2008-08-01 16:28     ` Pietro Gagliardi
@ 2008-08-05 22:38     ` erik quanstrom
  1 sibling, 0 replies; 15+ messages in thread
From: erik quanstrom @ 2008-08-05 22:38 UTC (permalink / raw)
  To: steve, 9fans

> > OK, am I just out of date or is there a real reason for linker
> > sets?
>
> I see it this way:
>
> 	using linker sets means you have to learn and understand the linkers language
> 	to understand how the system is configured (when trying to track down a problem)
>
> 	using a bit of script to generate some tables of C code you just need to
> 	know C.
>
> This combined with the theroy that there is too much to learn and the less new stuff
> I need to learn to get a job done the better makes the choice easy (IMHO).

oddly similar to my argument against using a magic file with file(1).

- erik



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

* Re: [9fans] a question on style
@ 2008-08-01 11:41 erik quanstrom
  0 siblings, 0 replies; 15+ messages in thread
From: erik quanstrom @ 2008-08-01 11:41 UTC (permalink / raw)
  To: rvs, 9fans

> > > Now, on the other hand, I guess kernel is different though.
> > > Isn't it supposed to be one huge piece of magic to begin with? ;-)
> >
> > it's supposed to be neither.
>
> Yeah, but Ron was talking 'bout that kernel from Scandinavia,
> right?

uff-da.

- erik



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

* Re: [9fans] a question on style
  2008-08-01 10:06   ` erik quanstrom
@ 2008-08-01 11:09     ` Roman V. Shaposhnik
  0 siblings, 0 replies; 15+ messages in thread
From: Roman V. Shaposhnik @ 2008-08-01 11:09 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, 2008-08-01 at 06:06 -0400, erik quanstrom wrote:
> > Now, on the other hand, I guess kernel is different though.
> > Isn't it supposed to be one huge piece of magic to begin with? ;-)
>
> it's supposed to be neither.

Yeah, but Ron was talking 'bout that kernel from Scandinavia,
right?

Thanks,
Roman.




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

* Re: [9fans] a question on style
  2008-08-01  9:26 ` Roman V. Shaposhnik
@ 2008-08-01 10:06   ` erik quanstrom
  2008-08-01 11:09     ` Roman V. Shaposhnik
  0 siblings, 1 reply; 15+ messages in thread
From: erik quanstrom @ 2008-08-01 10:06 UTC (permalink / raw)
  To: 9fans

> Now, on the other hand, I guess kernel is different though.
> Isn't it supposed to be one huge piece of magic to begin with? ;-)

it's supposed to be neither.

- erik




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

* Re: [9fans] a question on style
  2008-07-31 22:02 ron minnich
  2008-07-31 22:04 ` erik quanstrom
@ 2008-08-01  9:26 ` Roman V. Shaposhnik
  2008-08-01 10:06   ` erik quanstrom
  1 sibling, 1 reply; 15+ messages in thread
From: Roman V. Shaposhnik @ 2008-08-01  9:26 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs; +Cc: Fans of the OS Plan 9 from Bell Labs

On Thu, 2008-07-31 at 15:02 -0700, ron minnich wrote:
> OK, am I just out of date or is there a real reason for linker
> sets?This question just came up in linuxbios v3 and I am wondering if
> I am a stubborn old coot (likely) or if there really is merit to my
> dislike of linker sets.

I tend to dislike any kind of linker magic in user-space quite
profoundly. The most I can tolerate is PLT, I guess. But even
that is something I don't appreciate all that much when I need
to debug low level code. So I agree with you there 100%.

Now, on the other hand, I guess kernel is different though.
Isn't it supposed to be one huge piece of magic to begin with? ;-)

Thanks,
Roman.




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

* Re: [9fans] a question on style
@ 2008-07-31 22:17 erik quanstrom
  0 siblings, 0 replies; 15+ messages in thread
From: erik quanstrom @ 2008-07-31 22:17 UTC (permalink / raw)
  To: rminnich, 9fans

> >> OK, am I just out of date or is there a real reason for linker
> >> sets?This question just came up in linuxbios v3 and I am wondering if
> >> I am a stubborn old coot (likely) or if there really is merit to my
> >> dislike of linker sets.
> >
> > why can't both be true?
> >
>
> I suspect both are true ...

would i be rude to agree with you?

- erik



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

* Re: [9fans] a question on style
  2008-07-31 22:04 ` erik quanstrom
@ 2008-07-31 22:15   ` ron minnich
  0 siblings, 0 replies; 15+ messages in thread
From: ron minnich @ 2008-07-31 22:15 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Thu, Jul 31, 2008 at 3:04 PM, erik quanstrom <quanstro@quanstro.net> wrote:
>> OK, am I just out of date or is there a real reason for linker
>> sets?This question just came up in linuxbios v3 and I am wondering if
>> I am a stubborn old coot (likely) or if there really is merit to my
>> dislike of linker sets.
>
> why can't both be true?
>

I suspect both are true ...

ron



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

* Re: [9fans] a question on style
  2008-07-31 22:02 ron minnich
@ 2008-07-31 22:04 ` erik quanstrom
  2008-07-31 22:15   ` ron minnich
  2008-08-01  9:26 ` Roman V. Shaposhnik
  1 sibling, 1 reply; 15+ messages in thread
From: erik quanstrom @ 2008-07-31 22:04 UTC (permalink / raw)
  To: 9fans

> OK, am I just out of date or is there a real reason for linker
> sets?This question just came up in linuxbios v3 and I am wondering if
> I am a stubborn old coot (likely) or if there really is merit to my
> dislike of linker sets.

why can't both be true?

- erik




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

* [9fans] a question on style
@ 2008-07-31 22:02 ron minnich
  2008-07-31 22:04 ` erik quanstrom
  2008-08-01  9:26 ` Roman V. Shaposhnik
  0 siblings, 2 replies; 15+ messages in thread
From: ron minnich @ 2008-07-31 22:02 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

For some time now, over 10 years anyway, the GNU world has been using
the linker to create initialized structs, viz:
static const struct cpu_driver driver __cpu_driver = {
        .ops = &cpu_dev_ops,
        .id_table = cpu_table,
};

(this from linuxbios)

The __cpu_driver is passed to the linker and you end up with an array
of all structs tagged with that name.

These are called linker sets. I first heard of them in 1995 or so when
freebsd moved away from generating arrays of structs from the BSD
config tool and used gld to create those same arrays.

Plan 9 takes the older style approach: a script parses a config file
and creates C code which initializes the struct arrays.

Now, I betray my age, I guess, but I prefer the plan 9 style. I am
curious: am I just out of touch with this modern world?

Why do I like the Plan 9 style?
1. you can figure out what source constitutes the
program/application/os/bios by looking at C code
2. program analysis tools can analyse C code; you don't need binaries
and linker scripts
3. Errors such as empty structs are easier to catch at build time;
we've seen cases where nobody
    built a binary with, e.g., any cpu drivers and we did not know
until the BIOS tried to start
4. If you are using, e.g., Eclipse or Kscope, you can see how code is
invoked and used, which is
    harder when initialized structs are created by the linker.

OK, am I just out of date or is there a real reason for linker
sets?This question just came up in linuxbios v3 and I am wondering if
I am a stubborn old coot (likely) or if there really is merit to my
dislike of linker sets.

ron



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

end of thread, other threads:[~2008-08-05 22:38 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <af2f03a68f1be3c97a367093315a9f56@quanstro.net>
2008-07-31 22:19 ` [9fans] a question on style ron minnich
2008-08-01 15:37   ` Steve Simon
2008-08-01 16:28     ` Pietro Gagliardi
2008-08-01 17:24       ` Charles Forsyth
2008-08-01 22:29         ` erik quanstrom
2008-08-03 11:27       ` bblochl
2008-08-05 22:38     ` erik quanstrom
2008-08-01 11:41 erik quanstrom
  -- strict thread matches above, loose matches on Subject: below --
2008-07-31 22:17 erik quanstrom
2008-07-31 22:02 ron minnich
2008-07-31 22:04 ` erik quanstrom
2008-07-31 22:15   ` ron minnich
2008-08-01  9:26 ` Roman V. Shaposhnik
2008-08-01 10:06   ` erik quanstrom
2008-08-01 11:09     ` Roman V. Shaposhnik

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