public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] ABI change in gcc for ia64?
@ 2000-12-21 13:34 John Kohl
  0 siblings, 0 replies; only message in thread
From: John Kohl @ 2000-12-21 13:34 UTC (permalink / raw)
  To: linux-ia64

[-- Attachment #1: Type: text/plain, Size: 462 bytes --]

Was there an ABI change for gcc for ia64 between 
"old":	    gcc version 2.9-ia64-000216-final
"new":	    gcc version 2.96-ia64-000717 snap 001117

We are seeing interoperation failures between code compiled with these
two versions, related to structure passing (thankfully, user-space only
for now).

I've got a test case which shows this:

caller (tv1.c)	    callee (blah.c)	result
old		    old	   		OK
old		    new			BAD
new		    old			BAD
new		    new			OK


[-- Attachment #2: ~/src/tv-test/tv1.c --]
[-- Type: text/plain, Size: 425 bytes --]

#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>

extern void blah(
    struct sockaddr_in *__raddr,
    u_long __program,
    u_long __version,
    struct timeval __wait_resend,
    int *__sockp
);

char carray[] = "Hi there.\n";

main()
{
    struct timeval tv;
    char *cp = carray;
    int i = 37;

    tv.tv_sec = 1;
    tv.tv_usec = 2;

    blah(NULL, 32, 33, tv, &i);
}


[-- Attachment #3: ~/src/tv-test/blah.c --]
[-- Type: text/plain, Size: 610 bytes --]

#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>

extern void
blah(
    struct sockaddr_in *__raddr,
    u_long __program,
    u_long __version,
    struct timeval __wait_resend,
    int *__sockp
);

extern void
blah(
    struct sockaddr_in *__raddr,
    u_long __program,
    u_long __version,
    struct timeval tv,
    int *ip
)
{
    printf("raddr = %p\n", __raddr);
    printf("prog = %d\nvers = %d\n", __program, __version);
    printf("tv.tv_sec = %d\ntv.tv_usec = %d\nip = %p\n",
           tv.tv_sec, tv.tv_usec, ip);
    printf("int = %d\n", *ip);
}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-21 13:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-21 13:34 [Linux-ia64] ABI change in gcc for ia64? John Kohl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox