Menu

#583 ELF Tool Chain endianness issues

RELEASE_1_0
new
nobody
None
2020-03-02
2020-02-28
Ed Maste
No

While reviewing and upstreaming ELF Tool Chain changes from FreeBSD I discovered a number of endianness issues that are not yet addressed upstream.

Related

Commit: [r3766]

Discussion

  • Ed Maste

    Ed Maste - 2020-03-01

    It seems I had this unsubmitted in a forgotten browser tab, from shortly after [r3766] was committed (i.e., just after 2019-06-29). It's possible that there have been changes that affect these issues or introduce new ones since.

     

    Related

    Commit: [r3766]

  • Joseph Koshy

    Joseph Koshy - 2020-03-01

    libelf: fix .note conversion for non-native byte order ELF files
    https://reviews.freebsd.org/rS273443

    This change would perform arithmetic on the note header's fields while these are still in their file representation. I'm not sure that is correct.

    A related issue here is that the libelf test suite is missing test cases for Elf note conversions---I did not get around to writing those. I've filed [#584] to keep track of this pending task.

     

    Related

    Tickets: #584

  • Ed Maste

    Ed Maste - 2020-03-02

    Yes, I pasted the wrong rev; FreeBSD r273443 correctly identified the issue but the commit was incorrect; I reverted it and applied the correct fix in https://reviews.freebsd.org/rS275430

     
  • Ed Maste

    Ed Maste - 2020-03-02

    And this first issue is already fixed by [r3158]

     

    Related

    Commit: [r3158]

  • Ed Maste

    Ed Maste - 2020-03-02

    First two are now fixed (2nd by [r3832]). The 3rd group (MIPS) are also related to ticket [#559]. I need to figure out what the right way to handle [r3766] is.

     

    Related

    Commit: [r3766]
    Commit: [r3832]
    Tickets: #559

  • Ed Maste

    Ed Maste - 2020-03-02

    For the readelf the best approach is probably to teach libelf how to translate the ELF notes used by various operating sytems, @jkoshy do you agree?

     
  • Joseph Koshy

    Joseph Koshy - 2020-03-02

    @emaste: yes, that seems the best approach.

     

Log in to post a comment.