X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Flibcoff.h;h=bee4ce9e85876e02f86aee3908fb4901c79bc479;hb=f6af82bd4470673eef9562d4ed3a2717c1d749ab;hp=229668ed586751ab9036fbadd91e3d4dac69b000;hpb=5d54c62870438863320321eb704a13fc4c85953a;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/libcoff.h b/bfd/libcoff.h index 229668ed58..bee4ce9e85 100644 --- a/bfd/libcoff.h +++ b/bfd/libcoff.h @@ -1,5 +1,5 @@ /* BFD COFF object file private structure. - Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 1998 + Copyright (C) 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999 Free Software Foundation, Inc. Written by Cygnus Support. @@ -56,7 +56,7 @@ typedef struct coff_tdata file_ptr sym_filepos; struct coff_ptr_struct *raw_syments; - unsigned int raw_syment_count; + unsigned long raw_syment_count; /* These are only valid once writing has begun */ long int relocbase; @@ -97,6 +97,9 @@ typedef struct coff_tdata /* Used by coff_find_nearest_line. */ PTR line_info; + /* The timestamp from the COFF file header. */ + long timestamp; + /* Copy of some of the f_flags bits in the COFF filehdr structure, used by ARM code. */ flagword flags; @@ -213,12 +216,14 @@ struct xcoff_section_tdata #define xcoff_section_data(abfd, sec) \ ((struct xcoff_section_tdata *) coff_section_data ((abfd), (sec))->tdata) -/* Tdata for sections in PEI image files. */ +/* Tdata for sections in PE files. */ struct pei_section_tdata { /* The virtual size of the section. */ bfd_size_type virt_size; + /* The PE section flags. */ + long pe_flags; }; /* An accessor macro for the pei_section_tdata structure. */ @@ -467,6 +472,41 @@ struct coff_final_link_info struct internal_reloc *internal_relocs; }; +/* Most COFF variants have no way to record the alignment of a + section. This struct is used to set a specific alignment based on + the name of the section. */ + +struct coff_section_alignment_entry +{ + /* The section name. */ + const char *name; + + /* This is either (unsigned int) -1, indicating that the section + name must match exactly, or it is the number of letters which + must match at the start of the name. */ + unsigned int comparison_length; + + /* These macros may be used to fill in the first two fields in a + structure initialization. */ +#define COFF_SECTION_NAME_EXACT_MATCH(name) (name), ((unsigned int) -1) +#define COFF_SECTION_NAME_PARTIAL_MATCH(name) (name), (sizeof (name) - 1) + + /* Only use this entry if the default section alignment for this + target is at least that much (as a power of two). If this field + is COFF_ALIGNMENT_FIELD_EMPTY, it should be ignored. */ + unsigned int default_alignment_min; + + /* Only use this entry if the default section alignment for this + target is no greater than this (as a power of two). If this + field is COFF_ALIGNMENT_FIELD_EMPTY, it should be ignored. */ + unsigned int default_alignment_max; + +#define COFF_ALIGNMENT_FIELD_EMPTY ((unsigned int) -1) + + /* The desired alignment for this section (as a power of two). */ + unsigned int alignment_power; +}; + extern struct bfd_hash_entry *_bfd_coff_link_hash_newfunc PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *)); extern boolean _bfd_coff_link_hash_table_init @@ -669,6 +709,7 @@ typedef struct unsigned int _bfd_auxesz; unsigned int _bfd_relsz; unsigned int _bfd_linesz; + unsigned int _bfd_filnmlen; boolean _bfd_coff_long_filenames; boolean _bfd_coff_long_section_names; unsigned int _bfd_coff_default_section_alignment_power; @@ -701,7 +742,8 @@ typedef struct flagword (*_bfd_styp_to_sec_flags_hook) PARAMS (( bfd *abfd, PTR internal_scnhdr, - const char *name)); + const char *name, + asection *section)); void (*_bfd_set_alignment_hook) PARAMS (( bfd *abfd, asection *sec, @@ -829,6 +871,7 @@ typedef struct #define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz) #define bfd_coff_relsz(abfd) (coff_backend_info (abfd)->_bfd_relsz) #define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz) +#define bfd_coff_filnmlen(abfd) (coff_backend_info (abfd)->_bfd_filnmlen) #define bfd_coff_long_filenames(abfd) (coff_backend_info (abfd)->_bfd_coff_long_filenames) #define bfd_coff_long_section_names(abfd) \ (coff_backend_info (abfd)->_bfd_coff_long_section_names) @@ -854,8 +897,9 @@ typedef struct #define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\ ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook) (abfd, filehdr, aouthdr)) -#define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name)\ - ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook) (abfd, scnhdr, name)) +#define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section)\ + ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\ + (abfd, scnhdr, name, section)) #define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\ ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))