5b63d35
2007-08-20  Roland McGrath  <roland@redhat.com>
5b63d35
5b63d35
	* ppc_symbol.c (ppc_check_special_symbol): For _GLOBAL_OFFSET_TABLE_
5b63d35
	when DT_PPC_GOT is not found, anywhere in the section is valid.
5b63d35
5b63d35
--- backends/ppc_symbol.c	20b22bb299c460c0e41145b39d6908f0f6e69948
5b63d35
+++ backends/ppc_symbol.c	1b3c198586c4cdb6a1200b00378358fa8a26a47a
5b63d35
@@ -1,5 +1,5 @@
5b63d35
 /* PPC specific symbolic name handling.
5b63d35
-   Copyright (C) 2004, 2005 Red Hat, Inc.
5b63d35
+   Copyright (C) 2004, 2005, 2007 Red Hat, Inc.
5b63d35
    This file is part of Red Hat elfutils.
5b63d35
    Written by Ulrich Drepper <drepper@redhat.com>, 2004.
5b63d35
 
5b63d35
@@ -122,10 +122,13 @@ ppc_check_special_symbol (Elf *elf, GElf
5b63d35
 
5b63d35
   if (strcmp (name, "_GLOBAL_OFFSET_TABLE_") == 0)
5b63d35
     {
5b63d35
+      /* In -msecure-plt mode, DT_PPC_GOT is present and must match.  */
5b63d35
       GElf_Addr gotaddr;
5b63d35
       if (find_dyn_got (elf, ehdr, &gotaddr))
5b63d35
 	return sym->st_value == gotaddr;
5b63d35
-      return sym->st_value == destshdr->sh_addr + 4;
5b63d35
+
5b63d35
+      /* In -mbss-plt mode, any place in the section is valid.  */
5b63d35
+      return true;
5b63d35
     }
5b63d35
 
5b63d35
   const char *sname = elf_strptr (elf, ehdr->e_shstrndx, destshdr->sh_name);