• Will Harris's avatar
    Fix courgette ELF x86 dissembler · 3e6fa973
    Will Harris authored
    Courgette cannot parse files that have out of order NOBITS sections and instead
    will crash. The solution to this is to skip them and encode them as raw bytes.
    
    Also, courgette has a bug where it incorrectly emits ElfRelocationInstruction
    instructions even when there are no valid R_386_RELATIVE relocations in the
    file.
    
    Added a test file that exhibits both of these symptoms.
    
    BUG=424820,423925
    TEST=courgette_unittests
    R=dgarrett@chromium.org, tommi@chromium.org
    
    Review URL: https://codereview.chromium.org/664803002
    
    Cr-Commit-Position: refs/heads/master@{#318764}
    3e6fa973
encode_decode_unittest.cc 2.8 KB