summaryrefslogtreecommitdiffstats
path: root/libebl/eblopenbackend.c
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2005-12-05 22:46:21 +0000
committerRoland McGrath <[email protected]>2005-12-05 22:46:21 +0000
commit994b4899278199fc4d307780dac0ea50b238bc74 (patch)
tree319952538a8556fa7f4d1ffcb4ae258fc6c47a5b /libebl/eblopenbackend.c
parent038129b11ac71a13ccaf9029122be86d6c532990 (diff)
merge of 2cc527e6d8c8ff19dab478f7d12e58f1cfa6d6f5
and 7b542932f3e2947183b45bdbf39d448f457da9fd
Diffstat (limited to 'libebl/eblopenbackend.c')
-rw-r--r--libebl/eblopenbackend.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c
index 092cb97a..6f39eb49 100644
--- a/libebl/eblopenbackend.c
+++ b/libebl/eblopenbackend.c
@@ -21,6 +21,7 @@
#include <gelf.h>
#include <stdlib.h>
#include <string.h>
+#include <stdio.h>
#include <libeblP.h>
@@ -160,6 +161,10 @@ static bool default_check_special_symbol (Elf *elf, GElf_Ehdr *ehdr,
static bool default_bss_plt_p (Elf *elf, GElf_Ehdr *ehdr);
static int default_return_value_location (Dwarf_Die *functypedie,
const Dwarf_Op **locops);
+static ssize_t default_register_name (Ebl *ebl,
+ int regno, char *name, size_t namelen,
+ const char **prefix,
+ const char **setname);
static void
@@ -191,6 +196,7 @@ fill_defaults (Ebl *result)
result->check_special_symbol = default_check_special_symbol;
result->bss_plt_p = default_bss_plt_p;
result->return_value_location = default_return_value_location;
+ result->register_name = default_register_name;
result->destr = default_destr;
}
@@ -587,3 +593,17 @@ default_return_value_location (Dwarf_Die *functypedie __attribute__ ((unused)),
{
return -2;
}
+
+static ssize_t
+default_register_name (Ebl *ebl __attribute__ ((unused)),
+ int regno, char *name, size_t namelen,
+ const char **prefix,
+ const char **setname)
+{
+ if (name == NULL)
+ return 0;
+
+ *setname = "???";
+ *prefix = "";
+ return snprintf (name, namelen, "reg%d", regno);
+}