Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elf: fix parsing of notes after patchelf mangling #3111

Merged
merged 2 commits into from
May 11, 2020

Commits on May 8, 2020

  1. elf: fix parsing of notes after patchelf mangling

    We cannot rely on iterating on the notes via the note segment.
    Patchelf may move note sections into other segments, and worse
    yet, possibly leave the note segment standing with invalid data.
    Here we instead iterate over each section and (more) reliably
    gather the note information.
    
    There is some improvement that should be done on the patchelf
    side, as `readelf` complains on these binaries, and other issues
    have surfaced in the past (e.g. mesa in classic snaps).  However,
    this will hopefully address snapcraft build-time issues with not
    only our patched files for classic snaps, but externally patched
    binaries that are being packaged.
    
    Add a couple of developer logs to indicate when we are parsing
    an ELF, so future investigations are easier when something explodes.
    
    Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
    Chris Patterson committed May 8, 2020
    Configuration menu
    Copy the full SHA
    b9d0051 View commit details
    Browse the repository at this point in the history

Commits on May 11, 2020

  1. get section by name and check for SHT_NOBITS

    Signed-off-by: Chris Patterson <chris.patterson@canonical.com>
    Chris Patterson committed May 11, 2020
    Configuration menu
    Copy the full SHA
    ed0a3b7 View commit details
    Browse the repository at this point in the history