Ian Lance Taylor
c93e959c81
* i386linux.c (NEEDS_SHRLIB): Define.
...
(linux_tally_symbols): Crash if a NEEDS_SHRLIB symbol is
undefined. From hjl@nynexst.com (H.J. Lu).
1995-02-09 17:19:53 +00:00
Ian Lance Taylor
62e5acdce9
* elfcode.h (elf_bfd_final_link): Add assertion to make sure that
...
dynamic and dynobj are in synch.
1995-02-09 17:03:47 +00:00
Ian Lance Taylor
6581a70a9a
* linker.c (generic_link_check_archive_element): Allocate common
...
symbol information structure. Don't bother to check for common
symbol size overflow.
(_bfd_generic_link_add_one_symbol): Likewise.
* aoutx.h (aout_link_check_ar_symbols): Likewise.
* linker.c (generic_link_check_archive_element): Adjust references
to common symbol information for new structure.
(_bfd_generic_link_add_one_symbol): Likewise.
* aoutx.h (aout_link_check_ar_symbols): Likewise.
(aout_link_add_symbols): Likewise.
* ecoff.c (ecoff_link_add_externals): Likewise.
* elfcode.h (elf_link_add_object_symbols): Likewise.
(elf_link_output_extsym): Likewise.
* sunos.c (sunos_add_one_symbol): Likewise.
1995-02-08 22:57:48 +00:00
David Edelsohn
121a846514
elfcode.h (elf_sort_hdrs): Put SHT_NOBITS sections after !SHT_NOBITS.
1995-02-08 20:58:01 +00:00
Jeff Law
28860f46fa
* som.c (som_bfd_find_nearest_line): Just return false, don't
...
abort.
1995-02-07 23:29:08 +00:00
Ken Raeburn
2559e01429
clean up mechanics of mosberger-tang's changes
1995-02-07 20:06:28 +00:00
Ian Lance Taylor
95b0f14bce
* ecoffswap.h (ecoff_swap_pdr_in): Zero out intern before setting
...
any of the fields.
1995-02-07 19:22:43 +00:00
Ken Raeburn
97d5a14949
ecoff gprof related fixes & improvements from David Mosberger-Tang
1995-02-07 01:06:25 +00:00
Ian Lance Taylor
5947417403
* libelf.h (struct elf_link_hash_table): Add saw_needed field.
...
* elfcode.h (elf_link_add_object_symbols): Set saw_needed if
DT_NEEDED seen in .dynamic section.
(elf_link_output_extsym): Warn if an undefined symbol is
only referenced from a dynamic object, and not making a shared
object, and saw_needed is false.
* elf.c (_bfd_elf_link_hash_table_init): Initialize saw_needed.
1995-02-06 23:23:37 +00:00
Ian Lance Taylor
0bef7f7266
* libelf.h (ELF_LINK_HASH_DEFINED_WEAK): Don't define.
...
* elfcode.h (elf_link_add_object_symbols): Don't clear or set
ELF_LINK_HASH_DEFINED_WEAK.
(elf_link_output_extsym): Don't check ELF_LINK_HASH_DEFINED_WEAK.
1995-02-06 21:34:44 +00:00
Ian Lance Taylor
6c97aedf26
Distinguish a weak defined symbol from a regular defined symbol.
...
* linker.c (enum link_action): Add DEFW.
(link_action): Add bfd_link_hash_defweak column.
(_bfd_generic_link_add_one_symbol): Add DEFW case. Handle
bfd_link_hash_defweak in a few other cases.
* Many files (bfd_link_hash_undefweak): Renamed from
bfd_link_hash_weak.
* aoutx.h (aout_link_write_symbols): Handle bfd_link_hash_defweak.
(aout_link_write_other_symbol): Likewise.
(aout_link_input_section_std): Likewise.
(aout_link_input_section_ext): Likewise.
* bout.c (get_value): Likewise.
* coff-a29k.c (coff_a29k_relocate_section): Likewise.
* coff-alpha.c (alpha_convert_external_reloc): Likewise.
(alpha_relocate_section): Likewise.
* coff-mips.c (mips_relocate_section): Likewise.
(mips_relax_section): Likewise.
(bfd_mips_ecoff_create_embedded_relocs): Likewise.
* cofflink.c (coff_write_global_sym): Likewise.
(_bfd_coff_generic_relocate_section): Likewise.
* ecoff.c (ecoff_link_add_externals): Likewise.
(ecoff_link_write_external): LIkewise.
* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
(elf32_hppa_size_stubs): Likewise.
* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
(elf_i386_relocate_section): Likewise.
(elf_i386_finish_dynamic_symbol): Likewise.
* elf32-mips.c (mips_elf_output_extsym): Likewise.
(mips_elf_relocate_section): Likewise.
* elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Likewise.
(elf32_sparc_relocate_section): Likewise.
* elfcode.h (elf_link_add_object_symbols): Likewise.
(elf_adjust_dynamic_symbol): Likewise.
(elf_bfd_final_link): Likewise.
(elf_link_output_extsym): Likewise.
* i386linux.c (linux_add_one_symbol): Likewise.
(linux_tally_symbols): Likewise.
(linux_finish_dynamic_link): Likewise.
* linker.c (_bfd_generic_link_output_symbols): Likewise.
(set_symbol_from_hash): Likewise.
* reloc16.c (bfd_coff_reloc16_get_value): Likewise.
(bfd_perform_slip): Likewise.
* sunos.c (sunos_add_one_symbol): Likewise.
(sunos_scan_std_relocs): Likewise.
(sunos_scan_ext_relocs): Likewise.
(sunos_scan_dynamic_symbol): Likewise.
(sunos_write_dynamic_symbol): Likewise.
1995-02-06 20:01:08 +00:00
Ken Raeburn
5dc8db4897
msdos .exe file support from bryan ford
1995-02-06 08:31:27 +00:00
Jeff Law
9ea5de84ab
* som.c (som_object_setup): More heruistics to detect the
...
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-02-01 08:35:40 +00:00
David Edelsohn
ef6fb95dea
* libelf.h (struct elf_obj_tdata): New member program_header_size.
...
* elfcode.h (get_program_header_size): New parameters sorted_hdrs,
count, and maxpagesize. All callers updated.
If sorted_hdrs is non-NULL, use it to compute the number of segments.
Save result in case called again.
(assign_file_positions_except_relocs): Sort headers before calling
get_program_header_size.
1995-02-01 05:56:53 +00:00
Ian Lance Taylor
5945db2997
* elfcode.h (map_program_segments): Add sorted_hdrs parameter.
...
Search through it rather than through unsorted section headers.
(assign_file_positions_except_relocs): Pass sorted_hdrs to
map_program_segments.
1995-01-31 20:55:25 +00:00
Ken Raeburn
3e46110757
* ecoff.c (_bfd_ecoff_find_nearest_line): Fix problems in range checking.
...
Expect argument OFFSET to be section-relative. From David Mosberger-Tang,
davidm@piston.cs.arizona.edu .
1995-01-31 03:57:31 +00:00
Jeff Law
8bc3e02c9d
* som.c (compare_subspaces): New function to sort subspaces by
...
their location in the object file.
(setup_sections): When computing the index for each subspace,
handle case where setup_sections reads the subspaces in a
different order that they appear in the object file.
(som_is_space): Also examine the output section for the containing
section.
(som_is_subspace, som_is_container): Likewise.
(som_begin_writing): Don't prepare or write fixups here. When
writing the symbol strings, use the unsorted symbol table.
(som_write_object_contents): Don't write the symbol table here.
(som_finish_writing): Prepare and write the fixups here. Likewise
for the symbol table.
(som_bfd_derive_misc_symbol_info): Undefined symbols always have
type SS_UNSAT regardless of BSF_EXPORT.
(som_set_reloc_info): Unpack and attach argument location
information for R_PCREL_CALL and R_ABS_CALL relocations.
1995-01-29 06:37:35 +00:00
Jeff Law
fede999213
* som.c (som_object_setup): New heuristic to determine if the
...
entry and flags fields are switched in the exec header.
1995-01-28 19:50:52 +00:00
Ian Lance Taylor
cd9dba7b37
* elfcode.h (elf_link_add_object_symbols): Use *sym_hash instead
...
of h if we might not be doing an ELF link.
1995-01-28 05:17:04 +00:00
Ian Lance Taylor
cea133af7f
* elf32-mips.c (mips_elf_final_link): If the size of an input
...
.reginfo section is zero, force it to the correct size, since the
linker emulation code may have clobbered it.
1995-01-27 21:27:33 +00:00
Ian Lance Taylor
6977046f0f
* elfcode.h (elf_sort_hdrs): Correct SHF_ALLOC test.
...
(assign_file_positions_except_relocs): Free sorted_hdrs.
1995-01-27 21:24:28 +00:00
Steve Chamberlain
7896128dfa
* srec.c (srec_set_section_contents): Fix off by
...
one end address calculation.
1995-01-27 16:41:11 +00:00
Ian Lance Taylor
4b412ed189
* elfcode.h (elf_link_add_object_symbols): Only examine weakdef if
...
we are using an ELF hash table.
1995-01-26 21:48:14 +00:00
Steve Chamberlain
61a914c923
* config.bfd: (m68*-est-coff): New configuration.
1995-01-26 17:37:31 +00:00
Ian Lance Taylor
e83e94effd
* aoutx.h (NAME(aout,some_aout_object_p)): Always set EXEC_P if
...
the start address is in the .text section, even if STAT_FOR_EXEC
is set. Just use STAT_FOR_EXEC as an additional test.
1995-01-26 16:43:54 +00:00
Michael Meissner
c6d729b375
Add new relocs for PowerPC Elf support.
...
Add eabi support.
1995-01-26 16:31:24 +00:00
Ian Lance Taylor
e079cfe890
* coff-sh.c (CALC_ADDEND): Don't define.
...
(coff_sh_relocate_section): Remove.
(coff_relocate_section): Use _bfd_coff_generic_relocate_section.
1995-01-26 04:27:50 +00:00
Ian Lance Taylor
16fe8950ad
* elf32-mips.c (mips_elf_output_extsym): Set the value of the
...
ECOFF symbol from the hash table entry.
1995-01-24 19:27:35 +00:00
Steve Chamberlain
c525c3afcb
Mon Jan 23 14:53:35 1995 Steve Chamberlain <sac@splat>
...
* coff-sh.c (coff_sh_relocate_section): Don't subtract
vma twice.
1995-01-23 22:57:30 +00:00
Ian Lance Taylor
6e3acf74d0
* coff-sh.c (sh_reloc): Don't ignore the previous contents of an
...
R_SH_IMM32 reloc.
PR 6215.
1995-01-23 22:32:18 +00:00
Ian Lance Taylor
6e7f3f077b
x
1995-01-23 19:01:41 +00:00
Ian Lance Taylor
123bfaa5ec
* opncls.c (bfd_openstreamr): Call bfd_cache_init.
1995-01-23 18:35:07 +00:00
Ian Lance Taylor
04dc16b76b
* sunos.c (sunos_add_one_symbol): Only set the sunos specific
...
fields if we are doing a sunos link.
1995-01-20 16:57:34 +00:00
Ian Lance Taylor
d01a0278a0
* bfd-in.h (bfd_byte, reloc_howto_type): Define here, not...
...
* reloc.c (bfd_byte, reloc_howto_type): here.
* Changed all occurrences of ``const struct reloc_howto_struct''
to be ``reloc_howto_type'' instead.
* bfd-in2.h, libbfd.h, libcoff.h: Rebuilt.
Avoids problems with the native Irix 5 compiler.
1995-01-17 21:16:53 +00:00
Ian Lance Taylor
8a51b06cf6
* opncls.c (bfd_openstreamr): New function.
...
* bfd-in2.h: Rebuilt.
1995-01-17 19:26:56 +00:00
Ian Lance Taylor
6a5848cd10
* elf32-mips.c (enum reloc_type): Define new relocs used on Irix.
...
(elf_mips_howto_table): Add entries for new relocs.
(mips_elf_section_from_shdr): Handle SHT_MIPS_MSYM,
SHT_MIPS_DWARF, and SHT_MIPS_EVENTS.
(mips_elf_fake_sections): Handle sections named .msym, .debug_*
and .MIPS.events.*.
1995-01-17 15:55:55 +00:00
Steve Chamberlain
c21b376fc6
* archures.c, Makefile.in, targets.c, bfd-in2.h, coffcode.h,
...
config.bfd, configure.in, config/w65.mt: Initial support for the W65.
1995-01-16 05:39:06 +00:00
Steve Chamberlain
9560e662d0
Sun Jan 15 13:57:45 1995 Steve Chamberlain <sac@splat>
...
* opncls.c (bfd_fdopenr): Configure for WIN32.
1995-01-15 22:04:02 +00:00
Ken Raeburn
c3fcc07805
Makefile changes for arc, rce, diststuff.
...
Const fixes and hex_value changes to various files.
1995-01-12 21:46:17 +00:00
Peter Schauer
b69fe36371
* hosts/symmetry.h: Redefine `shared' to enable compilation
...
with the native Dynix cc compiler.
* i386dynix.c: Include aoutx.h instead of using routines
from aout32.c.
1995-01-12 18:33:52 +00:00
Ken Raeburn
9c84b228d8
Forgot an entry in last checkin:
...
* ecoff.c (ecoff_type_to_string): Local variable `buffer1' doesn't
need to be static.
1995-01-12 02:44:45 +00:00
Ken Raeburn
82b1edf7b9
Change "reloc_howto_type" typedef to be "const", since all uses of it are (or
...
should be) anyways.
1995-01-12 02:41:04 +00:00
Ian Lance Taylor
788d94361f
* sunos.c (sunos_add_one_symbol): Don't core dump if a multiple
...
definition of an absolute symbol is encountered.
1995-01-11 19:42:28 +00:00
Ian Lance Taylor
040c913e18
* linker.c (_bfd_generic_link_add_one_symbol): Ignore
...
redefinitions of an absolute symbol to the same value.
PR 6159.
1995-01-11 19:38:06 +00:00
Ian Lance Taylor
f78b396350
* elfcode.h (elf_link_add_object_symbols): It's reasonable for no
...
flags to be set, so don't insist otherwise.
1995-01-09 20:52:59 +00:00
Ian Lance Taylor
42cf6d7950
* elfcode.h (elf_slurp_symbol_table): Don't set BSF_GLOBAL for an
...
undefined or common symbol.
(elf_link_add_object_symbols): Likewise.
1995-01-06 21:50:28 +00:00
Jeff Law
eb57c77670
* som.c (bfd_section_from_som_symbol): Only return sections which
...
correspond to subspaces.
1995-01-05 00:34:07 +00:00
Jeff Law
1b56797098
* som.c (som_begin_writing): Don't forget to bump the
...
total_subspaces when writing the unloadable subspaces.
1995-01-04 21:15:42 +00:00
Jeff Law
c3a1888801
* som.c (som_write_fixups): Use SEC_HAS_CONTENTS to identify
...
bss-like sections.
(som_get_section_contents): Likewise.
(som_set_section_contents): Likewise.
1994-12-29 03:56:20 +00:00
Ken Raeburn
8675437ee1
coffgen.c changes checked in last tuesday -- forgot to check in the log entry
1994-12-27 21:41:33 +00:00