[llvm-bugs] [Bug 45235] New: [llvm-readelf] - Relocation addends printed style does not match GNU readelf

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 18 04:30:06 PDT 2020


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

            Bug ID: 45235
           Summary: [llvm-readelf] - Relocation addends printed style does
                    not match GNU readelf
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llvm-readobj
          Assignee: unassignedbugs at nondot.org
          Reporter: grimar at accesssoftek.com
                CC: jh7370.2008 at my.bristol.ac.uk, llvm-bugs at lists.llvm.org

This is based on the test case from D75671.

Imagine we have an object with relocations:

(A piece of YAML)
    Relocations:
## Addend == first negative int64 == -1.
      - Addend: 0xffffffffffffffff
        Type:   R_X86_64_NONE
## Addend == min possible int64 == 0x8000000000000000.
      - Addend: 0x8000000000000000
        Type:   R_X86_64_NONE
## Addend == an arbitrary negative number.
      - Addend: 0xFFFFFFFFFFFFCFC7 ## -12345
        Type:   R_X86_64_NONE

Currently, we print:

Type          Symbol's Value  Symbol's Name + Addend
R_X86_64_NONE                                 ffffffffffffffff{{$}}
R_X86_64_NONE                                 8000000000000000{{$}}
R_X86_64_NONE                                 ffffffffffffcfc7{{$}}

But it does not match to the GNU readelf which prints addends differently:
Type          Symbol's Value  Symbol's Name + Addend
R_X86_64_NONE                                 -1
R_X86_64_NONE                                 -8000000000000000
R_X86_64_NONE                                 -3039

Probably we want to be more compatible with GNU.

-- 
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/20200318/89380977/attachment.html>


More information about the llvm-bugs mailing list