The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Re: crt0 -- what's in that name?
@ 2023-06-13  0:46 Douglas McIlroy
  0 siblings, 0 replies; 25+ messages in thread
From: Douglas McIlroy @ 2023-06-13  0:46 UTC (permalink / raw)
  To: TUHS main list

>I thought it was pretty well known that it [BSS] stands for, "Block Started (by) Symbol"?

BSS was a "pseudo-operation" in SAP (SHARE assembly program) for the
IBM 704. My recollection is that the assembler manual called it "block
starting at symbol". There was also a BES (block ending at symbol)
pseudo-op. Both reserved a block of memory, with the assembler
assigning the appropriate value to the pseudo-op's label.

The reason for BES was that index registers were subtractive. There
was a loop-ending instruction ,TIX (transfer on index), that decreased
the index by a specified amount and transferred to a specified
location unless the index hit zero, in which case the instruction
counter continued in sequence. BES was originally conceived for
addressing an array stored by increasing subscript but indexed by a
register that counted down. BES was also useful for FORTRAN object
code, which stored arrays backward and kept the true, uncomplemented
subscript in an index register.

Doug

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-13  5:28       ` Dave Horsfall
@ 2023-06-13 16:37         ` ron minnich
  0 siblings, 0 replies; 25+ messages in thread
From: ron minnich @ 2023-06-13 16:37 UTC (permalink / raw)
  To: Dave Horsfall; +Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 632 bytes --]

thanks all. In 1976, at udel, we thought it meant c runtime startoff and
that seems to be a reasonable interpretation.

Kind of nice that a very new system, oreboot, will have a bt0 performing
about the same function :-)

On Mon, Jun 12, 2023 at 10:28 PM Dave Horsfall <dave@horsfall.org> wrote:

> On Mon, 12 Jun 2023, Clem Cole wrote:
>
> > > I've always thought of it as "C run time stage 0".
> >
> > crt - C RunTme.   I always heard it expressed as C  runtime SYSTEM or
> > START
>
> Ah; well, I was almost right :-)  It's been a while since I was using
> Ed 5 where I first saw that comment...
>
> -- Dave

