Commit graph

692 commits

Author SHA1 Message Date
Alan Modra
1319985e96 H.J's x86 fix for "nm -l" on shared libraries, applied to ppc too. 2000-04-20 05:37:05 +00:00
Alan Modra
dcdea4f4b3 K&R compiler fixes 2000-04-19 10:53:01 +00:00
Jim Wilson
fac417805a Bfd support for generating IA-64 EFI binaries.
* Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
	(BFD64_BACKENDS_CFILES): Mention coff-ia64.c
	(coff-ia64.lo): Add dependency.
	* Makefile.in: Regenerate.
	* coff-ia64.c: New file.
	* efi-app-ia32.c: Ditto.
	* efi-app-ia64.c: Ditto.
	...
2000-04-18 04:03:16 +00:00
Timothy Wall
b9af77f58f Clean up load page support for tic54x. 2000-04-18 02:21:27 +00:00
Alan Modra
fc633e5b97 Remove U suffix from constants for K&R compilers.
Fix a couple of 64 bit nits.
2000-04-13 01:08:05 +00:00
Alan Modra
7df5277ad6 Fix auto-dependency bug. 2000-04-11 23:57:13 +00:00
Alan Modra
8a4ac87108 Allow address wrap for bitfields again. 2000-04-11 23:01:50 +00:00
Alan Modra
43cbcf2859 Fit 64-bit nits. 2000-04-11 13:07:56 +00:00
Timothy Wall
4af1d5f662 Mods to allow compilation of BFD all targets. 2000-04-11 04:11:03 +00:00
Andrew Cagney
a2d91340f3 Remove ``-W -Wall'' from top-level Makefile/configure.
Add ``-W -Wall'' to sub-directories bfd, binutils, gas gprof, ld and
opcodes by the addition of WARN_CFLAGS to Makefile.am and configury to
set it.  Add configure option --enable-build-warnings.
Re-generate all and sundry using auto*-000227.
2000-04-09 12:17:43 +00:00
Nick Clifton
d4c97e70fc Fix dependency for elfarm-oabi.c 2000-04-08 00:19:37 +00:00
Michael Snyder
0ab2f69a43 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
* elfcore.h (elf_core_file_p): preserve value of tdata at entry,
        and restore it on failure.  Release newly allocated tdata on
        failure.
2000-04-07 20:27:29 +00:00
Jim Wilson
ccdb16fc41 Fix linker segfault that occured when linking ia64-linux kernel.
* dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
	(decode_line_info): Set it.  Report error if unit->line_offset is
	equal to or larger than it.
2000-04-07 18:36:04 +00:00
Timothy Wall
81635ce4f5 BFD and include/coff support for tic54x target. 2000-04-07 17:06:58 +00:00
Michael Snyder
279b54a119 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
* elfcore.h (elf_core_file_p): call backend_object_p which
        thereby gets an opportunity to update the arch/machine type.
2000-04-07 03:59:23 +00:00
Timothy Wall
34cbe64ecf SEC_BLOCK, SEC_CLINK, and C_STATLAB added (TI COFF support). 2000-04-07 00:58:07 +00:00
Nick Clifton
fc830a8329 Only check EF_xxx flags if the EABI version number is unknown. 2000-04-06 23:32:19 +00:00
Joern Rennecke
015551fcfb sh-dsp REPEAT support:
opcodes:

        * sh-opc.h (sh_nibble_type): Remove DISP_8 and DISP_4.
        Split IMM_[48]{,BY[24]} into IMM[01]_[48]{,BY[24]}.  Add REPEAT.
        (sh_arg_type): Add A_PC.
        (sh_table): Update entries using immediates.  Add repeat.
        * sh-dis.c (print_insn_shx): Remove DISP_8 and DISP_4.
        Split IMM_[48]{,BY[24]} into IMM[01]_[48]{,BY[24]}.  Add REPEAT.

gas:

        * config/tc-sh.c (immediate): Delete.
        (sh_operand_info): Add immediate member.
        (parse_reg): Use A_PC for pc.
        (parse_exp): Add second argument 'op'.  All callers changed.
        (parse_at): Expect pc to be coded as A_PC.
        Use immediate field in *op.
        (insert): Add fourth argument 'op'.  All callers changed.
        (build_relax): Add second argument 'op'.  All callers changed.
        (insert_loop_bounds): New function.
        (build_Mytes): Remove DISP_4.
        Split IMM_[48]{,BY[24]} into IMM[01]_[48]{,BY[24]}.  Add REPEAT.
        (assemble_ppi): Use immediate field in *operand.
        (sh_force_relocation): Handle BFD_RELOC_SH_LOOP_{START,END}.
        (md_apply_fix): Likewise.
        (tc_gen_reloc): Likewise.  Check for a pcrel BFD_RELOC_SH_LABEL.

include/coff:

        * sh.h (R_SH_LOOP_START, R_SH_LOOP_END): Define.

include/elf:

        * sh.h (R_SH_LOOP_START, R_SH_LOOP_END): New RELOC_NUMBERs.

