[llvm-bugs] [Bug 41005] New: Preserve unlabelled space within segments

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 8 03:27:33 PST 2019


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

            Bug ID: 41005
           Summary: Preserve unlabelled space within segments
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-objcopy
          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

It is perfectly legitimate to have useful data within a segment, which is not
covered by a section. This could be because the section header table has been
stripped via --strip-sections, for example. We should preserve this space. That
will make --strip-sections idempotent (as things stand, running
--strip-sections on an input, and again on the output will result in the file
being full of zeroes, except for the ELF header and program header table).

We should probably not preserve the data for any sections that are explicitly
stripped in the same operation. These should probably be replaced with zeroes,
or possibly trap or nop bytes, if the segment is exeutable. That will allow
users to blank out the contents of a section in the ELF, which there are
sometimes good reasons for, even if the ELF is no longer executable.

-- 
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/20190308/7a15f74d/attachment-0001.html>


More information about the llvm-bugs mailing list