bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/4317] New: Undefined symbols in static executable


From: hjl at lucon dot org
Subject: [Bug ld/4317] New: Undefined symbols in static executable
Date: 4 Apr 2007 04:05:56 -0000

bash-3.1$ cat t.c
__thread int x;

int
_start ()
{
  return x;
}
bash-3.1$ make
cc -fPIC -ftls-model=local-dynamic   -c -o t.o t.c
./ld -o foo t.o
nm -u foo
                 U _GLOBAL_OFFSET_TABLE_
                 U __tls_get_addr
bash-3.1$ 

The problem is there is

              /* LD->LE transition:
                 Ensure it is:
                 leaq address@hidden(%rip), %rdi; call address@hidden
                 We change it into:
                 .word 0x6666; .byte 0x66; movl %fs:0, %rax.  */

in elf64-x86-64.c. When the reference to __tls_get_addr is removed, it leaves
undefined symbol in symtab. It is confusing.

-- 
           Summary: Undefined symbols in static executable
           Product: binutils
           Version: 2.18 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: hjl at lucon dot org
                CC: bug-binutils at gnu dot org
GCC target triplet: x86_64-unknown-linux-gnu


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

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