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: unassignedb...@nondot.org
          Reporter: jh7370.2...@my.bristol.ac.uk
                CC: alexander.v.shaposhni...@gmail.com,
                    jake.h.ehrl...@gmail.com,
                    jh7370.2...@my.bristol.ac.uk,
                    llvm-bugs@lists.llvm.org, ruppre...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to