Re: How to determine linkage of a function at run-time?

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

 



Bill,


William Bland <wjb@abstractnonsense.com> [2003-06-25 19:48]:

> 	I wish to call a kernel function (may be actually in the
> kernel, or may be in a module) through a function pointer.
> 

once the module has been loaded, there is no real difference for this
issue AFAIK.

> I would think that, when you call a function using a function pointer, gcc
> will assume that all arguments get passed on the stack (asmlinkage) since
> it can't know anything about the function's actual linkage.
> 

Have you checked what asmlinkage does?  IIRC this is defined in
include/linux/linkage.h.

> So, I need a way to find out (at run-time), for a given function, whether
> it was compiled with asmlinkage so that I will know I can safely call it
> in this way.
> 
I do not get the point here.

wbr,
Lukas
-- 
Lukas Ruf           | Wanna know anything about raw |
<http://www.lpr.ch> | IP?  <http://www.rawip.org>   |
--
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