diff options
author | Alan Modra <amodra@gmail.com> | 2020-07-08 21:21:32 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-07-09 22:58:16 +0930 |
commit | fe49679d5193f6ff7cfd333e30883d293112a3d1 (patch) | |
tree | d3e22fb7645b021227855dbde32c85a9b6fe0a0b /bfd/peXXigen.c | |
parent | c560184eb2074570988c498aaae494d0c4b00328 (diff) | |
download | gdb-fe49679d5193f6ff7cfd333e30883d293112a3d1.zip gdb-fe49679d5193f6ff7cfd333e30883d293112a3d1.tar.gz gdb-fe49679d5193f6ff7cfd333e30883d293112a3d1.tar.bz2 |
Remove powerpc PE support
Plus some leftover powerpc lynxos support.
bfd/
* coff-ppc.c: Delete.
* pe-ppc.c: Delete.
* pei-ppc.c: Delete.
* Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Remove PE PPC.
* coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Remove
PPCMAGIC code.
(coff_write_object_contents): Remove PPC_PE code.
* config.bfd: Move powerpcle-pe to removed targets.
* configure.ac: Remove powerpc PE entries.
* libcoff-in.h (ppc_allocate_toc_section): Delete.
(ppc_process_before_allocation): Delete.
* peXXigen.c: Remove POWERPC_LE_PE code and comments.
* targets.c: Remove powerpc PE vectors.
* po/SRC-POTFILES.in: Regenerate.
* libcoff.h: Regenerate.
* Makefile.in: Regenerate.
* configure: Regenerate.
binutils/
* dlltool.c: Remove powerpc PE support and comments.
* configure.ac: Remove powerpc PE dlltool config.
* configure: Regenerate.
gas/
* config/obj-coff.h: Remove TE_PE support.
* config/tc-ppc.c: Likewise.
* config/tc-ppc.h: Likewise.
* configure.tgt: Remove powerpc PE and powerpc lynxos.
* testsuite/gas/cfi/cfi.exp (cfi-common-6): Remove powerpc PE
condition.
* testsuite/gas/macros/macros.exp: Don't xfail powerpc PE.
include/
* coff/powerpc.h: Delete.
ld/
* emulparams/ppcpe.sh: Delete.
* scripttempl/ppcpe.sc: Delete.
* emulparams/ppclynx.sh: Delete.
* Makefile.am (ALL_EMULATION_SOURCES): Remove ppc PE and lynxos.
* configure.tgt: Likewise.
* emultempl/beos.em: Remove powerpc PE support.
* emultempl/pe.em: Likewise.
* po/BLD-POTFILES.in: Regenerate.
* Makefile.in: Regenerate.
Diffstat (limited to 'bfd/peXXigen.c')
-rw-r--r-- | bfd/peXXigen.c | 113 |
1 files changed, 1 insertions, 112 deletions
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index 5149ef5..3c3fa27 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -105,12 +105,6 @@ #define HighBitSet(val) ((val) & 0x80000000) #define SetHighBit(val) ((val) | 0x80000000) #define WithoutHighBit(val) ((val) & 0x7fffffff) - -/* FIXME: This file has various tests of POWERPC_LE_PE. Those tests - worked when the code was in peicode.h, but no longer work now that - the code is in peigen.c. PowerPC NT is said to be dead. If - anybody wants to revive the code, you will have to figure out how - to handle those issues. */ void _bfd_XXi_swap_sym_in (bfd * abfd, void * ext1, void * in1) @@ -222,12 +216,6 @@ _bfd_XXi_swap_sym_in (bfd * abfd, void * ext1, void * in1) in->n_sclass = C_STAT; } #endif - -#ifdef coff_swap_sym_in_hook - /* This won't work in peigen.c, but since it's for PPC PE, it's not - worth fixing. */ - coff_swap_sym_in_hook (abfd, ext1, in1); -#endif } static bfd_boolean @@ -592,15 +580,6 @@ _bfd_XXi_swap_aouthdr_in (bfd * abfd, aouthdr_int->data_start &= 0xffffffff; } #endif - -#ifdef POWERPC_LE_PE - /* These three fields are normally set up by ppc_relocate_section. - In the case of reading a file in, we can pick them up from the - DataDirectory. */ - first_thunk_address = a->DataDirectory[PE_IMPORT_ADDRESS_TABLE].VirtualAddress; - thunk_size = a->DataDirectory[PE_IMPORT_ADDRESS_TABLE].Size; - import_table_size = a->DataDirectory[PE_IMPORT_TABLE].Size; -#endif } /* A support function for below. */ @@ -1010,7 +989,7 @@ _bfd_XXi_swap_scnhdr_out (bfd * abfd, void * in, void * out) (0x02000000). Also, the resource data should also be read and writable. */ - /* FIXME: Alignment is also encoded in this field, at least on PPC and + /* FIXME: Alignment is also encoded in this field, at least on ARM-WINCE. Although - how do we get the original alignment field back ? */ @@ -1256,14 +1235,6 @@ static char * dir_names[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] = N_("Reserved") }; -#ifdef POWERPC_LE_PE -/* The code for the PPC really falls in the "architecture dependent" - category. However, it's not clear that anyone will ever care, so - we're ignoring the issue for now; if/when PPC matters, some of this - may need to go into peicode.h, or arguments passed to enable the - PPC- specific code. */ -#endif - static bfd_boolean pe_print_idata (bfd * abfd, void * vfile) { @@ -1271,11 +1242,6 @@ pe_print_idata (bfd * abfd, void * vfile) bfd_byte *data; asection *section; bfd_signed_vma adj; - -#ifdef POWERPC_LE_PE - asection *rel_section = bfd_get_section_by_name (abfd, ".reldata"); -#endif - bfd_size_type datasize = 0; bfd_size_type dataoff; bfd_size_type i; @@ -1331,56 +1297,6 @@ pe_print_idata (bfd * abfd, void * vfile) dataoff = addr - section->vma; -#ifdef POWERPC_LE_PE - if (rel_section != 0 && rel_section->size != 0) - { - /* The toc address can be found by taking the starting address, - which on the PPC locates a function descriptor. The - descriptor consists of the function code starting address - followed by the address of the toc. The starting address we - get from the bfd, and the descriptor is supposed to be in the - .reldata section. */ - - bfd_vma loadable_toc_address; - bfd_vma toc_address; - bfd_vma start_address; - bfd_byte *data; - bfd_vma offset; - - if (!bfd_malloc_and_get_section (abfd, rel_section, &data)) - { - free (data); - return FALSE; - } - - offset = abfd->start_address - rel_section->vma; - - if (offset >= rel_section->size || offset + 8 > rel_section->size) - { - free (data); - return FALSE; - } - - start_address = bfd_get_32 (abfd, data + offset); - loadable_toc_address = bfd_get_32 (abfd, data + offset + 4); - toc_address = loadable_toc_address - 32768; - - fprintf (file, - _("\nFunction descriptor located at the start address: %04lx\n"), - (unsigned long int) (abfd->start_address)); - fprintf (file, - /* xgettext:c-format */ - _("\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"), - start_address, loadable_toc_address, toc_address); - free (data); - } - else - { - fprintf (file, - _("\nNo reldata section! Function descriptor not decoded.\n")); - } -#endif - fprintf (file, _("\nThe Import Tables (interpreted %s section contents)\n"), section->name); @@ -1985,33 +1901,6 @@ pe_print_pdata (bfd * abfd, void * vfile) bfd_fprintf_vma (abfd, file, prolog_end_addr); fprintf (file, " %x", em_data); #endif - -#ifdef POWERPC_LE_PE - if (eh_handler == 0 && eh_data != 0) - { - /* Special bits here, although the meaning may be a little - mysterious. The only one I know for sure is 0x03 - Code Significance - 0x00 None - 0x01 Register Save Millicode - 0x02 Register Restore Millicode - 0x03 Glue Code Sequence. */ - switch (eh_data) - { - case 0x01: - fprintf (file, _(" Register save millicode")); - break; - case 0x02: - fprintf (file, _(" Register restore millicode")); - break; - case 0x03: - fprintf (file, _(" Glue code sequence")); - break; - default: - break; - } - } -#endif fprintf (file, "\n"); } |