Re: in-kernel linking issues

Richard Henderson (rth@twiddle.net)
Fri, 15 Nov 2002 14:22:26 -0800


On Sat, Nov 16, 2002 at 08:21:32AM +1100, Rusty Russell wrote:
> > Are you really REALLY sure you don't want to load ET_DYN or ET_EXEC
> > files (aka shared libraries or executables) instead of ET_REL files
> > (aka .o files)?
>
> AFAICT, that would hurt some archs. Of course, you could say "modules
> are meant to be slow" but I don't think that would win you any
> friends 8)

Actually, I've yet to come across one that is adversely affected.
Note that we're putting code _not_ compiled with -fpic into this
shared object.

> Note: "extreme reduction" is probably overstating. There are only
> about 300 lines of linker code in the kernel (x86).

Note that x86 is the easiest possible case. You've only got two
relocation types, you don't need to worry about .got, .plt, .opd
allocation, nor sorting sections into a required order, nor
sorting COMMON symbols.

r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/