summaryrefslogtreecommitdiffstats
path: root/backends/alpha_symbol.c
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2011-03-09 10:10:36 -0800
committerRoland McGrath <[email protected]>2011-03-09 10:10:36 -0800
commitd76bd7a2839e9ab79abf75948b646bf52a8695e3 (patch)
treee0e7aab73c5c60feadce664a3bf7f5e281c22c8e /backends/alpha_symbol.c
parent3587087df31ddd2b0d96af5fbc9c976be92e4ada (diff)
Alpha backend: accept any _GLOBAL_OFFSET_TABLE_ value.
Diffstat (limited to 'backends/alpha_symbol.c')
-rw-r--r--backends/alpha_symbol.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/backends/alpha_symbol.c b/backends/alpha_symbol.c
index aa45c61e..4bd8793a 100644
--- a/backends/alpha_symbol.c
+++ b/backends/alpha_symbol.c
@@ -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 <[email protected]>, 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;
+}