[llvm-bugs] [Bug 41832] New: ELF dynamic_relocation_sections treats dynamic tag values as offsets

via llvm-bugs llvm-bugs at lists.llvm.org
Fri May 10 08:29:19 PDT 2019


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

            Bug ID: 41832
           Summary: ELF dynamic_relocation_sections treats dynamic tag
                    values as offsets
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Object
          Assignee: unassignedbugs at nondot.org
          Reporter: jh7370.2008 at my.bristol.ac.uk
                CC: llvm-bugs at lists.llvm.org

The ELF gABI states that the interpretation of DT_REL/DT_RELA/DT_JMPREL is a
d_ptr, which is the virtual address of the appropriate section in the ELF. The
dynamic_relocation_sections method treats them as offsets, which is incorrect.
The address of a section is rarely the same as its offset. This means that
llvm-objdump --dynamic-reloc (the only current client) is broken for most
cases. This hasn't been picked up before because there are no tests for that
feature, as far as I can tell!

-- 
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/20190510/d0fea6b1/attachment-0001.html>


More information about the llvm-bugs mailing list