This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

A question about display_archive in binutils


Hi maintainers of binutils,

Greetings from me!

I am reading bintutils code, and come across this commit
(https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=896ca0981329171639b1fe0b934393a79ef4fdfb)
about display_archive function in both nm.c and size.c:

if (last_arfile != NULL)
-       bfd_close (last_arfile);
+       {
+         bfd_close (last_arfile);
+
+         /* PR 17512: file: a244edbc.  */
+         if (last_arfile == arfile)
+           return;
+       }

I am a little confused why there will occur last_arfile is equal
to arfile. So it means bfd_openr_next_archived_file allocates the
same memory in 2 consecutive times?

Thanks very much in advance!

Best Regards
Nan Xiao


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]