aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-microblaze.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2017-08-08 14:05:33 +0930
committerAlan Modra <amodra@gmail.com>2017-08-08 14:08:43 +0930
commit206c9c79ee24759c0e0af96e6722298b413f2716 (patch)
treeeff124b59d57848006b0afb5fcab3721bdaf8a52 /bfd/elf32-microblaze.c
parent5d1ceb0b871a78601bbd4789ce137ff39c934a6f (diff)
downloadgdb-206c9c79ee24759c0e0af96e6722298b413f2716.zip
gdb-206c9c79ee24759c0e0af96e6722298b413f2716.tar.gz
gdb-206c9c79ee24759c0e0af96e6722298b413f2716.tar.bz2
PR21017, microblaze missing _GLOBAL_OFFSET_TABLE_ symbol
PR 21017 * elf32-microblaze.c (microblaze_elf_check_relocs): Don't bump got.refcount for GOTOFF relocs, just create .got section.
Diffstat (limited to 'bfd/elf32-microblaze.c')
-rw-r--r--bfd/elf32-microblaze.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
index 2657736..94ef09e 100644
--- a/bfd/elf32-microblaze.c
+++ b/bfd/elf32-microblaze.c
@@ -2353,7 +2353,6 @@ microblaze_elf_check_relocs (bfd * abfd,
dogottls:
sec->has_tls_reloc = 1;
/* Fall through. */
- case R_MICROBLAZE_GOTOFF_64:
case R_MICROBLAZE_GOT_64:
if (htab->elf.sgot == NULL)
{
@@ -2374,6 +2373,17 @@ microblaze_elf_check_relocs (bfd * abfd,
}
break;
+ case R_MICROBLAZE_GOTOFF_64:
+ case R_MICROBLAZE_GOTOFF_32:
+ if (htab->elf.sgot == NULL)
+ {
+ if (htab->elf.dynobj == NULL)
+ htab->elf.dynobj = abfd;
+ if (!_bfd_elf_create_got_section (htab->elf.dynobj, info))
+ return FALSE;
+ }
+ break;
+
case R_MICROBLAZE_64:
case R_MICROBLAZE_64_PCREL:
case R_MICROBLAZE_32: