Commits on Source 3

  • Marc Herbert's avatar
    Revert "Don't assume all files called ".a" are ELF binaries because we... · a8a56dbe
    Marc Herbert authored and Chris Lamb's avatar Chris Lamb committed
    
    Revert "Don't assume all files called ".a" are ELF binaries because we specified a FILE_EXTENSION_SUFFIX. This prevents an "Unrecognized archive format" traceback when processing (for example) lie 2.2.2+dfsg-3. (Closes: #903446)"
    
    This reverts commit cd4c6423 in preparation for
    fixing issue #64.
    
    Signed-off-by: Chris Lamb's avatarChris Lamb <lamby@debian.org>
    
    Gbp-Dch: ignore
    a8a56dbe
  • Marc Herbert's avatar
    Remove StaticLibFile in the ELF comparator; ArFile.compare_details() is... · ce6c03fe
    Marc Herbert authored and Chris Lamb's avatar Chris Lamb committed
    
    Remove StaticLibFile in the ELF comparator; ArFile.compare_details() is superior. (Closes: #64)
    
    Remove the old code in the StaticLibFile class as it now duplicates the
    recursion in ArFile.compare_details() in a much inferior way. Fixes issue #64,
    see the multiple use cases there and in the next commit adding tests.
    
    The patch header line in the test output is decremented one line because when
    run on .a files readelf inserted headings like this:
    
      In archive test1.a:
    
    Signed-off-by: Chris Lamb's avatarChris Lamb <lamby@debian.org>
    ce6c03fe
  • Marc Herbert's avatar
    Add new elfmix.a ELF test file with a range of different file types. · bee2a11e
    Marc Herbert authored and Chris Lamb's avatar Chris Lamb committed
    
    
    Now that StaticLibFile is out of the way, show off ArFile's recursive
    ability to:
    
    - not care about the .a suffix and not behave differently depending on
      filenames;
    - not crash and lose everything when some archive members are not ELF;
    - gracefully fall back and run the next best tool for a cross-compiled
      ELF and a sample of non-ELF members - including the corresponding .c
      source.
    
    Tests issue #64, see more details there.
    
    In addition to the .c source file, the regen_elfmix.sh script that generated
    the .a files is embedded in the .a files themselves if ever needed. For
    size considerations no cross-compiler is provided.
    
    Signed-off-by: Chris Lamb's avatarChris Lamb <lamby@debian.org>
    
    Gbp-Dch: ignore
    bee2a11e
Loading
Loading