aboutsummaryrefslogtreecommitdiff
path: root/bfd/libcoff-in.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-10-25 15:37:47 +0000
committerIan Lance Taylor <ian@airs.com>1995-10-25 15:37:47 +0000
commit28a0c103996c49ab0784f19e3813f3b6ac4a6619 (patch)
tree070da518b79f3e5e634784b3a71946271262db3b /bfd/libcoff-in.h
parente54bf1c1a4f0c267c2903e5a6c5cc64219ad4f62 (diff)
downloadgdb-28a0c103996c49ab0784f19e3813f3b6ac4a6619.zip
gdb-28a0c103996c49ab0784f19e3813f3b6ac4a6619.tar.gz
gdb-28a0c103996c49ab0784f19e3813f3b6ac4a6619.tar.bz2
* xcofflink.c: Extensive changes to support linking shared objects
and generating a .loader section. * libcoff-in.h (struct xcoff_tdata): Add import_file_id field. (struct xcoff_section_tdata): Add first_symndx, last_symndx, and ldrel_count fields. * libcoff.h: Rebuild. * coff-rs6000.c (xcoff_howto_table): Correct reloc names. * coffcode.h (styp_to_sec_flags): Don't set any flags if STYP_PAD is set. * bfd-in.h (bfd_xcoff_import_symbol): Declare. (bfd_xcoff_export_symbol): Declare. (bfd_xcoff_size_dynamic_sections): Declare. * bfd-in2.h: Rebuild.
Diffstat (limited to 'bfd/libcoff-in.h')
-rw-r--r--bfd/libcoff-in.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/bfd/libcoff-in.h b/bfd/libcoff-in.h
index 4304214..aefa69b 100644
--- a/bfd/libcoff-in.h
+++ b/bfd/libcoff-in.h
@@ -125,6 +125,11 @@ struct xcoff_tdata
/* maxstack from optional header. */
bfd_size_type maxstack;
+
+ /* Used by the XCOFF backend linker. */
+ asection **csects;
+ unsigned long *debug_indices;
+ unsigned int import_file_id;
};
#define xcoff_data(abfd) ((abfd)->tdata.xcoff_obj_data)
@@ -159,6 +164,25 @@ struct coff_section_tdata
#define coff_section_data(abfd, sec) \
((struct coff_section_tdata *) (sec)->used_by_bfd)
+/* Tdata for sections in XCOFF files. This is used by the linker. */
+
+struct xcoff_section_tdata
+{
+ /* Used for XCOFF csects created by the linker; points to the real
+ XCOFF section which contains this csect. */
+ asection *enclosing;
+ /* The first and one past the last symbol indices for symbols used
+ by this csect. */
+ unsigned long first_symndx;
+ unsigned long last_symndx;
+ /* The number of .loader relocs in this csect. */
+ size_t ldrel_count;
+};
+
+/* An accessor macro the xcoff_section_tdata structure. */
+#define xcoff_section_data(abfd, sec) \
+ ((struct xcoff_section_tdata *) coff_section_data ((abfd), (sec))->tdata)
+
/* COFF linker hash table entries. */
struct coff_link_hash_entry
@@ -280,5 +304,17 @@ extern boolean _bfd_coff_generic_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
struct internal_reloc *, struct internal_syment *, asection **));
+/* Functions in xcofflink.c. */
+
+extern struct bfd_link_hash_table *_bfd_xcoff_bfd_link_hash_table_create
+ PARAMS ((bfd *));
+extern boolean _bfd_xcoff_bfd_link_add_symbols
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean _bfd_xcoff_bfd_final_link
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean _bfd_ppc_xcoff_relocate_section
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ struct internal_reloc *, struct internal_syment *, asection **));
+
/* And more taken from the source .. */