diff options
author | Roland McGrath <roland@redhat.com> | 2011-03-09 10:10:36 -0800 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2011-03-09 10:10:36 -0800 |
commit | d76bd7a2839e9ab79abf75948b646bf52a8695e3 (patch) | |
tree | e0e7aab73c5c60feadce664a3bf7f5e281c22c8e /backends | |
parent | 3587087df31ddd2b0d96af5fbc9c976be92e4ada (diff) | |
download | elfutils-d76bd7a2839e9ab79abf75948b646bf52a8695e3.tar.gz |
Alpha backend: accept any _GLOBAL_OFFSET_TABLE_ value.
Diffstat (limited to 'backends')
-rw-r--r-- | backends/ChangeLog | 5 | ||||
-rw-r--r-- | backends/alpha_init.c | 3 | ||||
-rw-r--r-- | backends/alpha_symbol.c | 22 |
3 files changed, 28 insertions, 2 deletions
diff --git a/backends/ChangeLog b/backends/ChangeLog index 7865338f..2dcc9ef4 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -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. diff --git a/backends/alpha_init.c b/backends/alpha_init.c index 1ca99abc..14c085cc 100644 --- a/backends/alpha_init.c +++ b/backends/alpha_init.c @@ -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); 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 <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; +} |