1 /* BFD back-end data structures for ELF files.
2 Copyright (C) 1992, 1993 Free Software Foundation, Inc.
3 Written by Cygnus Support.
5 This file is part of BFD, the Binary File Descriptor library.
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.
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.
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. */
24 #include "elf/common.h"
25 #include "elf/internal.h"
26 #include "elf/external.h"
31 Elf_Internal_Sym internal_elf_sym
;
32 Elf_External_Sym native_elf_sym
;
33 /* these are used for the generation of .stabX symbols (?) */
39 struct elf_backend_data
{
40 void (*elf_info_to_howto
) PARAMS ((bfd
*, arelent
*, Elf_Internal_Rela
*));
41 enum bfd_architecture arch
;
43 /* @@ I really don't think this should be here. I don't know what
44 global_sym is supposed to be used for, but I doubt it's something
45 that would be considered global, e.g., if you've got a program
46 reading and writing many BFDs. My hunch is that it's specific to
47 the output BFD. If not, put a comment here explaining why. */
48 elf_symbol_type
*global_sym
;
51 extern bfd_target
*elf_object_p
PARAMS ((bfd
*));
52 extern bfd_target
*elf_core_file_p
PARAMS ((bfd
*));
53 extern boolean elf_mkobject
PARAMS ((bfd
*));
54 extern boolean elf_write_object_contents
PARAMS ((bfd
*));
55 extern char *elf_core_file_failing_command
PARAMS ((bfd
*));
56 extern int elf_core_file_failing_signal
PARAMS ((bfd
*));
57 extern boolean elf_core_file_matches_executable_p
PARAMS ((bfd
*, bfd
*));
58 extern boolean elf_set_section_contents
PARAMS ((bfd
*, sec_ptr
, PTR
,
59 file_ptr
, bfd_size_type
));
60 extern unsigned int elf_get_symtab_upper_bound
PARAMS ((bfd
*));
61 extern unsigned int elf_get_symtab
PARAMS ((bfd
*, asymbol
**));
62 extern unsigned int elf_get_reloc_upper_bound
PARAMS ((bfd
*, sec_ptr
));
63 extern unsigned int elf_canonicalize_reloc
PARAMS ((bfd
*, sec_ptr
,
64 arelent
**, asymbol
**));
65 extern asymbol
*elf_make_empty_symbol
PARAMS ((bfd
*));
66 extern void elf_print_symbol
PARAMS ((bfd
*, PTR
, asymbol
*,
67 bfd_print_symbol_type
));
68 extern void elf_get_symbol_info
PARAMS ((bfd
*, asymbol
*,
70 extern alent
*elf_get_lineno
PARAMS ((bfd
*, asymbol
*));
71 extern boolean elf_set_arch_mach
PARAMS ((bfd
*, enum bfd_architecture
,
73 extern boolean elf_find_nearest_line
PARAMS ((bfd
*, asection
*, asymbol
**,
74 bfd_vma
, CONST
char **,
75 CONST
char **, unsigned int *));
76 extern int elf_sizeof_headers
PARAMS ((bfd
*, boolean
));
78 /* If the target doesn't have reloc handling written yet: */
79 extern void elf_no_info_to_howto
PARAMS ((bfd
*, arelent
*,
80 Elf_Internal_Rela
*));
82 #endif /* _LIBELF_H_ */