]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add a new function to the BFD library to allow users access to the COFF internal_extr...
authorNick Clifton <nickc@redhat.com>
Wed, 25 Mar 2020 11:58:49 +0000 (11:58 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 25 Mar 2020 11:58:49 +0000 (11:58 +0000)
* cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): New
function.
* libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Prototype.
* libbfd.h: Regenerate.

bfd/ChangeLog
bfd/cofflink.c
bfd/libbfd-in.h
bfd/libbfd.h

index 7f04a97daac8a2c5f1c962bf2519dc4e07adb28b..cac27e37ec96666ef3f6172660690ea7c933738e 100644 (file)
@@ -1,3 +1,10 @@
+2020-03-25  Nick Clifton  <nickc@redhat.com>
+
+       * cofflink.c (bfd_coff_get_internal_extra_pe_aouthdr): New
+       function.
+       * libbfd-in.h (bfd_coff_get_internal_extra_pe_aouthdr): Prototype.
+       * libbfd.h: Regenerate.
+
 2020-03-25  Shahab Vahedi  <shahab@synopsys.com>
 
        * elf32-arc.c (PRINT_DEBUG_RELOC_INFO_BEFORE): Use the
index e52f543ee6e66ec8afd2724ffdb3e9690d2a1faf..845d1e58467b78cf667451de62fc9ee175de4505 100644 (file)
@@ -3157,3 +3157,12 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd,
     }
   return TRUE;
 }
+
+
+struct internal_extra_pe_aouthdr *
+bfd_coff_get_internal_extra_pe_aouthdr (bfd* abfd)
+{
+  if (abfd == NULL || bfd_get_flavour (abfd) != bfd_target_coff_flavour)
+    return NULL;
+  return & pe_data (abfd)->pe_opthdr;
+}
index 5d24efbeb269ddb91f425dc14d0db20e0397d509..2f1f88644edbae3bf3299d897cf106d72614a5aa 100644 (file)
@@ -854,6 +854,11 @@ extern bfd_vma _bfd_get_gp_value
 extern void _bfd_set_gp_value
   (bfd *, bfd_vma) ATTRIBUTE_HIDDEN;
 
+/* Provide access to the internal_extra_pe_aouthdr structure which
+   contains interesting information for PE format binaries.  */
+extern struct internal_extra_pe_aouthdr *
+  bfd_coff_get_internal_extra_pe_aouthdr (bfd *);
+
 /* Function shared by the COFF and ELF SH backends, which have no
    other common header files.  */
 
index 348ccfd4b5758cf361424032664375105b720564..fc8b81c45f079a94d8eda4f32cf7d8def9c33a5a 100644 (file)
@@ -859,6 +859,11 @@ extern bfd_vma _bfd_get_gp_value
 extern void _bfd_set_gp_value
   (bfd *, bfd_vma) ATTRIBUTE_HIDDEN;
 
+/* Provide access to the internal_extra_pe_aouthdr structure which
+   contains interesting information for PE format binaries.  */
+extern struct internal_extra_pe_aouthdr *
+  bfd_coff_get_internal_extra_pe_aouthdr (bfd *);
+
 /* Function shared by the COFF and ELF SH backends, which have no
    other common header files.  */