New entry point in the transfer vector - bfd_relax_section.
[deliverable/binutils-gdb.git] / bfd / howto.c
1 /* bfd howto manager.
2 Copyright (C) 1990-1991 Free Software Foundation, Inc.
3 Written by Steve Chamberlain of Cygnus Support.
4
5 This file is part of BFD, the Binary File Descriptor library.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
20
21 /* The howto manager
22
23
24 When an application wants to create a relocation, but doesn't know
25 what the target machine might call it, it can find out by using this
26 bit of code.
27
28 */
29
30 #include <sysdep.h>
31 #include <bfd.h>
32 #include "libbfd.h"
33 /*proto* bfd_reloc_code_enum_type
34
35 *+++
36
37 $typedef enum
38 ${
39
40 16 bits wide, simple reloc
41
42 $ BFD_RELOC_16,
43
44 8 bits wide, but used to form an address like 0xffnn
45
46 $ BFD_RELOC_8_FFnn,
47
48 8 bits wide, simple
49
50 $ BFD_RELOC_8,
51
52 8 bits wide, pc relative
53
54 $ BFD_RELOC_8_PCREL
55 $ } bfd_reloc_code_enum_real_type;
56
57 *---
58
59 */
60
61
62
63 /*proto* bfd_reloc_type_lookup
64 This routine returns a pointer to a howto struct which when invoked,
65 will perform the supplied relocation on data from the architecture
66 noted.
67
68 [Note] This function will go away.
69
70 *; PROTO(struct reloc_howto_struct *,
71 bfd_reloc_type_lookup,
72 (enum bfd_architecture arch, bfd_reloc_code_enum_type code));
73 */
74
75
76 struct reloc_howto_struct *
77 DEFUN(bfd_reloc_type_lookup,(arch, code),
78 enum bfd_architecture arch AND
79 bfd_reloc_code_enum_type code)
80 {
81 return arch_functions(arch,0)->reloc_type_lookup(code);
82 }
83
84
85
This page took 0.031077 seconds and 4 git commands to generate.