Re: kernel source code C/assembler symbols

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

 





On 8/30/05, Garcia Jérémie <GARCIAJ@xxxxxx> wrote:
Hi everybody,I need your help one more time.
I developped some kernel src code and new system calls in order to port a user space programm.
I placed them in a new diretory in the linux tree: linux_2.4.20/arch/ppc/prs/syscalls
I would like to export some symbols (only functions) of some of these files (assembler and C files), in order to allow
modules to access them when loaded.
I read a lot of things on the web but none seem to work (EXPORT_SYMBOLE).


I think you can do that by adding EXPORT_SYMBOL(lstAdd) to "linux/kernel/ksyms.c" file, same for other required symbols also.
Or you can also use this EXPORT_SYMBOL macro in the same file where you defined that function which need to be exported. After the definition, just write this EXPORT_SYMBOL macro for that function name.

-Gaurav

 

Below is my Makefile:

EXTRA_CFLAGS    += -I$(TOPDIR)/arch/ppc/prs/syscalls
O_TARGET        := prs_environment.o
export-objs     := llstLib.o prs_siafn.o       //(NOTE: llstLib.c, prs_siafn.S)

obj-y       :=
obj-m       :=
obj-n       :=

obj-$(CONFIG_PRS_SOFT)  +=  llstLib.o
obj-$(CONFIG_PRS_SOFT)  +=  prs_siafn.o

include $(TOPDIR)/Rules.make

So can somenone tell me how to export assembler and C functions in order to get them available for module.
Each try I've done gave the same result at module loading (exemples below) :

/q80g/modules/modHscx.o: unresolved symbol lstAdd  //C function in llstLib.c
/q80g/modules/modHscx.o: unresolved symbol stas_Set_TBl_F  // assembler function in prs_siafn.S

And no lstAdd are present in reading /proc/ksyms

HELP!! tks a lot for your help






--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux