summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-05-21 00:57:20 +0000
committerRoland McGrath <roland@gnu.org>2003-05-21 00:57:20 +0000
commita96e92a0338017ceebcd9084e6fef4b5b0371502 (patch)
tree06eee5ea0264d47678b7925173894d05e9ee0fe2
parentaf627aec280d9e941b2d5085faf84d1af04ed4f7 (diff)
downloadgdb-a96e92a0338017ceebcd9084e6fef4b5b0371502.tar.gz
2003-05-19 Roland McGrath <roland@redhat.com>
* elf.c (bfd_elf_bfd_from_remote_memory): New function. * bfd-in.h: Declare it. * bfd-in2.h: Regenerated. * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function. * elf-bfd.h (struct elf_backend_data): New function pointer member elf_backend_bfd_from_remote_memory. (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory): Declare them. * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro. (elfNN_bed): Add that to the initializer.
-rw-r--r--bfd/bfd-in.h1
-rw-r--r--bfd/bfd-in2.h34
2 files changed, 26 insertions, 9 deletions
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index 703f328bfbe..fdf5f1c389e 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -865,3 +865,4 @@ extern void bfd_ticoff_set_section_load_page
extern int bfd_ticoff_get_section_load_page
PARAMS ((struct sec *));
+
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 4f7014e2be6..8df80a00aa4 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1,7 +1,7 @@
-/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
- generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
- "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
- "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
+/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
+ generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
+ "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
+ "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
"linker.c" and "simple.c".
Run "make headers" in your build bfd/ to regenerate. */
@@ -701,6 +701,22 @@ extern long bfd_get_elf_phdr_upper_bound
extern int bfd_get_elf_phdrs
PARAMS ((bfd *abfd, void *phdrs));
+/* Create a new BFD as if by bfd_openr. Rather than opening a file,
+ reconstruct an ELF file by reading the segments out of remote memory
+ based on the ELF file header at EHDR_VMA and the ELF program headers it
+ points to. If not null, *LOADBASEP is filled in with the difference
+ between the VMAs from which the segments were read, and the VMAs the
+ file headers (and hence BFD's idea of each section's VMA) put them at.
+
+ The function TARGET_READ_MEMORY is called to copy LEN bytes from the
+ remote memory at target address VMA into the local buffer at MYADDR; it
+ should return zero on success or an `errno' code on failure. TEMPL must
+ be a BFD for an ELF target with the word size and byte order found in
+ the remote memory. */
+extern bfd *bfd_elf_bfd_from_remote_memory
+ PARAMS ((bfd *templ, bfd_vma ehdr_vma, bfd_vma *loadbasep,
+ int (*target_read_memory) (bfd_vma vma, char *myaddr, int len)));
+
/* Return the arch_size field of an elf bfd, or -1 if not elf. */
extern int bfd_get_arch_size
PARAMS ((bfd *));
@@ -1776,7 +1792,7 @@ enum bfd_architecture
#define bfd_mach_msp43 43
#define bfd_mach_msp44 44
#define bfd_mach_msp15 15
-#define bfd_mach_msp16 16
+#define bfd_mach_msp16 16
bfd_arch_xtensa, /* Tensilica's Xtensa cores. */
#define bfd_mach_xtensa 1
bfd_arch_last
@@ -3464,14 +3480,14 @@ instruction opcode. */
BFD_RELOC_XTENSA_OP1,
BFD_RELOC_XTENSA_OP2,
-/* Xtensa relocation to mark that the assembler expanded the
+/* Xtensa relocation to mark that the assembler expanded the
instructions from an original target. The expansion size is
encoded in the reloc size. */
BFD_RELOC_XTENSA_ASM_EXPAND,
-/* Xtensa relocation to mark that the linker should simplify
-assembler-expanded instructions. This is commonly used
-internally by the linker after analysis of a
+/* Xtensa relocation to mark that the linker should simplify
+assembler-expanded instructions. This is commonly used
+internally by the linker after analysis of a
BFD_RELOC_XTENSA_ASM_EXPAND. */
BFD_RELOC_XTENSA_ASM_SIMPLIFY,
BFD_RELOC_UNUSED };