bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: crashes with nested archives


From: Nick Clifton
Subject: Re: crashes with nested archives
Date: Wed, 05 May 2004 15:59:12 +0100
User-agent: Mozilla Thunderbird 0.5 (X11/20040208)

Hi Mikulas,

Binutils-2.14 have serious problems when processing archives containing
other archives.

Thanks for bringing this to our attention. I hope that you do not mind, but there are a couple of problems with your proposed patch:

* It is not clear to me how nested archives can be successfully used. I tried a simplest test like this:

   gcc hello-world.c -c -o file1.o
   cp file1.o file2.o
   cp file1.o file3.o
   cp file1.o file4.o
   ar cr lib1.a file1.o file2.o
   ar cr lib2.a file3.o file4.o
   ar cr lib3.a  lib1.a lib2.s
  objdump -p lib3.a
  In archive lib3.a:
    objdump: lib1.a: File format not recognized
    objdump: lib2.a: File format not recognized

So in order to proceed with fixing this bug we definitely need a test case that can reproduce the problem.

* The patch assumes that there will only be one level of nested archives. Instead it should recurse until there are no more nested archive levels to process.

* The patch to bfd_generic_openr_next_archived_file() puts the new code *after* filestart has been aligned to an even byte boundary. It ought to be *before* the alignment.

* It would be helpful if you could include a ChangeLog entry for the patch as well.

I hope that you will consider resubmitting your patch with these points addressed.

Cheers
 Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]