From 644efb43e0639af648dd46d9729c2cabd9511238 Mon Sep 17 00:00:00 2001 From: Cyril Brulebois Date: Fri, 30 Dec 2011 02:34:36 +0000 Subject: [PATCH 1/2] linux/ia64: Fix regression after domain I/O support code removal. Side effect of aa0bfb0f133481c57762012e8e30c05ffa151423: | CCLD Xorg | sdksyms.o:(.data.rel+0x27d8): undefined reference to `outl' | collect2: ld returned 1 exit status Since the linux/ia64 domain I/O support code got removed in that commit, there's no reason to keep on declaring those functions (inb, inl, inw, outb, outl, outw). Bugzilla: https://bugs.freedesktop.org/43985 Reviewed-by: Jeremy Huddleston Signed-off-by: Cyril Brulebois --- hw/xfree86/common/compiler.h | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h index 9e00d7571..34e60c52a 100644 --- a/hw/xfree86/common/compiler.h +++ b/hw/xfree86/common/compiler.h @@ -397,25 +397,6 @@ extern _X_EXPORT unsigned int inl(unsigned int port); #include #endif /* __NetBSD__ */ -# elif defined(linux) && defined(__ia64__) - -# include - -# include - -# undef outb -# undef outw -# undef outl -# undef inb -# undef inw -# undef inl -extern _X_EXPORT void outb(unsigned long port, unsigned char val); -extern _X_EXPORT void outw(unsigned long port, unsigned short val); -extern _X_EXPORT void outl(unsigned long port, unsigned int val); -extern _X_EXPORT unsigned int inb(unsigned long port); -extern _X_EXPORT unsigned int inw(unsigned long port); -extern _X_EXPORT unsigned int inl(unsigned long port); - # elif (defined(linux) || defined(__FreeBSD__)) && defined(__amd64__) # include From 6269977c91071e0ea16ca5b4b8e15fd6db0b6fcf Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Fri, 30 Dec 2011 20:41:25 +0100 Subject: [PATCH 2/2] os: don't ignore failure from dladdr If dladdr returns 0, don't go and use the returned Dl_info, it may contain garbage. X.Org bug#44315 Reported-and-tested-by: Cyril Brulebois Reviewed-by: Jeremy Huddleston Reviewed-by: Cyril Brulebois Signed-off-by: Julien Cristau --- os/backtrace.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/os/backtrace.c b/os/backtrace.c index 58b4b1f34..298bf1898 100644 --- a/os/backtrace.c +++ b/os/backtrace.c @@ -46,7 +46,11 @@ void xorg_backtrace(void) ErrorF("\nBacktrace:\n"); size = backtrace(array, 64); for (i = 0; i < size; i++) { - dladdr(array[i], &info); + int rc = dladdr(array[i], &info); + if (rc == 0) { + ErrorF("%d: ?? [%p]\n", i, array[i]); + continue; + } mod = (info.dli_fname && *info.dli_fname) ? info.dli_fname : "(vdso)"; if (info.dli_saddr) ErrorF("%d: %s (%s+0x%lx) [%p]\n", i, mod,