public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/46861] New: alpha gcc 4.2 -fPIC visibility hidden => gp-relative relocation against dynamic symbol
@ 2010-12-09  6:22 jay.krell at cornell dot edu
  2010-12-09 10:12 ` [Bug target/46861] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jay.krell at cornell dot edu @ 2010-12-09  6:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46861

           Summary: alpha gcc 4.2 -fPIC visibility hidden => gp-relative
                    relocation against dynamic symbol
           Product: gcc
           Version: 4.2.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jay.krell@cornell.edu


I assume this is a known bug in gcc 4.2?
  No repro with 4.5.1.
I worked around it by using a local static signal handler that
calls the real one.


jay@alphalinux:~$ $HOME/gcc-4.5.1/bin/gcc -v -fPIC 1.c 2.c -shared
Target: alphaev5-unknown-linux-gnu
Configured with: /home/jay/src/gcc-4.5.1/configure -prefix=/home/jay/gcc-4.5.1

=> success

jay@alphalinux:~$ gcc -v -fPIC 1.c 2.c -shared
Target: alpha-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.2
--program-suffix=-4.2 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --disable-libssp --with-long-double-128
--enable-checking=release --build=alpha-linux-gnu --host=alpha-linux-gnu
--target=alpha-linux-gnu
Thread model: posix
gcc version 4.2.4 (Debian 4.2.4-6)


/usr/bin/ld: /tmp/ccNIE2XD.o: gp-relative relocation against dynamic symbol
SignalHandler
/usr/bin/ld: /tmp/ccNIE2XD.o: gp-relative relocation against dynamic symbol
SignalHandler
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status

jay@alphalinux:~$ cat 1.c 2.c

#include <signal.h>
void SignalHandler(int signo, siginfo_t *info, void *context)
{
}

#include <string.h>
#include <signal.h>

#pragma GCC visibility push(hidden)

void SignalHandler(int signo, siginfo_t *info, void *context);

void F2(void)
{
  struct sigaction act;
  int r;

  memset(&act, 0, sizeof(act));
  act.sa_sigaction = &SignalHandler;
  sigaction(0, &act, NULL);
}


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

end of thread, other threads:[~2010-12-11  9:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-09  6:22 [Bug target/46861] New: alpha gcc 4.2 -fPIC visibility hidden => gp-relative relocation against dynamic symbol jay.krell at cornell dot edu
2010-12-09 10:12 ` [Bug target/46861] " rguenth at gcc dot gnu.org
2010-12-09 11:21 ` jay.krell at cornell dot edu
2010-12-09 11:43 ` redi at gcc dot gnu.org
2010-12-11  8:47 ` jay.krell at cornell dot edu
2010-12-11  9:40 ` jay.krell at cornell dot edu

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).