diff options
author | Alan Modra <amodra@gmail.com> | 2005-02-20 14:59:07 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-02-20 14:59:07 +0000 |
commit | f075ee0c61d4b9982a7390d3760f764185f5d36e (patch) | |
tree | bfb663a3ea106dcb6b50b35bcf8531daaad1d4bb /bfd/peicode.h | |
parent | a6c442d88114a76fe77ff3e3f6aa62993703759d (diff) | |
download | gdb-f075ee0c61d4b9982a7390d3760f764185f5d36e.zip gdb-f075ee0c61d4b9982a7390d3760f764185f5d36e.tar.gz gdb-f075ee0c61d4b9982a7390d3760f764185f5d36e.tar.bz2 |
include/
* xtensa-isa-internal.h (xtensa_length_decode_fn): Warning fix.
* xtensa-isa.h (xtensa_insnbuf_to_chars): Likewise.
(xtensa_insnbuf_from_chars, xtensa_isa_length_from_chars): Likewise.
include/coff/
* xcoff.h (struct xcoff_loader_info): Warning fix.
bfd/
* bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
* coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
* coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
useless assignments.
(xcoff_write_archive_contents_big): Likewise.
(_bfd_xcoff_put_ldsymbol_name): Likewise.
* coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
* coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
* cofflink.c (process_embedded_commands): Warning fixes.
* cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
Warning fixes.
* dwarf2.c: Warning fixes.
* elf-bfd.h: Likewise.
* elf-eh-frame.c: Likewise.
* elf-strtab.c: Likewise.
* elf.c: Likewise.
* elf32-m68k.c: Likewise.
* elf32-ppc.c: Likewise.
* elf32-sh-symbian.c: Likewise.
* elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
* elf64-sh64.c: Likewise.
* peicode.h: Likewise.
* elf64-mmix.c: Warning fixes.
* elfcode.h: Likewise.
* elfxx-mips.c: Likewise.
* libbfd-in.h: Likewise.
* libbfd.c: Likewise.
* mach-o.c: Likewise.
* merge.c: Likewise.
* mmo.c: Likewise.
* opncls.c: Likewise.
* pef.c: Likewise.
* srec.c: Likewise.
* vms-hdr.c: Likewise.
* vms-tir.c: Likewise.
* xtensa-isa.c: Likewise.
* xtensa-modules.c: Likewise.
* xsym.c: Likewise.
(pstrcmp): Use correct choice of string lengths. Fix return value.
(bfd_sym_module_name): Correct string length.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
Diffstat (limited to 'bfd/peicode.h')
-rw-r--r-- | bfd/peicode.h | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/bfd/peicode.h b/bfd/peicode.h index 8f41793..1282bb9 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -1,6 +1,6 @@ /* Support for the generic parts of PE/PEI, for BFD. - Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 - Free Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, + 2005 Free Software Foundation, Inc. Written by Cygnus Solutions. This file is part of BFD, the Binary File Descriptor library. @@ -130,15 +130,6 @@ typedef struct struct internal_reloc * int_reltab; } pe_ILF_vars; - -static asection_ptr pe_ILF_make_a_section PARAMS ((pe_ILF_vars *, const char *, unsigned int, flagword)); -static void pe_ILF_make_a_reloc PARAMS ((pe_ILF_vars *, bfd_vma, bfd_reloc_code_real_type, asection_ptr)); -static void pe_ILF_make_a_symbol PARAMS ((pe_ILF_vars *, const char *, const char *, asection_ptr, flagword)); -static void pe_ILF_save_relocs PARAMS ((pe_ILF_vars *, asection_ptr)); -static void pe_ILF_make_a_symbol_reloc PARAMS ((pe_ILF_vars *, bfd_vma, bfd_reloc_code_real_type, struct bfd_symbol **, unsigned int)); -static bfd_boolean pe_ILF_build_a_bfd PARAMS ((bfd *, unsigned int, bfd_byte *, bfd_byte *, unsigned int, unsigned int)); -static const bfd_target * pe_ILF_object_p PARAMS ((bfd *)); -static const bfd_target * pe_bfd_object_p PARAMS ((bfd *)); #endif /* COFF_IMAGE_WITH_PE */ /**********************************************************************/ @@ -740,8 +731,8 @@ static jump_table jtab[] = static bfd_boolean pe_ILF_build_a_bfd (bfd * abfd, unsigned int magic, - bfd_byte * symbol_name, - bfd_byte * source_dll, + char * symbol_name, + char * source_dll, unsigned int ordinal, unsigned int types) { @@ -837,10 +828,10 @@ pe_ILF_build_a_bfd (bfd * abfd, vars.int_reltab = (struct internal_reloc *) ptr; ptr += SIZEOF_ILF_INT_RELOCS; - vars.string_table = ptr; - vars.string_ptr = ptr + STRING_SIZE_SIZE; + vars.string_table = (char *) ptr; + vars.string_ptr = (char *) ptr + STRING_SIZE_SIZE; ptr += SIZEOF_ILF_STRINGS; - vars.end_string_ptr = ptr; + vars.end_string_ptr = (char *) ptr; /* The remaining space in bim->buffer is used by the pe_ILF_make_a_section() function. */ @@ -930,7 +921,7 @@ pe_ILF_build_a_bfd (bfd * abfd, id6->contents[0] = ordinal & 0xff; id6->contents[1] = ordinal >> 8; - strcpy (id6->contents + 2, symbol); + strcpy ((char *) id6->contents + 2, symbol); } if (import_name_type != IMPORT_ORDINAL) @@ -1042,7 +1033,7 @@ pe_ILF_build_a_bfd (bfd * abfd, /* Create an import symbol for the DLL, without the .dll suffix. */ - ptr = strrchr (source_dll, '.'); + ptr = (bfd_byte *) strrchr (source_dll, '.'); if (ptr) * ptr = 0; pe_ILF_make_a_symbol (& vars, "__IMPORT_DESCRIPTOR_", source_dll, NULL, 0); @@ -1087,8 +1078,8 @@ pe_ILF_object_p (bfd * abfd) { bfd_byte buffer[16]; bfd_byte * ptr; - bfd_byte * symbol_name; - bfd_byte * source_dll; + char * symbol_name; + char * source_dll; unsigned int machine; bfd_size_type size; unsigned int ordinal; @@ -1225,11 +1216,12 @@ pe_ILF_object_p (bfd * abfd) return NULL; } - symbol_name = ptr; - source_dll = ptr + strlen (ptr) + 1; + symbol_name = (char *) ptr; + source_dll = symbol_name + strlen (symbol_name) + 1; /* Verify that the strings are null terminated. */ - if (ptr[size - 1] != 0 || ((unsigned long) (source_dll - ptr) >= size)) + if (ptr[size - 1] != 0 + || (bfd_size_type) ((bfd_byte *) source_dll - ptr) >= size) { _bfd_error_handler (_("%B: string not null terminated in ILF object file."), abfd); |