to exec a shared object
Segher Boessenkool
segher@kernel.crashing.org
Wed May 12 02:46:00 GMT 2004
[GCC list culled]
> Yes, because GNU/Linux is willing and able to execute shared
> libraries, I believe it is correct for the linker to define an entry
> point by default.
The linker just goes and takes the start of the text segment
as the entry point (unless there is a _start symbol)... quite
wrong in most cases. A better default would be to make no
entry point, imho. So maybe add
test -z "$ENTRY" && test -n "$CREATE_SHLIB" && ENTRY=0
or something like it to the start of elf.sc and friends? No idea
if this will really work, though ;-)
Oh, and maybe the Linux kernel needs some work, too, to give the
proper diagnostics.
[I have no time or resources to actually create and test a full
patch right now, sorry].
Segher
More information about the Binutils
mailing list