From: "Laurent Morichetti" <laurentm@cup.hp.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] ld-linux.so
Date: Sun, 23 Apr 2000 06:45:23 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590678205024@msgid-missing> (raw)
In glibc/sysdeps/ia64/dl-machine.h the macro TRAMPOLINE_TEMPLATE saves the
input registers but not r8 (pointer to value returned in memory). r8 should
be preserved across the runtime fixup.
The following example fails on linux-ia64:
foo.hpp:
===
class foo {
public:
long _a;
long _b;
foo(long a, long b) : _a(a), _b(b) {}
};
extern foo bar(long a, long b);
bar.cpp:
===
#include "foo.hpp"
foo bar(long a, long b) { return foo(a, b); }
foo.cpp:
===
#include <stdlib.h>
#include <stdio.h>
#include "foo.hpp"
int main() {
foo f = bar(1, 2);
fprintf(stdout, "a=%ld, b=%ld\n", f._a, f._b);
return EXIT_SUCCESS;
}
$ g++ -fPIC -shared -o libbar.so bar.cpp
$ g++ -o foo foo.cpp -L. -lbar
-Laurent
next reply other threads:[~2000-04-23 6:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-23 6:45 Laurent Morichetti [this message]
2000-04-23 9:02 ` [Linux-ia64] ld-linux.so Jes Sorensen
2000-04-23 16:52 ` Kevin Buettner
2000-04-24 9:01 ` Jes Sorensen
2000-04-24 11:08 ` Jes Sorensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ia64-105590678205024@msgid-missing \
--to=laurentm@cup.hp.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.