aboutsummaryrefslogtreecommitdiff
path: root/bfd/som.c
AgeCommit message (Collapse)AuthorFilesLines
1998-10-05 * cpu-hppa.c (bfd_hppa20_arch): Define. Link it into the bfd_hppa_archJeff Law1-3/+12
structure. * som.c (CPU_PA_RISC2_0): Define. (_PA_RISC2_0_ID): Likewise. (som_finish_writing): Use CPU_PA_RISC2_0 for the system_id as needed. PA2.0 infrastructure.
1998-05-06fix copyrightIan Lance Taylor1-2/+3
1998-05-06 * som.c: Include <ctype.h>.Ian Lance Taylor1-39/+17
* som.h: Don't include sysdep.h.
1997-10-20 * som.c (som_bfd_ar_write_symbol_stuff): Account for trailingJeff Law1-68/+89
'/' in the extended name table.
1996-08-02 * libhppa.h: Remove "esel" changes. Not the right approach.Jeff Law1-19/+15
* som.c: Corresponding changes. (som_bfd_derive_misc_symbol_info): Use ST_DATA for symbols which don't have a SOM symbol type associated with them. Reverses a 1994 change. More PA EH tweakage (to get exception handling tables properly relocated in shared libraries).
1996-07-30 * libhppa.h (R_HPPA_ESEL): New field selector.Jeff Law1-2/+37
(e_esel): Similarly. * som.c (hppa_som_gen_reloc_type): If we encounter an e_esel, then generate R_COMP2 (PUSH_SYM), R_DATA_EXPR fixup stream. (som_write_fixups): Handle R_DATA_EXPR just like R_CODE_EXPR. Making another stab at EH support on the PA.
1996-04-26 * som.c (som_slurp_symbol_table): Set the symbol count to theIan Lance Taylor1-2/+36
number of BFD symbols created. PR 5332.
1996-02-27 * libhppa.h (pa_arch): Add pa20.Jeff Law1-12/+55
(hppa_reloc_field_selector_type): Add R_HPPA_NSEL. (e_nsel): Undefine. Add to hppa_reloc_field_selector_type_alt. (hppa_field_adjust): Handle e_nsel. * som.c: Provide default definitions for many new relocs found only in hpux10 include files. (som_fixup_formats): Add several new relocs from hpux10. (som_hppa_howto_table): Add hpux10 relocs. (som_write_fixups): Handle R_N0SEL and R_N1SEL hpux10 relocs. Quick stab at handling some of the new hpux10 features.
1996-01-09Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>Ian Lance Taylor1-2/+3
* coff-alpha.c (alpha_relocate_section): During final link, allow output .lita section to be bigger than 64k by adjusting gp value on a per-input section basis. * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning field. (struct ecoff_section_tdata): Add gp field. Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com> Handle Alpha ECOFF changes in OSF/1 3.2. * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos field. * coff-alpha.c: Include "aout/ar.h". (alpha_ecoff_get_relocated_section_contents): Don't require an ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1 3.2 doesn't generate one. (alpha_relocate_section): Likewise. (alpha_ecoff_slurp_armap): Define. (alpha_ecoff_slurp_extended_name_table): Define. (alpha_ecoff_construct_extended_name_table): Define. (alpha_ecoff_truncate_arname): Define. (alpha_ecoff_write_armap): Define. (alpha_ecoff_generic_stat_arch_elt): Define. (alpha_ecoff_update_armap_timestamp): Define. (ARFZMAG): Define. (alpha_ecoff_read_ar_hdr): New static function. (alpha_ecoff_get_elt_at_filepos): New static function. (alpha_ecoff_openr_next_archived_file): New static function. (alpha_ecoff_get_elt_at_index): New static function. (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field. (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from _bfd_ecoff to alpha_ecoff. * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos field from backend structure, rather than always calling _bfd_get_elt_at_filepos. * coff-mips.c (mips_ecoff_backend_data): Initialize get_elt_at_filepos field. * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied from _bfd_generic_read_ar_hdr with minor changes. (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag. * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare. * libbfd.h: Rebuild. * bfd-in.h (BFD_IN_MEMORY): Define. * libbfd-in.h (struct bfd_in_memory): Define. * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag. (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file. (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set. (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag. * bfd.c (struct _bfd): Change iostream field from char * to PTR. (bfd_get_size): Handle BFD_IN_MEMORY flag. * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files. (bfd_open_file): Cast to PTR, not char *, when setting iostream. (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set. * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting iostream. (bfd_openstreamr): Likewise. * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if BFD_IN_MEMORY is not set. * riscix.c (riscix_some_aout_object_p): Likewise. * bfd-in2.h, libbfd.h: Rebuild. * targets.c (bfd_target): Add _bfd_get_elt_at_index field. (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index. (bfd_get_elt_at_index): Define. * archive.c (_bfd_generic_get_elt_at_index): Rename from bfd_get_elt_at_index. Change index parameter from int to symindex. * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare. (_bfd_noarchive_get_elt_at_index): Define. (_bfd_archive_bsd_get_elt_at_index): Define. (_bfd_archive_coff_get_elt_at_index): Define. * bfd-in2.h, libbfd.h: Rebuild. * aout-target.h (MY_get_elt_at_index): Define if not defined. * coff-rs6000.c (xcoff_get_elt_at_index): Define. * ieee.c (ieee_get_elt_at_index): Define. * libecoff.h (_bfd_ecoff_get_elt_at_index): Define. * oasys.c (oasys_get_elt_at_index): Define. * som.c (som_get_elt_at_index): Define.
1995-12-01 * libbfd.c (bfd_malloc, bfd_realloc): New functions.Ian Lance Taylor1-76/+36
(bfd_zmalloc): Return PTR, not char *. Take size_t, not bfd_size_type. * libbfd-in.h (bfd_malloc, bfd_realloc): Declare. (bfd_zmalloc): Change declaration. * libbfd.h: Rebuild. * Many files: Use bfd_malloc and bfd_realloc rather than malloc and realloc. Don't set bfd_error_no_memory if they fail.
1995-11-29 * opncls.c (bfd_alloc_by_size_t): Set bfd_error_no_memory ifIan Lance Taylor1-109/+30
obstack_alloc fails. (bfd_alloc_finish): Set bfd_error_no_memory if obstack_finish fails. * libbfd.c (bfd_zmalloc): Set bfd_error_no_memory if malloc fails. * Many files: don't set bfd_error_no_memory if one of the above routines fails.
1995-10-25 * som.c (som_slurp_string_table): Allocate the strings with mallocJeff Law1-4/+7
since they're free'd by free_cached_info. (som_slurp_symbol_table): Similarly for the symbol table. Fixes crash (nm /lib/libc.a on hpux10).
1995-10-03 * som.c (setup_sections): Don't die if a space has no subspaces.Jeff Law1-0/+4
1995-10-01 * som.c (som_begin_writing): Don't write the symbol table orJeff Law1-38/+47
symbol strings. (som_finish_writing): Write them here. Place them after the subspace data, but before the relocs. Works around a truely stupid bug in the hpux8/hpux9 linker. Fixes all known link-time problems with -mlinker-opt.
1995-09-19 * targets.c (bfd_target): Remove unused align_power_min field.Ian Lance Taylor1-1/+5
* bfd-in2.h: Rebuild. * All backends: Remove initialization of align_power_min.
1995-08-08 * som.c (som_bfd_copy_private_symbol_data): Cast initializationsIan Lance Taylor1-2/+2
to avoid warnings.
1995-08-07 * som.c (som_decode_symclass): Handle absolute symbols by checkingJeff Law1-5/+17
the SOM type (since they will rarely if ever be in the absolute section). Something Ian noticed.
1995-07-13 * targets.c (bfd_target): Add fields _read_minisymbols andIan Lance Taylor1-1/+3
_minisymbol_to_symbol. (BFD_JUMP_TABLE_SYMBOLS): Add _read_minisymbols and _minisymbol_to_symbol. (bfd_read_minisymbols): Define. (bfd_minisymbol_to_symbol): Define. * syms.c (_bfd_generic_read_minisymbols): Define. (_bfd_generic_minisymbol_to_symbol): Define. * libbfd-in.h (_bfd_nosymbols_read_minisymbols): Define. (_bfd_nosymbols_minisymbol_to_symbol): Define. (_bfd_generic_read_minisymbols): Declare. (_bfd_generic_minisymbol_to_symbol): Declare. * bfd-in2.h: Rebuild. * libbfd.h: Rebuild. * aoutx.h (MINISYM_THRESHOLD): Define. (NAME(aout,read_minisymbols)): New function. (NAME(aout,minisymbol_to_symbol)): New function. * libaout.h (NAME(aout,read_minisymbols)): Declare. (NAME(aout,minisymbol_to_symbol)): Declare. * aout-target.h (MY_read_minisymbols): Define. (MY_minisymbol_to_symbol): Define. * All targets: Define read_minisymbols and minisymbol_to_symbol. PR 5332.
1995-07-03 * som.c (hppa_som_gen_reloc_type): New argument "sym_diff",Jeff Law1-3/+123
nonzero when we're generating relocations for an expression using the difference of two symbols. All callers changed. Handle difference of symbols for both R_HPPA and R_COMPLEX cases. (som_write_fixups): Handle R_COMP1, R_COMP2 and R_CODE_EXPR fixups.
1995-03-21 * som.c (som_slurp_symbol_table): Tighten test to determineJeff Law1-3/+5
what symbols are section symbols.
1995-03-06 * cpu-hppa.c (arch_info_struct): Support both PA1.0 and PA1.1Jeff Law1-11/+49
machine types. (bfd_hppa_arch): Link in both PA1.0 and PA1.1 architecture info structures. * libhppa.h (enum pa_arch): New enumeration to describe the different variants of the PA architecture. * som.c (som_object_setup): Use new enumeration to set machine type. (som_finish_writing): If the machine type is PA1.1, then use the PA1.1 machine identifier in the output file.
1995-02-01 * som.c (som_object_setup): More heruistics to detect theJeff Law1-42/+204
braindamaged HP OSF1 linker. (setup_sections): Don't forget to free subspace_sections if we get an error. (som_slurp_string_table): Allocate strings on this bfd's obstack rather than directly out of the heap. (som_slurp_symbol_table): Likewise for the saved copy of the canonical symbols. (som_slurp_reloc_table): Likewise for the saved copy of the canonical relocations. Free the native relocations when we're done with them.
1995-01-28 * som.c (som_object_setup): New heuristic to determine if theJeff Law1-6/+12
entry and flags fields are switched in the exec header.
1995-01-09Add 1995 to copyright.Jeff Law1-1/+2
1995-01-05 * som.c (bfd_section_from_som_symbol): Only return sections whichJeff Law1-2/+3
correspond to subspaces.
1995-01-04 * som.c (som_begin_writing): Don't forget to bump theJeff Law1-1/+1
total_subspaces when writing the unloadable subspaces.
1994-12-29 * som.c (som_write_fixups): Use SEC_HAS_CONTENTS to identifyJeff Law1-3/+3
bss-like sections. (som_get_section_contents): Likewise. (som_set_section_contents): Likewise.
1994-12-27 * som.c (setup_sections): Turn off SEC_HAS_CONTENTS for bss-likeJeff Law1-20/+42
sections.
1994-09-14 * som.h (som_symbol_type): Add "stringtab_offset" field.Jeff Law1-3/+2
* som.c (som_write_symbol_strings): Use "stringtab_offset" rather than destroying the "name" field in the BFD symbol. (som_build_and_write_symbol_table): Likewise.
1994-09-14 * som.c (som_fixup_formats): Case R_ENTRY (0xb3), set bothJeff Law1-4/+17
'T' and 'U' to grab all the unwind information. (som_set_reloc_info): Make 'U' unwind bits persist across multiple SOM relocations. Set the addend field of an R_ENTRY relocation to the value in 'T'; set the addend field on an R_EXIT relocation to the value in 'U'.
1994-09-14 * som.h (som_symbol_type): Delete unwind field.Jeff Law1-27/+20
* som.c (som_write_fixups): For R_ENTRY fixups, get 32bits of unwind information from the addend field of the R_ENTRY, get the other 32bits from the addend field of the R_EXIT. (bfd_som_attach_unwind_info): Delete function and all references.
1994-09-14 * som.h (som_symbol_type): Delete unused a.out-related fields.Jeff Law1-3/+2
* som.c (bfd_section_from_som_symbol): Use bfd_abs_section_ptr instead of &bfd_abs_section.
1994-09-14 * som.c (som_object_setup): Handle exec_entry and exec_flags beingJeff Law1-17/+29
switched in executables created by the OSF1 linker. (som_write_fixups): Handle R_EXIT just like the R_{F,L,R}SEL fixups. Support R_ALT_ENTRY (handle just like R_EXIT).
1994-09-13 * som.c (som_reloc_skip): Correct off-by-one error for 4-byteJeff Law1-10/+16
R_NO_RELOCATION fixups. (bfd_section_from_som_symbol): Return the absolute section if the symbol isn't contained in any section in the output file. (som_slurp_symbol_table): ST_PRI_PROG and ST_SEC_PROG symbols are not function symbols (they are magic code labels which *can* be the targets of cross space branches). $START$ is not a section symbol.
1994-09-12Revert last change (never should have been checked in to begin with).Jeff Law1-2/+1
1994-09-12 * config/hppaosf.mh (RANLIB): Do not set.Jeff Law1-6/+19
* config/hppabsd.mh (RANLIB): Likewise.
1994-08-31 * som.c (som_write_fixups, case R_ENTRY): Handle case where noJeff Law1-4/+19
unwind descriptor information is available.
1994-08-16 * som.c (som_prep_headers): If writing some form of an executable,Jeff Law1-62/+77
allocate and attach an exec header to the BFD private data. (som_begin_writing): Don't fill fields of the exec header based on BFD private data here (like the exec flags). Do not write the exec header here. (som_write_headers): Instead do it here. * som.h (struct somdata): New field "exec_hdr" for the executable file header. (obj_som_exec_hdr): New accessor macro.
1994-06-20 * Many files: change all bfd_target vectors to be const. ChangeIan Lance Taylor1-8/+8
all uses of bfd_target * to be const bfd_target *. Change bfd_target_vector and bfd_default_vector arrays to be const bfd_target * const *.
1994-06-13 * som.c (EXEC_AUX_ID): Define based on availablity of HPUX_AUX_IDJeff Law1-5/+22
or HIUX_AUX_ID. (som_begin_writing): Use EXEC_AUX_ID instead of HPUX_AUX_ID. (som_write_armap): Use CPU_PA_RISC1_0 as the magic number. Note som.c is careful to always define CPU_PA_RISC1_0.
1994-05-26 * som.c (som_prep_headers): Do not set the system_id here, privateJeff Law1-7/+10
bfd data has not been copied yet. (som_write_headers): Instead do it here.
1994-05-20 * som.c (som_set_reloc_info): Do not set any relocation infoJeff Law1-2/+4
for SOM fixups which are never passed to BFD.
1994-05-18 * som.c: Don't include <sys/dir.h> or <sys/user.h>.Ian Lance Taylor1-18/+24
(som_reloc_queue_find): Call memcmp instead of bcmp. (som_bfd_reloc_type_lookup): Change first argument to bfd *. (compare_syms): Change types of arguments to const void *. (bfd_section_from_som_symbol): Removed unused local found. (som_write_armap): Add elength, map, orl_count and int arguments. (som_write_armap): Use %ld and cast to long for getuid result.
1994-05-18 * elf32-hppa.h (R_HPPA_ABS_CALL): Define.Jeff Law1-5/+2
* elf32-hppa.c (hppa_elf_gen_reloc_type): Handle absolute calls. * som.h (R_HPPA_ABS_CALL): Define. * som.c (hppa_som_gen_reloc_type): Delete complex relocation types.
1994-04-12 * som.c (som_write_fixups): Always emit at leastJeff Law1-3/+3
one relocation for any non-bss section.
1994-04-07 * All backends: Added BFD_JUMP_TABLE_DYNAMIC to target vector.Ian Lance Taylor1-1/+2
1994-04-06 * targets.c (bfd_target): Rearranged fields in target vector.Ian Lance Taylor1-13/+13
Removed _bfd_debug_info_start, _bfd_debug_info_end and _bfd_debug_info_accumulate, which were never used. (BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined. (BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined. (BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined. (BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined. * All backends: Changed to use the new BFD_JUMP_TABLE_* macros rather than the single JUMP_TABLE macro. Removed many of the weird macro definitions needed to support the monolithic JUMP_TABLE. * bfd-in.h (JUMP_TABLE): Removed. * libbfd-in.h: Define a bunch of macros, and declare a few functions, for use with the new BFD_JUMP_TABLE_* macros. * libbfd.c (_bfd_dummy_new_section_hook): Removed. (bfd_false): Set bfd_error_invalid_operation. (bfd_nullvoidptr): Likewise. (bfd_n1): New function. (_bfd_nocore_core_file_matches_executable_p): Renamed from _bfd_dummy_core_file_matches_executable_p. (_bfd_nocore_core_file_failing_command): Similar rename. Set bfd_error_invalid_operation. (_bfd_nocore_core_file_failing_signal): Likewise. (_bfd_generic_get_section_contents): Renamed from bfd_generic_get_section_contents. Changed all callers. (_bfd_generic_set_section_contents): Similar rename. * ieee.c: #if 0 out ieee_bfd_debug_info_start, ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They were never called. * bfd-in2.h: Rebuilt. * libbfd.h: Rebuilt.
1994-04-06 * Crude support for examining dynamic libraries.Jeff Law1-15/+28
* som.c (som_object_setup): Set DYNAMIC flag for SHL_MAGIC and DL_MAGIC objects. (som_prep_headers): Preserve the system_id for DYNAMIC objects. Use SHL_MAGIC as the magic number of the DYNAMIC flag is set. Write exec headers for DYNAMIC objects. (som_begin_writing): DYNAMIC objects have the same alignment restrictions as D_PAGED objects. (bfd_section_from_som_symbol): Treat DYNAMIC objects like EXEC_P objects. (object_flags): Add DYNAMIC.
1994-04-05 * som.c (som_bfd_free_cached_info): Add missing PARAMS decl.Jeff Law1-1/+5
Don't free anything if we don't have a bfd_object. (som_close_and_cleanup): Call som_bfd_free_cached_info.
1994-04-05 * aoutx.h (NAME(aout,canonicalize_reloc)): Don't error out ifIan Lance Taylor1-2/+0
section->relocation is NULL; malloc might have returned NULL when given a zero size if there were no relocations. * bout.c (b_out_canonicalize_reloc): Likewise. * coffcode.h (coff_canonicalize_reloc): Likewise. * ecoff.c (ecoff_canonicalize_reloc): Likewise. * elfcode.h (elf_canonicalize_reloc): Likewise. * mipsbsd.c (MY(canonicalize_reloc)): Likewise. * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise. * nlmcode.h (nlm_canonicalize_reloc): Likewise. * som.c (som_canonicalize_reloc): Likewise. * hp300hpux.c (MY(slurp_reloc_table)): Likewise. Also, if malloc returns NULL, don't report an error if we asked for zero bytes. * i386lynx.c (NAME(lynx,slurp_reloc_table)): If malloc returns NULL, don't report an error if we asked for zero bytes. * nlmcode.h (nlm_slurp_reloc_fixups): Likewise.