https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125418

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=34165

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Alexander Monakov from comment #4)
> (In reply to H.J. Lu from comment #3)
> > How can a hidden symbol be undefined?
> 
> It needs to be weak also.

It looks like a linker bug to me:

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

[hjl@gnu-tgl-3 tmp]$ cat x.c
__attribute__((weak))
__attribute__((visibility("hidden")))
__attribute__((tls_model("initial-exec")))
extern __thread int x;

int
main (void)
{
  return x > 30;
}
[hjl@gnu-tgl-3 tmp]$
/export/build/gnu/tools-build/glibc-many/install/compilers/alpha-linux-gnu/bin/alpha-glibc-linux-gnu-gcc
x.c
/export/build/gnu/tools-build/glibc-many/install/compilers/alpha-linux-gnu/alpha-glibc-linux-gnu/bin/ld:
BFD (GNU Binutils) 2.46.50.20260503 assertion fail
/export/build/gnu/tools-build/glibc-many/src/binutils/bfd/elf64-alpha.c:3021
collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core
dumped
compilation terminated.
[hjl@gnu-tgl-3 tmp]$

Reply via email to