aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
AgeCommit message (Collapse)AuthorFilesLines
2002-02-15 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.Alan Modra1-24/+41
Correct value returned in "end" for "0x<non-hex>".
2002-01-30Tidy up formatting in bfd-in2.hNick Clifton1-125/+118
2002-01-24fix typoNick Clifton1-1/+1
2001-12-17hash bfd sections for fast lookup and create.Alan Modra1-2/+8
bfd/ChangeLog * bfd.c (struct _bfd): Add section_htab, section_tail. * libbfd-in.h (_bfd_delete_bfd): Declare. (bfd_section_hash_newfunc): Declare. * opncls.c (_bfd_new_bfd): Free memory on failure. Init section_htab and section_tail. (_bfd_delete_bfd): New function. (bfd_openr): Use it. (bfd_fdopenr): Likewise. (bfd_openstreamr): Likewise. (bfd_openw): Likewise. (bfd_close): Likewise. (bfd_close_all_done): Likewise. (bfd_release): Comment. * section.c (struct section_hash_entry): New. (bfd_section_hash_newfunc): New function. (section_hash_lookup): Define. (bfd_section_init): New function, split out from bfd_make_section_anyway. (bfd_get_section_by_name): Lookup via hash table. (bfd_get_unique_section_name): Likewise. (bfd_make_section_old_way): Rewrite to use hash table. (bfd_make_section_anyway): Likewise. (bfd_make_section): Likewise. Return NULL for attempts to make BFD_{ABS,COM,UND,IND}_SECTION_NAME. (_bfd_strip_section_from_output): Adjust section_tail if needed. * configure.in: Bump bfd version. * configure: Regenerate. * libbfd.h: Regenerate. * bfd-in2.h: Regenerate. ld/ChangeLog * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust section_tail when fiddling with section list. (gld${EMULATION_NAME}_list_options): Ensure sentences aren't broken into separate strings to make translation easier. * emultempl/mmo.em (mmo_place_orphan): Adjust section_tail when fiddling with section list. * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
2001-10-30Add MMIX supportNick Clifton1-0/+1
2001-10-06 * bfd.c (bfd_assert): Report bfd version.Alan Modra1-5/+6
(_bfd_abort): Likewise.
2001-09-26 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,Alan Modra1-38/+5
VA_OPEN, VA_FIXEDARG, VA_CLOSE. (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
2001-09-20 * bfd.c (bfd_archive_filename): New function.Alan Modra1-0/+48
* 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.
2001-09-19Locale changes from Bruno Haible <haible@clisp.cons.org>.H.J. Lu1-5/+4
2001-09-18Touches most files in bfd/, so likely will be blamed for everything..Alan Modra1-6/+6
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.
2001-08-24* bfd.c (bfd_alt_mach_code): New function.Alexandre Oliva1-0/+55
* bfd-in2.h: Rebuilt.
2001-08-17 * bfd.c (bfd_get_gp_size): Return an unsigned int.Alan Modra1-4/+4
(bfd_set_gp_size): Make param unsigned. * bfd-in2.h: Regenerate. * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather than calling bfd_get_gp_size. * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise. * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2001-08-17 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.Alan Modra1-0/+2
(bfd_errmsgs): Add corresponding message. * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when finding an archive that contains different format object files. Return bfd_error_wrong_object_format for this case. * format.c: Formatting fixes. s/CONST/const/. (bfd_check_format_matches): Accept archives that give bfd_error_wrong_object_format if no full match is found. Tidy code handling matching_vector. Don't return a pointer to freed memory in `matching'. Handle ambiguous matches as for partial archive matches. * bfd-in2.h: Regenerate.
2001-08-11replace direct invocation og elf vma print functions with indirect invocationNick Clifton1-2/+2
2001-08-102001-08-10 H.J. Lu <hjl@gnu.org>H.J. Lu1-2/+4
* bfd.c (bfd_sprintf_vma): Fix a typo in the last change. (bfd_fprintf_vma): Likewise.
2001-08-102001-08-10 H.J. Lu <hjl@gnu.org>H.J. Lu1-2/+2
* bfd.c (bfd_sprintf_vma): Don't return void. (bfd_fprintf_vma): Likewise.
2001-08-092001-08-09 H.J. Lu <hjl@gnu.org>H.J. Lu1-0/+22
* bfd-in.h (bfd_sprintf_vma): New prototype. (bfd_fprintf_vma): Likewise. (bfd_elf_sprintf_vma): Likewise. (bfd_elf_fprintf_vma): Likewise. (bfd_printf_vma): New. Defined with bfd_fprintf_vma. * bfd-in2.h: Regenerated. * bfd.c (bfd_sprintf_vma): New. Defined. (bfd_fprintf_vma): Likewise. * elf.c (bfd_elf_sprintf_vma): New. Defined. (bfd_elf_fprintf_vma): Likewise.
2001-08-09Fix formattingNick Clifton1-79/+91
2001-07-03Support DJGPP COFF targets in bfd_get_sign_extend_vma()Nick Clifton1-0/+12
2001-05-11 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffixJakub Jelinek1-0/+3
fields, change sec into secinfo. (struct sec_merge_info): Add chain, remove last fields. (struct sec_merge_sec_info): Add next, sec, psecinfo fields. (sec_merge_hash_lookup): If lookup could not use a string only because it has bad alignment, mark the old string for deletion. (sec_merge_add): Add secinfo argument. Don't compute entry's position, instead record the section. (sec_merge_emit): Update for the sec into secinfo change in struct sec_merge_hash_entry. (_bfd_merge_section): Only record the section for merging, defer putting strings into the hash table. (cmplengthentry, last4_eq, last_eq, record_section, merge_strings, _bfd_merge_sections): New functions. (_bfd_merged_section_offset): Update for the sec_merge_hash_entry changes. * libbfd-in.h (_bfd_merge_sections): Add prototype. (_bfd_nolink_bfd_merge_sections): Define. * libbfd.h: Likewise. (bfd_generic_merge_sections): Add prototype. * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections. (struct bfd_target): Likewise. * bfd.c (bfd_merge_sections): Define. * bfd-in2.h: Rebuilt. * elf.c (_bfd_elf_merge_sections): New function. * elf-bfd.h (_bfd_elf_merge_sections): Add prototype. * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define. * reloc.c (bfd_generic_merge_sections): New function. * vms.c (vms_bfd_merge_sections): New function. * aout-adobe.c (aout_32_bfd_merge_sections): Define. * aout-target.h (MY_bfd_merge_sections): Define. * aout-tic30.c (MY_bfd_merge_sections): Define. * binary.c (binary_bfd_merge_sections): Define. * bout.c (b_out_bfd_merge_sections): Define. * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define. * coffcode.c (coff_bfd_merge_sections): Define. * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define. * i386msdos.c (msdos_bfd_merge_sections): Define. * i386os9k.c (os9k_bfd_merge_sections): Define. * ieee.c (ieee_bfd_merge_sections): Define. * ihex.c (ihex_bfd_merge_sections): Define. * nlm-target.h (nlm_bfd_merge_sections): Define. * oasys.c (oasys_bfd_merge_sections): Define. * ppcboot.c (ppcboot_bfd_merge_sections): Define. * som.c (som_bfd_merge_sections): Define. * srec.c (srec_bfd_merge_sections): Define. * tekhex.c (tekhex_bfd_merge_sections): Define. * versados.c (versados_bfd_merge_sections): Define. * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define. * ldlang.c (lang_process): Call bfd_merge_sections.
2001-03-08Update copyright noticesNick Clifton1-1/+2
2001-01-232001-01-23 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-1/+0
* aoutx.h: Fix formatting. * bfd.c: Likewise. * bfd-in2.h: Likewise. * bfd-in.h: Likewise. * cpu-i386.c: Likewise. * cpu-m68hc11.c: Likewise. * dwarf2.c: Likewise. * elf64-x86-64.c: Likewise. * format.c: Likewise. * freebsd.h: Likewise. * hash.c: Likewise. * hp300hpux.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise.
2000-11-212000-11-20 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-2/+2
* bfd-in.h: Fix formatting. * bfd-in2.h: Likewise. * bfd.c: Likewise. * bout.c: Likewise.
2000-11-082000-11-08 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-22/+17
* bfd.c: Fix formatting. * binary.c: Likewise. * bout.c: Likewise.
2000-07-31Minor formatting fixes.Nick Clifton1-1/+1
2000-07-18Rename bfd_elf_get_arch_size to bfd_get_arch_sizeNick Clifton1-0/+59
Rename bfd_elf_get_sign_extend_vma to bfd_get_sign_extend_vma
1999-12-10Revert previous patch.Nick Clifton1-3/+0
1999-12-10Change AR for ELF so that common symbols are not included in archive map.Nick Clifton1-0/+3
Change LD for ELF so that archive elements whoes archive map contains a reference to a common symbol will get linkled in. Add new field to bfd_target structure and initialise it for all bfd targets.
1999-09-111999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1-0/+24
* libbfd-in.h (_bfd_abort): Declare. (abort): Define. * bfd.c (_bfd_abort): New function. * libbfd.h: Rebuild.
1999-07-11 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSEDIan Lance Taylor1-2/+2
as appropriate. Fill in structure initializations. Add variable initializations. Add casts. * dwarf1.c (parse_line_table): Change eachLine to unsigned long. (dwarf1_unit_find_nearest_line): Change i to unsigned long.
1999-05-0319990502 sourceware importbinu_ss_19990502Richard Henderson1-0/+1159