Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1763)

Unified Diff: bfd/xsym.c

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bfd/xcofflink.c ('k') | bfd/xtensa-isa.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bfd/xsym.c
diff --git a/bfd/xsym.c b/bfd/xsym.c
index e0819a9b1a8249854c28b8a4893128a978c6e9a8..5000f83195a7dbfdb4eae443ef960308fe569572 100644
--- a/bfd/xsym.c
+++ b/bfd/xsym.c
@@ -2249,32 +2249,26 @@ bfd_sym_scan (bfd *abfd, bfd_sym_version version, bfd_sym_data_struct *mdata)
const bfd_target *
bfd_sym_object_p (bfd *abfd)
{
- struct bfd_preserve preserve;
bfd_sym_version version = -1;
+ bfd_sym_data_struct *mdata;
- preserve.marker = NULL;
bfd_seek (abfd, 0, SEEK_SET);
if (bfd_sym_read_version (abfd, &version) != 0)
goto wrong;
- preserve.marker = bfd_alloc (abfd, sizeof (bfd_sym_data_struct));
- if (preserve.marker == NULL
- || ! bfd_preserve_save (abfd, &preserve))
+ mdata = (bfd_sym_data_struct *) bfd_alloc (abfd, sizeof (*mdata));
+ if (mdata == NULL)
goto fail;
- if (bfd_sym_scan (abfd, version,
- (bfd_sym_data_struct *) preserve.marker) != 0)
+ if (bfd_sym_scan (abfd, version, mdata) != 0)
goto wrong;
- bfd_preserve_finish (abfd, &preserve);
return abfd->xvec;
wrong:
bfd_set_error (bfd_error_wrong_format);
fail:
- if (preserve.marker != NULL)
- bfd_preserve_restore (abfd, &preserve);
return NULL;
}
« no previous file with comments | « bfd/xcofflink.c ('k') | bfd/xtensa-isa.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698