[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: VAX shard libraries broken
On Sun, Aug 26, 2012 at 10:49:38AM +0200, Martin Husemann wrote:
> For some reason libc.so.12.185 does not have a PLT anymore, i.e. the
> sections PLTGOT, PLTRELSZ, PLTREL and JMPREL are missing.
> This breaks all shared linked binaries (no suprise). However, I have a hard
> time seeing what recent change did cause this.
Noticing that it also happend on latest -6 and looking at the few relevant
changes that had been pulled up, it was actuallly quite easy to spot.
This hack avoids the problem, probably easy to fix for real. Matt?
RCS file: /cvsroot/src/external/gpl3/binutils/dist/bfd/elf32-vax.c,v
retrieving revision 18.104.22.168
diff -c -u -r22.214.171.124 elf32-vax.c
--- elf32-vax.c 25 Jul 2012 15:09:34 -0000 126.96.36.199
+++ elf32-vax.c 26 Aug 2012 09:49:20 -0000
@@ -973,10 +973,20 @@
if (h->type == STT_FUNC
if (h->plt.refcount == 0
|| SYMBOL_CALLS_LOCAL (info, 0)
|| (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
&& h->root.type == bfd_link_hash_undefweak))
+ if (! info->shared
+ && !h->def_dynamic
+ && !h->ref_dynamic
+ /* We must always create the plt entry if it was referenced
+ by a PLTxxO relocation. In this case we already recorded
+ it as a dynamic symbol. */
+ && h->dynindx == -1)
/* This case can occur if we saw a PLTxx reloc in an input
file, but the symbol was never referred to by a dynamic
Main Index |
Thread Index |