[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/20258] New: Internal error with nocopyreloc

From: ian at wienand dot org
Subject: [Bug gold/20258] New: Internal error with nocopyreloc
Date: Tue, 14 Jun 2016 20:36:49 +0000


            Bug ID: 20258
           Summary: Internal error with nocopyreloc
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: ian at wienand dot org
                CC: ian at airs dot com
  Target Milestone: ---

$ cat test.c
extern int foo;

int main(int argc, char *argv[]) {
        foo = 1;

$ cat lib.c
int foo;

$ gcc -shared -o libfoo.so lib.c

$ gcc -Wl,-z,nocopyreloc -o test test.c -L. -lfoo

$ gcc -Wl,-fuse-ld=gold -Wl,-z,nocopyreloc -o test test.c -L. -lfoo
/usr/bin/ld.gold: internal error in check_non_pic, at ../../gold/x86_64.cc:2295
collect2: error: ld returned 1 exit status

So I think gold is right to fail; an R_X86_64_PC32 reloc for "foo" is just not
going to work because it's too far away; you either need to use PIC, copy-reloc
or huge-model I guess.  So I think the assert can be relaxed

You are receiving this mail because:
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]