[TUHS] early cc variable and function names

Warner Losh imp at bsdimp.com
Fri Oct 17 23:44:13 AEST 2014


On Oct 17, 2014, at 7:35 AM, random832 at fastmail.us wrote:

> On Thu, Oct 16, 2014, at 22:21, Dave Horsfall wrote:
>> On Thu, 16 Oct 2014, Mark Longridge wrote:
>> 
>>> It seems like early cc could only use variable and function names up to 
>>> 8 characters.
>> 
>> In those days it took only the first seven and ignored the rest, 
>> prepending an underscore as you discovered.  I don't remember when longer 
>> names were recognised; for all I know it could've been around when 
>> pathnames could be longer than 14 chars (which I think may have been a 
>> BSDism).
> 
> For externals, it's a limitation of the PDP-11 a.out format. Other
> systems may or may not have had the same limit or a different limit.
> 
> For VAX, 4BSD appears to use an "index into file string table", whereas
> 3BSD still has an 8-character string. I don't see any provision in the
> 4BSD linker for loading 3BSD binaries.

As someone that wrote an assembler and a linker/loader for the VAX
back in the day (for my first CS class), I know that 4.2 definitely had
the string table, as did all the descendants that I encountered in the
field back during the great unix wars when I was instructed by my employer
to obfuscate certain symbols to “protect” IP.

Warner

> Filenames over 14 characters appear to have been introduced in 4.1BSD.
> _______________________________________________
> TUHS mailing list
> TUHS at minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/tuhs

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20141017/6757e69a/attachment.sig>


More information about the TUHS mailing list