| 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;
|
| }
|
|
|
|
|