Jump to content

Can I call entry.S code from my own program?

- - - - -

  • Please log in to reply
4 replies to this topic

#1
Icuk

Icuk

    Newbie

  • Members
  • Pip
  • 2 posts
I'm wondering if I can call ret_from_sys_call which resides under entry.S within the linux kernel source from my own kernel module. I need to be able to return from a system call and would rather not copy ret_from_sys_call into my own inline assembly function within C. Anywho, is this possible and if so, how?

#2
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,705 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
What language is this in, MIPS, x86...?
sudo rm -rf /

#3
Icuk

Icuk

    Newbie

  • Members
  • Pip
  • 2 posts
x86

#4
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,705 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
Is there an object file? You could statically link to it.
sudo rm -rf /

#5
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
well as he says,obj file can help u return back to sys loader,that handles your program




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users