nios2: Add BFD support for GOT-relative DW_EH_PE_datarel encodings
authorSandra Loosemore <sandra@codesourcery.com>
Fri, 31 Jan 2020 18:34:42 +0000 (10:34 -0800)
committerSandra Loosemore <sandra@codesourcery.com>
Fri, 31 Jan 2020 18:34:42 +0000 (10:34 -0800)
There's already existing logic to handle this on other targets, so
this patch just makes nios2 use it.

2020-01-31  Sandra Loosemore  <sandra@codesourcery.com>

bfd/
* elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
encodings are relative to the GOT on nios2, too.

bfd/ChangeLog
bfd/elf-eh-frame.c

index 59a787bf40ccce9df1734bdd0ce31c455adf514b..0ebf45a269704b2c72386871b222f4d85965493b 100644 (file)
@@ -1,3 +1,8 @@
+2020-01-31  Sandra Loosemore  <sandra@codesourcery.com>
+
+       * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): DW_EH_PE_datarel
+       encodings are relative to the GOT on nios2, too.
+
 2020-01-31  Alan Modra  <amodra@gmail.com>
 
        * Makefile.am (elf32-target.h, elf64-target.h): Don't use a temp
index 2b2b2c975bdf15143d0d8868d4b29bd09cf1927b..3cf82d58bcf4ee4cfb9893a7d5ea6908e1879770 100644 (file)
@@ -2149,6 +2149,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
                        /* Fall thru */
                      case bfd_arch_frv:
                      case bfd_arch_i386:
+                     case bfd_arch_nios2:
                        BFD_ASSERT (htab->hgot != NULL
                                    && ((htab->hgot->root.type
                                         == bfd_link_hash_defined)