aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
1993-12-30Added new files for linker support, and removed old seclet files.Ian Lance Taylor6-242/+1771
1993-12-30 Extensive changes to move the bulk of the linker into BFD so thatIan Lance Taylor29-659/+4752
more efficient backend code can be written for specific object files. Only existing efficient backend is a.out. * seclet.c, seclet.h: Removed. * hash.c, linker.c, genlink.h: New files. * bfd-in.h: Removed bfd_error_vector. Declared hash table structures and functions. (JUMP_TABLE): Removed bfd_seclet_link, added bfd_link_hash_table_create, bfd_link_add_symbols and bfd_final_link. * All backends: Changed accordingly. * bfd-in2.h: Rebuilt. * bfd.c (struct _bfd): Added link_next and archive_pass fields. Removed ld_symbols field. (bfd_nonrepresentable_section, bfd_undefined_symbol, bfd_reloc_value_truncated, bfd_reloc_is_dangerous, bfd_error_vector): Removed. (bfd_default_error_trap, bfd_error_trap, bfd_error_nonrepresentabltrap): Removed. (bfd_get_relocated_section_contents): Pass link_info. Pass link_order instead of seclet. Pass symbols. (bfd_relax_section): Pass link_info. (bfd_seclet_link): Removed. (bfd_link_hash_table_create, bfd_link_add_symbols, bfd_final_link): New macros. * libbfd-in.h: If __GNUC__ is defined and alloca is not, define alloca as __builtin_alloca. Declare internal linking functions. * libbfd.h: Rebuilt. * libbfd.c (bfd_seek): Comment out fseek assertion. It's worked for months. * reloc.c (reloc_howto_type): Added error_message argument to special_function field. Changed all callers and all definitions. (bfd_get_reloc_size): Make argument a const pointer. (bfd_perform_relocation): Add error_message argument to hold string set if return value if bfd_reloc_dangerous. Changed all callers. (_bfd_final_link_relocate, _bfd_relocate_contents): New functions. * section.c (asection): Renamed seclets_head and seclets_tail to link_order_head and link_order_tail. * targets.c (bfd_target): Replaced seclet argument with link_info and link_order and symbols arguments in bfd_get_relocated_section_contents. Added symbols argument to bfd_relax_section. Removed bfd_seclet_link. Added bfd_link_hash_table_create, bfd_link_add_symbols and bfd_final_link. * libaout.h (struct aoutdata): Added external_syms, external_sym_count, external_strings, sym_hashes fields. (obj_aout_external_syms, obj_aout_external_sym_count, obj_aout_external_strings, obj_aout_sym_hashes): New accessor macros. (WRITE_HEADERS): Only output symbols if outsymbols is not NULL. * aoutx.h: Wrote new back end linker routines. (translate_to_native_sym_flags): Return boolean value. Don't use bfd_error_vector. (NAME(aout,write_syms)): Return boolean value. Check return value of translate_to_native_sym_flags and bfd_write. * aout-target.h (final_link_callback): New function. (MY_bfd_final_link): New function. * aout-adobe.c (aout_adobe_write_object_contents): Check return value of aout_32_write_syms. * hp300hpux.c (MY(write_object_contents)): Likewise. * i386lynx.c (WRITE_HEADERS): Likewise. * libaout.h (WRITE_HEADERS): Likewise. * bout.c: Changed functions to use link_info->callbacks rather than bfd_error_vector, and link_orders rather than seclets. * coff-alpha.c: Likewise. * coff-h8300.c: Likewise. * coff-h8500.c: Likewise. * coff-sh.c: Likewise. * coff-z8k.c: Likewise. * elf32-hppa.c: Likewise. * reloc16.c: Likewise. * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Look up _gp in the hash table rather than in outsymbols. * coff-a29k.c (a29k_reloc): Pass errors back in new error_message argument rather than printing them. * coffcode.h (bfd_coff_reloc16_extra_cases): Take link_info and link_order arguments rather than seclet. Changed all uses and definitions. (bfd_coff_reloc16_estimate): Pass link_info arguments. Changed all uses and definitions. * libcoff.h: Rebuilt. * ecoff.c (ecoff_get_extr): If symbol is defined by linker, but not by ECOFF, make it scAbs. (ecoff_bfd_final_link): Renamed from ecoff_bfd_seclet_link and rewritten. * elf32-mips.c (mips_elf_final_link): Renamed from mips_elf_seclet_link and rewritten. * elf32-hppa.c (elf32_hppa_stub_description): Added link_info field. (new_stub, add_stub_by_name, hppa_elf_build_arg_reloc_stub, hppa_elf_build_long_branch_stub, hppa_look_for_stubs_in_section): Added link_info arguments. Changed all callers. * elfcode.h (elf_slurp_symbol_table): Don't quit if outsymbols is not NULL. * oasys.c (oasys_write_sections): Return boolean value rather than using bfd_error_vector. (oasys_write_object_contents): Check return value of oasys_write_sections. * hosts/std-host.h: Don't declare qsort or strtol. * Makefile.in: Rebuild dependencies. (BFD_LIBS): Removed seclet.o. Added hash.o and linker.o. (CFILES): Removed seclet.c. Added hash.c and linker.c. (HFILES): Removed seclet.h. Added genlink.h.
1993-12-30 * section.c (bfd_get_section_contents): Return zero filled bufferPeter Schauer2-27/+38
if section has no contents.
1993-12-28 * elf.c (bfd_elf_generic_reloc): If this is not an inplace reloc,Ian Lance Taylor2-21/+21
then skip bfd_perform_relocation even if the addend is non-zero.
1993-12-21changes so farKen Raeburn1-0/+20
1993-12-21(coff_write_relocs) [SWAP_OUT_RELOC_OFFSET]: Copy addend to r_offset field.Ken Raeburn1-37/+35
1993-12-21added coff-sparc.c to CFILES, rebuilt dependenciesKen Raeburn1-2/+9
1993-12-21(aix386_core_file_p): Use cd_regs[0] for computing the offsetof because AIXKen Raeburn1-0/+341
/bin/cc does not like to take the address of an array. (From Minh Tran-Le.)
1993-12-16 * hosts/hp300bsd.h: Correctly identify 4.3BSD vs 4.4BSD.Jeff Law1-0/+4
1993-12-15cleanups and mach3 changesDavid MacKenzie2-1/+15
1993-12-15 * som.c (som_begin_writing): Fix thinkos in auxiliary headerJeff Law1-0/+6
support. (bfd_som_attach_aux_hdr): Likewise.
1993-12-14 * elf32-hppa.c (hppa_elf_gen_reloc_type): Handle 'T' fieldJeff Law3-22/+128
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-07 * nlmcode.h: Fixes to avoid compiler warnings...Stu Grossman1-0/+4
1993-12-07 * libnlm.h (nlm_backend_data): Removed macro definition.Ian Lance Taylor1-0/+5
(nlm_alpha_backend_data): Adjusted accordingly.
1993-12-06 * som.c (som_begin_writing): Flesh out code for handling simpleJeff Law2-3/+107
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 Law2-6/+22
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 Law2-17/+210
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-12-05 * elf32-hppa.c: (elf_hppa_howto_table): PLABEL and DLTJeff Law2-511/+607
relocations are not pc-relative.
1993-12-05 Fri Dec 3 09:55:17 1993 Pete Hoogenboom (hoogen@cs.utah.edu)Jeff Law2-0/+10
* hppa_stubs.h: (BLE_N_XXX_0_31): New instruction used in linker stub code. (COPY_2_31): Likewise.
1993-12-03 * config/solaris2.mh (HDEFINES): Remove -Dconst=Ian Lance Taylor2-0/+11
* hosts/solaris.h: If not __GNUC__, define const as empty.
1993-12-02 * ecoff.c: Added various casts for 32/64 bit cross targeting.Ian Lance Taylor1-0/+12
(ecoff_mkobject_hook): Set SEC_SHARED_LIBRARY for the .reginfo section so that the linker ignores it. * ecofflink.c: Added various casts for 32/64 bit cross targeting. (ecoff_add_bytes): Changed need argument to size_t. (bfd_ecoff_debug_link_other): Check return value of ecoff_add_string.
1993-12-02 * libnlm.h (struct nlm_obj_tdata): New field backend_data.Ian Lance Taylor1-0/+20
(nlm_backend_data, nlm_alpha_backend_data): New accessor macros. (struct nlm_backend_data): New field no_uninitialized_data. (nlm_no_uninitialized_data): New accessor macro. * nlmcode.h (nlm_compute_section_file_positions): Handle no_uninitialized_data. (nlm_external_reloc_compare): Sort relocs by address for a particular symbol, to make the sort more stable. (nlm_write_object_contents): Cast the arguments to qsort. Get the value of a debugging symbol the same way we get the value of a normal symbol. * nlm32-alpha.c: Various changes. Write out GP and .lita relocs. Set no_uninitialized_data to true. * nlm32-i386.c (nlm32_i386_backend), nlm32-sparc.c (nlm32_sparc_backend): Set no_uninitialized_data field false. * nlmswap.h (nlm_swap_fixed_header_out): Zero out destination before filling it in.
1993-12-02 * som.c (som_section_type, som_decode_symcalss): New functions.Jeff Law1-0/+7
(som_get_symbol_info): Use them. (som_slurp_symbol_table): Set the section of common and undefined symbols correctly.
1993-12-02Various entries.Ian Lance Taylor1-0/+50
1993-12-02 * libnlm.h (struct nlm_backend_data): New fieldsIan Lance Taylor4-301/+758
optional_prefix_size, nlm_backend_object_p, nlm_write_prefix, nlm_set_public_section, nlm_get_public_offset. Removed unused nlm_write_reloc field. Changed nlm_write_import to remove unnecessary symbol argument. Renamed nlm_write_externals to nlm_write_external, and changed cound argument from bfd_vma to bfd_size_type. (nlm_optional_prefix_size, nlm_backend_object_p_func, nlm_write_prefix_func, nlm_set_public_section_func, nlm_get_public_offset_func): New accessor macros. (nlm_write_reloc_func): Removed. (nlm_write_external_func): Adjusted for field renaming. * nlm32-i386.c (nlm_i386_write_import): Renamed from nlm_i386_write_reloc. Removed old nlm_i386_write_import which just called old nlm_i386_write_reloc. (nlm_i386_write_external): Renamed from nlm_i386_write_externals. Declared. Changed second argument from bfd_vma to bfd_size_type. (nlm32_i386_backend): Adjusted for changes to fields and names. * nlm32-sparc.c (nlm_sparc_mangle_relocs): Removed unused, ifdeffed out code. (nlm_sparc_write_import): Removed second argument. (nlm_sparc_write_external): Renamed from nlm_sparc_write_externals. Changed second argument from bfd_vma to bfd_size_type. (nlm32_sparc_backend): Adjusted for changes to fields and names. * nlmcode.h: Removed some unused code. (nlm_object_p): Don't destroy tdata pointer. Call backend_object_p function if it exists. (nlm_slurp_symbol_table): Removed unused variable rcount. Call set_public_section_func if it exists instead of checking NLM_HIBIT. (nlm_compute_section_file_positions): Account for optional_prefix_size. (nlm_write_object_contents): Account for optional_prefix_size. Removed useless variable write_reloc_func. Changed declaration and call of write_import_func. Call write_prefix_func if it exists. Removed unused variables len and temp. Call get_public_offset_func if it exists rather than setting NLM_HIBIT.
1993-12-02 * nlmswap.h: Declare functions.Ian Lance Taylor1-0/+6
1993-12-02New files for preliminary Alpha NetWare support.Ian Lance Taylor2-0/+863
1993-12-01variousKen Raeburn1-0/+20
1993-12-01handle sparccoff_vecKen Raeburn1-0/+1
1993-12-01declare sparccoff_vecKen Raeburn1-0/+1
1993-12-01handle sparc*-*-coff*Ken Raeburn1-0/+1
1993-12-01Various entries. Added entries for NetWare changes made by Sean aIan Lance Taylor1-0/+34
couple of weeks ago.
1993-12-01Added copyright notice and comments.Ian Lance Taylor1-0/+150
1993-12-01 * hosts/alphaosf.h (uint64_typeLOW, uint64_typeHIGH): Cast resultsIan Lance Taylor1-2/+4
to unsigned long.
1993-12-01 * config.bfd: Don't set target64 here, as the setting is ignored.Ian Lance Taylor2-6/+8
* configure.in (ecoffalpha_little_vec): Set target64.
1993-12-01 * bfd-in.h (uint64_typeLOW, uint64_typeHIGH): Fully parenthesizeIan Lance Taylor1-4/+4
for clarity. (fprintf_vma, sprintf_vma): Use %lx, not %x. * bfd-in2.h: Rebuilt.
1993-11-30Irix 4 core support entries.Ian Lance Taylor1-0/+16
1993-11-30 * irix-core.c: New file for Irix 4 and Irix 5 core support.Ian Lance Taylor2-2/+18
Functions taken out of coff-mips.c. Handle vmap type VMAPFILE. * coff-mips.c: Irix 4 core file support moved to irix-core.c. * targets.c: If IRIX_CORE defined, include irix_core_vec in target_vector. * config/irix4.mh (HDEFINES): Add -DIRIX_CORE. (HDEPFILES): Define to be irix-core.o. * config/irix5.mh (HDEFINES): Define to be -DIRIX_CORE. (HDEPFILES): Define to be irix-core.o. * Makefile.in (OPTIONAL_BACKENDS): Added irix-core.o. Removed sco-core.o, which no longer exists. (CFILES): Added all *-core.c files. Rebuilt dependencies.
1993-11-30New file for Irix 4 and Irix 5 core file support. Split out ofIan Lance Taylor1-0/+1
coff-mips.c.
1993-11-24 * elfcode.h (map_program_segments): Restore check of file_size !=Ian Lance Taylor2-22/+29
mem_size, but only if SHT_PROGBITS.
1993-11-24 * ecofflink.c: New file to hold ECOFF debug information linkingIan Lance Taylor6-967/+310
routines. * ecoff.c (ecoff_clear_output_flags, ecoff_rel, ecoff_dump_seclet, ecoff_add_string, ecoff_get_debug): Removed. Functionality now in ecofflink.c. (ecoff_get_extr, ecoff_set_index): New functions. (ecoff_slurp_symbolic_info): Don't save raw_size. (ecoff_bfd_seclet_link): Rewrote to use ecofflink.c functions. (ecoff_compute_section_file_positions): Don't set EXEC_P just because there is a start address. (ecoff_write_object_contents): Handle external symbols here. Use ecofflink.c functions to write out debugging information. * elf32-mips.c (mips_elf_read_ecoff_info, mips_elf_get_extr, mips_elf_set_index): New functions. (mips_elf_seclet_link): Discard empty sections, the .options section and .gptab sections. Handle linking .mdebug section. * libecoff.h (ecoff_data_type): Removed raw_size and ifdbase. * libelf.h (elf_symbol_type): Added mips_extr to tc_data union. * bfd-in.h: Added prototypes for routines in ecofflink.c (some are called by gas, so they are public). * bfd-in2.h: Rebuilt. * Makefile.in (BFD_LIBS): Added ecofflink.o. (CFILES): Added ecofflink.c. (ecofflink.o): New target. Rebuilt dependencies.
1993-11-24New file to hold ECOFF linking routines used by both ECOFF and MIPS ELF.Ian Lance Taylor2-0/+830
1993-11-23Split ChangeLog into two.Steve Chamberlain3-6944/+6954
1993-11-23 * som.c (hppa_object_p): Also recognize SHARED_MAGIC_CNX asJeff Law1-0/+5
a valid magic number if it's been defined.
1993-11-22 * ecoff.c (ecoff_mkobject): Don't create .scommon section; linkerIan Lance Taylor1-0/+8
no longer requires it. (ecoff_bfd_seclet_link, ecoff_sizeof_headers, ecoff_write_object_contents): Don't treat .scommon section specially
1993-11-22 * bfd/config/delta88.mh (HDEFINES): Define this to be -DPTRACE_CORE.Fred Fish2-0/+10
* bfd/config/delta88.mh (HDEPFILES): Defined to be ptrace-core.o. * bfd/ptrace-core.c: New file for dealing with core files with start with the ptrace_user structure found on BCS compliant systems. * bfd/targets.c (ptrace_core_vec): New vector.
1993-11-22 * Minimal support for reading SOM fixup streams. AllowsJeff Law2-48/+808
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-21Modified to be based on lynx.h, like i386 and m68k versions.Ken Raeburn1-28/+1
1993-11-21define FPRINTF_ALREADY_DECLAREDKen Raeburn2-0/+4
1993-11-19 * coff-a29k.c (a29k_reloc): For R_IREL, don't left shiftIan Lance Taylor2-4/+9
signed_value before sign extending it. Don't subtract out reloc_entry->address. This makes it compatible with what gas is generating. Fixes PR 3790.