aboutsummaryrefslogtreecommitdiff
path: root/bfd/som.c
AgeCommit message (Collapse)AuthorFilesLines
1994-04-04 * som.c (som_slurp_string_table): Use malloc to allocate spaceJeff Law1-6/+39
for the cached copy of the native string table. (som_slurp_symbol_table): Likewise for the native symbol table. (som_slurp_reloc_table): Likewise for the native and generic relocation tables. (som_bfd_free_cached_info): Free the cached native strings, symbols, and relocations. Also free the canonical cached relocations.
1994-04-01 * targets.c (bfd_target): Add _bfd_free_cached_info field.Ian Lance Taylor1-0/+1
* bfd.c (bfd_free_cached_info): Define. * bfd-in.h (JUMP_TABLE): Add _bfd_free_cached_info. * bfd-in2.h: Rebuilt. * All backends: Initialize bfd_free_cached_info entry point to bfd_true.
1994-03-31 * som.c (som_begin_writing): New approach at dealing with holesJeff Law1-18/+27
in executables left by the HP linker. Does not rely on subspace alignments as subspaces are *NOT* guaranteed to be properly aligned in an executable (can you believe that!).
1994-03-30Wed Mar 30 16:25:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)Ian Lance Taylor1-17/+17
Changes to let BFD return an error indication from get_symtab_upper_bound, bfd_canonicalize_symtab, bfd_get_reloc_upper_bound, and bfd_canonicalize_reloc. They now return long instead of unsigned int, and use -1 to indicate an error. Along the way, rename get_symtab_upper_bound to bfd_get_symtab_upper_bound. * bfd.c (bfd_get_reloc_upper_bound): Return long, and -1 on errors. (bfd_canonicalize_reloc): Likewise. * syms.c (bfd_get_symtab_upper_bound): Renamed from get_symtab_upper_bound. * targets.c (bfd_target): Renamed _get_symtab_upper_bound to _bfd_get_symtab_upper_bound, and changed it and _bfd_canonicalize_symtab and _get_reloc_upper_bound and _bfd_canonicalize_reloc to all return long. * aoutx.h (NAME(aout,get_symtab)): Return long, and -1 on errors. (NAME(aout,canonicalize_reloc)): Likewise. (NAME(aout,get_reloc_upper_bound)): Likewise. (NAME(aout,get_symtab_upper_bound)): Likewise. * bout.c (b_out_canonicalize_reloc): Likewise. (b_out_get_reloc_upper_bound): Likewise. * coffcode.h (coff_canonicalize_reloc): Likewise. * coffgen.c (coff_get_symtab_upper_bound): Likewise. (coff_get_symtab): Likewise. (coff_get_reloc_upper_bound): Likewise. * ecoff.c (ecoff_get_symtab_upper_bound): Likewise. (ecoff_get_symtab): Likewise. (ecoff_canonicalize_reloc): Likewise. * elfcode.h (elf_get_symtab_upper_bound): Likewise. (elf_get_reloc_upper_bound): Likewise. (elf_canonicalize_reloc): Likewise. (elf_get_symtab): Likewise. * hp300hpux.c (MY(get_symtab)): Likewise. (MY(get_symtab_upper_bound)): Likewise. (MY(canonicalize_reloc)): Likewise. * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise. * ieee.c (ieee_slurp_external_symbols): Change return type to boolean. Check for errors from get_symbol. (ieee_slurp_symbol_table): Change return type to boolean. Check for errors from ieee_slurp_external_symbols. (ieee_get_symtab_upper_bound): Return long, and -1 on errors. (ieee_get_symtab): Likewise. (ieee_get_reloc_upper_bound): Likewise. (ieee_canonicalize_reloc): Likewise. * mipsbsd.c (MY(canonicalize_reloc)): Likewise. * nlmcode.h (nlm_get_symtab_upper_bound): Likewise. (nlm_get_symtab): Likewise. (nlm_get_reloc_upper_bound): Likewise. (nlm_canonicalize_reloc): Likewise. * oasys.c (oasys_get_symtab_upper_bound): Likewise. (oasys_get_symtab): Likewise. (oasys_get_reloc_upper_bound): Likewise. (oasys_canonicalize_reloc): Likewise. * som.c (som_get_symtab_upper_bound): Likewise. (som_get_symtab): Likewise. (som_get_reloc_upper_bound): Likewise. (som_canonicalize_reloc): Likewise. * srec.c (srec_get_symtab_upper_bound): Likewise. (srec_get_symtab): Likewise. (srec_get_reloc_upper_bound): Define as bfd_0l. (srec_canonicalize_reloc): Likewise. * tekhex.c (tekhex_get_symtab): Return long, and -1 on errors. (tekhex_get_symtab_upper_bound): Likewise. (tekhex_get_reloc_upper_bound): Define as bfd_0l. (tekhex_canonicalize_reloc): Likewise. * libaout.h (NAME(aout,get_symtab_upper_bound)): Change declaration to return long. (NAME(aout,get_symtab)): Likewise. (NAME(aout,canonicalize_reloc)): Likewise. (NAME(aout,get_reloc_upper_bound)): Likewise. * libcoff-in.h (coff_get_symtab_upper_bound): Likewise. (coff_get_symtab): Likewise. (coff_get_reloc_upper_bound): Likewise. * libecoff.h (ecoff_get_symtab_upper_bound): Likewise. (ecoff_get_symtab): Likewise. (ecoff_canonicalize_reloc): Likewise. * libelf.h (bfd_elf32_get_symtab_upper_bound): Likewise. (bfd_elf32_get_symtab): Likewise. (bfd_elf32_get_reloc_upper_bound): Likewise. (bfd_elf32_canonicalize_reloc): Likewise. (bfd_elf64_get_symtab_upper_bound): Likewise. (bfd_elf64_get_symtab): Likewise. (bfd_elf64_get_reloc_upper_bound): Likewise. (bfd_elf64_canonicalize_reloc): Likewise. * libnlm.h (nlmNAME(get_symtab_upper_bound)): Likewise. (nlmNAME(get_symtab)): Likewise. (nlmNAME(get_reloc_upper_bound)): Likewise. (nlmNAME(canonicalize_reloc)): Likewise. * archive.c (compute_and_write_armap): Use error_return and no_memory_return labels rather than freeing information in various places. Change storage, symcount and src_count to long. Check errors from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. * bout.c (b_out_relax_section): Change reloc_size to long. Check for errors from bfd_get_reloc_upper_bound and bfd_canonicalize_reloc. (b_out_get_relocated_section_contents): Likewise. * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise. * elf32-mips.c: Likewise. * elf32-hppa.c (hppa_elf_stub_finish): Likewise. (hppa_look_for_stubs_in_section): Check for errors from bfd_get_symtab_upper_bound, bfd_canonicalize_symtab, and bfd_canonicalize_reloc. * ecofflink.c (bfd_ecoff_debug_accumulate_other): Check for errors from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. * linker.c (generic_link_read_symbols): Likewise. (_bfd_generic_final_link): Check for errors from bfd_get_reloc_upper_bound and bfd_canonicalize_reloc. * reloc.c (bfd_generic_get_relocated_section_contents): Likewise. * reloc16.c (bfd_coff_reloc16_relax_section): Likewise. (bfd_coff_reloc16_get_relocated_section_contents): Likewise. * libbfd.c (bfd_0l): New function. * libbfd-in.h (bfd_0l): Declare. * aix386-core.c: Change get_symtab_upper_bound, get_symtab, get_reloc_upper_bound, and canonicalize_reloc to use bfd_0l rather than bfd_0u. * cisco-core.c, hppabsd-core.c, hpux-core.c: Likewise. * irix-core.c, osf-core.c, ptrace-core.c, trad-core.c: Likewise. * bfd-in2.h: Rebuilt. * libbfd.h: Rebuilt. * libcoff.h: Rebuilt. * nlm32-sparc.c (nlm_sparc_read_reloc): Remove unused variables temp and name.
1994-03-26 * som.c (som_get_section_contents): New function. Do not tryJeff Law1-1/+19
to actually read data from a section that doesn't have either SEC_LOAD or SEC_DEBUGGING set (eg $BSS$) just return true.
1994-03-26 * libbfd.c (bfd_read): Set bfd_error as appropriate for a shortJeff Law1-250/+88
read. (bfd_error_system_call or bfd_error_file_truncated). * som.c: Do not blindly set bfd_error_system_call after a failing bfd_read, bfd_write, or bfd_seek. In a few places (like som_object_p) override the error status set by bfd_read. * aix386-core.c, aout-encap,c archive.c, bout.c: Likewise. * coff-rs6000.c, coffgen.c ecoff.c, elf.c: Likewise. * elf32-hppa.c, elfcode.h, hp300hpux.c, i386lynx.c: Likewise. * nlm32-alpha.c, nlm32-i386.c, nlm32-sparc.c: Likewise. * som.c: Check return values from several bfd_{seek,read,write} calls that we just assumed were not failing.
1994-03-24 * som.c (som_bfd_prep_for_ar_write): Ignore non-SOM objects.Jeff Law1-2/+21
(som_bfd_ar_write_symbol_stuff, som_write_armap): Likewise.
1994-03-21 * som.c (bfd_section_from_som_symbol): Only to do the valueJeff Law1-4/+9
comparison for function symbols within executables.
1994-03-20 * som.c (bfd_section_from_som_symbol): Renamed fromJeff Law1-13/+34
som_section_from_subspace_index. Pass in a native SOM symbol. For executables, iterate through the sections to find out which contains the symbol's address rather than using the symbol_info field. (symbol_info has a different meaning for dynamicly linked executables.)
1994-03-20 * som.c (som_begin_writing): Fix braino (one call to alignJeff Law1-1/+2
space/subspace data was done unconditionally rather than just for executables.)
1994-03-20 * som.c (som_begin_writing): Align text in all executables toJeff Law1-1/+5
make HPUX kernel happy. Fixes strip/objcopy for shared executables.
1994-03-19 * som.c (som_begin_writing): Account for alignment needs ofJeff Law1-0/+23
subspaces too when writing executables. Never request a negative bss size. Fixes some problems with demand paged executables, still having problems with pure executables and shared executables.
1994-03-19 * som.h (som_copyable_section_data_struct): New structureJeff Law1-92/+215
containing all the private section information which needs to be copied from input section to output section during objcopy or strip. (som_section_data_struct): Remove several fields now in som_copyable_section_data_struct. Make the space and subspace dictionaries be pointers (to save space when only reading objects). * som.c (bfd_som_set_section_attributes): Now returns a boolean; some references changed. Allocate a copyable data stucture if none exists. Store info into the copyable data structure. (bfd_som_set_subsection_attributes): Likewise. (som_is_space, som_is_subspace, som_is_container): New functions. Use these instead of directly accessing private data. (som_prep_headers): Allocate space and subspace headers here. Fill in some fields in the space/subspace headers from the copyable data. (som_bfd_copy_private_section_data): Only copy the stuff that we really need to make objcopy and strip work. Allocate the copy_data structure for the output bfd before copying.
1994-03-19 * som.h (struct som_exec_data): New structure to hold execJeff Law1-35/+68
info that must be preserved when running objcopy/strip. (struct somdata): Add new "exec_data" field and accessor macro. Add some comments on how the various fields are used. (som_section_data_struct): Make is_space and is_subspace bitfields. Delete unused subspace_index. All references now use the target_index field within the section structure itself. * som.c (make_unique_section): Delete unused declaration. (som_bfd_copy_private_bfd_data): New function. (som_object_setup): Allocate space for and save exec information that needs to be copied during objcopy/strip. (som_mkobject): Do not allocate space for a file header here. It is not used when only reading SOM objects. (som_prep_headers): Allocate space for and attach a file header to the output bfd. For executables, use the saved system_id value rather than trying to guess the right value. Do not abort wwhen setting file_hdr->entry* for executables. (som_begin_writing): For executables, set the exec_entry and exec_flags fields. (som_copy_private_backend_section_data): Always return a value.
1994-03-19 * libhppa.h (PA_PAGESIZE): Define.Jeff Law1-7/+106
* som.c (SOM_ALIGN): Define. (som_begin_writing): If writing an executable, initialize all fields in the exec header to zero. Update fields in the exec header as sizes of loadable subspaces are computed. Carefully preserve alignments when building executables. Actually write the exec after all the fields are filled in.
1994-03-19 * Better long-filename handling. Reads SOM ABI compliant extendedJeff Law1-16/+56
names, but doesn't quite write compliant extended names yet. * som.c (som_slurp_extended_name_table): Delete function. The generic code will handle things correctly. (som_slurp_armap): Seek to the beginning of the next member. (normalize): New function. (som_bfd_ar_write_symbol_stuff): Take the size of the extended name table into account when computing the file offsets in the SOM dictionary. Make sure to align to an even boundary. (som_write_armap): Initialize the checksum to zero. (ar_maxchars): Fix. Opps.
1994-03-17 * aoutx.h, elfcode.h, coff-alpha.c, bout.c, ecoff.c, ecofflink.c,Jim Kingdon1-20/+30
elf32-hppa.c, elf32-mips.c, linker.c, som.c, sunos.c: If malloc(0) returns NULL, it is not an error. It's possible that some of these checks are not necessary (because the size can never be zero), but putting in the checks is the conservative thing to do in light of the fact that some of these malloc calls replaced unchecked alloca calls, in which a zero argument would work fine.
1994-03-16 * bfd-in2.h, libbfd.h, libcoff.h: Rebuilt.Jeff Law1-0/+37
* bfd-in.h (JUMP_TABLE): Add new entries to the jump table for bfd_copy_private_section_data, bfd_copy_private_bfd_data, and bfd_is_local_label. * targets.c: Add new entries to the bfd_target structure. * bfd.c (bfd_copy_private_bfd_data): New definition. * section.c (bfd_copy_private_section_data): New definition. * syms.c (bfd_is_local_label): New definition. * libbfd-in.h (bfd_generic_is_local_label): Declare. * libbfd.c (bfd_generic_is_local_label): New function. * *-core.c: Provide default definitions for new functions in the target vector which all point to bfd_false. * aout-target.h, coffcode.h, elf32-target.h elf64-target.h, ieee.c libaout.h, libecoff.h, nlm-target.h, oasys.c, srec.c, tekhex.c Default new vectors for copying private backend data to bfd_true. Default new vector for determining if a symbol is a local label to bfd_generic_is_local_label. * som.c (som_bfd_copy_private_section_data): New function. (som_bfd_is_local_label): New function. (som_bfd_copy_private_bfd_data): For now default to bfd_true. * elf32-hppa.c (hppa_elf_is_local_label): New function.
1994-03-15 * som.c (som_prep_for_fixups): A relocation involving the sectionJeff Law1-8/+16
symbol for the *ABS* section is really a relocation involving no symbol. (som_slurp_symbol_table): Do not set BSF_GLOBAL or BSF_EXPORT for undefined symbols. Correctly distinguish between debugger symbols and section symbols.
1994-03-15 * som (setup_sections): Set SEC_DEBUGGING and the section attributesJeff Law1-0/+18
for spaces and subspaces.
1994-03-14 * som.c (som_bfd_count_ar_symbols): Fix typo.Jeff Law1-1/+1
1994-03-14 * som.c (som_object_setup): Set EXEC_P, D_PAGED, WP_TEXT, andJeff Law1-46/+42
HAS_RELOC based on the object's magic number. (make_unique_section): Delete function. BFD and its users are prepared to handle multiple sections with the same name. (setup_sections): Allocate space on the BFD's obstack to hold section names. Use bfd_make_setion_anyway rather than the obsolete make_unique_section. (som_prep_headers): Choose the correct SOM magic number based on the BFD's flags. (som_bfd_fill_in_ar_symbols): Return false, not NULL on error.
1994-03-10 * libbfd-in.h: Remove alloca cruft. It was missing some necessaryJim Kingdon1-88/+213
cruft (like the #pragma alloca for AIX). In addition to that problem, the C alloca calls xmalloc, which means checking for being out of memory can't work right. The following changes remove all uses of alloca from BFD. * hosts/solaris2.h: Remove alloca cruft. * som.c: Replace alloca with a fixed size auto array. * aoutx.h, elfcode.h, nlmcode.h, bout.c, coff-alpha.c, ecoff.c, ecofflink.c, elf32-hppa.c, elf32-mips.c, linker.c, reloc.c, som.c: Replace alloca with malloc and appropriate error checking and freeing. * linker.c: Replace alloca with obstack_alloc. * libbfd.h: Rebuilt.
1994-03-02 * som.[ch]: Do not include libhppa.h in som.c, instead includeJeff Law1-1/+0
it in som.h. * elf32-hppa.[ch]: Do not include libhppa.h in elf32-hppa.c, instead include it in elf32-hppa.h.
1994-03-02 * som.c (log2): Return -1 on error rather than aborting.Jeff Law1-6/+8
(setup_sections): Bubble up an error from log2.
1994-03-02 * som.c (hppa_som_gen_reloc_type): Use correct enum type forJeff Law1-7/+6
field parameter. (bfd_som_set_section_attributes): Use unsigned int rather than unsigned char to avoid GNU-C extensions. (bfd_som_attach_aux_hdr): Return a boolean to indicate success or failure rather than aborting on failure. * som.h (bfd_som_set_section_attributes): Fix prototype to match som.c changes. (bfd_som_attach_aux_hdr): Add prototype. (hppa_som-gen_reloc_type): Likewise. * elf32-hppa.c: Add a couple casts to make HP compiler happy. (hppa_look_for_stubs_in_section): Do not return false on failure until rest of code is ready to handle it. Abort for now.
1994-02-26 * som.c (som_get_symtab_upper_bound): Use "sizeof (asymbol *)"Jeff Law1-2/+3
not "sizeof (som_symbol_type *)". * elfcode.h (elf_get_symtab_upper_bound): Use "sizeof (asymbol *)" not "sizeof (asymbol"). Opps.
1994-02-24 * som.c (som_prep_headers): Use CPU_PA_RISC1_0 for magicJeff Law1-1/+1
number rather than HP9000S800_ID. Note som.c is careful to make sure CPU_PA_RISC1_0 is always defined.
1994-02-22 * som.c (som_bfd_count_ar_symbols): Use a pointer and allocaIan Lance Taylor1-6/+15
rather than an array of variable size. (som_bfd_fill_in_ar_symbols): Likewise. (som_bfd_ar_write_symbol_stuff): Likewise.
1994-02-17 * bfd.c (bfd_get_error, bfd_set_error): New functions.David MacKenzie1-86/+86
(bfd_error): Make static. (bfd_error_type): Renamed from bfd_ec. Prepend "bfd_error_" to all values. * bfd-in2.h: Regenerated. * aix386-core.c, aout-adobe.c, aout-encap.c, aout-target.h, aoutf1.h, aoutx.h, archive.c, archures.c, bfd.c, bout.c, cache.c, coff-alpha.c, coff-mips.c, coff-rs6000.c, coffcode.h, coffgen.c, core.c, ctor.c, ecoff.c, ecofflink.c, elf.c, elf32-hppa.c, elf32-mips.c, elfcode.h, format.c, hash.c, hp300hpux.c, hppabsd-core.c, i386lynx.c, ieee.c, libbfd.c, libelf.h, linker.c, lynx-core.c, nlm.c, nlm32-alpha.c, nlm32-i386.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c, ptrace-core.c, reloc16.c, rs6000-core.c, section.c, som.c, srec.c, sunos.c, syms.c, targets.c, tekhex.c, trad-core.c: Change callers.
1994-02-16 * som.c: Remove FIXMEs for things which have been dealt with.Jeff Law1-9/+4
1994-02-15 * som.c (som_bfd_prep_for_ar_write): Iterate through the SOMJeff Law1-14/+14
symbols, not the BFD symbols. (som_bfd_ar_write_symbol_stuff): Likewise.
1994-02-15 * som.c (som_slurp_symbol_table): Do not die if a BFD doesn'tJeff Law1-6/+2
have any symbols.
1994-02-15 * Finish basic read-write support for SOM archive libraries. BugsJeff Law1-122/+573
surely remain as this hasn't been tested all that much. * som.c (SOM_LST_HASH_SIZE, SOM_LST_MODULE_LIMIT): Define. (struct som_misc_symbol_info): New structure to hold info necessary to build both normal and library symbol tables. (som_derive_misc_symbol_info): New function to derive info necessary to build both normal and library symbol tables. (som_build_and_write_symbol_table): Use new function to derive misc symbol information. (som_slurp_symbol_table): Update backend private data for symbols appropriately. (som_bfd_prep_for_ar_write): New function. (som_bfd_ar_symbol_hash): New function. (som_bfd_ar_write_symbol_stuff): New function. (som_write_armap): Flesh out. (som_vec): Fix ar padding character. * som.c: Consistently use memset rather than bzero.
1994-02-14 * som.h (som_symbol_data): Safely access backend private dataJeff Law1-22/+22
for BFD symbols. All callers changed.
1994-02-13 * som.c (som_bfd_count_ar_symbols): New helper function.Jeff Law1-6/+376
(som_bfd_fill_in_ar_symbols): New helper function. (som_slurp_armap): New function to read a SOM LST.
1994-02-12 Make all callers of malloc or realloc (including via obstacks)David MacKenzie1-7/+57
check the result for NULL. Most set bfd_error to no_memory and return in that case; a few are harder to fix, and are marked with "FIXME <return type>". * elf32-hppa.c (hppa_elf_build_arg_reloc_stub hppa_elf_build_long_branch_stub): Check bfd_make_empty_symbol return. * linker.c (_bfd_generic_link_output_symbols _bfd_generic_link_write_global_symbol): Ditto * section.c (bfd_make_section_anyway): Ditto. * tekhex.c (find_chunk tekhex_mkobject): Check bfd_alloc. (first_phase): Ditto. FIXME void (tekhex_make_empty_symbol): Check bfd_zalloc. * sunos.c (sunos_read_dynamic_info): Check bfd_zalloc. (MY(read_dynamic_symbols) MY(read_dynamic_relocs)): Check bfd_alloc. * stringhash.c (_bfd_stringtab_hash_newfunc): Check bfd_hash_allocate. * srec.c: Indent. (fillup_symbols): Check bfd_alloc. FIXME void (srec_mkobject srec_get_section_contents srec_set_section_contents): Check bfd_alloc. (srec_make_empty_symbol): Check bfd_zalloc. * som.c (hppa_som_gen_reloc_type): Check bfd_alloc_by_size_t. (make_unique_section): Check bfd_alloc. (som_new_section_hook): Check bfd_zalloc. (bfd_som_attach_aux_hdr): Ditto. FIXME void * rs6000-core.c (rs6000coff_core_p): Check bfd_zalloc. * osf-core.c (osf_core_make_empty_symbol): Check bfd_zalloc. (osf_core_core_file_p): Check bfd_alloc. * oasys.c (oasys_slurp_symbol_table oasys_archive_p oasys_mkobject oasys_object_p oasys_new_section_hook oasys_set_section_contents): Check bfd_alloc. (oasys_slurp_section_data): Check bfd_zalloc and bfd_alloc. (oasys_make_empty_symbol): Check bfd_zalloc. * nlmcode.h (nlm_make_empty_symbol): Check bfd_zalloc. (nlm_slurp_symbol_table): Check bfd_zalloc and bfd_alloc. * nlm32-sparc.c (nlm_sparc_read_import): Check bfd_alloc. * nlm32-i386.c (nlm_i386_read_import): Check bfd_alloc. * nlm32-alpha.c (nlm_alpha_read_import): Check bfd_alloc. * linker.c (_bfd_link_hash_newfunc (generic_link_hash_newfunc (archive_hash_newfunc (_bfd_generic_link_add_one_symbol): Check bfd_hash_allocate. (_bfd_generic_final_link (_bfd_generic_link_output_symbols (default_indirect_link_order): Check bfd_alloc. (bfd_new_link_order): Check bfd_alloc_by_size_t. * irix-core.c (irix_core_make_empty_symbol): Check bfd_zalloc. * ieee.c: Indent. (read_id get_symbol get_section_entry ieee_archive_p ieee_object_p ieee_slurp_section_data ieee_new_section_hook): Check bfd_alloc. (do_one): Check bfd_alloc. Return a boolean. (ieee_slurp_section_data): Check it. (init_for_output): Check bfd_alloc. Return a boolean. (ieee_set_section_contents): Check it. (do_with_relocs): Check bfd_alloc. Return a boolean. (ieee_bfd_debug_info_accumulate): Ditto. FIXME void. (ieee_mkobject): Check bfd_zalloc. (ieee_make_empty_symbol): Check bfd_zmalloc. * hpux-core.c (hpux_core_make_empty_symbol): Check bfd_zalloc. * hppabsd-core.c (hppabsd_core_make_empty_symbol): Check bfd_zalloc. (hppabsd_core_core_file_p): Check bfd_zalloc. * hp300hpux.c (MY(slurp_symbol_table)): Check bfd_alloc. * elfcode.h (elf_new_section_hook): Check bfd_alloc. (bfd_section_from_phdr): Ditto. (write_relocs): Ditto. FIXME void (elf_map_symbols assign_section_numbers map_program_segments): Ditto. Return a boolean. (swap_out_syms): Ditto. Check elf_map_symbols. (elf_slurp_symbol_table): Check bfd_zalloc. (elf_slurp_reloca_table): Check bfd_alloc. (elf_slurp_reloc_table): Ditto. (elf_compute_section_file_positions): Check assign_section_numbers. (assign_file_positions_except_relocs): Return a boolean. Check map_program_segments. (elf_compute_section_file_positions): Check it. * elf32-mips.c (mips_elf_final_link): Check bfd_alloc. * elf32-hppa.c (hppa_elf_stub_branch_reloc): Check bfd_zmalloc and realloc. (hppa_elf_stub_reloc): Ditto. (hppa_elf_build_arg_reloc_stub): Check bfd_zalloc. (hppa_elf_build_long_branch_stub): Ditto. (elf32_hppa_backend_symbol_table_processing): Ditto. * ecoff.c (ecoff_set_symbol_info): Check bfd_alloc. Return a boolean. (ecoff_slurp_symbol_table): Check it. (ecoff_slurp_armap): Check bfd_alloc. (ecoff_write_armap): Check bfd_zalloc. (ecoff_link_hash_newfunc): Check bfd_hash_allocate and _bfd_link_hash_newfunc. (ecoff_link_add_externals): Check bfd_alloc. * ctor.c (bfd_constructor_entry): Check bfd_alloc. * coffgen.c (coff_real_object_p): Check bfd_alloc. (coff_renumber_symbols): Check bfd_alloc_by_size_t. Return a boolean. (coff_write_symbol): Check bfd_alloc. FIXME int (coff_write_linenumbers): Check bfd_alloc. Return a boolean. (coff_section_symbol): Check bfd_alloc_by_size_t. (coff_get_normalized_symtab): Check bfd_alloc. (coff_bfd_make_debug_symbol): Check bfd_zalloc. * libcoff-in.h: Change decls of coff_renumber_symbols, coff_write_linenumbers. * libcoff.h: Rebuilt. * coffcode.h (coff_write_object_contents): Check coff_renumber_symbols, coff_write_linenumbers. * coffcode.h: Indent. (coff_add_missing_symbols): Check bfd_alloc_by_size_t. Return a boolean. (coff_write_object_contents): Check it. * coff-alpha.c (alpha_relocate_section): Check bfd_alloc. * coff-mips.c (mips_relocate_section): Ditto. * archive.c (bfd_slurp_bsd_armap_f2): Check bfd_alloc value. (do_slurp_bsd_armap): Ditto. (compute_and_write_armap): Check bfd_realloc value. * aoutx.h (translate_from_native_sym_flags): Check bfd_alloc return value. Return boolean value. (NAME(aout,make_empty_symbol)): Check bfd_zalloc return value. (NAME(aout,slurp_symbol_table)): Check bf_alloc and bfd_zalloc return value. (add_to_stringtab): Ditto. FIXME void (aout_link_hash_newfunc): Check bfd_hash_allocate return value. (aout_link_add_symbols): Check bfd_alloc value. (translate_symbol_table): Check translate_from_native_sym_flags. * hp300hpux.c (MY(slurp_symbol_table)): Ditto. * aoutx.h (aout_link_hash_newfunc): Check _bfd_link_hash_newfunc. * opncls.c (bfd_zalloc bfd_realloc): Check result of bfd_alloc. * opncls.c (obstack_chunk_alloc): Define as malloc, not bfd_xmalloc_by_size_t. (_bfd_new_bfd): Check obstack_begin for 0 return. * ieee.c (obstack_chunk_alloc): Define as malloc, not bfd_xmalloc_by_size_t. (ieee_archive_p): Check obstack_begin for 0 return and obstack_finish for NULL return. * hash.c (obstack_chunk_alloc): Define as malloc, not bfd_xmalloc_by_size_t. (bfd_hash_table_init_n): Check obstack_begin for 0 return and obstack_finish for NULL return. (bfd_hash_lookup): Check obstack_alloc for NULL return. * ecofflink.c (obstack_chunk_alloc): Define as malloc, not bfd_xmalloc_by_size_t. bfd_ecoff_debug_accumulate bfd_ecoff_debug_accumulate_other): Check obstack_alloc. (add_file_shuffle add_memory_shuffle): Check obstack_alloc for NULL return. Return boolean, not void. (bfd_ecoff_debug_init): Check obstack_begin for 0 return. (bfd_ecoff_debug_accumulate): Check add_file_shuffle and add_memory_shuffle return. (string_hash_newfunc): Check bfd_hash_allocate and bfd_hash_newfunc. (bfd_ecoff_debug_accumulate): Check bfd_alloc. (ecoff_add_string): Check add_memory_shuffle return. * libbfd-in.h (xmalloc, bfd_xmalloc, bfd_xmalloc_by_size_t): Remove decls. * libbfd.h: Rebuilt.
1994-02-10 * som.c: Cast return values from BFD memory allocation routines toJeff Law1-9/+10
avoid warnings from the HP compiler.
1994-02-08 * som.c: This file is also used for HOST_HPPAOSF.Jeff Law1-5/+6
* targets.c (bfd_target_vector): Enable som_vec for HOST_HPPAOSF.
1994-01-13 * som.c (hppa_som_reloc): Add new "error message" argument.Jeff Law1-17/+29
1993-12-14 * elf32-hppa.c (hppa_elf_gen_reloc_type): Handle 'T' fieldJeff Law1-11/+35
selectors for PIC code. * som.c (hppa_som_gen_reloc_type): Handle 'T' field selectors. (som_write_fixups): Handle R_DLT_REL, R_FSEL, R_RSEL, R_LSEL relocations needed by PIC.
1993-12-06 * som.c (som_begin_writing): Flesh out code for handling simpleJeff Law1-3/+100
auxiliary headers. (bfd_som_attach_aux_hdr): New function. * som.h (struct somdata): Add fields for attaching version and copyright headers. Add accessor macros.
1993-12-06 * som.c (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Add protectedJeff Law1-6/+17
definitions for old versions of HPUX which fail to define them. (som_hppa_howto_talbe): Add R_DLT_REL, R_AUX_UNWIND, and R_SEC_STMT now that they're safe. Delete bogus R_STATEMENT relocations.
1993-12-06 * som.c (som_hppa_howto_table): Add missing R_END_TRY. DeleteJeff Law1-17/+186
extra R_DATA_OVERRIDE. (hppa_som_gen_reloc_type): Generate a relocation for the rounding mode selector if needed. (som_write_fixups): Handle requests for a change in the default rounding mode. Rounding modes do not consume input bytes, but are just markers much like R_ENTRY and R_EXIT.
1993-11-22 * Minimal support for reading SOM fixup streams. AllowsJeff Law1-48/+800
objdump -r to do something reasonable. * som.c (som_get_reloc_upper_bound): Implement. (som_canonicalize_reloc): Implement. (som_set_reloc_info, som_slurp_reloc_table): New functions.
1993-11-14 * som.c (som_bfd_reloc_type_lookup): Add missing prototype. ReturnsJeff Law1-4/+4
a pointer to constant data. Delete bogus #define which made the function useless.
1993-11-14 * som.c (som_begin_writing): New function.Jeff Law1-6/+241
1993-11-14 * som.c (som_write_space_strings): New function.Jeff Law1-0/+180
(som_write_symbol_strings): New function.
1993-11-14 * som.c (som_write_fixups): New function.Jeff Law1-1/+256
1993-11-13 * som.c (som_prep_for_fixups): New function.Jeff Law1-0/+97