[llvm-bugs] [Bug 44257] New: For SHT_REL relocations, read addend from code or don't display it

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Dec 9 07:47:41 PST 2019


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

            Bug ID: 44257
           Summary: For SHT_REL relocations, read addend from code or
                    don't display it
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-readobj
          Assignee: unassignedbugs at nondot.org
          Reporter: jh7370.2008 at my.bristol.ac.uk
                CC: jh7370.2008 at my.bristol.ac.uk, llvm-bugs at lists.llvm.org

In LLVM-style output, when dumping an ELF SHT_REL section using --relocations,
a field that is presumably intended to be the addend is printed, but always has
the value 0. For such relocations, the addend is stored in the code being
patched, so either llvm-readobj should read the addend from there, or it should
not print the addend at all (GNU style does the latter).

Example output:
0x9 R_X86_64_64 rel_64 0x0

Expected output either:
0x9 R_X86_64_64 rel_64 0x1234567890ABCDEF
or simply:
0x9 R_X86_64_64 rel_64

-- 
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/20191209/ff3853be/attachment.html>


More information about the llvm-bugs mailing list