File: ptable.h

package info (click to toggle)
gcl27 2.7.1-13
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 30,888 kB
  • sloc: lisp: 211,946; ansic: 52,944; sh: 9,347; makefile: 647; tcl: 53; awk: 52
file content (58 lines) | stat: -rwxr-xr-x 1,295 bytes parent folder | download | duplicates (7)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* format of a rsyms output file:
struct lsymbol_table tab;   gives number of symbols, and sum of length of 
			 strings 
addr,char[],addr,char[],...
This can be read since the addr is sizeof(int) and the char[] is null
terminated, immediately followed by and addr...
there are tab.n_symbols pairs occurring.

*/
#ifndef HEADER_SEEK
#define HEADER_SEEK(x)
#endif


typedef unsigned long addr;

struct node{
  const char *string;
  addr address;
#ifdef AIX3
  unsigned short tc_offset;
#endif  
};

struct lsymbol_table{
  unsigned int n_symbols ;
  unsigned int tot_leng;};

#define SYM_ADDRESS(table,i) table.ptable[i].address
#define SYM_STRING(table,i)  table.ptable[i].string
#define SYM_TC_OFF(table,i) ((*(table).ptable))[i].tc_offset

/* typedef struct node *TABL;  */
/* gcc does not like typedef struct node TABL[];*/

typedef struct node TABL[]; 

struct  string_address_table
{ struct node *ptable;
  unsigned int length;
  struct node *local_ptable;
  unsigned int local_length;
  unsigned int alloc_length;
};

#if !defined(HAVE_LIBBFD) && !defined(SPECIAL_RSYM)
#error Need either BFD or SPECIAL_RSYM
#endif

#ifdef SPECIAL_RSYM
struct string_address_table c_table;
#else
struct bfd_link_info link_info;
#endif
struct string_address_table combined_table;

#define PTABLE_EXTRA 20