diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2004-05-23 13:28:06 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2004-05-23 13:28:06 +0000 |
commit | 27690c22ebccd11522a3d86e10217426dc595da6 (patch) | |
tree | 5b61c6fc447e9cae9cb895932c04f75a0225c058 | |
parent | b13963a3d9e5c3c6909dd10f7d7558eb20291c73 (diff) |
Workaround for alpha, which generate a relocation entry for a function pointer
in the read-only section rather than a PLT reference like all other archs.
workaround ok kettenis@
binutils/ld needs to be fixed and workaround removed eventually.
-rw-r--r-- | gnu/usr.bin/binutils/gdb/c-lang.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/usr.bin/binutils/gdb/c-lang.c b/gnu/usr.bin/binutils/gdb/c-lang.c index ba34540f386..a95cec057a8 100644 --- a/gnu/usr.bin/binutils/gdb/c-lang.c +++ b/gnu/usr.bin/binutils/gdb/c-lang.c @@ -593,6 +593,16 @@ struct type **const (cplus_builtin_types[]) = 0 }; +/* without this stub function, alpha attempts to generate a + * text relocation for the function pointer instead of a PLT reference. + */ +static char *call_cplus_demangle (const char *mangled, int options); +static char * +call_cplus_demangle (const char *mangled, int options) +{ + return cplus_demangle(mangled, options); +} + const struct language_defn cplus_language_defn = { "c++", /* Language name */ @@ -615,7 +625,7 @@ const struct language_defn cplus_language_defn = value_of_this, /* value_of_this */ cp_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */ cp_lookup_transparent_type, /* lookup_transparent_type */ - cplus_demangle, /* Language specific symbol demangler */ + call_cplus_demangle, /* Language specific symbol demangler */ {"", "", "", ""}, /* Binary format info */ {"0%lo", "0", "o", ""}, /* Octal format info */ {"%ld", "", "d", ""}, /* Decimal format info */ |