Hi Kurt, Thanks for the Debian builds of elfutils-0.165. Sorry for the breakage, wrt old glibc elf.h system header. But happy to see the simple fix seems to work.
I looked at the latest build logs: https://buildd.debian.org/status/package.php?p=elfutils For the hppa failure we need some hppa hacker to explain whether or not this is a real issue or not: elflint /<<PKGBUILDDIR>>/tests/elfstrmerge section [24] '.plt' is both executable and writable FAIL run-strip-strmerge.sh (exit status: 1) Normaly elflint is correct, this would be a bad thing. The hurd test build issue should be easy to fix with the attached patch. For the kFreeBSD variants you could start with the second patch to elflint to at least recognize ELFOSABI_FREEBSD. Although I suspect there might be more issues. But maybe we are lucky and it really is just like normal GNU/Linux ELF files since you are using the normal GNU toolchain. The other issue on kFreeBSD is that we try to run a test that uses the linux specific dwfl_linux_proc_attach. We should just skip that on none GNU/Linux platforms like the third attached patch does. The mips failures are a bit harder to fix since elflint really doesn't like some of the mips specific issues. We really should import the Debian mips backend, I am sorry I haven't found time to do all the needed research. If you could try the attached patches on a new Debian build that would be appreciated. Thanks, Mark
>From 6bf03d4a3f2badac3d353d376501574204688c0f Mon Sep 17 00:00:00 2001 From: Mark Wielaard <m...@redhat.com> Date: Wed, 13 Jan 2016 22:49:02 +0100 Subject: [PATCH] tests: Guard linux specific header includes with ifdef __linux__. Signed-off-by: Mark Wielaard <m...@redhat.com> --- tests/ChangeLog | 4 ++++ tests/dwfl-proc-attach.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/tests/ChangeLog b/tests/ChangeLog index 366aea9..3900d1b 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2016-01-13 Mark Wielaard <m...@redhat.com> + + * dwfl-proc-attach.c: Guard linux specific header. + 2016-01-08 Mark Wielaard <m...@redhat.com> * elfputzdata.c (main): Fix parentheses in strncmp test. diff --git a/tests/dwfl-proc-attach.c b/tests/dwfl-proc-attach.c index 0ba0be2..e7bb201 100644 --- a/tests/dwfl-proc-attach.c +++ b/tests/dwfl-proc-attach.c @@ -22,6 +22,7 @@ #include <errno.h> #include <error.h> #include <unistd.h> +#ifdef __linux__ #include <sys/types.h> #include <sys/stat.h> #include <sys/user.h> @@ -29,6 +30,7 @@ #include <string.h> #include ELFUTILS_HEADER(dwfl) #include <pthread.h> +#endif #ifndef __linux__ int -- 2.5.0
>From 866aaf612c028853e160161ee3ca4d6704d22bef Mon Sep 17 00:00:00 2001 From: Mark Wielaard <m...@redhat.com> Date: Wed, 13 Jan 2016 22:57:03 +0100 Subject: [PATCH] elflint: Recognize ELFOSABI_FREEBSD which Debian kFreeBSD uses. Signed-off-by: Mark Wielaard <m...@redhat.com> --- src/ChangeLog | 4 ++++ src/elflint.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index af98c4d..707c271 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2016-01-13 Mark Wielaard <m...@redhat.com> + + * elflint.c (check_elf_header): Recognize ELFOSABI_FREEBSD. + 2016-01-08 Mark Wielaard <m...@redhat.com> * elfcompress.c (compress_section): Use %zu to print size_t. diff --git a/src/elflint.c b/src/elflint.c index 7a7b9ce..eae7761 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -380,9 +380,11 @@ check_elf_header (Ebl *ebl, GElf_Ehdr *ehdr, size_t size) ERROR (gettext ("unknown ELF header version number e_ident[%d] == %d\n"), EI_VERSION, ehdr->e_ident[EI_VERSION]); - /* We currently don't handle any OS ABIs other than Linux. */ + /* We currently don't handle any OS ABIs other than Linux and the + kFreeBSD variant of Debian. */ if (ehdr->e_ident[EI_OSABI] != ELFOSABI_NONE - && ehdr->e_ident[EI_OSABI] != ELFOSABI_LINUX) + && ehdr->e_ident[EI_OSABI] != ELFOSABI_LINUX + && ehdr->e_ident[EI_OSABI] != ELFOSABI_FREEBSD) ERROR (gettext ("unsupported OS ABI e_ident[%d] == '%s'\n"), EI_OSABI, ebl_osabi_name (ebl, ehdr->e_ident[EI_OSABI], buf, sizeof (buf))); -- 2.5.0
>From 1dfe8770f682534605d9eda7749afb86bd528165 Mon Sep 17 00:00:00 2001 From: Mark Wielaard <m...@redhat.com> Date: Wed, 13 Jan 2016 23:06:33 +0100 Subject: [PATCH] tests: Skip dwfl-bug-fd-leak test if dwfl_linux_proc_report is unsupported. Signed-off-by: Mark Wielaard <m...@redhat.com> --- tests/ChangeLog | 4 ++++ tests/dwfl-bug-fd-leak.c | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/tests/ChangeLog b/tests/ChangeLog index 3900d1b..7deb3e6 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,5 +1,9 @@ 2016-01-13 Mark Wielaard <m...@redhat.com> + * dwfl-bug-fd-leak.c: Skip test unless on __linux__. + +2016-01-13 Mark Wielaard <m...@redhat.com> + * dwfl-proc-attach.c: Guard linux specific header. 2016-01-08 Mark Wielaard <m...@redhat.com> diff --git a/tests/dwfl-bug-fd-leak.c b/tests/dwfl-bug-fd-leak.c index bcbfb29..689cdd7 100644 --- a/tests/dwfl-bug-fd-leak.c +++ b/tests/dwfl-bug-fd-leak.c @@ -27,6 +27,15 @@ #include <error.h> #include <unistd.h> #include <dwarf.h> + +#ifndef __linux__ +int +main (void) +{ + return 77; /* dwfl_linux_proc_report is linux specific. */ +} +#else + #include <sys/resource.h> #include ELFUTILS_HEADER(dwfl) @@ -104,3 +113,4 @@ main (void) return 0; } +#endif -- 2.5.0