]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Alpha backend: accept any _GLOBAL_OFFSET_TABLE_ value.
authorRoland McGrath <roland@redhat.com>
Wed, 9 Mar 2011 18:10:36 +0000 (10:10 -0800)
committerRoland McGrath <roland@redhat.com>
Wed, 9 Mar 2011 18:10:36 +0000 (10:10 -0800)
backends/ChangeLog
backends/alpha_init.c
backends/alpha_symbol.c

index 7865338fbe86de64e8c3408c634acfc532e18e3a..2dcc9ef4cdb71b2a098814d109890fc0481c1427 100644 (file)
@@ -1,3 +1,8 @@
+2011-03-09  Roland McGrath  <roland@redhat.com>
+
+       * alpha_symbol.c (alpha_check_special_symbol): New function.
+       * alpha_init.c (alpha_init): Initialize hook.
+
 2010-11-08  Roland McGrath  <roland@redhat.com>
 
        * i386_retval.c (loc_intreg): Typo fix.
index 1ca99abc52e723414c94f4e58d2082246eea6d18..14c085cc2de5775c679f291b0fedabe0d19b097f 100644 (file)
@@ -1,5 +1,5 @@
 /* Initialization of Alpha specific backend library.
-   Copyright (C) 2002, 2005, 2006, 2007, 2008 Red Hat, Inc.
+   Copyright (C) 2002-2011 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -56,6 +56,7 @@ alpha_init (elf, machine, eh, ehlen)
   HOOK (eh, return_value_location);
   HOOK (eh, machine_section_flag_check);
   HOOK (eh, check_special_section);
+  HOOK (eh, check_special_symbol);
   HOOK (eh, register_info);
   HOOK (eh, core_note);
   HOOK (eh, auxv_info);
index aa45c61ee576d975db8bba0f648b3004e24634a4..4bd8793a01bf7bfae5e96946e6c03ca0548dceec 100644 (file)
@@ -1,5 +1,5 @@
 /* Alpha specific symbolic name handling.
-   Copyright (C) 2002,2005,2007,2008 Red Hat, Inc.
+   Copyright (C) 2002-2011 Red Hat, Inc.
    This file is part of Red Hat elfutils.
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -30,6 +30,7 @@
 
 #include <elf.h>
 #include <stddef.h>
+#include <string.h>
 
 #define BACKEND                alpha_
 #include "libebl_CPU.h"
@@ -121,3 +122,22 @@ alpha_check_special_section (Ebl *ebl,
 
   return false;
 }
+
+/* Check whether given symbol's st_value and st_size are OK despite failing
+   normal checks.  */
+bool
+alpha_check_special_symbol (Elf *elf __attribute__ ((unused)),
+                           GElf_Ehdr *ehdr __attribute__ ((unused)),
+                           const GElf_Sym *sym __attribute__ ((unused)),
+                           const char *name,
+                           const GElf_Shdr *destshdr __attribute__ ((unused)))
+{
+  if (name == NULL)
+    return false;
+
+  if (strcmp (name, "_GLOBAL_OFFSET_TABLE_") == 0)
+    /* On Alpha any place in the section is valid.  */
+    return true;
+
+  return false;
+}