[llvm-bugs] [Bug 40818] New: --compress-debug-sections causes loss of symbols and invalid relocations

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 22 03:51:34 PST 2019


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

            Bug ID: 40818
           Summary: --compress-debug-sections causes loss of symbols and
                    invalid relocations
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          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's entirely reasonable to have a relocation targeting a section symbol in the
debug sections. However, I just discovered that if you run
--compress-debug-sections on an ELF containing such a reference, it succeeds,
but the symbols are lost. This can potentially lead to relocations with invalid
or incorrect symbol references.

This bug is blocking me landing https://reviews.llvm.org/D58510, because one of
the tests updated in that change references such a symbol, whereas before it
was (probably unintentionally) not referencing any symbol at all.

I also think it essentially renders --compress-debug-sections useless in any
real case.

-- 
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/20190222/ab423515/attachment.html>


More information about the llvm-bugs mailing list