aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-xtensa.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 398476b..24f08d9 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-14 Max Filippov <jcmvbkbc@gmail.com>
+
+ * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference
+ as GOT reference when plt.refcount is not positive.
+
2015-05-12 H.J. Lu <hongjiu.lu@intel.com>
* elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate space
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index 53af1c6..2523670 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -1360,10 +1360,14 @@ elf_xtensa_gc_sweep_hook (bfd *abfd,
{
if (is_plt)
{
+ /* If the symbol has been localized its plt.refcount got moved
+ to got.refcount. Handle it as GOT. */
if (h->plt.refcount > 0)
h->plt.refcount--;
+ else
+ is_got = TRUE;
}
- else if (is_got)
+ if (is_got)
{
if (h->got.refcount > 0)
h->got.refcount--;