diff options
author | Ken Raeburn <raeburn@cygnus> | 1994-07-14 21:35:54 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@cygnus> | 1994-07-14 21:35:54 +0000 |
commit | 1fb83be62b5f5a9003124a42c276b9821f58dce1 (patch) | |
tree | bef9114abac1f77ee395fdc27fa6f03d0deffbf0 /bfd/bfd-in2.h | |
parent | 8e3ff8235415e2ae6bb56e21b020ac585616993a (diff) | |
download | gdb-1fb83be62b5f5a9003124a42c276b9821f58dce1.zip gdb-1fb83be62b5f5a9003124a42c276b9821f58dce1.tar.gz gdb-1fb83be62b5f5a9003124a42c276b9821f58dce1.tar.bz2 |
NS32K changes from Ian Dall.
Note: Some of the ns32k-specific files do require gcc to compile at present.
This will be fixed.
Diffstat (limited to 'bfd/bfd-in2.h')
-rw-r--r-- | bfd/bfd-in2.h | 71 |
1 files changed, 54 insertions, 17 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 62ee6dc..ab889a5 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -748,7 +748,7 @@ typedef struct sec multiple times, the value of a symbol is the amount of space it requires, and the largest symbol value is the one used). Most targets have exactly one of these (which we - translate to bfd_com_section), but ECOFF has two. */ + translate to bfd_com_section_ptr), but ECOFF has two. */ #define SEC_IS_COMMON 0x8000 /* The section contains only debugging information. For @@ -883,28 +883,36 @@ typedef struct sec struct bfd_link_order *link_order_tail; } asection ; - /* These sections are global, and are managed by BFD. The application and target back end are not permitted to change the values in - these sections. */ + these sections. New code should use the section_ptr macros rather + than referring directly to the const sections. The const sections + may eventually vanish. */ #define BFD_ABS_SECTION_NAME "*ABS*" #define BFD_UND_SECTION_NAME "*UND*" #define BFD_COM_SECTION_NAME "*COM*" #define BFD_IND_SECTION_NAME "*IND*" /* the absolute section */ -extern asection bfd_abs_section; +extern const asection bfd_abs_section; +#define bfd_abs_section_ptr ((asection *) &bfd_abs_section) +#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr) /* Pointer to the undefined section */ -extern asection bfd_und_section; +extern const asection bfd_und_section; +#define bfd_und_section_ptr ((asection *) &bfd_und_section) +#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr) /* Pointer to the common section */ -extern asection bfd_com_section; +extern const asection bfd_com_section; +#define bfd_com_section_ptr ((asection *) &bfd_com_section) /* Pointer to the indirect section */ -extern asection bfd_ind_section; - -extern struct symbol_cache_entry *bfd_abs_symbol; -extern struct symbol_cache_entry *bfd_com_symbol; -extern struct symbol_cache_entry *bfd_und_symbol; -extern struct symbol_cache_entry *bfd_ind_symbol; +extern const asection bfd_ind_section; +#define bfd_ind_section_ptr ((asection *) &bfd_ind_section) +#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr) + +extern const struct symbol_cache_entry * const bfd_abs_symbol; +extern const struct symbol_cache_entry * const bfd_com_symbol; +extern const struct symbol_cache_entry * const bfd_und_symbol; +extern const struct symbol_cache_entry * const bfd_ind_symbol; #define bfd_get_section_size_before_reloc(section) \ (section->reloc_done ? (abort(),1): (section)->_raw_size) #define bfd_get_section_size_after_reloc(section) \ @@ -999,6 +1007,7 @@ enum bfd_architecture bfd_arch_h8500, /* Hitachi H8/500 */ bfd_arch_sh, /* Hitachi SH */ bfd_arch_alpha, /* Dec Alpha */ + bfd_arch_ns32k, /* National Semiconductors ns32000 */ bfd_arch_last }; @@ -1133,7 +1142,9 @@ enum complain_overflow complain_overflow_unsigned }; -typedef struct reloc_howto_struct +typedef unsigned char bfd_byte; + +struct reloc_howto_struct { /* The type field has mainly a documetary use - the back end can do what it wants with it, though normally the back end's @@ -1183,6 +1194,17 @@ typedef struct reloc_howto_struct bfd *output_bfd, char **error_message)); + + /* If this field is non null, then the supplied function is + called rather than the normal function. This is similar + to special_function (previous), but takes different arguments, + and is used for the new linking code. */ + bfd_reloc_status_type (*special_function1) + PARAMS((const reloc_howto_type *howto, + bfd *input_bfd, + bfd_vma relocation, + bfd_byte *location)); + /* The textual name of the relocation type. */ char *name; @@ -1213,9 +1235,12 @@ typedef struct reloc_howto_struct empty (e.g., m88k bcs); this flag signals the fact.*/ boolean pcrel_offset; -} reloc_howto_type; +}; +typedef struct reloc_howto_struct reloc_howto_type; #define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ - {(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC} + {(unsigned)C,R,S,B, P, BI, O,SF, 0,NAME,INPLACE,MASKSRC,MASKDST,PC} +#define HOWTO2(C, R,S,B, P, BI, O, SF, SF1,NAME, INPLACE, MASKSRC, MASKDST, PC) \ + {(unsigned)C,R,S,B, P, BI, O,SF, SF1,NAME,INPLACE,MASKSRC,MASKDST,PC} #define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN) #define HOWTO_PREPARE(relocation, symbol) \ @@ -1232,8 +1257,6 @@ typedef struct reloc_howto_struct int bfd_get_reloc_size PARAMS ((const reloc_howto_type *)); -typedef unsigned char bfd_byte; - typedef struct relent_chain { arelent relent; struct relent_chain *next; @@ -1418,6 +1441,20 @@ typedef enum bfd_reloc_code_real BFD_RELOC_386_GOTOFF, BFD_RELOC_386_GOTPC, + /* ns32k relocations */ + BFD_RELOC_NS32K_IMM_8, + BFD_RELOC_NS32K_IMM_16, + BFD_RELOC_NS32K_IMM_32, + BFD_RELOC_NS32K_IMM_8_PCREL, + BFD_RELOC_NS32K_IMM_16_PCREL, + BFD_RELOC_NS32K_IMM_32_PCREL, + BFD_RELOC_NS32K_DISP_8, + BFD_RELOC_NS32K_DISP_16, + BFD_RELOC_NS32K_DISP_32, + BFD_RELOC_NS32K_DISP_8_PCREL, + BFD_RELOC_NS32K_DISP_16_PCREL, + BFD_RELOC_NS32K_DISP_32_PCREL, + /* PowerPC/POWER (RS/6000) relocs. */ /* 26 bit relative branch. Low two bits must be zero. High 24 bits installed in bits 6 through 29 of instruction. */ |