aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd-in.h
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1995-11-06 10:08:03 +0000
committerKen Raeburn <raeburn@cygnus>1995-11-06 10:08:03 +0000
commit4fe6d901bd49996a77c84ab710918c94e84e9a23 (patch)
treeefb4a153d072284395fe4dc4d61d88ca61e17782 /bfd/bfd-in.h
parentffacb892eba97f8eb3019ee236fc8ea7e1825718 (diff)
downloadgdb-4fe6d901bd49996a77c84ab710918c94e84e9a23.zip
gdb-4fe6d901bd49996a77c84ab710918c94e84e9a23.tar.gz
gdb-4fe6d901bd49996a77c84ab710918c94e84e9a23.tar.bz2
Changes for mmap; details in change log.
Added some new interfaces, and a new entry in the target vector. Under the new interfaces, mmap will be used if available, otherwise malloc/seek/read, as before. Old interfaces all still intact. Most configurations (including all used by "--enable-targets=all") simply changed to call the default routine for that entry in the target vector. I might've missed some targets only included in special configurations. Support for a.out symbol and string table reading now goes through new interfaces, and will use mmap when available. Linker hooks (e.g., avoiding reallocation under malloc) not ready yet.
Diffstat (limited to 'bfd/bfd-in.h')
-rw-r--r--bfd/bfd-in.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h
index d027196..d69f763 100644
--- a/bfd/bfd-in.h
+++ b/bfd/bfd-in.h
@@ -600,6 +600,28 @@ extern boolean bfd_sunos_size_dynamic_sections
extern boolean bfd_linux_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
+/* mmap hacks */
+
+struct _bfd_window_internal;
+typedef struct _bfd_window_internal bfd_window_internal;
+
+typedef struct _bfd_window {
+ /* What the user asked for. */
+ PTR data;
+ bfd_size_type size;
+ /* The actual window used by BFD. Small user-requested read-only
+ regions sharing a page may share a single window into the object
+ file. Read-write versions shouldn't until I've fixed things to
+ keep track of which portions have been claimed by the
+ application; don't want to give the same region back when the
+ application wants two writable copies! */
+ struct _bfd_window_internal *i;
+} bfd_window;
+
+void bfd_init_window PARAMS ((bfd_window *));
+void bfd_free_window PARAMS ((bfd_window *));
+int bfd_get_file_window PARAMS ((bfd *, file_ptr, bfd_size_type, bfd_window *, int));
+
/* XCOFF support routines for the linker. */
extern boolean bfd_xcoff_link_record_set