* Makefile.in: versados.o is now conditionally built.
* coffcode.h (add_data_entry): New function.
(coff_write_object_contents): Clean up. Calculate
data entries.
* cofflink.c (_bfd_coff_generic_relocate_section):
.reloc and .edata sections are IMAGE_BASED too.
If there's a base_file then write out base information.
* configure.host (i386-*-pe): New.
* syms.c (coff_section_type): Only scan prefixes.
* targets.c (bfd_target_vector): Versados is now conditionally
built.
* config/m68k-coff.mt: Build versados.o
* hosts/i386pe.h: New file.
to bfd_tttrue, bfd_fffalse so as not to conflict with functions.
* coffswap.h (coff_swap_scnhdr_out): Remove version that was
hacked for MPW C.
* mpw-config.in: Set shell vars instead of pasting to makefile
for each configuration, edit coffswap.h to make MPW C not choke.
(i386-unknown-coff, sh-hitachi-hms): Recognize.
* mpw-make.in (BFD_LIBS): Add versados.c.o.
* versados.c (versados_scan): Properly cast results from bfd_alloc.
to the target vector.
* libbfd-in.h (_bfd_generic_bfd_copy_private_symbol_data): Define.
(_bfd_nolink_bfd_link_split_section): Likewise.
(bfd_generic_link_split_section): Declare.
* syms.c (bfd_copy_private_symbol_data): Define.
* linker.c (bf_link_split_section): Likewise.
* som.c (som_bfd_copy_private_symbol_data): New function
(som_bfd_link_split_section): Likewise.
* All other targets updated with default versions of new routines.
* Take out my braindamaged bfd_true/bfd_false changes from earlier
today. Replace with just:
* bfd-in.h: (TRUE_FALSE_ALREADY_DEFINED): Define this if
compiling with g++-2.6 or later.
* bfd-in2.h: Rebuilt.
compiling with g++-2.6 or later.
(bfd_set_section_vma): Use bfd_true and bfd_false rather than
true and false.
(bfd_set_section_alignment): Likewise.
(bfd_set_section_userdata): Likewise.
(bfd_set_cacheable): Likewise.
* bfd-in2.h: Rebuilt.
<schwab@issan.informatik.uni-dortmund.de>:
* elfcode.h (elf_link_add_object_symbols): Check for NULL when looping through
the symbol hashes.
(elf_bfd_final_link): When looking for _init and _fini don't use the symbol if
it is imported from another object.
* elf32-m68k.c: Relocation type changed from REL to RELA. Regular and dynamic
linking support functions added, similar to other elf targets.
pr ld/6997
* elf32-i386.c (elf_i386_relocate_section): Give error
message when linking to a shared reloc which isn't there.
Wed May 24 10:40:00 1995 Steve Chamberlain <sac@slash.cygnus.com>
Support for ARM-PE.
* Makefile.in, coffcode.h, config.bfd, configure.in, pe-arm.c,
pei-arm.c, reloc.c, targets.c, config/arm-pe.mt:
Support for ARM COFF/PE.
* bfd.c (bfd_get_relocated_section_contents): Now a function, tries calling
routine from input bfd target vector for bfd_indirect_link_order. Put a
declaration into the header file.
* bfd-in2.h: Regenerated.
* elf32-mips.c (gprel16_with_gp): New function, split out from
mips_elf_gprel16_reloc.
(mips_elf_gprel16_reloc): Call it. If output bfd target vector isn't elf
flavoured, abort, since it's assumed to be elf in some of this code, including
the code that looks up the gp value.
(elf32_mips_get_relocated_section_contents): New function, modified from
bfd_generic_get_relocated_section_contents to deal with passing gp to
gprel16_with_gp.
(bfd_elf32_bfd_get_relocated_section_contents): New macro.
* elf32-target.h (bfd_elf32_bfd_get_relocated_section_contents): Don't define
if already defined.
tekhex.c (first_phase): Understand type 0 symbols.
(tekhex_write_object_contents): Fix typo in final record.
Thu May 11 16:43:14 1995 Steve Chamberlain <sac@slash.cygnus.com>
pr ld/6840
* coff-i960.c (optcall_callback): don't try and optimize
undefined refs.
(coff_write_relocs): Search for broken relocs on the way
out and fix them up.
(coff_renumber_symbols): Calculate and return index of
first undefined symbol.
(coff_write_object_contents): Call coff_renumber_symbols
and coff_write_relocs with the new args.
* libcoff.h: (coff_renumber_symbols, coff_renumber_symbols):
Modified prototypes.
Thu May 11 16:43:14 1995 Steve Chamberlain <sac@slash.cygnus.com>
Tom Griest <griest@cs.yale.edu>
Initial support for PE format.
* Makefile.in, targets.c, configure.in, config.bfd:
Add support for i386-*-winnt and i386-*-pe.
* archive.c (do_slurp_coff_armap): Understand NTPE format
archives.
(_bfd_slurp_extended_name_table): Turn \ in a filename
into /.
* bfd-in.h (bfd_link_subsystem, _bfd_link_stack_heap): New.
* coff-i386.c (howto_table): Conditionalize PCRELOFFSET.
* coffcode.h (IMAGE_BASE): New.
(coff_compute_section_file_positions): Throw away .junk
sections for PE, align symbols.
(coff_write_object_contents): Throw away .junk sections
for PE. Remember info on .idata and .rsrc sections.
Fill in the PE header.
(coff_slurp_symbol_table): PE uses C_SECTION class.
* cofflink.c (_bfd_coff_final_link): Keep PE info up to date.
(_bfd_coff_generic_relocate_section): Cope with PE relocs.
* coffswap.h (coff_swap_{aout/file/scn/sym}hdr_{in/out}):
New code for PE headers.
* config.bfd: Change linux to default to elf. Using
i[345]86-*-linuxaout will build a library which defaults to a.out.
* config/i386-laout.mt: Rename from old config/i386-linux.mt.
* config/i386-linux.mt: Rename from old config/i386-lelf.mt.
Comment out EXTRALIBS.
* config/i386-lelf.mt: Remove.
symbols which the main linker code did not do anything with.
(_bfd_generic_link_output_symbols): Use udata.p if it is set,
rather than looking the symbol up in the hash table. Just pass
through constructor symbols for which udata.p is not set. If the
linker defined the symbol, clear the constructor flag.
Fix -r for b.out file format when constructor symbols are defined.