Bug 19612 - relocation R_X86_64_PC32 against protected symbol `_Tvs19_emptyStringStorageVs6UInt32' can not be used when making a shared object
Summary: relocation R_X86_64_PC32 against protected symbol `_Tvs19_emptyStringStorageV...
Status: RESOLVED DUPLICATE of bug 17709
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.27
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-11 12:13 UTC by Markus Trippelsdorf
Modified: 2016-02-11 20:28 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
test object file (850.12 KB, application/x-bzip)
2016-02-11 12:13 UTC, Markus Trippelsdorf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Trippelsdorf 2016-02-11 12:13:17 UTC
Created attachment 8976 [details]
test object file

Building Swift fails on binutils trunk:

 % ld.gold -shared Swift.o
 % ld.bfd  -shared Swift.o
ld.bfd: Swift.o: relocation R_X86_64_PC32 against protected symbol `_Tvs19_emptyStringStorageVs6UInt32' can not be used when making a shared object
ld.bfd: final link failed: Bad value
Comment 1 H.J. Lu 2016-02-11 19:01:36 UTC
Is this a dup for PR 17709 and

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248
Comment 2 Markus Trippelsdorf 2016-02-11 19:58:39 UTC
(In reply to H.J. Lu from comment #1)
> Is this a dup for PR 17709 and
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248

Well, Swift is build by clang, so gcc's PR65248 isn't relevant.

Why does linking succeed with gold?
Comment 3 H.J. Lu 2016-02-11 20:28:37 UTC
(In reply to Markus Trippelsdorf from comment #2)
> (In reply to H.J. Lu from comment #1)
> > Is this a dup for PR 17709 and
> > 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248
> 
> Well, Swift is build by clang, so gcc's PR65248 isn't relevant.

https://llvm.org/bugs/show_bug.cgi?id=26580

> Why does linking succeed with gold?

That is a gold bug.  See the -fuse-ld=gold test in my GCC/clang bug reports.

*** This bug has been marked as a duplicate of bug 17709 ***