summaryrefslogtreecommitdiff
path: root/bfd/peicode.h
Commit message (Collapse)AuthorAgeFilesLines
* Only skip one instance of each prefix character, if they are present.Nick Clifton2003-12-161-4/+34
|
* Index: sim/frv/ChangeLogAndrew Cagney2003-10-311-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-10-30 Andrew Cagney <cagney@redhat.com> * traps.c: Replace "struct symbol_cache_entry" with "struct bfd_symbol". Index: sim/d10v/ChangeLog 2003-10-30 Andrew Cagney <cagney@redhat.com> * simops.c: Replace "struct symbol_cache_entry" with "struct bfd_symbol". Index: sim/common/ChangeLog 2003-10-30 Andrew Cagney <cagney@redhat.com> * sim-trace.c, sim-base.h: Replace "struct symbol_cache_entry" with "struct bfd_symbol". Index: ld/ChangeLog 2003-10-30 Andrew Cagney <cagney@redhat.com> * emultempl/pe.em, pe-dll.c: Replace "struct symbol_cache_entry" with "struct bfd_symbol". Index: bfd/ChangeLog 2003-10-30 Andrew Cagney <cagney@redhat.com> * syms.c: Replace "struct symbol_cache_entry" with "struct bfd_symbol". * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto. * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto. * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto. * bfd-in2.h: Re-generate.
* (coff_swap_scnhdr_in): Only remove padding when processing an executable.Nick Clifton2003-10-221-4/+4
|
* If a section holds uninitialized data and is from an object file or from anNick Clifton2003-04-151-8/+9
| | | | | executable image that has not initialized the s_size field, or if the physical size is padded, use the virtual size (stored in s_paddr) instead.
* (_bfd_XXi_swap_scnhdr_out): Compute ps and ss differently for object files andcagney_frameaddr-20030403-branchpointNick Clifton2003-04-031-21/+22
| | | | | | | | executables. (coff_swap_scnhdr_in): Only set the s_size field for object files or for executables who have not already initialised the field. (bfd_pe_executable_p): New macro. Return true if the PE format bfd is an executable.
* s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. SimplifyAlan Modra2002-11-301-30/+30
| | | | comparisons of bfd_boolean vars with TRUE/FALSE. Formatting.
* * aoutx.h (some_aout_object_p): Clean up tdata properly on error.Alan Modra2002-07-301-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * archive.c (bfd_generic_archive_p): Likewise. * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise. (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol. * coff64-rs6000.c (xcoff64_slurp_armap): Likewise. (xcoff64_archive_p): Likewise. (xcoff64_openr_next_archived_file): Likewise. (xcoff64_archive_p): Clean up tdata properly on error. * coffgen.c (coff_real_object_p): Likewise. (coff_object_p): Release filehdr and opthdr. * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error. * ieee.c (ieee_archive_p): Likewise. * ihex.c (ihex_object_p): Likewise. (ihex_mkobject): Always allocate tdata. * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error. * srec.c (srec_mkobject): Always allocate tdata. (srec_object_p): Clean up tdata properly on error. (symbolsrec_object_p): Likewise. * versados.c (versados_object_p): Likewise. * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc, and bfd_realloc instead of realloc. (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections. * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in place of bfd_malloc, simplifying error freeing. Free hash table too. (vms_object_p): Clean up tdata on error. (vms_mkobject): Don't complain on stderr if vms_initialize fails. (vms_close_and_cleanup): Adjust for bfd_alloc use.
* * aout-adobe.c: Don't compare against "true" or "false.Alan Modra2002-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * aout-target.h: Likewise. * aoutx.h: Likewise. * archive.c: Likewise. * bout.c: Likewise. * cache.c: Likewise. * coff-a29k.c: Likewise. * coff-alpha.c: Likewise. * coff-i386.c: Likewise. * coff-mips.c: Likewise. * coff-or32.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cpu-ns32k.c: Likewise. * ecoff.c: Likewise. * ecofflink.c: Likewise. * elf.c: Likewise. * elf32-arm.h: Likewise. * elf32-cris.c: Likewise. * elf32-d30v.c: Likewise. * elf32-i386.c: Likewise. * elf32-mcore.c: Likewise. * elf32-ppc.c: Likewise. * elf32-sh.c: Likewise. * elf32-sh64.c: Likewise. * elf32-v850.c: Likewise. * elf64-alpha.c: Likewise. * elf64-sh64.c: Likewise. * elfcode.h: Likewise. * elfcore.h: Likewise. * elflink.h: Likewise. * elfxx-mips.c: Likewise. * i386os9k.c: Likewise. * ieee.c: Likewise. * libbfd.c: Likewise. * linker.c: Likewise. * mmo.c: Likewise. * nlm32-alpha.c: Likewise. * nlm32-i386.c: Likewise. * nlm32-ppc.c: Likewise. * nlm32-sparc.c: Likewise. * nlmcode.h: Likewise. * oasys.c: Likewise. * pdp11.c: Likewise. * peicode.h: Likewise. * reloc.c: Likewise. * som.c: Likewise. * srec.c: Likewise. * tekhex.c: Likewise. * vms.c: Likewise. * xcofflink.c: Likewise. * elf64-sparc.c: Edit comment to not use "== false". * aoutf1.h: Don't use "? true : false". * ecoff.c: Likewise. * format.c: Likewise. * ieee.c: Likewise. * linker.c: Likewise. * mmo.c: Likewise. * oasys.c: Likewise.
* * bfd.c (bfd_archive_filename): New function.Alan Modra2001-09-201-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bfd-in2.h: Regenerate. * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename in error messages where the bfd is an input bfd. * aout-cris.c: Likewise. * coff-arm.c: Likewise. * coff-mcore.c: Likewise. * coff-ppc.c: Likewise. * coff-rs6000.c: Likewise. * coff-sh.c: Likewise. * coff-tic54x.c: Likewise. * coff-tic80.c: Likewise. * coff64-rs6000.c: Likewise. * coffcode.h: Likewise. * coffgen.c: Likewise. * cofflink.c: Likewise. * ecofflink.c: Likewise. * elf-hppa.h: Likewise. * elf.c: Likewise. * elf32-arm.h: Likewise. * elf32-cris.c: Likewise. * elf32-gen.c: Likewise. * elf32-hppa.c: Likewise. * elf32-i370.c: Likewise. * elf32-i386.c: Likewise. * elf32-m32r.c: Likewise. * elf32-mcore.c: Likewise. * elf32-mips.c: Likewise. * elf32-ppc.c: Likewise. * elf32-s390.c: Likewise. * elf32-sh.c: Likewise. * elf32-sparc.c: Likewise. * elf32-v850.c: Likewise. * elf64-alpha.c: Likewise. * elf64-gen.c: Likewise. * elf64-ppc.c: Likewise. * elf64-s390.c: Likewise. * elf64-sparc.c: Likewise. * elf64-x86-64.c: Likewise. * elflink.h: Likewise. * elfxx-ia64.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * libbfd.c: Likewise. * pdp11.c: Likewise. * pe-mips.c: Likewise. * peicode.h: Likewise. * srec.c: Likewise. * xcofflink.c: Likewise. * elf32-arm.h: Make _bfd_error_handler calls K&R compatible. * elflink.c (_bfd_elf_create_linker_section): Better grammar for error message. * coff-mcore.c (coff_mcore_relocate_section): Internalionalise error message. * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types. Consolidate error messages, and split long messages to two lines.
* Touches most files in bfd/, so likely will be blamed for everything..Alan Modra2001-09-181-90/+75
| | | | | | | | | | | | | | | | | | | | | | | | o bfd_read and bfd_write lose an unnecessary param and become bfd_bread and bfd_bwrite. o bfd_*alloc now all take a bfd_size_type arg, and will error if size_t is too small. eg. 32 bit host, 64 bit bfd, verrry big files or bugs in linker scripts etc. o file_ptr becomes a bfd_signed_vma. Besides matching sizes with various other types involved in handling sections, this should make it easier for bfd to support a 64 bit off_t on 32 bit hosts that provide it. o I've made the H_GET_* and H_PUT_* macros (which invoke bfd_h_{get,put}_*) generally available. They now cast their args to bfd_vma and bfd_byte * as appropriate, which removes a swag of casts from the source. o Bug fixes to bfd_get8, aix386_core_vec, elf32_h8_relax_section, and aout-encap.c. o Zillions of formatting and -Wconversion fixes.
* For sections containing uninitialised data, only set their size to s_paddrNick Clifton2001-07-051-1/+2
| | | | | if this does not reset their size to zero. MS's latest compilers will set s_paddr to zero.
* Update copyright noticesNick Clifton2001-03-081-1/+2
|
* * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: DefineDJ Delorie2001-02-131-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as _bfd_XXi_only_swap_filehdr_out. (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set pe->force_minimum_alignment to TRUE. (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to PEI_TARGET_SUBSYSTEM. (pe_print_private_bfd_data): Call _bfd_XX_print_private_bfd_data_common() instead of _bfd_pe_print_private_bfd_data_common(). (pe_bfd_copy_private_bfd_data): Call _bfd_XX_bfd_copy_private_bfd_data_common() instead of _bfd_pe_bfd_copy_private_bfd_data_common(). (coff_bfd_copy_private_section_data): Define as _bfd_XX_bfd_copy_private_section_data instead of _bfd_pe_bfd_copy_private_section_data. (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead of a _bfd_pe_get_symbol_info. * peigen.c: Delete. * peXXigen.c: Renamed from peigen.c. (COFF_WITH_XX): Define this macro (will get expanded into COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being compiled as peigen.c or pepigen.c. [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to define the canonical PEP structures and definitions. (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in effect, enforce minimum file and section alignments. If extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN, so, by default, this is a no-op). * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep. (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to _bfd_pefoo if it's not defined. Use these macros to define coff swap macros. * libcoff.h (pe_tdata): Add members target_subsystem and force_minimum_alignment. * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to COFF_WITH_pep. (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM. * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of peigen.lo. * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep. (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and PEPAOUTHDR. * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo. (BFD64_BACKENDS_CFILES): Mention pepigen.c (peigen.c): Add rule to generate from peXXigen.c. (pepigen.c): Ditto. (pepigen.lo): List dependencies for pepigen.lo. * unwind-ia64.c (unw_decode_x1): Declare code arg with ATTRIBUTE_UNUSED. (unw_decode_x2): Ditto. (unw_decode_x3): Ditto. (unw_decode_x4): Ditto. * pe.h (PEPAOUTSZ): Rename from PEP64AOUTSZ. Rename from PEPAOUTHDR.
* 2001-02-06 H.J. Lu <hjl@gnu.org>H.J. Lu2001-02-061-44/+30
| | | | | | | * bfd/peicode.h (coff_swap_filehdr_in): Remove the e_magic checking. (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
* 2001-01-02 Kazu Hirata <kazu@hxi.com>Kazu Hirata2001-01-021-106/+104
| | | | * peicode.h: Fix formatting.
* Fixes to allow sources to compile under Solaris 2.8Nick Clifton2000-12-211-4/+4
|
* * peicode.h (coff_swap_filehdr_in): can't use e_magic because weDJ Delorie2000-06-301-0/+5
| | | | | can't assume the PE header is at 0x80. * coff/pe.h: clarify a comment
* Applied Stephane Carrez <Stephane.Carrez@worldnet.fr> patches to add supportNick Clifton2000-06-191-2/+0
| | | | for m68hc11 and m68hc12 processors.
* Fix arm-epoc-pe build problem:Joern Rennecke2000-06-131-2/+2
| | | | | * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of armpei_little_vec.
* Remove U suffix from constants for K&R compilers.Alan Modra2000-04-131-2/+2
| | | | Fix a couple of 64 bit nits.
* Further LINK6 bug fix.Nick Clifton2000-03-061-7/+5
|
* fix LINK6 code.Nick Clifton2000-03-061-47/+85
|
* Fix building with --enable-targets=allNick Clifton2000-03-011-4/+4
|
* Add WinCE support.Nick Clifton2000-02-281-12/+856
|
* fix PE file format detectionNick Clifton1999-12-281-1/+4
|
* Move PE format object file detection code into common place.Nick Clifton1999-12-171-0/+81
|
* 1999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1999-09-121-2/+14
| | | | | | | | * peicode.h (coff_swap_scnhdr_in): If COFF_IMAGE_WITH_PE, the get the overflow of the s_nlnno field from the s_nreloc field. * peigen.c (_bfd_pei_swap_scnhdr_out): If doing a final link, swap the s_nlnno overflow of the .text section into the s_nreloc field.
* 1999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1999-09-121-0/+2
| | | | | | * libpei.h (_bfd_pe_bfd_get_symbol_info): Declare. * peigen.c (_bfd_pe_bfd_get_symbol_info): New function. * peicode.h (coff_get_symbol_info): Define.
* 1999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1999-09-111-1929/+51
| | | | | | | | | | | | | * libpei.h: New file, broken out of peicode.h. * peigen.c: New file, broken out of peicode.h. * peicode.h: A bunch of code moved out to libpei.h and peigen.c. * configure.in: Add peigen.lo to list of files required for each PE target. * Makefile.am: Rebuild dependencies. (BFD32_BACKENDS): Add peigen.lo. (BFD32_BACKENDS_CFILES): Add peigen.c. (SOURCE_HFILES): Add libpei.h. * configure, Makefile.in: Rebuild.
* 1999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1999-09-111-6/+12
| | | | | | | * peicode.h (coff_swap_scnhdr_in): Don't check for a special section name of _BSS; check IMAGE_SCN_CNT_UNINITIALIZED_DATA instead. Don't clear the s_paddr field for an uninitialized data section.
* 1999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1999-09-111-0/+2
| | | | | | * coffcode.h (coff_mkobject_hook): Set timestamp field in coff_data_type to f_timdat. * peicode.h (pe_mkobject_hook): Likewise.
* 1999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1999-09-111-0/+15
| | | | | * peicode.h (coff_swap_filehdr_in): Check the NT executable magic number if COFF_IMAGE_WITH_PE.
* 1999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1999-09-111-0/+3
| | | | | | | | | * coffcode.h (coff_mkobject_hook): If COFF_WITH_PE, set HAS_DEBUG to the reverse of IMAGE_FILE_DEBUG_STRIPPED. (coff_write_object_contents): Set IMAGE_FILE_DEBUG_STRIPPED if there is no SEC_DEBUGGING section. * peicode.h (pe_mkobject_hook): Set HAS_DEBUG to the reverse of IMAGE_FILE_DEBUG_STRIPPED.
* 1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>Ian Lance Taylor1999-08-081-0/+2
| | | | | | | | | | | | | * section.c (SEC_SHARED): Define. * coffcode.h (sec_to_styp_flags): Handle SEC_SHARED. (styp_to_sec_flags): Likewise. * peicode.h (coff_swap_scnhdr_out): Likewise. * bfd-in2.h: Rebuild. 1999-08-08 Ian Lance Taylor <ian@zembu.com> * coffcode.h (coff_classify_symbol): Comment out part of 1999-08-05 change which breaks cygwin DLLs.
* * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSEDIan Lance Taylor1999-07-121-5/+5
| | | | | | | | | | | | | | | | | | | | | as appropriate. Use EMPTY_HOWTO as appropriate. Fill in structure initializations. Add casts. * reloc.c (EMPTY_HOWTO): Define. * bfd-in2.h: Rebuild. * coff-h8300.c (h8300_reloc16_extra_cases): Remove useless comparisons against 0. * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Change previous_ibfd_e_flags to unsigned long. * vms.h (struct vms_private_data_struct): Change section_count to unsigned. * vms-gsd.c (_bfd_vms_slurp_gsd): Change psect_idx to unsigned. (_bfd_vms_write_gsd): Change symnum to unsigned. * vms-hdr.c (_bfd_vms_write_hdr): Change symnum to unsigned. * vms-tir.c (etir_sta): Change psect to unsigned. (alloc_section): Change idx to unsigned. (tir_sta, tir_ctl): Change psect to unsigned. (_bfd_vms_write_tir): Change len and before to bfd_size_type. * vms.c (priv_section_count): Change to unsigned.
* fix copyrightIan Lance Taylor1999-06-261-1/+1
|
* 1999-06-26 Mumit Khan <khan@xraylith.wisc.edu>Ian Lance Taylor1999-06-261-1/+5
| | | | | * peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections as writable PE sections.
* * peicode.h (coff_swap_sym_in): When we create the actual sectionDJ Delorie1999-05-251-0/+1
| | | | | | to reflect the not-there section C_SECTION symbols refer to, change the symbol class to C_STAT as the section is now really there.
* * ecoff.c (_bfd_ecoff_write_armap): give the symtab element aDJ Delorie1999-05-111-0/+50
| | | | | | | | | | | | | | | reasonable mode until "ar x" is smart enough to skip it (fixes gcc/libgcc.a builds on mips-ecoff targets * coffcode.h (styp_to_sec_flags): Explain how COMDATs are supposed to work. Hack to support MS import libraries, which use different COMDAT types than GNU. (coff_slurp_symbol_table): C_SECTION symbols are local; they refer to implied zero-length sections (see peicode below) * coffgen.c (coff_get_normalized_symtab): Properly read long MS filename symbols, which use one *or more* auxents. * coffswap.h (coff_swap_aux_in): ditto * peicode.h (coff_swap_sym_in): Build the implied zero-length sections
* Initial revisionRichard Henderson1999-05-031-0/+2144