diff options
author | Petr Machata <pmachata@redhat.com> | 2013-10-16 14:25:45 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2013-10-23 01:00:03 +0200 |
commit | b8f0d8b5859a7d69f6aed4904a87ac6a423285f6 (patch) | |
tree | 205b96f070af03c244f7a415315a06021c2c690c | |
parent | c65c24a7e4645559a0fb050ff5a96ec248827562 (diff) | |
download | ltrace-b8f0d8b5859a7d69f6aed4904a87ac6a423285f6.tar.gz |
Allow the prototype to be specified directly at the symbol
-rw-r--r-- | library.c | 1 | ||||
-rw-r--r-- | library.h | 5 | ||||
-rw-r--r-- | output.c | 3 |
3 files changed, 9 insertions, 0 deletions
@@ -159,6 +159,7 @@ private_library_symbol_init(struct library_symbol *libsym, libsym->latent = latent; libsym->delayed = delayed; libsym->enter_addr = (void *)(uintptr_t)addr; + libsym->proto = NULL; } static void @@ -50,6 +50,11 @@ struct library_symbol { const char *name; arch_addr_t enter_addr; enum toplt plt_type; + + /* If this is non-NULL, this prototype is used instead of + * looking up one in LIB->protolib. */ + struct prototype *proto; + int own_name : 1; /* This is relevant for PLT symbols. Latent PLT symbols are @@ -211,6 +211,9 @@ find_proto_cb(struct process *proc, struct library *lib, void *d) static struct prototype * lookup_symbol_prototype(struct process *proc, struct library_symbol *libsym) { + if (libsym->proto != NULL) + return libsym->proto; + struct library *lib = libsym->lib; if (lib != NULL) { struct find_proto_data data = { libsym->name }; |