Date: Wed, 24 Apr 1996 20:46:35 -0400 From: dj AT delorie DOT com (DJ Delorie) Message-Id: <199604250046.UAA21661@delorie.com> To: elf AT netcom DOT com Cc: UCKO AT vax1 DOT rockhurst DOT edu, djgpp AT sun DOT soe DOT clarkson DOT edu In-Reply-To: <199604242103.OAA09939@netcom4.netcom.com> (elf@netcom.com) Subject: The real story about the underbars The real reason djgpp has leading underbars is historical, not technical. Most COFF do not use underbars. DJGPP was first birthed on an SCO unix box, which used a.out. I hacked the system libc.a to link with dos system calls (read, open, exit, etc) to get gcc working the first time. SCO had underscores, so djgpp had underscores. DJGPP remained a.out until around 1.10, when DPMI first kicked in. It switched to COFF because COFF stored the load address for each section, instead of assuming 4Mb of code space. Nearly all other 386 unix used coff; elf wasn't around yet. DJGPP continued using underbars in COFF because of all the existing libraries that had symbols with leading underbars. DJGPP V2 continued to use underbars so that I could share compiler binaries and other tools between V1 and V2. DJGPP V2 remained COFF because of NT, which is COFF. At the time, there was no reason to switch the entire toolchain to ELF, and keeping with COFF helped get V2 off the ground.