- Fix false-positive eu-elflint failure on ppc -mbss-plt binaries.

This commit is contained in:
roland 2007-08-21 00:33:25 +00:00
parent 7f96a312c1
commit b1b6db7572
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,29 @@
2007-08-20 Roland McGrath <roland@redhat.com>
* 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 <drepper@redhat.com>, 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);

View File

@ -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 <roland@redhat.com> - 0.129-2
- Fix false-positive eu-elflint failure on ppc -mbss-plt binaries.
* Tue Aug 14 2007 Roland McGrath <roland@redhat.com> - 0.129-1
- Update to 0.129
- readelf: new options --hex-dump (or -x), --strings (or -p) (#250973)