public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/65886] New: [5/6 Regression] External reference in PIE to DSO created with -Wl,-Bsymbolic
@ 2015-04-25 13:45 hjl.tools at gmail dot com
  2015-04-25 13:46 ` [Bug target/65886] " hjl.tools at gmail dot com
                   ` (32 more replies)
  0 siblings, 33 replies; 34+ messages in thread
From: hjl.tools at gmail dot com @ 2015-04-25 13:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65886
           Summary: [5/6 Regression] External reference in PIE to DSO
                    created with -Wl,-Bsymbolic
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com

Copy relocation in PIE is incompatible with DSO created with -Wl,-Bsymbolic:

[hjl@gnu-tools-1 copyreloc-2]$ cat x.c 
extern int a;
extern int *a_p (void);

extern void bar (void);
extern void *bar_p (void);

int main()
{
  if (bar_p () != &bar)
    __builtin_abort();

  if (a_p () != &a)
    __builtin_abort();

  bar ();
  if (a != 30)
    __builtin_abort();
  return 0;
}
[hjl@gnu-tools-1 copyreloc-2]$ cat bar.c
int a;

void
bar ()
{
  a = 30;
}

void *
bar_p ()
{
  return &bar;
}

int *
a_p ()
{
  return &a;
}
[hjl@gnu-tools-1 copyreloc-2]$ make
/export/build/gnu/gcc-5/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-5/build-x86_64-linux/gcc/ -g -O2 -fPIE   -c -o x.o x.c
/export/build/gnu/gcc-5/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-5/build-x86_64-linux/gcc/ -g -O2 -fPIC   -c -o bar.o
bar.c
/export/build/gnu/gcc-5/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-5/build-x86_64-linux/gcc/ -Wl,-Bsymbolic -shared -o
libbar.so bar.o
/export/build/gnu/gcc-5/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-5/build-x86_64-linux/gcc/ -pie -o x x.o libbar.so
-Wl,-rpath,.
./x
Makefile:13: recipe for target 'all' failed
make: *** [all] Aborted (core dumped)
[hjl@gnu-tools-1 copyreloc-2]$


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

end of thread, other threads:[~2015-08-06 18:27 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-25 13:45 [Bug target/65886] New: [5/6 Regression] External reference in PIE to DSO created with -Wl,-Bsymbolic hjl.tools at gmail dot com
2015-04-25 13:46 ` [Bug target/65886] " hjl.tools at gmail dot com
2015-04-25 15:47 ` [Bug target/65886] [5/6 Regression] External reference in PIE incompatible with DSO created by -Wl,-Bsymbolic hjl.tools at gmail dot com
2015-04-25 16:33 ` hjl.tools at gmail dot com
2015-04-25 16:51 ` [Bug target/65886] [5/6 Regression] Copy reloc " thiago at kde dot org
2015-04-25 17:06 ` hjl.tools at gmail dot com
2015-04-25 17:08 ` hjl.tools at gmail dot com
2015-04-25 17:25 ` hjl.tools at gmail dot com
2015-04-25 17:30 ` thiago at kde dot org
2015-04-25 17:37 ` hjl.tools at gmail dot com
2015-04-25 17:42 ` hjl.tools at gmail dot com
2015-04-27  9:05 ` rguenth at gcc dot gnu.org
2015-04-27 12:14 ` jakub at gcc dot gnu.org
2015-04-27 12:22 ` hjl.tools at gmail dot com
2015-04-27 12:37 ` jakub at gcc dot gnu.org
2015-04-27 12:44 ` hjl.tools at gmail dot com
2015-04-27 13:14 ` hjl.tools at gmail dot com
2015-04-27 13:51 ` jakub at gcc dot gnu.org
2015-04-27 19:18 ` thiago at kde dot org
2015-04-29 19:05 ` hjl.tools at gmail dot com
2015-04-29 19:06 ` hjl.tools at gmail dot com
2015-05-05 15:03 ` thiago at kde dot org
2015-05-05 15:09 ` hjl.tools at gmail dot com
2015-05-05 15:12 ` jakub at gcc dot gnu.org
2015-05-05 15:14 ` jakub at gcc dot gnu.org
2015-05-05 15:38 ` hjl.tools at gmail dot com
2015-05-05 15:47 ` jakub at gcc dot gnu.org
2015-05-05 15:48 ` thiago at kde dot org
2015-05-05 15:54 ` thiago at kde dot org
2015-06-30 10:32 ` rguenth at gcc dot gnu.org
2015-07-16  9:17 ` rguenth at gcc dot gnu.org
2015-08-06 18:06 ` thiago at kde dot org
2015-08-06 18:24 ` hjl.tools at gmail dot com
2015-08-06 18:27 ` thiago at kde dot org

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