[llvm-bugs] [Bug 41126] New: Move sections partially overlapping segments with those segments

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Mar 18 10:27:51 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=41126

            Bug ID: 41126
           Summary: Move sections partially overlapping segments with
                    those segments
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: llvm-objcopy/strip
          Assignee: unassignedbugs at nondot.org
          Reporter: jh7370.2008 at my.bristol.ac.uk
                CC: alexander.v.shaposhnikov at gmail.com,
                    jake.h.ehrlich at gmail.com,
                    jh7370.2008 at my.bristol.ac.uk,
                    llvm-bugs at lists.llvm.org, rupprecht at google.com

This is obviously not likely going to be an issue in practice, but the current
behaviour is still incorrect. There is nothing in the ELF gABI prohibiting any
of the following three ELF layouts:

|-Segment-|
    |-Section-|

    |-Segment-|
|-Section-|

  |-Segment-|
|---Section---|

At the moment, llvm-objcopy moves the section to after the segment, because the
segment is not treated as a parent, i.e. they both become:

|-Segment-|
          |-Section-|

(possibly with some alignment-related padding between Segment and Section).

This is incorrect: it should move the section along with the segment. I'm not
really sure what a suitable fix is for this.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190318/de7e6fbc/attachment.html>


More information about the llvm-bugs mailing list