public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo,
@ 2024-01-28  0:45 luofengwc at qq dot com
  2024-01-28  0:48 ` [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo luofengwc at qq dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: luofengwc at qq dot com @ 2024-01-28  0:45 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 31302
           Summary: glibc issue about reloc-type R_X86_64_TPOFF64 when
                    llvm build golang project with cgo,
           Product: glibc
           Version: 2.38
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: luofengwc at qq dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

hi i want to report glibc issue when i use llvm, the following is detail:

when clang build golang on x86 arch, and use cgo function, build to static
linked exec, exec will segment fault. 

this is demo.go:

package main
// #cgo LDFLAGS: -ldl
// #include <stdlib.h>
// #include <dlfcn.h>
import "C"
import (
 "fmt"
)
func main() {
 fmt.Printf("This is go demo\n")
 C.CString("libsystemd-login.so.0")
 return
}

build static exec command :
export CC=clang
CGO_ENABLED=1 CGO_CFLAGS="-fstack-protector-strong -fPIE"
CGO_CPPFLAGS="-fstack-protector-strong -fPIE"
CGO_LDFLAGS_ALLOW='-Wl,-z,relro,-z,now' CGO_LDFLAGS="-Wl,-z,relro,-z,now
-Wl,-z,noexecstack" go build -buildmode=pie -o demo -ldflags '-buildid=none
-tmpdir=. -extldflags=-ftrapv -extldflags=-Wl,-z,relro,-z,now
-linkmode=external -extldflags=-static-pie' demo.go

and gdb segment fault stack, indicate crash in glibc

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7e835dc in _dl_signal_error ()
(gdb) bt
#0 0x00007ffff7e835dc in _dl_signal_error ()
#1 0x00007ffff7ebf6f3 in _dl_allocate_static_tls ()
#2 0x00007ffff7e843d0 in _dl_relocate_static_pie ()
#3 0x00007ffff7e46b59 in __libc_start_main_impl ()
#4 0x00007ffff7dc4665 in _start ()
when debug, i found clang change the sym relocate type from R_X86_64_GOTTPOFF
to R_X86_64_TPOFF64

readelf -a glibc/dl-error.o | grep R_X86_64_GOTTPOFF
readelf -a demo | grep R_X86_64_TPOFF64
i want to know why glibc does not match this relocation type.

thank you

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
  2024-01-28  0:45 [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo, luofengwc at qq dot com
@ 2024-01-28  0:48 ` luofengwc at qq dot com
  2024-01-28  0:51 ` luofengwc at qq dot com
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: luofengwc at qq dot com @ 2024-01-28  0:48 UTC (permalink / raw)
  To: glibc-bugs

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

luofeng14 <luofengwc at qq dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|glibc issue about           |glibc issue about
                   |reloc-type R_X86_64_TPOFF64 |reloc-type R_X86_64_TPOFF64
                   |when llvm build golang      |when llvm build golang
                   |project with cgo,           |project with cgo

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
  2024-01-28  0:45 [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo, luofengwc at qq dot com
  2024-01-28  0:48 ` [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo luofengwc at qq dot com
@ 2024-01-28  0:51 ` luofengwc at qq dot com
  2024-01-28  1:23 ` luofengwc at qq dot com
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: luofengwc at qq dot com @ 2024-01-28  0:51 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #1 from luofeng14 <luofengwc at qq dot com> ---
if go build doesnt use -static-pie, it runs success.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
  2024-01-28  0:45 [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo, luofengwc at qq dot com
  2024-01-28  0:48 ` [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo luofengwc at qq dot com
  2024-01-28  0:51 ` luofengwc at qq dot com
@ 2024-01-28  1:23 ` luofengwc at qq dot com
  2024-01-28  8:32 ` sam at gentoo dot org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: luofengwc at qq dot com @ 2024-01-28  1:23 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from luofeng14 <luofengwc at qq dot com> ---
in glibc function _dl_relocate_static_pie(),it will check the tls size,but tls
size has initialed yet

related macro and function:
CHECK_STATIC_TLS()
init_tls_size()

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
  2024-01-28  0:45 [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo, luofengwc at qq dot com
                   ` (2 preceding siblings ...)
  2024-01-28  1:23 ` luofengwc at qq dot com
@ 2024-01-28  8:32 ` sam at gentoo dot org
  2024-01-28 19:30 ` fweimer at redhat dot com
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: sam at gentoo dot org @ 2024-01-28  8:32 UTC (permalink / raw)
  To: glibc-bugs

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

Sam James <sam at gentoo dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gentoo dot org

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
  2024-01-28  0:45 [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo, luofengwc at qq dot com
                   ` (3 preceding siblings ...)
  2024-01-28  8:32 ` sam at gentoo dot org
@ 2024-01-28 19:30 ` fweimer at redhat dot com
  2024-01-29  1:16 ` luofengwc at qq dot com
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: fweimer at redhat dot com @ 2024-01-28 19:30 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
Which linker are you using?

It is possible that for static PIE, we assume that the link editor is able to
fully relax TLS relocations, that is, compute fixed constants and put them into
the data segment or directly into the code (after instruction relaxation).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
  2024-01-28  0:45 [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo, luofengwc at qq dot com
                   ` (4 preceding siblings ...)
  2024-01-28 19:30 ` fweimer at redhat dot com
@ 2024-01-29  1:16 ` luofengwc at qq dot com
  2024-01-29  1:23 ` luofengwc at qq dot com
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: luofengwc at qq dot com @ 2024-01-29  1:16 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #4 from luofeng14 <luofengwc at qq dot com> ---
(In reply to Florian Weimer from comment #3)
> Which linker are you using?
> 
> It is possible that for static PIE, we assume that the link editor is able
> to fully relax TLS relocations, that is, compute fixed constants and put
> them into the data segment or directly into the code (after instruction
> relaxation).

i use go build -x, it print the extld is clang, when i chang extld = gcc, it
runs success.

/usr/lib/golang/pkg/tool/linux_amd64/link -o $WORK/b001/exe/a.out -importcfg
$WORK/b001/importcfg.link -installsuffix shared -buildmode=pie
-buildid=d4xaXJFWrXP2j7-zXtDh/3XIk6UDso2SczQsnY03H/wEC6IRgel1j8WkFVdesn/d4xaXJFWrXP2j7-zXtDh
-buildid=none -tmpdir=. -extldflags=-ftrapv -extldflags=-Wl,-z,relro,-z,now
-linkmode=external -extldflags=-static-pie -extld=clang
/root/.cache/go-build/39/399acc4b7bd65f1480c7c9fa0834a2240dfb9d7dc277b62a787491dbd1b64ed3-d

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
  2024-01-28  0:45 [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo, luofengwc at qq dot com
                   ` (5 preceding siblings ...)
  2024-01-29  1:16 ` luofengwc at qq dot com
@ 2024-01-29  1:23 ` luofengwc at qq dot com
  2024-01-29  1:33 ` luofengwc at qq dot com
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: luofengwc at qq dot com @ 2024-01-29  1:23 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #5 from luofeng14 <luofengwc at qq dot com> ---
(In reply to Florian Weimer from comment #3)
> Which linker are you using?
> 
> It is possible that for static PIE, we assume that the link editor is able
> to fully relax TLS relocations, that is, compute fixed constants and put
> them into the data segment or directly into the code (after instruction
> relaxation).

and it show some dlerror.o function .rela.dyn section sym relocate type cause
the problem. not the constant

Relocation section '.rela.dyn' at offset 0x85e0 contains 13252 entries:
00000023df28  010b00000012 R_X86_64_TPOFF64  0000000000000078
__libc_dlerror_result + 0
00000023df70  011100000012 R_X86_64_TPOFF64  0000000000000058
__libc_tsd_CTYPE_[...] + 0
00000023dfc0  025700000012 R_X86_64_TPOFF64  0000000000000068
__libc_tsd_CTYPE_B + 0
00000023dfc8  002400000012 R_X86_64_TPOFF64  0000000000000018 __libc_tsd_LOCALE
+ 0
00000023dfe0  023b00000012 R_X86_64_TPOFF64  0000000000000060
__libc_tsd_CTYPE_[...] + 0

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
  2024-01-28  0:45 [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo, luofengwc at qq dot com
                   ` (6 preceding siblings ...)
  2024-01-29  1:23 ` luofengwc at qq dot com
@ 2024-01-29  1:33 ` luofengwc at qq dot com
  2024-01-29  1:39 ` luofengwc at qq dot com
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: luofengwc at qq dot com @ 2024-01-29  1:33 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #6 from luofeng14 <luofengwc at qq dot com> ---
(In reply to luofeng14 from comment #5)
> (In reply to Florian Weimer from comment #3)
> > Which linker are you using?
> > 
> > It is possible that for static PIE, we assume that the link editor is able
> > to fully relax TLS relocations, that is, compute fixed constants and put
> > them into the data segment or directly into the code (after instruction
> > relaxation).
> 
> and it show some dlerror.o function .rela.dyn section sym relocate type
> cause the problem. not the constant
> 
> Relocation section '.rela.dyn' at offset 0x85e0 contains 13252 entries:
> 00000023df28  010b00000012 R_X86_64_TPOFF64  0000000000000078
> __libc_dlerror_result + 0
> 00000023df70  011100000012 R_X86_64_TPOFF64  0000000000000058
> __libc_tsd_CTYPE_[...] + 0
> 00000023dfc0  025700000012 R_X86_64_TPOFF64  0000000000000068
> __libc_tsd_CTYPE_B + 0
> 00000023dfc8  002400000012 R_X86_64_TPOFF64  0000000000000018
> __libc_tsd_LOCALE + 0
> 00000023dfe0  023b00000012 R_X86_64_TPOFF64  0000000000000060
> __libc_tsd_CTYPE_[...] + 0


sorry,  ____libc_dlerror_result is var not function;

thread struct dl_action_result *__libc_dlerror_result

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
  2024-01-28  0:45 [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo, luofengwc at qq dot com
                   ` (7 preceding siblings ...)
  2024-01-29  1:33 ` luofengwc at qq dot com
@ 2024-01-29  1:39 ` luofengwc at qq dot com
  2024-01-29  5:50 ` fweimer at redhat dot com
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: luofengwc at qq dot com @ 2024-01-29  1:39 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #7 from luofeng14 <luofengwc at qq dot com> ---
(In reply to luofeng14 from comment #6)
> (In reply to luofeng14 from comment #5)
> > (In reply to Florian Weimer from comment #3)
> > > Which linker are you using?
> > > 
> > > It is possible that for static PIE, we assume that the link editor is able
> > > to fully relax TLS relocations, that is, compute fixed constants and put
> > > them into the data segment or directly into the code (after instruction
> > > relaxation).
> > 
> > and it show some dlerror.o function .rela.dyn section sym relocate type
> > cause the problem. not the constant
> > 
> > Relocation section '.rela.dyn' at offset 0x85e0 contains 13252 entries:
> > 00000023df28  010b00000012 R_X86_64_TPOFF64  0000000000000078
> > __libc_dlerror_result + 0
> > 00000023df70  011100000012 R_X86_64_TPOFF64  0000000000000058
> > __libc_tsd_CTYPE_[...] + 0
> > 00000023dfc0  025700000012 R_X86_64_TPOFF64  0000000000000068
> > __libc_tsd_CTYPE_B + 0
> > 00000023dfc8  002400000012 R_X86_64_TPOFF64  0000000000000018
> > __libc_tsd_LOCALE + 0
> > 00000023dfe0  023b00000012 R_X86_64_TPOFF64  0000000000000060
> > __libc_tsd_CTYPE_[...] + 0
> 
> 
> sorry,  ____libc_dlerror_result is var not function;
> 
> thread struct dl_action_result *__libc_dlerror_result

 (In reply to luofeng14 from comment #6)
> (In reply to luofeng14 from comment #5)
> > (In reply to Florian Weimer from comment #3)
> > > Which linker are you using?
> > > 
> > > It is possible that for static PIE, we assume that the link editor is able
> > > to fully relax TLS relocations, that is, compute fixed constants and put
> > > them into the data segment or directly into the code (after instruction
> > > relaxation).
> > 
> > and it show some dlerror.o function .rela.dyn section sym relocate type
> > cause the problem. not the constant
> > 
> > Relocation section '.rela.dyn' at offset 0x85e0 contains 13252 entries:
> > 00000023df28  010b00000012 R_X86_64_TPOFF64  0000000000000078
> > __libc_dlerror_result + 0
> > 00000023df70  011100000012 R_X86_64_TPOFF64  0000000000000058
> > __libc_tsd_CTYPE_[...] + 0
> > 00000023dfc0  025700000012 R_X86_64_TPOFF64  0000000000000068
> > __libc_tsd_CTYPE_B + 0
> > 00000023dfc8  002400000012 R_X86_64_TPOFF64  0000000000000018
> > __libc_tsd_LOCALE + 0
> > 00000023dfe0  023b00000012 R_X86_64_TPOFF64  0000000000000060
> > __libc_tsd_CTYPE_[...] + 0
> 
> 
> sorry,  ____libc_dlerror_result is var not function;
> 
> thread struct dl_action_result *__libc_dlerror_result

and __libc_dlerror_result is not constant

glibc/glibc-2.34/dlfcn/dlerror.c
  49,7:       __libc_dlerror_result = NULL;
  62,7:       __libc_dlerror_result = NULL;
  120,4:          __libc_dlerror_result = NULL;
  153,4:          __libc_dlerror_result = NULL;
  175,8:              __libc_dlerror_result = dl_action_result_malloc_failed;
  178,4:          __libc_dlerror_result = result;

glibc/glibc-2.34/dlfcn/libc_dlerror_result.c
  37,7:       __libc_dlerror_result = NULL;

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
  2024-01-28  0:45 [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo, luofengwc at qq dot com
                   ` (8 preceding siblings ...)
  2024-01-29  1:39 ` luofengwc at qq dot com
@ 2024-01-29  5:50 ` fweimer at redhat dot com
  2024-01-29 11:41 ` luofengwc at qq dot com
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: fweimer at redhat dot com @ 2024-01-29  5:50 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #8 from Florian Weimer <fweimer at redhat dot com> ---
What I meant with constant is that the offset from the thread pointer/%fs is
constant for static PIE, and there is no need for a run-time relocation. This
looks like a missed optimization in lld (if that's what clang is using).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
  2024-01-28  0:45 [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo, luofengwc at qq dot com
                   ` (9 preceding siblings ...)
  2024-01-29  5:50 ` fweimer at redhat dot com
@ 2024-01-29 11:41 ` luofengwc at qq dot com
  2024-01-29 11:43 ` fweimer at redhat dot com
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: luofengwc at qq dot com @ 2024-01-29 11:41 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #9 from luofeng14 <luofengwc at qq dot com> ---

this is glibc main function, the function init_static_tls is after the
_dl_try_allocate_static_tls, this results in CHECK_STATIC_TLS failure,because
dl_tls_static_size not initialled yet:

LIBC_START_MAIN
   _dl_relocate_static_pie (); 
        ELF_DYNAMIC_RELOCATE
                - ELF_DYNAMIC_DO_REL 
                        - _ELF_DYNAMIC_DO_RELOC
                                - elf_dynamic_do_reloc # elf_dynamic_do_##reloc
                                        - elf_dynamic_do_Rela
                                                - elf_dynamic_do_Rel
                                                        - elf_machine_rel
                                                                -
elf_machine_rela
                                                                        case
R_X86_64_TPOFF64:  
                                                                               
CHECK_STATIC_TLS
                                                                               
        _dl_allocate_static_tls
                                                                               
                _dl_try_allocate_static_tls  

   /* Perform IREL{,A} relocations.  */
   ARCH_SETUP_IREL ();
   /* The stack guard goes into the TCB, so initialize it early.  */
   ARCH_SETUP_TLS ();
        x86_setup_tls # define ARCH_SETUP_TLS() x86_setup_tls
                __libc_setup_tls                                                
                        init_static_tls

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
  2024-01-28  0:45 [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo, luofengwc at qq dot com
                   ` (10 preceding siblings ...)
  2024-01-29 11:41 ` luofengwc at qq dot com
@ 2024-01-29 11:43 ` fweimer at redhat dot com
  2024-01-30  1:05 ` luofengwc at qq dot com
  2024-03-15 21:04 ` i at maskray dot me
  13 siblings, 0 replies; 15+ messages in thread
From: fweimer at redhat dot com @ 2024-01-29 11:43 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #10 from Florian Weimer <fweimer at redhat dot com> ---
There should not be any R_X86_64_TPOFF64 relocations left in static PIE because
the link editor can fully resolve  them. This is an lld bug.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
  2024-01-28  0:45 [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo, luofengwc at qq dot com
                   ` (11 preceding siblings ...)
  2024-01-29 11:43 ` fweimer at redhat dot com
@ 2024-01-30  1:05 ` luofengwc at qq dot com
  2024-03-15 21:04 ` i at maskray dot me
  13 siblings, 0 replies; 15+ messages in thread
From: luofengwc at qq dot com @ 2024-01-30  1:05 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #11 from luofeng14 <luofengwc at qq dot com> ---
(In reply to Florian Weimer from comment #10)
> There should not be any R_X86_64_TPOFF64 relocations left in static PIE
> because the link editor can fully resolve  them. This is an lld bug.

sorry, i'm not familiar with relocation type. i would like to ask in which case
R_X86_64_TPOFF64 relocation type would be used.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
  2024-01-28  0:45 [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo, luofengwc at qq dot com
                   ` (12 preceding siblings ...)
  2024-01-30  1:05 ` luofengwc at qq dot com
@ 2024-03-15 21:04 ` i at maskray dot me
  13 siblings, 0 replies; 15+ messages in thread
From: i at maskray dot me @ 2024-03-15 21:04 UTC (permalink / raw)
  To: glibc-bugs

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

Fangrui Song <i at maskray dot me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID
                 CC|                            |i at maskray dot me

--- Comment #12 from Fangrui Song <i at maskray dot me> ---
Not glibc issue.

lld 18 supports R_X86_64_TPOFF64
https://github.com/llvm/llvm-project/issues/85349

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-03-15 21:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-28  0:45 [Bug libc/31302] New: glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo, luofengwc at qq dot com
2024-01-28  0:48 ` [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo luofengwc at qq dot com
2024-01-28  0:51 ` luofengwc at qq dot com
2024-01-28  1:23 ` luofengwc at qq dot com
2024-01-28  8:32 ` sam at gentoo dot org
2024-01-28 19:30 ` fweimer at redhat dot com
2024-01-29  1:16 ` luofengwc at qq dot com
2024-01-29  1:23 ` luofengwc at qq dot com
2024-01-29  1:33 ` luofengwc at qq dot com
2024-01-29  1:39 ` luofengwc at qq dot com
2024-01-29  5:50 ` fweimer at redhat dot com
2024-01-29 11:41 ` luofengwc at qq dot com
2024-01-29 11:43 ` fweimer at redhat dot com
2024-01-30  1:05 ` luofengwc at qq dot com
2024-03-15 21:04 ` i at maskray dot me

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).