[Bug libc/31302] glibc issue about reloc-type R_X86_64_TPOFF64 when llvm build golang project with cgo
luofengwc at qq dot com
sourceware-bugzilla@sourceware.org
Mon Jan 29 01:39:16 GMT 2024
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.
More information about the Glibc-bugs
mailing list