xcoff64 include-coff-rs6000.h.patch

Tom Rix trix@redhat.com
Mon Jan 29 11:40:00 GMT 2001


rs6000.h : xcoff32 specific structures and magic numbers moved rs6000.h

----------------------------------------------------------------------------
--


diff -rcp sources-original/src/include/coff/rs6000.h
sources/src/include/coff/rs6000.h
*** sources-original/src/include/coff/rs6000.h	Sat Jan 20 00:28:30 2001
--- sources/src/include/coff/rs6000.h	Mon Jan 22 14:21:37 2001
*************** AOUTHDR;
*** 66,76 ****
  #define SMALL_AOUTSZ (28)
  #define AOUTHDRSZ 72

- #define	RS6K_AOUTHDR_OMAGIC	0x0107	/* old: text & data writeable */
- #define	RS6K_AOUTHDR_NMAGIC	0x0108	/* new: text r/o, data r/w */
- #define	RS6K_AOUTHDR_ZMAGIC	0x010B	/* paged: text r/o, both page-aligned
*/
-
-
  /********************** SECTION HEADER **********************/


--- 66,71 ----
*************** struct external_scnhdr {
*** 87,114 ****
  	char		s_flags[4];	/* flags			*/
  };

- /*
-  * names of "special" sections
-  */
- #define _TEXT	".text"
- #define _DATA	".data"
- #define _BSS	".bss"
- #define _PAD	".pad"
- #define _LOADER	".loader"
-
  #define	SCNHDR	struct external_scnhdr
  #define	SCNHSZ	40

- /* XCOFF uses a special .loader section with type STYP_LOADER.  */
- #define STYP_LOADER 0x1000
-
- /* XCOFF uses a special .debug section with type STYP_DEBUG.  */
- #define STYP_DEBUG 0x2000
-
- /* XCOFF handles line number or relocation overflow by creating
-    another section header with STYP_OVRFLO set.  */
- #define STYP_OVRFLO 0x8000
-
  /********************** LINE NUMBERS **********************/

  /* 1 line number entry for every "breakpointable" source line in a
section.
--- 82,90 ----
*************** struct external_reloc {
*** 241,243 ****
--- 217,267 ----
  #define DEFAULT_TEXT_SECTION_ALIGNMENT 4
  /* For new sections we havn't heard of before */
  #define DEFAULT_SECTION_ALIGNMENT 4
+
+ /* The ldhdr structure.  This appears at the start of the .loader
+    section.  */
+
+ struct external_ldhdr
+ {
+   bfd_byte l_version[4];
+   bfd_byte l_nsyms[4];
+   bfd_byte l_nreloc[4];
+   bfd_byte l_istlen[4];
+   bfd_byte l_nimpid[4];
+   bfd_byte l_impoff[4];
+   bfd_byte l_stlen[4];
+   bfd_byte l_stoff[4];
+ };
+
+ #define LDHDRSZ (8 * 4)
+
+ struct external_ldsym
+ {
+   union
+     {
+       bfd_byte _l_name[SYMNMLEN];
+       struct
+ 	{
+ 	  bfd_byte _l_zeroes[4];
+ 	  bfd_byte _l_offset[4];
+ 	} _l_l;
+     } _l;
+   bfd_byte l_value[4];
+   bfd_byte l_scnum[2];
+   bfd_byte l_smtype[1];
+   bfd_byte l_smclas[1];
+   bfd_byte l_ifile[4];
+   bfd_byte l_parm[4];
+ };
+
+ #define LDSYMSZ (8 + 3 * 4 + 2 + 2)
+
+ struct external_ldrel
+ {
+   bfd_byte l_vaddr[4];
+   bfd_byte l_symndx[4];
+   bfd_byte l_rtype[2];
+   bfd_byte l_rsecnm[2];
+ };
+
+ #define LDRELSZ (2 * 4 + 2 * 2)



More information about the Binutils mailing list