A question about display_archive in binutils
Nan Xiao
xiaonan830818@gmail.com
Tue Oct 17 04:29:00 GMT 2017
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
More information about the Binutils
mailing list