Re: [Linux-ia64] Newbie questions

From: Matthew Wilcox <>
Date: 2002-11-09 06:01:10
On Sat, Nov 09, 2002 at 12:21:40AM +0530, CH Gowri Kumar wrote:
> I wrote the above program and compiled it and found the appropriate codes
> for the instructions using objdump -d and wrote the following program
> char sc[] ="\x0a"
>            "\x10"
>            "\x00"
>            "\x18\x00\x21\x00\x92\x00\x00\x42\xe0\x11\x00\x20\x84\x0a";
>        main()
>        {
>          void (*fp)(void);
>          fp = (void*)sc;
>          fp();
>       }
> But this program on execution gives me the error:
> "Illegal instruction (core dumped)"
> (A similar program for IA-32 worked well.)

function pointers on ia64 are "fat" -- that is, they are not the address
of the function, they are the address of a function descriptor which
contains (iirc) the GP and the address of the function.  i believe glibc
pokes around with this kind of thing, so you may wish to look at the
ia64 assembly code in there to see how it does it.

Revolutions do not require corporate support.
Received on Fri Nov 08 11:01:19 2002

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:10 EST