call/jmp
From: tom (tom_at_dbsevice.com)
Date: 01/26/04
- Next message: Måns Rullgård: "Re: call/jmp"
- Previous message: Josef Möllers: "Re: Netboot from a floppy"
- Next in thread: Måns Rullgård: "Re: call/jmp"
- Reply: Måns Rullgård: "Re: call/jmp"
- Reply: Jeff Schwab: "Re: call/jmp"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 26 Jan 2004 12:50:04 +0100
I have a plugin architecture.
The loader loads a library (so), and gets a pointer
to a list of function pointers (an sort of an interface).
In the loader, there are many functions which doesn't
do anything other than just call the apropriate function
in the interface. An short example:
void foo(int arg) { interface->foo(arg); }
int bar(void *arg) { return interface->bar(arg); }
and so on...
I looked at the generated assemply, and I've seen
that the compiler generated a quite long code, first
some 'push' and then a 'call'. I thought this is not
necessary, so I replaced it by a 'jmp'.
But I got an SIGSEGV.
Is it possible to replace the 'call' by a 'jmp'?
thanks
tom
- Next message: Måns Rullgård: "Re: call/jmp"
- Previous message: Josef Möllers: "Re: Netboot from a floppy"
- Next in thread: Måns Rullgård: "Re: call/jmp"
- Reply: Måns Rullgård: "Re: call/jmp"
- Reply: Jeff Schwab: "Re: call/jmp"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|