November 22, 2005
This does not need to be addressed right now, it is for information, mainly to Walter, I guess.

On Linux (tested on DMD .139 and Fedora Core 4), the parameters to ld linker contain some lines that seem (to me, at least) redundant.

If this is a surprise, then you might want to look at it, otherwise just forget it.

---

Upon compiling the following program (called libtest1.d):

import std.c.stdio;
void main()
{}

The linker receives the following arguments (split at space, for readability):

--eh-frame-hdr
-m
elf_i386
-dynamic-linker
/lib/ld-linux.so.2
-o
libtest1
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../crt1.o
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../crti.o
/usr/lib/gcc/i386-redhat-linux/4.0.0/crtbegin.o
## -L/usr/lib/gcc/i386-redhat-linux/4.0.0
-L/usr/lib/gcc/i386-redhat-linux/4.0.0
-L/usr/lib/gcc/i386-redhat-linux/4.0.0/../../..
libtest1.o
-lphobos
-lpthread
-lm
## -lgcc
--as-needed
-lgcc_s
--no-as-needed
-lc
-lgcc
## --as-needed
## -lgcc_s
## --no-as-needed
/usr/lib/gcc/i386-redhat-linux/4.0.0/crtend.o
/usr/lib/gcc/i386-redhat-linux/4.0.0/../../../crtn.o


In the above listing, I have marked with "## " the lines that seemed redundant, and which I could remove, without changing the compilation results.