aboutsummaryrefslogtreecommitdiff
path: root/bfd/archures.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-05-02 04:11:40 +0000
committerJohn Gilmore <gnu@cygnus>1991-05-02 04:11:40 +0000
commitfc7233808a1d88db99a5181e1ee0f6865f8f5206 (patch)
tree2f0626920d2d237a52aae12eccd0d5b8dd54ec1c /bfd/archures.c
parentff37ea550b842cdb18aca531e5e705c03d4eed72 (diff)
downloadfsf-binutils-gdb-fc7233808a1d88db99a5181e1ee0f6865f8f5206.zip
fsf-binutils-gdb-fc7233808a1d88db99a5181e1ee0f6865f8f5206.tar.gz
fsf-binutils-gdb-fc7233808a1d88db99a5181e1ee0f6865f8f5206.tar.bz2
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.
Diffstat (limited to 'bfd/archures.c')
-rw-r--r--bfd/archures.c55
1 files changed, 25 insertions, 30 deletions
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,