bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/19796] New: dynamic relocation missing simbol


From: rafael.espindola at gmail dot com
Subject: [Bug ld/19796] New: dynamic relocation missing simbol
Date: Wed, 09 Mar 2016 13:48:42 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=19796

            Bug ID: 19796
           Summary: dynamic relocation missing simbol
           Product: binutils
           Version: 2.27 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: rafael.espindola at gmail dot com
  Target Milestone: ---

Given
------------------------------
bar:
        movq    %fs:0, %rax
        addq    address@hidden(%rip), %rax
        retq

        .section        .tbss,"awT",@nobits
foo:
        .long   0
----------------------------

running ld.bfd test.o -o test.so -shared

will produce a file with a relocation that points to no symbol:

  Offset          Info           Type           Sym. Value    Sym. Name +
Addend
0000002002e8  000000000012 R_X86_64_TPOFF64                     0

with gold you get the expected result:

  Offset          Info           Type           Sym. Value    Sym. Name +
Addend
000000001348  000100000012 R_X86_64_TPOFF64  0000000000000000 foo + 0


The above assembly is a simplification of

__attribute__((tls_model("initial-exec"))) static __thread int foo;
int *bar() {return &foo; }

-- 
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]