bfd:

        * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
        BFD_RELOC_SH_LOOP_END.
        * elf32-sh.c (sh_elf_howto_tab): Change special_func to
        sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
        Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
        (sh_elf_reloc_loop): New function.
        (sh_elf_reloc): No need to test for always-to-be-ignored relocs
        any more.
        (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
        (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
        * bfd-in2.h, libbfd.h: Regenerate.
2000-04-05 21:23:05 +00:00
Alan Modra
8ad3436c79 Move translated part of bug report string back into .c files so
xgettext can find it.  Regnerate .pot files.
2000-04-04 14:32:35 +00:00
Alan Modra
41b49281c1 Use "gcc -MM" for dependencies, and update them. 2000-04-04 10:53:56 +00:00
Kevin Buettner
653f71caaf AIX 4.3 changes 2000-04-03 21:48:31 +00:00
Ian Lance Taylor
9e422a2e27 2000-04-03 H.J. Lu <hjl@gnu.org>
* cache.c (bfd_open_file): Unlink the output file only if
	it has none zero size.
2000-04-03 19:19:11 +00:00
Alan Modra
c555c5c58e Don't emit relative relocations for non-loaded sections in shared objects.
Fix for DWARF-2 sections .debug_info and .debug_line.
2000-04-03 12:42:18 +00:00
Hans-Peter Nilsson
1642229ef3 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
BFD_RELOC_16 to switch for extended relocs.
	(MY_swap_ext_reloc_in): New.
	(MY_swap_ext_reloc_out): New.
	(NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
	than NAME(aout,swap_ext_reloc_in) for extended relocs.
	(NAME(aout,squirt_out_relocs)): Similarly use
	MY_swap_ext_reloc_out.
	(aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
2000-04-03 11:44:45 +00:00
Jeff Law
4259e8b62b * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
the R_PCRWORD_B case.
2000-04-03 06:55:06 +00:00
Alan Modra
65d7f9a691 Set CHUNK size to 16 bytes to prevent download failures on lame targets. 2000-03-30 23:49:07 +00:00
Doug Evans
8b125cdefa * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
HOWTO references to bfd_elf_generic_reloc, that have
	partial_inplace == true, now use the new function.  The function
	is based on the recent rewrite of m32r_elf_lo16_reloc(), and
	extends its fixes to the R_M32R_{16,24,32} relocs.
	The new logic in m32r_elf_lo16_reloc() has been removed, and
	it instead calls the new routine to obtain that functionality.
2000-03-30 22:16:39 +00:00
Alan Modra
adde6300e0 ATMEL AVR microcontroller support. 2000-03-27 08:39:14 +00:00
H.J. Lu
cd6f9321da 2000-03-24 H.J. Lu <hjl@gnu.org>
* elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
	(elf64_alpha_find_reloc_at_ofs): Likewise.
2000-03-24 20:50:30 +00:00
Geoffrey Keating
4fb431855b Add missing parts of ChangeLog entry for my change of 2000/02/19 00:59:26 to coff-rs6000.c. 2000-03-23 23:37:38 +00:00
Alan Modra
d5afc56eb1 Extend the allowed bitfield range (ie. that for which
complain_overflow_bitfield doesn't complain) from -2**(n-1)..2**n-1 to
-2**n..2**n.  This might mean that some reloc overflows are no longer
caught, but it solves the address wrap problem for 16-bit relocs
nicely.  In any case, ports that rely on complain_overflow_bitfield
for reloc overflow checking were not getting a very good check
previously.  A bitfield range in a machine instruction is typically
either the signed or unsigned n bit numbers, not the overlap of these
two ranges.
2000-03-17 02:02:38 +00:00
Catherine Moore
4c72e23a26 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite. 2000-03-14 18:16:05 +00:00
Jeff Law
c4d5c859ba * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
of shrinks properly, including the last reloc.
2000-03-14 17:50:00 +00:00
Jeff Law
003e46d0ac * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
check for R_MOVL2.
2000-03-13 23:57:25 +00:00
Alan Modra
911c6daef6 Return bfd_error_wrong_format on a format mismatch. 2000-03-11 23:09:42 +00:00
Geoffrey Keating
7893e6a2a7 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
sign-extension and big-endian compensation for
R_MIPS_64 even in ld -r.
2000-03-11 02:23:10 +00:00
Geoffrey Keating
bb2d6cd7b1 In bfd/:
* elf32-mips.c (mips_elf_next_relocation): Rename from
	mips_elf_next_lo16_relocation, and generalize to look
	for any relocation type.
	(elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
	(elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
	(elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
	(elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
	(elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
	(elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
	(bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
	(mips_rtype_to_howto): Likewise.
	(mips_elf_calculate_relocation): Handle new relocs.
	(_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
	are paired.  The addend for R_MIPS_GNU_REL16_S2
	is shifted right two bits.
In gas/:
	* config/tc-mips.c (mips_ip): Don't put stuff in .rodata
	when embedded-pic.

	* config/tc-mips.c (SWITCH_TABLE): The ELF embedded-pic
 	implementation doesn't have special handling for switch
 	statements.
	(macro_build): Allow for code in sections other than .text.
	(macro): Likewise.
	(mips_ip): Likewise.
	(md_apply_fix): Do pc-relative relocation madness for MIPS ELF.
  	Don't perform relocs if we will be outputting them.
	(tc_gen_reloc): For ELF, just use fx_addnumber for pc-relative
 	relocations.  Allow BFD_RELOC_16_PCREL_S2 relocs when
 	embedded-pic.
In gas/testsuite/:
	* gas/mips/empic.d: New file.
	* gas/mips/empic.s: New file.
	* gas/mips/mips16-e.d: New file.
	* gas/mips/mips16-e.s: New file.
	* gas/mips/mips16-f.d: New file.
	* gas/mips/mips16-f.s: New file.
	* gas/mips/mips.exp: Add empic, mips16-e.  Add mips16-f as an
	expected failure.
In include/elf:
	* mips.h: Add R_MIPS_GNU_REL_HI16, R_MIPS_GNU_REL_LO16,
 	R_MIPS_GNU_REL16_S2, R_MIPS_PC64 and R_MIPS_PC32 relocation
 	numbers.
2000-03-11 02:16:25 +00:00
Alan Modra
88b6bae086 Fix typos in comments, and restore comment formatting destroyed by emacs at
some stage.
2000-03-11 01:16:52 +00:00
Doug Evans
c1b7949f6e * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
* bfd-in2.h: Rebuild.
2000-03-07 21:04:31 +00:00
Nick Clifton
11c8a8d1b7 fix LINK6 code. 2000-03-06 19:49:58 +00:00
Catherine Moore
b47e35fc72 * elf.c (swap_out_syms): Check for null type_ptr. 2000-03-06 15:44:25 +00:00
Ian Lance Taylor
8ba8a4628f 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
* aout-target.h (MY(write_object_contents)): Remove unused
	and unusable "#if CHOOSE_RELOC_SIZE".
	* pc532-mach.c (MY(write_object_contents)): Ditto.
	* netbsd.h (MY(write_object_contents)): Ditto.
	* hp300hpux.c (MY(write_object_contents)): Ditto.
	* freebsd.h (MY(write_object_contents)): Ditto.
	* aout-tic30.c (tic30_aout_write_object_contents): Ditto.
2000-03-02 01:38:33 +00:00
Nick Clifton
8603339400 Fix building with --enable-targets=all 2000-03-01 20:39:07 +00:00
H.J. Lu
5cc7c785d2 2000-03-01 H.J. Lu <hjl@gnu.org>
* aoutx.h (aout_link_input_section_std): Pass "true" to
	the undefined_symbol callback.
	(aout_link_input_section_ext): Likewise.
	* bout.c (get_value): Likewise.
	* coff-a29k.c (coff_a29k_relocate_section): Likewise.
	* coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
	Likewise.
	(alpha_relocate_section): Likewise.
	* coff-arm.c (coff_arm_relocate_section): Likewise.
	* coff-i960.c (coff_i960_relocate_section): Likewise.
	* coff-mcore.c (coff_mcore_relocate_section): Likewise.
	* coff-mips.c (mips_relocate_section): Likewise.
	* coff-ppc.c (coff_ppc_relocate_section): Likewise.
	* coff-sh.c (sh_relocate_section): Likewise.
	* coff-tic80.c (coff_tic80_relocate_section): Likewise.
	* cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
	* elf-m10200.c (mn10200_elf_relocate_section): Likewise.
	* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
	* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
	* elf32-fr30.c (fr30_elf_relocate_section): Likewise.
	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
	* elf32-i370.c (i370_elf_relocate_section): Likewise.
	* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
	* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
	* elf32-sh.c (sh_elf_relocate_section): Likewise.
	* elf32-v850.c (v850_elf_relocate_section): Likewise.
	* elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
	* elflink.h (elf_link_output_extsym): Likewise.
	* pe-mips.c (coff_pe_mips_relocate_section): Likewise.
	* reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
	* reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.

	* elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
	undefined_symbol callback when building shared library with
	-Bsymbolic and undefined symbols are allowed. Otherwise, pass
	"true".
	* elf32-arm.h (elf32_arm_relocate_section): Likewise.
	* elf32-i386.c (elf_i386_relocate_section): Likewise.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-mips.c (mips_elf_calculate_relocation): Likewise.
	(elf32_mips_get_relocated_section_content): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2000-03-01 19:40:54 +00:00
Nick Clifton
17505c5cfa Add WinCE support. 2000-02-28 18:56:11 +00:00
Ian Lance Taylor
37fb6db111 2000-02-27 Jakub Jelinek <jakub@redhat.com>
* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
	architecture if the object causing the bump is dynamic.
	* elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
	and also don't it for memory ordering.
	(sparc64_elf_write_relocs): Take src_rela out of the loop.
2000-02-28 03:50:32 +00:00
Ian Lance Taylor
67d83c76c5 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
calling bfd_get_section_size_before_reloc.
	(decode_line_info): Likewise.
	(_bfd_dwarf2_find_nearest_line): Likewise.
2000-02-28 03:39:28 +00:00
Ian Lance Taylor
e56f75e906 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
* Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
	name of the libtool directory.
	* Makefile.in: Rebuild.
2000-02-27 17:08:06 +00:00
Jeff Law
36e89602d2 * som.c (SOM_HOWTO): Define.
(som_hppa_howto_table): Use it.
2000-02-26 01:45:22 +00:00
Alexandre Oliva
9d23b7fed1 * config.bfd: Enable 64 bit support for GNU/Linux/sparc. 2000-02-25 19:39:00 +00:00
Alexandre Oliva
246c66877d * config.bfd: Enable 64 bit support for Solaris7+/sparc. 2000-02-25 19:18:17 +00:00
Catherine Moore
ba20314ec2 * som.c (som_misc_symbol_info): Add field
secondary_def.
        (som_bfd_derive_misc_symbol_info):  Initialize
        secondary_def.
        (som_build_and_write_symbol_table): Keep track
        of secondary_def field.
        (som_slurp_symbol_table): Set BSF_WEAK symbol flag
        if secondary_def field is set.
        (som_bfd_ar_write_symbol_stuff): Initialize
        secondary_def.
2000-02-24 13:41:02 +00:00
Nick Clifton
ecb651f0ab Accept 16-bit addresses. 2000-02-23 22:27:55 +00:00
Alan Modra
5b93d8bb51 Add IBM 370 support. 2000-02-23 13:52:23 +00:00
Ian Lance Taylor
1287d1cc37 2000-02-22 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_add_object_symbols): If a version symbol is
	not defined, don't add a second ELF_VER_CHR.
2000-02-22 08:06:01 +00:00
Ian Lance Taylor
a432cc3d1c * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
invalid relocation types, and change them to R_386_NONE.
2000-02-22 05:52:59 +00:00
Alan Modra
f6af82bd44 This lot mainly cleans up `comparison between signed and unsigned' gcc
warnings.  One usused var, and a macro parenthesis fix too.  Also check
input sections are elf when doing gc in elflink.h.
2000-02-21 12:01:27 +00:00
Ian Lance Taylor
494e2c585a ELF HPPA doesn't work at present; remove it until it does.
* config.bfd: Comment out setting targ_defvec to
	bfd_elf32_hppa_vec.
	* Makefile.am: Rebuild dependencies.
	(BFD32_BACKENDS): Remove elf32-hppa.lo.
	(BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
	(SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
	* Makefile.in: Rebuild.
	* targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
2000-02-21 05:33:40 +00:00
Geoffrey Keating
2fca4467d0 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
is no bfd_free().  Revert bfd_free part of previous change.
2000-02-19 01:11:19 +00:00
Geoffrey Keating
5ea1af0d5d * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
arrays.
(coff_compute_section_file_positions): Use bfd_free to pair
bfd_malloc.
(coff_write_object_contents): Likewise.

* coff-rs6000.c (xcoff_howto_table_16): New variable.
(xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
2000-02-19 00:59:26 +00:00
Richard Henderson
c61b871721 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
and hide_symbol members.
        (elf_link_hash_copy_indirect): Remove.
        (elf_link_hash_hide_symbol): Remove.
        (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
        and elf_backend_hide_symbol.
        (_bfd_elf_link_hash_copy_indirect): Declare.
        (_bfd_elf_link_hash_hide_symbol): Declare.
        * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
        (_bfd_elf_link_hash_hide_symbol): Likewise.
        (_bfd_elf_link_hash_table_init): Don't init killed members.
        * elflink.h (elf_link_add_object_symbols): Use the bed function
        pointers not elf_link_hash_{copy_indirect,hide_symbol}.
        (elf_link_assign_sym_version): Likewise.
        * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
        (elf_backend_hide_symbol): Likewise.
        (elfNN_bed): Update for new members.
2000-02-18 09:23:06 +00:00
Kevin Buettner
6ad49cca4c AIX 4.3 core dump changes. 2000-02-17 09:01:28 +00:00
Joern Rennecke
d4845d5762 bfd:
Reinstate bits of sh4 support that got accidentally deleted.
Add sh-dsp support.

bfd:

	* archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
	(bfd_mach_sh3_dsp): Likewise.
	(bfd_mach_sh4): Reinstate.
	(bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
	* bfd-in2.h: Regenerate.
	* coff-sh.c (struct sh_opcode): flags is no longer short.
	(USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
	(sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
	(sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
	(sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
	(sh_opcodes): No longer const.
	(sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
	(sh_insn_uses_reg): Check for USESAS and USESR8.
	(sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
	(_bfd_sh_align_load_span): Return early for SH4.
	Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
	Take into account that field b of a parallel processing insn
	could be mistaken for a separate insn.
	* cpu-sh.c (arch_info_struct): New array elements for
	sh2, sh-dsp and sh3-dsp.
	Reinstate element for sh4.
	(SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
	(SH4_NEXT): Reinstate.
	(SH3_NEXT, SH3E_NEXT): Adjust.
	* elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
	* elf32-sh.c (sh_elf_set_private_flags): New function.
	(sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
	(sh_elf_merge_private_data): New function.
	(elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
	(bfd_elf32_bfd_copy_private_bfd_data): Define.
	(bfd_elf32_bfd_merge_private_bfd_data): Change to
	sh_elf_merge_private_data.

gas:

	* config/tc-sh.c ("elf/sh.h"): Include.
	(sh_dsp, valid_arch, reg_x, reg_y, reg_efg): New static variables.
	(md.begin): Initialize target_arch.
	Only include opcodes in has table that match selected architecture.
	(parse_reg): Recognize register names for sh-dsp.
	(parse_at): Recognize post-modify addressing.
	(get_operands): The leading space is now optional.
	(get_specific): Remove FDREG_N support.  Add support for sh-dsp
	arguments.  Update valid_arch.
	(build_Mytes): Add support for SDT_REG_N.
	(find_cooked_opcode): New function, broken out of md_assemble.
	(assemble_ppi, sh_elf_final_processing): New functions.
	(md_assemble): Use find_cooked_opcode and assemble_ppi.
	(md_longopts, md_parse_option): New option: -dsp.
	* config/tc-sh.h (elf_tc_final_processing): Define.
	(sh_elf_final_processing): Declare.

include/elf:

	* sh.h: (EF_SH_MACH_MASK, EF_SH_UNKNOWN, EF_SH1, EF_SH2): New macros.
	(EF_SH3, EF_SH_HAS_DSP, EF_SH_DSP, EF_SH3_DSP): Likewise.
	(EF_SH_HAS_FP, EF_SH3E, EF_SH4, EF_SH_MERGE_MACH): Likewise.

opcodes:

	* sh-dis.c (print_movxy, print_insn_ddt, print_dsp_reg): New functions.
	(print_insn_ppi): Likewise.
	(print_insn_shx): Use info->mach to select appropriate insn set.
	Add support for sh-dsp.  Remove FD_REG_N support.
	* sh-opc.h (sh_nibble_type): Add new values for sh-dsp support.
	(sh_arg_type): Likewise.  Remove FD_REG_N.
	(sh_dsp_reg_nums): New enum.
	(arch_sh1, arch_sh2, arch_sh3, arch_sh3e, arch_sh4): New macros.
	(arch_sh_dsp, arch_sh3_dsp, arch_sh1_up, arch_sh2_up): Likewise.
	(arch_sh3_up, arch_sh3e_up, arch_sh4_up, arch_sh_dsp_up): Likewise.
	(arch_sh3_dsp_up): Likewise.
	(sh_opcode_info): New field: arch.
	(sh_table): Split up insn with FD_REG_N into ones with F_REG_N and
	D_REG_N.  Fill in arch field.  Add sh-dsp insns.
2000-02-17 00:33:36 +00:00
Richard Henderson
2920b85c63 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
hide_symbol members.
        (elf_link_hash_copy_indirect): New.
        (elf_link_hash_hide_symbol): New.
        * elflink.h (elf_link_add_object_symbols): Break out copy from
        indirect new new symbol to elf.c.
        (elf_link_assign_sym_version): Break out privatization of
        non-exported symbol to elf.c.
        * elf.c (_bfd_elf_link_hash_copy_indirect): New.
        (_bfd_elf_link_hash_hide_symbol): New.
        (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
2000-02-13 23:11:32 +00:00
Ian Lance Taylor
7f8d5fc90b * section.c (_bfd_strip_section_from_output): Add info parameter.
If it passed as non-NULL, use it to check whether any input BFD
	has an input section which uses this output section.  Change all
	callers.
	* bfd-in2.h: Rebuild.

	* bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
	bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
	1999-11-29.
	* bfd-in2.h: Rebuild.
2000-02-13 22:45:29 +00:00
Timothy Wall
6c784c9aab Add hooks to support TI COFF handling. 2000-02-10 21:21:55 +00:00
Joern Rennecke
84dcfba7a2 Fix problem where -relax could reorder multiple consecutive sets of the
same register:
	* coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
	USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
	* (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
	* (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
	sh_insns_uses_or_sets_freg): New functions.
	* (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
	* (sh_insns_conflict): Use new functions and new macros to
	detect conflicts when two instructions both set same integer registers,
	both set same fp register, and both set special register.
2000-02-10 20:17:33 +00:00
Timothy Wall
363d7b14a5 Set arch/mach info prior to swapping in sections, so that the swapping
routines have access to the arch/mach info.
2000-02-09 13:41:44 +00:00
Nick Clifton
119a7cedc8 apply patch from MArk Elbrecht tpo update comment and copyright 2000-02-08 21:10:28 +00:00
Jason Molenda
fd6848f679 2000-02-06 Jason Molenda (jsm@bugshack.cygnus.com)
* ChangeLog: Whitespace change to test logging.
	* bfd/ChangeLog, dejagnu/ChangeLog, include/ChangeLog, tcl/ChangeLog: Same.
2000-02-07 02:22:31 +00:00
Nick Clifton
fad6fcbb00 Apply patch from Thomas de Lellis to allow nm to distinguish between weak
function symbols and weak data symbols.
2000-01-28 01:06:37 +00:00
Nick Clifton
2f0ca46a49 Apply Thoams de Lellis's patch to fic disassembly of Thumb instructions when
bounded by non-function labels.
2000-01-27 20:05:32 +00:00
Alan Modra
305c72062b Most of these changes are really only cosmetic. The readelf.c patch
fixes a thinko in get_dynamic_flags.  I found at least one message
string that included a `%' being passed to printf in the format
argument.
2000-01-26 23:11:48 +00:00
Nick Clifton
b5f303f092 Remove use of a GCC extension when allocating local arrays. 2000-01-24 19:38:04 +00:00
Nick Clifton
2e4bb80ea1 Fix seeks and reads past the end of a BIM 2000-01-21 20:52:35 +00:00
Nick Clifton
28240dcd30 fix mis-applied patch 2000-01-14 18:13:40 +00:00
Nick Clifton
6b3b007bde Applied Tim Wall's patch to replace RELSZ and friends with bfd_coff_relsz and
friends.
2000-01-13 23:55:21 +00:00
Nick Clifton
756fa1b9b7 Fix bug in interwork stubs from thumb to arm 2000-01-13 22:55:12 +00:00
Nick Clifton
9a968f4332 Apply Tim walls octest vs bytes patch 2000-01-13 22:10:36 +00:00
Nick Clifton
f45fbf876d Apply for for CR 102957. 2000-01-13 20:46:54 +00:00
Nick Clifton
0decc84046 Add arm-conix target 2000-01-10 19:48:27 +00:00
Nick Clifton
16e9c715df Apply patch from Egor Duda to process win32_pstatus notes in core dumps. 2000-01-10 18:50:16 +00:00
Nick Clifton
7a13edea08 ELF visibility patch from Martin Loewis. 2000-01-03 18:32:21 +00:00
Richard Henderson
ea44b73426 * elflink.h (bfd_elf,size_dynamic_sections): Don't export all
if no dynamic sections created.
1999-12-29 19:50:13 +00:00
Nick Clifton
b1f10154aa fix PE file format detection 1999-12-28 00:25:18 +00:00
Nick Clifton
cb665cd3e2 Move PE format object file detection code into common place. 1999-12-17 19:03:09 +00:00
Nick Clifton
af74ae9911 catch bad arm relocs 1999-12-17 00:42:32 +00:00
Nick Clifton
48dfb43001 Fix detection of common symbols 1999-12-14 23:35:43 +00:00
Andrew Cagney
93be3c4bd2 Add support for sparc-*-netbsdelf* and sparc-*-netbsdaout*. 1999-12-14 05:13:29 +00:00
Nick Clifton
ceddadb217 fix detection of common symbols. 1999-12-14 02:20:57 +00:00
Nick Clifton
a3a8c91d41 Fix elf linker's handling of commons in archive maps 1999-12-10 20:17:28 +00:00
Nick Clifton
77fb9c28ac Revert previous patch. 1999-12-10 18:51:35 +00:00
Nick Clifton
ad247e3c7d Change AR for ELF so that common symbols are not included in archive map.
Change LD for ELF so that archive elements whoes archive map contains a
 reference to a common symbol will get linkled in.
Add new field to bfd_target structure and initialise it for all bfd targets.
1999-12-10 01:41:22 +00:00
Jim Blandy
6fe6a46127 *** empty log message *** 1999-12-07 23:56:53 +00:00
Ian Lance Taylor
2a6d49ea17 * elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16
value by 4 before storing it back in the field.  From
	Koundinya. K <kk@ddeorg.soft.net>.
1999-12-03 06:51:54 +00:00
Jeff Law
31f8dc8fce * archures.c (bfd_mach_am33): Define.
* bfd-in2.h: Rebuilt.
        * cpu-m10300.c (bfd_am33_arch): Add to the mn103 architecture list
        * elf-m10300.c (mn10300_elf_relax_section): Handle am33 instructions.
        (compute_function_info): Handle additional registers saved by
        movm on the am33.
        (elf_mn10300_mach): Handle E_MN10300_MACH_AM33.
        (_bfd_mn10300_elf_final_write_processing): Handle bfd_mach_am33.
1999-12-01 10:14:02 +00:00
Jim Blandy
98d8431c7d * elf.c (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
functions.
* bfd-in2.h (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
declarations.
1999-11-29 20:33:38 +00:00
Michael Meissner
fe174262ec Add new relocations for alpha explicit relocation support 1999-11-28 03:26:42 +00:00
Nick Clifton
20cfcaae7b Add support for target specific processing of ELF segments 1999-11-26 09:52:23 +00:00
Nick Clifton
ba3d4249ed Add SEC_CODE and SEC_READONLY flags to glue sections. 1999-11-25 11:52:39 +00:00
Nick Clifton
811b4bf61d Add SEC_CODE and SEC_READONLY flags to glue sections. 1999-11-25 11:45:05 +00:00
Nick Clifton
01ef19d281 fix typoi 1999-11-20 11:53:57 +00:00
Catherine Moore
1ca42bada0 * elf32-m68k.c (elf_cpu32_plt0_entry): Fix encoding.
(elf_cpu32_plt_entry): Likewise.
1999-11-19 15:41:55 +00:00
Nick Clifton
078c8694a9 Fix processing of RVA relocs 1999-11-18 18:36:35 +00:00
Richard Henderson
86dc0f79f5 * elf-bfd.h (struct elf_backend_data): Reorder collect and
type_change_ok; add sign_extend_vma.
        * elf32-mips.c (elf_backend_sign_extend_vma): Define.
        * elfcode.h (elf_swap_symbol_in): Mind be->sign_extend_vma.
        (elf_swap_shdr_in, elf_swap_phdr_in): Likewise.
        * elfxx-target.h (elf_backend_sign_extend_vma): Default.
        (elfNN_bed): Follow struture changes.
1999-11-18 01:06:45 +00:00
Ian Lance Taylor
0bff3f4bb6 * libbfd.c (bfd_read): Check result of read against desired result
using !=, not <.
	(_bfd_generic_get_section_contents): Set bfd_error if the seek is
	invalid compared to the section size.
1999-11-09 19:13:21 +00:00
Jeff Law
832fc2027d * som.c (som_fixup_formats): Improve handling of R_AUX_UNWIND,
R_LINETAB, R_LINETAB_ESC, and R_COMMENT.
1999-11-02 08:46:25 +00:00
Ian Lance Taylor
71a40b32ae * elflink.h (elf_bfd_final_link): Make last_local signed. 1999-10-28 04:08:57 +00:00
Ian Lance Taylor
8140b6644d * stabs.c (_bfd_link_section_stabs): Make sure .stabstr section
starts with a zero.
1999-10-28 03:52:01 +00:00
Michael Meissner
7af8cca959 D10V patches from Cagney 1999-10-25 13:57:39 +00:00
Andrew Haley
a67a877774 1999-10-15 Andrew Haley <aph@cygnus.com>
* dwarf1.c (parse_die): Fail to parse a die if its length is zero.
1999-10-18 12:45:21 +00:00
Jeff Law
7a7191b720 * libhppa.h (bfd_hppa_insn2fmt): Change to return an int. 1999-10-17 23:21:41 +00:00
Ian Lance Taylor
64df8d0bce * elflink.h (elf_merge_symbol): When overriding a weak symbol with
a defined symbol in a shared library, clear the DEF_DYNAMIC flag
	too.
1999-10-08 15:21:56 +00:00
Geoffrey Keating
0af9979518 * elf32-mips.c (mips_elf_calculate_relocation): R_MIPS_LITERAL
relocs also need the GP value.
(_bfd_mips_elf_relocate_section): Handle unpaired LO16 relocs
properly.  Handle sign-extension for R_MIPS_64 correctly.  Correct
the GP value for R_MIPS_LITERAL relocs too.  Handle
R_MIPS_64 relocs properly on big-endian MIPS.
(mips_elf_sign_extend): Behave properly with 'long long'.
(mips_elf_highest): Correct typo.
1999-10-08 03:07:07 +00:00
Doug Evans
a23ef39fe9 * archures.c (bfd_mach_m32rx): Define it.
* bfd-in2.h: Rebuild.
1999-10-05 01:14:20 +00:00
Doug Evans
e916b64e85 * cpu-m32r.c (arch_info_struct): New static global.
(bfd_m32r_arch): Refer to it.
	* elf32-m32r.c (m32r_elf_object_p): Recognize E_M32RX_ARCH.
	(m32r_elf_print_private_bfd_data): Ditto.
	(m32r_elf_final_write_processing): Handle bfd_mach_m32rx.
1999-10-05 00:54:12 +00:00
Richard Henderson
f4bda9848f Fred Fish <fnf@cygnus.com>
* targets.c (cisco_core_vec): Replaced with two new vecs ...
        (cisco_core_big_vec): Add new bigendian vec.
        (cisco_core_little_vec): Add new little endian vec.

        * cisco-core.c (CRASH_INFO): Fixed offset replaced with ...
        (crash_info_locs): Add array of possible offsets.
        (MASK_ADDR): Mask to apply to crash info offset.
        (crashinfo_external): Add textbase, database, bssbase and
        turn into a typedef.
        (cisco_core_file_validate): Renamed from cisco_core_file_p.
        Many small changes to account for additional hardware versions.
        Pick a reasonable size for ".reg" section.  Add a ".crash"
        section to allow access to crashinfo_external struct.
        (cisco_core_file_p): New version of this function that
        iterates over crash_info_locs, calling cisco_core_file_validate.
        (cisco_core_vec): Old big endian only vec replaced with ...
        (cisco_core_big_vec): Add big endian version.
        (cisco_core_little_vec): Add little endian version.

        * configure.in (cisco_core_vec): Split to two new vectors ...
        (cisco_core_big_vec): New target vector.
        (cisco_core_little_vec): New target vector.
        * configure: Regenerate.
        * config.bfd (targ): For m68*-*-aout* targ, change cisco_core_vec
        to cisco_core_big_vec in targ_selvecs.
1999-09-28 21:45:39 +00:00
Geoffrey Keating
d02f29adb2 * elf32-mips.c (mips_elf_relocate_hi16): Unused, delete.
(mips_elf_relocate_got_local): Unused, delete.
(mips_elf_relocate_global_got): Unused, delete.
1999-09-28 04:11:05 +00:00
Richard Henderson
27ac83bfca Fred Fish <fnf@cygnus.com>
* elf.c (bfd_section_from_phdr): Add typename variable.  Use p_type
        to initialize it to something meaningful.  Then use it to generate
        more useful segment names.
1999-09-24 17:06:35 +00:00
Jeff Law
2667095fc0 * som.c (NO_PCREL_MODES): Define if the system does not define
R_SHORT_PCREL_MODE.
        (hppa_som_gen_reloc_type): Handle both short and long pcrel branches.
        (som_write_fixups): Eliminate redundant pcrel mode relocs.  Handle
        R_LONG_PCREL_MODE and R_SHORT_PCREL_MODE
        * libhppa.h (dis_assemble_22): New function.
        (bfd_hppa_insn2fmt): Handle long branch.

        * libhppa.h (bfd_hppa_insn2fmt): Decode and handle formats found
        in PA2.0.
1999-09-19 18:22:20 +00:00
Alan Modra
b7be1db6b5 Support 8 and 16-bit relocs for i386coff. Enable i386 gas testsuite tests
previously disabled for lack of such support.  For *-*-linux*libc1 targets,
XFAIL a ld testsuite that fails due to a bug in the dynamic linker prior to
glibc-2.1.
1999-09-18 00:44:47 +00:00
Nick Clifton
57db232e4b Undeo previous delta. Set gc_mark instead. 1999-09-17 11:04:47 +00:00
Jeff Law
b2df14602e * elf-hppa.h (elf_hppa_final_write_processing): Turn on TRAPNIL. 1999-09-16 21:01:08 +00:00
Jeff Law
1209c61294 * elf-hppa.h (elf_hppa_final_link): If unable to find __gp in the
symbol table, then just compute a suitable value (but do not
        create a __gp symbol).
1999-09-16 20:39:10 +00:00
Catherine Moore
38f7d33d09 (elf_cpu32_plt0_entry): Use a1 instead of a0.
(elf_cpu32_plt_entry): Likewise.
 ----------------------------------------------------------------------
1999-09-16 18:25:09 +00:00
Jeff Law
dfec422f08 * elf-hppa.h (elf_hppa_relocate_section): Allow undefined
symbols when building shared libraries.
        (elf_hppa_final_link_relocate): Correct handling of PCREL
        relocations against undefined symbols.
1999-09-16 16:51:34 +00:00
Nick Clifton
d0f2103d07 Mark interworking sections as linker created to prevent garbage collection. 1999-09-16 15:32:40 +00:00
Jeff Law
19ef546580 * elf-hppa.h (elf_hppa_final_link): Revamp __gp handling.
(elf_hppa_final_link_relocate): Consistently create an absolute
        address, then subtract out the value of __gp.
1999-09-15 08:51:45 +00:00
Michael Meissner
6d83c84bcf Fix problem with going to automake 2.14 1999-09-14 23:29:35 +00:00
Nick Clifton
06a5ee5553 Change ELF_MAXPAGESIZE to 0x1 1999-09-14 10:34:02 +00:00
Jeff Law
2ec0dd123c * elf-hppa.h (elf_hppa_record_segment_addrs): New function.
(elf_hppa_final_link): Initialize text_segment_base and
        data_segment_base.
        (elf_hppa_final_link_relocate): Handle SEGREL relocations.
1999-09-14 03:44:43 +00:00
Jeff Law
b2e311df32 * elf-hppa.h (elf_hppa_final_link): Remove unused variables.
(elf_hppa_final_link_relocate): Likewise.
        (elf_hppa_relocate_insn): Likewise.
        (elf_hppa_relocate_section): Initialize HOWTO.
1999-09-14 02:03:58 +00:00
Ian Lance Taylor
e5db213db2 1999-09-13 Donn Terry <donn@interix.com>
* coffcode.h (styp_to_sec_flags): Further refinement of COMDAT
	handling to support both GNU and MS objects.
1999-09-13 23:55:22 +00:00
Ian Lance Taylor
7920749071 1999-09-13 Donn Terry <donn@interix.com>
* coffcode.h (coff_write_object_contents): Don't check reloc_count
	when determining whether to set F_RELFLG.
1999-09-13 23:42:43 +00:00
Nick Clifton
59f2c4e703 Apply Philip Blundell's patch to prevent range checks on weak symbols. 1999-09-13 09:59:02 +00:00
Alan Modra
2f66722d55 Hackery to handle ix86 "jmp constant" as a pc-relative jump to the given
absolute address.
1999-09-13 06:45:15 +00:00
Jeff Law
228d307f1b * elf-hppa.h (elf_hppa_final_link_relocate): Handle SECREL32.
Stub SEGREL32.  Return an error for any relocation not handled.
1999-09-13 05:51:32 +00:00
Ian Lance Taylor
49147fca36 * cofflink.c (coff_link_add_symbols): Look for special MSVC string
constant symbols, and avoid multiple definition errors on them.
1999-09-12 16:28:20 +00:00
Ian Lance Taylor
86b21447e7 1999-09-12 Donn Terry <donn@interix.com>
* libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most
	significant bit is set.
1999-09-12 14:27:21 +00:00
Ian Lance Taylor
2fbadf2cf5 1999-09-11 Donn Terry <donn@interix.com>
* libpei.h (_bfd_pei_final_link_postscript): Declare.
	(coff_final_link_postscript): Define.
	* peigen.c (_bfd_pei_swap_aouthdr_out): Don't set value for data
	directory entries here.
	(_bfd_pei_final_link_postscript): New function.
1999-09-12 00:45:26 +00:00
Ian Lance Taylor
8c42d01089 1999-09-11 Donn Terry <donn@interix.com>
* peigen.c (_bfd_pei_swap_scnhdr_out): Remove code which sets
	section flags based on the section name.
1999-09-12 00:32:32 +00:00
Ian Lance Taylor
cb43721da5 1999-09-11 Donn Terry <donn@interix.com>
* peicode.h (coff_swap_scnhdr_in): If COFF_IMAGE_WITH_PE, the
	get the overflow of the s_nlnno field from the s_nreloc field.
	* peigen.c (_bfd_pei_swap_scnhdr_out): If doing a final link, swap
	the s_nlnno overflow of the .text section into the s_nreloc
	field.
1999-09-12 00:30:27 +00:00
Ian Lance Taylor
5933bdc9a1 1999-09-11 Donn Terry <donn@interix.com>
* peigen.c (add_data_entry): Declare.
	(pei_swap_aouthdr_out): Get image size right.  Set linker version
	more intuitively.
	(pei_swap_scnhdr_out): Test for UNINIT section, not .bss.
	(pe_print_idata): Code cleanup, print more info, get rid of (now)
	extraneous ImageBase.
	(pe_print_edata): Likewise.
	(pe_print_pdata): Likewise.  Print exception entries.
	(pe_print_reloc): Likewise.  Print MIPS_JMPADDR.
	(tbl): Make const, add "UNKNOWN".
	(_bfd_pe_print_private_bfd_data_common): Print timestamp.
	(_bfd_pe_bfd_copy_private_bfd_data_common): Don't copy deleted
	section data directory.
	(_bfd_pe_bfd_copy_private_section_data): Copy pe_flags.
1999-09-12 00:22:01 +00:00
Ian Lance Taylor
7d2b58d612 1999-09-11 Donn Terry <donn@interix.com>
* libpei.h (_bfd_pe_bfd_get_symbol_info): Declare.
	* peigen.c (_bfd_pe_bfd_get_symbol_info): New function.
	* peicode.h (coff_get_symbol_info): Define.
1999-09-12 00:02:11 +00:00
Ian Lance Taylor
0717ebb780 1999-09-11 Donn Terry <donn@interix.com>
* config.bfd (i[3456]86-*-interix*): Set targ_cflags to
	-DSTRICT_PE_FORMAT.
	* coffcode.h (styp_to_sec_flags): Check STRICT_PE_FORMAT rather
	than __INTERIX.
	(coff_classify_symbol): Re-revert 1999-08-08 patch if
	STRICT_PE_FORMAT.
1999-09-11 23:46:09 +00:00
Ian Lance Taylor
277d1b5e45 1999-09-11 Donn Terry <donn@interix.com>
* libpei.h: New file, broken out of peicode.h.
	* peigen.c: New file, broken out of peicode.h.
	* peicode.h: A bunch of code moved out to libpei.h and peigen.c.
	* configure.in: Add peigen.lo to list of files required for each
	PE target.
	* Makefile.am: Rebuild dependencies.
	(BFD32_BACKENDS): Add peigen.lo.
	(BFD32_BACKENDS_CFILES): Add peigen.c.
	(SOURCE_HFILES): Add libpei.h.
	* configure, Makefile.in: Rebuild.
1999-09-11 23:37:28 +00:00
Ian Lance Taylor
e166a60fd9 1999-09-11 Donn Terry <donn@interix.com>
* peicode.h (coff_swap_scnhdr_in): Don't check for a special
	section name of _BSS; check IMAGE_SCN_CNT_UNINITIALIZED_DATA
	instead.  Don't clear the s_paddr field for an uninitialized data
	section.
1999-09-11 22:52:20 +00:00
Ian Lance Taylor
1135238bd0 1999-09-11 Donn Terry <donn@interix.com>
* coffcode.h (coff_mkobject_hook): Set timestamp field in
	coff_data_type to f_timdat.
	* peicode.h (pe_mkobject_hook): Likewise.
1999-09-11 22:46:37 +00:00
Ian Lance Taylor
05bf877ad1 1999-09-11 Donn Terry <donn@interix.com>
* peicode.h (coff_swap_filehdr_in): Check the NT executable magic
	number if COFF_IMAGE_WITH_PE.
1999-09-11 22:41:54 +00:00
Ian Lance Taylor
4cfec37b92 1999-09-11 Donn Terry <donn@interix.com>
* coffcode.h (coff_mkobject_hook): If COFF_WITH_PE, set HAS_DEBUG
	to the reverse of IMAGE_FILE_DEBUG_STRIPPED.
	(coff_write_object_contents): Set IMAGE_FILE_DEBUG_STRIPPED if
	there is no SEC_DEBUGGING section.
	* peicode.h (pe_mkobject_hook): Set HAS_DEBUG to the reverse of
	IMAGE_FILE_DEBUG_STRIPPED.
1999-09-11 22:33:45 +00:00
Ian Lance Taylor
33d7d19757 1999-09-11 Donn Terry <donn@interix.com>
* pe-i386.c (COFF_LONG_FILENAMES): Define.
	(COFF_SECTION_ALIGNMENT_ENTRIES): Define.
	* pei-i386.c (COFF_LONG_FILENAMES): Define.
	(COFF_SECTION_ALIGNMENT_ENTRIES): Define.
1999-09-11 22:17:33 +00:00
Ian Lance Taylor
402ef9d421 1999-09-11 Donn Terry <donn@interix.com>
* coffswap.h (IMAGE_BASE): Don't define.
	* pei-arm.c (IMAGE_BASE): Don't define.
	* pei-i386.c (IMAGE_BASE): Don't define.
	* pei-mcore.c (IMAGE_BASE): Don't define.
	* pei-ppc.c (IMAGE_BASE): Don't define.
1999-09-11 22:10:33 +00:00
Ian Lance Taylor
8add8e3099 1999-09-11 Donn Terry <donn@interix.com>
* cofflink.c (_bfd_coff_link_input_bfd): When writing out a
	symbol, switch on the class when determining whether to modify the
	value.  For PE, don't modify the value of a C_FCN symbol not named
	.bf.
1999-09-11 22:04:16 +00:00
Ian Lance Taylor
c0bed66d09 1999-09-11 Donn Terry <donn@interix.com>
* libbfd-in.h (_bfd_abort): Declare.
	(abort): Define.
	* bfd.c (_bfd_abort): New function.
	* libbfd.h: Rebuild.
1999-09-11 21:51:55 +00:00
Ian Lance Taylor
a50f8417d5 * coff-ppc.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
1999-09-11  Donn Terry  <donn@interix.com>

	* coffcode.h (coff_set_alignment_hook): Delete POWERPC_LE_PE
	special handling.
1999-09-11 21:39:03 +00:00
Ian Lance Taylor
b545f675c1 1999-09-11 Donn Terry <donn@interix.com>
* cofflink.c (_bfd_coff_link_input_bfd): If a symbol is stripped,
	don't write out the associated line numbers.
1999-09-11 21:27:15 +00:00
Ian Lance Taylor
2c546cd84f 1999-09-11 Donn Terry <donn@interix.com>
* cofflink.c (_bfd_coff_write_global_sym): Handle section symbol
	aux entries.
1999-09-11 21:15:16 +00:00
Ian Lance Taylor
d510f9a69b 1999-09-11 Donn Terry <donn@interix.com>
* coffcode.h (coff_slurp_symbol_table): If PE, set BSF_DEBUGGING
	for C_FCN/C_EFCN symbols, and set BSF_DEBUGGING_RELOC for such
	symbols named .bf.
1999-09-11 21:04:09 +00:00
Ian Lance Taylor
eeaf533e61 * elfcode.h (write_relocs): Handle an absolute symbol in REL
relocs as we do for RELA relocs.
1999-09-11 20:14:57 +00:00
Ian Lance Taylor
5d3aaa749f 1999-09-11 Donn Terry <donn@interix.com>
* cofflink.c (coff_link_add_symbols): Don't warn about symbol type
	changes when the base type is unknown.
1999-09-11 15:26:22 +00:00
Ian Lance Taylor
312191a689 1999-09-11 Donn Terry <donn@interix.com>
* coffgen.c (coff_print_symbol): Fix printing of aux record for
	function symbols.
1999-09-11 15:16:14 +00:00
Ian Lance Taylor
703153b566 1999-09-11 Donn Terry <donn@interix.com>
* syms.c (BSF_DEBUGGING_RELOC): Define.
	* coffgen.c (fixup_symbol_value): Relocate a symbol which has
	BSF_DEBUGGING_RELOC set.
	* bfd-in2.h: Rebuild.
1999-09-11 14:41:11 +00:00
Ian Lance Taylor
7b50b349e2 * ecoff.c (bfd_debug_section): Update initialization for new
comdat_info field.
	(_bfd_ecoff_styp_to_sec_flags): Add section parameter.
	* libecoff.h (_bfd_ecoff_styp_to_sec_flags): Update declaration.

1999-09-10  H.J. Lu  <hjl@gnu.org>

	* coff-alpha.c (alpha_ecoff_backend_data): Initialize the new
	_bfd_filnmlen field.
	* coff-mips.c (mips_ecoff_backend_data): Likewise.
1999-09-10 23:25:51 +00:00
Jeff Law
e48c661ee6 * elf-hppa.h (elf_hppa_final_link_relocate): Create .opd entries
for FPTR relocs involving local symbols.
1999-09-10 15:46:37 +00:00
Jeff Law
6a0b987115 * elf-hppa.h (elf_hppa_final_link_relocate): Get the right
value for the stub address in a call through a stub.
        Install the value for a local symbol directly into the DLT
        instead of generating a reloc.  Correctly handle FPTR64 relocs.
1999-09-10 14:05:36 +00:00
Jeff Law
af7dc6449e * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): New function.
(elf_hppa_remark_useless_dynamic_symbols): Similarly.
        (elf_hppa_final_link): Call them.
1999-09-10 06:38:05 +00:00
Ian Lance Taylor
fc4cc5bb8f * elflink.h (elf_fix_symbol_flags): Move weakdef handling here...
(elf_adjust_dynamic_symbol): ...from here.
1999-09-10 04:22:23 +00:00
Jeff Law
b726396160 * elf-hppa.h (elf_hppa_howto_table); There is no DIR64WR, DIR64DR
relocation, remove them.  SECREL64->LTOFF16WF.
        (elf_hppa_final_link_relocate): Handle LTOFF* relocations.  Handle
        DIR* relocations.
        (elf_hppa_relocate_insn): Similarly.
1999-09-09 14:51:33 +00:00
Jeff Law
8267b1550c * elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs.
(elf_hppa_relocate_insn): Similarly.
1999-09-09 14:20:18 +00:00
Jeff Law
6849fb4de7 * elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and
GPREL* relocations.
        (elf_hppa_relocate_insn): Similarly.
1999-09-09 14:10:24 +00:00
Jeff Law
b233eaabc0 * elf-hppa.h (elf_hppa_link_final_relocate): Fix typos.
Handle LTOFF_TP* relocs.
        (elf_hppa_relocate_insn): Similarly.
1999-09-09 13:55:46 +00:00
Jeff Law
571047ad0a * elf-hppa.h (elf_hppa_final_link_relocate): Handle PCREL* relocs.
Consistently deal with addends.  Handle DLTIND14F and DLTREL14F.
        (elf_hppa_relocate_insn): Handle PCREL* relocs.
1999-09-09 13:32:38 +00:00
Jeff Law
e5bb3efcc5 * elf-hppa.h (elf_hppa_final_link_relocate): Handle LT_OFF_FPTR*,
DIR32, DIR64 and FPTR64 relocations.
        (elf_hppa_relocate_insn): Similarly.
1999-09-09 13:01:11 +00:00
Jeff Law
be7582f38a Wed Sep 8 17:56:11 1999 Jeffrey A Law (law@cygnus.com)
* elf-hppa.h (elf_hppa_final_link): Set the value of __gp to the
        address of the .PARISC.global section.
        (elf_hppa_relocate_section): Lookup and pass the PA64 hash
        table entry elf_hppa_final_link_relocate.  Do not give a warning
        for a reloc against an external symbol if it has a PA64 hash
        table entry.
        (elf_hppa_final_link_relocate): Significantly rework.  Handle
        DLTIND relocations.  Compute the final value of the relocation
        before passing the value of elf_hppa_relocate_insn.
        (elf_hppa_relocate_insn): Revamp to handle just bit tiwiddling
        relocation support.  Handle DLTIND relocation requests just like
        DLTREL relocation requests.  Simplify branch handling.

1999-09-08  Ulrich Drepper  <drepper@cygnus.com>

        * elf-hppa.h (elf_hppa_relocate_section): Catch problems with
        non-allocated section as done in i386 version.
        (elf_hppa_final_link_relocate): Uncomment R_PARISC_14F in switch
        statement since this is no know relocation.
1999-09-09 12:01:24 +00:00
Jeff Law
084d930bff * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14F
relocs.
        (elf_hppa_relocate_insn): Similarly.
1999-09-08 01:00:12 +00:00
Jeff Law
11c19a4e3c * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14WR and
DLTREL14WD relocs.
        (elf_hppa_relocate_insn): Similarly.
1999-09-08 00:50:50 +00:00
Jeff Law
c8933571da * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14R and
DLTREL21L relocs.  Pass the output bfd to elf_hppa_relocate_insn.
        Pass the relocate type rather than the insn format to
        elf_hppa_relocate_insn.
        (elf_hppa_relocate_insn): Make switch dependent on relocation type
        rather than the opcode.  Handle DLTREL21L and DLTREL14R relocs.
1999-09-08 00:09:52 +00:00
Ian Lance Taylor
692b7d62e8 * coffcode.h (bfd_coff_backend_data): Add _bfd_filnmlen field.
(bfd_coff_filnmlen): Define.
	(bfd_coff_std_swap_table): Initialize new field.
	* coffgen.c (coff_fix_symbol_name): Use bfd_coff_filnmlen rather
	than FILNMLEN.
	(coff_write_symbols): Likewise.
	(coff_get_normalized_symtab): Likewise.
	* coff-sh.c (bfd_coff_small_swap_table): Initialize new field.
	* libcoff.h: Rebuild.
1999-09-07 04:28:27 +00:00
Ian Lance Taylor
75cc718903 1999-09-06 Donn Terry <donn@interix.com>
* coffcode.h (sort_by_secaddr): New static function if
	COFF_IMAGE_WITH_PE.
	(coff_compute_section_file_positions): If COFF_IMAGE_WITH_PE, sort
	sections by VMA when assigning target_index values.  Always set
	virt_size.
1999-09-07 04:06:50 +00:00
Ian Lance Taylor
fdfd89ab43 remove unneeded ifdefs 1999-09-07 03:42:53 +00:00
Ian Lance Taylor
8d3ad4e16f 1999-09-06 Donn Terry <donn@interix.com>
* libcoff-in.h (struct pei_section_tdata): Add pe_flags field.
	* coffcode.h (coff_set_alignment_hook): Set pe_flags field if
	COFF_WITH_PE.
	* libcoff.h: Rebuild.
1999-09-07 03:40:32 +00:00
Ian Lance Taylor
8a1ad8e793 1999-09-06 Donn Terry <donn@interix.com>
* coffcode.h (coff_set_custom_section_alignment): Add const to
	declaration to match definition.
	(coff_write_object_contents): Don't set F_AR32W(R)? if
	COFF_WITH_PE.
1999-09-07 03:00:32 +00:00
Ian Lance Taylor
417335159b 1999-09-06 Donn Terry <donn@interix.com>
* coffcode.h (sec_to_styp_flags): Write separate COFF_WITH_PE
	version.  Move COFF_WITH_PE specific code to new version.
	(stype_to_sec_flags): Likewise.  Add section parameter.
	* coffgen.c (make_a_section_from_file): Set target_index before
	calling styp_to_sec_flags.  Pass section to styp_to_sec_flags.
	* libcoff.h: Rebuild.
1999-09-07 02:11:54 +00:00
Ian Lance Taylor
9296256064 1999-09-06 Donn Terry <donn@interix.com>
* syms.c (stt): Add some PE/PEI section names.
	(bfd_decode_symclass): Return 'w', not 'U', for a weak undefined
	symbol.
	(bfd_symbol_info): Check for 'w'.
1999-09-06 18:44:56 +00:00
Ian Lance Taylor
022a5af495 1999-09-06 Donn Terry <donn@interix.com>
* section.c (struct bfd_comdat_info): Define.
	(asection): Add comdat field.
	(STD_SECTION): Initialize comdat field.
	(bfd_make_section_anyway): Likewise.
	* bfd-in2.h: Rebuild.
1999-09-06 18:34:29 +00:00
Andreas Schwab
0d271c1a5e * elflink.h (elf_link_add_object_symbols): Copy NON_GOT_REF flag
to version symbols.
1999-09-06 10:56:08 +00:00
Nick Clifton
fed79cc616 use bfd memory allcation routines 1999-09-06 08:57:49 +00:00
Ian Lance Taylor
0bcb993b9f 1999-09-04 Steve Chamberlain <sac@pobox.com>
* cpu-pj.c: New file.
	* elf32-pj.c: New file.
	* config.bfd (pj*): New cpu.
	(pj-*-*, pjl-*-*): New targets.
	* configure.in (bfd_elf32_pj_vec): New target vector.
	(bfd_elf32_pjl_vec): New target vector.
 	* archures.c (bfd_arch_pj): Define.
	* elf.c (prep_headers): Handle bfd_arch_pj.
	* reloc.c: Define BFD_RELOC_PJ_* relocations.
	* targets.c (bfd_elf32_pj_vec, bfd_elf32_pjl_vec): Declare and add
	to target vector list.
	* Makefile.am: Rebuild dependencies.
	(ALL_MACHINES): Add cpu-pj.lo.
	(ALL_MACHINES_CFILES): Add cpu-pj.c.
	(BFD32_BACKENDS): Add elf32-pj.lo.
	(BFD32_BACKENDS_CFILES): Add elf32-pj.c.
	* configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
1999-09-04 17:07:46 +00:00
Ian Lance Taylor
7843f00e2d * elf-bfd.h (ELF_LINK_NON_GOT_REF): Define.
* elflink.h (elf_adjust_dynamic_symbol): Copy REF_REGULAR_NONWEAK
	and NON_GOT_REF from weak defined symbol to real symbol.
	* elf32-i386.c (elf_i386_check_relocs): Set NON_GOT_REF.
	(elf_i386_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't
	create a COPY reloc.
	* elf32-sparc.c (elf32_sparc_check_relocs): Set NON_GOT_REF.
	(elf32_sparc_adjust_dynamic_symbol): If NON_GOT_REF is not set,
	don't create a COPY reloc.
1999-09-04 16:26:08 +00:00
Ian Lance Taylor
814fe68ac5 * elflink.h (elf_bfd_final_link): When counting relocations, don't
count those in sections we are not including in the link.
1999-09-03 18:34:02 +00:00
Jeff Law
20e29382fd * elflink.h (elf_link_add_object_symbols): Work around bogus SH_LINK
field in hpux11 shared libraries.
1999-09-02 23:44:54 +00:00
Nick Clifton
4b56dbbd4a Fix memory leak. 1999-09-02 17:56:51 +00:00
Jeff Law
2eb429af04 * elf-hppa.h (elf_hppa_add_symbol_hook): New function.
(elf_hppa_final_link, elf_hppa_relocate_section): Likewise.
        (elf_hppa_final_link_relocate, elf_hppa_relocate_insn): Likewise.
1999-09-01 19:42:17 +00:00
Nick Clifton
994819d267 When possible, keep the original type of the symbol. 1999-08-31 14:07:27 +00:00
Jeff Law
0d571602ca * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Allow both
R_PARISC_DIR32 and R_PARISC_DIR64 regardless of how the
        tools were configured.
        * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Declare.
1999-08-30 21:30:36 +00:00
Mark Mitchell
9458945f8f * elf32-mips.c (_bfd_mips_elf_check_relocs): Don't allocate local
GOT entries for GOT16 relocations; they're not required.
1999-08-27 00:08:50 +00:00
Nick Clifton
021e3cc067 Path from Roland McGrath <roland@baalperazim.frob.com>
Added arm-netbsd target.
1999-08-24 15:16:53 +00:00
Jeff Law
7da1b1756d * som.c (som_slurp_symbol_table): Fix typo in comment. 1999-08-24 06:26:39 +00:00
Jeff Law
1ca740621c * elf-hppa.h (elf_hppa_fake_sections): Compute section indices
here instead of using elf_section_data...
1999-08-20 23:03:04 +00:00
Nick Clifton
69e70d3056 Add code to emit relocs into a base file. 1999-08-19 13:04:45 +00:00
Nick Clifton
98c1d4aab7 Fix partial REL relocs. 1999-08-19 10:12:28 +00:00
Ian Lance Taylor
b2d638c7ec 1999-08-18 Donn Terry <donn@interix.com>
* cofflink.c: Move definitions of N_TMASK, et. al., out of
	_bfd_coff_link_input_bfd into top level.
1999-08-19 00:55:50 +00:00
Ian Lance Taylor
00692651e0 1999-08-18 Donn Terry <donn@interix.com>
* coff-i386.c (coff_i386_reloc): Handle R_IMAGEBASE.
	(RTYPE2HOWTO): Return NULL if reloc type is out of range.
	(coff_i386_rtype_to_howto): Likewise.
	* coffcode.h (coff_slurp_symbol_table): Change a -2 to N_DEBUG.
	Completely ignore symbols which are all zero.
	(dummy_reloc16_estimate): Add return 0.
	* cofflink.c (_bfd_coff_link_input_bfd): Rename inner scope
	variable copy to name_copy to avoid shadowing outer scope
	variable.
	* libcoff-in.h (coff_data_type): Change raw_syment_count field
	from unsigned int to unsigned long.  Add timestamp field.
	* libcoff.h: Rebuild.

Also comment changes.
1999-08-18 06:00:13 +00:00
Ian Lance Taylor
1396cd2d7f 1999-08-17 H.J. Lu <hjl@gnu.org>
* elf32-hppa.c (bfd_elf32_bfd_is_local_label_name): Fix typo in
	macro definition.
1999-08-17 07:53:37 +00:00
Ian Lance Taylor
0035bd7bda * elf32-mips.c (_bfd_mips_elf_add_symbol_hook): Set BSF_DYNAMIC
for special section symbols.
	* elflink.h (elf_merge_symbol): If we have no old BFD, check
	BSF_DYNAMIC on the section symbol to see whether the old BFD is
	dynamic.
1999-08-17 07:50:30 +00:00
Mark Mitchell
8535d39cc8 * elf32-mips.c (mips_elf_calculate_relocation): Fix unfortunate
coincidence of variable names between old and new code.
1999-08-15 22:56:21 +00:00
Nick Clifton
bcbdc74cb2 Fix interworking problems. 1999-08-12 08:37:15 +00:00
Nick Clifton
230801466a Check for overflow on R_ARM_PC24 relocs. 1999-08-11 10:56:35 +00:00
Jeff Law
052e120f44 * elf-hppa.h (elf_hppa_fake_sections): New function.
* elf32-hppa.c (elf_backend_fake_sections): Define.
1999-08-11 09:30:20 +00:00
Jeff Law
3a9acac86a * elf-hppa.h (elf_hppa_final_write_processing): Update for
recent changes to the arch_info structure.
1999-08-10 19:19:22 +00:00
Jeff Law
fc91f6585b * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle
R_HPPA_SEGBASE and R_HPPA_SEGREL32.
        * cpu-hppa.c (bfd_hppa20w_arch): New entry in architecture info
        list.
1999-08-10 18:51:53 +00:00
Mark Mitchell
5499724a85 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Always
output DT_MIPS_GOTSYM.
	(_bfd_mips_elf_finish_dynamic_sections): Use the same value as
 	DT_MIPS_SYMTABNO if there are no global GOT symbols.
1999-08-10 06:43:11 +00:00
Mark Mitchell
7b1f123191 * elf32-mips.c (mips_elf_create_dynamic_relocation): Change
prototype.  Handle local symbols.  Add commentary.
	(mips_elf_calculate_relocation): Adjust accordingly.
	(_bfd_mips_elf_check_relocs): Handle local symbols in R_MIPS_32
	relocations.
1999-08-10 06:27:48 +00:00
Mark Mitchell
ce00621771 * elflink.h (elf_bfd_final_link): Tweak last change. 1999-08-10 06:22:57 +00:00
Mark Mitchell
b037af20d6 * elflink.h (elf_link_size_reloc_section): Use the counts in the
elf-section data to allocate just the right amount of relocation
	space.  Don't allocate the hash space twice.
	(elf_bfd_final_link): Calculate the amount of space to allocate in
	each relocation section.
1999-08-10 03:36:28 +00:00
Jeff Law
432bdd91dd * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case 32): When in
64bit mode, generate a section relative relocation for a 32bit
        wide relocation.
        (elf_hppa_is_local_label_name): New function.
        * elf32-hppa.c (elf_hppa_is_local_label_name): Deleted.  To be
        shared between 32bit and 64bit port.
1999-08-09 23:47:04 +00:00
Mark Mitchell
b944b044fb * elf32-mips.c (elf_mips_howto_table): Fix src_mask for
R_MIPS_GOT16 and R_MIPS_CALL16.
	(mips_elf_got16_entry): Use mips_elf_high to calculate the value
	to use wheen looking for a preexisting GOT entry.
1999-08-09 22:45:39 +00:00
Ian Lance Taylor
840a9995b3 1999-08-09 Jakub Jelinek <jj@ultra.linux.cz>
* elf64-sparc.c (sparc64_elf_relocate_section): Back out part of
	the Sep. 4th, 1998 change.  glibc 2.0.x dynamic linker had bug,
	not binutils.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1999-08-09 15:07:32 +00:00
Ian Lance Taylor
91d3970e7d 1999-08-09 Geoff Keating <geoffk@cygnus.com>
* elflink.h (elf_link_output_extsym): Don't output a weak
	reference to an undefined symbol just because it was defined weak
	in a shared object.
1999-08-09 05:42:31 +00:00
Ian Lance Taylor
798c1fb8d7 1999-08-09 Eli Zaretskii <eliz@is.elta.co.il>
* coffgen.c (coff_find_nearest_line): When looking for file, use
	last best match rather than first.  If address is beyond last line
	number record, don't return the last line as the correct value.
1999-08-09 04:04:17 +00:00
Ian Lance Taylor
851edbafcc * section.c (SEC_SMALL_DATA): Rename from SEC_SHORT.
* bfd-in2.h: Rebuild.
1999-08-09 03:20:31 +00:00
Ian Lance Taylor
5dccc1ddaa 1999-08-08 Mark Elbrecht <snowball3@bigfoot.com>
* libcoff-in.h (struct coff_section_alignment_entry): Define.
	* coffcode.h (coff_set_custom_section_alignment): New static
	function.
	(coff_section_alignment_table): New static array.
	(coff_new_section_hook): Use coff_set_customer_section_alignment.
	* coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
	* coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
	* libcoff.h: Rebuild.
1999-08-09 02:56:16 +00:00
Ian Lance Taylor
74eeebeafb * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
MKDEP.
	* Makefile.in: Rebuild.
1999-08-08 17:26:50 +00:00
Ian Lance Taylor
bd826630b1 1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>
* section.c (SEC_SHARED): Define.
	* coffcode.h (sec_to_styp_flags): Handle SEC_SHARED.
	(styp_to_sec_flags): Likewise.
	* peicode.h (coff_swap_scnhdr_out): Likewise.
	* bfd-in2.h: Rebuild.

1999-08-08  Ian Lance Taylor  <ian@zembu.com>

	* coffcode.h (coff_classify_symbol): Comment out part of
	1999-08-05 change which breaks cygwin DLLs.
1999-08-08 16:50:27 +00:00
Ian Lance Taylor
855b0be7f7 * acinclude.m4 (BFD_BINARY_FOPEN): Change -windows to -windows*.
* aclocal.m4, configure: Rebuild.
1999-08-08 16:01:13 +00:00
Ian Lance Taylor
22bc497dda * section.c (global_syms): Only initialize union field if
__STDC__.
1999-08-06 23:31:14 +00:00
Mark Mitchell
4f2860cafc * elf32-mips.c (mips_elf_got16_entry): Don't multiply GOT index by
the size of a GOT entry here.
	(mips_elf_calculate_relocation): Don't create a local GOT entry
	for the symbol in a GOT16 relocation; just for it's high-order bit
	(_bfd_mips_elf_relocate_section): Fix thinko.
1999-08-06 02:44:41 +00:00
Ian Lance Taylor
5d54c62870 Based on patches from Donn Terry <donn@interix.com>:
* coffcode.h (enum coff_symbol_classification): Define.
	(bfd_coff_backend_data): Rename _bfd_coff_sym_is_global to
	_bfd_coff_classify_symbol.  Change return type.
	(bfd_coff_classify_symbol): Rename from bfd_coff_sym_is_global.
	(coff_slurp_symbol_table): Use coff_classify_symbol.
	(coff_classify_symbol): New static function.
	(coff_sym_is_global): Never define.
	(bfd_coff_std_swap_table): Initialize with coff_classify_symbol.
	* cofflink.c (coff_link_check_ar_symbols): Use
	bfd_coff_classify_symbol rather than bfd_coff_sym_is_global.
	(coff_link_add_symbols): Likewise.
	(_bfd_coff_link_input_bfd): Likewise.
	* coff-sh.c (bfd_coff_small_swap_table): Initialize with
	coff_classify_symbol.
	* libcoff.h: Rebuild.
1999-08-05 21:01:37 +00:00
Jeff Law
1560fbe45e * libhppa.h (R_HPPA_LTPSEL, R_HPPA_RTPSEL): New field selectors
(e_ltpsel, e_rtpsel): Similarly.
1999-08-05 03:50:28 +00:00
Jeff Law
3686090072 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle 21bit e_ltpsel
and 14bit ertpsel.  Handle 64bit psel.
1999-08-05 00:12:22 +00:00
Mark Mitchell
e7c4421855 * elf32-mips.c (_bfd_mips_elf_relocate_section): Tweak HI16/LO16
handling for REL relocations.  And only left-shift R_MIPS26
	relocation addends where necessary.
1999-08-04 16:32:34 +00:00
Mark Mitchell
23b255aadd * elf32-mips.c (mips_elf_next_lo16_addend): Rename to ...
(mips_elf_next_lo16_relocation): Don't compute the addend here.
	Just return the relocation found.
	(mips_elf_relocate_section): Pull the LO16 addend out of the
	section itself when using REL relocations.
1999-08-04 03:52:59 +00:00
Mark Mitchell
3811169e5f * elf32-mips.c (mips_elf_calculate_relocation): Restore
_DYNAMIC_LINK handling and handling of undefined symbols in shared
	libraries.
1999-08-03 16:58:26 +00:00
Ian Lance Taylor
2d14625061 * elf32-ppc.c (ppc_elf_relocate_section): Don't use the relocation
value of a symbol in a SEC_DEBUGGING section.  Warn when doing a
	relocation against a symbol in an input section with no output
	section.  From Daniel Jacobowitz <drow@false.org>.
1999-08-03 16:40:25 +00:00
Ian Lance Taylor
cb94091feb * coff-stgo32.c (go32_stubbed_coff_object_p): Remove; not used. 1999-08-03 16:31:37 +00:00
Ian Lance Taylor
aab0843134 * acinclude.m4 (BFD_CC_FOR_BUILD): Change to use conftest, and to
look for generated file correctly.
	* aclocal.m4, configure: Rebuild.
1999-08-03 16:10:38 +00:00
Mark Mitchell
5a44662b54 * elf32-mips.c (_bfd_mips_elf_relocate_section): Handle R_MIPS_26
and R_MIPS16_26 relocations correctly when relocating.
	(_bfd_mips_elf_check_relocs): Don't assume that R_MIPS_CALL_HI16
	and R_MIPS_CALL_LO16 are for global symbols.
1999-08-03 06:04:21 +00:00
Richard Henderson
1fa0ddb30b Jakub Jelinek <jj@ultra.linux.cz>
* elflink.h (elf_bfd_final_link): Copy the whole isym, not just
        some fields.
        * elf64-sparc.c (sparc64_elf_output_arch_syms): Declare used
        variables and initialize them.
1999-08-02 22:31:18 +00:00
Mark Mitchell
8b237a8965 * elf32-mips.c (_bfd_mips_elf_final_link): Handle the case where
there are no global symbols requiring GOT entries.
	(_bfd_mips_elf_size_dynamic_sections): Likewise.
	(_bfd_mips_elf_finish_dynamic_symbol): Likewise.
	(_bfd_mips_elf_finish_dynamic_sections): Likewise.
1999-08-01 22:38:53 +00:00
Mark Mitchell
972875741c * elf32-mips.c (mips_elf_calculate_relocation): Undefined weak
symbols are considered to have the value zero.
	(_bfd_mips_elf_relocate_section): Don't try to perform a
	relocation for an undefined symbol.
	(_bfd_mips_elf_check_relocs): Allocate locate GOT space for local
	GOT16 relocations.
1999-08-01 20:58:19 +00:00
Richard Henderson
a11c78e7dd Jakub Jelinek <jj@ultra.linux.cz>
* elf64-sparc.c (sparc64_elf_build_plt): Cosmetic change - ABI
        wants ba,a,pt %xcc instead of %icc.
        Emit correct .PLT0-(.PLTN+4) initial value into the pointer slots
        of large PLT entries.
        (sparc64_elf_plt_ptr_offset): Fix calculation.
        (sparc64_elf_finish_dynamic_symbol): Negative value of R_SPARC_JMP_SLOT
        addend should be relative to load address, not .plt section start.
        (sparc64_elf_size_info): Sparc64 uses 32bit .hash entries.
1999-07-30 21:42:21 +00:00
Richard Henderson
587ff49e9a Jakub Jelinek <jj@ultra.linux.cz>
* elf-bfd.h (struct elf_backend_data): Add
        print_symbol_all and output_arch_syms backend methods.
        * elfxx-target.h: Likewise.
        * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create,
        sparc64_elf_add_symbol_hook, sparc64_elf_output_arch_syms,
        sparc64_elf_get_symbol_type, sparc64_elf_symbol_processing): New
        functions.
        (sparc64_elf_size_dynamic_sections): Leave space for STT_REGISTER
        symbols in .dynsym, add their names into .dynstr. Put those symbols
        into dynlocal.
        (sparc64_elf_finish_dynamic_sections): Fix up DT_SPARC_REGISTER
        pointers to STT_REGISTER symbols in dynsym section.
        (sparc64_elf_print_symbol_all): New function.
        * elf.c (bfd_elf_print_symbol): Allow special backend symbol
        printing using the print_symbol_all hook.
1999-07-30 21:34:44 +00:00
Catherine Moore
d512aa072e Correctly handle Vtentry relocs. 1999-07-30 15:09:54 +00:00
Richard Henderson
441d6d7953 * elf32-mips.c (_bfd_mips_elf_final_link): Only re-sort dynsyms if
dynamic_sections_created.
1999-07-29 22:20:26 +00:00
Richard Henderson
c9b3cbf33c * elf32-mips.c (mips_info_to_howto_rel): Split out switch to ...
(mips_rtype_to_howto): ... new function.
        (_bfd_mips_elf_relocate_section): Use it.
1999-07-29 21:39:01 +00:00
Mark Mitchell
b89db8f2f0 * elf32-mips.c (_bfd_mips_elf_relocate_section): Fix typo. 1999-07-28 08:19:34 +00:00
Nick Clifton
f81112823f Change to strip out only symbols that start with LOCAL_LABEL_PREFIX followed
by 'L'.
1999-07-27 14:45:44 +00:00
Ian Lance Taylor
7fd9c19135 1999-07-23 Donn Terry <donn@interix.com>
* libcoff-in.h (coff_link_hash_entry): Add coff_link_hash_flags
	field, and define COFF_LINK_HASH_PE_SECTION_SYMBOL.
	* cofflink.c (coff_link_add_symbols): If PE, handle section
	symbols specially.
	* libcoff.h: Rebuild.
1999-07-24 03:16:50 +00:00
Ian Lance Taylor
7d923127c0 1999-07-23 Donn Terry <donn@interix.com>
* config.bfd (i[3456]86-*-interix*): New target.
1999-07-24 02:35:30 +00:00
Ian Lance Taylor
242eabea02 1999-07-21 Mark Elbrecht <snowball3@bigfoot.com>
* coffcode.h (styp_to_sec_flags): If COFF_LONG_SECTION_NAMES and
	COFF_SUPPORT_GNU_LINKONCE, mark sections whose names begin with
	.gnu.linkonce with SEC_LINKONCE and SEC_LINK_DUPLICATES_DISCARD.
	* coff-go32.c: (COFF_LONG_SECTION_NAMES): Define.
	(COFF_SUPPORT_GNU_LINKONCE): Define.
	* coff-stgo32.c: (COFF_LONG_SECTION_NAMES): Define.
	(COFF_SUPPORT_GNU_LINKONCE): Define.
1999-07-22 01:39:23 +00:00
Ian Lance Taylor
980e4bf7fe From Mark Elbrecht:
* configure.bat: Remove; obsolete.
1999-07-22 01:07:15 +00:00
Ian Lance Taylor
9c8ac5a997 From Mark Elbrecht:
* makefile.dos: Remove; obsolete.
1999-07-22 00:55:12 +00:00
Ian Lance Taylor
957ccf4406 1999-07-21 H.J. Lu <hjl@gnu.org>
* config.bfd (i[3456]86-*-vxworks*): Add targ_underscore=yes.
1999-07-22 00:51:11 +00:00
Ian Lance Taylor
75987f837d 1999-07-21 Philippe De Muyter <phdm@macqel.be>
* cofflink.c (_bfd_coff_generic_relocate_section): Issue an error
	message	and fail if a symbol index is out of range.
1999-07-22 00:29:35 +00:00
Ian Lance Taylor
2841ecd078 * elf32-mips.c (mips_elf_calculate_relocation): Get the GP value
when looking at a R_MIPS_GOT16 relocation.
1999-07-21 23:32:29 +00:00
Nick Clifton
8a70eff3a2 Use CREATE_BIG_COFF_TARGET_VEC 1999-07-20 08:52:54 +00:00
Mark Mitchell
0db63c1868 * elf32-mips.c (_bfd_mips_elf_final_link): Restore setting of GP
removed in previous change.
	(_bfd_mips_elf_relocate_section): Adjust GP relative relocations
 	in relocateable output.
1999-07-19 20:06:24 +00:00
Ian Lance Taylor
272dc76f04 * coff-m88k.c (m88kbcs_vec): Initialize new field of bfd_target
structure.
1999-07-19 19:22:02 +00:00
Ian Lance Taylor
accc7f6940 * elflink.h (elf_merge_symbol): Do merge symbols from the same BFD
if they appear to be specially created by the linker.
1999-07-19 19:08:33 +00:00
Nick Clifton
c3c89269f8 Add new field to bfd_target structure.
Initialise this field for all known bfd targets.
Add new search function to targets.c
1999-07-19 14:55:16 +00:00
Andreas Schwab
a9602746fa * elflink.h (elf_bfd_final_link): Remove unused variables rel_hash
and rel_hdr.
1999-07-19 09:11:14 +00:00
Mark Mitchell
31367b81b7 * elflink.h (elf_link_adjust_relocs): New function.
(elf_bfd_final_link): Use it.
	(elf_link_input_bfd): Deal with the fact that there can be
	two relocation sections for a single section.
	(elf_reloc_link_order): Likewise.

	* elf32-mips.c (_bfd_mips_elf_final_link): Don't set GP for
	a relocateable object.
	(_bfd_mips_elf_relocate_section): Handle relocateable links.
1999-07-18 06:31:29 +00:00
Richard Henderson
f65054f7be Jakub Jelinek <jj@ultra.linux.cz>
* elf64-sparc.c (sparc64_elf_info_to_howto): Use ELF64_R_TYPE_ID.
        (sparc64_elf_get_reloc_upper_bound,
        sparc64_elf_get_dynamic_reloc_upper_bound,
        sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
        sparc64_elf_canonicalize_dynamic_reloc, sparc64_elf_write_relocs):
        New functions.
        (sparc64_elf_check_relocs, sparc64_elf_relocate_section): Use
        ELF64_R_TYPE_ID/DATA where appropriate.
1999-07-16 21:28:40 +00:00
Richard Henderson
d6bcbdc1fe Jakub Jelinek <jj@ultra.linux.cz>
* elf64-sparc.c (sparc64_elf_size_dynamic_sections): Remove
        DT_SPARC_PLTFMT.
1999-07-16 21:25:28 +00:00
Ian Lance Taylor
6387d6028b * elf32-mips.c (mips_elf_local_relocation_p): New static
function.
	(mips_elf_next_lo16_addend): Call bfd_set_error on failure.
	(mips_elf_calculate_relocation): Use mips_elf_local_relocation_p.
	Always set *require_jalxp.
	(mips_elf_stub_section_p): Mark abfd parameter as unused.
	(_bfd_mips_elf_relocate_section): Only look for LO16 following
	GOT16 if the GOT16 is against a local symbol.  Don't return false
	for an undefined symbol.  If there is an overflow, assert that we
	have a name.
1999-07-16 19:09:22 +00:00
Andreas Schwab
318da145ed * elflink.h (elf_link_record_local_dynamic_symbol): Remove unused
variables `link' and `elfsec'.
	(elf_bfd_final_link): Remove unused variable `os'.
1999-07-16 08:10:27 +00:00
Mark Mitchell
435394bff7 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Don't require
a PT_PHDR program headers.
	(_bfd_mips_elf_final_link): Don't assume there are going to be
	section symbols when we're not building a shared object.
	(_bfd_mips_elf_check_relocs): Make sure we have a GOT when
	we need one.
1999-07-15 16:57:57 +00:00
Ian Lance Taylor
ac352105e1 1999-07-15 J.T. Conklin <jtc@redback.com>
* config.bfd (i[3456]86-*-vxworks*): New target.
1999-07-15 14:38:23 +00:00
Mark Mitchell
197b9ca0f9 * elf32-mips.c (mips_elf_stub_section_p): New function.
(mips_elf_calculate_relocation): Handle MIPS16 stub functions.
	(mips_elf_relocate_section): Adjust calling sequence for
	mips_elf_calculate_relocation and mips_elf_perform_relocation.
	(mips_elf_perform_relocation): Turn `jal' into `jalx' where
	required.
1999-07-15 13:12:02 +00:00
Ian Lance Taylor
3a6ae6163b * configure.in: Bump version number to 2.9.5.
* configure: Rebuild.
1999-07-15 11:48:14 +00:00
Jeff Law
1b83fcb388 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case R_HPPA): Handle
64bit format.
        (_bfd_elf_hppa_gen_reloc_type, case R_GOTOFF): Use base reloc type
        to derive final type instead of hardwiring a selection.
1999-07-15 02:06:02 +00:00
Mark Mitchell
6296902ea5 * elf32-mips.c (mips_elf_obtain_contents): Swap 16-bit halves of
things relocated by R_MIPS16_GPREL.
	(mips_elf_perform_relocation): Likewise.
1999-07-14 19:00:32 +00:00
Richard Henderson
2ac8ce5fe0 * elfxx-target.h (elfNN_bed): Add elf_backend_want_dynbss. 1999-07-14 16:14:49 +00:00
Richard Henderson
b3be9b46c2 * elf32-mips.c (struct mips_got_info): Add global_gotno.
(_bfd_mips_elf_size_dynamic_sections): Set it.
        (_bfd_mips_elf_final_link): Re-sort; verify the got did not grow.
        (mips_elf_sort_hash_table): Set max_non_got_dynindex based off
        new argument max_local.
1999-07-14 14:23:13 +00:00
Mark Mitchell
1e52e2ee34 * elf32-mips.c (mips_elf_obtain_contents): Swap the 16-bit
subwords when handling an R_MIPS16_26 relocation.
	(mips_elf_perform_relocation): Don't be paranoid abour right-shift
	semantics.
1999-07-14 11:46:04 +00:00
Mark Mitchell
b7233c24e1 * elf32-mips.c (elf_mips16_gprel_howto): Adjust src_mask and
dst_mask to match reality.
	(_bfd_mips_elf_calculate_relocation): Handle R_MIPS16_GPREL.
	(mips_elf_obtain_contents): Use bfd_get.
	(mips_elf_perform_relocation): Handle R_MIPS16_GPREL.
	(mips_elf_relocate_section): Likewise.
1999-07-14 09:45:46 +00:00
Mark Mitchell
e53bd91b0f * elf32-mips.c (mips_elf_calculate_relocation): Handle R_MIPS16_26.
(mips_elf_relocate_section): Adjust calling sequence for
	mips_elf_perform_relocation.
	(mips_elf_perform_relocation): Take additional argument.  Handle
	R_MIPS16_26.  Use bfd_put for convenience.
1999-07-13 23:55:08 +00:00
Richard Henderson
28a7f3e70d * elf.c (assign_file_positions_for_segments): Thinko last change.
Always overwrite p_flags.
1999-07-13 20:10:26 +00:00
Richard Henderson
3018b44153 * elf-bfd.h (struct elf_backend_data): Add want_dynbss.
* elflink.c (_bfd_elf_create_dynamic_sections): Only create
        .dynbss and .rel[a].bss if want_dynbss.
        * elfxx-target.h (elf_backend_want_dynbss): Provide default.
1999-07-13 18:31:17 +00:00
Richard Henderson
30b30c2181 * elf-bfd.h (struct elf_link_local_dynamic_entry): New.
(struct elf_link_hash_table): Add dynlocal.
	(_bfd_elf_link_lookup_local_dynindx): Prototype.
	(_bfd_elf_link_adjust_dynindx): Delete.
	(_bfd_elf_link_renumber_dynsyms): Prototype.
	(_bfd_elf,link_record_local_dynamic_symbol): Prototype.
	* elfcode.h (elf_link_record_local_dynamic_symbol): New alias.
	* elflink.c (_bfd_elf_link_adjust_dynindx): Delete.
	(_bfd_elf_link_lookup_local_dynindx): New function.
	(elf_link_renumber_hash_table_dynsyms): New function.
	(_bfd_elf_link_renumber_dynsyms): New function.
	* elflink.h (elf_link_record_local_dynamic_symbol): New function.
	(struct elf_assign_sym_version_info): Delete removed_dynamic.
	(bfd_elf,size_dynamic_sections): Use _bfd_strip_section_from_output
	instead of elf_link_remove_section_and_adjust_dynindices.
	Remove removed_dynamic code.  Use _bfd_elf_link_renumber_dynsyms.
	(elf_link_assign_sym_version): Remove removed_dynamic code.
	(elf_link_renumber_dynsyms): Delete.
	(elf_bfd_final_link): Install section and local symbols into .dynsym.
	* elf32-m68k.c (elf_m68k_adjust_dynindx): Delete.
	(elf_m68k_size_dynamic_sections): Don't set section dynindicies.
	(elf_m68k_finish_dynamic_sections): Don't write section dynsyms.
	* elf32-mips.c: Similarly.
	* elf32-ppc.c: Similarly.
	* elf32-sparc.c: Similarly.
	* elf64-alpha.c: Similarly.
	* elf64-sparc.c: Similarly.
1999-07-13 18:21:29 +00:00
Mark Mitchell
97a4bb053f * elf32-mips.c (mips_elf_calculate_relocation): Do not complain
when _gp_disp is undefined.  Do not check R_MIPS_LO16 for overflow
	when the relocation is against _gp_disp.
1999-07-13 15:23:22 +00:00
Mark Mitchell
a3c7651d1a * dwarf2.c (read_attribute): Support DW_FORM_ref8.
* elf32-mips.c (mips_elf_link_hash_entry): Change mips_32_relocs
	to possibly_dynamic_relocs.  Adjust usage throughout code.
	(elf_mips_howto_table): Handle R_MIPS_64 correctly.
	(elf_mips_ctor64_howto): Likewise.
	(mips_elf_calculate_relocation): Handle R_MIPS_64 like R_MIPS_32.
	Adjust indentation.
	(mips_elf_relocate_section): Handle R_MIPS_64 in 32-bit mode.
	(_bfd_mips_elf_check_relocs): Handle R_MIPS_64 like R_MIPS_32.
	Use MIPS_ELF_GOT_SIZE to calculate the size of GOT entries.
	* elf64-mips.c (elf_backend_may_use_rel_p): Define.
1999-07-12 17:15:34 +00:00
Ian Lance Taylor
67e5d3d6d0 * bfd-in.h: Remove tests of COFF_IMAGE_WITH_PE.
* bfd-in2.h: Rebuild.
1999-07-12 11:06:03 +00:00
Ian Lance Taylor
5f771d47c7 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
as appropriate.  Use EMPTY_HOWTO as appropriate.  Fill in
	structure initializations.  Add casts.
	* reloc.c (EMPTY_HOWTO): Define.
	* bfd-in2.h: Rebuild.
	* coff-h8300.c (h8300_reloc16_extra_cases): Remove useless
	comparisons against 0.
	* elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Change
	previous_ibfd_e_flags to unsigned long.
	* vms.h (struct vms_private_data_struct): Change section_count to
	unsigned.
	* vms-gsd.c (_bfd_vms_slurp_gsd): Change psect_idx to unsigned.
	(_bfd_vms_write_gsd): Change symnum to unsigned.
	* vms-hdr.c (_bfd_vms_write_hdr): Change symnum to unsigned.
	* vms-tir.c (etir_sta): Change psect to unsigned.
	(alloc_section): Change idx to unsigned.
	(tir_sta, tir_ctl): Change psect to unsigned.
	(_bfd_vms_write_tir): Change len and before to bfd_size_type.
	* vms.c (priv_section_count): Change to unsigned.
1999-07-12 10:30:21 +00:00
Andreas Schwab
121089cbf0 * elf32-m68k.c: Add some ATTRIBUTE_UNUSED.
* m68klinux.c: Likewise.
1999-07-12 08:15:36 +00:00
Ian Lance Taylor
e049a0de5a * Many files: Changes to avoid gcc warnings: Remove unused local
variables.  Add default case to enum switches.
	* coff-arm.c (bfd_arm_allocate_interworking_sections): Only
	compile if not COFF_IMAGE_WITH_PE.
	(record_arm_to_thumb_glue, record_thumb_to_arm_glue): Likewise.
	(bfd_arm_get_bfd_for_interworking): Likewise.
	(bfd_arm_process_before_allocation): Likewise.
	* epoc-pei-arm.c: Don't rename bfd_arm functions.
	* pei-arm.c: Likewise.
	* elf32-mips.c (mips_elf_link_hash_table_create): Don't declare.
	(MIPS_ELF_ADD_DYNAMIC_ENTRY): Correct last change.
	(mips_elf_got16_entry): Put parens around & in body of ==.
	(mips_elf_calculate_relocation): Correct test for empty string.
	* vms-gsd.c: Use _bfd_error_handler rather than fprintf to
	stderr.
	* vms-misc.c (_bfd_vms_length_hash_symbol): Correct sprintf
	format.
1999-07-12 07:35:20 +00:00
Ian Lance Taylor
7442e600c8 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
as appropriate.  Fill in structure initializations.  Add variable
	initializations.  Add casts.
	* dwarf1.c (parse_line_table): Change eachLine to unsigned long.
	(dwarf1_unit_find_nearest_line): Change i to unsigned long.
1999-07-11 19:49:48 +00:00
Ian Lance Taylor
3a99b017b3 * elf.c (bfd_elf_hash): Change parameter from unsigned char * to
char *.
	* elf-bfd.h (bfd_elf_hash): Update declaration.
	* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove casts
	when calling bfd_elf_hash.
1999-07-11 17:13:36 +00:00
Mark Mitchell
9ebbd33e6f * libbfd.c (bfd_put_8): Make it of type `void'.
* bfd-in2.h: Regenerated.
	* elf32-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Conditionalize
	for 32-bit hosts.
	(_bfd_mips_elf_final_link): Likewise.
1999-07-11 09:28:45 +00:00
Mark Mitchell
65388f2d50 * elflink.h (elf_link_read_relocs_from_section): Be type-correct. 1999-07-11 00:12:14 +00:00
Jeff Law
5b4e28187c * config.bfd (hppa*-*-linux-gnu*): New target 1999-07-08 11:33:37 +00:00
Mark Mitchell
103186c62b * elf-bfd.h (_bfd_mips_elf_section_from_shdr): Constify.
(_bfd_mips_elf_create_dynamic_sections): New function.
	(_bfd_mips_elf_add_symbol_hook): Likewise.
	(_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
	(_bfd_mips_elf_finish_dynamic_symbol): Likewise.
	(_bfd_mips_elf_finish_dynamic_sections): Likewise.
	(_bfd_mips_elf_gc_mark_hook): Likewise.
	(_bfd_mips_elf_gc_sweep_hook): Likewise.
	(_bfd_mips_elf_always_size_sections): Likewise.
	(_bfd_mips_elf_size_dynamic_sections): Likewise.
	(_bfd_mips_elf_check_relocs): Likewise.
	(_bfd_mips_elf_link_hash_table_create): Likewise.
	(_bfd_mips_elf_print_private_data): Likewise.
	(_bfd_mips_elf_link_output_symbol_hook): Likewise.
	(_bfd_mips_elf_final_link): Likewise.
	(_bfd_mips_elf_additional_program_headers): Likewise.
	(_bfd_mips_elf_modify_segment_map): Likewise.
	(_bfd_mips_elf_relocate_section): Likewise.
	* elf32-mips.c (mips_elf32_object_p): Move contents into
	_bfd_mips_elf_object_p.
	(mips_elf_additional_program_headers): Rename to
	_bfd_mips_elf_additional_program_headers.
	(mips_elf_modify_segment_map): Rename to
	_bfd_mips_elf_modify_segment_map.
	(elf_mips_abi_name): Change prototype.
	(mips_elf32_section_from_shdr): Merge into
	_bfd_mips_elf_section_from_shdr.
	(mips_elf32_section_processing): Merge into
	_bfd_mips_elf_section_processing.
	(mips_elf_final_link): Rename to _bfd_mips_elf_final_link.  Invoke
	the right back-end ELF linker.
	(mips_elf_relocate_section): Rename to
	_bfd_mips_elf_relocate_section.  Clean up.  Adjust for 64-bit code.
	(mips_elf_link_output_symbol_hook): Rename to
	_bfd_mips_elf_link_output_symbol_hook.
	(mips_elf_create_dynamic_section): Rename to
	_bfd_mips_elf_create_dynamic_section.
	(mips_elf_check_relocs): Rename to _bfd_mips_elf_check_relocs.
	Adjust for 64-bit code.  Use mips_elf_got_section.
	(mips_elf_adjust_dynamic_symbol): Rename to
	_bfd_mips_elf_adjust_dynamic_symbol.  Use
	mips_elf_allocate_dynamic_relocations.
	(mips_elf_finish_dynamic_symbol): Rename to
	_bfd_mips_elf_finish_dynamic_symbol.  Use mips_elf_got_section.
	Adjust for 64-bit code.
	(mips_elf_finish_dynamic_sections): Rename to
	_bfd_mips_elf_finish_dynamic_sections.  Adjust for 64-bit code.
	(mips_elf_always_size_sections): Rename to
	_bfd_mips_elf_always_size_sections.
	(mips_elf_add_symbol_hook): Rename to
	_bfd_mips_elf_add_symbol_hook.
	(mips_elf_next_lo16_addend): Constify.
	(mips_elf_calculate_relocation): Likewise.
	(mips_elf_obtain_contents): Likewise.
	(mips_elf_perform_relocation): Likewise.
	(mips_elf_create_dynamic_relocation): Likewise.
	(mips_elf_allocate_dynamic_relocations): New function.
	(MIPS_ELF_REL_DYN_SECTION_NAME): New macro.
	(MIPS_ELF_REL_SIZE): Likewise.
	(MIPS_ELF_DYN_SIZE): Likewise.
	(MIPS_ELF_GOT_SIZE): Likewise.
	(MIPS_ELF_SYM_SIZE): Likewise.
	(MIPS_ELF_LOG_FILE_ALIGN): Likewise.
	(MIPS_ELF_GET_WORD): Likewise.
	(MIPS_ELF_PUT_WORD): Likewise.
	(MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
	(STUB_LW): Conditionalize for 64-bit value.
	(elf_mips_howto_table): Add R_MIPS_HIGHER and R_MIPS_HIGHEST
	entries.
	(_bfd_mips_elf_merge_private_bfd_data): Merge e_ident[EI_CLASS].
	Check it for inconsistency.
	(_bfd_mips_elf_print_private_bfd_data): Print ABI=64 for 64-bit
	ABI.
	(_bfd_mips_elf_fake_sections): Remove duplicate handling of
	.msym.
	(mips_elf_global_got_index): Use MIPS_ELF_GOT_SIZE.
	(mips_elf_got_offset_from_index): Use misp_elf_got_section.
	(mips_elf_create_local_got_entry): Use MIPS_ELF_GOT_SIZE.
	(mips_elf_local_got_index): Likewise.
	(mips_elf_got_page): Likewise.
	(mips_elf_got_info): Likewise.
	(mips_elf_create_dynamic_relocation): Handle 32-bit/64-bit split.
	(ELF_DYNAMIC_INTERPRETER): Handle 64-bit code.
	(mips_elf_create_dynamic_sections): Use MIPS_ELF_LOG_FILE_ALIGN,
	instead of constant `2'.
	(mips_elf_create_got_section): Tidy.  Use MIPS_ELF_GOT_SIZE.
	(mips_elf_create_msym_section): Use MIPS_ELF_LOG_FILE_ALIGN.
	(mips_elf_size_dynamic_sections): Use
	MIPS_ELF_REL_DYN_SECTION_NAME, MIPS_ELF_GOT_SIZE,
	MIPS_ELF_ADD_DYNAMIC_ENTRY.  Remove #if 0'd code.
	Adjust all releveant entries in elf backend table.
	* elf64-mips.c (mips_elf64_section_from_shdr): Remove.
	(mips_elf64_section_processing): Likewise.
	Adjust elf backend entries to use _bfd_mips_elf variants now
	publicly available.
1999-07-07 19:23:22 +00:00
Mark Mitchell
c7ac6ff835 * elflink.h (elf_link_create_dynamic_sections): Handle non-standard
hash-entry sizes.
	(size_dynamic_sections): Likewise.
	(elf_link_output_extsym): Likewise.
	* elf.c: (elf_fake_sections): Likewise.
	* libbfd.c (bfd_get): New macro.
	(bfd_put): Likewise.
	* bfd-in2.h: Regenerated.
	* elf-bfd.h (elf_size_info): Add hash_entry_size,
	int_rels_per_ext_rel, swap_dyn_out, swap_reloc_in, swap_reloc_out,
	wap_reloca_in, and swap_reloca_out.
	* elflink.h (elf_link_read_relocs_from_section): Adjust to handle
	multiple internal relocations per external relocation.
	(link_read_relocs): Likewise.
	(elf_bfd_final_link): Likewise.
	(elf_link_input_bfd): Likewise.
	(elf_gc_mark): Likewise.
	(elf_gc_smash_unused_vtentry_relocs): Likewise.
	* elfcode.h (elf_swap_dyn_out): Adjust type to match
	elf_swap_dyn_in.
	(size_info): Add entries for new fields.
	* elf64-mips.c (mips_elf64_swap_reloc_out): Enable.
	(mips_elf64_be_swap_reloc_in): New function.
	(mips_elf64_be_swap_reloc_out): Likewise.
	(mips_elf64_be_swap_reloca_in): Likewise.
	(mips_elf64_be_swap_reloca_out): Likewise.
	(mips_elf64_size_info): Add entries for new fields.
1999-07-07 17:50:56 +00:00
Ian Lance Taylor
0525d26ec3 * elflink.h (elf_bfd_final_link): Assert that section reloc_count
field equals the new rel_count field.
	(elf_link_input_bfd): When doing a relocateable link, use the new
	rel_count field rather than the reloc_count field.
	(elf_reloc_link_order): Likewise.
	(elf_finish_pointer_linker_section): Likewise.
	Based on patch from H.J. Lu <hjl@gnu.org>:
	* elflink.h (elf_merge_symbol): Permit a non-weak definition in a
	shared library to override a weak definition in a regular object.
1999-07-07 11:39:43 +00:00
Jeff Law
37afc161ab * libhppa.h: Revert July 2, 1999 patch. 1999-07-06 23:50:45 +00:00
Jeff Law
9db37001c6 ÿ
* elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): T mode selectors
        need to generate DLTIND relocations, not DLTREL relocations.
1999-07-06 09:27:17 +00:00
Nick Clifton
478d07d67c Add support for arm v5 architectures. 1999-07-05 07:28:24 +00:00
Nick Clifton
752149a058 Add BFD_RELOC_ARM_ADRL_IMMEDIATE. 1999-07-05 06:29:47 +00:00
Mark Mitchell
5e38c3b856 * dwarf2.c (parse_comp_unit): Add ABBREV_LENGTH parameter.
(_bfd_dwarf2_find_nearest_line): Add ADDR_SIZE parameter.
	* elf.c (_bfd_elf_find_nearest_line): Pass it.
	* elf32-arm.h (elf32_arm_find_nearest_line): Likewise.
	* elf32-mips.c (ABI_64_P): New macro.
	(IRIX_COMPAT): We are IRIX6-compatible if ABI_64_P.
	(_bfd_mips_elf_find_nearest_line): Adjust call to
	_bfd_dwarf2_find_nearest_line.
	* libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
	* libbfd.h: Regenerated.
1999-07-02 21:03:56 +00:00
Ian Lance Taylor
4766cbee7a * config.bfd: Add * at the end of i[3456]86-*-unixware. 1999-07-02 12:52:21 +00:00
Jeff Law
2a6d0fe7b3 * libhppa.h (HPPA_R_ARG_RELOC): Delete.
(HPPA_R_CONSTANT, HPPA_R_ADDEND): Likewise.
1999-07-02 11:26:12 +00:00
Mark Mitchell
23bc299bd8 * elf-bfd.h (bfd_elf_section_data): Add rel_count and rel_count2
fields.
	(_bfd_elf_init_reloc_shdr): New function.
	* elf.c (_bfd_elf_new_section_hook): Use bfd_zalloc, rather than
	bfd_alloc followed by memset.
	(_bfd_elf_init_reloc_shdr): New function, split out from ...
	(elf_fake_sections): Here.
	(assign_section_numbers): Assign section numbers for the second
	relocation section, if required.
	* elflink.h (elf_link_output_relocs): New function.
	(elf_link_size_reloc_section): Likewise.
	(elf_bfd_final_link): Use elf_link_size_reloc_section.
	(elf_link_input_bfd): Use elf_link_output_relocs.
	* elf32-mips.c (_bfd_mips_elf_fake_sections): Use
	_bfd_elf_init_reloc_shdr to initialize rel_hdr2.
1999-07-01 23:20:08 +00:00
Jeff Law
17bb48e0f2 è
* elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle R_PCREL_CALL
        with 22bit format.
1999-07-01 13:02:48 +00:00
Mark Mitchell
7403cb6305 * elf32-mips.c (mips_elf_got_info): Move declaration before
prototypes.  Change global_gotsym to be a pointer to a hash entry,
	rather than a number index.
	(mips_elf_link_hash_entry): Move declaration before prototypes.
	(mips_elf_irix6_finish_dynamic_symbol): New function.
	(mips_elf_sign_extend): Likewise.
	(mips_elf_high): Likewise.
	(mips_elf_higher): Likewise.
	(mips_elf_highest): Likewise.
	(mips_elf_global_got_index): Likewise.
	(mips_elf_local_got_index): Likewise.
	(mips_elf_got_offset_from_index): Likeiwse.
	(mips_elf_record_global_got_symbol): Likewise.
	(mips_elf_got_page): Likewise.
	(mips_elf_next_lo16_addend): Likewise.
	(mips_elf_calculate_relocation): Likewise.
	(mips_elf_obtain_contents): Likewise.
	(mips_elf_perform_relocation): Likewise.
	(mips_elf_assign_gp): Likewise.
	(mips_elf_sort_hash_table_f): Likewise.
	(mips_elf_sort_hash_table): Likewise.
	(mips_elf_got_section): Likewise.
	(mips_elf_got_info): Likewise.
	(mips_elf_create_local_got_entry): Likewise.
	(mips_elf_got16_entry): Likewise.
	(mips_elf_create_dynamic_relocation): Likewise.
	(elf_mips_howto_table): Add description of R_MIPS_SCN_DISP.
	(mips_elf_final_gp): Use mips_elf_assign_gp.
	(_bfd_mips_elf_symbol_processing): Don't move SHN_COMMON symbols
	into SHN_SCOMMON automatically on IRIX6.
	(mips_elf_add_symbol_hook): Likewise.
	(mips_elf_relocate_section): Rewrite, using
	mips_elf_calculate_relocation and mips_elf_perform_relocation.
	(mips_elf_create_dynamic_section): Use MIPS_ELF_STUB_SECTION_NAME.
	Don't deal with .rld_map on IRIX6.
	(mips_elf_create_got_section): Adjust use of global_gotsym.  Set
	section flags appropriately for .got.
	(mips_elf_check_relocs): Handle IRIX6 relocations making use of
	the got.  Call mips_elf_record_global_got_symbol and allocate
	local got space appropriately.
	(mips_elf_size_dynamic_sections): Use bfd_byte *, not unsigned
	char *.  Rework calculation of GOT size.  Sort dynamic symbol
	table entries so entries that do not require GOT entries appear at
	the beginning.  Don't use DT_MIPS_HIPAGENO on IRIX6.  Remove dead
	code dealing with DT_INIT and DT_FINI.  Remove fiddling with
	global_gotsym.
	(mips_elf_finish_dynamic_symbol): Adjust creation of global GOT
	entries.
	(mips_elf_finish_dynamic_symbol): Use
	mips_elf_irix6_finish_dynamic_symbol.
	(mips_elf_finish_dynamic_sections): Correct off-by-one error
	setting DT_MIPS_UNREFEXTNO.  Adjust setting of DT_MIPS_GOTSYM for
	change to global_gotsym.  Set DT_MIPS_OPTIONS on IRIX6.
1999-06-30 20:13:43 +00:00
Ian Lance Taylor
0dda5f7af8 * elf32-mips.c (mips_elf_final_link): Don't set CPIC when doing a
relocateable link.  From Ralf Baechle <ralf@uni-koblenz.de>.
1999-06-30 18:16:46 +00:00
Nick Clifton
04f7c78d64 Define 'elf_backend_got_header_size' and 'elf_backend_plt_header_size'. 1999-06-30 02:30:04 +00:00
Nick Clifton
a72747a354 Patch from: Jim Pick <jim@jimpick.com>
Take note of 'no_undefined'.
1999-06-29 02:51:50 +00:00
Jeff Law
caf3d37ccc è
* elf-hppa.c (elf_hppa_howto_table): Use bfd_elf_generic_reloc as
        relocation function.
        * elf32-hppa.c (hppa_elf_reloc): Kill unused/unwanted function.
1999-06-29 01:28:25 +00:00
Mark Mitchell
303f629d61 * elf32-mips.c (MIPS_ELF_SRDATA_SECTION_NAME): New macro.
(MIPS_ELF_OPTIONS_SECTION_NAME): Likewise.
	(MIPS_ELF_STUB_SECTION_NAME): Likewise.
	(_bfd_mips_elf_section_from_shdr): Use them.
	(_bfd_mips_elf_fake_sections): Likewise.  Add .srdata to the list
	of GP-relative sections.
	(_bfd_mips_elf_set_section_contents): Use them.
	(_bfd_mips_elf_section_processing): Share code between .sdata and
	.lit4/.lit8 sections.  Set appropriate flags for .srdata.
	(mips_elf_additional_program_headers): Add handling for
	PT_MIPS_OPTIONS segment on IRIX6.
	(mips_elf_modify_segment_map): Likeiwse.
	(mips_elf_final_link): Set EF_MIPS_CPIC when required by the ABI.
	Include the options sections on IRIX6.  Don't look for GP-relative
	sections by name; use SHF_MIPS_GPREL instead.
	(ELF_DYNAMIC_INTERPRETER): Adjust to use /usr/lib32/libc.so.1 for
	the N32 ABI.
	(mips_elf_create_dynamic_sections): Don't muck about with section
	alignments and such on IRIX6.
	(mips_elf_adjust_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
	(mips_elf_size_dynamic_sections): Likewise. Adjust to handle the
	fact that ELF_DYNAMIC_INTERPRETER is no longer a constant.  Use
	bfd_zalloc rather than bfd_alloc and memset.
	(mips_elf_finish_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
	Don't assert the existence of .rld_map on IRIX6.
	(mips_elf_finish_dynamic_sections): Use MIPS_ELF_STUB_SECTION_NAME.
1999-06-27 21:23:34 +00:00
Mark Mitchell
9886bd4365 * elf32-mips.c (mips_elf_adjust_dynindx): Remove.
(mips_elf_size_dynamic_sections): Use _bfd_elf_link_adjust_dynindx
	instead.
1999-06-27 16:11:13 +00:00
Mark Mitchell
c6142e5d05 * elf32-mips.c (mips_elf_swap_msym_in): New function.
(mips_elf_swap_msym_out): New function.
	(mips_elf_create_msym_section): Likewise.
	(MIPS_ELF_MSYM_SECTION_NAME): New macro.
	(_bfd_mips_elf_final_write_processing): Set sh_link for .msym.
	(_bfd_mips_elf_section_from_shdr): Reject an SHT_MIPS_MSYM
	section not named .msym.
	(_bfd_mips_elf_fake_sections): Use MIPS_ELF_MSYM_SECTION_NAME, not
	.msym directly.  Set appropriate attributes for the .msym
	section.
	(mips_elf_link_hash_entry): Add min_dyn_reloc_index field.
	(mips_elf_link_hash_newfunc): Clear it.
	(mips_elf_create_dynamic_sections): Create the .msym section
	on IRIX6.
	(mips_elf_size_dynamic_sections):  Allocate space for the
	.msym section.  Add a DT_MIPS_MSYM entry.
	(mips_elf_finish_dynamic_symbol): Write out a .msym entry for
	the symbol.
	(mips_elf_finish_dynamic_sections): Assign a value for
	DT_MIPS_MSYM.  Add .msym entries for the section symbols as well.
1999-06-27 11:05:15 +00:00
Mark Mitchell
a94a7c1c32 * elf32-mips.c (irix_compat_t): New enumeration.
(ABI_N32_P): New macro.
	(IRIX_COMPAT): Likewise.
	(SGI_COMPAT): Implement in terms of IRIX_COMPAT.
	(mips_elf_relocate_section): Fix typo.
1999-06-26 21:17:49 +00:00
Ian Lance Taylor
254f5c45f5 1999-06-26 Mumit Khan <khan@xraylith.wisc.edu>
* peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections
	as writable PE sections.
1999-06-26 19:32:54 +00:00
Richard Henderson
f623be2b68 David Mosberger <davidm@hpl.hp.com>
* dwarf2.c (struct arange): New type.
        (struct comp_unit): Replace LOW and HIGH by member ARANGE.
        (arange_add): New function.
        (decode_line_info): Keep track of address ranges that a compilation
        unit covers.
        (comp_unit_contains_address): Return true if address is contained
        in _any_ of the address ranges associated with a compilation unit.
        (_bfd_dwarf2_find_nearest_line): Call comp_unit_find_nearest_line
        on the first comp_unit that contains the address.
1999-06-26 16:05:58 +00:00
Richard Henderson
69dd2e2d55 David Mosberger <davidm@hpl.hp.com>
* dwarf2.c (struct dwarf2_debug): Add member dwarf_line_buffer.
        (decode_line_info): Add variable STASH and initialize it to point
        to the per-bfd dwarf2_debug info.  Remove static variable
        dwarf_line_buffer and use stash->dwarf_line_buffer in its place.
1999-06-26 15:48:47 +00:00
Ian Lance Taylor
1d7b28df8d * elflink.h (elf_link_output_extsym): It's OK for a -Bsymbolic
shared library to have an undefined symbol.
1999-06-26 09:00:19 +00:00
Ian Lance Taylor
0429ebd010 From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
* elf32-ppc.c (ppc_elf_relocate_section): Fix last patch.
1999-06-26 08:57:54 +00:00
Jeff Law
4517897e01 d
* elf-hppa.c (elf_hppa_final_write_processing): New function.
        * elf32-hppa.c: Remove everything related to symbol extension
        sections & records.  Use the common elf_hppa_final_write_processing.
1999-06-24 20:01:42 +00:00
Mark Mitchell
f0c2e336c8 * elflink.h (size_dynamic_sections): Use user-specified init/fini
functions instead of _init/_fini if requested.
1999-06-23 11:06:57 +00:00
Ian Lance Taylor
03ae5f594e * elf.c (bfd_section_from_shdr): Avoid crashing on a bogus sh_link
field.
1999-06-22 21:25:49 +00:00
Ian Lance Taylor
464e1740d2 From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Set unused dynindx
	field to 0, not -1.
	(ppc_elf_finish_dynamic_sections): Check for positive section
	dynindx field, rather than comparing against -1.
	(ppc_elf_relocate_section): Only return false if undefined_symbol
	or reloc_overflow fail, not always upon encountering an error.
1999-06-22 21:01:24 +00:00
Mark Mitchell
2f5116e25d * elflink.h (link_read_relocs): Explicitly cast external_relocs to
bfd_byte * before performing pointer arithmetic.
1999-06-22 13:57:15 +00:00
Jeff Law
9e103c9cd2 * elf-hppa.h: New file. Common stuff for elf32 and elf64 PA
support.
        * elf32-hppa.c: Include elf-hppa.h.
        (ARCH_SIZE): Define.
        (elf_hppa_reloc_type_lookup): Delete.  Found in the common code
        now.
        (elf32_hppa_info_to_howto): Similarly.
        (elf_hppa_howto_table): Similarly.
        (elf_hppa_reloc_type_lookup): Similarly.
        (hppa_elf_gen_reloc_type): Similarly.
        * elf32-hppa.h (ELF_HOWTO_TALBE, N_PARISC_RELOCS): Delete.
1999-06-22 12:20:30 +00:00
Nick Clifton
232fb1a3f6 Catch overflow in 22_PCREL reloc. 1999-06-22 02:41:43 +00:00
Ian Lance Taylor
271025ebee * coff-arm.c (arm_emit_base_file_entry): Explicitly declare return
type.
1999-06-21 10:04:37 +00:00
Richard Henderson
0bde07d41a * section.c (_bfd_strip_section_from_output): Ignore sections
DISCARDed by the link script.
1999-06-20 14:15:42 +00:00
Ian Lance Taylor
f800e11d88 * elflink.h (elf_link_remove_section_and_adjust_dynindices):
Remove unused local variable spp.
1999-06-19 14:10:28 +00:00
Richard Henderson
72b60c230f * elf64-alpha.c (elf64_alpha_relocate_section): Don't adjust
GPDISP or LITUSE in a relocatable link.
1999-06-18 04:25:56 +00:00
Joern Rennecke
aec89efbf6 * dwarf1.c (alloc_dwarf1_unit): Allocate using bfd_zalloc.
* (alloc_dwarf1_func): Likewise.
1999-06-17 13:26:08 +00:00
Jeff Law
5ba624b0f4 * libhppa.h: Fix various formatting errors.
(assemble_3); Rewrite using CATENATE.
        (assemble_17): Fix various bugs.
1999-06-16 02:13:40 +00:00
Nick Clifton
59d23ada01 Fix definition of R_MCORE_NONE reloc 1999-06-16 02:11:50 +00:00
Richard Henderson
0c3ff40b22 * section.c (SEC_SHORT): Define.
* bfd-in2.h: Rebuild.
1999-06-15 15:12:23 +00:00
Ian Lance Taylor
f6886bc42e remove duplicate entry, add missing blank line 1999-06-13 19:46:31 +00:00
Mark Mitchell
78de0b4335 * elflink.h (elf_link_remove_section_and_adjust_dynindices):
Remove abfd parameter.  Use _bfd_strip_section_from_output.
	(bfd_elf_size_dynamic_sections): Adjust callers accordingly.
1999-06-13 18:35:29 +00:00
Mark Mitchell
42751cf354 * elf-bfd.h (_bfd_elf_link_adjust_dynindx): New function.
* elflink.c (_bfd_elf_link_adjust_dynindx): Define it.
	* elflink.h (elf_link_remove_section_and_adjust_dynindices): New
	function.
	(bfd_elf_size_dynamic_sections): Use it.
1999-06-13 14:49:51 +00:00
Ian Lance Taylor
3e2699126a 1999-06-13 Alan Modra <alan@spri.levels.unisa.edu.au>
* elf32-i386.c (elf_howto_table): Change R_386_PC8 from
	complain_overflow_bitfield to complain_overflow_signed.
1999-06-13 09:23:04 +00:00
Mark Mitchell
6b5bd373fb * elflink.h (elf_link_read_relocs_from_section): New function,
split out from ...
	(elf_link_read_relocs): Here.  Use it for both relocation
	sections.
1999-06-13 01:13:26 +00:00
Mark Mitchell
57e21befb9 * elfcode.h (elf_slurp_reloc_table_from_section): Don't assume
asect->reloc_count is valid.
1999-06-12 17:56:26 +00:00
Ian Lance Taylor
cc3bfcee61 * elf32-mips.c (mips_elf32_section_processing): Permit a
SHT_MIPS_REGINFO section to have a size of 0.
1999-06-12 13:08:29 +00:00
Ian Lance Taylor
7a50d4ac66 1999-06-12 David O'Brien <obrien@freebsd.org>
* config.bfd (alpha*-*-freebsd*): New target.
	(i[3456]86-*-freebsd*): Now defaults to ELF.
1999-06-12 13:06:26 +00:00
Ian Lance Taylor
44257b8b9d * reloc.c (_bfd_relocate_contents): Permit bitfield relocations to
wrap if the relocation covers the high bit of an address.
1999-06-11 20:23:58 +00:00
Ian Lance Taylor
f5f9cc4ffb * dwarf2.c (decode_line_info): Remove unused variable first_time. 1999-06-10 21:28:56 +00:00
Richard Henderson
60dac29966 Jakub Jelinek <jj@ultra.linux.cz>
* elf64_sparc.c (sparc64_elf_relocate_section): Use R_SPARC_max_std
        instead of R_SPARC_max.
        (sparc64_elf_info_to_howto): Likewise.
        * elf32_sparc.c (elf32_sparc_relocate_section): Likewise.
        (elf32_sparc_info_to_howto): Likewise; handle vtable relocations.
1999-06-10 20:59:54 +00:00
Richard Henderson
9d7428a9e3 * section.c (_bfd_strip_section_from_output): Remove output
sections with no initial link_order.
1999-06-07 23:22:00 +00:00
Nick Clifton
3c82f80fc0 Define ELF_MAXPAGESIZE 1999-06-07 10:27:21 +00:00
Andreas Schwab
eb519dff86 * Makefile.am (SOURCE_HFILES): Add missing headers.
* Makefile.in: Regenerated.
1999-06-07 02:51:40 +00:00
Mark Mitchell
7f7e7b689c * elf32-mips.c (_bfd_mips_elf_print_private_data): Recognize
the N32 ABI.
1999-06-06 22:31:46 +00:00
Richard Henderson
dc1bc0c9a5 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* elf32-ppc.c (ppc_elf_relocate_section): Don't barf on out of
        range undefweak symbols.
        * hash.c: Add missing comma after @xref{}
        * linker.c: Likewise.
1999-06-04 13:25:23 +00:00
Nick Clifton
79e5982fed Define ELF_MAXPAGESIZE for all ELF based ports.
Produce an error message of ELF_MAXPAGESIZE is not defined.
1999-06-04 12:45:07 +00:00
Ian Lance Taylor
4a54b4654d * Makefile.am: Rebuild dependencies.
(BFD32_BACKENDS): Add dwarf1.lo.
	(BFD32_BACKENDS_CFILES): Add dwarf1.c.
	* Makefile.in: Rebuild.
1999-06-04 12:00:31 +00:00