Re: add a piece of code to each module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 26, 2008 at 03:48:59PM +0800, Shaohua Li wrote:
> Hi,
> I'm now porting dyn ftrace to IA64. To make modules work, I must add a
> piece of code (trampoline code) to each module. I can't add the
> trampoline code in module load, because at that time, only PLT
> trampoline code can be added, and that code isn't ok for ftrace. I
> wonder if this can be done in kbuild. If yes, how can I do it?

Powerpc does something remotely similar.
In their arch Makefile they have:

LDFLAGS_MODULE  += arch/powerpc/lib/crtsavres.o


But there is some issues with it.
If you do a plain "make modules" then arch/powerpc/lib/crtsavres.o is not
built and module link fails.
There is IIRC also some issues with external modules.

Anohter option could be to add the code to the module.mod.c file
that modpost generates.
But if we go that route we have to do it in some generic way so
all archs can benefit from it.

I hope this is to some help...

	Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux