Use symbolic constants instead of magic numbers with add_data_entry()
[deliverable/binutils-gdb.git] / bfd / PORTING
index 3c4befe0fb98d1b75520d05ff294f21d7d3e6579..770f65d6a2c1fc2225beebe1e6f204e1d58e5c9e 100644 (file)
@@ -9,20 +9,29 @@ Porting to a new host
 ---------------------
 Pick a name for your host. Call that <host>.
 (<host> might be sun4, ...)
 ---------------------
 Pick a name for your host. Call that <host>.
 (<host> might be sun4, ...)
-Create a file hosts/h-<host>.
+Create a file hosts/<host>.mh.
 
 Porting to a new target
 -----------------------
 Pick a name for your target. Call that <target>.
 
 Porting to a new target
 -----------------------
 Pick a name for your target. Call that <target>.
-You need to create <target>.c and config/mt-<target>.
-
-config/mt-<target> is a Makefile fragment.
+Call the name for your CPU architecture <cpu>.
+You need to create <target>.c and config/<target>.mt,
+and add a case for it to a case statements in bfd/configure.host and
+bfd/config.bfd, which associates each canonical host type with a BFD
+host type (used as the base of the makefile fragment names), and to the
+table in bfd/configure.ac which associates each target vector with
+the .o files it uses.
+
+config/<target>.mt is a Makefile fragment.
 The following is usually enough:
 DEFAULT_VECTOR=<target>_vec
 SELECT_ARCHITECTURES=bfd_<cpu>_arch
 
 See the list of cpu types in archures.c, or "ls cpu-*.c".
 The following is usually enough:
 DEFAULT_VECTOR=<target>_vec
 SELECT_ARCHITECTURES=bfd_<cpu>_arch
 
 See the list of cpu types in archures.c, or "ls cpu-*.c".
-for more information about .mt and .mh files, see config/README.
+If your architecture is new, you need to add it to the tables
+in bfd/archures.c, opcodes/configure.ac, and binutils/objdump.c.
+
+For more information about .mt and .mh files, see config/README.
 
 The file <target>.c is the hard part.  It implements the
 bfd_target <target>_vec, which includes pointers to
 
 The file <target>.c is the hard part.  It implements the
 bfd_target <target>_vec, which includes pointers to
@@ -37,7 +46,7 @@ you automatically for many a.out systems.  Do:
        make gen-aout
        ./gen-aout <target> > <target>.c
 (This only works if you are building on the target ("native").
        make gen-aout
        ./gen-aout <target> > <target>.c
 (This only works if you are building on the target ("native").
-If you must make a cross-port from scratch, copy  the most
+If you must make a cross-port from scratch, copy the most
 similar existing file that includes aout-target.h, and fix what is wrong.)
 
 Check the parameters in <target>.c, and fix anything that is wrong.
 similar existing file that includes aout-target.h, and fix what is wrong.)
 
 Check the parameters in <target>.c, and fix anything that is wrong.
@@ -47,7 +56,7 @@ TARGET_IS_BIG_ENDIAN_P
        Should be defined if <target> is big-endian.
 
 N_HEADER_IN_TEXT(x)
        Should be defined if <target> is big-endian.
 
 N_HEADER_IN_TEXT(x)
-       See discussion in ../include/aout/aout32.h.
+       See discussion in ../include/aout/aout64.h.
 
 BYTES_IN_WORD
        Number of bytes per word. (Usually 4 but can be 8.)
 
 BYTES_IN_WORD
        Number of bytes per word. (Usually 4 but can be 8.)
@@ -63,12 +72,18 @@ TEXT_START_ADDR
        The address of the start of the text segemnt in
        virtual memory.  Normally, the same as the entry point.
 
        The address of the start of the text segemnt in
        virtual memory.  Normally, the same as the entry point.
 
-PAGE_SIZE
+TARGET_PAGE_SIZE
 
 SEGMENT_SIZE
 
 SEGMENT_SIZE
-        Usually, the same as the PAGE_SIZE.
+        Usually, the same as the TARGET_PAGE_SIZE.
         Alignment needed for the data segment.
 
 TARGETNAME
        The name of the target, for run-time lookups.
        Usually "a.out-<target>"
         Alignment needed for the data segment.
 
 TARGETNAME
        The name of the target, for run-time lookups.
        Usually "a.out-<target>"
+\f
+Copyright (C) 2012-2017 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
This page took 0.023736 seconds and 4 git commands to generate.