Hi,
with cross-built libunwind HEAD (59328832f7ee48682fcd0fd1ca0cb9cfdb32ec4a)
./configure --target=ia64-linux
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... ia64-unknown-linux-gnu
I get:
[GDB failed to load libunwind-ia64.so.8: .../libunwind-ia64.so.8: undefined
symbol: _Uelf64_valid_object]
lobunwind installs in such case only libunwind-ia64.so* and nothing else where
valid_object is missing.
Thanks,
Jan
Move valid_object definition from src/elfxx.c to src/elfxx.h.
Remove its declaration in src/elfxx.h.
diff --git a/src/elfxx.c b/src/elfxx.c
index 7ed44ba..68c303a 100644
--- a/src/elfxx.c
+++ b/src/elfxx.c
@@ -29,19 +29,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
#include "libunwind_i.h"
-HIDDEN int
-elf_w (valid_object) (struct elf_image *ei)
-{
- if (ei->size <= EI_VERSION)
- return 0;
-
- return (memcmp (ei->image, ELFMAG, SELFMAG) == 0
- && ((uint8_t *) ei->image)[EI_CLASS] == ELF_CLASS
- && ((uint8_t *) ei->image)[EI_VERSION] != EV_NONE
- && ((uint8_t *) ei->image)[EI_VERSION] <= EV_CURRENT);
-}
-
-
static int
elf_w (lookup_symbol) (unw_addr_space_t as,
unw_word_t ip, struct elf_image *ei,
diff --git a/src/elfxx.h b/src/elfxx.h
index a85cc68..f53eae7 100644
--- a/src/elfxx.h
+++ b/src/elfxx.h
@@ -43,13 +43,24 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. */
#include "libunwind_i.h"
-extern int elf_w (valid_object) (struct elf_image *ei);
extern int elf_w (get_proc_name) (unw_addr_space_t as,
pid_t pid, unw_word_t ip,
char *buf, size_t len,
unw_word_t *offp);
static inline int
+elf_w (valid_object) (struct elf_image *ei)
+{
+ if (ei->size <= EI_VERSION)
+ return 0;
+
+ return (memcmp (ei->image, ELFMAG, SELFMAG) == 0
+ && ((uint8_t *) ei->image)[EI_CLASS] == ELF_CLASS
+ && ((uint8_t *) ei->image)[EI_VERSION] != EV_NONE
+ && ((uint8_t *) ei->image)[EI_VERSION] <= EV_CURRENT);
+}
+
+static inline int
elf_map_image (struct elf_image *ei, const char *path)
{
struct stat stat;
_______________________________________________
Libunwind-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/libunwind-devel