[-- Attachment #2: Type: text/html, Size: 986 bytes --]

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

* [TUHS] Re: crt0 -- what's in that name?
@ 2023-06-13 12:10 Douglas McIlroy
  0 siblings, 0 replies; 25+ messages in thread
From: Douglas McIlroy @ 2023-06-13 12:10 UTC (permalink / raw)
  To: TUHS main list

> Not a citation, either, but I believe the original RUNCOM came from CTSS (https://multicians.org/shell.html),

Yes, the CTSS command "runcom" arranged for commands stored in a file
to be run in the background. Such a file (which could contain at most
six commands) became known as "a runcom".

The term "script" did not emerge until Unix. I vaguely recall that Lee
McMahon coined the usage, but would welcome more reliable info about
its origin.

Doug

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

* [TUHS] Re: crt0 -- what's in that name?
@ 2023-06-13 10:03 Rudi Blom
  0 siblings, 0 replies; 25+ messages in thread
From: Rudi Blom @ 2023-06-13 10:03 UTC (permalink / raw)
  To: tuhs

[-- Attachment #1: Type: text/plain, Size: 172 bytes --]

Maybe not really 'defining' but useful

https://en.wikipedia.org/wiki/Crt0
https://en.wikipedia.org/wiki/.bss

-- 
The more I learn the better I understand I know nothing.

[-- Attachment #2: Type: text/html, Size: 515 bytes --]

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 21:31     ` Clem Cole
  2023-06-12 21:39       ` G. Branden Robinson
  2023-06-12 22:09       ` Paul Winalski
@ 2023-06-13  5:28       ` Dave Horsfall
  2023-06-13 16:37         ` ron minnich
  2 siblings, 1 reply; 25+ messages in thread
From: Dave Horsfall @ 2023-06-13  5:28 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 309 bytes --]

On Mon, 12 Jun 2023, Clem Cole wrote:

> > I've always thought of it as "C run time stage 0".
> 
> crt - C RunTme.   I always heard it expressed as C  runtime SYSTEM or 
> START

Ah; well, I was almost right :-)  It's been a while since I was using
Ed 5 where I first saw that comment...

-- Dave

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-13  1:37 Norman Wilson
  2023-06-13  1:41 ` Rob Pike
@ 2023-06-13  1:48 ` Dan Cross
  1 sibling, 0 replies; 25+ messages in thread
From: Dan Cross @ 2023-06-13  1:48 UTC (permalink / raw)
  To: Norman Wilson; +Cc: TUHS

[-- Attachment #1: Type: text/plain, Size: 1935 bytes --]

On Mon, Jun 12, 2023, 9:37 PM Norman Wilson <norman@oclsc.org> wrote:

> Clem Cole:
>
> > Apologies to TUHS - other than please don't think Fortran did not
> > impact UNIX and its peers.
>
> Fortran had an important (if indirect) influence in early Unix.  From
> Dennis's memories of the early days of Unix on the PDP-7:
>
>   Soon after TMG became available, Thompson decided that we could not
>   pretend to offer a real computing service without Fortran, so he sat
>   down to write a Fortran in TMG.  As I recall, the intent to handle
>   Fortran lasted about a week.  What he produced instead was a definition
>   of and a compiler for the new language B.
>
> (The Evolution of the Unix Time-Sharing System; see the 1984
> UNIX System issue of the BLTJ for the whole thing, or just read
> https://www.bell-labs.com/usr/dmr/www/hist.html)
>
> Now let's move on to the name `rc'.  Not the shell, but the
> usage as part of a file name.  Those two characters appear
> at the end of the many annoying, and mostly pointless, configuration
> files that litter one's home directory these days, apparently
> copied from the old system-startup script /etc/rc as if the
> name means `startup commands' (or something beginning with r,
> I suppose, instead of startup).  But I recall reading somewhere
> that it just stood for `runcom,' a Multics-derived term for what
> we now call a shell script.
>
> I can't find a citation to back up that claim, though.  Anyone
> else remember where to look?
>

Not a citation, either, but I believe the original RUNCOM came from CTSS (
https://multicians.org/shell.html), and MDN-4 on the design of the Multics
shell mentions the term and MDN-5 goes into detail here.

Newer Multics calls this "exec_com", as in the shell startup file `
start_up.ec` that Multics users have in their login directories.
https://web.mit.edu/multics-history/source/Multics/doc/info_segments/exec_com.info

        - Dan C.

[-- Attachment #2: Type: text/html, Size: 2804 bytes --]

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-13  1:37 Norman Wilson
@ 2023-06-13  1:41 ` Rob Pike
  2023-06-13  1:48 ` Dan Cross
  1 sibling, 0 replies; 25+ messages in thread
From: Rob Pike @ 2023-06-13  1:41 UTC (permalink / raw)
  To: Norman Wilson; +Cc: tuhs

[-- Attachment #1: Type: text/plain, Size: 1660 bytes --]

Not a citation but the 127 (as opposed to 1127) crowd all called them
runcoms.

-rob


On Tue, Jun 13, 2023 at 11:37 AM Norman Wilson <norman@oclsc.org> wrote:

> Clem Cole:
>
> > Apologies to TUHS - other than please don't think Fortran did not
> > impact UNIX and its peers.
>
> Fortran had an important (if indirect) influence in early Unix.  From
> Dennis's memories of the early days of Unix on the PDP-7:
>
>   Soon after TMG became available, Thompson decided that we could not
>   pretend to offer a real computing service without Fortran, so he sat
>   down to write a Fortran in TMG.  As I recall, the intent to handle
>   Fortran lasted about a week.  What he produced instead was a definition
>   of and a compiler for the new language B.
>
> (The Evolution of the Unix Time-Sharing System; see the 1984
> UNIX System issue of the BLTJ for the whole thing, or just read
> https://www.bell-labs.com/usr/dmr/www/hist.html)
>
> Now let's move on to the name `rc'.  Not the shell, but the
> usage as part of a file name.  Those two characters appear
> at the end of the many annoying, and mostly pointless, configuration
> files that litter one's home directory these days, apparently
> copied from the old system-startup script /etc/rc as if the
> name means `startup commands' (or something beginning with r,
> I suppose, instead of startup).  But I recall reading somewhere
> that it just stood for `runcom,' a Multics-derived term for what
> we now call a shell script.
>
> I can't find a citation to back up that claim, though.  Anyone
> else remember where to look?
>
> Norman Wilson
> Toronto ON
>
>

[-- Attachment #2: Type: text/html, Size: 2431 bytes --]

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

* [TUHS] Re: crt0 -- what's in that name?
@ 2023-06-13  1:37 Norman Wilson
  2023-06-13  1:41 ` Rob Pike
  2023-06-13  1:48 ` Dan Cross
  0 siblings, 2 replies; 25+ messages in thread
From: Norman Wilson @ 2023-06-13  1:37 UTC (permalink / raw)
  To: tuhs

Clem Cole:

> Apologies to TUHS - other than please don't think Fortran did not
> impact UNIX and its peers.

Fortran had an important (if indirect) influence in early Unix.  From
Dennis's memories of the early days of Unix on the PDP-7:

  Soon after TMG became available, Thompson decided that we could not
  pretend to offer a real computing service without Fortran, so he sat
  down to write a Fortran in TMG.  As I recall, the intent to handle
  Fortran lasted about a week.  What he produced instead was a definition
  of and a compiler for the new language B.

(The Evolution of the Unix Time-Sharing System; see the 1984
UNIX System issue of the BLTJ for the whole thing, or just read
https://www.bell-labs.com/usr/dmr/www/hist.html)

Now let's move on to the name `rc'.  Not the shell, but the
usage as part of a file name.  Those two characters appear
at the end of the many annoying, and mostly pointless, configuration
files that litter one's home directory these days, apparently
copied from the old system-startup script /etc/rc as if the
name means `startup commands' (or something beginning with r,
I suppose, instead of startup).  But I recall reading somewhere
that it just stood for `runcom,' a Multics-derived term for what
we now call a shell script.

I can't find a citation to back up that claim, though.  Anyone
else remember where to look?

Norman Wilson
Toronto ON


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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 22:39         ` Clem Cole
  2023-06-12 22:50           ` G. Branden Robinson
@ 2023-06-12 23:04           ` Paul Winalski
  1 sibling, 0 replies; 25+ messages in thread
From: Paul Winalski @ 2023-06-12 23:04 UTC (permalink / raw)
  To: Clem Cole; +Cc: The Eunuchs Hysterical Society, Computer Old Farts Followers

On 6/12/23, Clem Cole <clemc@ccc.com> wrote:
>
> On Mon, Jun 12, 2023 at 5:39 PM G. Branden Robinson <
> g.branden.robinson@gmail.com> wrote:
>
>> It's an ill wind that blows a Fortran runtime using the same convention.
>>
> Be careful there, weedhopper ...

I don't think this remark was intended to denigrate Fortran in any
way.  I took it as a wryly humorous way to make the observation that C
and Fortran have different program startup semantics, and that there
is other stuff that has to be done when firing up a program written
wholly or partially in Fortran beyond what is needed to start up a C
application.

Most operating system ABIs, Unix included, don't have a formalized
mechanism for dealing with the differences between startup semantics
of various programming languages.  They deal with the problem in an
ad-hack fashion.  The one exception that I know of is VMS (now
OpenVMS).  Tom Hastings was the architect who designed the original
VAX/VMS ABI.  He was aware from the get-go that several programming
languages had to be supported and he made sure that his design was
general enough to allow programmers to write routines in the most
suitable language for them, to mix and match modules written in
different languages in the same program, and to easily make calls from
one language to another.  It was a stroke of genius and I haven't seen
its like in any other OS (several times I've wished it was there,
though).

Further discussion in COFF.

-Paul W.

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 22:39         ` Clem Cole
@ 2023-06-12 22:50           ` G. Branden Robinson
  2023-06-12 23:04           ` Paul Winalski
  1 sibling, 0 replies; 25+ messages in thread
From: G. Branden Robinson @ 2023-06-12 22:50 UTC (permalink / raw)
  To: Clem Cole; +Cc: The Eunuchs Hysterical Society, Computer Old Farts Followers

[-- Attachment #1: Type: text/plain, Size: 987 bytes --]

Hi Clem,

At 2023-06-12T18:39:32-0400, Clem Cole wrote:
> Apologies to TUHS - other than please don't think Fortran did not
> impact UNIX and its peers.  We owe that community our jobs, and for
> creating the market in that we all would build systems and eventually
> improve.

Absolutely.  Fortran (77) was the first language this weedhopper learned
after BASIC (which, while much despised by the sorts of people who
update jargon files, _also_ had early support in CSRC Unix).  While I
intensely disliked the fixed-source format (a defect Fortran 90
remedied), I acquired it more easily than C, to the relief of the guys
on my class project team who already knew C and _hated_ Fortran.

My wisecrack was not meant as a derogation of Fortran in any way, but
rather as a sly (not really) allusion to a word also appearing in your
expansion of the COFF list's name as seen above...

Best regards to you and to Fortran, and a nod to the copy of
Metcalf/Reid/Cohen on my bookshelf,
Branden

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 21:39       ` G. Branden Robinson
@ 2023-06-12 22:39         ` Clem Cole
  2023-06-12 22:50           ` G. Branden Robinson
  2023-06-12 23:04           ` Paul Winalski
  0 siblings, 2 replies; 25+ messages in thread
From: Clem Cole @ 2023-06-12 22:39 UTC (permalink / raw)
  To: G. Branden Robinson
  Cc: The Eunuchs Hysterical Society, Computer Old Farts Followers

[-- Attachment #1: Type: text/plain, Size: 1888 bytes --]

Apologies to TUHS - other than please don't think Fortran did not impact
UNIX and its peers.  We owe that community our jobs, and for creating the
market in that we all would build systems and eventually improve.

Note: I'm CCing COFF - you want to continue this...

On Mon, Jun 12, 2023 at 5:39 PM G. Branden Robinson <
g.branden.robinson@gmail.com> wrote:

> It's an ill wind that blows a Fortran runtime using the same convention.
>
Be careful there, weedhopper ...    Fortran gave a lot to computing
(including UNIX) and frankly still does.   I did not write have too much
Fortran as a professional (mostly early in my career),  but I did spent 50+
years ensuring that the results of the Fortran compiler ran >>really well<<
on the systems I built.   As a former collegiate of Paul W and I once said,
"*Any computer executive that does not take Fortran seriously will not have
their job very long.*  It pays our salary."

It's still the #1 language for science [its also not the same language my
Father learned in the late 50s/early 60s, much less the one I learned 15
years later - check out:  In what type of work is the Fortran Programming
Language most used today
<https://www.quora.com/In-what-type-of-work-is-the-Fortran-programming-language-most-used-today/answer/Clem-Cole>
,  Is Fortran still alive
<https://www.quora.com/Is-Fortran-still-alive/answer/Clem-Cole>, Is Fortran
obsolete <https://www.quora.com/Is-Fortran-obsolete/answer/Clem-Cole>

FWIW:  These days, the Intel Fortran compiler (and eventually the LLVM one,
which Intel is the primary developer), calls the C/C++ common runtime for
support.  Most libraries are written in C, C++, (or assembler in some very
special cases) - so now it's C that keeps Fortran alive.  But "in the
beginning" it was all about Fortran because that paid the bills then and
still does today.

ᐧ

[-- Attachment #2: Type: text/html, Size: 3647 bytes --]

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 21:31     ` Clem Cole
  2023-06-12 21:39       ` G. Branden Robinson
@ 2023-06-12 22:09       ` Paul Winalski
  2023-06-13  5:28       ` Dave Horsfall
  2 siblings, 0 replies; 25+ messages in thread
From: Paul Winalski @ 2023-06-12 22:09 UTC (permalink / raw)
  To: Clem Cole; +Cc: The Eunuchs Hysterical Society

On 6/12/23, Clem Cole <clemc@ccc.com> wrote:
>
> WRT to BSS -- Block Start Symbol (and sometimes Block End Symbol in some
> later assemblers) I believe was (were) part of the original 704 assemblers
> from United Aircraft reserving a labeled block of uninitialized space in a
> "DUMMY SECTION" (or DSECT) for a hunk of storage.  The OS is going to load
> everything together. So, a big feature of the United Aircraft assembler was
> to help control memory layout and collect like (common) hunks of things
> together (i.e., code vs data).  The whole idea of BSS was to get the loader
> to reserve space that did not have to initialized.  As I understand it, the
> standard IBM FORTRAN (FAP) and Assembler (MAP) for the 709 and 7090/94
> picked it up, with the new FORTRAN compiler being the big driver.
> ᐧ
I don't recall either BSS or BES pseudo-ops in the System/360
assemblers for DOS/360 and OS/360.  I think that by then they had been
replaced by a more generalized concept of PSECTs and DSECTs.

I forget now the details of how Fortran uninitialized common blocks
were implemented in S/360 object language.  It was the job of the link
editor to overlay all such symbols with the same name, and if there
was no explicit initializer, to allocate space for them in
uniniitalized memory.  One thing to note is that, at least in DOS/360,
such memory was not zeroed out.  It contained random garbage  Security
wasn't a concern in closed, raised-floor computer shops and you didn't
want the program loader to waste time zeroing out memory anyway.

-Paul W.

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 21:31     ` Clem Cole
@ 2023-06-12 21:39       ` G. Branden Robinson
  2023-06-12 22:39         ` Clem Cole
  2023-06-12 22:09       ` Paul Winalski
  2023-06-13  5:28       ` Dave Horsfall
  2 siblings, 1 reply; 25+ messages in thread
From: G. Branden Robinson @ 2023-06-12 21:39 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 537 bytes --]

At 2023-06-12T17:31:20-0400, Clem Cole wrote:
> On Mon, Jun 12, 2023 at 4:17 PM Dave Horsfall <dave@horsfall.org> wrote:
> > On Mon, 12 Jun 2023, Dan Cross wrote:
> > > The Unix tree shows it in 2nd Edition:
> > > https://www.tuhs.org/cgi-bin/utree.pl?file=V2/lib/crt0.s
> > > That would suggest it was more or less contemporaneous with C itself.
> >
> > I've always thought of it as "C run time stage 0".
> >
> crt - C RunTme.

It's an ill wind that blows a Fortran runtime using the same convention.

Regards,
Branden

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 20:58             ` Paul Winalski
@ 2023-06-12 21:32               ` segaloco via TUHS
  0 siblings, 0 replies; 25+ messages in thread
From: segaloco via TUHS @ 2023-06-12 21:32 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

> It may be that crt stood for "compiler run time" back when C was the
> only compiler in town.
> 
> -Paul W.

I don't know about this, only given the fact that B was already there and had a brt1 and brt2, crt0 seems like a natural follow-on to this naming scheme and I would suspect the c in crt0 referring to the language, not "compiler" was probably there from the genesis.  These are the single letter associations I've found:

    - a - assembly as in liba.a
    - b - B lang as in libb.a, brt1, bilib
    - c - C lang as in libc.a, crt0
    - e - Explor as in libe.a
    - f - Fortran as in fc, f77, libf.a, fr0
    - l - LIL as in lc (LIL compiler)
    - m - m6 as in /sys/lang/mdir

Of course letters get reused for things, this logic would imply the LIL language would have a libl.l but that instead is the lex library as appears a little later on.  Y of course eventually gets associated with yacc.  Not affirmative proof but I would be more inclined to suspect the c there is a language reference than standing for "compiler"

- Matt G.

P.S. The "bss" definition that lives in my head is "block-sized storage" but frankly I can't recall where I picked that up.  I feel like I didn't just make that up but Google returns nothing.

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 20:17   ` Dave Horsfall
@ 2023-06-12 21:31     ` Clem Cole
  2023-06-12 21:39       ` G. Branden Robinson
                         ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Clem Cole @ 2023-06-12 21:31 UTC (permalink / raw)
  To: Dave Horsfall; +Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]

On Mon, Jun 12, 2023 at 4:17 PM Dave Horsfall <dave@horsfall.org> wrote:

> On Mon, 12 Jun 2023, Dan Cross wrote:
>
> > The Unix tree shows it in 2nd Edition:
> > https://www.tuhs.org/cgi-bin/utree.pl?file=V2/lib/crt0.s
> > That would suggest it was more or less contemporaneous with C itself.
>
> I've always thought of it as "C run time stage 0".
>
crt - C RunTme.   I always heard it expressed as C  runtime SYSTEM or START

WRT to BSS -- Block Start Symbol (and sometimes Block End Symbol in some
later assemblers) I believe was (were) part of the original 704 assemblers
from United Aircraft reserving a labeled block of uninitialized space in a
"DUMMY SECTION" (or DSECT) for a hunk of storage.  The OS is going to load
everything together. So, a big feature of the United Aircraft assembler was
to help control memory layout and collect like (common) hunks of things
together (i.e., code vs data).  The whole idea of BSS was to get the loader
to reserve space that did not have to initialized.  As I understand it, the
standard IBM FORTRAN (FAP) and Assembler (MAP) for the 709 and 7090/94
picked it up, with the new FORTRAN compiler being the big driver.
ᐧ

[-- Attachment #2: Type: text/html, Size: 2374 bytes --]

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 20:28           ` Chris Pinnock via TUHS
  2023-06-12 20:58             ` Paul Winalski
@ 2023-06-12 21:28             ` Anthony Martin
  1 sibling, 0 replies; 25+ messages in thread
From: Anthony Martin @ 2023-06-12 21:28 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

Chris Pinnock via TUHS <tuhs@tuhs.org> once said:
> > On 12 Jun 2023, at 21:22, Dan Cross <crossd@gmail.com> wrote:
> > I thought it was pretty well known that it stands for, "Block Started
> > (by) Symbol”?
>
> I wrote a paper on a.out a year or so ago and
> concluded that I could not find an adequate answer
> - so avoided the issue with a non-commital
> footnote.

Your paper says there are disagreements about what
it stands for. What gave you that impression?

From https://www.tuhs.org/Usenet/comp.unix.wizards/1990-June/033811.html

	Dennis Ritchie says:

	Actually the acronym (in the sense we took it up;
	it may have other credible etymologies) is "Block
	Started by Symbol." It was a pseudo-op in FAP
	(Fortran Assembly [-er?] Program), an assembler
	for the IBM 704-709-7090-7094 machines. It defined
	its label and set aside space for a given number
	of words. There was another pseudo-op, BES, "Block
	Ended by Symbol" that did the same except that the
	label was defined by the last assigned word + 1.
	(On these machines Fortran arrays were stored
	backwards in storage and were 1-origin.)

	The usage is reasonably appropriate, because just
	as with standard Unix loaders, the space assigned
	didn't have to be punched literally into the
	object deck but was represented by a count
	somewhere.

Cheers,
  Anthony

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 20:28           ` Chris Pinnock via TUHS
@ 2023-06-12 20:58             ` Paul Winalski
  2023-06-12 21:32               ` segaloco via TUHS
  2023-06-12 21:28             ` Anthony Martin
  1 sibling, 1 reply; 25+ messages in thread
From: Paul Winalski @ 2023-06-12 20:58 UTC (permalink / raw)
  To: Chris Pinnock; +Cc: segaloco, The Eunuchs Hysterical Society

On 6/12/23, Chris Pinnock via TUHS <tuhs@tuhs.org> wrote:
>
>> On 12 Jun 2023, at 21:22, Dan Cross <crossd@gmail.com> wrote:
>>
>> Hmm. The comment at the top of `crt0.s` from 2nd Edition says, "C
>> runtime startoff", which seems pretty clear. Whether that has changed
>> over time is, of course, another matter (like how GCC changed to "GNU
>> Compiler Collection").
>
> Possibly - in this file
> http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/csu/README?rev=1.6&content-type=text/x-cvsweb-markup&only_with_tag=MAIN,
> the CSU and related files are referred to as the compiler runtime. But
> startoff is appropriate - because the file was usually included in the
> binary at the beginning to initialise stuff.

It may be that crt stood for "compiler run time" back when C was the
only compiler in town.  But once you get another language, such as
Fortran, that has its own, different runtime initialization
requirements, having the 'c' in crt0 mean "C" rather than "compiler"
because it's no longer common to all compiler run time libraries.

-Paul W.

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 20:22         ` Dan Cross
@ 2023-06-12 20:28           ` Chris Pinnock via TUHS
  2023-06-12 20:58             ` Paul Winalski
  2023-06-12 21:28             ` Anthony Martin
  0 siblings, 2 replies; 25+ messages in thread
From: Chris Pinnock via TUHS @ 2023-06-12 20:28 UTC (permalink / raw)
  To: Dan Cross; +Cc: segaloco, The Eunuchs Hysterical Society


> On 12 Jun 2023, at 21:22, Dan Cross <crossd@gmail.com> wrote:
> 
> Hmm. The comment at the top of `crt0.s` from 2nd Edition says, "C
> runtime startoff", which seems pretty clear. Whether that has changed
> over time is, of course, another matter (like how GCC changed to "GNU
> Compiler Collection").

Possibly - in this file http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/csu/README?rev=1.6&content-type=text/x-cvsweb-markup&only_with_tag=MAIN, the CSU and related files are referred to as the compiler runtime. But startoff is appropriate - because the file was usually included in the binary at the beginning to initialise stuff. 

These days ELF formats and similar have specific sections for initing and terminating binaries - although I the crt name lives on with start and end:

servalan: {482} ls -la /usr/lib/crt*
-r--r--r--  1 root  wheel  4328 Jan 14 18:18 /usr/lib/crt0.o
-r--r--r--  1 root  wheel  2648 Jan 14 18:18 /usr/lib/crtbegin.o
-r--r--r--  1 root  wheel  2880 Jan 14 18:18 /usr/lib/crtbeginS.o
lrwxr-xr-x  1 root  wheel    10 Jan 14 18:18 /usr/lib/crtbeginT.o -> crtbegin.o
-r--r--r--  1 root  wheel  1264 Jan 14 18:18 /usr/lib/crtend.o
lrwxr-xr-x  1 root  wheel     8 Jan 14 18:18 /usr/lib/crtendS.o -> crtend.o
-r--r--r--  1 root  wheel  1488 Jan 14 18:18 /usr/lib/crti.o
-r--r--r--  1 root  wheel  1152 Jan 14 18:18 /usr/lib/crtn.o

> 
> 
> I thought it was pretty well known that it stands for, "Block Started
> (by) Symbol”?

I wrote a paper on a.out a year or so ago and concluded that I could not find an adequate answer - so avoided the issue with a  non-commital footnote.

C



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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 20:03       ` Chris Pinnock via TUHS
  2023-06-12 20:22         ` Dan Cross
@ 2023-06-12 20:25         ` Steve Nickolas
  1 sibling, 0 replies; 25+ messages in thread
From: Steve Nickolas @ 2023-06-12 20:25 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

On Mon, 12 Jun 2023, Chris Pinnock via TUHS wrote:

> I had thought that crt stood for “compiler runtime”. You’ll find files 
> on a NetBSD (and other BSDs) in /usr/lib/csu called crt0, crtbegin, 
> crtend (etc) which are included in the compiled binaries at build time 
> and are used to include machine dependent things need to initialise 
> programs.

I always understood crt to stand for "C runtime".

-uso.

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 20:03       ` Chris Pinnock via TUHS
@ 2023-06-12 20:22         ` Dan Cross
  2023-06-12 20:28           ` Chris Pinnock via TUHS
  2023-06-12 20:25         ` Steve Nickolas
  1 sibling, 1 reply; 25+ messages in thread
From: Dan Cross @ 2023-06-12 20:22 UTC (permalink / raw)
  To: Chris Pinnock; +Cc: segaloco, The Eunuchs Hysterical Society

On Mon, Jun 12, 2023 at 4:04 PM Chris Pinnock via TUHS <tuhs@tuhs.org> wrote:
> I had thought that crt stood for “compiler runtime”. You’ll find files on a NetBSD (and other BSDs) in /usr/lib/csu called crt0, crtbegin, crtend (etc) which are included in the compiled binaries at build time and are used to include machine dependent things need to initialise programs.

Hmm. The comment at the top of `crt0.s` from 2nd Edition says, "C
runtime startoff", which seems pretty clear. Whether that has changed
over time is, of course, another matter (like how GCC changed to "GNU
Compiler Collection").

> (The acronym could be wrong of course - bss is the notorious one, where even the man page for a.out has this has a bug: "Nobody seems to agree on what bss stands for.”)

Huh. That seems to have come into the man page sometime after
4.3BSD-Taho; it's in Reno and Net/2, but not before (nor in other
systems, that I can see).

I thought it was pretty well known that it stands for, "Block Started
(by) Symbol"?

        - Dan C.

> > On 12 Jun 2023, at 20:45, segaloco via TUHS <tuhs@tuhs.org> wrote:
> >
> > Probably derivative of /etc/brt1 and /etc/brt2.  If there's a <lang>rt<digit> convention before that I can't say. If they're going for UNIX-y nomenclature though bootloaders were mboot, tboot, uboot, etc.  As an aside, Sega used the nomenclature "icd_blkX" where X is a digit to number 128-byte blocks of their initial loader, icd I presume standing for something like initial code. I feel like I've seen "icd" used elsewhere, but couldn't say where. In any case, I'm sure a lot could be devoted to running down the history of names like crt0, mch, mdec, icd, uboot, and so on. Unfortunately those sorts of trivia haven't bubbled up in my manual studies.
> >
> > - Matt G.
> > ------- Original Message -------
> > On Monday, June 12th, 2023 at 11:53 AM, Clem Cole <clemc@ccc.com> wrote:
> >
> >> This makes sense since there was B runtime to start, and Dennis was messing with things. No idea but I wonder if that was the impetus for the rename from B to newB to C - when he introduced a new runtime?
> >> ᐧ
> >>
> >> On Mon, Jun 12, 2023 at 2:30 PM Dan Cross <crossd@gmail.com> wrote:
> >> On Mon, Jun 12, 2023 at 2:22 PM ron minnich <rminnich@gmail.com> wrote:
> >> > This came up lately in the riscv firmware universe. Someone named early boot bt0, I mentioned crt0, and ... when did that name first appear? I first saw it in v6 but I'm sure it was long before.
> >>
> >> The Unix tree shows it in 2nd Edition:
> >> https://www.tuhs.org/cgi-bin/utree.pl?file=V2/lib/crt0.s
> >> That would suggest it was more or less contemporaneous with C itself.
> >>
> >> - Dan C.
> >
>

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 18:29 ` [TUHS] " Dan Cross
  2023-06-12 18:53   ` Clem Cole
@ 2023-06-12 20:17   ` Dave Horsfall
  2023-06-12 21:31     ` Clem Cole
  1 sibling, 1 reply; 25+ messages in thread
From: Dave Horsfall @ 2023-06-12 20:17 UTC (permalink / raw)
  To: The Eunuchs Hysterical Society

On Mon, 12 Jun 2023, Dan Cross wrote:

> The Unix tree shows it in 2nd Edition:
> https://www.tuhs.org/cgi-bin/utree.pl?file=V2/lib/crt0.s
> That would suggest it was more or less contemporaneous with C itself.

I've always thought of it as "C run time stage 0".

-- Dave

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 19:45     ` segaloco via TUHS
@ 2023-06-12 20:03       ` Chris Pinnock via TUHS
  2023-06-12 20:22         ` Dan Cross
  2023-06-12 20:25         ` Steve Nickolas
  0 siblings, 2 replies; 25+ messages in thread
From: Chris Pinnock via TUHS @ 2023-06-12 20:03 UTC (permalink / raw)
  To: segaloco; +Cc: The Eunuchs Hysterical Society

I had thought that crt stood for “compiler runtime”. You’ll find files on a NetBSD (and other BSDs) in /usr/lib/csu called crt0, crtbegin, crtend (etc) which are included in the compiled binaries at build time and are used to include machine dependent things need to initialise programs.

(The acronym could be wrong of course - bss is the notorious one, where even the man page for a.out has this has a bug: "Nobody seems to agree on what bss stands for.”)

C

> On 12 Jun 2023, at 20:45, segaloco via TUHS <tuhs@tuhs.org> wrote:
> 
> Probably derivative of /etc/brt1 and /etc/brt2.  If there's a <lang>rt<digit> convention before that I can't say. If they're going for UNIX-y nomenclature though bootloaders were mboot, tboot, uboot, etc.  As an aside, Sega used the nomenclature "icd_blkX" where X is a digit to number 128-byte blocks of their initial loader, icd I presume standing for something like initial code. I feel like I've seen "icd" used elsewhere, but couldn't say where. In any case, I'm sure a lot could be devoted to running down the history of names like crt0, mch, mdec, icd, uboot, and so on. Unfortunately those sorts of trivia haven't bubbled up in my manual studies. 
> 
> - Matt G.
> ------- Original Message -------
> On Monday, June 12th, 2023 at 11:53 AM, Clem Cole <clemc@ccc.com> wrote:
> 
>> This makes sense since there was B runtime to start, and Dennis was messing with things. No idea but I wonder if that was the impetus for the rename from B to newB to C - when he introduced a new runtime? 
>> ᐧ
>> 
>> On Mon, Jun 12, 2023 at 2:30 PM Dan Cross <crossd@gmail.com> wrote:
>> On Mon, Jun 12, 2023 at 2:22 PM ron minnich <rminnich@gmail.com> wrote:
>> > This came up lately in the riscv firmware universe. Someone named early boot bt0, I mentioned crt0, and ... when did that name first appear? I first saw it in v6 but I'm sure it was long before.
>> 
>> The Unix tree shows it in 2nd Edition:
>> https://www.tuhs.org/cgi-bin/utree.pl?file=V2/lib/crt0.s
>> That would suggest it was more or less contemporaneous with C itself.
>> 
>> - Dan C.
> 


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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 18:53   ` Clem Cole
@ 2023-06-12 19:45     ` segaloco via TUHS
  2023-06-12 20:03       ` Chris Pinnock via TUHS
  0 siblings, 1 reply; 25+ messages in thread
From: segaloco via TUHS @ 2023-06-12 19:45 UTC (permalink / raw)
  To: Clem Cole; +Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 1528 bytes --]

Probably derivative of /etc/brt1 and /etc/brt2. If there's a <lang>rt<digit> convention before that I can't say. If they're going for UNIX-y nomenclature though bootloaders were mboot, tboot, uboot, etc. As an aside, Sega used the nomenclature "icd_blkX" where X is a digit to number 128-byte blocks of their initial loader, icd I presume standing for something like initial code. I feel like I've seen "icd" used elsewhere, but couldn't say where. In any case, I'm sure a lot could be devoted to running down the history of names like crt0, mch, mdec, icd, uboot, and so on. Unfortunately those sorts of trivia haven't bubbled up in my manual studies.

- Matt G.
------- Original Message -------
On Monday, June 12th, 2023 at 11:53 AM, Clem Cole <clemc@ccc.com> wrote:

> This makes sense since there was B runtime to start, and Dennis was messing with things. No idea but I wonder if that was the impetus for the rename from B to newB to C - when he introduced a new runtime?
> ᐧ
>
> On Mon, Jun 12, 2023 at 2:30 PM Dan Cross <crossd@gmail.com> wrote:
>
>> On Mon, Jun 12, 2023 at 2:22 PM ron minnich <rminnich@gmail.com> wrote:
>>> This came up lately in the riscv firmware universe. Someone named early boot bt0, I mentioned crt0, and ... when did that name first appear? I first saw it in v6 but I'm sure it was long before.
>>
>> The Unix tree shows it in 2nd Edition:
>> https://www.tuhs.org/cgi-bin/utree.pl?file=V2/lib/crt0.s
>> That would suggest it was more or less contemporaneous with C itself.
>>
>> - Dan C.

[-- Attachment #2: Type: text/html, Size: 2847 bytes --]

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 18:29 ` [TUHS] " Dan Cross
@ 2023-06-12 18:53   ` Clem Cole
  2023-06-12 19:45     ` segaloco via TUHS
  2023-06-12 20:17   ` Dave Horsfall
  1 sibling, 1 reply; 25+ messages in thread
From: Clem Cole @ 2023-06-12 18:53 UTC (permalink / raw)
  To: Dan Cross; +Cc: The Eunuchs Hysterical Society

[-- Attachment #1: Type: text/plain, Size: 776 bytes --]

This makes sense since there was B runtime to start, and Dennis was messing
with things.  No idea but I wonder if that was the impetus for the rename
from B to newB to C - when he introduced a new runtime?
ᐧ

On Mon, Jun 12, 2023 at 2:30 PM Dan Cross <crossd@gmail.com> wrote:

> On Mon, Jun 12, 2023 at 2:22 PM ron minnich <rminnich@gmail.com> wrote:
> > This came up lately in the riscv firmware universe. Someone named early
> boot bt0, I mentioned crt0, and ... when did that name first appear? I
> first saw it in v6 but I'm sure it was long before.
>
> The Unix tree shows it in 2nd Edition:
> https://www.tuhs.org/cgi-bin/utree.pl?file=V2/lib/crt0.s
> That would suggest it was more or less contemporaneous with C itself.
>
>         - Dan C.
>

[-- Attachment #2: Type: text/html, Size: 1610 bytes --]

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

* [TUHS] Re: crt0 -- what's in that name?
  2023-06-12 18:22 [TUHS] " ron minnich
@ 2023-06-12 18:29 ` Dan Cross
  2023-06-12 18:53   ` Clem Cole
  2023-06-12 20:17   ` Dave Horsfall
  0 siblings, 2 replies; 25+ messages in thread
From: Dan Cross @ 2023-06-12 18:29 UTC (permalink / raw)
  To: ron minnich; +Cc: The Eunuchs Hysterical Society

On Mon, Jun 12, 2023 at 2:22 PM ron minnich <rminnich@gmail.com> wrote:
> This came up lately in the riscv firmware universe. Someone named early boot bt0, I mentioned crt0, and ... when did that name first appear? I first saw it in v6 but I'm sure it was long before.

The Unix tree shows it in 2nd Edition:
https://www.tuhs.org/cgi-bin/utree.pl?file=V2/lib/crt0.s
That would suggest it was more or less contemporaneous with C itself.

        - Dan C.

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

end of thread, other threads:[~2023-06-13 16:37 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-13  0:46 [TUHS] Re: crt0 -- what's in that name? Douglas McIlroy
  -- strict thread matches above, loose matches on Subject: below --
2023-06-13 12:10 Douglas McIlroy
2023-06-13 10:03 Rudi Blom
2023-06-13  1:37 Norman Wilson
2023-06-13  1:41 ` Rob Pike
2023-06-13  1:48 ` Dan Cross
2023-06-12 18:22 [TUHS] " ron minnich
2023-06-12 18:29 ` [TUHS] " Dan Cross
2023-06-12 18:53   ` Clem Cole
2023-06-12 19:45     ` segaloco via TUHS
2023-06-12 20:03       ` Chris Pinnock via TUHS
2023-06-12 20:22         ` Dan Cross
2023-06-12 20:28           ` Chris Pinnock via TUHS
2023-06-12 20:58             ` Paul Winalski
2023-06-12 21:32               ` segaloco via TUHS
2023-06-12 21:28             ` Anthony Martin
2023-06-12 20:25         ` Steve Nickolas
2023-06-12 20:17   ` Dave Horsfall
2023-06-12 21:31     ` Clem Cole
2023-06-12 21:39       ` G. Branden Robinson
2023-06-12 22:39         ` Clem Cole
2023-06-12 22:50           ` G. Branden Robinson
2023-06-12 23:04           ` Paul Winalski
2023-06-12 22:09       ` Paul Winalski
2023-06-13  5:28       ` Dave Horsfall
2023-06-13 16:37         ` ron minnich

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