Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
binutils-gdb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastien Michelland
binutils-gdb
Commits
182a0099
Commit
182a0099
authored
19 years ago
by
Alan Modra
Browse files
Options
Downloads
Patches
Plain Diff
* bfdwin.c (bfd_get_file_window): Seek into file in place of
using bfd_cache_lookup.
parent
d00967c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bfd/ChangeLog
+3
-0
3 additions, 0 deletions
bfd/ChangeLog
bfd/bfdwin.c
+8
-5
8 additions, 5 deletions
bfd/bfdwin.c
with
11 additions
and
5 deletions
bfd/ChangeLog
+
3
−
0
View file @
182a0099
2005-10-27 Alan Modra <amodra@bigpond.net.au>
2005-10-27 Alan Modra <amodra@bigpond.net.au>
* bfdwin.c (bfd_get_file_window): Seek into file in place of
using bfd_cache_lookup.
* cache.c (BFD_CACHE_MAX_OPEN): Make private to this file.
* cache.c (BFD_CACHE_MAX_OPEN): Make private to this file.
(bfd_last_cache, bfd_cache_lookup, bfd_cache_lookup_worker): Likewise.
(bfd_last_cache, bfd_cache_lookup, bfd_cache_lookup_worker): Likewise.
* libbfd-in.h (bfd_cache_lookup_worker, bfd_last_cache): Delete.
* libbfd-in.h (bfd_cache_lookup_worker, bfd_last_cache): Delete.
...
...
This diff is collapsed.
Click to expand it.
bfd/bfdwin.c
+
8
−
5
View file @
182a0099
/* Support for memory-mapped windows into a BFD.
/* Support for memory-mapped windows into a BFD.
Copyright 1995, 1996, 2001, 2002, 2003 Free Software Foundation, Inc.
Copyright 1995, 1996, 2001, 2002, 2003, 2005
Free Software Foundation, Inc.
Written by Cygnus Support.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
This file is part of BFD, the Binary File Descriptor library.
...
@@ -144,7 +145,6 @@ bfd_get_file_window (bfd *abfd,
...
@@ -144,7 +145,6 @@ bfd_get_file_window (bfd *abfd,
file_ptr
file_offset
,
offset2
;
file_ptr
file_offset
,
offset2
;
size_t
real_size
;
size_t
real_size
;
int
fd
;
int
fd
;
FILE
*
f
;
/* Find the real file and the real offset into it. */
/* Find the real file and the real offset into it. */
while
(
abfd
->
my_archive
!=
NULL
)
while
(
abfd
->
my_archive
!=
NULL
)
...
@@ -152,10 +152,13 @@ bfd_get_file_window (bfd *abfd,
...
@@ -152,10 +152,13 @@ bfd_get_file_window (bfd *abfd,
offset
+=
abfd
->
origin
;
offset
+=
abfd
->
origin
;
abfd
=
abfd
->
my_archive
;
abfd
=
abfd
->
my_archive
;
}
}
f
=
bfd_cache_lookup
(
abfd
);
if
(
f
==
NULL
)
/* Seek into the file, to ensure it is open if cacheable. */
if
(
abfd
->
iostream
==
NULL
&&
(
abfd
->
iovec
==
NULL
||
abfd
->
iovec
->
bseek
(
abfd
,
offset
,
SEEK_SET
)
!=
0
))
return
FALSE
;
return
FALSE
;
fd
=
fileno
(
f
);
fd
=
fileno
(
(
FILE
*
)
abfd
->
iostream
);
/* Compute offsets and size for mmap and for the user's data. */
/* Compute offsets and size for mmap and for the user's data. */
offset2
=
offset
%
pagesize
;
offset2
=
offset
%
pagesize
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment