File: reloc-private.h

package info (click to toggle)
libi8x 0.0.5-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 7,192 kB
  • ctags: 1,365
  • sloc: ansic: 6,874; python: 1,339; makefile: 146; sh: 102
file content (42 lines) | stat: -rw-r--r-- 1,456 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* Copyright (C) 2016-17 Red Hat, Inc.
   This file is part of the Infinity Note Execution Library.

   The Infinity Note Execution Library is free software; you can
   redistribute it and/or modify it under the terms of the GNU Lesser
   General Public License as published by the Free Software
   Foundation; either version 2.1 of the License, or (at your option)
   any later version.

   The Infinity Note Execution Library is distributed in the hope that
   it will be useful, but WITHOUT ANY WARRANTY; without even the
   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
   PURPOSE.  See the GNU Lesser General Public License for more
   details.

   You should have received a copy of the GNU Lesser General Public
   License along with the Infinity Note Execution Library; if not, see
   <http://www.gnu.org/licenses/>.  */

#ifndef _RELOC_PRIVATE_H_
#define _RELOC_PRIVATE_H_

#include <libi8x.h>

/* Symbol references.  */

struct i8x_reloc
{
  I8X_OBJECT_FIELDS;

  ssize_t srcoffset;		/* Offset in the file this came from.  */
  uintptr_t unrelocated;	/* Unrelocated value.  */

  /* A very primitive cache, keyed by the inferior that looked up
     the value.  It's liable to frequently be invalid if you have
     more than one inferior, and it prevents i8x_xctx_call from
     being callable simultaneously from multiple threads.  */
  uintptr_t cached_value;
  struct i8x_inf *cached_from;
};

#endif /* _RELOC_PRIVATE_H_ */