blob: afe853bb0456df96051c6ca4129ea8d1ed6cacef [file] [log] [blame]
Ulrich Drepperb08d5a82005-07-26 05:00:05 +00001/* Copyright (C) 2002 Red Hat, Inc.
2 Written by Ulrich Drepper <drepper@redhat.com>, 2002.
3
4 This program is Open Source software; you can redistribute it and/or
5 modify it under the terms of the Open Software License version 1.0 as
6 published by the Open Source Initiative.
7
8 You should have received a copy of the Open Software License along
9 with this program; if not, you may obtain a copy of the Open Software
10 License version 1.0 from http://www.opensource.org/licenses/osl.php or
11 by writing the Open Source Initiative c/o Lawrence Rosen, Esq.,
12 3001 King Ranch Road, Ukiah, CA 95482. */
13
14#ifdef HAVE_CONFIG_H
15# include <config.h>
16#endif
17
18#include <libelf.h>
19#include <stdio.h>
20
21
22static int
23check (const char *name, unsigned long int expected)
24{
25 unsigned long int actual = elf_hash (name);
26
27 return actual != expected;
28}
29
30
31int
32main (void)
33{
34 int status;
35
36 /* Check some names. We know what the expected result is. */
37 status = check ("_DYNAMIC", 165832675);
38 status |= check ("_GLOBAL_OFFSET_TABLE_", 102264335);
39
40 return status;
41}