+2016-02-09 Mark Wielaard <mjw@redhat.com>
+
+ * elflint.c (compare_hash_gnu_hash): Check hash sh_entsize against
+ sizeof (Elf64_Xword). Correct invalid sh_entsize error message
+ section idx and name.
+
2016-01-13 Mark Wielaard <mjw@redhat.com>
* elflint.c (check_elf_header): Recognize ELFOSABI_FREEBSD.
}
}
}
- else if (hash_shdr->sh_entsize == sizeof (Elf64_Word))
+ else if (hash_shdr->sh_entsize == sizeof (Elf64_Xword))
{
const Elf64_Xword *hasharr = (Elf64_Xword *) hash_data->d_buf;
if (hash_data->d_size < 2 * sizeof (Elf32_Word))
{
ERROR (gettext ("\
hash section [%2zu] '%s' invalid sh_entsize\n"),
- gnu_hash_idx, gnu_hash_name);
+ hash_idx, hash_name);
return;
}
+2016-02-09 Mark Wielaard <mjw@redhat.com>
+
+ * testfile-s390x-hash-both.bz2: New testfile.
+ * Makefile.am (EXTRA_DIST): Add testfile-s390x-hash-both.bz2.
+ * run-elflint-test.sh: Add elflint testfile-s390x-hash-both test.
+
2016-02-04 Mark Wielaard <mjw@redhat.com>
* run-strip-nobitsalign.sh: New test.
testfile56.bz2 testfile57.bz2 testfile58.bz2 \
run-typeiter.sh testfile59.bz2 \
run-readelf-d.sh testlib_dynseg.so.bz2 \
+ testfile-s390x-hash-both.bz2 \
run-readelf-gdb_index.sh testfilegdbindex5.bz2 \
testfilegdbindex7.bz2 \
run-readelf-s.sh testfilebazdbg.bz2 testfilebazdyn.bz2 \
#! /bin/sh
-# Copyright (C) 2005, 2007, 2008 Red Hat, Inc.
+# Copyright (C) 2005, 2007, 2008, 2015 Red Hat, Inc.
# This file is part of elfutils.
# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
#
testfiles testlib_dynseg.so
testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testlib_dynseg.so
+# s390x has SHT_HASH with sh_entsize 8 (really should be 4, but see common.h)
+# This was wrongly checked when comparing .gnu.hash and .hash.
+# Simple "int main (int argc, char **argv) { return 0; }"
+# gcc -Xlinker --hash-style=both -o testfile-s390x-hash-both s390x-hash-both.c
+testfiles testfile-s390x-hash-both
+testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testfile-s390x-hash-both
+
exit 0