From: Jeff Law Date: Fri, 5 Jul 1996 18:30:03 +0000 (+0000) Subject: No longer need to sanitize away h8/s stuff. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34255b708c6e329996ff9feff08f4eac4cbb6370;p=binutils-gdb.git No longer need to sanitize away h8/s stuff. --- diff --git a/bfd/.Sanitize b/bfd/.Sanitize index f46cb72585f..7a12df7df4c 100644 --- a/bfd/.Sanitize +++ b/bfd/.Sanitize @@ -315,34 +315,6 @@ else done fi -h8s_files="archures.c coff-h8300.c coffcode.h cpu-h8300.c ChangeLog bfd-in2.h" -if ( echo $* | grep keep\-h8s > /dev/null ) ; then - for i in $h8s_files ; do - if test ! -d $i && (grep sanitize-h8s $i > /dev/null) ; then - if [ -n "${verbose}" ] ; then - echo Keeping h8s stuff in $i - fi - fi - done -else - for i in $h8s_files ; do - if test ! -d $i && (grep sanitize-h8s $i > /dev/null) ; then - if [ -n "${verbose}" ] ; then - echo Removing traces of \"h8s\" from $i... - fi - cp $i new - sed '/start\-sanitize\-h8s/,/end-\sanitize\-h8s/d' < $i > new - if [ -n "${safe}" -a ! -f .Recover/$i ] ; then - if [ -n "${verbose}" ] ; then - echo Caching $i in .Recover... - fi - mv $i .Recover - fi - mv new $i - fi - done -fi - for i in * ; do if test ! -d $i && (grep sanitize $i > /dev/null) ; then echo '***' Some mentions of Sanitize are still left in $i! 1>&2 diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e5d1e11bea0..36c6aa681b8 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -207,7 +207,6 @@ Tue Jun 18 15:17:36 1996 Jeffrey A. Law * coff-h8300.c: Remove #if 0 code. (compatable): Don't allow mixing/matching of different architectures. -start-sanitize-h8s * archures.c (bfd_mach_h8300s): Add. * bfd-in2.h: Rebuilt. * coff-h8300.c (funcvec_hash_newfunc): Handle H8/S too. @@ -220,7 +219,6 @@ start-sanitize-h8s * cpu-h8300.c (h8300_scan): Likewise. Add H8/S to bfd_h8300_arch list. -end-sanitize-h8s Tue Jun 18 14:42:58 1996 Klaus Kaempf Added support for Alpha OpenVMS: diff --git a/bfd/archures.c b/bfd/archures.c index 8dea24ff88a..09426b99a50 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -1,5 +1,5 @@ /* BFD library support routines for architectures. - Copyright (C) 1990, 91-95, 1996 Free Software Foundation, Inc. + Copyright (C) 1990, 91, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. Hacked by John Gilmore and Steve Chamberlain of Cygnus Support. This file is part of BFD, the Binary File Descriptor library. @@ -86,21 +86,22 @@ DESCRIPTION .#define bfd_mach_i960_mc 4 .#define bfd_mach_i960_xa 5 .#define bfd_mach_i960_ca 6 -. {* start-sanitize-i960xl *} -.#define bfd_mach_i960_xl 7 -. {* end-sanitize-i960xl *} +.#define bfd_mach_i960_jx 7 .#define bfd_mach_i960_hx 8 . . bfd_arch_a29k, {* AMD 29000 *} . bfd_arch_sparc, {* SPARC *} .#define bfd_mach_sparc 1 .{* The difference between v8plus and v9 is that v9 is a true 64 bit env. *} -.#define bfd_mach_sparc_v8plus 2 -.#define bfd_mach_sparc_v8plusa 3 {* with ultrasparc add'ns *} -.#define bfd_mach_sparc_v9 4 -.#define bfd_mach_sparc_v9a 5 {* with ultrasparc add'ns *} +.#define bfd_mach_sparc_sparclet 2 +.#define bfd_mach_sparc_sparclite 3 +.#define bfd_mach_sparc_v8plus 4 +.#define bfd_mach_sparc_v8plusa 5 {* with ultrasparc add'ns *} +.#define bfd_mach_sparc_v9 6 +.#define bfd_mach_sparc_v9a 7 {* with ultrasparc add'ns *} .{* Nonzero if MACH has the v9 instruction set. *} -.#define bfd_mach_sparc_v9_p(mach) ((mach) != bfd_mach_sparc) +.#define bfd_mach_sparc_v9_p(mach) \ +. ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9a) . bfd_arch_mips, {* MIPS Rxxxx *} . bfd_arch_i386, {* Intel 386 *} . bfd_arch_we32k, {* AT&T WE32xxx *} @@ -114,6 +115,7 @@ DESCRIPTION . bfd_arch_h8300, {* Hitachi H8/300 *} .#define bfd_mach_h8300 1 .#define bfd_mach_h8300h 2 +.#define bfd_mach_h8300s 3 . bfd_arch_powerpc, {* PowerPC *} . bfd_arch_rs6000, {* IBM RS/6000 *} . bfd_arch_hppa, {* HP PA RISC *} @@ -126,9 +128,6 @@ DESCRIPTION . bfd_arch_arm, {* Advanced Risc Machines ARM *} . bfd_arch_ns32k, {* National Semiconductors ns32000 *} . bfd_arch_w65, {* WDC 65816 *} -. {* start-sanitize-rce *} -. bfd_arch_rce, {* Motorola RCE *} -. {* end-sanitize-rce *} . {* start-sanitize-arc *} . bfd_arch_arc, {* Argonaut RISC Core *} .#define bfd_mach_arc_base 0 @@ -192,9 +191,6 @@ extern const bfd_arch_info_type bfd_mips_arch; extern const bfd_arch_info_type bfd_powerpc_arch; extern const bfd_arch_info_type bfd_rs6000_arch; extern const bfd_arch_info_type bfd_sh_arch; -/* start-sanitize-rce */ -extern const bfd_arch_info_type bfd_rce_arch; -/* end-sanitize-rce */ extern const bfd_arch_info_type bfd_sparc_arch; extern const bfd_arch_info_type bfd_vax_arch; extern const bfd_arch_info_type bfd_we32k_arch; @@ -225,9 +221,6 @@ static const bfd_arch_info_type * const bfd_archures_list[] = &bfd_powerpc_arch, &bfd_rs6000_arch, &bfd_sh_arch, -/* start-sanitize-rce */ - &bfd_rce_arch, -/* end-sanitize-rce */ &bfd_sparc_arch, &bfd_vax_arch, &bfd_we32k_arch, diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index a6b59aa6e52..84b553fb156 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1192,6 +1192,7 @@ enum bfd_architecture bfd_arch_h8300, /* Hitachi H8/300 */ #define bfd_mach_h8300 1 #define bfd_mach_h8300h 2 +#define bfd_mach_h8300s 3 bfd_arch_powerpc, /* PowerPC */ bfd_arch_rs6000, /* IBM RS/6000 */ bfd_arch_hppa, /* HP PA RISC */ @@ -1592,8 +1593,8 @@ relocation types already defined. */ BFD_RELOC_SPARC_6, BFD_RELOC_SPARC_5, -/* Alpha ECOFF relocations. Some of these treat the symbol or "addend" -in some special way. +/* Alpha ECOFF and ELF relocations. Some of these treat the symbol or +"addend" in some special way. For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when writing; when reading, it will be the absolute section symbol. The addend is the displacement in bytes of the "lda" instruction from @@ -1606,6 +1607,11 @@ relocations out, and is filled in with the file's GP value on reading, for convenience. */ BFD_RELOC_ALPHA_GPDISP_LO16, +/* The ELF GPDISP relocation is exactly the same as the GPDISP_HI16 +relocation except that there is no accompanying GPDISP_LO16 +relocation. */ + BFD_RELOC_ALPHA_GPDISP, + /* The Alpha LITERAL/LITUSE relocs are produced by a symbol reference; the assembler turns it into a LDQ instruction to load the address of the symbol, and then fills in a register in the real instruction. diff --git a/bfd/coff-h8300.c b/bfd/coff-h8300.c index 3d1337151eb..dc467f93177 100644 --- a/bfd/coff-h8300.c +++ b/bfd/coff-h8300.c @@ -138,7 +138,8 @@ funcvec_hash_newfunc (entry, gen_table, string) but it's not easily available here. */ if (bfd_get_mach (table->abfd) == bfd_mach_h8300) table->offset += 2; - else if (bfd_get_mach (table->abfd) == bfd_mach_h8300h) + else if (bfd_get_mach (table->abfd) == bfd_mach_h8300h + || bfd_get_mach (table->abfd) == bfd_mach_h8300s) table->offset += 4; else return NULL; @@ -258,7 +259,7 @@ static reloc_howto_type howto_table[] = #define SELECT_RELOC(x,howto) \ { x.r_type = select_reloc(howto); } -#define BADMAG(x) (H8300BADMAG(x)&& H8300HBADMAG(x)) +#define BADMAG(x) (H8300BADMAG(x) && H8300HBADMAG(x) && H8300SBADMAG(x)) #define H8300 1 /* Customize coffcode.h */ #define __A_MAGIC_SET__ @@ -565,7 +566,8 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info) if ((bfd_get_mach (abfd) == bfd_mach_h8300 && value >= 0xff00 && value <= 0xffff) - || (bfd_get_mach (abfd) == bfd_mach_h8300h + || ((bfd_get_mach (abfd) == bfd_mach_h8300h + || bfd_get_mach (abfd) == bfd_mach_h8300s) && value >= 0xffff00 && value <= 0xffffff)) { @@ -587,7 +589,8 @@ h8300_reloc16_estimate(abfd, input_section, reloc, shrink, link_info) /* The address is in 0xffff00..0xffffff inclusive on the h8300h, then we can relax this mov.b */ - if (bfd_get_mach (abfd) == bfd_mach_h8300h + if ((bfd_get_mach (abfd) == bfd_mach_h8300h + || bfd_get_mach (abfd) == bfd_mach_h8300s) && value >= 0xffff00 && value <= 0xffffff) { @@ -1125,7 +1128,8 @@ h8300_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr, link_info, input_section), vectors_sec->contents + h->offset); - else if (bfd_get_mach (input_section->owner) == bfd_mach_h8300h) + else if (bfd_get_mach (input_section->owner) == bfd_mach_h8300h + || bfd_get_mach (input_section->owner) == bfd_mach_h8300s) bfd_put_32 (abfd, bfd_coff_reloc16_get_value (reloc, link_info, @@ -1294,7 +1298,8 @@ h8300_bfd_link_add_symbols(abfd, info) takes 2 bytes on the h8300 and 4 bytes on the h8300h. */ if (bfd_get_mach (abfd) == bfd_mach_h8300) h8300_coff_hash_table (info)->vectors_sec->_raw_size += 2; - else if (bfd_get_mach (abfd) == bfd_mach_h8300h) + else if (bfd_get_mach (abfd) == bfd_mach_h8300h + || bfd_get_mach (abfd) == bfd_mach_h8300s) h8300_coff_hash_table (info)->vectors_sec->_raw_size += 4; } } diff --git a/bfd/coffcode.h b/bfd/coffcode.h index af8a49fe417..8de83a543b7 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -1111,7 +1111,7 @@ coff_set_alignment_hook (abfd, section, scnhdr) } #endif -#ifdef COFF_WITH_PE +#ifdef COFF_IMAGE_WITH_PE /* In a PE image file, the s_paddr field holds the virtual size of a section, while the s_size field holds the raw size. */ if (hdr->s_paddr != 0) @@ -1499,7 +1499,6 @@ coff_set_arch_mach_hook (abfd, filehdr) break; #endif -/* start-sanitize-h8s */ #ifdef H8300SMAGIC case H8300SMAGIC: arch = bfd_arch_h8300; @@ -1509,7 +1508,6 @@ coff_set_arch_mach_hook (abfd, filehdr) break; #endif -/* end-sanitize-h8s */ #ifdef SH_ARCH_MAGIC_BIG case SH_ARCH_MAGIC_BIG: case SH_ARCH_MAGIC_LITTLE: @@ -1960,11 +1958,9 @@ coff_set_flags (abfd, magicp, flagsp) case bfd_mach_h8300h: *magicp = H8300HMAGIC; return true; -/* start-sanitize-h8s */ case bfd_mach_h8300s: *magicp = H8300SMAGIC; return true; -/* end-sanitize-h8s */ } break; #endif @@ -2186,7 +2182,7 @@ coff_compute_section_file_positions (abfd) #endif current->filepos = sofar; -#ifdef COFF_WITH_PE +#ifdef COFF_IMAGE_WITH_PE /* With PE we have to pad each section to be a multiple of its page size too, and remember both sizes. */ @@ -2464,6 +2460,9 @@ coff_write_object_contents (abfd) section.s_size = current->_raw_size; #ifdef COFF_WITH_PE + section.s_paddr = 0; +#endif +#ifdef COFF_IMAGE_WITH_PE /* Reminder: s_paddr holds the virtual size of the section. */ if (coff_section_data (abfd, current) != NULL && pei_section_data (abfd, current) != NULL)