ebl_check_special_symbol.c revision 1ccdfb683ad6c7e59793136c3a657ddf131cafd1
1e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath/* Check special symbol's st_value.
2e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath   Copyright (C) 2005 Red Hat, Inc.
3de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   This file is part of elfutils.
4e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath
5de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   This file is free software; you can redistribute it and/or modify
6de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   it under the terms of either
7e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath
8de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard     * the GNU Lesser General Public License as published by the Free
9de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard       Software Foundation; either version 3 of the License, or (at
10de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard       your option) any later version
11de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard
12de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   or
13de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard
14de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard     * the GNU General Public License as published by the Free
15de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard       Software Foundation; either version 2 of the License, or (at
16de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard       your option) any later version
17de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard
18de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   or both in parallel, as here.
19de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard
20de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   elfutils is distributed in the hope that it will be useful, but
21361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper   WITHOUT ANY WARRANTY; without even the implied warranty of
22361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper   General Public License for more details.
24361df7da6dfecd817b27e62b91752ac316d7cdd4Ulrich Drepper
25de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   You should have received copies of the GNU General Public License and
26de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   the GNU Lesser General Public License along with this program.  If
27de2ed97f33139af5c7a0811e4ec66fc896a13cf2Mark Wielaard   not, see <http://www.gnu.org/licenses/>.  */
28e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath
29e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath#ifdef HAVE_CONFIG_H
30e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath# include <config.h>
31e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath#endif
32e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath
33e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath#include <inttypes.h>
34e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath#include <libeblP.h>
35e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath
36e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath
37e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrathbool
381ccdfb683ad6c7e59793136c3a657ddf131cafd1Mark Wielaardebl_check_special_symbol (Ebl *ebl, GElf_Ehdr *ehdr, const GElf_Sym *sym,
391ccdfb683ad6c7e59793136c3a657ddf131cafd1Mark Wielaard			  const char *name, const GElf_Shdr *destshdr)
40e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath{
41e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath  if (ebl == NULL)
42e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath    return false;
43e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath
44c5c33a6a2ce5ea400ac5d06b3c2f15808f68b803Ulrich Drepper  return ebl->check_special_symbol (ebl->elf, ehdr, sym, name, destshdr);
45e40782135b18803f3df8b7ad5ffb5f2134c00bcaRoland McGrath}
46