bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/27625] New: powerpc64: gold erroneously rejects linking code t


From: bugdal at aerifal dot cx
Subject: [Bug gold/27625] New: powerpc64: gold erroneously rejects linking code that calls __tls_get_addr
Date: Tue, 23 Mar 2021 00:37:55 +0000

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

            Bug ID: 27625
           Summary: powerpc64: gold erroneously rejects linking code that
                    calls __tls_get_addr
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: bugdal at aerifal dot cx
                CC: ian at airs dot com
  Target Milestone: ---

When targeting powerpc64, attempting to link a source file that calls
__tls_get_addr directly (rather than produced as a result of a thread-local
object access with the associated relocations to facilitate relaxation)
produces the message:

"error: __tls_get_addr call lacks marker reloc"

This breaks linking of glibc and musl libc.

The check that's triggering seems to correspond to one lld wrongly added and
then reverted in
https://github.com/llvm/llvm-project/commit/9267caebfa9209e4ae69517043d008d1b83307aa
(see also https://reviews.llvm.org/D92959), which the BFD linker does not do.
Calls to __tls_get_addr are only candidates for relaxation with the appropriate
relocations attached to them; otherwise, they should be treated as normal
function calls and should not produce link errors.

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