bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/14088] New: Strange addend from readelf


From: hjl.tools at gmail dot com
Subject: [Bug binutils/14088] New: Strange addend from readelf
Date: Thu, 10 May 2012 03:57:54 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=14088

             Bug #: 14088
           Summary: Strange addend from readelf
           Product: binutils
           Version: 2.23 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: address@hidden
        ReportedBy: address@hidden
    Classification: Unclassified


On Linux/x86-64, I got

address@hidden runtime]$ cat tst-quadmod2.S
#define BIAS -0x7fff0000

    .section    .data.rel.local,"aw",@progbits
    .align 8
.Ljmp:
    .quad    func + BIAS
    .text
    .type    func, @function
func:
    .cfi_startproc
    xorl    %edi, %edi
    jmp    address@hidden
    .cfi_endproc
    .size    func, .-func
    .globl    foo
    .type    foo, @function
foo:
    .cfi_startproc
    .cfi_def_cfa_register 6
    movq    .Ljmp(%rip), %rax
    subq    $BIAS, %rax
    jmp    *%rax
    .cfi_endproc
    .size    foo, .-foo
address@hidden runtime]$ make libtst-quadmod2.so
gcc -B./ -c -g -o tst-quadmod2.o tst-quadmod2.S
./ld -shared  -o libtst-quadmod2.so tst-quadmod2.o
address@hidden runtime]$ readelf -r libtst-quadmod2.so

Relocation section '.rela.dyn' at offset 0x1e8 contains 1 entries:
  Offset          Info           Type           Sym. Value    Sym. Name +
Addend
0000002003f8  000000000008 R_X86_64_RELATIVE                   
ffffffff80010240

Relocation section '.rela.plt' at offset 0x200 contains 1 entries:
  Offset          Info           Type           Sym. Value    Sym. Name +
Addend
0000002003f0  000600000007 R_X86_64_JUMP_SLO 0000000000000000 exit + 0

Addend for R_X86_64_RELATIVE is a negative number. But it is displayed
as an address.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]