diff options
author | Clément Chigot <clement.chigot@atos.net> | 2021-03-11 11:08:18 +0100 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-03-12 13:04:00 +1030 |
commit | 6d4d932867fa8b3c685b3a358bf81f7f6c6ea7d6 (patch) | |
tree | 63250f6accc28da049cb258d140637730ffc5b48 /bfd/coffcode.h | |
parent | 8aa2d0236a5cf981aff44cf679515c6031a152bd (diff) | |
download | gdb-6d4d932867fa8b3c685b3a358bf81f7f6c6ea7d6.zip gdb-6d4d932867fa8b3c685b3a358bf81f7f6c6ea7d6.tar.gz gdb-6d4d932867fa8b3c685b3a358bf81f7f6c6ea7d6.tar.bz2 |
bfd: use default coff_write_object_contents for XCOFF64
There is no need for XCOFF64 to have is own write_object_contents.
* coff64-rs6000.c (xcoff64_write_object_contents): Remove.
* coffcode.h (coff_write_object_contents): Add bfd_mach_ppc_620
support for o_cputype field. Avoid creating an empty a.out header
for XCOFF64.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r-- | bfd/coffcode.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 814922e..b0ca266 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -4058,6 +4058,8 @@ coff_write_object_contents (bfd * abfd) case bfd_arch_powerpc: if (bfd_get_mach (abfd) == bfd_mach_ppc) internal_a.o_cputype = 3; + else if (bfd_get_mach (abfd) == bfd_mach_ppc_620) + internal_a.o_cputype = 2; else internal_a.o_cputype = 1; break; @@ -4127,12 +4129,13 @@ coff_write_object_contents (bfd * abfd) #endif } #ifdef RS6000COFF_C +#ifndef XCOFF64 else { AOUTHDR buff; size_t size; - /* XCOFF seems to always write at least a small a.out header. */ + /* XCOFF32 seems to always write at least a small a.out header. */ coff_swap_aouthdr_out (abfd, & internal_a, & buff); if (xcoff_data (abfd)->full_aouthdr) size = bfd_coff_aoutsz (abfd); @@ -4142,6 +4145,7 @@ coff_write_object_contents (bfd * abfd) return FALSE; } #endif +#endif return TRUE; } |