From fc7233808a1d88db99a5181e1ee0f6865f8f5206 Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Thu, 2 May 1991 04:11:40 +0000 Subject: Merge devo/bfd with GDB's bfd. Remove obstack.h to ../include and obstack.c to ../libiberty. Move COFF symbol swapping code to coffswap.c where GDB can call it but it won't be duplicated if we have N different COFF targets. Add support for traditional Unix core files (with a upage). This support is from an Ultrix port, but is probably slightly broken now. Improve bfd_release's of obstack'd items on error returns. gcc -Wall fixes. Handle section alignment slightly better in coff, and comment where it needs more work (on page-aligning virtual vs file addresses for DPAGED). Use set_tdata everywhere that tdata is set, to avoid "cast to the left of assignment" problems with some compilers. Move bfd_alloc, bfd_zalloc, bfd_realloc, and bfd_release into libbfd.h (from bfd.h) since they are internal routines. Remove the redundant suffix "_struct" from struct tags. Set symbol count early in file reading, before slurping in the syms, for GDB's use. --- bfd/archures.c | 55 +++++++++++++++++++++++++------------------------------ 1 file changed, 25 insertions(+), 30 deletions(-) (limited to 'bfd/archures.c') diff --git a/bfd/archures.c b/bfd/archures.c index 2e151ed..18d49de 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -55,8 +55,6 @@ struct arch_print { {bfd_arch_pyramid, "pyramid", prt_num_mach, scan_num_mach}, {bfd_arch_h8_300, "H8/300", prt_num_mach, scan_num_mach}, {bfd_arch_unknown, (char *)0, prt_num_mach, scan_num_mach}, - - }; /* Return a printable string representing the architecture and machine @@ -310,36 +308,33 @@ bfd_arch_compatible (abfd, bbfd, archp, machinep) /* If particular machine types of one architecture are not compatible with each other, this is the place to put those tests (returning false if incompatible). */ - case bfd_arch_i960: - /* The i960 has to distinct subspecies which may not interbreed: - CORE CA - CORE KA KB MC - Any architecture on the same line is compatible, the one on - the right is the least restrictive. - */ - /* So, if either is a ca then the other must be a be core or ca */ - if (macha == bfd_mach_i960_ca) { - if (machb != bfd_mach_i960_ca && - machb != bfd_mach_i960_core) { - return false; + + case bfd_arch_i960: + /* The i960 has two distinct subspecies which may not interbreed: + CORE CA + CORE KA KB MC + Any architecture on the same line is compatible, the one on + the right is the least restrictive. */ + /* So, if either is a ca then the other must be a be core or ca */ + if (macha == bfd_mach_i960_ca) { + if (machb != bfd_mach_i960_ca && + machb != bfd_mach_i960_core) { + return false; + } + pick_a = 1; } - pick_a = 1; - } - else if (machb == bfd_mach_i960_ca) { - if (macha != bfd_mach_i960_ca && - macha != bfd_mach_i960_core) { - return false; + else if (machb == bfd_mach_i960_ca) { + if (macha != bfd_mach_i960_ca && + macha != bfd_mach_i960_core) { + return false; + } + pick_a = 0; } - pick_a = 0; - } - else { - /* This must be from the bottom row, so take the higest */ - pick_a = (macha > machb); - } - - - - break; + else { + /* This must be from the bottom row, so take the higest */ + pick_a = (macha > machb); + } + break; /* For these chips, as far as we care, "lower" numbers are included by "higher" numbers, e.g. merge 68010 and 68020 into 68020, -- cgit v1.1