Mail Archives: djgpp/1996/04/24/21:09:14
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.
- Raw text -