[Linux-ia64] ABI change in gcc for ia64?

John Kohl
2000-12-21T13:34:39Z

[-- 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);
}