aboutsummaryrefslogtreecommitdiff
path: root/bfd/libcoff.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-10-09 21:19:53 +0000
committerIan Lance Taylor <ian@airs.com>1995-10-09 21:19:53 +0000
commit5f710a3a892886e442bc24a5a05a56550693abdc (patch)
tree82c4e30223b551f7a92b9a402477fe873cf98065 /bfd/libcoff.h
parent531f86b422809ddca80d367aeb8cf4154401f534 (diff)
downloadgdb-5f710a3a892886e442bc24a5a05a56550693abdc.zip
gdb-5f710a3a892886e442bc24a5a05a56550693abdc.tar.gz
gdb-5f710a3a892886e442bc24a5a05a56550693abdc.tar.bz2
* libcoff-in.h (struct xcoff_tdata): Define.
(xcoff_data): Define. * bfd.c (struct _bfd): Add xcoff_obj_data field to tdata union. * bfd-in2.h, libcoff.h: Rebuild. * coff-rs6000.c (xcoff_mkobject): New static function. (coff_mkobject): Define. (xcoff_copy_private_bfd_data): New static function. (coff_bfd_copy_private_bfd_data): Define. (rs6000coff_howto_table): Change R_TOC complain_on_overflow from signed to bitfield. (rs6000coff_vec): Add DYNAMIC to object_flags. * coffcode.h (sec_to_styp_flags): If RS6000COFF_C, handle .pad and .loader sections specially. (coff_new_section_hook): If RS6000COFF_C, get the .text and .data section alignment from the XCOFF tdata information. (coff_mkobject_hook): If RS6000COFF_C, set DYNAMIC based on F_SHROBJ, and copy the extra a.out header information into the XCOFF tdata structure. (coff_write_object_contents): If RS6000COFF_C, set F_SHROBJ, F_DYNLOAD and the extra a.out header information. (coff_slurp_symbol_table): Set BSF_NOT_AT_END for a C_EXT or C_HIDEXT symbol with attached csect information. * coffswap.h (coff_swap_aouthdr_in): If RS6000COFF_C, swap in the o_maxdata field. (coff_swap_aouthdr_out): If RS6000COFF_C, swap extra XCOFF fields. * coffgen.c (coff_renumber_symbols): Don't move any symbol to the end if BSF_NOT_AT_END is set.
Diffstat (limited to 'bfd/libcoff.h')
-rw-r--r--bfd/libcoff.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/bfd/libcoff.h b/bfd/libcoff.h
index 4650bfc..98eeaf3 100644
--- a/bfd/libcoff.h
+++ b/bfd/libcoff.h
@@ -97,6 +97,33 @@ typedef struct pe_tdata
#define pe_data(bfd) ((bfd)->tdata.pe_obj_data)
+/* Tdata for XCOFF files. */
+
+struct xcoff_tdata
+{
+ /* Basic COFF information. */
+ coff_data_type coff;
+
+ /* TOC value. */
+ bfd_vma toc;
+
+ /* .text alignment from optional header. */
+ int text_align_power;
+
+ /* .data alignment from optional header. */
+ int data_align_power;
+
+ /* modtype from optional header. */
+ short modtype;
+
+ /* maxdata from optional header. */
+ bfd_size_type maxdata;
+
+ /* maxstack from optional header. */
+ bfd_size_type maxstack;
+};
+
+#define xcoff_data(abfd) ((abfd)->tdata.xcoff_obj_data)
/* We take the address of the first element of a asymbol to ensure that the
* macro is only ever applied to an asymbol. */