From 5b63d35dbcc81a7a6ceca51fadc46e6bdb9ebbd2 Mon Sep 17 00:00:00 2001 From: roland Date: Tue, 21 Aug 2007 00:33:25 +0000 Subject: [PATCH] - Fix false-positive eu-elflint failure on ppc -mbss-plt binaries. --- elfutils-0.129-elflint-ppc-got.patch | 29 ++++++++++++++++++++++++++++ elfutils.spec | 10 +++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 elfutils-0.129-elflint-ppc-got.patch diff --git a/elfutils-0.129-elflint-ppc-got.patch b/elfutils-0.129-elflint-ppc-got.patch new file mode 100644 index 0000000..167b3be --- /dev/null +++ b/elfutils-0.129-elflint-ppc-got.patch @@ -0,0 +1,29 @@ +2007-08-20 Roland McGrath + + * ppc_symbol.c (ppc_check_special_symbol): For _GLOBAL_OFFSET_TABLE_ + when DT_PPC_GOT is not found, anywhere in the section is valid. + +--- backends/ppc_symbol.c 20b22bb299c460c0e41145b39d6908f0f6e69948 ++++ backends/ppc_symbol.c 1b3c198586c4cdb6a1200b00378358fa8a26a47a +@@ -1,5 +1,5 @@ + /* PPC specific symbolic name handling. +- Copyright (C) 2004, 2005 Red Hat, Inc. ++ Copyright (C) 2004, 2005, 2007 Red Hat, Inc. + This file is part of Red Hat elfutils. + Written by Ulrich Drepper , 2004. + +@@ -122,10 +122,13 @@ ppc_check_special_symbol (Elf *elf, GElf + + if (strcmp (name, "_GLOBAL_OFFSET_TABLE_") == 0) + { ++ /* In -msecure-plt mode, DT_PPC_GOT is present and must match. */ + GElf_Addr gotaddr; + if (find_dyn_got (elf, ehdr, &gotaddr)) + return sym->st_value == gotaddr; +- return sym->st_value == destshdr->sh_addr + 4; ++ ++ /* In -mbss-plt mode, any place in the section is valid. */ ++ return true; + } + + const char *sname = elf_strptr (elf, ehdr->e_shstrndx, destshdr->sh_name); diff --git a/elfutils.spec b/elfutils.spec index fabaee3..54e5d04 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,5 +1,5 @@ %define eu_version 0.129 -%define eu_release 1 +%define eu_release 2 %if %{?_with_compat:1}%{!?_with_compat:0} %define compat 1 @@ -35,6 +35,9 @@ Patch0: elfutils-strip-copy-symtab.patch Source2: testfile16.symtab.bz2 Source3: testfile16.symtab.debug.bz2 +Patch3: elfutils-0.129-elflint-ppc-got.patch + + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: bison >= 1.875 BuildRequires: flex >= 2.5.4a @@ -153,6 +156,8 @@ find . \( -name configure -o -name config.h.in \) -print | xargs touch %patch2 -p1 +%patch3 -p0 + %build # Remove -Wall from default flags. The makefiles enable enough warnings # themselves, and they use -Werror. Appending -Wall defeats the cases where @@ -259,6 +264,9 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/libelf.a %changelog +* Mon Aug 20 2007 Roland McGrath - 0.129-2 +- Fix false-positive eu-elflint failure on ppc -mbss-plt binaries. + * Tue Aug 14 2007 Roland McGrath - 0.129-1 - Update to 0.129 - readelf: new options --hex-dump (or -x), --strings (or -p) (#250973)