Can you try this patch?

Index: tools/lld/ELF/Target.cpp
===================================================================
--- tools/lld/ELF/Target.cpp    (revision 291691)
+++ tools/lld/ELF/Target.cpp    (working copy)
@@ -1062,7 +1062,8 @@
 }
 
 PPC64TargetInfo::PPC64TargetInfo() {
-  PltRel = GotRel = R_PPC64_GLOB_DAT;
+  GotRel = R_PPC64_GLOB_DAT;
+  PltRel = R_PPC64_JMP_SLOT;
   RelativeRel = R_PPC64_RELATIVE;
   GotEntrySize = 8;
   GotPltEntrySize = 8;


On Wed, Jan 11, 2017 at 09:47:34AM -0800, Mark Millard wrote:
> 
> On 2017-Jan-11, at 8:07 AM, Ed Maste <emaste at freebsd.org> wrote:
> 
> > On 11 January 2017 at 04:15, Mark Millard <markmi at dsl-only.net> wrote:
> >> 
> >> # ./a.out
> >> ld-elf.so.1: assert failed: /usr/src/libexec/rtld-elf/powerpc64/reloc.c:374
> >> Abort trap (core dumped)
> > 
> > Would you paste the output of `readelf -r a.out`?
> 
> Here you go, for ld.lld and for ld.bfd . . .
> 
> For -fuse-ld=lld :
> 
> # readelf -r a.out
> 
> Relocation section with addend (.rela.plt):
> r_offset     r_info       r_type              st_value         st_name + 
> r_addend
> 000010030038 000300000014 <unknown: 0x14>     0000000000000000 atexit + 0
> 000010030040 000200000014 <unknown: 0x14>     0000000000000000 _init_tls + 0
> 000010030048 000500000014 <unknown: 0x14>     0000000000000000 exit + 0
> 
> For -fuse-ld=bfd :
> 
> # readelf -r a.out
> 
> Relocation section with addend (.rela.plt):
> r_offset     r_info       r_type              st_value         st_name + 
> r_addend
> 000010010cb8 000300000015 <unknown: 0x15>     0000000000000000 atexit + 0
> 000010010cd0 000400000015 <unknown: 0x15>     0000000000000000 _init_tls + 0
> 000010010ce8 000600000015 <unknown: 0x15>     0000000000000000 exit + 0
> 
> These were done on the powerpc64 machine (native).
> 
> 
> ===
> Mark Millard
> markmi at dsl-only.net
> _______________________________________________
> [email protected] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
> To unsubscribe, send any mail to "[email protected]"
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "[email protected]"

Reply via email to