public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "luofengwc at qq dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
Date: Mon, 29 Jan 2024 01:39:16 +0000	[thread overview]
Message-ID: <bug-31302-131-EmXMgqwLGn@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-31302-131@http.sourceware.org/bugzilla/>

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.

  parent reply	other threads:[~2024-01-29  1:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-31302-131-EmXMgqwLGn@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).