9ff2c3b87066f1529a52edf65ae4538f695504c0
[external/binutils.git] / bfd / ChangeLog
1 2003-11-18  Alan Modra  <amodra@bigpond.net.au>
2
3         * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
4         size is zero.
5
6 2003-11-17  Daniel Jacobowitz  <drow@mvista.com>
7
8         * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
9         ELF_LINK_HASH_NEEDS_PLT.  Fix formatting.
10         * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
11         * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
12         * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
13         * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
14         * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
15         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
16         * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
17         * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
18         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
19         * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
20         (elf_backend_copy_indirect_symbol): Don't define.
21
22 2003-11-14  Daniel Jacobowitz  <drow@mvista.com>
23
24         * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
25         GOT entries.
26
27 2003-11-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
28
29         * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
30         to R_390_RELATIVE. Convert the other relocations against local
31         symbols to relocations against the start of the section.
32         * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
33         to R_390_RELATIVE. Convert the other relocations against local
34         symbols to relocations against the start of the section.
35
36 2003-11-11  Nick Clifton  <nickc@redhat.com>
37
38         * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
39         info->executable not info->shared to decide if a .interp section
40         should be present.
41         * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
42         * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
43         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
44         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
45         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
46         * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
47         * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
48         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
49         * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
50         * elflink.h (size_dynamic_sections): Likewise.
51
52 2003-11-10  Jonathan Wilson <jonwil@tpgi.com.au>
53
54         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
55         (_bfd_XXi_final_link_postscript): Look for __tks_used symbol.  If
56         found initialise the tls data directory entry.
57
58 2003-11-07  Alan Modra  <amodra@bigpond.net.au>
59
60         * elf32-ppc.c (ppc_elf_install_value): Delete.
61         (shared_stub_entry, stub_entry): Make them arrays of ints.
62         Remove initial branch.
63         (ppc_elf_relax_section): Write one branch around all trampolines
64         instead.  Correct bogus R_PPC_PLTREL24 handling.  Correct
65         branch range check.  Only use shared_stub_entry when shared.
66         Test that branches can reach stubs.  Write trampolines out at
67         end so that just one realloc is used.  Handle little-endian
68         mode.  Move relevant code from ppc_elf_install_value to here.
69         (ppc_elf_relocate_section): Move code handling RELAX32 from
70         ppc_elf_install_value to here.
71
72 2003-11-06  Alan Modra  <amodra@bigpond.net.au>
73
74         * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
75         (ppc_elf_install_value): Handle R_PPC_RELAX32PC.  Merge duplicate
76         cases.
77         (shared_stub_entry): Correct opcode.
78         (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
79         (ppc_elf_relocate_section): Handle them.
80
81 2003-11-05  Alan Modra  <amodra@bigpond.net.au>
82
83         * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
84         updated section in case of merged section.
85         * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
86         * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
87         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
88         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
89         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
90         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
91         * elf32-cris.c (cris_elf_relocate_section): Likewise.
92         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
93         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
94         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
95         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
96         * elf32-i370.c (i370_elf_relocate_section): Likewise.
97         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
98         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
99         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
100         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
101         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
102         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
103         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
104         * elf32-s390.c (elf_s390_relocate_section): Likewise.
105         * elf32-sh.c (sh_elf_relocate_section): Likewise.
106         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
107         * elf32-v850.c (v850_elf_relocate_section) Likewise.
108         * elf32-vax.c (elf_vax_relocate_section): Likewise.
109         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
110         * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
111         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
112         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
113         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
114         * elf64-s390.c (elf_s390_relocate_section): Likewise.
115         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
116         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
117         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
118         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
119
120         * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
121         section for reloc output.
122         * elf32-i370.c (i370_elf_relocate_section): Likewise.
123         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
124         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
125         * elf32-vax.c (elf_vax_relocate_section): Likewise.
126         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
127         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
128
129         * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
130         for R_PPC_RELAX32 reloc.  Don't bother checking ppc_elf_install_value
131         return value.
132         * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
133         sec->id.
134
135 2003-11-05  Alan Modra  <amodra@bigpond.net.au>
136
137         * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
138         (elf32_d10v_relocate_section): Use them to handle -r reloc
139         adjustments, and in place of _bfd_elf_rela_local_sym.
140
141         * cpu-iq2000.c (arch_info_struct): Warning fix.
142
143 2003-11-05  Alan Modra  <amodra@bigpond.net.au>
144
145         * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
146         (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
147         weakdefs.
148         (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
149         (elf32_hppa_adjust_dynamic_symbol): Likewise.  Copy weakdef
150         NON_GOT_REF.
151         (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
152         SYMBOL_CALLS_LOCAL.  Discard relocs for undef weak syms with
153         non-default visibility.
154         (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
155         SYMBOL_CALLS_LOCAL.
156
157 2003-11-04  Alan Modra  <amodra@bigpond.net.au>
158
159         * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
160         * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
161         * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
162         * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
163         * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
164         * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
165         * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
166
167         * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
168         "dereferencing type-punned pointer" warnings.
169
170         * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
171         * aoutx.h (NAME(aout,set_section_contents)): Ditto.
172         * bfd-in2.h: Regenerate.
173         * binary.c (binary_set_section_contents): Ditto.
174         * bout.c (b_out_set_section_contents): Ditto.
175         * coff-tic54x.c (tic54x_set_section_contents): Ditto.
176         * coffcode.h (coff_set_section_contents): Ditto.
177         * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
178         * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
179         * elf.c (_bfd_elf_set_section_contents): Ditto.
180         * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
181         * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
182         * i386msdos.c (msdos_set_section_contents): Ditto.
183         * ieee.c (ieee_set_section_contents): Ditto.
184         * ihex.c (ihex_set_section_contents): Ditto.
185         * libaout.h (NAME(aout,set_section_contents)): Ditto.
186         * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
187         (_bfd_generic_set_section_contents): Ditto.
188         * libbfd.h: Regenerate.
189         * libbfd.c (_bfd_generic_set_section_contents): Ditto.
190         * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
191         * libnlm.h (nlmNAME(set_section_contents)): Ditto.
192         (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
193         * mmo.c (mmo_set_section_contents): Ditto.
194         * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
195         * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
196         * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
197         * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
198         * nlmcode.h (nlm_set_section_contents): Ditto.
199         * oasys.c (oasys_set_section_contents): Ditto.
200         * pdp11.c (NAME(aout,set_section_contents)): Ditto.
201         * ppcboot.c (ppcboot_set_section_contents): Ditto.
202         * srec.c (srec_set_section_contents): Ditto.
203         * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
204         * tekhex.c (tekhex_set_section_contents): Ditto.
205         (move_section_contents): Ditto.
206         * versados.c (versados_set_section_contents): Ditto.
207         * vms-misc.c (_bfd_save_vms_section): Ditto.
208         * vms.c (vms_set_section_contents): Ditto.
209         * vms.h (_bfd_save_vms_section): Ditto.
210
211 2003-11-04  Alan Modra  <amodra@bigpond.net.au>
212
213         * elf64-ppc.c (ppc_size_one_stub): Size relbrlt.  Accept info arg
214         rather than htab.
215         (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal.  Zero
216         relbrlt size.
217         (ppc64_elf_build_stubs): Allocate space for relbrlt.
218
219 2003-11-04  Alan Modra  <amodra@bigpond.net.au>
220
221         * bfd-in.h (_bfd_elf_tls_setup): Declare.
222         * bfd-in2.h: Regenerate.
223         * elf-bfd.h (struct elf_link_tls_segment): Delete.
224         (struct elf_link_hash_table): Add tls_sec and tls_size.
225         * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
226         * elflink.c (_bfd_elf_tls_setup): New function.
227         * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
228         (elf_bfd_final_link): Don't set first_tls_sec here.  Update code
229         saving tls segment info, round segment size up.
230         (elf_link_output_extsym): Adjust code using tls segment info.
231         (elf_link_input_bfd): Likewise.
232         * elf32-i386.c (dtpoff_base, tpoff): Likewise.
233         * elf32-s390.c (dtpoff_base, tpoff): Likewise.
234         * elf32-sh.c (dtpoff_base, tpoff): Likewise.
235         * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
236         * elf64-s390.c (dtpoff_base, tpoff): Likewise.
237         * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
238         * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
239         (elfNN_ia64_dtprel_base): Likewise.
240         * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
241         (alpha_get_tprel_base): Likewise.
242         (struct alpha_relax_info): Remove tls_segment.
243         (elf64_alpha_relax_got_load): Adjust invocation of
244         alpha_get_dtprel_base and alpha_get_tprel_base.
245         (elf64_alpha_relax_tls_get_addr): Likewise.
246         (elf64_alpha_relax_section): Likewise.
247         (elf64_alpha_relocate_section): Likewise.
248         (elf64_alpha_relax_find_tls_segment): Delete.
249         * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
250         (ppc_elf_tls_setup): Call _bfd_elf_tls_setup.  Return section.
251         (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
252         * elf32-ppc.h (ppc_elf_tls_setup): Update.
253         * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
254         (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup.  Return section.
255         (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
256         (ppc64_elf_relocate_section): Likewise.
257         * elf64-ppc.h (ppc64_elf_tls_setup): Update.
258
259 2003-11-03  Daniel Jacobowitz  <drow@mvista.com>
260
261         * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
262         * elf-m10300.c (elf_backend_plt_header_size): Don't define.
263         * elf32-arm.h (elf_backend_plt_header_size): Don't define.
264         * elf32-cris.c (elf_backend_plt_header_size): Don't define.
265         * elf32-i386.c (elf_backend_plt_header_size): Don't define.
266         * elf32-mips.c (elf_backend_plt_header_size): Don't define.
267         * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
268         * elf32-s390.c (elf_backend_plt_header_size): Don't define.
269         * elf32-sh.c (elf_backend_plt_header_size): Don't define.
270         * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
271         * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
272         * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
273         * elf64-mips.c (elf_backend_plt_header_size): Don't define.
274         * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
275         * elf64-s390.c (elf_backend_plt_header_size): Don't define.
276         * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
277         * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
278         * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
279         * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
280         * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
281         * elfxx-target.h (elf_backend_plt_header_size): Don't define
282         or include in target initializer.
283
284 2003-11-03  Andrew Cagney  <cagney@redhat.com>
285
286         * section.c (bfd_set_section_contents): Make the "location" buffer
287         constant.
288         * bfd-in2.h: Re-generate.
289
290 2003-10-30  Andrew Cagney  <cagney@redhat.com>
291
292         * syms.c: Replace "struct symbol_cache_entry" with "struct
293         bfd_symbol".
294         * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
295         * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
296         * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
297         * bfd-in2.h: Re-generate.
298
299 2003-10-30  Jakub Jelinek  <jakub@redhat.com>
300
301         * elfxx-ia64.c: Include objalloc.h, hashtab.h.
302         (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
303         fields.
304         (struct elfNN_ia64_local_hash_table): Remove.
305         (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
306         to htab_t.  Add loc_hash_memory field.
307         (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
308         Removed.
309         (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
310         functions.
311         (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
312         loc_hash_table.  Initialize loc_hash_memory.
313         (elfNN_ia64_hash_table_free): New function.
314         (elfNN_ia64_local_hash_lookup): Remove.
315         (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
316         callback.
317         (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
318         (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
319         (bfd_elfNN_bfd_link_hash_table_free): Define.
320
321 2003-10-30  Alan Modra  <amodra@bigpond.net.au>
322
323         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
324         symbol string in place.
325
326 2003-10-30  Jim Blandy  <jimb@redhat.com>
327
328         * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
329         object's mach field: all PowerPC machines are supersets of the
330         original rs6000, but not later rs6000 machines.
331
332 2003-10-30  Alan Modra  <amodra@bigpond.net.au>
333
334         * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
335         Add "val" and "sval" fields.
336         (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
337         (read_attribute_value): Expand and adjust DW_* occurrences.
338         (scan_unit_for_functions, parse_comp_unit): Likewise.
339
340 2003-10-30  Phil Edwards  <phil@codesourcery.com>
341
342         * config.bfd (arm-*-vxworks):  Remove separate stanza; merge with
343         other common ELF triples.
344         (i[3-7]86-*-vxworks):  Change to ELF format.
345         (mips*-*-windiss):  New triple, add to common MIPS/ELF stanza.
346         (sh-*-vxworks):  New stanza.
347
348 2003-10-30  Lars Knoll  <lars@trolltech.com>
349             Michael Matz  <matz@suse.de>
350             Jakub Jelinek  <jakub@redhat.com>
351             Alan Modra  <amodra@bigpond.net.au>
352
353         * merge.c (struct sec_merge_sec_info): Update comment.
354         (struct sec_merge_hash_entry): Remove entsize.
355         (sec_merge_hash_lookup): Only adjust alignment when creating.
356         (sec_merge_emit): Remove register keyword.
357         (cmplengthentry, last4_eq, last_eq): Delete.
358         (strrevcmp, strrevcmp_align, is_suffix): New.
359         (merge_strings): Use them to implement fast suffix merging.
360         * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
361         Make "len" signed.
362         (_bfd_elf_strtab_add): Lose on >2G strings.
363         (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
364         (cmplengthentry, last4_eq): Delete.
365         (strrevcmp, is_suffix): New.
366         (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
367
368 2003-10-29  Daniel Jacobowitz  <drow@mvista.com>
369
370         * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
371         SEC_ALLOC.
372
373 2003-10-29  Philip Blundell  <philb@gnu.org>
374
375         * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
376         code sequence.
377         (PLT_HEADER_SIZE): New.
378         (struct elf32_arm_pcrel_relocs_copied): Rename to ...
379         (struct elf32_arm_relocs_copied): ... this.  Count both
380         pcrel and non-pcrel relocs.  All uses updated.
381         (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
382         sections and symbol/section mapping cache.
383         (create_got_section): New.
384         (elf32_arm_create_dynamic_sections): New.
385         (elf_backend_create_dynamic_sections): Use it.
386         (elf32_arm_final_link_relocate): Support garbage collection of relocs.
387         (elf32_arm_check_relocs): Likewise.
388         (elf32_arm_adjust_dynamic_symbol): Likewise.
389         (elf32_arm_copy_indirect_symbol): New.
390         (elf32_arm_link_hash_table_create): Initialise new fields.
391         (elf32_arm_gc_sweep_hook): Implement.
392         (elf32_arm_discard_copies): Delete.
393         (elf32_arm_finish_dynamic_symbol): Use new PLT code.
394         (elf32_arm_finish_dynamic_sections): Likewise.
395         (elf_backend_can_refcount): Define.
396         (elf_backend_copy_indirect_symbol): Likewise.
397         (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
398
399 2003-10-29  Alan Modra  <amodra@bigpond.net.au>
400
401         * elf64-ppc.c (elf_backend_grok_prstatus): Define.
402         (elf_backend_grok_psinfo): Define.
403         (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
404
405         * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
406         sections with the same name.
407         (elfcore_grok_lwpstatus): Likewise.
408         (elfcore_grok_win32pstatus): Likewise.
409         (elfcore_grok_note): Likewise.
410         (elfcore_grok_nto_status): Likewise.
411         (elfcore_grok_nto_gregs): Likewise.
412
413 2003-10-27  Daniel Jacobowitz  <drow@mvista.com>
414
415         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
416         objects.
417
418 2003-10-14  Richard Sandiford  <rsandifo@redhat.com>
419
420         * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
421
422 2003-10-24  H.J. Lu  <hongjiu.lu@intel.com>
423
424         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
425         hash table for real symbols.
426
427 2003-10-23  Michael Snyder  <msnyder@redhat.com>
428
429         * section.c (asection): Fix typo in comment.
430
431 2003-10-23  Alan Modra  <amodra@bigpond.net.au>
432
433         * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
434         reloc symbol index to it.  Don't allow gd syms in shared libs
435         to be optimized.
436         (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
437         (ppc64_elf_size_stubs): Likewise.
438         (ppc64_elf_relocate_section): Check that tls relocs are only used
439         with tls syms, and similarly for non-tls.  Correct symbol used
440         when optimizing toc tls code.
441
442 2003-10-22  Nick Clifton  <nickc@redhat.com>
443
444         * peicode.h (coff_swap_scnhdr_in): Only remove padding when
445         processing an executable.
446
447 2003-10-22  Jakub Jelinek  <jakub@redhat.com>
448
449         * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
450         field changes.
451         (_bfd_elf_link_assign_sym_version): Likewise.
452         * elflink.h (size_dynamic_sections): Likewise.
453
454 2003-10-21  Alexandre Oliva  <aoliva@redhat.com>,
455             Michael Snyder  <msnyder@redhat.com>
456
457         * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
458         bfd_mach_sh4a_nofpu): New machine types.
459         * bfd-in2.h: Rebuilt.
460         * cpu-sh.c (compatible): Remove unused function.
461         (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
462         (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
463         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
464
465 2003-10-21  Wouter van Heyst <wouter@vidicode.nl>
466
467         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
468         describing mismatched formats involving the Maverick FP type.
469
470 2003-10-21  Anil Paranjpe  <anilp1@KPITCummins.com>
471
472         * binary.c (binary_object_p): Pass machine flag along with
473         architecture.
474
475 2003-10-21  Thorsten Brehm  <brehm@gmx.net>
476
477         * archures.c (bfd_default_scan): Add support for mcf528x.
478         * ieee.c (ieee_write_processor): Likewise.
479
480 2003-10-21  Peter Barada  <pbarada@mail.wm.sps.mot.com>
481             Bernardo Innocenti  <bernie@develer.com>
482
483         * archures.c: Add MCF528x (MCFv4) support.
484         * bfd/cpu-m68k.c (arch_info_struct): Likewise.
485         * bfd-in2.h: Regenerate.
486
487 2003-10-20  Andrew Cagney  <cagney@redhat.com>
488
489         * targets.c: Replace "struct sec" with "struct bfd_section"
490         * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
491         * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
492         * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
493         * aout-tic30.c, aout-target.h:
494         * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
495
496 2003-10-18  Hans-Peter Nilsson  <hp@bitrange.com>
497
498         Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
499         * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
500         (struct _mmix_elf_section_data): New member pjs.
501         (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
502         functions.
503         (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
504         (mmix_reloc_map): Ditto.
505         (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
506         (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
507         (mmix_elf_perform_relocation): Ditto.  Don't mark parameter addr
508         unused.
509         (mmix_elf_check_relocs): Move early return to after
510         mmix_elf_check_common_relocs call.
511         (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
512         (_bfd_mmix_before_linker_allocation): Rename from
513         _bfd_mmix_prepare_linker_allocated_gregs.  All referers changed.
514         Arrange to set the initial relaxable size of sections.
515         (_bfd_mmix_after_linker_allocation): Rename from
516         _bfd_mmix_finalize_linker_allocated_gregs.
517         (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
518         (bfd_elf64_get_section_contents): Define.
519         * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
520         * libbfd.h, bfd-in2.h: Regenerate.
521
522         * reloc.c (bfd_generic_relax_section): Default-set
523         section->_cooked_size here.
524         (bfd_generic_get_relocated_section_contents): Don't set it here.
525         Explain why.
526
527 2003-10-17  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
528
529         * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
530         output section has been discarded.
531
532 2003-10-17  Shrinivas Atre  <shrinivasa@KPITCummins.com>
533
534         * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
535         (h8300_reloc16_extra_cases): Likewise.
536         (h8300_bfd_link_add_symbols): Likewise.
537
538 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
539
540         * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
541         (h8300sn_info_struct): Likewise.
542         (h8300hn_info_struct): Likewise.
543
544 2003-10-16  Pavel Roskin  <proski@gnu.org>
545
546         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
547         for sections which lack size info.
548
549 2003-10-17  Danny Smith  <dannysmith@users.sourceforge.net>
550
551         * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
552          mingw32.
553
554 2003-10-16  H.J. Lu  <hongjiu.lu@intel.com>
555
556         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
557         undefined patterns with '*'.
558
559 2003-10-16  H.J. Lu  <hongjiu.lu@intel.com>
560
561         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
562         use the last CIE from a different section.
563         (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
564         size of the output section.
565
566 2003-10-07  Roland McGrath  <roland@redhat.com>
567
568         * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
569         new section from p_align header field.
570
571 2003-10-16  H.J. Lu  <hongjiu.lu@intel.com>
572
573         * elf32-xtensa.c (xtensa_read_table_entries): The external size
574         of entry is 8 bytes.
575
576 2003-10-15  Andrew Cagney  <cagney@redhat.com>
577
578         * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
579         with NAME##_canonicalize_symtab.
580         * libcoff-in.h (coff_canonicalize_symtab): Update.
581         * xsym.h (bfd_sym_canonicalize_symtab): Update.
582         * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
583         * coffgen.c (coff_canonicalize_symtab): Update.
584         * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
585         * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
586         * ieee.c (ieee_vec): Update comment.
587         * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
588         * mmo.c (mmo_canonicalize_symtab): Update.
589         * nlm-target.h (nlm_canonicalize_symtab): Update.
590         * nlmcode.h (nlm_canonicalize_symtab): Update.
591         * i386msdos.c (msdos_canonicalize_symtab): Update.
592         * hp300hpux.c (MY (canonicalize_symtab)): Update.
593         * oasys.c (oasys_canonicalize_symtab): Update.
594         * som.c (som_canonicalize_symtab): Update.
595         * pef.c (bfd_pef_canonicalize_symtab): Update.
596         * nlmcode.h (nlm_canonicalize_symtab): Update.
597         * xsym.c (bfd_sym_canonicalize_symtab): Update.
598         * vms.c (vms_canonicalize_symtab): Update.
599         * versados.c (versados_canonicalize_symtab): Update.
600         * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
601         * ieee.c (ieee_canonicalize_symtab): Update.
602         * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
603         * reloc.c: Update comment.
604         * libaout.h (NAME(aout,canonicalize_symtab)): Update.
605         * coff64-rs6000.c (aix5coff64_vec): Update.
606         * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
607         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
608         * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
609         * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
610         * hp300hpux.c (MY_canonicalize_symtab): Update.
611         * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
612         * aout-tic30.c (MY_canonicalize_symtab): Update.
613         * aout-target.h (MY_canonicalize_symtab): Update.
614         * ppcboot.c (ppcboot_canonicalize_symtab): Update.
615         * elf.c (_bfd_elf_canonicalize_symtab): Update.
616         * elfcode.h (elf_canonicalize_symtab): Update.
617         * ihex.c (ihex_canonicalize_symtab): Update.
618         * tekhex.c (tekhex_canonicalize_symtab): Update.
619         * binary.c (binary_canonicalize_symtab): Update.
620         * srec.c (srec_canonicalize_symtab): Update.
621
622 2003-10-15  Kazu Hirata  <kazu@cs.umass.edu>
623
624         * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
625
626 2003-10-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
627
628         * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
629         relocations.
630         (sh_elf_check_relocs): Likewise.
631
632         * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
633         (sh64_elf_merge_symbol_attribute): New.
634         * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
635         (sh64_elf64_merge_symbol_attribute): New.
636
637 2003-10-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
638
639         * elf-bfd.h (struct elf_backend_data): New function pointer member
640         elf_backend_merge_symbol_attribute.
641         * elflink.h (elf_link_add_object_symbols): Adjust call to
642         elf_backend_merge_symbol_attribute if the backend defined it.
643         * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
644         (elfNN_bed): Add that to the initializer.
645
646 2003-10-14  Bob Wilson  <bob.wilson@acm.org>
647
648         * elf32-xtensa.c (get_is_linkonce_section): Delete.
649         (xtensa_is_property_section, xtensa_is_littable_section): Use
650         XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros.  Do not recognize
651         linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
652         (xtensa_get_property_section_name): Check section name instead of
653         calling get_is_linkonce_section.  Remove unused bfd parameter.  Use
654         XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros.  Never generate
655         linkonce section names by appending ".xt.insn" or ".xt.lit".
656         (xtensa_read_table_entries): Remove bfd argument in call to
657         xtensa_get_property_section_name.  Free section name when done.
658         (elf_xtensa_combine_prop_entries): Free leaking table.
659
660 2003-10-13  Richard Sandiford  <rsandifo@redht.com>
661
662         * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
663         DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
664         (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them.  Don't
665         handle DT_MIPS_MSYM.  Set DT_RELSZ based on the number of relocations
666         that were needed.
667         (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
668         (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
669
670 2003-10-13  H.J. Lu  <hongjiu.lu@intel.com>
671
672         * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
673         (bfd_elf64_ia64_after_parse): Likewise.
674         * bfd-in2.h: Regenerated.
675
676         * elfxx-ia64.c (oor_ip): New.
677         (oor_branch_size): Likewise.
678         (bfd_elfNN_ia64_after_parse): Likewise.
679         (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
680         equals sizeof (oor_ip).
681
682 2003-10-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
683
684         * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
685         renumbering of some relocation numbers.
686
687 2003-10-11  Alan Modra  <amodra@bigpond.net.au>
688
689         * coff-sh.c: Move definition of MAP and guard more code with
690         COFF_IMAGE_WITH_PE.
691
692         * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
693         * bfd-in2.h: Regenerate.
694
695 2003-10-10  H.J. Lu  <hongjiu.lu@intel.com>
696
697         * Makefile.am: Run "make dep-am".
698         * Makefile.in: Regenerate.
699         * doc/Makefile.in: Likewise.
700
701 2003-10-09  H.J. Lu  <hongjiu.lu@intel.com>
702
703         * cofflink.c: Include "safe-ctype.h".
704         (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
705
706 2003-10-08  Dave Brolley  <brolley@redhat.com>
707         On behalf of Michael Snyder  <msnyder@redhat.com>
708
709         * archures.c: Add FRV fr550 machine.
710         * cpu-frv.c: Ditto.
711         * elf32-frv.c: Ditto.
712         * bfd-in2.h: Regenerate.
713
714 2003-10-08  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
715
716         * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
717         for non-SGI N64 ABI. Improve code consitency.
718
719 2003-10-07  Alexandre Oliva  <aoliva@redhat.com>
720
721         * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
722         rightshift to 2.
723
724 2003-10-07  Nathan Sidwell  <nathan@codesourcery.com>
725
726         * libbfd-in.h (_bfd_link_section_stabs): Add string offset
727         parameter.
728         * cofflink.c (coff_link_add_symbols): Deal with split stab
729         sections.
730         * elflink.h (elf_link_add_object_symbols): Deal with split stab
731         sections.
732         * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
733         * libbfd.h: Regenerated.
734
735         * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
736         overflow, set reloc start position to after the count
737         reloc. Subtract one from num relocs. Give error on 0xffff relocs
738         and no overflow.
739         * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
740         overflow.
741         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
742         0xffff.
743
744 2003-10-06  H.J. Lu  <hongjiu.lu@intel.com>
745
746         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
747         last CIE/FDE if needed.
748
749 2003-10-06  Nick Clifton  <nickc@redhat.com>
750
751         * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
752         BFD64 is enabled.
753
754 2003-10-06  Matt Thomas <matt@3am-software.com>
755
756         * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
757
758 2003-10-06  Robert Millan  <robertmh@gnu.org>
759
760         * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
761         * config.bfd: Likewise.
762         * configure: Regenerate.
763
764 2003-10-04  Christian Groessler  <chris@groessler.org>
765
766         * coff-z8k.c (extra_case): Fix displacement length check for R_JR
767         and R_CALLR.
768
769 2003-10-04  Stephane Carrez  <stcarrez@nerim.fr>
770
771         * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
772         * elf32-m68hc11.c: Likewise.
773         * elf32-m68hc12.c: Likewise.
774         * elf32-m68hc1x.h: Likewise.
775
776 2003-10-04  Stephane Carrez  <stcarrez@nerim.fr>
777
778         * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
779         of flags between HC12 and HCS12.
780
781 2003-10-04  Bryce McKinlay  <bryce@mckinlay.net.nz>
782
783         * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
784         which become empty after merging.
785
786 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
787
788         * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
789         R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
790
791 2003-09-30  Chris Demetriou  <cgd@broadcom.com>
792
793         * archures.c (bfd_mach_mipsisa64r2): New define.
794         * bfd-in2.h: Regenerate.
795         * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
796         * cpu-mips.c (I_mipsisa64r2): New enum value.
797         (arch_info_struct): Add entry for I_mipsisa64r2.
798         * elfxx-mips.c (_bfd_elf_mips_mach)
799         (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
800         (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
801         (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
802
803 2003-09-29  H.J. Lu  <hongjiu.lu@intel.com>
804
805         * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
806         Handle SHN_IA_64_ANSI_COMMON.
807         (elf_backend_section_from_bfd_section): Defined.
808
809 2003-09-26  H.J. Lu  <hongjiu.lu@intel.com>
810
811         * elflink.c (elf_link_read_relocs_from_section): Add an argument
812         of a pointer to section. Check bad symbol index.
813         (_bfd_elf_link_read_relocs): Modify calls to
814         elf_link_read_relocs_from_section.
815
816 2003-09-23  DJ Delorie  <dj@redhat.com>
817
818         * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
819         R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
820         R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
821         R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
822         R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
823         R_SH_PSHA, R_SH_PSHL added.
824         (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
825         (sh_elf_relocate_section): Support new relocs.
826
827 2003-09-23  Bob Wilson  <bob.wilson@acm.org>
828
829         * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
830         dynamic relocation offsets.
831
832 2003-09-23  Alan Modra  <amodra@bigpond.net.au>
833
834         * simple.c (bfd_simple_get_relocated_section_contents): Free the
835         hash table using _bfd_generic_link_hash_table_free.
836
837 2003-09-23  Alan Modra  <amodra@bigpond.net.au>
838
839         * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix".  Change
840         type of prefix_length and suffix_length to int.  Rename "attributes"
841         to "attr".  Comment.
842         (_bfd_elf_get_sec_type_attr): Update prototype.
843         * elf.c (get_special_section): Rewrite.
844         (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
845         attr and type pointers.
846         (_bfd_elf_new_section_hook): Adjust for above.
847         (special_sections): Merge suffix with prefix.  Set
848         prefix_length for all entries.  Set suffix_length appropriately.
849         * elf32-m32r.c (m32r_elf_special_sections): Likewise.
850         * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
851         * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
852         * elf32-mcore.c (mcore_elf_special_sections): Likewise.
853         * elf32-sh64.c (sh64_elf_special_sections): Likewise.
854         * elf32-v850.c (v850_elf_special_sections): Likewise.
855         * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
856         * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
857         * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
858         * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
859         * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
860         * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
861         * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
862         * elf32-ppc.c (ppc_elf_special_sections): Likewise.  Fix .plt flags.
863
864 2003-09-21  Daniel Jacobowitz  <drow@mvista.com>
865
866         * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
867         ->got if the section already exists.
868
869 2003-09-19  Nathan Sidwell  <nathan@codesourcery.com>
870
871         * dwarf2.c (decode_line_info): Cope with an initially empty
872         filename table.
873
874 2003-09-18  H.J. Lu  <hongjiu.lu@intel.com>
875
876         * acinclude.m4: Include ../config/accross.m4.
877         * aclocal.m4: Regenerated.
878
879         * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
880         or long long.
881         (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
882         (host64): Remove if HOST_64BIT_TYPE is set to long.
883
884         * configure.in (HOST_64BIT_TYPE): Set according to the size of
885         long and long long.
886         (HOST_U_64BIT_TYPE): Likewise.
887         (host64): Likewise.
888         * configure: Regenerated.
889
890 2003-09-19  Alan Modra  <amodra@bigpond.net.au>
891
892         * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
893         since some ABIs round up the size of the struct.
894
895 2003-09-18  H.J. Lu  <hongjiu.lu@intel.com>
896
897         * elflink.c (_bfd_elf_merge_symbol): Allow type change if
898         the old symbol is undefined and the new symbol is defined.
899
900 2003-09-18  Andreas Schwab  <schwab@suse.de>
901
902         * simple.c (bfd_simple_get_relocated_section_contents): Use
903         _bfd_generic_link_hash_table_create instead of
904         bfd_link_hash_table_create.
905
906 2003-09-10  H.J. Lu  <hongjiu.lu@intel.com>
907
908         * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
909         started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
910
911 2003-09-10  John David Anglin   <dave.anglin@nrc-cnrc.nrc.ca>
912             Randolph Chung      <randolph@tausq.org>
913
914         * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
915         hppa_link_hash_newfunc, hppa_build_one_stub,
916         elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
917         allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
918         elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
919         for generating import stubs for calls to statically linked PIC
920         functions.
921         (hppa_type_of_stub): Don't generate an import stub for calls to
922         statically linked pic functions.  Generate import stubs for calls
923         in a shared object, to functions not in a regular file, and to
924         defined weak functions.  Add new argument INFO.
925         (hppa_build_one_stub): Don't undef ADDIL_DP.
926         (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
927         (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
928         (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
929         non-shared link.  Convert instructions that use the the linkage table
930         pointer, or a facsimile thereof, to use the global data pointer when
931         the reloc has been changed.
932
933 2003-09-08  Joel Brobecker  <brobecker@gnat.com>
934
935         * archures.c: Add new machine names for hppa.
936         * bfd-in2.h: Regenerate.
937         * cpu-hppa.c: Use the new machine names.
938
939 2003-09-06  Stephane Carrez  <stcarrez@nerim.fr>
940
941         * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
942         all_local_syms member.
943         * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
944         to get the local symbols.
945
946 2003-09-06  Stephane Carrez  <stcarrez@nerim.fr>
947
948         * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
949         (elf_backend_special_sections): Define.a
950
951         PR savannah/4950:
952         * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
953         section is read-only.
954
955 2003-09-04  Nick Clifton  <nickc@redhat.com>
956
957         * archures.c (bfd_mach_v850e1): Define.
958         * bfd-in2.h: Regenerate.
959         * cpu-v850.h (scan): Accept bfd_mach_v850e1.
960         (arch_info_struct): Include an entry for bfd_mach_v850e1.
961         * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
962         (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
963         (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
964         (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
965         linked with v850e binaries.  Mark the output as v850e.
966
967 2003-09-03  Nick Clifton  <nickc@redhat.com>
968
969         * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
970         symbols that are used in relocs.
971
972 2003-08-30  Robert Millan  <robertmh@gnu.org>
973
974         * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
975         * config.bfd: Likewise.
976         * configure: Regenerate.
977
978 2003-08-31  Christian Groessler  <chris@groessler.org>
979
980         * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
981         instead of returning bfd_reloc_continue.
982
983 2003-08-31  Andreas Jaeger  <aj@suse.de>
984
985         * merge.c: Update to ISO C90.
986
987 2003-08-27  Ian Lance Taylor  <ian@airs.com>
988
989         * configure.in: Check for strtoull.
990         * bfd.c (bfd_scan_vma): Use strtoull when available.
991         * configure, config.in: Regenerate.
992
993         * configure.in: Define and substitute BFD_HOST_LONG_LONG.
994         * bfd-in.h: Define BFD_HOST_LONG_LONG.  Test it rather than
995         __GNUC__ when deciding whether to use long long for
996         BFD_HOST_64_BIT.
997         * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
998
999 2003-08-27  Christian Groessler  <chris@groessler.org>
1000
1001         * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1002         i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1003         functions.
1004         (elf32_i860_howto_table): Insert the new functions as
1005         'special_function's in the proper reloc type entries.
1006
1007 2003-08-27  Richard Sandiford  <rsandifo@redhat.com>
1008
1009         * elf32-frv.c (elf32_frv_relocate_section): Use
1010         _bfd_elf_rela_local_sym.
1011
1012 2003-08-26  Michael Snyder  <msnyder@redhat.com>
1013
1014         * cpu-frv.c: Remove unused enum.
1015
1016 2003-08-25  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
1017
1018         * reloc.c: Fix documentation for MIPS ELF relocations.
1019         libbfd.h: Regenerate.
1020         bfd-in2.h: Regenerate.
1021
1022 2003-08-24  Jason Eckhardt  <jle@rice.edu>
1023
1024         * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1025
1026 2003-08-24  Jason Eckhardt  <jle@rice.edu>
1027
1028         * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1029         shift by 2 before storing the relocated value.
1030
1031 2003-08-23  Jason Eckhardt  <jle@rice.edu>
1032
1033         * coff-i860.c (coff_i860_reloc_nyi): New function.
1034         (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1035         LOWn, SPLITn, and BRADDR.
1036         (RTYPE2HOWTO): Check that the r_type is within the howto_table
1037         before trying to access the entry.
1038         (coff_i860_rtype_to_howto): Likewise.
1039         (coff_i860_reloc_type_lookup): New function.
1040         (i860_reloc_processing): New function.
1041         (coff_bfd_reloc_type_lookup): Define macro.
1042         (RELOC_PROCESSING): Define macro.
1043         Minor formatting adjustments.
1044
1045 2003-08-23  Alan Modra  <amodra@bigpond.net.au>
1046
1047         * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1048
1049 2003-08-22  H.J. Lu  <hongjiu.lu@intel.com>
1050
1051         * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1052         .got section at 8 bytes.
1053
1054 2003-08-21  Nick Clifton  <nickc@redhat.com>
1055
1056         * cofflink.c: Update to ISO C90 and tidy up formatting.
1057
1058 2003-08-21  Randolph Chung  <tausq@debian.org>
1059
1060         * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1061         can have OSABI=Linux or OSABI=SysV.  Check for both.
1062         * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1063
1064 2003-08-21  Nick Clifton  <nickc@redhat.com>
1065
1066         * po/sv.po: Updated Swedish translation.
1067
1068 2003-08-20  Richard Sandiford  <rsandifo@redhat.com>
1069
1070         * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1071
1072 2003-08-20  Nick Clifton  <nickc@redhat.com>
1073
1074         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1075         replace some duplicated code in most elfxx-xxxx.c files.  This
1076         version uses the new fields in bfd_link_info.
1077
1078         * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1079         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1080         * elf32-cris.c (cris_elf_relocate_section): Likewise.
1081         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1082         * elf32-i386.c (elf_i386_relocate_section): Likewise.
1083         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1084         * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1085         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1086         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1087         * elf32-s390.c (elf_s390_relocate_section): Likewise.
1088         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1089         * elf32-vax.c (elf_vax_relocate_section): Likewise.
1090         * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1091         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1092         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1093         * elf64-s390.c (elf_s390_relocate_section): Likewise.
1094         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1095         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1096         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1097
1098         * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1099         elf_hppa_remark_useless_dynamic_symbols,
1100         elf_hppa_relocate_section): Use the new fields in
1101         bfd_link_info structure.
1102         * elf32-sh.c (sh_elf_relocate_section): Likewise.
1103         * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1104         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1105         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1106         * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1107         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1108
1109         * elflink.h (elf_link_output_extsym): Fix test for reporting
1110         undefined symbols in shared libraries.  Remove redundant test
1111         of shlib_undefined when reporting references to forced local
1112         symbols.
1113
1114 2003-08-18  Andreas Schwab  <schwab@suse.de>
1115
1116         * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1117         executables.
1118
1119 2003-08-17  Hans-Peter Nilsson  <hp@bitrange.com>
1120
1121         * simple.c (bfd_simple_get_relocated_section_contents): Move
1122         reloc_done hack to before first bfd_section_size call.  Change all
1123         returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1124
1125 2003-08-16  Alan Modra  <amodra@bigpond.net.au>
1126
1127         * elf64-ppc.c: Don't include elf/ppc.h.
1128
1129 2003-08-14  Richard Sandiford  <rsandifo@redhat.com>
1130
1131         * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1132         code to work with 64-bit bfds.
1133
1134 2003-08-14  Alan Modra  <amodra@bigpond.net.au>
1135
1136         * dep-in.sed: Remove libintl.h.
1137         * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1138         (POTFILES.in): Remove target.
1139         * Makefile.in: Regenerate.
1140
1141 2003-08-12  Alan Modra  <amodra@bigpond.net.au>
1142
1143         * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1144         (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1145         use the function sym from the previous reloc.
1146
1147 2003-08-11  Jakub Jelinek  <jakub@redhat.com>
1148
1149         * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1150         fatal if -pie.
1151         * elf32-s390.c (elf_s390_relocate_section): Likewise.
1152         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1153         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1154         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1155         * elf64-s390.c (elf_s390_relocate_section): Likewise.
1156         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1157         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1158         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1159         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1160         (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1161         on undefined symbols if -pie.
1162         * elf32-sh.c (sh_elf_relocate_section): Likewise.
1163
1164 2003-08-11  Alan Modra  <amodra@bigpond.net.au>
1165
1166         * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1167         branch to __libc_start_main.
1168
1169 2003-08-08 Dmitry Diky <diwil@mail.ru>
1170
1171         * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1172         gcc order.
1173         * cpu-msp430.c: Likewise.
1174         * elf32-msp430.c: Likewise.
1175         * bfd-in2.h: Regenerate.
1176
1177 2003-08-07  Alan Modra  <amodra@bigpond.net.au>
1178
1179         * elfxx-target.h: Remove PTR cast.
1180         * targets.c (bfd_target): Make backend_data const void *.
1181         * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1182         * elf-m10300.c: Likewise.
1183         * elf.c: Likewise.
1184         * elf32-hppa.c: Likewise.
1185         * elf32-i386.c: Likewise.
1186         * elf32-m68hc1x.c: Likewise.
1187         * elf32-ppc.c: Likewise.
1188         * elf32-s390.c: Likewise.
1189         * elf32-sh.c: Likewise.
1190         * elf32-sh64.c: Likewise.
1191         * elf32-sparc.c: Likewise.
1192         * elf32-xtensa.c: Likewise.
1193         * elf64-mips.c: Likewise.
1194         * elf64-ppc.c: Likewise.
1195         * elf64-s390.c: Likewise.
1196         * elf64-sh64.c: Likewise.
1197         * elf64-sparc.c: Likewise.
1198         * elf64-x86-64.c: Likewise.
1199         * elfcode.h: Likewise.
1200         * elfcore.h: Likewise.
1201         * elflink.c: Likewise.
1202         * elflink.h: Likewise.
1203         * elfxx-ia64.c: Likewise.
1204         * elfxx-mips.c: Likewise.
1205         * elfxx-mips.h: Likewise.
1206         * elf.c (prep_headers): Remove useless check for null backend_data.
1207         * bfd-in2.h: Regenerate.
1208
1209         * elf-bfd.h: Remove PARAMS macro.  Replace PTR with void *.
1210         (NAME): Use ## rather than CONCAT4 macro.
1211         * elfcode.h: Remove one remaining PARAMS macro.
1212         * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1213         * elf-strtab.c: Likewise.
1214         * elf-hppa.h: Likewise.
1215         * elf32-hppa.h: Likewise.
1216         * elf32-hppa.c: Likewise.
1217         (elf32_hppa_add_symbol_hook): Delete.
1218         (elf_backend_add_symbol_hook): Don't define.
1219         * libhppa.h: Convert to C90.  Replace INLINE with inline.
1220
1221 2003-08-06  Alan Modra  <amodra@bigpond.net.au>
1222
1223         * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1224         (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1225         function descriptors, but warn.
1226         (ppc_build_one_stub): Remove a couple of vars.  Move code creating
1227         stub syms so that we can avoid a stub sym if we already have a
1228         plt sym.  Do not redefine an existing symbol.
1229         (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1230         glink.
1231
1232 2003-08-06  Nick Clifton  <nickc@redhat.com>
1233
1234         * po/fr.po: Updated French translation.
1235
1236 2003-08-06  Alan Modra  <amodra@bigpond.net.au>
1237
1238         * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1239         SEC_LINKER_CREATED.
1240
1241 2003-08-05  Daniel Jacobowitz  <drow@mvista.com>
1242
1243         * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1244         (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1245
1246 2003-08-03  Jeff Muizelaar  <muizelaar@rogers.com>
1247
1248         * coffcode.h (coff_slurp_line_table): Return with a warning
1249         message if the line number table could not be read.
1250
1251 2003-08-04  Nick Clifton  <nickc@redhat.com>
1252
1253         * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1254         to messages produced for .gnu.warning.SYMBOL sections.
1255
1256 2003-08-04  Alan Modra  <amodra@bigpond.net.au>
1257
1258         * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1259         * elfcore.h: Likewise.
1260         * elflink.c: Likewise.
1261         * elflink.h: Likewise.
1262         * elf.c (sym_is_global): Remove INLINE.
1263         (align_file_position): Replace INLINE with inline.
1264         * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1265         (elf_file_p): Replace INLINE with inline.
1266
1267 2003-08-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1268
1269         * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1270
1271 2003-08-01  H.J. Lu  <hongjiu.lu@intel.com>
1272
1273         * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1274
1275 2003-08-01  H.J. Lu  <hongjiu.lu@intel.com>
1276
1277         * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1278         ElfNN_External_Rela instead of Elf64_External_Rela.
1279
1280 2003-08-01  Nick Clifton  <nickc@redhat.com>
1281
1282         * config.bfd: Add code to catch obsolete configurations and warn
1283         about them unless --enable-obsolete is used.  Use this to mark
1284         vax-vms port as obsolete.
1285
1286 2003-07-30  Alan Modra  <amodra@bigpond.net.au>
1287
1288         * elf32-ppc.c (ppc_elf_install_value): Tidy.
1289         (ppc_elf_relax_section): Remove dead code.  Remove unnecessary casts.
1290         Formatting.
1291         * elfxx-target.h: Remove PARAMS macro.  Formatting.
1292
1293 2003-07-30  Alan Modra  <amodra@bigpond.net.au>
1294
1295         * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1296         * elf64-ppc.c (get_fdh): New function, split out from
1297         ppc64_elf_edit_opd.
1298         (ppc64_elf_check_relocs): Use get_fdh.
1299         (func_desc_adjust): Likewise.  Tidy.
1300         (ppc64_elf_edit_opd): Tighten reloc checks.  Free local_syms on error
1301         exit.  Use get_fdh.  Account for superfluous dynamic relocs.
1302         (ppc64_elf_relocate_section): Warning fix.
1303
1304 2003-07-30  Jason Eckhardt  <jle@rice.edu>
1305
1306         * coff-i860.c: Convert to ISO C90.  Remove superflous prototypes.
1307
1308 2003-07-30  Jason Eckhardt  <jle@rice.edu>
1309
1310         * elf32-i860.c: Convert to ISO C90.  Remove superflous prototypes.
1311
1312 2003-07-30  Randolph Chung  <tausq@debian.org>
1313
1314         * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1315         * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1316
1317 2003-07-30  Alan Modra  <amodra@bigpond.net.au>
1318
1319         * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1320         Replace PTR with void *.  Formatting.
1321         (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1322         (make_mapping): Likewise.
1323
1324 2003-07-29  Alan Modra  <amodra@bigpond.net.au>
1325
1326         * elf64-ppc.c (func_desc_adjust): Give linker created function
1327         descriptor symbols a size and type.
1328         (ppc64_elf_relocate_section): Correct lq insn test.
1329
1330 2003-07-28  Eric Christopher  <echristo@redhat.com>
1331
1332         * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1333         (ppc_elf_install_value): New function.
1334         (ppc_elf_sort_rela): Remove.
1335         (ppc_elf_relax_section): Rewrite. Remove old relaxation
1336         and replace with out of range branch stubs.
1337         (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1338
1339 2003-07-29  Alexandre Oliva  <aoliva@redhat.com>
1340
1341         * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1342         from input_bfd.
1343
1344 2003-07-28  Alan Modra  <amodra@bigpond.net.au>
1345
1346         * elf.c (special_sections): Set attributes for .got and .plt.
1347
1348 2003-07-27  Alan Modra  <amodra@bigpond.net.au>
1349
1350         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1351         on function descriptors.
1352         (ELIMINATE_COPY_RELOCS): Expand comment.
1353         (ppc64_elf_special_sections): Move.  Don't include non-ppc64 sections.
1354         Do include ".toc1".
1355
1356 2003-07-25  H.J. Lu  <hongjiu.lu@intel.com>
1357
1358         * elf.c (_bfd_elf_new_section_hook): Set the default section
1359         type to SHT_NULL.
1360         (elf_fake_sections): Set the section type based on asect->flags
1361         if it is SHT_NULL. Don't abort on processor specific section
1362         types.
1363
1364 2003-07-25  H.J. Lu  <hongjiu.lu@intel.com>
1365
1366         * bfd-in2.h: Regenerated.
1367
1368 2003-07-25  H.J. Lu  <hongjiu.lu@intel.com>
1369
1370         * elf-bfd.h (bfd_elf_special_section): New.
1371         (elf_backend_data): Add special_sections, a pointer to
1372         bfd_elf_special_section.
1373         (elf_section_type). New.
1374         (elf_section_flags): New.
1375         (_bfd_elf_get_sec_type_attr): New.
1376
1377         * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1378         real section type/flags.
1379         (special_sections): New.
1380         (get_special_section): New.
1381         (_bfd_elf_get_sec_type_attr): New.
1382         (_bfd_elf_new_section_hook): Check special_section to set
1383         elf_section_type and elf_section_flags.
1384         (elf_fake_sections): Don't use section name to set ELF section
1385         data.
1386
1387         * elf32-m32r.c (m32r_elf_special_sections): New.
1388         (elf_backend_special_sections): Defined.
1389
1390         * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1391         (elf_backend_special_sections): Defined.
1392
1393         * elf32-mcore.c (mcore_elf_special_sections): New.
1394         (elf_backend_special_sections): Defined.
1395
1396         * elf32-ppc.c (ppc_elf_special_sections): New.
1397         (elf_backend_special_sections): Defined.
1398
1399         * elf32-sh64.c (sh64_elf_special_sections): New.
1400         (elf_backend_special_sections): Defined.
1401
1402         * elf32-v850.c (v850_elf_special_sections): New.
1403         (elf_backend_special_sections): Defined.
1404
1405         * elf32-xtensa.c (elf_xtensa_special_sections): New.
1406         (elf_backend_special_sections): Defined.
1407
1408         * elf64-alpha.c (elf64_alpha_special_sections): New.
1409         (elf_backend_special_sections): Defined.
1410
1411         * elf64-hppa.c (elf64_hppa_special_sections): New.
1412         (elf_backend_special_sections): Defined.
1413
1414         * elf64-ppc.c (ppc64_elf_special_sections): New.
1415         (elf_backend_special_sections): Defined.
1416
1417         * elf64-sh64.c (sh64_elf64_special_sections): New.
1418         (elf_backend_special_sections): Defined.
1419
1420         * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1421         (elf_backend_special_sections): Defined.
1422
1423         * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1424
1425         * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1426         (elf_backend_special_sections): Defined.
1427
1428         * elfxx-target.h (elf_backend_special_sections): New. Default
1429         to NULL.
1430         (elfNN_bed): Initialize special_sections.
1431
1432         * section.c (bfd_abs_section): Remove const.
1433         (bfd_und_section): Likewise.
1434         (bfd_com_section): Likewise.
1435         (bfd_ind_section): Likewise.
1436
1437 2003-07-24  Nick Clifton  <nickc@redhat.com>
1438
1439         * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1440         sections are assigned the LOAD attribute.
1441
1442 2003-07-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1443
1444         * elf32-sh.c: Convert to C90.  Replace PTR with void *.
1445         * elf32-sh64-com.c: Likewise.
1446         * elf32-sh64.c: Likewise.
1447         * elf32-sh64.h: Likewise.
1448         * elf64-sh64.c: Likewise.
1449
1450 2003-07-24  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1451
1452         * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1453         (allocate_dynrelocs): Likewise.
1454         (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1455         (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1456
1457 2003-07-24  Nick Clifton  <nickc@redhat.com>
1458
1459         * po/fr.po: Updated French translation.
1460
1461 2003-07-23  Bob Wilson  <bob.wilson@acm.org>
1462
1463         * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1464         near the beginning of the file.  Swap order of arguments.  Call
1465         _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1466         (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1467         (elf_xtensa_relocate_section): Likewise.
1468         (shrink_dynamic_reloc_sections): Likewise.
1469
1470 2003-07-23  Bob Wilson  <bob.wilson@acm.org>
1471
1472         * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1473         (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1474         (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1475         first printing an error message.
1476         (elf_xtensa_finish_dynamic_sections): Likewise.
1477         (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1478         discarding literal table entries.
1479         (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1480         (elf_xtensa_do_asm_simplify): Likewise.
1481
1482 2003-07-23  Stephane Carrez  <stcarrez@nerim.fr>
1483
1484         * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1485         we have a local symbol in common section.
1486
1487 2003-07-22  H.J. Lu <hongjiu.lu@intel.com>
1488
1489         * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1490         weak symbols.
1491
1492 2003-07-22  Nick Clifton  <nickc@redhat.com>
1493
1494         * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1495         expected RS6000 storage classes.
1496
1497 2003-07-21  H.J. Lu <hongjiu.lu@intel.com>
1498
1499         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1500         output_bfd unused to silence gcc.
1501
1502 2003-07-21  Nick Clifton  <nickc@redhat.com>
1503
1504         * po/sv.po: Updated Swedish translation.
1505
1506 2003-07-21  Alan Modra  <amodra@bigpond.net.au>
1507
1508         * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1509         (_bfd_elf_symbol_refs_local_p): ..this.  Declare.
1510         * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1511         * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1512         now done in _bfd_elf_symbol_refs_local_p.
1513         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1514         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1515         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1516
1517 2003-07-18  H.J. Lu <hongjiu.lu@intel.com>
1518
1519         * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1520
1521 2003-07-18  H.J. Lu <hongjiu.lu@intel.com>
1522
1523         * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1524         (SYMBOL_CALLS_LOCAL): Likewise.
1525
1526         * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1527         immediately if symbol isn't defined locally.
1528
1529 2003-07-18  Richard Henderson  <rth@redhat.com>
1530
1531         * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1532         * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1533         (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1534         * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1535         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1536         * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1537         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1538         Update all callers to provide the relocation being resolved.
1539
1540 2003-07-17  Shaun Jackman <sjackman@pathwayconnect.com>
1541
1542         * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1543         targ_cflags.
1544
1545 2003-07-17  Nick Clifton  <nickc@redhat.com>
1546
1547         * po/es.po: New Spanish translation.
1548         * po/sv.po: New Swedish translation.
1549         * po/opcodes.pot: Regenerate.
1550
1551 2003-07-16  Richard Henderson  <rth@redhat.com>
1552
1553         * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1554         * elfxx-ia64.c, targets.c: Likewise.
1555
1556 2003-07-16  Richard Henderson  <rth@redhat.com>
1557
1558         * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1559         for symbols defined locally plus -Bsymbolic.  Tidy logic.
1560
1561 2003-07-15  Richard Sandiford  <rsandifo@redhat.com>
1562
1563         * archures.c (bfd_mach_mips7000): New.
1564         * bfd-in2.h: Regenerated.
1565         * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1566         * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1567         (mips_mach_extensions): Add an entry for it.
1568
1569 2003-07-14  Nick Clifton  <nickc@redhat.com>
1570
1571         * po/tr.po: Update with latest version.
1572         * po/SRC-POTFILES.in: Regenerate.
1573         * po/bfd.pot: Regenerate.
1574         * Makfile.in: Regenerate.
1575         * configure: Regenerate.
1576
1577 2003-07-12  Jeff Baker  <jbaker@qnx.com>
1578
1579         * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1580         * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1581         * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1582         * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1583
1584 2003-07-12  Jeff Muizelaar  <muizelaar@rogers.com>
1585
1586         * coffcode.h (coff_set_section_contents): Set the
1587         IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1588
1589 2003-07-11  Richard Sandiford  <rsandifo@redhat.com>
1590
1591         * bfd-in.h (bfd_h8300_pad_address): Declare.
1592         * bfd-in2.h: Regenerate.
1593         * cpu-h8300.c (bfd_h8300_pad_address): New function.
1594         * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1595         addresses before checking whether they can be relaxed.
1596         (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1597         Don't complain about overflows in general 8-bit relocations.
1598         * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1599         Fix handling of R_H8_DIR24A8.
1600
1601 2003-07-11  Richard Sandiford  <rsandifo@redhat.com>
1602
1603         * elf32-h8300.c: Convert function prototypes and definitions
1604         to C90 syntax.
1605         * coff-h8300.c: Likewise.
1606         * cpu-h8300.c: Likewise.
1607
1608 2003-07-11  Alan Modra  <amodra@bigpond.net.au>
1609
1610         * po/SRC-POTFILES.in: Regenerate.
1611         * po/bfd.pot: Likewise.
1612
1613 2003-07-10  Bob Wilson  <bob.wilson@acm.org>
1614
1615         * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1616         .got.loc section.  Do not set SEC_ALLOC or SEC_LOAD flags for the
1617         .xt.lit.plt section.
1618         (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1619         and allocate memory for it.
1620         (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1621         section to the .got.loc section.
1622         (elf_xtensa_finish_dynamic_sections): Fix up call to
1623         elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1624         the address of .got.loc.
1625         (relax_property_section): Shrink .got.loc to match changes in any
1626         literal table section.
1627         (xtensa_is_property_section): Change to match
1628         xtensa_get_property_section_name.
1629         (xtensa_is_littable_section): New.
1630
1631 2003-07-10  H.J. Lu <hongjiu.lu@intel.com>
1632
1633         * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1634         -1LL.
1635
1636 2003-07-10  Alan Modra  <amodra@bigpond.net.au>
1637
1638         * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1639         (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1640         Run "make dep-am".
1641         * Makefile.in: Regenerate.
1642
1643 2003-07-10  Alexandre Oliva  <aoliva@redhat.com>
1644
1645         2001-09-12  Alexandre Oliva  <aoliva@redhat.com>
1646         * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1647         (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1648         2001-06-02  Nick Clifton  <nickc@cambridge.redhat.com>
1649         * elf32-am33lin.c: Rename global functions.
1650         2001-05-09  Alexandre Oliva  <aoliva@redhat.com>
1651         * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1652         * configure.in (bfd_elf32_am33lin_vec): Added.
1653         * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1654         (elf32-am33lin.lo): List dependencies.
1655         * aclocal.m4, configure, Makefile.in: Rebuilt.
1656         * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1657         ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1658         ELF_ARCH was not defined before.
1659         (elf_symbol_leading_char): Define if not defined.
1660         * elf32-am33lin.c: Override the definitions above.
1661         * targets.c (bfd_elf32_am33lin_vec): New.
1662
1663 2003-07-09  Alexandre Oliva  <aoliva@redhat.com>
1664
1665         2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
1666         * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1667         pcrel_relocs_copied.
1668         2001-12-13  Alexandre Oliva  <aoliva@redhat.com>
1669         * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1670         ld-linux.so.2 to ld.so.1.
1671         2001-10-10  Alexandre Oliva  <aoliva@redhat.com>
1672         * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1673         (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1674         (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1675         * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1676         .rela.* section contents with bfd_zalloc.
1677         2001-09-25  Alexandre Oliva  <aoliva@redhat.com>
1678         * elf-m10300.c: Added declarations for functions missing them.
1679         Merge some shared-library changes from the i386 back-end.  Use
1680         R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1681         R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1682         (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1683         members of elf_link_hash_entry.  Adjusted references.
1684         (mn10300_elf_final_link_relocate): dynobj was already loaded
1685         into a local variable, use it.
1686         2001-09-21  Nick Clifton  <nickc@cambridge.redhat.com>
1687         * elf-m10300.c: Add missing function prototypes.
1688         2001-08-24  Alexandre Oliva  <aoliva@redhat.com>
1689         * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1690         relocation for dynamic relocations.
1691         2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
1692         * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1693         * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1694         PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1695         (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1696         (_bfd_mn10300_elf_create_got_section): ... here, so that its
1697         adress is already known at the time we compute relaxations.
1698         (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1699         and PLT32 to narrower relocations.
1700         * libbfd.h, bfd-in2.h: Rebuilt.
1701         2001-04-12  Alexandre Oliva  <aoliva@redhat.com>
1702         * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1703         BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1704         BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1705         BFD_RELOC_MN10300_RELATIVE): New relocs.
1706         * libbfd.h, bfd-in2.h: Rebuilt.
1707         * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1708         (struct elf32_mn10300_link_hash_entry): Added DSO-related
1709         fields.
1710         (elf_mn10300_howto): Defined new relocation types.
1711         (mn10300_reloc_map): Map them.
1712         (_bfd_mn10300_elf_create_got_section): New fn.
1713         (mn10300_elf_check_relocs): Handle PIC relocs.
1714         (mn10300_elf_final_link_relocate): Likewise.
1715         (mn10300_elf_relocate_section): Handle DSOs.
1716         (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1717         (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1718         elf_mn10300_pic_plt_entry): New.
1719         (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1720         elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1721         elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1722         elf_mn10300_plt_reloc_offset: New macros.
1723         (ELF_DYNAMIC_INTERPRETER): Likewise.
1724         (_bfd_mn10300_elf_create_dynamic_sections): New function.
1725         (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1726         (_bfd_mn10300_elf_discard_copies): Likewise.
1727         (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1728         (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1729         (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1730         (elf_backend_can_gc_sections,
1731         elf_backend_create_dynamic_sections,
1732         elf_backend_adjust_dynamic_sections,
1733         elf_backend_size_dynamic_sections,
1734         elf_backend_finish_dynamic_symbol,
1735         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1736         elf_backend_plt_readonly, elf_backend_want_plt_sym,
1737         elf_backend_got_header_size, elf_backend_plt_header_size): New
1738         macros.
1739
1740 2003-07-09  Alexandre Oliva  <aoliva@redhat.com>
1741
1742         2001-05-06  Alexandre Oliva  <aoliva@redhat.com>
1743         * elf-m10300.c (compute_function_info): Account for AM33
1744         registers in `movm' when computing stack space for `call' when
1745         linking for AM33/2.0 link.
1746         2000-04-01  Alexandre Oliva  <aoliva@cygnus.com>
1747         * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1748         * bfd-in2.h: Rebuilt.
1749         * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1750         * elf-m10300.c: Updated.
1751         2000-03-31  Alexandre Oliva  <aoliva@cygnus.com>
1752         * archures.c (bfd_mach_am332): Defined.
1753         * bfd-in2.h: Rebuilt.
1754         * cpu-m10300.c (bfd_am332_arch): Defined.
1755         (bfd_am33_arch): Chained with am33-2.
1756         * elf-m10300.c (elf_mn10300_mach): Handle am332.
1757         (_bfd_mn10300_elf_final_write_processing): Likewise.
1758
1759 2003-07-09  H.J. Lu <hongjiu.lu@intel.com>
1760
1761         * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1762
1763 2003-07-10  Alan Modra  <amodra@bigpond.net.au>
1764
1765         * elf64-ppc.c (bfd_elf64_mkobject): Define.
1766         (struct ppc64_elf_obj_tdata): New.
1767         (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1768         (ppc64_elf_mkobject): New function.
1769         (struct got_entry): Add "owner".  Move "tls_type".
1770         (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1771         (ppc64_elf_init_stub_bfd): New function.
1772         (create_got_section): Create header .got in dynobj.  Create .got
1773         and .rela.got in each bfd.  Stash pointers in ppc64_elf_obj_tdata.
1774         (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1775         Look for dynobj .got, and test it.
1776         (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1777         (update_local_sym_info): Likewise.
1778         (ppc64_elf_check_relocs): Likewise.
1779         (ppc64_elf_gc_sweep_hook): Likewise.
1780         (ppc64_elf_tls_optimize): Likewise.
1781         (allocate_dynrelocs): Likewise.
1782         (ppc64_elf_size_dynamic_sections): Likewise.
1783         (ppc64_elf_relocate_section): Likewise.
1784         (ppc64_elf_next_toc_section): Update comment.
1785         (toc_adjusting_stub_needed): Remove unneeded cast.
1786         (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1787         testing section flags.
1788         (ppc64_elf_build_stubs): Likewise.
1789         (ppc64_elf_size_stubs): Likewise.  Remove stub_bfd param.
1790         (ppc64_elf_finish_dynamic_sections): Write out got sections.
1791         (func_desc_adjust): Copy over dynamic info for undef weaks.
1792         * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1793         (ppc64_elf_size_stubs): Update prototype.
1794         * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1795         input sections rather than scanning dynobj.
1796
1797 2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
1798
1799         * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1800         (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1801         (mips_elf_create_msym_section): Delete.
1802         (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1803         (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1804         (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1805         (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1806         (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1807         (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1808         (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1809
1810 2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
1811
1812         * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1813         symbols protected.
1814
1815 2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
1816
1817         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1818         of relocations whose offset is -2.
1819
1820 2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
1821
1822         * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1823         forced-local symbols like other locals.  Don't create relocations
1824         against STN_UNDEF in irix objects.
1825
1826 2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
1827
1828         * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1829         compatible objects, add the values of defined external symbols
1830         to the addend.
1831
1832 2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
1833
1834         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1835         initialize a GOT entry to the symbol's st_value.
1836
1837 2003-07-08  Alan Modra  <amodra@bigpond.net.au>
1838
1839         * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1840         * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here.  New.
1841         (ppc_elf_tdata): Define.
1842         (elf_local_ptr_offsets): Adjust.
1843         (ppc_elf_mkobject): New function.
1844         (bfd_elf32_mkobject): Define.
1845
1846         * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1847         * elfcore.h (elf_core_file_p): Likewise.
1848         * section.c (bfd_section_init): Remove prototype.
1849
1850 2003-07-08  Alan Modra  <amodra@bigpond.net.au>
1851
1852         * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1853         field.
1854         (enum elf_linker_section_enum): Delete.
1855         (struct elf_linker_section): Delete.
1856         (struct elf_linker_section_pointers): Delete.
1857         (struct elf_obj_tdata): Remove #if 0 chunk.  Remove linker_section.
1858         Make linker_section_pointers a void**.
1859         (elf_local_ptr_offsets, elf_linker_section): Don't define.
1860         * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1861         of old item in elf-bfd.h.
1862         (struct elf_linker_section): Likewise.
1863         (struct elf_linker_section_pointers): Likewise.
1864         (elf_local_ptr_offsets): Define.
1865         (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1866         (ppc_elf_link_hash_newfunc): Init it.
1867         (struct ppc_elf_link_hash_table): Add sbss.
1868         (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1869         individual fields.
1870         (elf_create_linker_section): Fold into..
1871         (ppc_elf_create_linker_section): ..here.  Remove hole_size code.
1872         Make rela section here if shared.
1873         (elf_find_pointer_linker_section): Pass lsect rather than enum.
1874         (elf_create_pointer_linker_section): Adjust.  zalloc rather than
1875         clearing in a loop.
1876         (elf_finish_pointer_linker_section): Adjust.  Don't make rela
1877         section here.
1878         (ppc_elf_check_relocs): Adjust.
1879         (ppc_elf_add_symbol_hook): Tighten hash creator test.  Remove code
1880         creating .sbss by hand.
1881         * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1882
1883 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
1884
1885         * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1886         complain_overflow_bitfield.
1887         * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1888         complain_overflow_bitfield.
1889
1890 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
1891
1892         * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1893         true even if -pie.
1894
1895 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
1896
1897         * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1898         (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1899         !info->executable.
1900         (get_fptr): For -pie create .opd as writable section and create
1901         .rela.opd as well.
1902         (elfNN_ia64_check_relocs): Change info->shared into
1903         !info->executable.
1904         (allocate_fptr): Likewise.
1905         (allocate_dynrel_entries): Account for a relative reloc for -pie
1906         @fptr().  Don't account for a relative reloc if -pie want_ltoff_fptr
1907         for undefweak symbol.  Account for an IPLT reloc in .rela.opd
1908         section if -pie.
1909         (set_got_entry): Don't create a relative reloc if -pie
1910         want_ltoff_fptr for undefweak symbol.
1911         (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1912         (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1913         @fptr().
1914
1915         * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1916         even if -pie.
1917         * elf32-i386.c (elf_i386_relocate_section): Likewise.
1918         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1919         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1920         * elf64-s390.c (elf_s390_relocate_section): Likewise.
1921         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1922         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1923         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1924         * elf32-s390.c (elf_s390_relocate_section): Likewise.
1925         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1926
1927 2003-07-04  Paul Clarke <paulc@senet.com.au>
1928
1929         * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1930         (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1931         <R_H8_DIR32A16>: Fix type of relocation.
1932
1933 2003-07-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1934
1935         * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1936         sections were created already.  Remove unnecessary tests of
1937         the previous change.
1938
1939 2003-07-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1940
1941         * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1942         bfd_make_section for existing sections.
1943
1944 2003-07-04  Alan Modra  <amodra@bigpond.net.au>
1945
1946         * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1947         create_got_section if we already have done so.
1948         * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1949         (sh_elf_check_relocs): Likewise.
1950         (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var.  Use
1951         htab->root.dynobj instead.
1952         (sh_elf_check_relocs): Likewise.
1953         (sh_elf_finish_dynamic_sections): Likewise.
1954
1955         * section.c (bfd_make_section): Return NULL for existing section.
1956
1957 2003-07-04  Alan Modra  <amodra@bigpond.net.au>
1958
1959         * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
1960         ppc_elf_create_got if we've already done so.
1961
1962         * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
1963         (_bfd_elf_find_pointer_linker_section): Likewise.
1964         (bfd_elf32_create_pointer_linker_section): Likewise.
1965         (bfd_elf32_finish_pointer_linker_section): Likewise.
1966         (bfd_elf64_create_pointer_linker_section): Likewise.
1967         (bfd_elf64_finish_pointer_linker_section): Likewise.
1968         (_bfd_elf_make_linker_section_rela): Likewise.
1969         * elfcode.h (elf_create_pointer_linker_section): Don't define.
1970         (elf_finish_pointer_linker_section): Likewise.
1971         * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
1972         (_bfd_elf_create_linker_section): Move this function..
1973         (_bfd_elf_find_pointer_linker_section): ..and this..
1974         * elflink.h (elf_create_pointer_linker_section): ..and this..
1975         (elf_finish_pointer_linker_section): ..and this..
1976         * elf32-ppc.c: ..to here, renaming to the following, and adjusting
1977         calls.
1978         (elf_create_linker_section): Convert to C90, tidy.
1979         (elf_find_pointer_linker_section): Likewise.
1980         (elf_create_pointer_linker_section): Likewise.
1981         (elf_finish_pointer_linker_section): Likewise.
1982         * elf32-i370.c: Delete #if 0 code.
1983
1984 2003-07-02  Alan Modra  <amodra@bigpond.net.au>
1985
1986         * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
1987         _restf* to be satisfied by shared libs, and always force them local.
1988         (toc_adjusting_stub_needed): Avoid scanning linker created sections.
1989         Correct test for "bl".
1990         (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
1991         primary opcode 31.
1992
1993 2003-07-01  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1994
1995         * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
1996         (s390_tls_reloc): New function.
1997         (elf_howto_table): Add long displacement relocations R_390_20,
1998         R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
1999         (elf_s390_reloc_type_lookup): Likewise.
2000         (elf_s390_check_relocs): Likewise.
2001         (elf_s390_gc_sweep_hook): Likewise.
2002         (elf_s390_relocate_section): Likewise.
2003         * elf64-s390.c: Same changes as for elf32-s390.c.
2004         * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2005         BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2006         BFD_RELOC_390_TLS_GOTIE20.
2007         * bfd-in2.h: Regenerate.
2008         * libbfd.h: Likewise.
2009
2010 2003-06-30  Alan Modra  <amodra@bigpond.net.au>
2011
2012         * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2013         (ins_imms, ins_immsm1u4): Likewise.  Warning fix.
2014
2015 2003-06-29  Alan Modra  <amodra@bigpond.net.au>
2016
2017         * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2018         Replace PTR with void *.  Formatting.
2019         * archive64.c: Likewise.
2020         * archures.c: Likewise.
2021         * bfd-in.h: Likewise.
2022         * bfd.c: Likewise.
2023         * bfdio.c: Likewise.
2024         * bfdwin.c: Likewise.
2025         * cache.c: Likewise.
2026         * corefile.c: Likewise.
2027         * format.c: Likewise.
2028         * init.c: Likewise.
2029         * libbfd-in.h: Likewise.
2030         * libbfd.c: Likewise.
2031         * linker.c: Likewise.
2032         * opncls.c: Likewise.
2033         * reloc.c: Likewise.
2034         * section.c: Likewise.
2035         * simple.c: Likewise.
2036         * syms.c: Likewise.
2037         * targets.c: Likewise.
2038         * bfd-in2.h: Regenerate.
2039         * libbfd.h: Regenerate.
2040
2041         * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2042         * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2043         * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2044         (bfd_getb64): Rewrite without parens.
2045         (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2046         * cache.c (insert, snip): Remove INLINE.
2047         * linker.c (bfd_link_add_undef): Likewise.
2048
2049 2003-06-29  Andreas Jaeger  <aj@suse.de>
2050
2051         * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2052         unnecessary prototypes.  Replace PTR with void *.
2053         (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2054         trim plt entries.  Move undefweak non-default visibility test ...
2055         (allocate_dynrelocs): ... from here.
2056         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2057         Change all callers.
2058         (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.  Use
2059         SYMBOL_REFERENCES_LOCAL for dynreloc check.
2060         (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2061         dynreloc and .got relocs.
2062         (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2063         for .got relocs.
2064
2065 2003-06-29  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2066
2067         * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2068
2069 2003-06-27  Nick Clifton  <nickc@redhat.com>
2070
2071         * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2072         bfd_add_gnu_debuglink_section and only create the section, do not
2073         fill in its contents.
2074         (bfd_fill_in_gnu_debuglink_section): New function.  Fill in the
2075         contents of a .gnu-debuglink section.
2076         * bfd-in2.h: Regenerate.
2077
2078 2003-06-27  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2079
2080         * elfxx-mips.c: Revert .got alignment to 2**4.
2081
2082 2003-06-27  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2083
2084         * elf32-mips.c: Fix addend for _gp_disp special symbol.
2085
2086 2003-06-27  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2087
2088         * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2089         relocation header setup.
2090
2091 2003-06-25  Alan Modra  <amodra@bigpond.net.au>
2092
2093         * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2094         (ppc_elf_reloc_type_lookup): Modify comment.
2095         (ppc_elf_info_to_howto): Ditto.
2096         (ppc_elf_relocate_section): Ditto.
2097         (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2098
2099 2003-06-25  Alan Modra  <amodra@bigpond.net.au>
2100
2101         * aout-ns32k.c: Correct spelling of "relocatable".
2102         * aoutx.h: Likewise.
2103         * bfd-in.h: Likewise.
2104         * bfd.c: Likewise.
2105         * bout.c: Likewise.
2106         * coff-a29k.c: Likewise.
2107         * coff-alpha.c: Likewise.
2108         * coff-arm.c: Likewise.
2109         * coff-i386.c: Likewise.
2110         * coff-i860.c: Likewise.
2111         * coff-i960.c: Likewise.
2112         * coff-m68k.c: Likewise.
2113         * coff-m88k.c: Likewise.
2114         * coff-mcore.c: Likewise.
2115         * coff-mips.c: Likewise.
2116         * coff-or32.c: Likewise.
2117         * coff-ppc.c: Likewise.
2118         * coff-rs6000.c: Likewise.
2119         * coff-sh.c: Likewise.
2120         * coff-tic80.c: Likewise.
2121         * coff64-rs6000.c: Likewise.
2122         * cofflink.c: Likewise.
2123         * cpu-ns32k.c: Likewise.
2124         * ecoff.c: Likewise.
2125         * ecofflink.c: Likewise.
2126         * elf-bfd.h: Likewise.
2127         * elf-eh-frame.c: Likewise.
2128         * elf-hppa.h: Likewise.
2129         * elf-m10200.c: Likewise.
2130         * elf-m10300.c: Likewise.
2131         * elf.c: Likewise.
2132         * elf32-arm.h: Likewise.
2133         * elf32-avr.c: Likewise.
2134         * elf32-cris.c: Likewise.
2135         * elf32-d10v.c: Likewise.
2136         * elf32-dlx.c: Likewise.
2137         * elf32-fr30.c: Likewise.
2138         * elf32-frv.c: Likewise.
2139         * elf32-h8300.c: Likewise.
2140         * elf32-hppa.c: Likewise.
2141         * elf32-i370.c: Likewise.
2142         * elf32-i386.c: Likewise.
2143         * elf32-i860.c: Likewise.
2144         * elf32-i960.c: Likewise.
2145         * elf32-ip2k.c: Likewise.
2146         * elf32-iq2000.c: Likewise.
2147         * elf32-m32r.c: Likewise.
2148         * elf32-m68hc11.c: Likewise.
2149         * elf32-m68hc1x.c: Likewise.
2150         * elf32-m68k.c: Likewise.
2151         * elf32-mcore.c: Likewise.
2152         * elf32-mips.c: Likewise.
2153         * elf32-msp430.c: Likewise.
2154         * elf32-openrisc.c: Likewise.
2155         * elf32-ppc.c: Likewise.
2156         * elf32-s390.c: Likewise.
2157         * elf32-sh.c: Likewise.
2158         * elf32-sh64.c: Likewise.
2159         * elf32-sparc.c: Likewise.
2160         * elf32-v850.c: Likewise.
2161         * elf32-vax.c: Likewise.
2162         * elf32-xstormy16.c: Likewise.
2163         * elf32-xtensa.c: Likewise.
2164         * elf64-alpha.c: Likewise.
2165         * elf64-hppa.c: Likewise.
2166         * elf64-mips.c: Likewise.
2167         * elf64-mmix.c: Likewise.
2168         * elf64-ppc.c: Likewise.
2169         * elf64-s390.c: Likewise.
2170         * elf64-sh64.c: Likewise.
2171         * elf64-sparc.c: Likewise.
2172         * elf64-x86-64.c: Likewise.
2173         * elfcode.h: Likewise.
2174         * elflink.h: Likewise.
2175         * elfn32-mips.c: Likewise.
2176         * elfxx-ia64.c: Likewise.
2177         * elfxx-mips.c: Likewise.
2178         * i386linux.c: Likewise.
2179         * ieee.c: Likewise.
2180         * libcoff-in.h: Likewise.
2181         * linker.c: Likewise.
2182         * m68klinux.c: Likewise.
2183         * pdp11.c: Likewise.
2184         * pe-mips.c: Likewise.
2185         * peXXigen.c: Likewise.
2186         * reloc.c: Likewise.
2187         * reloc16.c: Likewise.
2188         * sparclinux.c: Likewise.
2189         * sunos.c: Likewise.
2190         * syms.c: Likewise.
2191         * versados.c: Likewise.
2192         * vms.c: Likewise.
2193         * xcofflink.c: Likewise.
2194         * bfd-in2.h: Regenerate.
2195         * libcoff.h: Regenerate.
2196         * libbfd.h: Regenerate.
2197
2198 2003-06-24  Alan Modra  <amodra@bigpond.net.au>
2199
2200         * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2201         local sym errors.
2202
2203         * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2204         prototypes and casts.  Replace PTR with void *.  Formatting.
2205         * elf32-ppc.c: Likewise.  Break long strings too.
2206         (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2207         (ppc_elf_unhandled_reloc): Internationalize error message.
2208         * elf32-ppc.h: Remove PARAMS.
2209
2210 2003-06-23  Mark Mitchell  <mark@codesourcery.com>
2211
2212         * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2213         APUinfo slots.
2214         (ppc_elf_final_write_processing): Likewise.
2215
2216 2003-06-23  H.J. Lu <hongjiu.lu@intel.com>
2217
2218         * elflink.h (elf_link_input_bfd): Check raw size when using
2219         kept_section to preserve debug information discarded by
2220         linkonce.
2221
2222 2003-06-20  Alan Modra  <amodra@bigpond.net.au>
2223
2224         * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2225         (ppc64_elf_setup_section_lists): Set it.
2226         (ppc64_elf_relocate_section): Check sym section id against top_id.
2227         (ppc_build_one_stub): Comment on top_id.
2228
2229 2003-06-20  Ralf Corsepius  <corsepiu@faw.uni-ulm.de>
2230
2231         * config.bfd: Add tic4x-*-rtems*.
2232
2233 2003-06-20  Alan Modra  <amodra@bigpond.net.au>
2234
2235         * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2236         prototypes and casts.  Replace PTR with void *.  Format copyright.
2237         Mention ABI links.
2238         (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2239         sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2240         (ppc_type_of_stub): Make r_type an enum.
2241         (ppc64_elf_size_stubs): Likewise.
2242         * elf64-ppc.h: Remove PARAMS macro.
2243
2244 2003-06-19  Alan Modra  <amodra@bigpond.net.au>
2245
2246         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2247         elf hash tab fields.
2248
2249         * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2250         (ppc64_elf_info_to_howto): Likewise.
2251         (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2252         * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2253
2254 2003-06-19  Alan Modra  <amodra@bigpond.net.au>
2255
2256         * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2257         reloc overflow on discarded eh_frame entries.
2258
2259 2003-06-19  Alan Modra  <amodra@bigpond.net.au>
2260
2261         * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2262         (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2263         Return error condition.
2264         (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2265         that have has_gp_reloc set.
2266         (struct ppc_link_hash_table): Add stub_count.
2267         (ppc_build_one_stub): Increment it.
2268         (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2269         individual fields.
2270         * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2271
2272 2003-06-18  Alan Modra  <amodra@bigpond.net.au>
2273
2274         * elflink.h (elf_gc_record_vtentry): Revert last change.  Correct
2275         size calculation from addend.  Round size up.
2276
2277 2003-06-18  Hans-Peter Nilsson  <hp@axis.com>
2278
2279         * elf32-cris.c (cris_elf_relocate_section) <case
2280         R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2281         symbol from a normal object or an undefined weak symbol.
2282
2283 2003-06-18  Alan Modra  <amodra@bigpond.net.au>
2284
2285         * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2286         R_PPC64_TOC relocs.
2287
2288 2003-06-17  H.J. Lu <hongjiu.lu@intel.com>
2289
2290         * section.c (struct sec): Put back kept_section.
2291         (STD_SECTION): Put back kept_section initialization.
2292         * bfd-in2.h: Regenerate.
2293
2294         * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2295         sections for relocateable output. Use kept_section to preserve
2296         debug information discarded by linkonce.
2297
2298 2003-06-17  Roland McGrath  <roland@redhat.com>
2299
2300         * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2301         segment-relative relocation between different segments.
2302
2303 2003-06-17  Alan Modra  <amodra@bigpond.net.au>
2304
2305         * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2306         optimizations earlier.
2307
2308         * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2309         Restore previous input_list type.
2310         (ppc64_elf_link_hash_table_create): Undo last change.
2311         (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2312         per output section, but don't bother with bfd_abs_section marker.
2313         (ppc64_elf_next_input_section): Adjust for multiple input section
2314         lists.
2315         (group_sections): Likewise.
2316
2317 2003-06-17  Jakub Jelinek  <jakub@redhat.com>
2318
2319         * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2320         *r_offset == r_addend for RELATIVE relocs against .got.
2321
2322 2003-06-17  Alan Modra  <amodra@bigpond.net.au>
2323
2324         * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2325
2326 2003-06-17  Nick Clifton  <nickc@redhat.com>
2327
2328         * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2329         in the vtable_entries_used array to allow for the accessing
2330         the largest element.
2331
2332 2003-06-17  Alan Modra  <amodra@bigpond.net.au>
2333
2334         * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index.  Modify
2335         input_list.
2336         (ppc64_elf_link_hash_table_create): Init input_list here.
2337         (ppc64_elf_setup_section_lists): Remove code setting up input lists
2338         per output section.  Set toc_off for abs and other standard sections.
2339         (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2340         (ppc64_elf_next_input_section): Adjust for single input section list.
2341         Don't set toc_curr from input bfds that haven't set elf_gp.
2342         (group_sections): Adjust for single input section list.
2343
2344         * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2345
2346 2003-06-16  Alan Modra  <amodra@bigpond.net.au>
2347
2348         * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2349         tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2350         dtprel entry.  Ensure TLS_LD DTPMOD reloc has a zero addend.  Write
2351         got section for RELATIVE relocs.  Fix wrong comment.  Change condition
2352         under which dynamic relocs update the section contents.
2353
2354 2003-06-13  Robert Millan  <zeratul2@wanadoo.es>
2355
2356         * config.bfd: Add i386-netbsd-gnu target.
2357
2358 2003-06-12  Nick Clifton  <nickc@redhat.com>
2359
2360         * opncls.c (calc_crc32): Rename to
2361         bfd_calc_gnu_debuglink_crc32 and export.
2362         (GNU_DEBUGLINK): Define and use to replace occurrences of
2363         hard-coded ".gnu_debuglink" in the code.
2364         (get_debug_link_info): Prevent aborts by replacing call to
2365         xmalloc with a call to malloc.
2366         (find_separate_debug_file): Prevent aborts by replacing calls
2367         to xmalloc and xstrdup with calls to malloc and strdup.
2368         (bfd_add_gnu_debuglink): New function.  Add a .gnu_debuglink
2369         section to a bfd.
2370         * bfd-in2.h: Regenerate.
2371
2372 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2373
2374         * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2375         New target (was i[3-7]86-*-openbsd* before).
2376         (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2377         (vax-*-openbsd*): New target.
2378
2379 2003-06-11  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2380
2381         * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2382         for n32, too.
2383         (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2384         (mips_elf_rel_dyn_section): Use appropriate section alignment.
2385         (mips_elf_create_got_section): Likewise.
2386         (_bfd_mips_elf_create_dynamic_sections): Likewise.
2387
2388 2003-06-11  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2389
2390         * elf32-mips.c (mips_elf_generic_reloc): New Function.
2391         (elf_mips_howto_table_rel): Use it.
2392         (gprel32_with_gp): Move prototype.
2393         (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2394         Use mips_elf_generic_reloc.
2395         (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2396         Code cleanup.
2397         (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2398         zero addend.
2399         (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2400         as in the other *_gprel*_reloc functions.
2401         (gprel32_with_gp): Handle partial_inplace properly.
2402         (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2403         (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2404         Do addend handling directly instead of calling
2405         _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2406         * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2407         of zero addend. Handle partial_inplace properly.
2408         (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2409         addend.
2410         (mips_elf64_gprel16_reloc): Likewise.
2411         (mips_elf64_literal_reloc): Likewise.
2412         (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2413         logic as in the other *_gprel*_reloc functions. Handle
2414         partial_inplace properly.
2415         (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2416         addend. Handle partial_inplace properly.
2417         (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2418         of calling _bfd_mips_elf_gprel16_with_gp.
2419         * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2420         (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2421         of zero addend.
2422         (mips_elf_shift6_reloc): Handle partial_inplace properly.
2423         (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2424         of calling _bfd_mips_elf_gprel16_with_gp.
2425         * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2426         partial_inplace properly. Fix wrong addend handling. Fix overflow
2427         check.
2428         (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2429         exported.
2430         (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2431         (_bfd_mips_elf_relocate_section): Likewise.
2432         (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2433         * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2434         (_bfd_mips_elf_sign_extend): New prototype.
2435
2436 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2437
2438         * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2439         New target (was sparc-*-openbsd* before).
2440         (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2441
2442         * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2443         * configure: Regenerate.
2444
2445 2003-06-11  H.J. Lu <hongjiu.lu@intel.com>
2446
2447         * po/Make-in (DESTDIR): New.
2448         (install-data-yes): Support $(DESTDIR).
2449         (uninstall): Likewise.
2450
2451 2003-06-11  Alan Modra  <amodra@bigpond.net.au>
2452
2453         * Makefile.am (config.status): Depend on version.h.
2454         Run "make dep-am".
2455         * Makefile.in: Regenerate.
2456         * po/SRC-POTFILES.in: Regenerate.
2457
2458 2003-06-10  Alan Modra  <amodra@bigpond.net.au>
2459             Gary Hade <garyhade@us.ibm.com>
2460
2461         * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2462
2463 2003-06-10  Richard Sandiford  <rsandifo@redhat.com>
2464
2465         * archures.c (bfd_mach_h8300sxn): New architecture.
2466         * bfd-in2.h: Regenerate.
2467         * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2468         (h8300sxn_info_struct): New.
2469         (h8300sx_info_struct): Link to it.
2470         * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2471         (elf32_h8_final_write_processing): Likewise.
2472
2473 2003-06-08  Alan Modra  <amodra@bigpond.net.au>
2474
2475         * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2476         elfxx-target.h so that we can use elf_backend_got_header_size.
2477         (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2478         (GLINK_CALL_STUB_SIZE): Modify.  Define new glink call stub and
2479         associated macros.
2480         (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2481         dst_mask.
2482         (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2483         ppc_stub_plt_branch_r2off.
2484         (struct ppc_stub_hash_entry): Reorganize.
2485         (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2486         toc_curr, toc_off and emit_stub_syms.
2487         (ppc64_elf_link_hash_table_create): Init them.
2488         (ppc_stub_name): Correct string size.
2489         (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2490         (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2491         used.
2492         (ppc_type_of_stub): Tweak root.type test.
2493         (build_plt_stub): Remove glink code.  Adjust for insn macro changes.
2494         (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2495         ppc_stub_plt_branch_r2off.
2496         (ppc_build_one_stub): Likewise.  Fix var shadowing.  Correct addis,addi
2497         range test.  Use toc_off to calculte r2 values.  Handle emit_stub_syms.
2498         (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2499         Initialize elf_gp and toc_curr.
2500         (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2501         (ppc64_elf_next_input_section): Set toc_off.
2502         (group_sections): Ensure groups have the same TOC.
2503         (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2504         (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2505         Build new glink stub.
2506         (ppc64_elf_relocate_section): Handle multiple TOCs.  Fix comments.
2507         (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2508         * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2509         (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2510         * section.c (struct sec): Rename flag12 to has_gp_reloc.
2511         (STD_SECTION): Update.
2512         * ecoff.c (bfd_debug_section): Update comment.
2513         * bfd-in2.h: Regenerate.
2514
2515 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
2516
2517         * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2518         NULL function pointers.
2519
2520 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
2521
2522         * simple.c (bfd_simple_get_relocated_section_contents): Call
2523         _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2524
2525 2003-06-04  Svein E. Seldal  <Svein.Seldal@solidas.com>
2526
2527         * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2528         ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2529         swaptables.
2530         * coff-tic4x.c: Ditto
2531         * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2532         and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2533         CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2534         ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2535         swap tables.
2536         * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2537         * coff-a29k.c: Append COFF_SWAP_TABLE argument
2538         * coff-apollo.c: Ditto
2539         * coff-arm.c: Ditto
2540         * coff-h8300.c: Ditto
2541         * coff-h8500.c: Ditto
2542         * coff-i960.c: Ditto
2543         * coff-m68k.c: Ditto
2544         * coff-m88k.c: Ditto
2545         * coff-mcore.c: Ditto
2546         * coff-sh.c: Ditto
2547         * coff-sparc.c: Ditto
2548         * coff-tic80.c: Ditto
2549         * coff-we32k.c: Ditto
2550         * coff-z8k.c: Ditto
2551         * coff-w65.c: Ditto
2552
2553 2003-06-04  Svein E. Seldal  <Svein.Seldal@solidas.com>
2554
2555         * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2556         initialization bug
2557
2558 2003-06-03  Jakub Jelinek  <jakub@redhat.com>
2559
2560         * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2561         (bfd_section_from_phdr): Likewise.
2562         (map_sections_to_segments): Create PT_GNU_STACK segment header.
2563         (get_program_header_size): Count with PT_GNU_STACK.
2564         * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2565         * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2566
2567 2003-06-03  H.J. Lu <hongjiu.lu@intel.com>
2568
2569         * elflink.h (elf_link_input_bfd): Call linker error_handler
2570         for discarded definitions.
2571
2572 2003-06-03  Elias Athanasopoulos  <elathan@phys.uoa.gr>
2573
2574         * syms.c (decode_section_type): Return 'n' if section flags are
2575         SEC_HAS_CONTENTS && SEC_READONLY.
2576
2577 2003-06-03  Nick Clifton  <nickc@redhat.com>
2578
2579         * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2580         R_V850_ABS32.  Add entry for R_V850_REL32.
2581         (v850_elf_reloc_map): Likewise.
2582         (v850_elf_check_relocs): Likewise.
2583         (v850_elf_perform_relocation): Likewise.
2584         (v850_elf_final_link_relocate): Likewise.  Include computation
2585         to make R_V850_REl32 pc-relative.
2586
2587 2003-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2588
2589         * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2590         and DT_DEBUG dynamic tag even for position independent executables.
2591         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2592
2593 2003-06-02  Daniel Jacobowitz  <drow@mvista.com>
2594
2595         * config.bfd: Move obsolete entries out of the range of the
2596         targmatch sed script.
2597
2598 2003-06-02  Daniel Jacobowitz  <drow@mvista.com>
2599
2600         * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2601
2602 2003-05-31  Jakub Jelinek  <jakub@redhat.com>
2603
2604         * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2605         plt entries, not just 8191.
2606
2607 2003-05-30  Daniel Jacobowitz  <drow@mvista.com>
2608
2609         * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2610         Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2611
2612 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
2613             Jakub Jelinek  <jakub@redhat.com>
2614
2615         * elflink.h (elf_link_add_object_symbols): Use !info->executable
2616         instead of info->shared where appropriate.
2617         (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2618         * elflink.c (_bfd_elf_create_got_section): Likewise.
2619         (_bfd_elf_link_create_dynamic_sections): Likewise.
2620         (_bfd_elf_link_assign_sym_version): Likewise.
2621         * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2622         and DT_DEBUG dynamic tag even for position independent executables.
2623         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2624         * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2625         * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2626         * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2627         * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2628         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2629         * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2630         * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2631         * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2632
2633 2003-05-30  Kris Warkentin <kewarken@qnx.com>
2634
2635         * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2636         signalled thread.
2637         (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2638
2639 2003-05-29  Nick Clifton  <nickc@redhat.com>
2640
2641         * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2642         Tidy up formatting.
2643         * Makefile.am: Add dependency on safe-ctype.h.
2644         * Makefile.in: Regenerate.
2645
2646 2003-05-29  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2647
2648         * elfxx-mips.c: Don't force symbols local unconditionally.
2649
2650 2003-05-28  Alan Modra  <amodra@bigpond.net.au>
2651
2652         * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2653         undefined_symbol call.
2654
2655 2003-05-27  Richard Sandiford  <rsandifo@redhat.com>
2656
2657         * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2658         (mips_elf_link_hash_table): Likewise.
2659
2660 2003-05-22  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2661
2662         * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2663         R_MIPS_GNU_REL16_S2 support.
2664         (bfd_elf64_bfd_reloc_type_lookup): Use it.
2665         (mips_elf64_rtype_to_howto): Use it.
2666         * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2667         R_MIPS_GNU_REL16_S2 support.
2668         (bfd_elf32_bfd_reloc_type_lookup): Use it.
2669         (mips_elf_n32_rtype_to_howto): Use it.
2670
2671 2003-05-21  Stuart F. Downing  <sdowning@fame.com>
2672
2673         * som.h: Define PA_2_0 before including a.out.h
2674
2675 2003-05-07  Eric Christopher  <echristo@redhat.com>
2676             Alexandre Oliva   <aoliva@redhat.com>
2677
2678         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2679         pic tests, change to warning.
2680         (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2681
2682 2003-05-21  Marcus Comstedt  <marcus@mc.pp.se>
2683
2684         * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2685         well as shle-...-netbsdelf.  Remove duplicate entry.
2686
2687 2003-05-21  Nick Clifton  <nickc@redhat.com>
2688
2689         * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2690         for X_STORMY16_REL_12 reloc.
2691
2692         * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2693         the type of the hash table in the bfd_link_info structure.
2694         (bfd_elf_get_runpath_list): Likewise.
2695
2696 2003-05-19  Roland McGrath  <roland@redhat.com>
2697
2698         * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2699         * bfd-in.h: Declare it.
2700         * bfd-in2.h: Regenerated.
2701         * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2702         * elf-bfd.h (struct elf_backend_data): New function pointer member
2703         elf_backend_bfd_from_remote_memory.
2704         (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2705         Declare them.
2706         * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2707         (elfNN_bed): Add that to the initializer.
2708
2709 2003-05-15  Roland McGrath  <roland@redhat.com>
2710
2711         * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2712
2713 2003-05-20  Jakub Jelinek  <jakub@redhat.com>
2714
2715         * elflink.h (elf_link_output_extsym): Only issue error about !=
2716         STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2717
2718 2003-05-20  H.J. Lu <hongjiu.lu@intel.com>
2719
2720         * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2721         when removing the old definition for symbols with non-default
2722         visibility.
2723
2724 2003-05-18  Jason Eckhardt  <jle@rice.edu>
2725
2726         * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2727
2728 2003-05-17  Andreas Schwab  <schwab@suse.de>
2729
2730         * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2731         elf_section_data during processing of pc-relative and absolute
2732         relocations.
2733         (elf_m68k_relocate_section): Use the cached reloc section instead
2734         of computing it again.  Fix handling of visibility.  Don't modify
2735         addend when copying over a relocation into the output.
2736
2737 2003-05-17  Alan Modra  <amodra@bigpond.net.au>
2738
2739         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2740         to trim plt entries.  Move undefweak non-default visibility test..
2741         (allocate_dynrelocs): ..from here.
2742         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2743         dynamic_sections_created here.  Update comment.  Move undefweak
2744         non-default visibility test..
2745         (allocate_dynrelocs): ..from here.  Fix comment.
2746         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2747         to trim plt entries.  Move undefweak non-default visibility test..
2748         (allocate_dynrelocs): ..from here.  Fix comment.
2749         * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2750         STV_DEFAULT rather than comparing with zero.
2751         * elflink.c (_bfd_elf_merge_symbol): Likewise.
2752         (_bfd_elf_fix_symbol_flags): Likewise.  Format comment.
2753
2754 2003-05-17  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2755
2756         * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2757         pointers.
2758         (_bfd_set_gp_value): Likewise.
2759
2760 2003-05-16  Michael Snyder  <msnyder@redhat.com>
2761         From Bernd Schmidt  <bernds@redhat.com>
2762         * archures.c (bfd_mach_h8300sx): New.
2763         * bfd-in2.h: Regenerate.
2764         * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2765         (h8300sx_info_struct): New.
2766         (h8300s_info_struct): Link to it.
2767         * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2768         (elf32_h8_final_write_processing): Likewise.
2769         (elf32_h8_relax_section): Likewise.
2770
2771 2003-05-16  Kelley Cook  <kelleycook@wideopenwest.com>
2772
2773         * config.bfd: Accept i[3-7]86 variants.
2774         * configure.host: Likewise.
2775         * configure.in: Likewise.
2776         * configure: Regenerate.
2777
2778 2003-05-15  H.J. Lu <hongjiu.lu@intel.com>
2779
2780         * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2781         symbol.
2782
2783 2003-05-15  H.J. Lu <hongjiu.lu@intel.com>
2784
2785         * elflink.h (elf_link_check_versioned_symbol): Also allow
2786         the base version.
2787
2788 2003-05-15  Alan Modra  <amodra@bigpond.net.au>
2789             H.J. Lu <hongjiu.lu@intel.com>
2790
2791         * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2792         (elf_i386_relocate_section): Likewise.
2793         * elf32-ppc.c (allocate_dynrelocs): Likewise.
2794         (ppc_elf_relocate_section): Likewise.
2795         * elf64-ppc.c (allocate_dynrelocs): Likewise.
2796         (ppc64_elf_relocate_section): Likewise.
2797
2798 2003-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2799
2800         * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2801
2802 2003-05-13  Stephane Carrez  <stcarrez@nerim.fr>
2803
2804         * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2805         processor capability, allow merge of HC12 and HCS12 in some cases.
2806         (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2807         * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2808         (bfd_m68hc12_arch): Link it.
2809         (scan_mach): New function.
2810
2811 2003-05-13  Andrew Haley  <aph@redhat.com>
2812
2813         * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2814
2815 2003-05-13  Alan Modra  <amodra@bigpond.net.au>
2816             H.J. Lu  <hongjiu.lu@intel.com>
2817
2818         * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2819         elf32-ppc.c.  Add ELF_LINK_FORCED_LOCAL check.
2820         * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2821         (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2822         (ppc_elf_relocate_section): Likewise.
2823         * elf64-ppc.c (allocate_dynrelocs): Likewise.
2824         (ppc64_elf_relocate_section): Likewise.  Use for .got relocs too.
2825         (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2826         relocs need no other types.
2827         * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2828         dynreloc check.
2829         (elf_i386_relocate_section): Likewise.  Use for .got relocs too.
2830         (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2831         .got relocs.
2832
2833 2003-05-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2834
2835         * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2836         copy ELF_LINK_NON_GOT_REF from weakdef.
2837         (allocate_dynrelocs): For undef weak syms with non-default
2838         visibility, a) don't allocate plt entries, b) don't allocate
2839         .got relocs, c) discard dyn rel space
2840         (sh_elf_relocate_section): d) don't generate .got relocs, e)
2841         don't generate dynamic relocs.
2842         (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2843         for weakdefs when symbol already adjusted.
2844
2845 2003-05-12  Nick Clifton  <nickc@redhat.com>
2846
2847         * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2848         overflow detection for R_XSTORMY16_16 reloc.
2849
2850 2003-05-12  Paul Clarke  <paulc@senet.com.au>
2851
2852         * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2853
2854 2003-05-11  Jason Eckhardt  <jle@rice.edu>
2855
2856         * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2857         adjust upper bits.
2858         (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2859         proper place.
2860         (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2861         proper place.
2862
2863 2003-05-11  Andreas Schwab  <schwab@suse.de>
2864
2865         * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2866         complicated tests for unresolvable relocs with a simple direct
2867         scheme using "unresolved_reloc" var.  Report some detail on
2868         bfd_reloc_outofrange and similar errors.
2869
2870 2003-05-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2871
2872         * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2873         Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2874         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2875         * elf64-s390.c: Likewise.
2876
2877 2003-05-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2878
2879         * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2880         (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2881         ELF_LINK_NON_GOT_REF from weakdef.
2882         (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2883         already been adjusted before treating it specially.
2884         * el64-s390.c: Likwise.
2885
2886 2003-05-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2887
2888         * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2889         non-default visibility, a) don't make them dynamic, b) discard
2890         space for dynamic relocs.
2891         (elf_s390_relocate_section): Initialize the GOT entries and skip
2892         R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2893         symbols with non-default visibility.
2894         * elf64-s390.c: Likewise.
2895
2896 2003-05-09  Alan Modra  <amodra@bigpond.net.au>
2897
2898         * cpu-arm.c (arm_check_note): Warning fix.
2899         * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes.  Arrange
2900         to keep relocs if edited.
2901         (iq2000_elf_print_private_bfd_data): Return TRUE.
2902         * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2903         ELF64_R_SYM.
2904         (elfNN_ia64_relax_ldxmov): Warning fix.
2905         * xtensa-isa.c (xtensa_add_isa): Warning fix.
2906         * xtensa-modules.c (get_num_opcodes): Warning fix.
2907
2908 2003-05-09  Andrey Petrov <petrov@netbsd.org>
2909
2910         * elf.c (elf_fake_sections): Use correct cast for sh_name.
2911
2912 2003-05-09  Alan Modra  <amodra@bigpond.net.au>
2913
2914         * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2915         elflink.h.  Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2916         (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2917         (bfd_elf_record_link_assignment): Move from elflink.h.
2918         (_bfd_elf_merge_symbol): Likewise.
2919         (_bfd_elf_add_default_symbol): Likewise.
2920         (_bfd_elf_export_symbol): Likewise.
2921         (_bfd_elf_link_find_version_dependencies): Likewise.
2922         (_bfd_elf_link_assign_sym_version): Likewise.
2923         (_bfd_elf_link_read_relocs): Likewise.
2924         (_bfd_elf_link_size_reloc_section): Likewise.
2925         (_bfd_elf_fix_symbol_flags): Likewise.
2926         (_bfd_elf_adjust_dynamic_symbol): Likewise.
2927         (_bfd_elf_link_sec_merge_syms): Likewise.
2928         (elf_link_read_relocs_from_section): Likewise.  Use bed->s->sizeof_rel
2929         and bed->s->sizeof_rela.
2930         (_bfd_elf_link_output_relocs): Likewise.
2931         * elf-bfd.h (struct elf_size_info): Rename file_align to
2932         log_file_align.
2933         (struct elf_info_failed): Move from elflink.h.
2934         (struct elf_assign_sym_version_info): Likewise.
2935         (struct elf_find_verdep_info): Likewise.
2936         (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2937         (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2938         _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2939         _bfd_elf_link_assign_sym_version,
2940         _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2941         _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2942         _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2943         _bfd_elf_link_sec_merge_syms): Declare.
2944         (bfd_elf32_link_create_dynamic_sections): Don't declare.
2945         (_bfd_elf32_link_read_relocs): Likewise.
2946         (bfd_elf64_link_create_dynamic_sections): Likewise.
2947         (_bfd_elf64_link_read_relocs): Likewise.
2948         * elflink.h: Move lots o' stuff elsewhere.
2949         * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2950         (bfd_elf64_record_link_assignment): Likewise.
2951         (bfd_elf_record_link_assignment): Declare.
2952         * bfd-in2.h: Regenerate.
2953         * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
2954         (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
2955         * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
2956         (assign_file_positions_for_segments): Likewise.
2957         (assign_file_positions_except_relocs): Likewise.
2958         (swap_out_syms, elfcore_write_note): Likewise.
2959         * elf-m10200.c: Adjust for changed function names.
2960         * elf-m10300.c: Likewise.
2961         * elf32-arm.h: Likewise.
2962         * elf32-h8300.c: Likewise.
2963         * elf32-hppa.c: Likewise.
2964         * elf32-ip2k.c: Likewise.
2965         * elf32-m32r.c: Likewise.
2966         * elf32-m68hc11.c: Likewise.
2967         * elf32-m68hc1x.c: Likewise.
2968         * elf32-m68k.c: Likewise.
2969         * elf32-mips.c: Likewise.
2970         * elf32-ppc.c: Likewise.
2971         * elf32-sh.c: Likewise.
2972         * elf32-v850.c: Likewise.
2973         * elf32-xtensa.c: Likewise.
2974         * elf64-alpha.c: Likewise.
2975         * elf64-hppa.c: Likewise.
2976         * elf64-mmix.c: Likewise.
2977         * elf64-ppc.c: Likewise.
2978         * elf64-sh64.c: Likewise.
2979         * elfxx-ia64.c: Likewise.
2980         * elfxx-mips.c: Likewise.
2981         (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
2982         * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
2983         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2984         * elf64-mips.c (mips_elf64_size_info): Likewise.
2985         * elf64-s390.c (s390_elf64_size_info): Likewise.
2986         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2987
2988 2003-05-08  H.J. Lu <hongjiu.lu@intel.com>
2989
2990         * elflink.h (elf_add_default_symbol): After skipping the
2991         unversioned symbol, go to non-default one.
2992
2993 2003-05-07  H.J. Lu <hongjiu.lu@intel.com>
2994
2995         * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
2996         want_plt field.
2997         (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
2998         for symbols with non-default visibility.
2999
3000 2003-05-07  H.J. Lu <hongjiu.lu@intel.com>
3001
3002         * elflink.h (elf_link_check_versioned_symbol): Also handle the
3003         case that a DSO references a hidden symbol which may be
3004         satisfied by a versioned symbol in another DSO.
3005         (elf_link_output_extsym): Check versioned definition for hidden
3006         symbol referenced by a DSO.
3007
3008 2003-05-07  Nick Clifton  <nickc@redhat.com>
3009
3010         * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3011         R_XSTORMY16_16 reloc to ignore overflows.
3012
3013 2003-05-06  Alexandre Oliva  <aoliva@redhat.com>
3014
3015         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3016         error message for mixing different-endian files.  Check for ABI
3017         compatibility of input files with the selected emulation.
3018
3019 2003-05-05  Alan Modra  <amodra@bigpond.net.au>
3020
3021         * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3022         non-default visibility, a) don't make them dynamic, b) discard
3023         space for dynamic relocs.
3024         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3025
3026         * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3027         non-default visibility, a) don't allocate plt entries, b) don't
3028         allocate .got relocs, c) discard dyn rel space,
3029         (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3030         don't generate dynamic relocs.
3031         * elf64-ppc.c (allocate_dynrelocs): As above.
3032         (ppc64_elf_relocate_section): As above.
3033
3034 2003-05-05  Andreas Jaeger  <aj@suse.de>
3035
3036         * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3037         relocation entries for weak undefined symbols with non-default
3038         visibility.
3039         (elf64_x86_64_relocate_section): Initialize the GOT entries and
3040         skip R_386_32/R_386_PC32 for weak undefined symbols with
3041         non-default visibility.
3042
3043 2003-05-04  H.J. Lu <hjl@gnu.org>
3044
3045         * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3046         relocation entries for weak undefined symbols with non-default
3047         visibility.
3048         (elf_i386_relocate_section): Initialize the GOT entries and
3049         skip R_386_32/R_386_PC32 for weak undefined symbols with
3050         non-default visibility.
3051
3052         * elfxx-ia64.c (allocate_fptr): Don't allocate function
3053         descriptors for weak undefined symbols with non-default
3054         visibility.
3055         (allocate_dynrel_entries): Don't allocate relocation entries
3056         for symbols resolved to 0.
3057         (set_got_entry): Don't install dynamic relocation for weak
3058         undefined symbols with non-default visibility.
3059         (set_pltoff_entry): Likewise.
3060
3061         * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3062         with non-default visibility.
3063         (elf_link_output_extsym): Don't make weak undefined symbols
3064         with non-default visibility dynamic.
3065
3066 2003-05-04  H.J. Lu <hjl@gnu.org>
3067
3068         * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
3069
3070 2003-05-04  H.J. Lu <hjl@gnu.org>
3071
3072         * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3073         symbol dynamic. Check indirection when removing the old
3074         definition for symbols with non-default visibility.
3075         (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3076
3077 2003-05-02  Nick Clifton  <nickc@redhat.com>
3078
3079         * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3080         R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3081         unsigned overflow.
3082
3083 2003-05-02  Andreas Jaeger  <aj@suse.de>
3084
3085         * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3086         ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3087         (ELIMINATE_COPY_RELOCS): Define as one.  Use throughout.
3088         (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3089         ELF_LINK_NON_GOT_REF from weakdef.
3090
3091 2003-05-02  Charles Lepple <clepple@ghz.cc>
3092             Nick Clifton <nickc@redhat.com>
3093
3094         * acinclude.m4: Fix name of --enable-install-libbfd switch.
3095         * aclocal.m4: Regenerate.
3096         * configure: Regenerate.
3097         * Makefile.in: Regenerate.
3098
3099 2003-05-01  Alan Modra  <amodra@bigpond.net.au>
3100
3101         * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3102         weakdef sym has already been adjusted before treating it specially.
3103         * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3104         ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3105         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3106         (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3107
3108 2003-04-28  H.J. Lu <hjl@gnu.org>
3109
3110         * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3111         the relax finalize pass.
3112
3113         * section.c (struct sec): Add need_finalize_relax and remove
3114         flag11.
3115         (STD_SECTION): Update struct sec initializer.
3116         * bfd-in2.h: Regenerated.
3117
3118 2003-04-28  H.J. Lu <hjl@gnu.org>
3119
3120         * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3121         to copy any information related to dynamic linking when we flip
3122         the indirection.
3123
3124 2003-04-27  H.J. Lu <hjl@gnu.org>
3125
3126         * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3127         (ELF_LINK_DYNAMIC_WEAK): New.
3128
3129         * elflink.h (elf_merge_symbol): Add one argument to indicate if
3130         a symbol should be skipped. Ignore definitions in dynamic
3131         objects for symbols with non-default visibility.
3132         (elf_add_default_symbol): Adjusted.
3133         (elf_link_add_object_symbols): Check if a symbol should be
3134         skipped. Don't merge the visibility field with the one from
3135         a dynamic object.
3136         (elf_link_check_versioned_symbol): Use undef_bfd.
3137         (elf_link_output_extsym): Warn if a forced local symbol is
3138         referenced from dynamic objects. Make non-weak undefined symbol
3139         with non-default visibility a fatal error.
3140
3141 2003-04-27  Daniel Jacobowitz  <drow@mvista.com>
3142
3143         * configure.in: Bump version on HEAD to 2.14.90.
3144         * configure: Regenerated.
3145
3146 2003-04-26  Stephane Carrez  <stcarrez@nerim.fr>
3147
3148         PR savannah/3331:
3149         * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3150         when we couldn't relax something.
3151
3152 2003-04-25  Alan Modra  <amodra@bigpond.net.au>
3153
3154         * elflink.h (elf_merge_symbol): When we find a regular definition
3155         for an indirect symbol, flip the indirection so that the old
3156         direct symbol now points to the new definition.
3157
3158 2003-04-24  Roland McGrath  <roland@redhat.com>
3159
3160         * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3161
3162 2003-04-24  Alan Modra  <amodra@bigpond.net.au>
3163
3164         * elf32-ppc.c: Formatting and comment fixes.
3165         (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3166         (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3167
3168 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3169
3170         * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3171         * bfd-in2.h: Rebuilt.
3172         * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3173         * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3174         & H8300SNMAGIC.
3175         (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3176         * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3177         (h8300sn_info_struct, h8300hn_info_struct): New.
3178         * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3179         (elf32_h8_final_write_processing): Likewise.
3180
3181 2003-04-23  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3182
3183         * elf32-sh.c (tpoff): New.
3184         (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3185         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3186         (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3187         relocations.  Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3188         (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3189         (dtpoff_base): Fix wrong indentation.
3190         (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3191         relocations.  Don't set tls_tpoff32 flag.  Don't make unnecessary
3192         R_SH_TLS_TPOFF32 relocations.
3193
3194 2003-04-23  J"orn Rennecke <joern.rennecke@superh.com>
3195
3196         * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3197         * cpu-sh.c: Likewise.
3198         * elf32-sh.c: Likewise.
3199         * reloc.c (bfd_reloc_code_real): Likewise.
3200         * elf32-sh64-com.c: Change comment to refer to SuperH.
3201         * elf32-sh64.c: Likewise.
3202         * elf64-sh64.c: Likewise.
3203         * bfd-in2.h (enum bfd_architecture): Regenerate.
3204
3205 2003-04-23  Alan Modra  <amodra@bigpond.net.au>
3206
3207         From Julien LEMOINE <speedblue@debian.org>
3208         * elf32-i386.c (elf_i386_info_to_howto): Delete.
3209         (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3210
3211 2003-04-22  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
3212
3213         * archures.c: Replace references to Mitsubishi M32R with references
3214         to Renesas M32R.
3215         * relocs.c: Likewise.
3216         * bfd-in2.h: Regenerate.
3217
3218 2003-04-21  Richard Henderson  <rth@redhat.com>
3219
3220         * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3221         executable when a symbol is defined both regular and dynamic.
3222
3223 2003-04-21  Stephane Carrez  <stcarrez@nerim.fr>
3224
3225         * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3226         (elf32-m68hc1x.lo): Update dependencies
3227         * configure.in: Add elf32-m68hc1x.lo.
3228         * configure: Rebuild.
3229         * Makefile.in: Rebuild.
3230
3231 2003-04-21  Stephane Carrez  <stcarrez@nerim.fr>
3232
3233         * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3234         (m68hc11_elf_hash_table_create): New function.
3235         (elf32_m68hc11_link_hash_table_free): New function.
3236         (stub_hash_newfunc): New function.
3237         (m68hc11_add_stub): New function.
3238         (elf32_m68hc11_add_symbol_hook): New function.
3239         (elf32_m68hc11_setup_section_lists): New function.
3240         (elf32_m68hc11_next_input_section): New function.
3241         (elf32_m68hc11_size_stubs): New function.
3242         (elf32_m68hc11_build_stubs): New function.
3243         (m68hc11_get_relocation_value): New function.
3244         (elf32_m68hc11_relocate_section): Call the above to redirect
3245         some relocations to the trampoline code.
3246         (m68hc11_elf_export_one_stub): New function.
3247         (m68hc11_elf_set_symbol): New function.
3248         (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3249         (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3250         is not yet initialized.
3251
3252         * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3253         (elf32_m68hc11_stub_hash_entry): New struct.
3254         (m68hc11_page_info): Add trampoline handler address.
3255         (m68hc11_elf_link_hash_table): Add stubs generation members.
3256         (elf32_m68hc11_add_symbol_hook): Declare.
3257         (elf32_m68hc11_setup_section_lists): Declare.
3258         (elf32_m68hc11_size_stubs): Declare.
3259         (elf32_m68hc11_build_stubs): Declare.
3260
3261         * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3262         (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3263         (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3264         (_bfd_m68hc11_elf_set_private_flags): Ditto.
3265         (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3266         (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3267         (bfd_elf32_bfd_link_hash_table_create): Define.
3268         (elf_backend_add_symbol_hook): Define.
3269         (m68hc11_elf_bfd_link_hash_table_create): New function.
3270         (m68hc11_elf_build_one_stub): New function.
3271         (m68hc11_elf_size_one_stub): New function.
3272         (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3273         (bfd_elf32_bfd_link_hash_table_create): Define.
3274
3275         * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3276         (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3277         (m68hc12_phys_addr): Ditto.
3278         (m68hc12_phys_page): Ditto.
3279         (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3280         (elf32_m68hc11_gc_mark_hook): Likewise.
3281         (elf32_m68hc11_gc_sweep_hook): Likewise.
3282         (elf32_m68hc11_check_relocs): Likewise.
3283         (elf32_m68hc11_relocate_section): Likewise.
3284         (_bfd_m68hc12_elf_set_private_flags): Likewise.
3285         (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3286         (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3287         (m68hc12_elf_build_one_stub): New function.
3288         (m68hc12_elf_size_one_stub): New function.
3289         (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3290         (elf_backend_add_symbol_hook): Define.
3291         (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3292
3293 2003-04-18  Nick Clifton  <nickc@redhat.com>
3294
3295         * format.c (bfd_check_format_matches): Only check associated
3296         vector if the matching_vector has been created.
3297
3298 2003-04-15  Alexandre Oliva  <aoliva@redhat.com>
3299
3300         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3301         2003-04-09's change.
3302
3303 2003-04-15  Brian Ford  <ford@vss.fsi.com>
3304
3305         * peicode.h (coff_swap_scnhdr_in): If a section holds
3306         uninitialized data and is from an object file or from an
3307         executable image that has not initialized the s_size field, or if
3308         the physical size is padded, use the virtual size (stored in
3309         s_paddr) instead.
3310
3311 2003-04-15  H.J. Lu <hjl@gnu.org>
3312
3313         * elflink.h (elf_link_add_object_symbols): Properly report
3314         filename for alignment reduction.
3315
3316 2003-04-15  Rohit Kumar Srivastava <rohits@kpitcummins.com>
3317
3318         * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3319         * reloc.c: Likewise.
3320         * coff-h8300.c: Likewise.
3321         * coff-h8500.c: Likewise.
3322         * coff-sh.c: Likewise.
3323         * cpu-h8300.c: Likewise.
3324         * cpu-sh.c: Likewise.
3325         * elf32-h8300.c: Likewise.
3326         * elf32-sh.c: Likewise.
3327         * elf32-sh64-com.c: Likewise.
3328         * elf32-sh64.c: Likewise.
3329         * elf64-sh64.c: Likewise.
3330         * bfd-in2.h: Regenerate.
3331
3332 2003-04-14  H.J. Lu <hjl@gnu.org>
3333
3334         * elflink.h (elf_link_add_object_symbols): Maintain maximum
3335         alignment for common symbols. Warn reducing alignment for
3336         common symbols. Report old filename when symbol size changes.
3337
3338 2003-04-12  Alexandre Oliva  <aoliva@redhat.com>
3339
3340         * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3341         occurrences of the same test changed in the previous patch.
3342         Optimize.
3343
3344 2003-04-11  Alexandre Oliva  <aoliva@redhat.com>
3345
3346         * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3347         (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3348         GOT_DISP/addend only if the symbol got a global GOT entry.
3349
3350 2003-04-10  Alexandre Oliva  <aoliva@redhat.com>
3351
3352         * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3353         GOT_PAGE/GOT_OFST referencing overridable symbol to
3354         GOT_DISP/addend.
3355         (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3356         global symbol as GOT_DISP.
3357
3358 2003-04-10  Bob Wilson  <bob.wilson@acm.org>
3359
3360         * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3361         next relocation on an undefined symbol.
3362
3363 2003-04-09  Richard Henderson  <rth@redhat.com>
3364
3365         * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3366         Ignore relocations against r_symndx == 0.
3367
3368 2003-04-09  H.J. Lu <hjl@gnu.org>
3369
3370         * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3371         FALSE for undefined symbols.
3372         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3373
3374 2003-04-09  Alexandre Oliva  <aoliva@redhat.com>
3375
3376         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3377         and IRIX-specific shift-to-64-bit 4-byte lengths before following
3378         addr_size.
3379
3380 2003-04-08  Alexandre Oliva  <aoliva@redhat.com>
3381
3382         * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3383         pointer size from ABI, not arch_bits_per_address.
3384
3385 2003-04-07  Kevin Buettner  <kevinb@redhat.com>
3386
3387         * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3388         constants for n32 ABI.
3389
3390 2003-04-06  Andrew Cagney  <cagney@redhat.com>
3391
3392         * simple.c (bfd_simple_get_relocated_section_contents): Disable
3393         free that leads to GDB vs BFD memory corruption.
3394
3395 2003-04-04  Stephane Carrez  <stcarrez@nerim.fr>
3396
3397         * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3398         symbols that mark the end of the section.
3399         (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3400         converting to a relative branch so that the offset is computed after
3401         the relaxation; also relocate a jsr into a bsr if possible but don't
3402         relax them if they are to a far symbol as we need to call the
3403         trampoline code.
3404         (elf_m68hc11_howto_table): Set pcrel_offset to true.
3405
3406 2003-04-04  Svein E. Seldal  <Svein.Seldal@solidas.com>
3407
3408         * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3409         bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3410         * bfd-in2.h: Regenerate
3411         * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3412         * cpu-tic4x.c: Ditto
3413
3414 2003-04-03  Nick Clifton  <nickc@redhat.com>
3415
3416         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3417         differently for object files and executables.
3418         * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3419         for object files or for executables who have not already
3420         initialised the field.
3421         * libpei.h (bfd_pe_executable_p): New macro.  Return true if
3422         the PE format bfd is an executable.
3423
3424 2003-04-03  Alan Modra  <amodra@bigpond.net.au>
3425
3426         * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3427         here as it's too early to reliably determine locality.
3428         (ppc_elf_gc_sweep_hook): Likewise.
3429         (SYMBOL_REFERENCES_LOCAL): Expand comment.
3430
3431 2003-04-02  Bob Wilson  <bob.wilson@acm.org>
3432
3433         * xtensa-modules.c: Remove comment indicating that this is a
3434         generated file.
3435
3436 2003-04-02  Alan Modra  <amodra@bigpond.net.au>
3437
3438         * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3439
3440 2003-04-01  Bob Wilson  <bob.wilson@acm.org>
3441
3442         * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3443         (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3444         (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3445         xtensa-modules.lo.
3446         (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3447         xtensa-modules.c.
3448         (cpu-xtensa.lo): New target.
3449         (elf32-xtensa.lo): Likewise.
3450         (xtensa-isa.lo): Likewise.
3451         (xtensa-modules.lo): Likewise.
3452         * Makefile.in: Regenerate.
3453         * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3454         (bfd_archures_list): Add bfd_xtensa_arch.
3455         * config.bfd: Handle xtensa-*-*.
3456         * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3457         * configure: Regenerate.
3458         * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3459         PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3460         * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3461         (bfd_elf32_xtensa_le_vec): Likewise.
3462         (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3463         * cpu-xtensa.c: New file.
3464         * elf32-xtensa.c: Likewise.
3465         * xtensa-isa.c: Likewise.
3466         * xtensa-modules.c: Likewise.
3467         * libbfd.h: Regenerate.
3468         * bfd-in2.h: Likewise.
3469
3470 2003-04-01  Nick Clifton  <nickc@redhat.com>
3471
3472         * archures.c (bfd_mach_arm_unknown): Define.
3473         * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3474         bfd_arm_get_mach_from_notes): Prototype.
3475         * bfd-in2.h: Regenerate.
3476         * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3477         bfd_arm_merge_machines.
3478         (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3479         * coffcode.h (coff_set_arch_mach_hook): Call
3480         bfd_arm_get_mach_from_notes.
3481         * coffgen.c (coff_real_object_p): Revert previous delta.
3482         * cpu_arm.c (arm_check_note): New function.  Examine a note in a
3483         .note section.
3484         (bfd_arm_merge_machines): New function: Handle the merging of ARM
3485         binaries compiled for different architectures..
3486         (bfd_arm_update_notes): New function: Update an ARM note section.
3487         (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3488         number from an ARM note section.
3489         * elf32-arm.h (elf32_arm_object_p): Use
3490         bfd_arm_get_mach_from_notes.
3491         (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3492         (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3493
3494 2003-04-01  Ben Elliston  <bje@wasabisystems.com>
3495
3496         * dwarf2.c (read_attribute_value): Correct typo in comment.
3497
3498 2003-04-01  Nick Clifton  <nickc@redhat.com>
3499
3500         * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3501         instead of concat().
3502         (decode_line_info): Only free filename if it is not NULL.
3503         (add_line_info): Make a copy of the filename when storing it into
3504         the info structure.
3505
3506 2003-03-31  Andreas Schwab  <schwab@suse.de>
3507             Daniel Jacobowitz  <drow@mvista.com>
3508
3509         * simple.c (bfd_simple_get_relocated_section_contents): Add
3510         parameter symbol_table.  Optionally use it instead of the symbol
3511         table from the bfd.  Save and restore output offsets and output
3512         sections  around bfd_get_relocated_section_contents.  Fix a memory
3513         leak.
3514         (simple_save_output_info, simple_restore_output_info): New
3515         functions.
3516         * bfd-in2.h: Regenerate.
3517         * dwarf2.c (read_abbrevs): Use
3518         bfd_simple_get_relocated_section_contents instead of
3519         bfd_get_section_contents.
3520         (decode_line_info): Likewise.
3521         (_bfd_dwarf2_find_nearest_line): Likewise.  Don't call
3522         find_rela_addend.
3523         (find_rela_addend): Remove.
3524         * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3525         debugging sections.
3526         (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3527         not bfd_zalloc.
3528
3529 2003-03-31  David Heine  <dlheine@suif.stanford.edu>
3530
3531         * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3532         bfd_alloc.
3533         * dwarf2.c (concat_filename): Always allocate space for the
3534         returned filename.
3535         (decode_line_info): Free the allocated filename returned by
3536         concat_filename.
3537         * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3538         * elf.c (copy_private_bfd_data): Likewise.
3539         (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3540         * elflink.h (elf_link_sort_relocs): Fix memory leak.
3541         * format.c (bfd_check_format_matches): Likewise.
3542         * linker.c (bfd_generic_final_link): Likewise.
3543         * opncls.c (find_separate_debug_info): Likewise.
3544         * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3545
3546 2003-03-28  H.J. Lu <hjl@gnu.org>
3547
3548         * elflink.h (elf_link_add_object_symbols): Correctly combine
3549         visibilities.
3550
3551 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
3552
3553         * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3554         to -1 before recomputing got offsets.
3555
3556 2003-03-26  Andreas Schwab  <schwab@suse.de>
3557
3558         * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3559         (elf_m68k_relocate_section): Use it to correctly handle symbols
3560         forced to be local.
3561         (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3562         entries for symbols that are forced to be local.
3563
3564 2003-03-25  Alexandre Oliva  <aoliva@redhat.com>
3565
3566         * elfxx-mips.c (_bfd_mips_relax_section): New function.
3567         * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3568         * elfn32-mips.c, elf64-mips.c: Use it.
3569
3570 2003-03-25  Stan Cox   <scox@redhat.com>
3571             Nick Clifton  <nickc@redhat.com>
3572
3573         Contribute support for Intel's iWMMXt chip - an ARM variant:
3574
3575         * archures.c: Add bfd_mach_arm_iWMMXt.
3576         * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3577         * bfd-in2.h: Regenerate.
3578         * libbfd.h: Regenerate.
3579         * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3580         object files to be linked with XScale ones.
3581         (coff_arm_final_link_postscript): Update note section.
3582         * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3583         * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3584         after identifying a coff binary.
3585         * cpu-arm.c (processors): Add iWMMXt.
3586         (arch_inf): Likewise.
3587         * elf32-arm.h (arm_object_p): Handle note section.
3588         (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3589         be linked with XScale ones.
3590         (elf32_arm_section_flags): New function: Set flags on note section.
3591         (elf32_arm_final_write_processing): Handle note section.
3592
3593 2003-03-21  DJ Delorie  <dj@redhat.com>
3594
3595         * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3596         _bfd_elf_rela_local_sym.
3597
3598 2003-03-20  H.J. Lu <hjl@gnu.org>
3599
3600         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3601         non-ELF outputs.
3602
3603 2003-03-20  Nick Clifton  <nickc@redhat.com>
3604
3605         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3606         $idata5 in case bfd_coff_final_link is not called.
3607
3608 2003-03-19  Jakub Jelinek  <jakub@redhat.com>
3609
3610         * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3611         field.
3612         (canon_reloc_count): Define.
3613         (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3614         sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3615         reloc_count.
3616         (sparc64_elf_canonicalize_reloc): New routine.
3617         (bfd_elf64_canonicalize_reloc): Define.
3618
3619 2003-03-18  Jakub Jelinek  <jakub@redhat.com>
3620
3621         * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3622         againt mergeable sections.  Take r_addend into account when caching
3623         trampolines.
3624
3625 2003-03-18  Richard Henderson  <rth@redhat.com>
3626
3627         * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3628         local symbols that have no dyninfo.
3629
3630 2003-03-14  Gene Smith  <gene.smith@siemens.com>
3631
3632         * ieee.c (ieee_write_expression): Handle the case where symbol is
3633         NULL.
3634         General formatting improvements.
3635
3636 2003-03-13  Nick Clifton  <nickc@redhat.com>
3637
3638         * configure.in (LINGUAS): Add zh_CN.
3639         * configure: Regenerate.
3640         * po/zh_CN.po: New file.
3641
3642 2003-03-13  Elias Athanasopoulos  <elathan@phys.uoa.gr>
3643
3644         * aout-cris.c (BYTES_IN_WORD): Don't define.
3645         aout-encap.c: Likewise.
3646         aout-ns32k.c: Likewise.
3647         aout-tic30.c: Likewise.
3648         hp300bsd.c: Likewise.
3649         i386aout.c: Likewise.
3650         i386dynix.c: Likewise.
3651         i386linux.c: Likewise.
3652         i386lynx.c: Likewise.
3653         i386mach3.c: Likewise.
3654         m68k4knetbsd.c: Likewise.
3655         m68klinux.c: Likewise.
3656         m68klynx.c: Likewise.
3657         m68knetbsd.c: Likewise.
3658         m88kmach3.c: Likewise.
3659         mipsbsd.c: Likewise.
3660         newsos3.c: Likewise.
3661         sparclinux.c: Likewise.
3662         sparclynx.c: Likewise.
3663         sparcnetbsd.c: Likewise.
3664         vaxbsd.c: Likewise. Fix comment formatting.
3665
3666 2003-03-12  Alexandre Oliva  <aoliva@redhat.com>
3667
3668         * Reverted 2003-03-02's patch.
3669
3670         * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3671         overridable.
3672         * elf64-mips.c (mips_elf64_canonicalize_reloc,
3673         mips_elf64_get_dynamic_reloc_upper_bound,
3674         mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3675         (bfd_elf64_get_canonicalize_reloc,
3676         bfd_elf64_get_dynamic_reloc_upper_bound,
3677         bfd_elf64_canonicalize_dynamic_reloc): Define.
3678         (mips_elf64_slurp_reloc_table): Support dynamic.
3679         (mips_elf64_slurp_one_reloc_table): Adjust.
3680
3681 2003-03-12  Nick Clifton  <nickc@redhat.com>
3682
3683         * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3684         'index' to 'offset' in test for zero value.
3685
3686 2003-03-11  Alexandre Oliva  <aoliva@redhat.com>
3687
3688         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3689         dynamic relocations pointing to local or section symbols, use the
3690         NULL symbol instead.  Document the choice to not emit an
3691         additional R_MIPS_64 relocation.
3692
3693 2003-03-11  Alan Modra  <amodra@bigpond.net.au>
3694
3695         * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3696         zero index dynamic tls relocs generated for the GOT.  Tidy code.
3697         Set "relocation" to 1 on DTPMOD32 relocs.  Optimize HA adjustment.
3698         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3699
3700 2003-03-07  Alan Modra  <amodra@bigpond.net.au>
3701
3702         * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3703         a tls_get_addr call.
3704
3705         * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3706         (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3707         ELF_LINK_NON_GOT_REF from weakdef.
3708         * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3709         (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3710         ELF_LINK_NON_GOT_REF from weakdef.
3711         * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one.  Use throughout.
3712         (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3713         ELF_LINK_NON_GOT_REF from weakdef.
3714
3715 2003-03-06  Jakub Jelinek <jakub@redhat.com>
3716         Andrew Haley  <aph@redhat.com>
3717
3718         * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3719         output is relocateable.
3720
3721 2003-03-06  Steven Konopa <skonopa@kgo.csc.com>
3722
3723         * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3724         R_COMMENT.
3725
3726 2003-03-06  Alan Modra  <amodra@bigpond.net.au>
3727
3728         * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3729         error messages.
3730         (ELIMINATE_COPY_RELOCS): Define to zero.
3731         (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3732         TLSLD relocs.  Report reloc types on a number of errors.  Optimize
3733         LOCAL24PC check for non-local syms.  Don't capitalize error messages.
3734         * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3735         (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3736         calculating TLSLD relocs.  Report reloc types on a number of errors.
3737         Don't capitalize error messages.
3738
3739 2003-03-03  H.J. Lu <hjl@gnu.org>
3740
3741         * elfxx-ia64.c (USE_BRL): Removed.
3742         (oor_ip): Removed.
3743
3744 2003-03-03  J"orn Rennecke <joern.rennecke@superh.com>
3745
3746         * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3747         relocation (no special function), and make it non-partial_inplace.
3748         (sh_elf_relax_section): When creating a bsr, use a consistent value
3749         no matter if the symbol is extern or not;  set addend to -4.
3750         Don't swap load / non-load instructions for SH4.
3751         (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3752         rather than if the symbol is external to determine if adjusting the
3753         offset makes sense.  Adjust the addend too if appropriate.
3754         (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3755         relocation.
3756
3757 2003-03-03  Nick Clifton  <nickc@redhat.com>
3758
3759         * po/da.po: Installed latest translation.
3760
3761 2003-03-02  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3762
3763         * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3764         R_MIPS_PC16 to rightshift 2.
3765         (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3766         (bfd_elf32_bfd_reloc_type_lookup): Support
3767         BFD_RELOC_MIPSEMB_16_PCREL_S2.
3768         * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3769         R_MIPS_PC16 to rightshift 2.
3770         (mips_elf64_howto_table_rela): Likewise.
3771         (mips_reloc_map): Map to rightshifted BFD reloc.
3772         * elfn32-mips.c: The same as in elf64-mips.c.
3773         * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3774         (mips_elf_calculate_relocation): Handle rightshifted addends for
3775         R_MIPS_PC16.
3776         * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3777         MIPS Embedded PIC. Remove superfluous empty COMMENT.
3778         * libbfd.h: Regenerate.
3779         * bfd-in2.h: Regenerate.
3780
3781 2003-02-28  Richard Henderson  <rth@redhat.com>
3782
3783         * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3784         for ltoff22x relaxation.
3785
3786 2003-03-01  Alan Modra  <amodra@bigpond.net.au>
3787
3788         * bfd-in.h (_bfd): Don't define.
3789         * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3790         * syms.c: Likewise.
3791         * bfd-in2.h: Regenerate.
3792
3793 2003-02-27  Richard Henderson  <rth@redhat.com>
3794
3795         * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3796         (elfNN_ia64_check_relocs): Set it.
3797         (allocate_global_data_got): Check it.
3798         (allocate_local_got): Likewise.
3799         (allocate_dynrel_entries): Likewise.
3800         (elfNN_ia64_relax_ldxmov): New.
3801         (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3802         (elfNN_ia64_choose_gp): Split out from ...
3803         (elfNN_ia64_final_link): ... here.
3804
3805 2003-02-27  Andrew Cagney  <cagney@redhat.com>
3806
3807         * bfd.c (struct bfd): Rename "struct _bfd".
3808         * bfd-in.h: Update copyright.
3809         (struct bfd): Rename "struct _bfd".
3810         (_bfd): Define for backward compatibility.
3811         * bfd-in2.h: Regenerate.
3812
3813 2003-02-25  Alan Modra  <amodra@bigpond.net.au>
3814
3815         * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3816         and rel_hdr2 when initially counting input relocs rather than after
3817         creating output reloc sections.
3818         (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3819         sizes.
3820
3821         * Makefile.am: Run "make dep-am".
3822         * Makefile.in: Regenerate.
3823
3824 2003-02-24  Kris Warkentin  <kewarken@qnx.com>
3825
3826         * elf.c (elfcore_read_notes): Add check for QNX style core file.
3827         (elfcore_grog_nto_note): New function.
3828         (elfcore_grog_nto_gregs): New function.
3829         (elfcore_grog_nto_status): New function.
3830
3831 2003-02-24  Alan Modra  <amodra@bigpond.net.au>
3832
3833         * elflink.c (_bfd_elf_create_got_section): Check existing .got
3834         section flags before concluding that we've already been called.
3835         Don't use register keyword.
3836         (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3837         (_bfd_elf_create_linker_section): Formatting.
3838
3839 2003-02-20  jmc  <jmc@prioris.mini.pw.edu.pl>
3840
3841         * coff-h8300.c: Fix typo: intial -> initial.
3842         * coff-ppc.c: Likewise.
3843
3844 2003-02-20  Alan Modra  <amodra@bigpond.net.au>
3845
3846         * elf32-ppc.c: Formatting.
3847         (allocate_dynrelocs): LD and GD relocs against the same sym need
3848         separate GOT entries.
3849         (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3850         entries per symbol.
3851
3852 2003-02-19  Alan Modra  <amodra@bigpond.net.au>
3853
3854         * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3855         removal.  Localize vars.  Remove unnecessary dynobj test.
3856         * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3857         of INFO.
3858         (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3859         and optimize.
3860         (elf_i386_relocate_section): Likewise.
3861         (elf_i386_gc_sweep_hook): Simplify dyn reloc removal.  Localize vars.
3862         * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3863         * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3864         * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3865         * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3866         * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.  Remove
3867         local_dynrel for section too.  Don't touch HIPLT22, LOPLT10, PCPLT32
3868         or PCPLT10 relocs.  Don't subtract twice on PLT32 relocs.
3869         Formatting.
3870
3871         * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3872         (ppc64_elf_check_relocs): Use it.  Correct comment.  Move SEC_ALLOC
3873         test.
3874         (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3875         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3876         (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3877         and optimize.  Use ELIMINATE_COPY_RELOCS.
3878         (ppc64_elf_relocate_section): Likewise.
3879
3880         * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3881         (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3882         (ELIMINATE_COPY_RELOCS): Define.
3883         (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3884         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3885         (MUST_BE_DYN_RELOC): Define.
3886         (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3887         and optimize.  Trim dyn_relocs.
3888         (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3889         not be used.  Do generate dyn_relocs for copy reloc avoidance.  Keep
3890         track of pc_rel dyn relocs.
3891         (ppc_elf_relocate_section): Remove "will_become_local".  Adjust
3892         WILL_CALL_FINISH_DYNAMIC_SYMBOL use.  Trim dyn relocs as per
3893         allocate_dynrelocs.  Don't recalculate "sec".
3894
3895 2003-02-18  Alan Modra  <amodra@bigpond.net.au>
3896
3897         * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3898         * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3899         on invalid LD relocs.
3900         (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3901         (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3902         tlsld_got entry.  Use IS_PPC64_TLS_RELOC.
3903
3904         * elf32-ppc.h: New file.
3905         * elf32-ppc.c: Include elf32-ppc.h.
3906         (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3907         (struct ppc_elf_link_hash_entry): Rename "root" to "elf".  Adjust uses.
3908         Add "tls_mask" field.
3909         (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3910         (struct ppc_elf_link_hash_table): Rename "root" to "elf".  Adjust uses.
3911         Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3912         sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3913         Make use of htab shortcuts throughout file.
3914         (ppc_elf_link_hash_newfunc): Init tls_mask field.
3915         (ppc_elf_link_hash_table_create): Init new fields.
3916         (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3917         (ppc_elf_howto_raw): Add tls relocs.
3918         (ppc_elf_reloc_type_lookup): Handle them.
3919         (ppc_elf_unhandled_reloc): New function.
3920         (ppc_elf_create_got): Stash got section pointer in hash table,
3921         return status.  Make .rela.got too.
3922         (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3923         (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3924         NON_GOT_REF set.  Don't allocate space in .plt here..
3925         (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3926         not allocating plt entries unnecessarily.  Allocate got entries here.
3927         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3928         (ppc_elf_size_dynamic_sections): Allocate local got entries.  Pass
3929         "info" during allocate_dynrelocs hash traversal.  Use htab section
3930         shortcuts rather than searching for named sections.  Get rid of
3931         "plt" and "strip" booleans.
3932         (update_local_sym_info, bad_shared_reloc): New functions.
3933         (ppc_elf_check_relocs): Handle TLS relocs.  Move .rela.got creation to
3934         ppc_elf_create_got.  Don't mark got or plt reloc syms dynamic, do so
3935         in allocate_dynreloc.  Use update_local_sym_info and bad_shared_reloc.
3936         Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3937         R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3938         in shared libs.  R_PPC_PLTREL32 is a plt reloc too.  Refcount all
3939         relocs that might use a plt entry.  Set NON_GOT_REF too.
3940         Enumerate all do-nothing relocs.
3941         (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs.  Handle
3942         tls relocs and all plt relocs.
3943         (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3944         (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3945         (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3946         shortcuts.
3947         (ppc_elf_relocate_section): Tidy.  Handle TLS relocs.  Use
3948         bfd_elf_local_sym_name.  Simplify unresolved reloc code.  Build got
3949         entries and got relocs here.  Warn on non-zero got reloc addend.
3950         Split out branch taken/not taken reloc code into a separate switch
3951         and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
3952         Split out HA reloc adjustments to separate switch statement.  Don't
3953         warn on reloc overflow if we've already warned about undefined.
3954         Don't rebuild sym name when reporting errors.  Report all possible
3955         errors from _bfd_final_link_relocate.
3956         (bfd_elf32_bfd_final_link): Don't define.
3957
3958 2003-02-18  Alan Modra  <amodra@bigpond.net.au>
3959
3960         * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r".  Don't
3961         rebuild sym name when reporting errors.
3962
3963 2003-02-17  Nick Clifton  <nickc@redhat.com>
3964
3965         * elflink.h (elf_link_output_extsym): Only check
3966         allow_shlib_undefined for shared libraries.
3967         * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
3968         of allow_shlib_undefined.
3969         * elf32-cris.c (cris_elf_relocate_section): Likewise.
3970         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3971         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3972         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3973         * elf32-s390.c (elf_s390_relocate_section): Likewise.
3974         * elf32-sh.c (sh_elf_relocate_section): Likewise.
3975         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3976         * elf32-vax.c (elf_vax_relocate_section): Likewise.
3977         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3978         * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
3979         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3980         * elf64-s390.c (elf_s390_relocate_section): Likewise.
3981         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3982         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3983         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3984         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3985
3986 2003-02-17  Nick Clifton  <nickc@redhat.com>
3987
3988         * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
3989         address field to use in the comparison.
3990         (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
3991
3992 2003-02-14  Bob Wilson  <bob.wilson@acm.org>
3993
3994         * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
3995         backends when checking if the generic ELF target should be used.
3996
3997         * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
3998         outside of functions, treat values as absolute addresses.
3999
4000         * bfd.c: Change embedded documentation to use consistent indentation
4001         and to split up long lines.  Change informal style of description
4002         for functions lacking real documentation.
4003         * coffcode.h: Break up long lines in embedded documentation.
4004         * format.c: Likewise.
4005         * targets.c: Likewise.
4006         * libcoff.h: Regenerate.
4007         * bfd-in2.h: Regenerate.
4008
4009 2003-02-14  Alan Modra  <amodra@bigpond.net.au>
4010
4011         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4012         (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4013         (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4014         (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4015         (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4016         (group_sections): Don't share a stub section if stubs are for a large
4017         section.  Adjust comment.
4018         (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4019         !stubs_always_before_branch.
4020         (ppc64_elf_relocate_section): Initialize tlsld GOT entry once.  Don't
4021         treat undefined and undefweak specially when processing dyn relocs.
4022
4023 2003-02-13  Jakub Jelinek  <jakub@redhat.com>
4024
4025         * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4026
4027 2003-02-13  Nick Clifton  <nickc@redhat.com>
4028
4029         * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4030         in computation of offset to insert into BL instruction.
4031
4032 2003-02-11  Uwe Stieber  <uwe@wwws.de>
4033
4034         * config.bfd: Add support for kaOS as cross build target system.
4035
4036 2003-02-11  Alan Modra  <amodra@bigpond.net.au>
4037
4038         * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4039         .__tls_get_addr too.
4040         (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4041
4042 2003-02-10  Kaz kojima  <kkojima@rr.iij4u.or.jp>
4043
4044         * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4045         (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4046         (sh_elf_link_hash_newfunc): Remove the initialization of
4047         tls_tpoff32 field.
4048         (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4049         for which tls_tpoff32 flag is set.
4050         (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4051         of the symbol includes the entry matched with the input_section
4052         and having tls_tpoff32 flag on.  When linking statically, set
4053         symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4054         is defined in this executable.
4055         (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4056
4057 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
4058
4059         * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4060         even if there is just non-empty .rela.plt.
4061
4062 2003-02-10  Nick Clifton  <nickc@redhat.com>
4063
4064         * archures.c (bfd_mach_arm_ep9312): Define.
4065         * bfd-in2.h: Regenerate.
4066         * cpu-arm.c (processors[]): Add ep9312.
4067         (bfd_arm_arch): Add ep9312.
4068         * elf32-arm.h (elf32_arm_merge_private_data): Update error
4069         messages and add test for Maverick floating point support.
4070         (elf32_arm_print_private_bfd_data): Handle
4071         EF_ARM_MAVERICK_FLOAT flag.
4072         (elf32_arm_object_p): New function.
4073         (elf_backend_object_p): Define.
4074
4075 2003-02-10  Alan Modra  <amodra@bigpond.net.au>
4076
4077         * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4078         variables, structure fields or function params to tls_mask or
4079         similar to better reflect usage.
4080         (struct got_entry): Comment.
4081         (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4082         (get_tls_mask): Rename from get_tls_type.
4083
4084 2003-02-09  Alan Modra  <amodra@bigpond.net.au>
4085
4086         * elf64-ppc.c (TLS_GD_LD): Don't define..
4087         (TLS_GD): ..define this instead and update all uses.
4088         (TLS_TPRELGD): Define.
4089         (ppc64_elf_link_hash_table_create): Tweak initialization of
4090         init_refcount and init_offset.
4091         (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4092         Mark second slot of GD or LD toc entries.
4093         (get_tls_type): Return an int.  Distinguish toc GD and LD entries
4094         from other tls types.
4095         (ppc64_elf_tls_setup): New function, split out from..
4096         (ppc64_elf_tls_optimize): ..here.  Don't optimize when symbols are
4097         defined in a dynamic object.  Fix LD optimization.  Don't set TLS_TPREL
4098         on GD->IE optimization, use TLS_TPRELGD instead.  Use get_tls_type
4099         return value to properly decide whether toc GD and LD entries can
4100         optimize away __tls_get_addr call.  Check next reloc after DTPMOD64
4101         to determine GD or LD rather than looking at TLS_LD flag.  Don't
4102         attempt to adjust got entry tls_type here..
4103         (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4104         look for possible merges.
4105         (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4106         optimization.
4107         (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4108         (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4109         Make use of return value from get_tls_type to properly detect GD and
4110         LD optimizations.  Split tlsld/gd hi/ha from lo/ds case.  Don't
4111         handle tls_get_addr removal when looking at REL24 relocs, do it when
4112         looking at the previous reloc.  Check reloc after DTPMOD64 to determine
4113         GD or LD.
4114         * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4115
4116 2003-02-08  Alan Modra  <amodra@bigpond.net.au>
4117
4118         * elf32-hppa.c (group_sections): Don't share a stub section if
4119         stubs are for a large section.
4120
4121         * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4122         stubs if !stubs_always_before_branch.
4123
4124 2003-02-07  Nick Clifton  <nickc@redhat.com>
4125
4126         * elf.c (swap_out_syms): Generate an error message if an
4127         equivalent output section cannot be found for a symbol.
4128
4129 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
4130
4131         * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4132         local_got_entries is NULL.
4133
4134 2003-02-06  Andreas Schwab  <schwab@suse.de>
4135
4136         * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4137         (read_value): Add parameter is_signed, use signed extraction if
4138         the value is signed.
4139         (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4140         encoding to read_value.
4141
4142 2003-02-06  Alan Modra  <amodra@bigpond.net.au>
4143
4144         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4145         plt info when called to transfer weak sym info.
4146
4147 2003-02-05  Alan Modra  <amodra@bigpond.net.au>
4148
4149         * reloc.c: Add PPC and PPC64 TLS relocs.
4150         * libbfd.h: Regenerate.
4151         * bfd-in2.h: Regenerate.
4152         * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4153         (ppc64_elf_howto_raw): Add TLS howto's.  Adjust R_PPC64_NONE to be
4154         against a 32 bit field.
4155         (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4156         (_ppc64_elf_section_data): Add t_symndx and comments.
4157         (ppc64_elf_section_data): Use elf_section_data macro.
4158         (ppc64_elf_new_section_hook): American spelling.
4159         (struct got_entry, struct plt_entry): New.
4160         (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4161         (struct ppc_stub_hash_entry): Add "addend" field.
4162         (struct ppc_link_hash_entry): Add "tls_type".
4163         (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4164         TLS_EXPLICIT): Define.
4165         (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4166         (link_hash_newfunc): Init new fields.
4167         (ppc64_elf_link_hash_table_create): Likewise.  Set init_refcount and
4168         init_offset to NULL.
4169         (ppc64_elf_copy_indirect_symbol): Copy got and plt info.  Don't call
4170         _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4171         there.
4172         (update_local_sym_info, update_plt_info): New functions.
4173         (ppc64_elf_check_relocs): Use them.  Handle TLS relocs.  Adjust GOT
4174         handling to use got.glist rather than got.refcount.  Likewise for PLT.
4175         (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4176         (func_desc_adjust): Adjust for new PLT list.
4177         (ppc64_elf_adjust_dynamic_symbol): Likewise.
4178         (get_sym_h, get_tls_type): New functions.
4179         (ppc64_elf_edit_opd): Remove unused variable.  Use get_sym_h.
4180         (ppc64_elf_tls_optimize): New function.
4181         (allocate_dynrelocs): Adjust for new PLT and GOT lists.  Allocate
4182         TLS relocs.
4183         (ppc64_elf_size_dynamic_sections): Likewise.
4184         (ppc_type_of_stub): Adjust for new PLT list.
4185         (ppc_build_one_stub): Likewise.
4186         (ppc64_elf_size_stubs): Likewise.  Use get_sym_h.  Treat __tls_get_addr
4187         calls specially.
4188         (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists.  Handle
4189         TLS relocs.  Report local syms using bfd_elf_local_sym_name.  Don't
4190         init GOT entries that have a reloc.  Generate GOT relocs here..
4191         (ppc64_elf_finish_dynamic_symbol): ..not here.  Adjust for PLT list.
4192         * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4193
4194 2003-02-04  Andreas Schwab  <schwab@suse.de>
4195
4196         * elf32-m68k.c (elf_m68k_hash_entry): Define.
4197         (elf_m68k_link_hash_traverse): Remove.
4198         (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4199         elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4200         reduce casting.
4201         (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4202         casting.
4203         (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4204         instead of elf_m68k_link_hash_traverse.
4205         (elf_m68k_discard_copies): Change first parameter to pointer to
4206         struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4207         elf_m68k_link_hash_entry is needed.
4208
4209 2003-02-04  Alan Modra  <amodra@bigpond.net.au>
4210
4211         * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4212         (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4213         "got" union, and declare as gotplt_union.  Use gotplt_uinion for
4214         "plt" field.
4215         (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4216         Add "init_offset" field.
4217         (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4218         (elf_local_got_ents): Declare.
4219         * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4220         and "plt".
4221         (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4222         (_bfd_elf_link_hash_table_init): Set "init_offset".
4223         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4224         from init_offset.
4225         (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4226
4227         * elf.c (bfd_elf_local_sym_name): Split out from..
4228         (group_signature): ..here.
4229         * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4230
4231 2003-02-04  Alan Modra  <amodra@bigpond.net.au>
4232
4233         * elf-bfd.h (enum elf_link_info_type): Remove.
4234         (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4235         to struct sec.  Remove linkonce_p field.
4236         (elf_linkonce_p): Delete.
4237         (elf_discarded_section): Update for sec_info_type change.
4238         * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4239         flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4240         (ELF_INFO_TYPE_NONE): Define.
4241         (ELF_INFO_TYPE_STABS): Define.
4242         (ELF_INFO_TYPE_MERGE): Define.
4243         (ELF_INFO_TYPE_EH_FRAME): Define.
4244         (ELF_INFO_TYPE_JUST_SYMS): Define.
4245         (STD_SECTION): Update struct sec initializer.
4246         * ecoff.c (bfd_debug_section): Likewise.
4247         * elf.c: Likewise.  Update occurrences of sec_info_type and use_rela_p.
4248         * elflink.h: Likewise.
4249         * elf-eh-frame.c: Likewise.
4250         * elf64-alpha.c: Likewise.
4251         * elfxx-ia64.c: Likewise.
4252         * elfxx-mips.c: Likewise.
4253         * bfd-in2.h: Regenerate.
4254
4255         * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4256         referring to used_by_bfd.
4257         * elf64-sparc.c (sec_do_relax): Likewise.
4258         * elf64-mmix.c (mmix_elf_section_data): Likewise.
4259         * elfxx-mips.c (mips_elf_section_data): Likewise.
4260         * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4261         (ieee_get_section_contents): Likewise.
4262         (ieee_new_section_hook): Formatting.
4263         (ieee_canonicalize_reloc): Remove commented out code.
4264         * mmo.c (mmo_section_data): Define.  Use throughout file.
4265         * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4266
4267 2003-01-31  Graydon Hoare <graydon@redhat.com>
4268
4269         * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4270         * Makefile.in: Regenerate.
4271         * opncls.c (calc_crc32, get_debug_link_info,
4272         seperate_debug_file_exists, find_seperate_debug_file): New
4273         internal functions.
4274         (bfd_follow_gnu_debuglink): New function.  Follow the pointer
4275         contained inside a .gnu_debuglink section.
4276         * bfd-in2.h: Regenerate.
4277
4278 2003-01-29  Alexandre Oliva  <aoliva@redhat.com>
4279
4280         * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4281         entry->abfd when it's NULL.
4282
4283 2003-01-27  Alexandre Oliva  <aoliva@redhat.com>
4284
4285         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4286         _bfd_elf_section_offset returning -2 the same way as -1.
4287
4288         * elfxx-mips.c (mips_elf_multi_got): New function.
4289         (struct mips_got_entry): Make symndx and gotidx signed.  Moved
4290         addend into union along with address and link hash entry.
4291         (struct mips_got_info): Added bfd2got and next.
4292         (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4293         (mips_elf_got_section, mips_elf_create_got_section): Use
4294         SEC_EXCLUDE bit to tell whether we really need the got
4295         section.  Take boolean arguments to disregard an excluded
4296         section, or to create it as excluded.  Adjust all callers.
4297         Use mips_elf_got_section all over.
4298         (mips_elf_local_got_index, mips_elf_got_page,
4299         mips_elf_got16_entry): Take input bfd as argument, and pass it
4300         on to mips_elf_create_local_got_entry.
4301         (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4302         Take input bfd as argument, and manage entries in the
4303         appropriate GOT.
4304         (mips_elf_got_offset_from_index): Take input bfd as argument,
4305         and use it to adjust the GP offset of the bfd.
4306         (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4307         unreferenced GOT entries of global symbols to the end.
4308         (mips_elf_record_global_got_symbol): Take input bfd as
4309         argument.  Add entries to the master GOT hash table.
4310         (struct mips_elf_bfd2got_hash): New.
4311         (struct mips_elf_got_per_bfd_arg): New.
4312         (struct mips_elf_set_global_got_offset_arg): New.
4313         (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4314         mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4315         mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4316         mips_elf_merge_gots, mips_elf_set_global_got_offset,
4317         mips_elf_resolve_final_got_entry,
4318         mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4319         mips_elf_got_for_ibfd): New functions.
4320         (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4321         (MIPS_ELF_GOT_MAX_SIZE): New macro.
4322         (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4323         (mips_elf_got_entry_hash): Take new fields into account.  Use
4324         mips_elf_hash_bfd_vma.
4325         (mips_elf_got_entry_eq): Take new fields into account.
4326         (mips_elf_create_got_section): Initialize new fields.
4327         (mips_elf_calculate_relocation): Pass input_bfd to functions
4328         that now take it.  Adjust gp for the input_bfd.
4329         (mips_elf_allocate_dynamic_relocation,
4330         mips_elf_create_dynamic_relocation,
4331         _bfd_mips_elf_create_dynamic_sections): Use...
4332         (mips_elf_rel_dyn_section): New function.  Borrow code from...
4333         (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4334         now take it.  Create the got section if needed, even if
4335         excluded, before recording a global got symbol.  Move some
4336         code to...
4337         (mips_elf_record_local_got_symbol): New fn.
4338         (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4339         Compute multi-got global entries offsets.  Move GOT code to...
4340         (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4341         if the GOT is too big.
4342         (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4343         undefweak symbol to zero.  Generate dynamic relocations for
4344         non-primary GOT entries for global symbols.
4345         (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4346         case.  Generate dynamic relocations for local got entries.
4347         Sort dynamic relocations on N64 too, using...
4348         (sort_dynamic_relocs_64): New fns.
4349         (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4350         (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4351
4352 2003-01-27  Alexandre Oliva  <aoliva@redhat.com>
4353
4354         * bfd.c (struct _bfd): Added id field.
4355         * opncls.c (_bfd_id_counter): New static variable.
4356         (_bfd_new_bfd): Use it.
4357         * bfd-in2.h: Rebuilt.
4358
4359 2003-01-25  Alan Modra  <amodra@bigpond.net.au>
4360
4361         * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4362
4363 2003-01-25  Jakub Jelinek  <jakub@redhat.com>
4364
4365         * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4366         (elf32_sparc_rev32_howto): New variable.
4367         (sparc_reloc_map): Add TLS relocs.
4368         (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4369         Handle REV32.
4370         (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4371         New functions.
4372         (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4373         struct elf32_sparc_link_hash_table):
4374         New structures.
4375         (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4376         elf32_sparc_hash_table): Define.
4377         (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4378         create_got_section, elf32_sparc_create_dynamic_sections,
4379         elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4380         functions.
4381         (elf32_sparc_check_relocs): Handle TLS relocs.  Add dynamic reloc
4382         reference counting.
4383         (elf32_sparc_gc_sweep_hook): Likewise.
4384         (elf32_sparc_adjust_dynamic_symbol): Likewise.
4385         (elf32_sparc_size_dynamic_sections): Likewise.
4386         (elf32_sparc_relocate_section): Likewise.
4387         (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4388         New functions.
4389         (elf32_sparc_object_p): Allocate backend private object data.
4390         (bfd_elf32_bfd_link_hash_table_create,
4391         elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4392         elf_backend_can_refcount): Define.
4393         (elf_backend_create_dynamic_sections): Define to
4394         elf32_sparc_create_dynamic_sections.
4395         * reloc.c: Add SPARC TLS relocs.
4396         * bfd-in2.h, libbfd.h: Rebuilt.
4397         * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4398         (sparc_reloc_map): Likewise.
4399
4400 2003-01-24  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4401
4402         * bfd-in2.h: Regenerate.
4403         * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4404         s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4405         (elf_howto_table): Add TLS relocs.
4406         (elf_s390_reloc_type_lookup): Likewise.
4407         (elf_s390_link_hash_entry): Add tls_type.
4408         (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4409         New macros.
4410         (elf_s390_link_hash_table): Add tls_ldm_got.
4411         (link_hash_newfunc): Initialize tls_type.
4412         (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4413         (elf_s390_copy_indirect_symbol): Copy tls_type information.
4414         (elf_s390_check_relocs): Support TLS relocs.
4415         (elf_s390_gc_sweep_hook): Likewise.
4416         (allocate_dynrelocs): Likewise.
4417         (elf_s390_size_dynamic_sections): Likewise.
4418         (elf_s390_relocate_section): Likewise.
4419         (elf_s390_finish_dynamic_symbol): Likewise.
4420         (bfd_elf32_mkobject): Define for TLS.
4421         * elf64-s390.c: Same changes as for elf32-s390.c.
4422         * libbfd.h: Regenerate.
4423         * reloc.c: Add s390 TLS relocations.
4424
4425 2003-01-24  Charles Lepple  <clepple@ghz.cc>
4426
4427         * aclocal.m4: Fix name of --enable-install-libbfd switch.
4428
4429 2003-01-23  Nick Clifton  <nickc@redhat.com>
4430
4431         * Add sh2e support:
4432         2002-04-02  Elena Zannoni  <ezannoni@redhat.com>
4433         * archures.c (bfd_mach_sh2e): Added.
4434         * bfd-in2.h: Rebuilt.
4435         * cpu-sh.c (arch_info_struct): Added SH2e.
4436         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4437
4438 2003-01-23  Alan Modra  <amodra@bigpond.net.au>
4439
4440         * elf-bfd.h (struct bfd_elf_section_data): Remove tdata.  Change
4441         dynindx to an int.  Rearrange for better packing.
4442         * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4443         * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4444         * elf32-sh64.h: New.  Split out from include/elf/sh.h.
4445         (struct _sh64_elf_section_data): New struct.
4446         (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4447         * elf32-sh64-com.c: Include elf32-sh64.h.
4448         * elf32-sh64.c: Likewise.
4449         (sh64_elf_new_section_hook): New function.
4450         (bfd_elf32_new_section_hook): Define.
4451         (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4452         (sh64_bfd_elf_copy_private_section_data): Likewise.
4453         (sh64_elf_final_write_processing): Likewise.
4454         * elf32-sparc.c (struct elf32_sparc_section_data): New.
4455         (elf32_sparc_new_section_hook): New function.
4456         (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4457         (sec_do_relax): Define.
4458         (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4459         (elf32_sparc_relocate_section): Likewise.
4460         * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4461         * elf64-mmix.c (struct _mmix_elf_section_data): New.
4462         (mmix_elf_section_data): Define.  Use throughout file.
4463         (mmix_elf_new_section_hook): New function.
4464         (bfd_elf64_new_section_hook): Define.
4465         * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4466         (ppc64_elf_section_data): Define.  Use throughout.
4467         (ppc64_elf_new_section_hook): New function.
4468         (bfd_elf64_new_section_hook): Define.
4469         * elf64-sparc.c (struct sparc64_elf_section_data): New.
4470         (sparc64_elf_new_section_hook): New function.
4471         (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4472         (sec_do_relax): Define.
4473         (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4474         (sparc64_elf_relocate_section): Likewise.
4475         (bfd_elf64_new_section_hook): Define.
4476         * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4477         * elfxx-mips.c (struct _mips_elf_section_data): New.
4478         (mips_elf_section_data): Define.  Use throughout.
4479         (_bfd_mips_elf_new_section_hook): New function.
4480         (mips_elf_create_got_section): Don't alloc used_by_bfd.
4481         * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4482         * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4483         * Makefile.am: Run "make dep-am".
4484         * Makefile.in: Regenerate.
4485
4486 2003-01-21  Richard Henderson  <rth@redhat.com>
4487
4488         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4489         (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4490         (elf64_alpha_adjust_dynamic_symbol): Set them.
4491         (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4492         (elf64_alpha_relax_tls_get_addr): Handle LDM relocs.  Frob the
4493         symbol index when relaxing LDM to TPREL.
4494         (elf64_alpha_relax_section): Likewise.  Allow relaxation of GD
4495         relocs, even if the target isn't locally defined.
4496         (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4497         (elf64_alpha_relocate_section): Likewise.  Force TP-relative
4498         relocs vs symndx 0 to the tp base.
4499
4500 2003-01-21  Fabio Alemagna  <falemagn@aros.org>
4501
4502         * config.bfd: Handle i[3456]86-*-aros*.
4503
4504 2003-01-21  Andreas Schwab  <schwab@suse.de>
4505
4506         * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4507         (struct ppc_elf_link_hash_entry): Define.
4508         (ppc_elf_hash_entry): New function.
4509         (struct ppc_elf_link_hash_table): Define.
4510         (ppc_elf_hash_table): New function.
4511         (ppc_elf_link_hash_newfunc): New function.
4512         (ppc_elf_link_hash_table_create): New function.
4513         (ppc_elf_copy_indirect_symbol): New function.
4514         (allocate_dynrelocs): New function.
4515         (readonly_dynrelocs): New function.
4516         (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4517         relocs and determine DT_TEXTREL.
4518         (ppc_elf_check_relocs): Don't do that here, just count the
4519         dynamic relocs.
4520         (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4521         removed section.
4522         (bfd_elf32_bfd_link_hash_table_create): Define.
4523         (elf_backend_copy_indirect_symbol): Define.
4524
4525 2003-01-21  Richard Henderson  <rth@redhat.com>
4526
4527         * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4528         TPREL also get a reloc if shared.  Remove SREL support.
4529         (elf64_alpha_emit_dynrel): New.
4530         (elf64_alpha_relocate_section): Use it.  Resolve dynamic TPREL
4531         and GOTTPREL relocs to local symbols against the tp base.
4532         (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4533
4534         * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4535         use count before clobbering r_type.
4536         (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4537         ordering would mean dataflow inspection is necessary.
4538
4539 2003-01-20  Svein E. Seldal  <Svein.Seldal@solidas.com>
4540
4541         * coffcode.h (coff_set_flags): Added get/set arch hooks.
4542
4543 2003-01-20  Fabio Alemagna  <falemagn@aros.org>
4544
4545         * elf32-sh.c: Treat elfNN_bed like other macros defined in
4546           elfxx-target.h and #undef it before #define'ing it.
4547         * elf32-i386.c: Likewise.
4548         * elf32-sh64.c: Likewise.
4549         * elf64-alpha.c: Likewise.
4550         * elf64-sh64.c: Likewise.
4551
4552 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4553
4554         * bfd-in2.h: Regenerate.
4555         * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4556         (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4557         R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4558         R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4559         R_390_PLTOFF32 and R_390_PLTOFF64.
4560         (elf_s390_reloc_type_lookup): Likewise.
4561         (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4562         of GOTPLT references to a function.
4563         (link_hash_newfunc): Initialize gotplt_refcount.
4564         (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4565         and creation of the got section out of the main switch. Add support
4566         for the gotoff, gotplt and pltoff relocations.
4567         (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4568         and pltoff.
4569         (elf_s390_adjust_gotplt): New function.
4570         (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4571         plt entries.
4572         (allocate_dynrelocs): Add comment.
4573         (elf_s390_relocate_section): Change r_type to unsigned. Add support
4574         for gotoff, gotplt and pltoff relocations.
4575         * elf64-s390.c: Same changes as for elf32-s390.c.
4576         * libbfd.h: Regenerate.
4577         * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4578         BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4579         BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4580         and BFD_RELOC_390_PLTOFF64.
4581
4582 2003-01-18  Jakub Jelinek  <jakub@redhat.com>
4583
4584         * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4585         R_IA64_TPREL64[LM]SB against non-global symbol properly.
4586
4587 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
4588
4589         * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4590         self_dtpmod_done and self_dtpmod_offset.
4591         (allocate_global_data_got): Only use one got entry for all
4592         dtpmod relocs against local symbols.
4593         (allocate_dynrel_entries): Only need .rela.got entry for
4594         dtpmod against global symbol.
4595         (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4596         Reserve space in .rela.got for the local dtpmod entry.
4597         (set_got_entry): Initialize the common local dtpmod .got entry.
4598         (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4599         and R_IA_64_DTPREL64MSB.
4600
4601 2003-01-16  Alan Modra  <amodra@bigpond.net.au>
4602
4603         * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4604         (R_PPC_*): Rename all occurrences to R_PPC64_*.
4605         (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4606         (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4607         (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4608         relative relocs, not with absolute ones.
4609         * Makefile.am: Run "make dep-am".
4610         * Makefile.in: Regenerate.
4611         * po/SRC-POTFILES.in: Regenerate.
4612
4613 2003-01-15  Andreas Schwab  <schwab@suse.de>
4614
4615         * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4616         relocation against a non-allocated readonly section.
4617
4618 2003-01-10  Alan Modra  <amodra@bigpond.net.au>
4619
4620         * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4621         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.  PLTGOT16_HA too.
4622
4623 2002-01-08  Klee Dienes  <kdienes@apple.com>
4624
4625         * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4626         (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4627         * Makefile.in: Regenerate.
4628
4629 2003-01-08  Alexandre Oliva  <aoliva@redhat.com>
4630
4631         * elfn32-mips.c (prev_reloc_section): New.
4632         (GET_RELOC_ADDEND): Use it.  Parenthesize macro arguments.
4633         (SET_RELOC_ADDEND): Parenthesize macro argument.
4634
4635 2003-01-07  John David Anglin  <dave.anglin@nrc.gc.ca>
4636
4637         * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4638         adjust addil instructions if the symbol has no section.
4639
4640 2003-01-07  DJ Delorie  <dj@redhat.com>
4641
4642         * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4643         partial_inplace.
4644
4645 2003-01-07  Andreas Schwab  <schwab@suse.de>
4646
4647         * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4648         PC relative relocations.
4649         (elf_m68k_discard_copies): Set it here instead.
4650
4651 2002-01-02  Ben Elliston  <bje@redhat.com>
4652             Jeff Johnston  <jjohnstn@redhat.com>
4653
4654         * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4655         (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4656         (BFD32_BACKENDS): Add elf32-iq2000.lo.
4657         (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4658         (cpu-iq2000.lo): New target.
4659         * Makefile.in: Regenerate.
4660         * config.bfd: Handle iq2000-*-elf.
4661         * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4662         (bfd_archures_list): Add bfd_iq2000_arch.
4663         * configure.in: Handle bfd_elf32_iq2000_vec.
4664         * configure: Regenerate.
4665         * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4666         and BFD_RELOC_IQ2000_UHI16.
4667         * targets.c (bfd_elf32_iq2000_vec): Declare.
4668         (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4669         * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4670         * cpu-iq2000.c: New file.
4671         * elf32-iq2000.c: Likewise.
4672         * libbfd.h: Regenerate.
4673         * bfd-in2.h: Likewise.
4674
4675 2003-01-02  Richard Sandiford  <rsandifo@redhat.com>
4676
4677         * elfxx-mips.c: Include libiberty.h.
4678         (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4679         (mips_set_isa_flags): New function, split out from...
4680         (_bfd_mips_elf_final_write_processing): ...here.  Only call
4681         mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4682         (mips_mach_extensions): New array.
4683         (mips_32bit_flags_p): New function.
4684         (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4685         Use mips_32bit_flags_p to check if one binary is 32-bit and the
4686         other is 64-bit.  When adopting IBFD's architecture, adopt the
4687         bfd_mach as well as the flags.
4688
4689 2003-01-02  Nick Kelsey  <nickk@ubicom.com>
4690
4691         * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4692         fix internal errors, fix bad code generation, fix incorrect stabs
4693         information, and improve ability to eliminate redundant page
4694         instructions. Added code to ip2k_final_link_relocate to self-verify
4695         the linker relaxation.  Fix formatting problems.
4696
4697 2002-12-30  Chris Demetriou  <cgd@broadcom.com>
4698
4699         * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4700         * archures.c (bfd_mach_mipsisa32r2): New define.
4701         * bfd-in2.h: Regenerate.
4702         * cpu-mips.c (I_mipsisa32r2): New enum value.
4703         (arch_info_struct): Add entry for I_mipsisa32r2.
4704         * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4705         (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4706         (_bfd_mips_elf_final_write_processing): Add
4707         bfd_mach_mipsisa32r2 case.
4708         (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4709         binaries marked as using MIPS32 Release 2.
4710
4711 2002-12-30    Dmitry Diky <diwil@mail.ru>
4712
4713         * Makefile.am: Add msp430 target.
4714         * configure.in: Likewise.
4715         * Makefile.in: Regenerate.
4716         * configure: Regenerate.
4717         * archures.c: Add msp430 architecture vector.
4718         * config.bfd: Likewise.
4719         * reloc.c: Add msp430 relocs.
4720         * targets.c: Add msp320 target.
4721         * cpu-msp430.c: New file: msp430 cpu detection.
4722         * elf32-msp430.c: New file: msp430 reloc processing.
4723         * bfd-in2.h: Regenerate.
4724         * libbfd.h: Regenerate.
4725
4726 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
4727
4728         * elf.c (elf_sort_sections): Don't reorder .tbss.
4729         (assign_file_positions_for_segments): Only adjust off/voff
4730         for increased alignment in PT_LOAD or PT_NOTE segment,
4731         but adjust p_filesz for .tbss too.  in PT_LOAD consider
4732         .tbss to have zero memory size.
4733         (copy_private_bfd_data) [SECTION_SIZE]: Define.
4734         [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4735         [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4736         into PT_TLS segment.  Never put SHF_TLS sections in
4737         segments other than PT_TLS or PT_LOAD.
4738
4739         * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4740         sh_entsize.
4741
4742 2002-12-23  DJ Delorie  <dj@redhat.com>
4743
4744         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4745
4746 2002-12-23  Alan Modra  <amodra@bigpond.net.au>
4747
4748         * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4749
4750 2002-12-23  Nick Clifton  <nickc@redhat.com>
4751
4752         * archures.c (bfd_arch_get_compatible): Add third parameter
4753         'accept_unknowns'.  Only accept unknown format BFDs if
4754         accept_unknowns is true, or if the format is "binary".
4755         * bfd-in2.h: Regenerate.
4756
4757 2002-12-21  Nick Clifton  <nickc@redhat.com>
4758
4759         * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4760         that subtracted 8 from pc relative relocations.
4761
4762 2002-12-20  Kazu Hirata  <kazu@cs.umass.edu>
4763
4764         * coff-h8300.c: Fix comment typos.
4765         * coffcode.h: Likewise.
4766         * cpu-cris.c: Likewise.
4767         * elf32-vax.c: Likewise.
4768         * genlink.h: Likewise.
4769         * linker.c: Likewise.
4770         * som.c: Likewise.
4771         * tekhex.c: Likewise.
4772         * vms-misc.c: Likewise.
4773
4774 2002-12-20  DJ Delorie  <dj@redhat.com>
4775
4776         * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4777         * libbfd.h: Regenerate.
4778         * bfd-in2.h: Regenerate.
4779         * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4780         (xstormy16_reloc_map): Add R_XSTORMY16_12.
4781
4782 2002-12-19  Kazu Hirata  <kazu@cs.umass.edu>
4783
4784         * doc/bfdint.texi: Fix typos.
4785
4786 2002-12-20  Paul Eggert  <eggert@twinsun.com>
4787
4788         Port to POSIX 1003.1-2001.
4789         * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4790         * configure.in (build-warnings): Likewise.
4791         (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4792         * aclocal.m4: Regenerate.
4793         * config.in: Regenerate.
4794         * configure: Regenerate.
4795
4796 2002-12-19  Alan Modra  <amodra@bigpond.net.au>
4797
4798         * coff-h8300.c: Include libiberty.h.
4799         (h8300_reloc16_extra_cases): Check the hash table creator before
4800         referencing h8300 specific fields.  Stash the hash table pointer
4801         in a local var.  Comment typo fixes.
4802         (h8300_bfd_link_add_symbols): Likewise.
4803
4804         * reloc.c (struct reloc_howto_struct): Revise src_mask and
4805         dst_mask comments.
4806         * bfd-in2.h: Regenerate.
4807
4808 2002-12-18  Alan Modra  <amodra@bigpond.net.au>
4809
4810         * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4811         code a little.  Comment on dynamic relocs against section symbols.
4812
4813 2002-12-17  Roger Sayle  <roger@eyesopen.com>
4814
4815         * configure.host (ia64-*-hpux*): Support 64 bit targets using
4816         the HP compiler's "long long".
4817
4818 2002-12-16  Andrew MacLeod  <amacleod@redhat.com>
4819
4820         * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4821         and R_XSTORMY16_HI16) howto entries.
4822         (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
4823         (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
4824         determine the start of the second reloc table.
4825
4826 2002-12-16  Nathan Tallent  <eraxxon@alumni.rice.edu>
4827
4828         * ecofflink.c: Fix the reading of the debugging information
4829         of Tru64/Alpha binaries that are produced by recent Compaq
4830         compilers.
4831         (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4832         table.
4833         (lookup_line): Because of the strange information sometimes
4834         generated by Compaq's recent compilers, change how the FDR
4835         table is searched so that PDRs (procedure descriptors) are
4836         correctly found.  Note that this change is really more of a hack;
4837         however, I have included extensive documentation as to why
4838         this is the best solution short of an extensive rewrite or
4839         another hack.
4840         (fdrtab_lookup): Add comments to explain the algorithm.
4841
4842 2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
4843
4844         * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4845         initializers to match struct declaration.
4846
4847 2002-12-12  Alan Modra  <amodra@bigpond.net.au>
4848
4849         * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4850         * elf.c (get_program_header_size): Likewise.
4851         * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4852         (m32r_elf_generic_reloc): Likewise.
4853         * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4854         * elflink.h (elf_bfd_discard_info): Likewise.
4855
4856 2002-12-12  Alan Modra  <amodra@bigpond.net.au>
4857
4858         * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4859         to DT_JMPREL.  Use srelplt input section size for DT_PLTRELSZ and
4860         DT_RELSZ adjustment, not output section.  Avoid writing tags when
4861         unchanged.  Don't assume linker script is sane, adjust DT_REL too.
4862         * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4863         size of srelplt for DT_PLTRELSZ.  Use srelplt input section size for
4864         DT_RELASZ adjustment, not output section.  Avoid writing tags when
4865         unchanged.  Adjust DT_RELA.
4866         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4867         formatting.  Avoid writing tags when unchanged.  Adjust DT_RELA.
4868
4869 2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
4870
4871         * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4872         addend by 4.
4873
4874 2002-12-12  Alexandre Oliva  <aoliva@redhat.com>
4875
4876         * elfxx-mips.c (struct mips_got_entry): New.
4877         (struct mips_got_info): Added got_entries field.
4878         (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4879         (mips_elf_local_got_index, mips_elf_got_page,
4880         mips_elf_got16_entry): Re-implement in terms of new...
4881         (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4882         Change return type.
4883         (mips_elf_highest): Warning clean-up.
4884         (mips_elf_create_got_section): Initialize got_entries.
4885         (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4886         local got size.
4887         (_bfd_mips_elf_size_dynamic_sections): Do not account for
4888         GOT_PAGE entries, since we now reuse GOT16 entries.
4889
4890 2002-12-10  Jason Thorpe  <thorpej@wasabisystems.com>
4891
4892         * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4893         read-only section that lies after .text and before .data to be
4894         written into the output file and included in a_text.
4895         (translate_to_native_sym_flags): If an otherwise unrepresentable
4896         section was merged with .text, convert its symbols to N_TEXT
4897         symbols.
4898         * libaout.h (aout_section_merge_with_text_p): New macro.
4899
4900 2002-12-08  Alan Modra  <amodra@bigpond.net.au>
4901
4902         * bfd-in.h: Comment typo fix.  Formatting.
4903         * bfd-in2.h: Regenerate.
4904         * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4905         * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4906         * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4907
4908 2002-12-05  Richard Henderson  <rth@redhat.com>
4909
4910         * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4911         Only send PCREL21B though the plt.  Fix installed reloc type.
4912         (elfNN_ia64_relocate_section): Give error for dynamic reloc
4913         against PCREL22 or PCREL64I; clean up error messages for
4914         branch relocs.
4915
4916 2002-12-04  Kevin Buettner  <kevinb@redhat.com>
4917
4918         * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4919         New functions.
4920         (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4921
4922 2002-12-04  David Mosberger  <davidm@hpl.hp.com>
4923
4924         * cpu-ia64-opc.c: Add operand constant "ar.csd".
4925
4926 2002-12-04  H.J. Lu <hjl@gnu.org>
4927
4928         * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4929         BFD address when constructing local name.
4930
4931 2002-12-04  Andreas Schwab  <schwab@suse.de>
4932
4933         * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4934         member.
4935         (elf_m68k_link_hash_table_create): Initialize it.
4936         (elf_m68k_check_relocs): Handle symbols that are forced to be
4937         local due to visibility changes.
4938         (elf_m68k_adjust_dynamic_symbol): Likewise.
4939         (elf_m68k_size_dynamic_sections): Likewise.
4940         (elf_m68k_discard_copies): Likewise.
4941         (elf_m68k_relocate_section): Likewise.
4942
4943 2002-12-04  Alan Modra  <amodra@bigpond.net.au>
4944
4945         * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4946
4947 2002-12-04  Alan Modra  <amodra@bigpond.net.au>
4948
4949         * srec.c (srec_write_symbols): Restore '$' prefix to address
4950         accidentally removed in 2002-04-04 change.
4951         (srec_get_symtab): Use 0 instead of `(long) FALSE'.
4952
4953 2002-12-03  Nick Clifton  <nickc@redhat.com>
4954
4955         * elf32-ppc.c (apuinfo_list_init): New function.
4956         (apuinfo_list_add): New function: Add a value to the list.
4957         (apuinfo_list_length): New function: Return the number of
4958         values on the list.
4959         (apuinfo_list_element): New function: Return a value on the
4960         list.
4961         (apuinfo_list_finish): New function: Free the resources used
4962         by the list.
4963         (ppc_elf_begin_write_processing): New function.  Scan the
4964         input bfds for apuinfo sections.
4965         (ppc_elf_write_section): New function: Delay the creation of
4966         the contents of an apuinfo section in an output bfd.
4967         (ppc_elf_final_write_processing): New function.  Create the
4968         contents of an apuinfo section in an output bfd.
4969         (elf_backend_begin_write_processing): Define.
4970         (elf_backend_final_write_processing): Define.
4971         (elf_backend_write_section): Define.
4972
4973 2002-12-03  Richard Henderson  <rth@redhat.com>
4974
4975         * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
4976
4977 2002-12-01  Stephane Carrez  <stcarrez@nerim.fr>
4978
4979         Fix PR savannah/1417:
4980         * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
4981         branch if it goes to the start of the deleted region.
4982
4983 2002-12-01  Stephane Carrez  <stcarrez@nerim.fr>
4984
4985         * bfd-in2.h (bfd_mach_m6812): Rebuild.
4986         * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
4987         bfd_mach_m6812s): Declare.
4988
4989         * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
4990         (_bfd_m68hc12_elf_set_private_flags): Call it.
4991         (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
4992         (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
4993         report microcontroller incompatibilities (HC12 vs HCS12).
4994         (elf_backend_object_p): Update.
4995
4996 2002-11-30  Alan Modra  <amodra@bigpond.net.au>
4997
4998         * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
4999         (enum bfd_boolean, boolean): Delete.
5000         (bfd_boolean): Typedef to an int.
5001         (FALSE, TRUE): Define.
5002         * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5003         aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5004         aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5005         binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5006         coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5007         coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5008         coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5009         coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5010         coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5011         coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5012         corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5013         cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5014         cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5015         cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5016         cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5017         cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5018         cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5019         cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5020         cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5021         cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5022         dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5023         elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5024         elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5025         elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5026         elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5027         elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5028         elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5029         elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5030         elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5031         elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5032         elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5033         elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5034         elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5035         elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5036         elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5037         elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5038         hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5039         i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5040         libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5041         libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5042         m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5043         mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5044         nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5045         pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5046         pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5047         pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5048         reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5049         som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5050         syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5051         vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5052         xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5053         bfd_boolean, true with TRUE, false with FALSE.  Simplify comparisons
5054         of bfd_boolean vars with TRUE/FALSE.  Formatting.
5055         * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5056
5057 2002-11-28  Alan Modra  <amodra@bigpond.net.au>
5058
5059         * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5060         Elf64_Internal_* with Elf_Internal_*.  Replace Elf_Internal_Rel
5061         with Elf_Internal_Rela.
5062         * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5063         elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5064         elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5065         elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5066         elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5067         elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5068         elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5069         elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5070         elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5071         elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5072         elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5073         * elf-hppa.h (elf_hppa_internal_shdr): Delete.  Use Elf_Internal_Shdr
5074         throughout instead.
5075         * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5076         * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5077         Remove INLINE keyword.
5078         (elf_swap_reloc_in): Likewise.  Also clear r_addend.
5079         (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5080         as a bfd_byte *.
5081         (elf_write_relocs): Consolidate REL and RELA code.
5082         (elf_slurp_reloc_table_from_section): Simplify REL code.
5083         (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5084         * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5085         * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5086         RELA code.
5087         (elf_link_adjust_relocs): Likewise.  Don't malloc space for temp
5088         reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5089         (elf_link_output_relocs): Likewise.
5090         (elf_reloc_link_order): Likewise.
5091         (elf_finish_pointer_linker_section): Likewise.
5092         (struct elf_link_sort_rela): Remove union.
5093         (elf_link_sort_cmp1): Update to suit.
5094         (elf_link_sort_cmp2): Here too.
5095         (elf_link_sort_relocs): Consolidate REL and RELA code.  Fix memory
5096         over-allocation for int_rels_per_ext_rel != 1 case.
5097         * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5098         * elf32-i386.c: Likewise.
5099         * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5100         * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5101         elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5102         * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5103         * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5104         elf64-sparc.c, elf64-x86-64.c: Likewise.
5105         * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5106         * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5107         bfd_elf32_swap_reloc_in.
5108
5109         * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5110         * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5111         (mips_elf64_swap_reloc_in): Zero r_addend.
5112         (mips_elf64_be_swap_reloc_in): Likewise.
5113         (mips_elf64_slurp_one_reloc_table): Simplify.
5114
5115         * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5116         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5117         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5118
5119 2002-11-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5120
5121         * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5122         unresolved debugging relocs in dynamic applications.
5123         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5124
5125 2002-11-26  Alan Modra  <amodra@bigpond.net.au>
5126
5127         * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5128         (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5129         on a relocatable link.  Comment typos.
5130         * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5131         in the order they are declared.  Clear elf_hash_value too.
5132         (_bfd_elf_link_hash_table_init): Likewise assign in order.  Clear
5133         eh_info and tls_segment.
5134         * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5135         sorted when discarding relocs by turning them into R_*_NONE.
5136
5137         * libbfd.c (warn_deprecated): Comment spelling.
5138         * po/SRC-POTFILES.in: Regenerate.
5139
5140 2002-11-21  Richard Henderson  <rth@redhat.com>
5141
5142         * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5143         arch's st_other bits when merging visibilities.
5144         (elf_link_output_extsym): Tidy clearing of visibility field.
5145
5146 2002-11-21  Alan Modra  <amodra@bigpond.net.au>
5147
5148         * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5149         (SWAP_OUT_RELOC_OFFSET): Define.
5150
5151 2002-11-20  Alexandre Oliva  <aoliva@redhat.com>
5152
5153         * elf.c (_bfd_elf_link_hash_table_init): Make sure
5154         can_refcount is properly extended to the type of
5155         init_refcount.
5156
5157 2002-11-19  Alexandre Oliva  <aoliva@redhat.com>
5158
5159         * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5160         (_bfd_mips_elf_relocate_section): Use it.
5161
5162         * elfxx-mips.c (MNAME): New macro.
5163         (_bfd_mips_elf_check_relocs): Use it.
5164         (_bfd_mips_elf_discard_info): Likewise.
5165         (_bfd_mips_elf_final_link): Likewise.
5166
5167 2002-11-19  Alan Modra  <amodra@bigpond.net.au>
5168
5169         * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5170         rel_hdr.sh_size too.
5171
5172 2002-11-18  Klee Dienes  <kdienes@apple.com>
5173
5174         * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5175         (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5176         (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5177         (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5178         Add dependencies for bfdwin.c, bfdio.c.
5179         * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5180         * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5181         bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5182         bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5183         * bfdio.c: New file.  Contains real_read, bfd_bread, bfd_write,
5184         bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5185         bfd_get_size (moved from libbfd.c and bfd.c).
5186         * bfdwin.c New file.  Contains _bfd_window_internal,
5187         bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5188         libbfd.c and bfd.c).
5189         * po/SRC-POTFILES.in: Regenerate.
5190         * po/bfd.pot: Regenerate.
5191         * libbfd.h: Regenerate.
5192         * bfd-in2.h: Regenerate.
5193         * aclocal.m4: Regenerate.
5194         * Makefile.in: Regenerate.
5195         * configure: Regenerate.
5196
5197 2002-11-18  Klee Dienes  <kdienes@apple.com>
5198
5199         * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5200
5201 2002-11-15  Kazu Hirata  <kazu@cs.umass.edu>
5202
5203         * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5204         jsr after a short jump.
5205         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5206
5207 2002-11-15  Klee Dienes  <kdienes@apple.com>
5208
5209         * pef.c (bfd_pef_convert_architecture): Move declaration of
5210         ARCH_POWERPC and ARCH_M68K to the start of the function.
5211
5212 2002-11-14  Svein E. Seldal  <Svein.Seldal@solidas.com>
5213
5214         * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5215
5216 2002-11-14  Hans-Peter Nilsson  <hp@bitrange.com>
5217
5218         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5219         For bpo_gregs_section->contents, allocate _raw_size, not
5220         _cooked_size.
5221
5222 2002-11-13  Klee Dienes  <kdienes@apple.com>
5223
5224         * config.bfd: Add entries for powerpc-*-darwin and cousins.
5225
5226 2002-11-13  H.J. Lu <hjl@gnu.org>
5227
5228         * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5229
5230 2002-11-13  Klee Dienes  <kdienes@apple.com>
5231             Alan Modra  <amodra@bigpond.net.au>
5232
5233         * bfd.c (struct bfd_preserve): New.
5234         (bfd_preserve_save): New function.
5235         (bfd_preserve_restore): Ditto.
5236         (bfd_preserve_finish): Ditto.
5237         * bfd-in2.h: Regenerate.
5238         * mach-o.c: Formatting.
5239         (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5240         (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5241         (bfd_mach_o_core_p): Ditto.
5242         (bfd_mach_o_scan): Pass in mdata.
5243         * mach-o.h (bfd_mach_o_scan): Update prototype.
5244         * pef.c: Formatting.
5245         (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5246         (bfd_pef_xlib_object_p): Ditto.
5247         (bfd_pef_scan): Pass in mdata.  Move version check to bfd_pef_object_p.
5248         * pef.h (bfd_pef_scan): Update prototype.
5249         * xsym.c: Formatting, K&R fixes.
5250         (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5251         (bfd_sym_scan): New function split out from bfd_sym_object_p.
5252         * xsym.h (bfd_sym_scan): Declare.
5253         * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5254         * elfcore.h (elf_core_file_p): Likewise.
5255         * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5256
5257 2002-11-12  Nick Clifton  <nickc@redhat.com>
5258
5259         * po/da.po: Updated Danish translation.
5260
5261 2002-11-12  Alan Modra  <amodra@bigpond.net.au>
5262
5263         * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5264         relocatable link too.
5265         (elf_link_input_bfd): When emitting relocs, adjust offsets for
5266         eh_frame and stab sections.  Zap deleted relocs.
5267         (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5268         (elf_bfd_discard_info): Run for relocatable link too.
5269         * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd.  Make global.
5270         Handle ld -r case.
5271         (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5272         * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5273
5274         * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5275         (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5276         (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5277         (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5278         (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5279         (struct elf_link_hash_table): Add eh_info.
5280         (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5281         (_bfd_elf_discard_section_eh_frame): Update prototype.
5282         (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5283         (_bfd_elf_write_section_eh_frame): Likewise.
5284         (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5285         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5286         param.  Get "hdr_info" from link hash table.
5287         (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param.  Get
5288         header section from link hash table.  Save header section to elf_tdata.
5289         (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec".  Use
5290         header section from link hash table.  Don't alloc hdr_info.  Clear
5291         hdr_sec instead of setting "strip".
5292         (_bfd_elf_eh_frame_section_offset): Formatting.
5293         (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5294         Get header section from link hash table.
5295         (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5296         Get header section from link hash table.
5297         * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5298         (get_program_header_size): Likewise.
5299         (_bfd_elf_section_offset): Formatting.
5300         * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5301         section pointer in link hash table.
5302         (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5303         and _bfd_elf_write_section_eh_frame calls.  Update comment about
5304         eh_frame entries.
5305         (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5306         _bfd_elf_discard_section_eh_frame_hdr calls.  Remove "ehdr".
5307
5308         * po/SRC-POTFILES.in: Regenerate.
5309
5310         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5311         relocs for discarded FDEs.  Remove dead code.
5312         (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5313         * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5314         Tidy conditions under which stabs are edited.  Formatting.
5315         * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5316         from discarded relocs.
5317         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5318         section adjustments after testing magic values.
5319
5320 2002-11-12  Thomas Moestl <tmm@FreeBSD.org>
5321
5322         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5323         references to large plt symbols.
5324
5325 2002-11-12  Klee Dienes  <kdienes@apple.com>
5326
5327         * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5328         looking for an unused section name.
5329
5330 2002-11-11  Kazu Hirata  <kazu@cs.umass.edu>
5331
5332         * coff-h8300.c: Fix formatting.
5333         * elf32-h8300.c: Likewise.
5334         * reloc16.c: Likewise.
5335
5336 2002-11-09  Jeroen Dobbelaere  <jeroen.dobbelaere@acunia.com>
5337
5338         * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5339         section when dynamic section unused;  _bfd_strip_section_from_output
5340         instead.
5341
5342 2002-11-08  Alan Modra  <amodra@bigpond.net.au>
5343
5344         * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5345         and sym_vec.
5346
5347         * dwarf2.c: Revert last change.
5348
5349 2002-11-07  Michal Ludvig  <mludvig@suse.cz>
5350
5351         * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5352         _bfd_dwarf2_find_nearest_line): Use
5353         bfd_simple_get_relocated_section_contents() instead of
5354         bfd_get_section_contents().
5355         * reloc.c (bfd_perform_relocation): Add sanity check.
5356         * simple.c (simple_get_relocated_section_contents): If the section
5357         does not have any relocs associated with it, just return the
5358         unadjusted contents.
5359
5360 2002-11-07  Hans-Peter Nilsson  <hp@axis.com>
5361
5362         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5363         case R_CRIS_32_GOT>: Correct test for filling in constant .got
5364         contents, enabling for a non-DSO, for symbols defined in the
5365         program with --export-dynamic.
5366
5367 2002-11-07  Alan Modra  <amodra@bigpond.net.au>
5368
5369         * elf64-ppc.c: Comment typo fixes.
5370         (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5371
5372 2002-11-07  Nick Clifton  <nickc@redhat.com>
5373
5374         * po/da.po: Updated Danish translation.
5375
5376 2002-11-06  Alexandre Oliva  <aoliva@redhat.com>
5377
5378         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5379         exactly three internal relocs per external reloc.  Set reloc_count
5380         to the external reloc count.
5381
5382 2002-11-06  Klee Dienes  <kdienes@apple.com>
5383
5384          * coff-stgo32.c (stub_bytes): Mark as const.
5385          Fix comment formatting.
5386
5387 2002-11-06  Klee Dienes  <kdienes@apple.com>
5388
5389         * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5390         xsym.lo.
5391         (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5392         (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5393         * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5394         * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5395         * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5396         sym.
5397         (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5398         * Makefile.in: Regenerate.
5399         * doc/Makefile.in: Regenerate.
5400         * bfd-in2.h: Regenerate.
5401         * xsym.c: New file.  Contains support for the Apple/Metrowerks
5402         xSYM debugging format.
5403         * xsym.h: New file.
5404         * pef.c: New file.  Contains support for the Apple Code Fragment
5405         Manager Preferred Executable Format
5406         * pef.h: New file.
5407         * pef-traceback.h: New file.  Contains support for parsing PowerPC
5408         traceback tables as used by PEF executables (and perhaps other
5409         systems as well).
5410         * mach-o.c: New file.  Contains support for the Mach-O object file
5411         format.
5412         * mach-o.h: New file.
5413         * mach-o-target.c: New file.  Declares the mach-o targets
5414         themselves.  Included three times by mach-o.c; each time with a
5415         different set of macros set.
5416
5417 2002-11-06  Graeme Peterson  <gp@qnx.com>
5418
5419         * Makefile.am: Remove entries for elf32-qnx.[ch].
5420         * Makefile.in: Regenerate.
5421         * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5422         ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5423         bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5424         * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5425         bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5426         and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5427         bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5428         * configure: Regenerate.
5429         * elf32-qnx.c: Remove.
5430         * elf32-qnx.h: Remove.
5431         * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5432         is_contained_by_filepos, and copy_private_bfd_data_p.
5433         * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5434         is_contained_by_filepos, and copy_private_bfd_data_p.
5435         * elf32-i386.c: Remove QNX extended bfd support.
5436         * elf32-ppc.c: Remove QNX extended bfd support.
5437         * elf32-sh.c: Remove QNX extended bfd support.
5438         * elfarm-nabi.c: Remove QNX extended bfd support.
5439         * targets.c: Remove qnx vectors.
5440         * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5441         (elf_backend_is_contained_by_filepos): Remove.
5442         (elf_backend_copy_private_bfd_data_p): Remove.
5443         * po/SRC-POTFILES.in: Regenerate.
5444
5445 2002-11-06  David O'Brien  <obrien@FreeBSD.org>
5446             Alan Modra  <amodra@bigpond.net.au>
5447
5448         * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5449         dynamic relocs against section symbols for the output section vma.
5450
5451 2002-11-05  Alan Modra  <amodra@bigpond.net.au>
5452
5453         * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5454         t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5455
5456 2002-11-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5457             Alan Modra  <amodra@bigpond.net.au>
5458
5459         * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5460         vectors in target_selvecs.
5461         (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5462         in target_selvecs.
5463         (sh-*-netbsdelf*): Likewise.
5464         * configure.in (assocvecs): New variable.  Handle assocvecs like
5465         selvecs.
5466         * configure: Regenerate.
5467         * format.c (bfd_check_format_matches): Store bfd_target pointers
5468         in matching_vector instead of target names.  Select first target
5469         from bfd_associated_vector that matches a list of ambiguous targets.
5470         * targets.c (_bfd_associated_vector): New array.
5471         (bfd_associated_vector): New variable.
5472         (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5473         * libbfd-in.h (bfd_associated_vector): Declare.
5474         * libbfd.h: Regenerate.
5475
5476 2002-11-05  Elias Athanasopoulos  <eathan@otenet.gr>
5477
5478         * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5479         non-NULL before dereferencing.
5480
5481 2002-11-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5482
5483         * vms.c (vms_object_p): Restore the start address when returning
5484         NULL.
5485
5486 2002-11-04  Alan Modra  <amodra@bigpond.net.au>
5487             Hans-Peter Nilsson  <hp@axis.com>
5488
5489         * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5490         (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5491         Set up a larger symshndxbuf, and write it out.  Free it on
5492         exit rather than freeing symbuf twice.  Correct section index
5493         on output section symbol loop.
5494         (elf_link_output_sym): Accumulate symbol extension section
5495         indices, reallocating symshndxbuf rather than writing it out.
5496         (elf_link_flush_output_syms): Don't flush symshndxbuf.
5497         * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5498         Use bfd_zalloc to clear i_shdrp[0] too.
5499
5500 2002-11-03  Stephen Clarke <stephen.clarke@earthling.net>
5501
5502          * elf32-sh64-com.c (sh64_address_in_cranges): Use
5503         _raw_size of cranges section if _cooked_size not yet set.
5504
5505 2002-11-03  Hans-Peter Nilsson  <hp@axis.com>
5506
5507         * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5508         for bfd_elf32_swap_symbol_out.
5509
5510 2002-10-31  David O'Brien  <obrien@FreeBSD.org>
5511
5512         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5513         signed and unsigned in comparison.
5514
5515 2002-10-30  Daniel Jacobowitz  <drow@mvista.com>
5516
5517         * coffcode.h: Remove extraneous '\'.
5518
5519 2002-10-28  H.J. Lu <hjl@gnu.org>
5520
5521         * Makefile.am (targets.lo): Depend on Makefile instead of
5522         config.status.
5523         (archures.lo): Likewise.
5524         * Makefile.in: Regenerated.
5525
5526 2002-10-25  Jason Thorpe  <thorpej@wasabisystems.com>
5527
5528         * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5529         bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5530         targ_selvecs.
5531
5532 2002-10-25  Jim Wilson  <wilson@redhat.com>
5533
5534         * elf64-sh64.c (sh_elf64_relocate_section): Call
5535         _bfd_elf_rela_local_sym.  Handle relocs against STT_SECTION symbol
5536         of SHF_MERGE section.
5537
5538 2002-10-25  Hans-Peter Nilsson  <hp@axis.com>
5539
5540         * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5541
5542 2002-10-24  John David Anglin  <dave@hiauly1.hia.nrc.ca>
5543
5544         * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5545         unsigned int.  Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5546         unsigned int.
5547         (NAME(aout,final_link)): Cast enum used in assignment.
5548         (aout_link_write_symbols): Cast enums in comparisons, int values to
5549         boolean, enums in assignments to int.
5550         (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5551         (aout_link_input_section_ext): Likewise.  Cast enums used in
5552         comparisons with unsigned ints.
5553         (aout_link_reloc_link_order): Cast enum to int in assignment.
5554         * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5555         calls to char *.
5556         * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5557         assignment.
5558         * bfd-in2.h (bfd_set_section_vma): Likewise.
5559         * bfd.c (bfd_record_phdr): Cast enums in assignments.
5560         * binary.c (bfd_alloc): Cast enum to long.
5561         * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5562         * dwarf2.c (read_abbrevs): Add casts to enum types.
5563         (read_attribute_value): Likewise.
5564         (arange_add): Cast result of bfd_zalloc call.
5565         (comp_unit_contains_address): Return true and false.
5566         (comp_unit_find_nearest_line): Cast return to boolean.
5567         * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5568         * gen-aout.c: define macro '_' if not defined.
5569         * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5570         (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5571         (bfd_write_bigendian_4byte_int): Cast return to boolean.
5572         (bfd_seek): Cast bfd_realloc to bfd_byte *.
5573         (bfd_generic_is_local_label_name): Cast return to boolean.
5574         * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5575         * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5576         struct bfd_hash_entry *.
5577         (_bfd_generic_link_hash_newfunc): likewise.
5578         (_bfd_generic_final_link): Cast enum to unsigned int.
5579         * merge.c (sec_merge_emit): Cast return to boolean.
5580         (merge_strings): Add casts to const unsigned char *.
5581         * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5582         (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5583         * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5584         to struct bfd_hash_entry *.
5585         (bfd_set_section_content): Add cast to PTR in comparison.
5586         * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5587         simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5588         simple_dummy_unattached_reloc,
5589         bfd_simple_get_relocated_section_contents): Add K&R declarations and
5590         function definitions.
5591         * srec.c (S3Forced): Initialize to false.
5592         (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5593         * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5594         (_bfd_discard_section_stabs): Likewise.  Also cast return to boolean.
5595         * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5596         (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5597         comparisons.
5598
5599 2002-10-23  Jakub Jelinek  <jakub@redhat.com>
5600
5601         * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5602         relocs into shared lib non-allocated reloc sections.
5603
5604 2002-10-23  Nathan Tallent  <eraxxon@alumni.rice.edu>
5605
5606         * dwarf2.c (add_line_info): Ensure that the line_info_table is
5607         sorted even when given an out-of-order line sequence.
5608         (lookup_address_in_line_info_table): When an exact VMA match is
5609         not found, return line information with the closest VMA.
5610
5611 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5612
5613         * elf64-hppa.c: Force DT_FLAGS to always be set.  Required by
5614         HPUX 11.00 patch PHSS_26559.
5615
5616 2002-10-22  Alexandre Oliva  <aoliva@redhat.com>
5617
5618         * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5619         the options section into a separate section unless IRIX 6
5620         compatibility is enabled.
5621
5622 2002-10-22  Alexandre Oliva  <aoliva@redhat.com>
5623
5624         * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5625         into arrays.
5626         (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5627         (elf_link_sort_relocs): Likewise.  Take int_rels_per_ext_rel
5628         into account.
5629         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5630         R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5631
5632 2002-10-21  Graeme Peterson  <gp@qnx.com>
5633
5634         * targets.c (_bfd_target_vector): Add missing qnx vectors.
5635
5636 2002-10-21  Alan Modra  <amodra@bigpond.net.au>
5637
5638         * targets.c (bfd_target_list): Don't return the default target twice.
5639
5640 2002-10-21  Elias Athanasopoulos  <eathan@otenet.gr>
5641
5642         * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5643         perror with bfd_perror.
5644
5645 2002-10-19  H.J. Lu <hjl@gnu.org>
5646
5647         * elflink.h (elf_link_add_object_symbols): Correctly handle
5648         DT_RPATH and DT_RUNPATH.
5649
5650 2002-10-19  Mark Kettenis  <kettenis@gnu.org>
5651
5652         * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5653
5654 2002-10-17  Denis Chertykov  <denisc@overta.ru>
5655
5656         * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5657         for ip2k port.
5658
5659 2002-10-17  Alan Modra  <amodra@bigpond.net.au>
5660
5661         * elfxx-target.h (USE_REL): Don't define as 1.
5662         * elf32-arm.h (USE_REL): Provide a default define of 0.
5663         Use #if rather than #ifdef when testing USE_REL.
5664         * elf32-m32r.c: Likewise.
5665
5666         * elf32-arc.c (USE_REL): Define as 1.
5667         * elf32-d10v.c (USE_REL): Likewise.
5668         * elf32-m32r.c (USE_REL): Likewise.
5669         * elf32-m68hc11.c (USE_REL): Likewise.
5670         * elf32-m68hc12.c (USE_REL): Likewise.
5671         * elf32-or32.c (USE_REL): Likewise.
5672         * elfarm-nabi.c (USE_REL): Likewise.
5673
5674 2002-10-16  Jakub Jelinek  <jakub@redhat.com>
5675
5676         * config.bfd (s390-*-linux*): Add targ64_selvecs.
5677         (s390x-*-linux*): Add targ_selvecs.
5678
5679 2002-10-16  Alan Modra  <amodra@bigpond.net.au>
5680
5681         * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5682         elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5683         elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5684         elf32-sh64-nbsd.lo, elf32-shqnx.lo.  Add elf32-qnx.lo.
5685         (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5686         (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5687         (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5688         (SOURCE_HFILES): Add elf32-qnx.h.
5689         (BUILD_HFILES): Add bfdver.h.
5690         Run "make dep-am".
5691         * Makefile.in: Regenerate.
5692         * configure.in Update bfd vector dependencies.
5693         * configure: Regenerate.
5694         * elf32-i386-fbsd.c: Delete.  Move code to elf32-i386.c.
5695         * elf32-i386qnx.c: Likewise.
5696         * elf32-ppcqnx.c: Delete.  Move code to elf32-ppc.c.
5697         * elf32-sh-nbsd.c: Delete.  Move code to elf32-sh.c.
5698         * elf32-sh-lin.c: Likewise.
5699         * elf32-shqnx.c: Likewise.
5700         * elf32-sh64-lin.c: Delete.  Move code to elf32-sh64.c.
5701         * elf32-sh64-nbsd.c: Likewise.
5702         * elf64-sh64-lin.c: Delete.  Move code to elf64-sh64.c.
5703         * elf64-sh64-nbsd.c: Likewise.
5704         * elfarmqnx-nabi.c: Delete.  Move code to elfarm-nabi.c.
5705         * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5706         * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5707         * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5708         * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5709         (elf_backend_is_contained_by_filepos): Likewise.
5710         (elf_backend_copy_private_bfd_data_p): Likewise.
5711         Globalize and move functions to..
5712         * elf32-qnx.c: ..here.  New file.
5713         * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests.  Don't
5714         emit target vectors when INCLUDE_SHMEDIA.
5715         * elf32-sh64.c: Remove ELF_ARCH test.  Move TARGET_* etc. defines to
5716         end of file.
5717         * elf64-sh64.c: Remove ELF_ARCH test.
5718         * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5719         * po/BLD-POTFILES.in: Regenerate.
5720         * po/SRC-POTFILES.in: Regenerate.
5721
5722 2002-10-16  Alan Modra  <amodra@bigpond.net.au>
5723
5724         * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5725         loaded with --just-symbols.
5726
5727         * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5728         * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5729         * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5730         * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5731
5732 2002-10-15  Richard Henderson  <rth@redhat.com>
5733
5734         * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5735         (BFD64_BACKENDS_CFILES): Likewise.
5736         * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5737         * elf64-alpha-fbsd.c: Remove file, move code ...
5738         * elf64-alpha.c: ... here.
5739         * Makefile.in, configure: Rebuild.
5740
5741 2002-10-14  Richard Henderson  <rth@redhat.com>
5742
5743         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5744         VALUE, not ADDEND.
5745
5746 2002-10-14  Stephen Clarke <stephen.clarke@superh.com>
5747
5748         * elf32-sh.c (elf_sh_link_hash_entry): Replace
5749         datalabel_got_offset with union of datalabel_got
5750         offset and refcount.
5751         (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5752         (allocate_dynrelocs): Delete unnecessary code for
5753         STT_DATALABEL type.  Create entry in got for
5754         datalabel version of symbol if datalabel_got.refcount > 0.
5755         (sh_elf_relocate_section): Use datalabel_got union.
5756         (sh_elf_gc_sweep_hook): Pull common code to initialize
5757         h and eh out of switch statement.  Declare seen_stt_datalabel.
5758         Initialize it.  Decrement datalabel_got.refcount for
5759         got relocs when seen_stt_datalabel is true.
5760         Decrement local_got_refcounts entry for datalabel got relocs
5761         of local symbols.
5762         (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5763         (sh_elf_check_relocs): Declare seen_stt_datalabel.
5764         Initialize it.  When seen_stt_datalabel is true, increment
5765         datalabel_got refcount rather than got.refcount.
5766         (sh_elf_finish_dynamic_symbol): Create relocs to
5767         initialize got entry for datalabel version of symbol.
5768
5769 2002-10-14  Alan Modra  <amodra@bigpond.net.au>
5770
5771         * Makefile.am: Run "make dep-am".
5772         (BFD_H_FILES): Remove version.h.
5773         * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5774         * version.h: ..to here.
5775         * configure.in (bfd_version_date): Remove.
5776         (AC_OUTPUT): Make bfdver.h from version.h.
5777         * bfd.c: #include "bfdver.h".
5778         * vms-hdr.c: Likewise.
5779         * Makefile.in: Regenerate.
5780         * bfd-in2.h: Regenerate.
5781         * configure: Regenerate.
5782         * po/SRC-POTFILES.in: Regenerate.
5783
5784 2002-10-14  Alan Modra  <amodra@bigpond.net.au>
5785
5786         * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5787         bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5788         bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5789         bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5790         bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5791         bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5792         bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5793         bfd_mach_ip2022, bfd_mach_ip2022ext,
5794         bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5795         * bfd-in2.h: Regenerate.
5796
5797 2002-10-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5798
5799         * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5800         endian vector to targ_selvecs.
5801
5802 2002-10-13  Alexandre Oliva  <aoliva@redhat.com>
5803
5804         * elfxx-mips.c (mips_elf_calculate_relocation): Take
5805         save_addend argument.  Don't apply the 32-bit mask to a
5806         GPREL32 value if it's to be used in another relocation.  Don't
5807         use forced-check computation of local_p to decide whether to
5808         add gp0 to GPREL16 value.  Don't use only the lowest 16 bits
5809         of the addend of a non-in-place GPREL16 relocation.
5810         (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5811         mips_elf_calculate_relocation().
5812
5813 2002-10-12  Stephane Carrez  <stcarrez@nerim.fr>
5814
5815         * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5816         with symbols in other sections if we relaxed something;  the sections
5817         output offsets must be re-computed before.
5818
5819 2002-10-12  Stephane Carrez  <stcarrez@nerim.fr>
5820
5821         * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5822         handling to use Elf_Internal_Sym.
5823         (m68hc11_elf_relax_delete_bytes): Likewise.
5824
5825 2002-10-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5826
5827         * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5828         sh_elf_object_p, dtpoff_base): New functions.
5829         (sh_elf_howto_table): Add TLS relocs.
5830         (sh_reloc_map): Likewise.
5831         (sh_elf_info_to_howto): Support TLS relocs.
5832         (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5833         (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5834         New macros.
5835         (sh_elf_obj_tdata): New.
5836         (elf_sh_link_hash_table): Add tls_ldm_got.
5837         (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5838         (allocate_dynrelocs): Support TLS relocs.
5839         (sh_elf_size_dynamic_sections): Likewise.
5840         (sh_elf_relocate_section): Support TLS relocs.  Don't try to find
5841         .rela.got section when found already.  Return false after printing
5842         error about unresolvable relocation.
5843         (sh_elf_gc_sweep_hook): Support TLS relocs.
5844         (sh_elf_check_relocs): Likewise.
5845         (sh_elf_finish_dynamic_symbol): Likewise.
5846         (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5847         * reloc.c: Add SH TLS relocs.
5848         * bfd-in2.h, libbfd.h: Regenerate.
5849
5850 2002-10-11  Daniel Jacobowitz  <drow@mvista.com>
5851
5852         * Makefile.in: Regenerated.
5853
5854 2002-10-11  Daniel Jacobowitz  <drow@mvista.com>
5855
5856         * Makefile.am: Run dep-am.
5857         (BFD_H_DEP): Add simple.c and linker.c.
5858         (BFD32_LIBS): Add simple.lo.
5859         (BFD32_LIBS_CFILES): Add simple.c.
5860         * Makefile.in: Regenerated.
5861         * bfd-in2.h: Regenerated.
5862         * simple.c: New file.
5863
5864 2002-10-11  Alan Modra  <amodra@bigpond.net.au>
5865
5866         * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5867         (record_thumb_to_arm_glue): Likewise.
5868         * ecoff.c (ecoff_link_add_externals): Likewise.
5869         * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5870         (record_thumb_to_arm_glue): Likewise.
5871         * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5872         * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5873         * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5874         * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5875         * elf64-ppc.c (func_desc_adjust): Likewise.
5876         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5877         (sh64_elf64_create_dynamic_sections): Likewise.
5878         * elflink.c (_bfd_elf_create_got_section): Likewise.
5879         (_bfd_elf_create_dynamic_sections): Likewise.
5880         (_bfd_elf_create_linker_section): Likewise.
5881         * elflink.h (elf_add_default_symbol): Likewise.
5882         (elf_link_create_dynamic_sections): Likewise.
5883         (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5884         * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5885         * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5886         (_bfd_mips_elf_add_symbol_hook): Likewise.
5887         (_bfd_mips_elf_create_dynamic_sections): Likewise.
5888         * linker.c (generic_link_add_symbol_list): Likewise.
5889         * xcofflink.c (xcoff_link_add_symbols): Likewise.
5890
5891         * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5892
5893         * elf64-ppc.c (edit_opd): Only zero opd syms when function is
5894         completely removed.  Correct local sym adjustment.
5895
5896 2002-10-10  Stephen Clarke <stephen.clarke@superh.com>
5897
5898         * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5899         Correct mistake in calculation of address of .got.
5900         * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5901         elf_sh64_pic_plt_entry_le): Likewise.
5902
5903 2002-10-09  Richard Shann <richard.shann@superh.com>
5904             Stephen Clarke <stephen.clarke@superh.com>
5905
5906         * Makefile.am: Add entries for elf32-sh64-lin.c and
5907         elf64-sh64-lin.c. Regenerate.
5908         * Makefile.in: Regenerate.
5909         * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
5910         to use sh64 vectors rather than sh vectors.
5911         * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5912         bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5913         * configure: Regenerate.
5914         * elf32-sh64-lin.c: New file.
5915         * elf64-sh64-lin.c: New file.
5916         * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5917         bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5918
5919 2002-10-08  H.J. Lu <hjl@gnu.org>
5920
5921         * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5922         IE->LE transition for R_386_TLS_IE.
5923
5924 2002-10-08  Alan Modra  <amodra@bigpond.net.au>
5925
5926         * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5927
5928 2002-10-07  Mark Elbrecht  <snowball3@softhome.net>
5929
5930         * cofflink.c (mark_relocs): Don't mark relocations in excluded
5931         sections.
5932
5933 2002-10-07  Alan Modra  <amodra@bigpond.net.au>
5934
5935         * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5936         code.
5937
5938         * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5939
5940 2002-10-06  Alan Modra  <amodra@bigpond.net.au>
5941
5942         * opncls.c: Formatting.
5943         (_bfd_new_bfd): Use a smaller section hash table.
5944
5945 2002-10-05  Alexandre Oliva  <aoliva@redhat.com>
5946
5947         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5948         of the other two relocations packed with a REL32 to NONE.
5949
5950 2002-10-02  Stephen Clarke <stephen.clarke@superh.com>
5951
5952         * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
5953         (sh_elf_link_hash_newfunc): Initialize it.
5954         (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
5955         to got.refcount for symbols that are forced local or when
5956         we have direct got refs.
5957         (sh_elf_gc_sweep_hook): Adjust gotplt_refcount.  Use it
5958         to correctly adjust got.refcount and plt.refcount.
5959         (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
5960         (sh_elf_check_relocs): Increment gotplt_refcount.
5961
5962 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
5963
5964         * elf32-i386.c (elf_i386_relocate_section): Fix
5965         movl foo@indntpoff, %eax IE->LE transition.
5966
5967 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
5968
5969         * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
5970         sequence and its transitions.
5971
5972 2002-10-01  Jakub Jelinek  <jakub@redhat.com>
5973
5974         * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
5975         to st_value + addend in non-code sections.
5976         * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
5977         R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
5978
5979 2002-09-30  Gavin Romig-Koch  <gavin@redhat.com>
5980             Ken Raeburn  <raeburn@cygnus.com>
5981             Aldy Hernandez  <aldyh@redhat.com>
5982             Eric Christopher  <echristo@redhat.com>
5983             Richard Sandiford  <rsandifo@redhat.com>
5984
5985         * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
5986         (bfd_mach_mips5500): New.
5987         * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
5988         (arch_info_struct): Add corresponding entries here.
5989         * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
5990         E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
5991         (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
5992         bfd_mach_mips5400 and bfd_mach_mips5500.
5993         (_bfd_mips_elf_mach_extends_p): New function.
5994         (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
5995         the EF_MIPS_MACH flags.
5996         * bfd-in2.h: Regenerate.
5997
5998 2002-09-28  Jason Thorpe  <thorpej@wasabisystems.com>
5999
6000         * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6001         .got sections.
6002
6003 2002-09-28  Alan Modra  <amodra@bigpond.net.au>
6004
6005         * elf.c (map_sections_to_segments): Correct test for start of
6006         writable section in the same page as end of read-only section.
6007
6008 2002-09-27  Matt Thomas  <matt@3am-software.com>
6009
6010         * elf32-vax.c (elf_vax_check_relocs): Remove unused
6011         local_got_refcounts usage.  Remove allocation of got slot.
6012         (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6013         Remove de-allocation of got slot.
6014         (elf_vax_size_dynamic_section): Fix some indentation.  Add hash
6015         traversal for elf_vax_instantiate_got_entries.  Allow empty .got
6016         sections to be GC'ed.
6017         (elf_vax_instantiate_got_entries): New function.
6018         (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling.  Remove
6019         tests that are now handled by elf_vax_instantiate_got_entries.
6020         Assert GOT entry falls within .got section size.  Remove redundant
6021         comparisions.  Fix comments.
6022
6023 2002-09-27  Jakub Jelinek  <jakub@redhat.com>
6024
6025         * reloc.c: Add x86-64 TLS relocs.
6026         * bfd-in2.h, libbfd.h: Rebuilt.
6027         * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6028         relocs.  Add TLS relocs.
6029         (x86_64_reloc_map): Add TLS relocs.
6030         (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6031         (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6032         (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6033         (elf64_x86_64_hash_entry): Define.
6034         (struct elf64_x86_64_obj_tdata): New.
6035         (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6036         (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6037         (link_hash_newfunc): Initialize tls_type.
6038         (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6039         (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6040         (elf64_x86_64_mkobject): New.
6041         (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6042         (elf64_x86_64_tls_transition): New.
6043         (elf64_x86_64_check_relocs): Add r_type variable and use it.
6044         Handle TLS relocs.
6045         (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6046         (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6047         (elf64_x86_64_size_dynamic_sections): Likewise.
6048         (dtpoff_base, tpoff): New.
6049         (elf64_x86_64_relocate_section): Handle TLS relocs.
6050         (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6051         entries.
6052         (bfd_elf64_mkobject): Define.
6053
6054         * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6055         DF_STATIC_TLS if shared.
6056
6057 2002-09-26  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6058
6059         * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6060         empty relocation sections.
6061
6062 2002-09-26  Alan Modra  <amodra@bigpond.net.au>
6063
6064         * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6065         (ppc64_elf_build_stubs): Build them here instead.
6066
6067 2002-09-24  Jakub Jelinek  <jakub@redhat.com>
6068
6069         * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6070         addend into r_addend, not *r_offset.
6071         (elf32_sparc_finish_dynamic_symbol): Likewise.
6072         * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6073         R_SPARC_RELATIVE's r_offset.
6074
6075 2002-09-23  Nathan Tallent  <eraxxon@alumni.rice.edu>
6076
6077         * dwarf2.c (decode_line_info): Update to correctly decode
6078         the (non-standard DWARF2) out-of-order address sequences
6079         generated by the Intel C++ 6.0 compiler for ia64-Linux.
6080
6081 2002-09-23  Mark Elbrecht  <snowball3@softhome.net>
6082
6083         * config.bfd: For DJGPP targets, match with any cpu and any machine.
6084
6085 2002-09-23  Alan Modra  <amodra@bigpond.net.au>
6086
6087         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6088         for discarded FDEs.  Remove redundant assignment.
6089         * elflink.h (elf_bfd_discard_info): Save edited relocs.
6090
6091 2002-09-22  H.J. Lu <hjl@gnu.org>
6092
6093         * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6094         the relocation count between different .reloc sections.
6095
6096 2002-09-21  Alan Modra  <amodra@bigpond.net.au>
6097
6098         * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6099         ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6100         R_PPC_EMB_SDA2REL.  Similarly for R_PPC_EMB_SDA21 and
6101         R_PPC_EMB_RELSDA.
6102
6103         * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6104         unsigned.  Move "symcount" assignment out of loop.
6105         * Makefile.am: Run "make dep-am".
6106         * Makefile.in: Regenerate.
6107         * configure: Regenerate.
6108         * po/SRC-POTFILES.in: Regnerate.
6109
6110 2002-09-19  Nathan Tallent  <eraxxon@alumni.rice.edu>
6111
6112         * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6113         zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6114         (e.g. IRIX64).
6115
6116 2002-09-19  Jakub Jelinek  <jakub@redhat.com>
6117
6118         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6119         even if generating R_PPC_RELATIVE reloc.
6120         (ppc_elf_relocate_section): Make sure relocation is performed
6121         if skip == -2.  Clear memory at r_offset when creating dynamic
6122         relocation.
6123
6124 2002-09-19  Jakub Jelinek  <jakub@redhat.com>
6125
6126         * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6127         BFD_RELOC_386_TLS_GOTIE): Add.
6128         * bfd-in2.h, libbfd.h: Rebuilt.
6129         * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6130         and R_386_TLS_GOTIE.
6131         (elf_i386_reloc_type_lookup): Handle it.
6132         (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6133         char instead of enum, change GOT_* into defines.
6134         (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6135         (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6136         (elf_i386_check_relocs): Likewise.  Avoid crash if local symbol is
6137         accessed both as normal and TLS symbol.  Move R_386_TLS_LDM and
6138         R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6139         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6140         (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6141         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6142         (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6143         tls_type is GOT_TLS_IE_BOTH.
6144         (elf_i386_size_dynamic_sections): Likewise.
6145         (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6146         Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6147         (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6148         all 4 GOT_TLS_* TLS types.
6149
6150 2002-09-19  Nick Clifton  <nickc@redhat.com>
6151
6152         * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6153         follow indirect links.
6154
6155 2002-09-19  Nathan Tallent  <eraxxon@alumni.rice.edu>
6156
6157         * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6158         correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6159         on 64 bit machines.
6160         (ecoff_swap_sym_in) <iss>: Likewise.
6161         * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6162         ECOFF information: 'ioptMax' refers to the actual *size*
6163         of the optimization symtab, not the number of entries.
6164
6165 2002-09-19  Daniel Jacobowitz  <drow@mvista.com>
6166
6167         * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6168         ELF_LINK_HASH_NEEDS_PLT logic.
6169
6170 2002-09-18  Daniel Jacobowitz  <drow@mvista.com>
6171
6172         * elfcode.h (elf_slurp_reloc_table_from_section): Check
6173         correct relocation count.
6174
6175 2002-09-17  Daniel Jacobowitz  <drow@mvista.com>
6176
6177         * bfd-in.h (bfd_get_dynamic_symcount): Define.
6178         * bfd.c (struct _bfd): Add dynsymcount.
6179         * bfd-in2.h: Regenerated.
6180         * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6181         abfd->dynsymcount.
6182         * elfcode.h (elf_slurp_reloc_table_from_section): Check
6183         for overflow.
6184
6185 2002-09-17  Stan Cox <scox@redhat.com>
6186
6187         * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6188         (mips_elf64_final_gp): Don't make up gp value.
6189         * elfn32-mips.c (mips_elf_final_gp): Likewise.
6190         * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6191         .MIPS.options/.options section.
6192
6193 2002-09-17  David O'Brien  <obrien@FreeBSD.org>
6194
6195         * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6196         It is benign for FreeBSD < 4.1.  Minor reformatting.
6197         * elf64-alpha-fbsd.c: Likewise.
6198
6199 2002-09-17  Jakub Jelinek  <jakub@redhat.com>
6200
6201         * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6202         addend.
6203
6204 2002-09-17  Alan Modra  <amodra@bigpond.net.au>
6205
6206         * elf64-alpha.c (alpha_elf_size_info): Make static.
6207
6208 2002-09-17  Svein E. Seldal  <Svein.Seldal@solidas.com>
6209
6210         * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6211         * cpu-tic4x.c: Ditto.
6212
6213 2002-09-17  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6214
6215         * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6216         duplicate define.
6217
6218 2002-09-16  Bruno Haible  <bruno@clisp.org>
6219
6220         * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6221         by a target variant implementation.
6222         * elf64-alpha.c: Likewise.
6223         * elf32-i386-fbsd.c: New file.
6224         * elf64-alpha-fbsd.c: New file.
6225         * targets.c: Support bfd_elf32_i386_freebsd_vec and
6226         bfd_elf64_alpha_freebsd_vec.
6227         * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6228         bfd_elf64_alpha_freebsd_vec.
6229         * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6230         (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6231         (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6232         (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6233         (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6234         * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6235         specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6236
6237 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
6238
6239         * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6240         NULL.
6241         (elf_i386_relocate_section): Return false after printing error about
6242         unresolvable relocation.
6243
6244 2002-09-12  Nick Clifton  <nickc@redhat.com>
6245
6246         * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6247         R_ARM_THM_PC11.
6248
6249 2002-09-11  Jeffrey Law  <law@redhat.com>
6250
6251         * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6252
6253 2002-09-11  Andrew Haley  <aph@cambridge.redhat.com>
6254
6255         * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6256         line_ptr before deciding we've found a symbol.
6257
6258 2002-09-11  Nick Clifton  <nickc@redhat.com>
6259
6260         * po/da.po: New Danish translation file.
6261         * configure.in (LINGUAS): Add 'da'.
6262         * configure: Regenerate.
6263
6264 2002-09-10  Michael Snyder  <msnyder@redhat.com>
6265
6266         * irix-core.c (do_sections, do_sections64): New functions.
6267         (irix_core_core_file_p): Call new functions do_sections,
6268         do_sections64, depending on corefile (32-bit or 64-bit).
6269
6270 2002-09-09  Richard Henderson  <rth@redhat.com>
6271
6272         * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6273         and PCREL21F like PCREL21B.
6274
6275 2002-09-04  Kevin Buettner  <kevinb@redhat.com>
6276
6277         * config.bfd (mips*-*-irix6*): Add new ABI vectors.  Make n32 default
6278         vector.
6279
6280 2002-09-02  Nick Clifton  <nickc@redhat.com>
6281
6282         * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6283         names instead of cryptically overloaded bfd_reloc error
6284         codes.
6285         (v850_elf_relocate_section): Likewise.
6286         (v850_elf_relax_section): Replace caching of external symbols
6287         with caching of internal symbols obtained from calling
6288         bfd_elf_get_elf_syms().
6289         Fixup problems with freeing cached allocated memory blocks.
6290
6291 2002-09-02  Alan Modra  <amodra@bigpond.net.au>
6292
6293         * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6294         (bfd_pj_arch): Use bfd_default_scan.
6295         * cpu-v850.c (scan): Remove.
6296         (N): Use bfd_default_scan.
6297         * cpu-z8k.c (scan_mach): Remove.
6298         (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6299         first.  Use bfd_default_scan.
6300
6301         * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6302         bfd_mach constants.
6303         (ecoff_get_magic): Likewise.
6304         * elf32-v850.c (v850_elf_object_p): Likewise.
6305         (v850_elf_final_write_processing): Likewise.
6306         * mipsbsd.c (MY(set_arch_mach)): Likewise.
6307         (MY(write_object_contents)): Likewise.
6308         * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6309         * coffcode.h (coff_write_object_contents): Likewise.
6310         (coff_set_arch_mach_hook): Add comment describing machine == 0.
6311         Remove unnecessary "machine" assignments.
6312         (coff_write_relocs): Test for the absolute section sym by testing
6313         section and flags.
6314
6315         * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6316         and bfd_mach_i386_i386_intel_syntax.
6317         * pdp11.c (NAME(aout,machine_type)): Likewise.
6318
6319 2002-08-30  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6320
6321         * bfd-in.h (align_power): Cast constants to bfd_vma type.
6322         * bfd-in2.h (align_power): Likewise.
6323
6324 2002-08-30  Alan Modra  <amodra@bigpond.net.au>
6325
6326         * Makefile.am: Run "make dep-am".
6327         * Makefile.in: Regenerate.
6328
6329         * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6330         * cpu-powerpc.c (powerpc_compatible): Likewise.
6331         * cpu-rs6000.c (rs6000_compatible): Likewise.
6332
6333 2002-08-28  Catherine Moore  <clm@redhat.com>
6334
6335         * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6336         (v850-elf-reloc): Don't resolve pc relative relocs.
6337         (v850_elf_ignore_reloc): New routine.
6338         (v850_elf_final_link_relocate): Handle new relocs.
6339         (v850_elf_relax_delete_bytes ): New routine.
6340         (v850_elf_relax_section): New routine.
6341         (bfd_elf32_bfd_relax_section): Define.
6342         (HOWTO): New entries for new relocs.
6343         * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6344         (BFD_RELOC_V850_LONGJUMP): New reloc.
6345         (BFD_RELOC_V850_ALIGN): New reloc.
6346         * archures.c: Remove redundant v850ea architecture.
6347         * cpu-v850.c: Remove redundant v850ea support.
6348         * libbfd.h: Regenerate.
6349         * bfd-in2.h: Regenerated.
6350
6351 2002-08-28  Svein E. Seldal  <Svein.Seldal@solidas.com>
6352
6353         * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6354         * configure.in: Add tic4x_coff vector files.
6355         * configure: Regenerate.
6356         * Makefile.am: Add tic4x target.
6357         * Makefile.in: Regenerate.
6358
6359 2002-08-27  Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6360
6361         * archures.c: Add the BFD arch type tic4x.
6362         * bfd-in.h: Add BFD_IN_MEMORY flag.
6363         * coff-tic4x.c: New file.
6364         * coffswap.h (coff_swap_sym_out): Add preadjuster.
6365         * cpu-tic4x.c: New file.
6366         * targets.c: Added tic4x- in list of xvecs.
6367         * ticoff.h: New file.
6368         * bfd-in2.h: Regenerate.
6369
6370 2002-08-27  Adam Nemet  <anemet@lnxw.com>
6371
6372         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6373         bit of DT_INIT and DT_FINI for Thumb functions.
6374
6375 2002-08-26  Alan Modra  <amodra@bigpond.net.au>
6376
6377         * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6378
6379 2002-08-26  Alan Modra  <amodra@bigpond.net.au>
6380
6381         * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6382
6383 2002-08-24  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6384
6385         * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6386         (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6387         Likewise.
6388         (struct elf_sh_pcrel_relocs_copied): Removed.
6389         (struct elf_sh_dyn_relocs): New.
6390         (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6391         field with dyn_relocs.
6392         (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6393         sections and sym_sec.
6394         (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6395         (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6396         (sh_elf_create_dynamic_sections): Use create_got_section instead
6397         of _bfd_elf_create_got_section.
6398         (sh_elf_check_relocs): Likewise.
6399         (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6400         sections.
6401         (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6402         sh_elf_relocate_section, sh_elf_check_relocs,
6403         sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6404         Likewise.
6405         (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6406         dynamic relocations and avoiding the copy relocation when we
6407         didn't find any dynamic relocations in the section which has
6408         contents or is read-only.
6409         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6410         (sh_elf_size_dynamic_sections): Don't reset the size of
6411         .rela.got section even if dynamic_sections_created flag is off.
6412         Don't use sh_elf_discard_copies. Scan all input bfd and use
6413         allocate_dynrelocs. Call readonly_dynrelocs to determine
6414         whether we need DT_TEXTREL.
6415         (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6416         whether the symbol was never referred to.
6417         (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6418         (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6419         (sh_elf_check_relocs): Call create_got_section if the short-cut
6420         to .got is null. Increment reference counters only instead of
6421         allocating space on dynamic sections here. Don't conditionalize
6422         uninitialized got.offset value when marking the symbol as a
6423         global offset table entry. Keep relocations for symbols satisfied
6424         by a dynamic library to avoid copy relocations for the symbol.
6425         Set dynobj field of an elf hash table if needed.
6426         (sh_elf_finish_dynamic_sections): Handle null section pointer
6427         correctly.
6428         (elf_backend_copy_indirect_symbol): Defined.
6429         (elf_backend_can_refcount): Defined.
6430
6431 2002-08-23  Nick Clifton  <nickc@redhat.com>
6432
6433         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6434         previous change.  Add comment explaining why.
6435
6436 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>
6437
6438         * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6439         contents of .got.plt[2] to tr0, not address of .got.plt.
6440         (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6441         patching absolute plt entry. For shmedia plt entry, set bottom bit
6442         of branch to plt0 as this is a branch to an shmedia instruction.
6443         * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6444         Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6445         (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6446         branch to plt0.
6447         (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6448         patching absolute plt entry. For shmedia plt entry, branch to
6449         plt0 is now ptrel, so use relative offset.  Set bottom bit of
6450         branch target as it is a branch to an shmedia instruction.
6451
6452 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>,
6453             Richard Shann <richard.shann@superh.com>
6454
6455         * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6456         value if .init is an SHmedia function.  Similarly for DT_FINI.
6457         * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6458
6459 2002-08-23  Stephen Clarke <stephen.clarke@superh.com>
6460
6461         * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6462         dynamic section.
6463         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6464
6465 2002-08-22  Kaz Kojima <kkojima@rr.iij4u.or.jp>
6466
6467         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6468         byte read when reading the return address register column.
6469
6470 2002-08-22  Nick Clifton  <nickc@redhat.com>
6471
6472         * config.bfd: Add powepc64-*-*bsd* target.
6473
6474 2002-08-22  Graeme Peterson  <gp@qnx.com>
6475
6476         * Makefile.am: Add entries for elf32-shqnx.c
6477         * Makefile.in: Regenerate.
6478         * config.bfd: Add support sh-*-nto* target.
6479         * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6480         * configure: Regenerate.
6481         * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6482         * elf32-sh.c: Do not include elf32-target.h if
6483         ELF32_SH_C_INCLUDED is defined.
6484         * elf32-shqnx.c: New file: Support for QNX.
6485         * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6486
6487 2002-08-22  Nick Clifton  <nickc@redhat.com>
6488
6489         * po/tr.po: Updated Turkish translation.
6490
6491         * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6492         symbols are not read.
6493
6494 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
6495
6496         * elf32-m68hc11.c: Formatting fixes.
6497         (elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
6498         * elf32-m68hc12.c: Formatting fixes.
6499         (elf32_m68hc11_gc_mark_hook): Correct params.  Remove unnecessary test.
6500
6501 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
6502
6503         * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6504         SEC_DATA.
6505         (pmac_xcoff_vec): Likewise.
6506         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6507         (aix5coff64_vec): Likewise.
6508
6509 2002-08-22  Alan Modra  <amodra@bigpond.net.au>
6510
6511         * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6512         param to elf_backend_copy_indirect_symbol.
6513         (_bfd_elf_link_hash_copy_indirect): Likewise.
6514         * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6515         calls to copy_indirect_symbol.
6516         * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6517         * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6518         * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6519         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6520         * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6521         * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6522         * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6523         * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6524         * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6525         * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise.  Properly
6526         test refcounts for "used" values.
6527
6528 2002-08-21  John David Anglin  <dave@hiauly1.hia.nrc.ca>
6529
6530         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6531         argument declaration.
6532
6533 2002-08-19  Elena Zannoni <ezannoni@redhat.com>
6534
6535         * archures.c (bfd_mach_ppc_e500): Added.
6536         * bfd-in2.h: Rebuilt.
6537         * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6538
6539 2002-08-19  Alan Modra  <amodra@bigpond.net.au>
6540
6541         * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6542
6543 2002-08-17  Andrew Cagney  <ac131313@redhat.com>
6544
6545         * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6546         `bfd_byte'.
6547
6548 2002-08-17  Stan Cox  <scox@redhat.com>
6549
6550         * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6551         IRIX 6 segment layout for NEWABI.
6552
6553 2002-08-16  Stephen Clarke <stephen.clarke@superh.com>
6554
6555         * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6556         symbols when looking for section referred to by a relocation.
6557         * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6558
6559 2002-08-15  Alan Modra  <amodra@bigpond.net.au>
6560
6561         * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6562
6563 2002-08-15  Hans-Peter Nilsson  <hp@axis.com>
6564
6565         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6566         missing check for whether the symbol is referenced by DSO before
6567         unexporting it as an unneeded dynamic symbol.
6568
6569 2002-08-14  H.J. Lu <hjl@gnu.org>
6570
6571         * libbfd.h: Regenerate.
6572
6573 2002-08-14  H.J. Lu <hjl@gnu.org>
6574
6575         * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6576
6577 2002-08-14  Stephane Carrez  <stcarrez@nerim.fr>
6578
6579         * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6580         instructions.
6581         (m68hc11_direct_relax): New to define table of relaxable instructions.
6582         (find_relaxable_insn): New, find a relaxable insn.
6583         (compare_reloc): New to compare two relocs.
6584         (m68hc11_elf_relax_section): New, relax text sections.
6585         (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6586         (elf32_m68hc11_check_relocs): New function for GC support.
6587         (elf32_m68hc11_relocate_section): New function for GC support.
6588         (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6589         (elf_backend_check_relocs): Likewise.
6590         (elf_backend_relocate_section): Likewise.
6591
6592 2002-08-13  H.J. Lu <hjl@gnu.org>
6593
6594         * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6595         definitions in shared objects when checking symbol with
6596         undefined version.
6597
6598 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
6599
6600         * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6601         (elf32_m68hc11_gc_sweep_hook): Likewise.
6602         (elf_backend_gc_mark_hook): Define for GC section support.
6603         (elf_backend_gc_sweep_hook): Likewise.
6604         (elf_backend_can_gc_sections): Likewise.
6605
6606         * elf32-m68hc12.c: Likewise.
6607
6608 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
6609
6610         * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6611         (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6612         (_bfd_m68hc11_elf_set_private_flags): New function.
6613         Use them to set/check/print ELF flags specific to 68HC11.
6614
6615         * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6616         (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6617         (_bfd_m68hc12_elf_set_private_flags): New function.
6618         Use them to set/check/print ELF flags specific to 68HC12.
6619
6620 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
6621
6622         * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6623         fix masks for PC-rel relocs.
6624         (m68hc11_elf_ignore_reloc): New function.
6625
6626         * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6627         68HC12 banked addressing relocs.
6628         (m68hc12_phys_addr): New to compute physical address of banked memory.
6629         (m68hc12_phys_page): Likewise for page.
6630         (m68hc12_addr_is_banked): New to see if address is in banked area.
6631         (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6632
6633 2002-08-13  Stephane Carrez  <stcarrez@nerim.fr>
6634
6635         * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6636         BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6637         BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6638         * bfd-in2.h: Regenerate.
6639
6640 2002-08-12  H.J. Lu <hjl@gnu.org>
6641
6642         * elflink.h (elf_add_default_symbol): Preserve section across
6643         elf_merge_symbol.
6644
6645 2002-08-09  Graeme Peterson  <gp@qnx.com>
6646
6647         * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6648         elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6649         * Makefile.in: Regenerate.
6650         * config.bfd: Add support for powerpc{le}-*-nto targets.
6651         * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6652         * configure: Regenerate.
6653         * elf32-i386qnx.c: Moved backend functions into a QNX specific
6654         common file "elf32-qnx.h", and now include that file.
6655         * elf32-qnx.h: New file: QNX specific common elf backend.
6656         * elf32-ppc.c: Do not include elf32-target.h if
6657         ELF32_PPC_C_INCLUDED is defined.
6658         * elf32-ppcqnx.c: New file: Support for QNX.
6659         * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6660         * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6661
6662 2002-08-09  Nick Clifton  <nickc@redhat.com>
6663
6664         * po/sv.po: Updated Swedish translation.
6665
6666 2002-08-09  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6667
6668         * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6669         g->global_gotsym is NULL.
6670
6671 2002-08-08  H.J. Lu <hjl@gnu.org>
6672
6673         * elflink.h (elf_add_default_symbol): Don't warn if a definition
6674         overrides an indirect versioned symbol.
6675
6676 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
6677
6678         * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6679         for R_386_TLS_TPOFF32 relocs against symndx 0.
6680
6681 2002-08-07  H.J. Lu <hjl@gnu.org>
6682
6683         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6684         with undefined version if needed.
6685         (elf_link_assign_sym_version): Match a default symbol with a
6686         version without definition. No need to hide the default
6687         definition separately.
6688
6689 2002-08-08  Alan Modra  <amodra@bigpond.net.au>
6690
6691         * elflink.h (elf_link_output_extsym): Don't output symbols from
6692         SEC_EXCLUDE sections.
6693
6694         * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6695
6696 2002-08-07  Alan Modra  <amodra@bigpond.net.au>
6697
6698         * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6699         entries.
6700
6701 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6702
6703         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6704         mismatch.
6705
6706 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6707
6708         * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6709
6710 2002-08-07  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6711
6712         * elf32-mips.c (mips_reloc_map): Fix typo.
6713
6714 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
6715
6716         * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6717
6718 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
6719
6720         * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6721
6722 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
6723
6724         * libxcoff.h: Use PARAMS on function declarations.
6725         * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6726         * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6727
6728         * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6729         addend.
6730         * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6731
6732 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
6733
6734         * coff-rs6000.c: Formatting fixes.
6735         (xcoff_calculate_relocation): Use PARAMS in declaration.
6736         (xcoff_complain_overflow): Likewise.
6737         (xcoff_ppc_relocate_section): Use old-style function pointer call.
6738         (bfd_xcoff_backend_data): Remove useless comments.
6739         (rs6000coff_vec): Likewise.
6740         (bfd_pmac_xcoff_backend_data): Likewise.
6741         (pmac_xcoff_vec): Likewise.
6742
6743         * coff64-rs6000.c: Formatting fixes.
6744         (xcoff64_calculate_relocation): Use PARAMS in declaration.
6745         (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6746         (bfd_xcoff_backend_data): Remove useless comments.
6747         (rs6000coff64_vec): Likewise.
6748         (bfd_xcoff_aix5_backend_data): Likewise.
6749         (aix5coff64_vec): Likewise.
6750
6751 2002-08-06  Alan Modra  <amodra@bigpond.net.au>
6752
6753         * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6754         mask entries.  Use complain_overflow_dont for R_REF.
6755         (xcoff_reloc_type_ba): Revert last change.
6756         (xcoff_reloc_type_br): Likewise.
6757         (xcoff_reloc_type_crel): Likewise.
6758         (xcoff_ppc_relocate_section): Likewise.
6759         * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6760         (xcoff64_ppc_relocate_section): Likewise.
6761         (xcoff64_howto_table): Revert some of last change to mask entries.
6762         Use complain_overflow_dont for R_REF.
6763
6764         * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries.  Make all
6765         relocs with bitsize == 16 have size = 1.
6766         (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6767         (xcoff_reloc_type_br): Likewise.
6768         (xcoff_reloc_type_crel): Likewise.
6769         (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6770         * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6771         dst_mask adjustment.
6772         (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6773         (xcoff64_howto_table): Fix src_mask entries.  Make all relocs with
6774         bitsize == 16 have size = 1.
6775
6776 2002-08-01  Denis Chertykov  <denisc@overta.ru>
6777
6778         * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6779         (struct misc): New field isymbuf. All free_* fields removed.
6780         (symbol_value): Pass in internal syms. No need to swap syms in.
6781         (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6782         possibly cached info.
6783         (tidyup_after_error): Removed.
6784         (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6785         misc. Use new field.
6786         (adjust_all_relocations): Use internal syms. No need to swap syms
6787         in and out.
6788         (add_page_insn): Don't use removed fields of struct misc.
6789
6790 2002-08-01  Nick Clifton  <nickc@redhat.com>
6791
6792         * elf32-arm.h: Revert previous delta.
6793
6794 2002-08-01  Nick Clifton  <nickc@redhat.com>
6795
6796         * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6797         * configure: Regenerate.
6798
6799 2002-07-31  H.J. Lu <hjl@gnu.org>
6800
6801         * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6802         selected.
6803
6804 2002-07-31  H.J. Lu <hjl@gnu.org>
6805
6806         * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6807         is selected.
6808
6809 2002-07-31  Jakub Jelinek  <jakub@redhat.com>
6810
6811         * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6812         if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6813
6814 2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
6815
6816         * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6817         There is no 8 byte relocation type for this architecture.
6818         (do_ns32k_reloc): Use bfd_vma instead of native types.
6819         (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6820         returns void.
6821         (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6822         rely on generic code to do that.
6823         * aout-ns32k.c (howto_table): Add appropriate overflow detection
6824         to all table entries.
6825         (_bfd_ns32k_relocate_contents): put_data returns void.
6826         * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6827         (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6828         return void.
6829
6830 2002-07-31  Ian Dall  <ian@sibyl.beware.dropbear.id.au>
6831
6832         * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6833         archive object is target dependant.
6834
6835 2002-07-31  Adam Nemet  <anemet@lnxw.com>
6836
6837         * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6838         (THUMB_PLT_ENTRY_SIZE): New macro.
6839         (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6840         (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6841         ARM_PLT_ENTRY_SIZE.
6842         (elf32_arm_plt_entry): Likewise.
6843         (elf_backend_plt_header_size): Likewise.
6844         (elf32_thumb_plt0_entry): New global.
6845         (elf32_arm_finish_dynamic_sections): Use it.  Put Thumb entries
6846         into .plt.thumb.
6847         (elf32_thumb_plt_entry): New global.
6848         (elf32_arm_finish_dynamic_symbol): Use it.  Use .thumb.plt for
6849         Thumb entries.  Set the bottom bit of the corresponding GOT entry
6850         for a Thumb PLT entry.
6851         (struct elf32_arm_plt_entry_info): New structure.
6852         (struct elf32_arm_link_hash_entry, plt_info): New member of this
6853         type.
6854         (elf32_arm_link_hash_newfunc): Initialize new member.
6855         (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6856         relocations against the PLT.
6857         (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6858         first_rel_type if this is the first time we encounter the symbol.
6859         (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6860         Determine if relocation needs a PLT entry.  Set first_rel_type if
6861         this is the first time we encounter the symbol
6862         (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6863         functions as well.
6864         (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6865         (elf32_arm_create_dynamic_sections): New function.  Create the
6866         .plt.thumb section.
6867         (elf_backend_create_dynamic_sections): Call it.
6868
6869 2002-07-31  Nick Clifton  <nickc@redhat.com>
6870
6871         * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6872         'alternative' in order to avoid shadowing global symbol of the
6873         same name.
6874         * bfd-in2.h: Regenerate.
6875         * libbfd.h: Regenerate.
6876         * libcoff.h: Regenerate.
6877
6878 2002-07-31  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6879
6880         * Makefile.am: Add n32 ABI support.
6881         * Makefile.in: Regenerate.
6882         * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6883         bit vectors for mips*-*-linux targets as optional.
6884         * configure.in: Add n32 ABI vectors.
6885         * configure: Regenerate.
6886         * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6887         * elfn32-mips.c: New file, n32 ABI support.
6888         * targets.c: Add n32 ABI vectors.
6889
6890 2002-07-30  Graeme Peterson  <gp@qnx.com>
6891
6892         * elfarmqnx-nabi.c: New file: Support for QNX.
6893         * config.bfd: Add support for arm-*-nto target.
6894         * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6895         * configure: Regenerate.
6896         * Makefile.am: Add entries for elfarmqnx-nabi.c.
6897         * Makefile.in: Regenerate.
6898         * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6899         Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6900         * elfarm-nabi.c: Do not include elf32-arm.h if
6901         ELFARM_NABI_C_INCLUDED is defined.
6902         * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
6903
6904 2002-07-30  Nick Clifton  <nickc@redhat.com>
6905
6906         * po/sv.po: Updated Swedish translation.
6907
6908 2002-07-30  Jakub Jelinek  <jakub@redhat.com>
6909
6910         * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6911
6912 2002-07-30  Alan Modra  <amodra@bigpond.net.au>
6913
6914         * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6915         * archive.c (bfd_generic_archive_p): Likewise.
6916         * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6917         (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6918         * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6919         (xcoff64_archive_p): Likewise.
6920         (xcoff64_openr_next_archived_file): Likewise.
6921         (xcoff64_archive_p): Clean up tdata properly on error.
6922         * coffgen.c (coff_real_object_p): Likewise.
6923         (coff_object_p): Release filehdr and opthdr.
6924         * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6925         * ieee.c (ieee_archive_p): Likewise.
6926         * ihex.c (ihex_object_p): Likewise.
6927         (ihex_mkobject): Always allocate tdata.
6928         * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6929         * srec.c (srec_mkobject): Always allocate tdata.
6930         (srec_object_p): Clean up tdata properly on error.
6931         (symbolsrec_object_p): Likewise.
6932         * versados.c (versados_object_p): Likewise.
6933         * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6934         and bfd_realloc instead of realloc.
6935         (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6936         * vms.c (vms_initialize): Always allocate tdata.  Use bfd_alloc in
6937         place of bfd_malloc, simplifying error freeing.  Free hash table too.
6938         (vms_object_p): Clean up tdata on error.
6939         (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6940         (vms_close_and_cleanup): Adjust for bfd_alloc use.
6941
6942 2002-07-30  Alan Modra  <amodra@bigpond.net.au>
6943
6944         * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6945
6946 2002-07-26  Chris Demetriou  <cgd@broadcom.com>
6947
6948         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6949         flags into resulting BFD.
6950
6951 2002-07-26  Alan Modra  <amodra@bigpond.net.au>
6952
6953         From John Reiser <jreiser@BitWagon.com>
6954         * elf32-i386.c (elf_i386_link_hash_table_create): Clear
6955         tls_ldm_got.refcount.
6956
6957 2002-07-25  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6958
6959         * elf64-mips.c: Update TODO comment.
6960         (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
6961         mips_elf64_gprel16_reloca): Remove prototypes.
6962         (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
6963         (UNUSED_RELOC): Replace by EMPTY_RELOC.
6964         (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
6965         wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
6966         R_MIPS_HIGHEST.
6967         (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
6968         R_MIPS_GOT16. Remove wrong comments.
6969         (elf_mips16_jump_howto,elf_mips16_gprel_howto,
6970         elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
6971         from elf32-mips.c.
6972         (mips_elf64_hi16_reloc): Fix formatting.
6973         (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
6974         (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
6975         Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
6976         (mips_elf64_gprel16_reloc): Make static. Add check for
6977         partial_inplace.
6978         (mips_elf64_gprel16_reloca): Remove.
6979         (mips_elf64_literal_reloc): New function.
6980         (mips_elf64_gprel32_reloc): Fix formatting.
6981         (mips_elf64_shift6_reloc): Fix comment. Make static.
6982         (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
6983         elf32-mips.c.
6984         (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
6985         elf32-mips.c
6986         (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
6987         specific relocations.
6988         (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
6989         (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
6990         (ELF_MAXPAGESIZE): Add comment.
6991
6992 2002-07-25  Nick Clifton  <nickc@redhat.com>
6993
6994         * po/sv.po: Updated Swedish translation.
6995         * po/es.po: Updated Spanish translation.
6996         * po/fr.po: Updated French translation.
6997
6998 2002-07-25  Alan Modra  <amodra@bigpond.net.au>
6999
7000         * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7001         as elf_link_record_local_dynamic_symbol.
7002         (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7003         (elf_link_record_local_dynamic_symbol): Declare.  Now returns int.
7004         * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7005         * elflink.c: .. here.  Use bfd_elf_get_elf_syms.  Check whether an
7006         attempt is made to record a symbol in a discarded section, and
7007         return `2' in that case.
7008
7009 2002-07-24  Nick Clifton  <nickc@redhat.com>
7010
7011         * po/sv.po: Updated Swedish translation.
7012         * po/es.po: Updated Spanish translation.
7013
7014 2002-07-23  Alan Modra  <amodra@bigpond.net.au>
7015
7016         * po/SRC-POTFILES.in: Regenerate.
7017
7018         * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7019         immediately.  Remove code handling relocatable linking.
7020         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7021         * elf32-cris.c (cris_elf_relocate_section): Likewise.
7022         * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7023         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7024         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7025         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7026         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7027         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7028         * elf32-v850.c (v850_elf_relocate_section): Likewise.
7029         * elf32-vax.c (elf_vax_relocate_section): Likewise.
7030         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7031         * elf32-avr.c (elf_backend_rela_normal): Define.
7032         * elf32-cris.c: Likewise.
7033         * elf32-fr30.c: Likewise.
7034         * elf32-frv.c: Likewise.
7035         * elf32-h8300.c: Likewise.
7036         * elf32-hppa.c: Likewise.
7037         * elf32-ip2k.c: Likewise.
7038         * elf32-sparc.c: Likewise.
7039         * elf32-v850.c: Likewise.
7040         * elf32-vax.c: Likewise.
7041         * elf64-hppa.c: Likewise.
7042         * elf64-sparc.c: Likewise.
7043         * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7044         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7045         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7046         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7047         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7048         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7049         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7050         * elf-m10200.c (USE_RELA): Don't define.
7051         * elf-m10300.c: Likewise.
7052         * elfarm-oabi.c: Likewise.
7053         * elf32-i370.c: Likewise.
7054         * elf32-ip2k.c: Likewise.
7055         * elf32-m68k.c: Likewise.
7056         * elf32-mcore.c: Likewise.
7057         * elf32-ppc.c: Likewise.
7058         * elf32-s390.c: Likewise.
7059         * elf32-vax.c: Likewise.
7060         * elf64-ppc.c: Likewise.
7061         * elf64-s390.c: Likewise.
7062         * elf64-x86-64.c: Likewise.
7063         * elfxx-ia64.c: Likewise.
7064         * elf32-avr.c (USE_REL): Don't undef.
7065         * elf32-ip2k.c: Likewise.
7066
7067 2002-07-23  Nick Clifton  <nickc@redhat.com>
7068
7069         * elf-bfd.h (struct elf_backend_data): Add new bitfield
7070         'want_p_paddr_set_to_zero'.
7071         * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7072         to false;
7073         * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7074         * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7075
7076 2002-07-23  Gabor Keresztfalvi  <keresztg@mail.com>
7077
7078         * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7079         the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7080         show the Copyright string.
7081         Minor formatting tidy ups.
7082
7083 2002-07-23  Nick Clifton  <nickc@redhat.com>
7084
7085         * po/fr.po: Updated French translation.
7086         * po/sv.po: Updated Swedish translation.
7087
7088 2002-07-23  Alan Modra  <amodra@bigpond.net.au>
7089
7090         * elflink.h (elf_link_input_bfd): Don't change internal symbols
7091         when outputting relocs.
7092
7093 2002-07-20  Jason Thorpe  <thorpej@wasabisystems.com>
7094
7095         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7096         DT_PLTGOT into the dynamic section if there is a PLT.
7097
7098 2002-07-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7099
7100         * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7101         elf32-mips.c.
7102         (_bfd_mips_elf_write_section): Likewise.
7103         * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7104         (_bfd_mips_elf_write_section): Likewise.
7105         * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7106         (elf32_mips_write_section): Likewise.
7107         * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7108         (_bfd_mips_elf_write_section): Likewise.
7109
7110 2002-07-19  Alan Modra  <amodra@bigpond.net.au>
7111
7112         * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7113         PT_IA_64_UNWIND segments for a given section.
7114
7115 2002-07-17  H.J. Lu <hjl@gnu.org>
7116
7117         * Makefile.am: Fix a typo.
7118         * Makefile.in: Regenerate.
7119
7120 2002-07-15  Denis Chertykov  <denisc@overta.ru>
7121             Frank Ch. Eigler  <fche@redhat.com>
7122             Ben Elliston  <bje@redhat.com>
7123             Alan Lehotsky  <alehotsky@cygnus.com>
7124             John Healy  <jhealy@redhat.com>
7125             Graham Stott  <grahams@redhat.com>
7126             Jeff Johnston  <jjohnstn@redhat.com>
7127
7128         * Makefile.am: Add support for ip2k.
7129         * Makefile.in: Regenerate.
7130         * doc/Makefile.in: Regenerate.
7131         * archures.c: Add support for ip2k.
7132         * config.bfd: Add support for ip2k.
7133         * configure.in: Add support for ip2k.
7134         * configure: Regenerate.
7135         * reloc.c: Add support for ip2k.
7136         * targets.c: Add support for ip2k.
7137         * bfd-in2.h: Regenerate.
7138         * libbfd.h: Regenerate.
7139         * cpu-ip2k.c: New file.
7140         * elf32-ip2k.c: New file.
7141
7142 2002-07-17  Ian Rickards  <irickard@arm.com>
7143
7144         * dwarf2.c (concat_filename): If we can't establish the directory
7145         just return the filename.
7146
7147 2002-07-16  Moritz Jodeit  <moritz@jodeit.org>
7148
7149         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7150
7151 2002-07-16  Alan Modra  <amodra@bigpond.net.au>
7152
7153         * elflink.h: Formatting fixes, tidy prototypes.
7154         (elf_link_assign_sym_version): Move common code out of loop.
7155
7156 2002-07-16  Alan Modra  <amodra@bigpond.net.au>
7157
7158         * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7159         reloc section size is zero.  Correct reloc output location.
7160
7161 2002-07-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7162
7163         * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7164         the final type for the e_fsel selector when generating PA2.0W code.
7165         (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7166         relocations.
7167
7168 2002-07-14  H.J. Lu <hjl@gnu.org>
7169
7170         * elflink.h (elf_link_assign_sym_version): Hide the default
7171         definition if there is a hidden versioned definition.
7172
7173 2002-07-12  Hans-Peter Nilsson  <hp@axis.com>
7174
7175         * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7176         dynamic reference test in assertion when initializing GOT with
7177         static contents.  Just assert that there are either no dynamic
7178         sections, the symbol is defined in the regular objects or that the
7179         symbol is undef weak.  Tweak comment.
7180         (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7181         only if the symbol isn't defined in the program and isn't undef
7182         weak.
7183         (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7184         rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7185         When doing so, clear ELF_LINK_HASH_NEEDS_PLT.  Tweak comments.
7186         (elf_cris_discard_excess_program_dynamics): Don't consider
7187         ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7188
7189 2002-07-11  Alan Modra  <amodra@bigpond.net.au>
7190
7191         * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7192         unresolved debugging relocs in dynamic applications.
7193         * elf32-s390.c (elf_s390_relocate_section): Likewise.
7194         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7195         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7196         * elf64-s390.c (elf_s390_relocate_section): Likewise.
7197         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7198         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7199
7200 2002-07-10  Alan Modra  <amodra@bigpond.net.au>
7201
7202         * elf64-ppc.c (ONES): Define.
7203         (ppc64_elf_howto_table): Use ONES here to avoid warnings.  Fill in
7204         missing src_mask fields.  Tweak R_PPC64_NONE, R_PPC64_COPY.  Fill
7205         in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7206
7207         * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7208         (ppc64_elf_set_private_flags): Delete.
7209         (ppc64_elf_section_from_shdr): Delete.
7210         (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7211         (ppc64_elf_fake_sections): Delete.
7212         (bfd_elf64_bfd_set_private_flags): Don't define.
7213         (bfd_elf64_get_symbol_info): Likewise.
7214         (elf_backend_section_from_shdr): Likewise.
7215         (elf_backend_fake_sections): Likewise.
7216
7217 2002-07-10  Marco Walther  <Marco.Walther@sun.com>
7218
7219         * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7220         when not already set.
7221         * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7222         (elf_backend_fake_sections): Define.
7223
7224 2002-07-10  Alan Modra  <amodra@bigpond.net.au>
7225
7226         * merge.c (_bfd_merge_section): Remove redundant output_section check.
7227         Formatting.
7228         (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7229
7230 2002-07-09  Hans-Peter Nilsson  <hp@axis.com>
7231
7232         * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7233         NULL sym_hashes to just before use.
7234         <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7235         symbol with non-default visibility.
7236         <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7237         <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7238         Ditto.
7239         (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7240         symbol with non-default visibility.
7241         (cris_elf_check_relocs): At tests for local symbol before
7242         increasing h->plt.refcount, also check for non-default
7243         visibility.  Ditto when checking for local symbol to eliminate
7244         pc-relative runtime relocs.
7245
7246 2002-07-08  Alan Modra  <amodra@bigpond.net.au>
7247
7248         * elf.c: Formatting.
7249         (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7250         (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7251         (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7252         segments.
7253
7254 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
7255             Alan Modra  <amodra@bigpond.net.au>
7256
7257         * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7258         account the impact of relocation count overflow when computing
7259         section offsets.
7260         * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7261         or not to apply the PE COFF reloc overflow handling.  Fix a
7262         fencepost error in deciding whether or not to use that technique.
7263
7264 2002-07-07  Alan Modra  <amodra@bigpond.net.au>
7265
7266         * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7267         change type of locsyms.
7268         (bfd_elf_get_elf_syms): Declare.
7269         * elf.c (bfd_elf_get_elf_syms): New function.
7270         (group_signature): Use bfd_elf_get_elf_syms.
7271         (bfd_section_from_r_symndx): Likewise.
7272         * elfcode.h (elf_slurp_symbol_table): Likewise.
7273         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7274         (elf_link_add_object_symbols): Likewise.  Reorganise to increase
7275         locality of various data structures.  Properly free internal relocs.
7276         (elf_bfd_final_link): Properly free internal relocs.
7277         (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7278         (elf_link_input_bfd): Likewise.
7279         (elf_gc_mark): Likewise.  Properly free internal relocs.
7280         (elf_gc_sweep): Properly free internal relocs.
7281         (elf_reloc_symbol_deleted_p): No need to swap syms in.
7282         (elf_bfd_discard_info): Use bfd_elf_get_elf_syms.  Properly free
7283         internal relocs.
7284         * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7285         Properly free possibly cached info.
7286         (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7287         (mn10200_elf_symbol_address_p): Pass in internal syms.  Remove
7288         symbol swapping code.
7289         (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7290         Properly free possibly cached info.
7291         * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7292         (mn10300_elf_relax_delete_bytes): Likewise.
7293         (mn10300_elf_symbol_address_p): Likewise.
7294         (mn10300_elf_get_relocated_section_contents): Likewise.
7295         * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7296         (elf32_h8_relax_delete_bytes): Likewise.
7297         (elf32_h8_symbol_address_p): Likewise.
7298         (elf32_h8_get_relocated_section_contents): Likewise.
7299         * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7300         (m32r_elf_relax_delete_bytes): Likewise.
7301         (m32r_elf_get_relocated_section_contents): Likewise.
7302         * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7303         elf_section_data to determine whether cached.
7304         (sh_elf_relax_section): As above for elf-m10200.c.
7305         (sh_elf_relax_delete_bytes): Likewise.
7306         (sh_elf_get_relocated_section_contents): Likewise.
7307         * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7308         * elf64-alpha.c (elf64_alpha_relax_section): As above.  Also delay
7309         reading of local syms.
7310         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7311         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7312         * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7313         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7314         relocs.
7315         * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7316         free internal relocs and section contents.  Don't read symbols.
7317         * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7318         (elf32_hppa_size_stubs): Don't free local syms.
7319         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7320         reading of local syms.  Use bfd_elf_get_elf_syms.  Properly free
7321         possibly cached info.
7322         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7323         * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7324         * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7325         all_local_syms.
7326         (get_local_syms): Delete function.
7327         (edit_opd): Use bfd_elf_get_elf_syms.  Free on error exit.  Cache
7328         on exit.
7329         (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms.  Free/cache on exit.
7330
7331 2002-07-05  Jim Wilson  <wilson@redhat.com>
7332
7333         * syms.c (decode_section_type): New.
7334         (bfd_decode_symclass): Call decode_section_type.
7335
7336 2002-07-04  Jakub Jelinek  <jakub@redhat.com>
7337
7338         * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7339         section content start.
7340         Reported by Michael Schumacher <mike@hightec-rt.com>.
7341
7342 2002-07-04  Alan Modra  <amodra@bigpond.net.au>
7343
7344         * section.c (_bfd_strip_section_from_output): Remove unnecessary
7345         link order code.  Don't actually remove the output section here;
7346         Just set a flag for the linker to do so.
7347         * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7348         sections when setting up output section dynsyms.
7349
7350 2002-07-04  Alan Modra  <amodra@bigpond.net.au>
7351
7352         * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7353         fudge.
7354         * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7355         libs here instead.
7356
7357 2002-07-02  Martin Schwidefsky  <schwidefsky@de.ibm.com>
7358
7359         * elf64-s390.c (create_got_section): Set .got section alignment to
7360         8 bytes.
7361         (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7362
7363 2002-07-02  Alan Modra  <amodra@bigpond.net.au>
7364
7365         * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7366
7367 2002-07-01  Matt Thomas  <matt@3am-software.com>
7368
7369         * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7370         to EF_VAX_*.
7371
7372 2002-07-01  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7373
7374         * elfxx-mips.c (ABI_64_P): Fix comment.
7375         (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7376         new section names for N64 ABI.
7377         (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7378         (mips_elf_calculate_relocation): Code formatting.
7379         (mips_elf_create_dynamic_relocation): Likewise.
7380         (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7381         (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7382         (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7383         in any NewABI.
7384         (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7385         for NewABI.
7386         (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7387         (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7388         here, too.
7389
7390 2002-07-01  Andreas Schwab  <schwab@suse.de>
7391
7392         * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7393         R_X86_64_64 to R_X86_64_RELATIVE.
7394
7395 2002-07-01  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7396
7397         * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7398         * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7399         Run "make dep-am".
7400         * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7401         host_aout_vec.
7402         * configure.in (vaxbsd_vec): Add.
7403         * targets.c (vaxbsd_vec): Add.
7404         * Makefile.in: Rebuild.
7405         * configure: Rebuild.
7406         * po/SRC-POTFILES.in: Rebuild.
7407
7408 2002-07-01  Alan Modra  <amodra@bigpond.net.au>
7409
7410         * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7411         examining to gc_mark_hook, rather than the bfd.
7412         (elf_gc_sections): Adjust.
7413         * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7414         * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7415         * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7416         * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7417         * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7418         * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7419         * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7420         * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7421         * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7422         * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7423         * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7424         * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7425         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7426         * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7427         * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7428         * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7429         * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7430         * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7431         * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7432         * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7433         * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7434         * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7435         * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7436         * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7437         * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7438         * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7439         * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7440         * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise.  Also remove
7441         redundant local sym tests.
7442         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7443         (link_hash_newfunc): Init is_entry.
7444         (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7445         (ppc64_elf_link_hash_table_create): Init all_local_syms.
7446         (create_linkage_sections): Use bfd_make_section_anyway rather than
7447         bfd_make_section.
7448         (ppc64_elf_mark_entry_syms): New function.
7449         (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab.  Set
7450         up opd entry to function section map.
7451         (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7452         relocs that reference the opd section.
7453         (edit_opd): New function.
7454         (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7455         (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7456         (get_local_syms): Do so here.  Exit if we already have local syms.
7457         Remove bogus comment imported from elf32-hppa.c.  Don't attempt to
7458         read local syms on non-ELF input.
7459         (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7460         than duplicating it's function here.  Adjust free of internal
7461         relocs to suit.
7462         (ppc64_elf_relocate_section): Adjust local syms in opd section.
7463         * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7464         * elf32-hppa.c (elf32_hppa_size_stubs): Call
7465         _bfd_elf32_link_read_relocs rather than duplicating it's function
7466         here.  Adjust free of internal relocs to suit.
7467
7468 2002-07-01  Andreas Jaeger  <aj@suse.de>
7469
7470         * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7471         are not allowed in shared libs code, enforce -fPIC.
7472
7473 2002-06-29  Hans-Peter Nilsson  <hp@bitrange.com>
7474
7475         * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7476         trailing zero-sequences when there's previous left-over data.
7477
7478 2002-06-27  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7479
7480         * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7481         (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7482         and opd_rel_sec in order for starting rela section.  Check _raw_size.
7483         (elf_backend_reloc_type_class): Define.
7484
7485 2002-06-27  Kevin Buettner <kevinb@redhat.com>
7486
7487         * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7488         DWARF2 formats.
7489
7490 2002-06-27  Alan Modra  <amodra@bigpond.net.au>
7491
7492         * cpu-powerpc.c: Comment on ordering of arch_info.
7493         * elf32-ppc.c (ppc_elf_object_p): New function.
7494         (elf_backend_object_p): Define.
7495         * elf64-ppc.c (ppc64_elf_object_p): New function.
7496         (elf_backend_object_p): Define.
7497
7498 2002-06-26  Jason Thorpe  <thorpej@wasabisystems.com>
7499
7500         * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7501         * configure: Regenerate.
7502
7503 2002-06-25  Jason Eckhardt  <jle@rice.edu>
7504
7505         * dwarf2.c (decode_line_info): Check unit->addr_size
7506         to read in the proper number of prologue bytes.
7507
7508 2002-06-25  Nick Clifton  <nickc@cambridge.redhat.com>
7509
7510         * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7511         aix5coff64_vec if 64-bit bfd support has been enabled.
7512         (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7513         been enabled.
7514
7515         * targets.c (_bfd_target_vector[]): Only include
7516         aix5coff64_vec if 64-bit bfd support has been enabled.
7517
7518 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
7519
7520         * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7521         * elf32-hppa.c (hppa_add_stub): Likewise.
7522         * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7523         * elflink.h (elf_add_default_symbol): Fix comment typo.
7524         (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7525         (elf_link_add_object_symbols): Likewise.
7526         (elf_link_assign_sym_version): Likewise.
7527         * hash.c (bfd_hash_lookup): Likewise.
7528         * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7529         * section.c (bfd_get_unique_section_name): Likewise.
7530         * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7531         * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7532         (assign_section_numbers): Likewise.
7533         (_bfd_elfcore_make_pseudosection): Likewise.
7534         (elfcore_grok_lwpstatus): Likewise.
7535         (elfcore_grok_win32pstatus): Likewise.
7536         (elfcore_write_note): Constify input params.  Use PTR instead of
7537         void *.  Include terminating NUL in namesz.  Correct padding.
7538         Support NULL "name" param.  Use memcpy instead of strcpy.
7539         (elfcore_write_prpsinfo): Constify input params.
7540         (elfcore_write_prstatus): Likewise.  Use PTR instead of void *.
7541         (elfcore_write_lwpstatus): Likewise.
7542         (elfcore_write_pstatus): Likewise.
7543         (elfcore_write_prfpreg): Likewise.
7544         (elfcore_write_prxfpreg): Likewise.
7545         * elf-bfd.h (elfcore_write_note): Update declaration.
7546         (elfcore_write_prpsinfo): Likewise.
7547         (elfcore_write_prstatus): Likewise.
7548         (elfcore_write_pstatus): Likewise.
7549         (elfcore_write_prfpreg): Likewise.
7550         (elfcore_write_prxfpreg): Likewise.
7551         (elfcore_write_lwpstatus): Likewise.
7552
7553 2002-06-25  Jason Eckhardt  <jle@rice.edu>
7554
7555         * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7556         symbols of type stProc and stStaticProc.
7557
7558 2002-06-25  Nick Clifton  <nickc@redhat.com>
7559
7560         * ecoff.c: VArious formatting fixes.
7561
7562 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
7563
7564         * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7565
7566 2002-06-25  Alan Modra  <amodra@bigpond.net.au>
7567
7568         * aout-adobe.c: Don't compare against "true" or "false.
7569         * aout-target.h: Likewise.
7570         * aoutx.h: Likewise.
7571         * archive.c: Likewise.
7572         * bout.c: Likewise.
7573         * cache.c: Likewise.
7574         * coff-a29k.c: Likewise.
7575         * coff-alpha.c: Likewise.
7576         * coff-i386.c: Likewise.
7577         * coff-mips.c: Likewise.
7578         * coff-or32.c: Likewise.
7579         * coff64-rs6000.c: Likewise.
7580         * coffcode.h: Likewise.
7581         * coffgen.c: Likewise.
7582         * cpu-ns32k.c: Likewise.
7583         * ecoff.c: Likewise.
7584         * ecofflink.c: Likewise.
7585         * elf.c: Likewise.
7586         * elf32-arm.h: Likewise.
7587         * elf32-cris.c: Likewise.
7588         * elf32-d30v.c: Likewise.
7589         * elf32-i386.c: Likewise.
7590         * elf32-mcore.c: Likewise.
7591         * elf32-ppc.c: Likewise.
7592         * elf32-sh.c: Likewise.
7593         * elf32-sh64.c: Likewise.
7594         * elf32-v850.c: Likewise.
7595         * elf64-alpha.c: Likewise.
7596         * elf64-sh64.c: Likewise.
7597         * elfcode.h: Likewise.
7598         * elfcore.h: Likewise.
7599         * elflink.h: Likewise.
7600         * elfxx-mips.c: Likewise.
7601         * i386os9k.c: Likewise.
7602         * ieee.c: Likewise.
7603         * libbfd.c: Likewise.
7604         * linker.c: Likewise.
7605         * mmo.c: Likewise.
7606         * nlm32-alpha.c: Likewise.
7607         * nlm32-i386.c: Likewise.
7608         * nlm32-ppc.c: Likewise.
7609         * nlm32-sparc.c: Likewise.
7610         * nlmcode.h: Likewise.
7611         * oasys.c: Likewise.
7612         * pdp11.c: Likewise.
7613         * peicode.h: Likewise.
7614         * reloc.c: Likewise.
7615         * som.c: Likewise.
7616         * srec.c: Likewise.
7617         * tekhex.c: Likewise.
7618         * vms.c: Likewise.
7619         * xcofflink.c: Likewise.
7620         * elf64-sparc.c: Edit comment to not use "== false".
7621
7622         * aoutf1.h: Don't use "? true : false".
7623         * ecoff.c: Likewise.
7624         * format.c: Likewise.
7625         * ieee.c: Likewise.
7626         * linker.c: Likewise.
7627         * mmo.c: Likewise.
7628         * oasys.c: Likewise.
7629
7630 2002-06-23  H.J. Lu  <hjl@gnu.org>
7631
7632         * elflink.h (elf_link_add_archive_symbols): For the default
7633         version, check references with only one `@' first.
7634
7635 2002-06-23  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7636
7637         * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7638         function.
7639         (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7640         symbol table.
7641         (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7642         (elf64_hppa_size_dynamic_sections): Revise to use
7643         elf64_hppa_mark_milli_and_exported_functions.
7644         (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7645         symbols out of dynamic symbol table.
7646
7647 2002-06-23  Alan Modra  <amodra@bigpond.net.au>
7648
7649         * Makefile.in: Regenerate.
7650         * libbfd.h: Regenerate.
7651         * bfd-in2.h: Regenerate.
7652         * configure: Regenerate.
7653         * po/SRC-POTFILES.in: Regenerate.
7654
7655         * elflink.h: Comment typo fixes.
7656
7657 2002-06-23  H.J. Lu  <hjl@gnu.org>
7658
7659         * elf-bfd.h (elf_link_loaded_list): New structure.
7660         (elf_link_hash_table): Add "loaded".
7661         * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7662         * elflink.h (elf_link_check_versioned_symbol): New function.
7663         (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7664
7665 2002-06-19  Nick Clifton  <nickc@cambridge.redhat.com>
7666
7667         * elflink.h (size_dynamic_sections): If the target does not
7668         support an ELF style hash table, return true, indicating that
7669         nothing needed to be done, rather than false, indicating that the
7670         section's size could not be computed.
7671
7672 2002-06-18  Dave Brolley  <brolley@redhat.com>
7673
7674         From Catherine Moore, Michael Meissner, Dave Brolley:
7675         * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7676         * targets.c: Support bfd_elf32_frv_vec.
7677         * reloc.c: Add FRV relocs.
7678         * configure.in: Add support for bfd-elf32-frv-vec.
7679         * config.bfd (targ_cpu): Add support for frv-*-elf.
7680         * archures.c: Add frv arch and machines.
7681         * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7682         (ALL_MACHINES_CFILES): Add cpu-frv.c.
7683         (BFD32_BACKENDS): Add elf32-frv.lo.
7684         (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7685         (cpu-frv.lo): New target.
7686         (elf32-frv.lo): New target.
7687         * cpu-frv.c: New file.
7688         * elf32-frv.c: New file.
7689
7690 2002-06-18  Jakub Jelinek  <jakub@redhat.com>
7691
7692         * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7693         e_shnum == 0.
7694         Only read the first section header if e_shoff is non-zero.
7695         Don't consider e_shstrndx if there are no sections.
7696
7697 2002-06-17  Tom Rix <trix@redhat.com>
7698
7699         * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7700         R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7701         complain_overflow_bitfield.
7702
7703 2002-06-17  Alan Modra  <amodra@bigpond.net.au>
7704
7705         * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7706         (bfd_fdopenr): Likewise.
7707         (bfd_openstreamr): Likewise.
7708         (bfd_openw): Likewise.
7709
7710         * targets.c: Sort target vecs.
7711         (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7712         bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7713         bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7714         bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7715         * configure.in: Sort target vecs.  Add m88kmach3_vec.
7716         * configure: Regenerate.
7717
7718 2002-06-16  Hans-Peter Nilsson  <hp@bitrange.com>
7719
7720         * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7721         bpo_reloc_no to break sort order ties, not address of items.
7722
7723 2002-06-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7724
7725         * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7726         Skip excluded sections in determing __gp value.
7727         (elf_hppa_final_link_relocate): Use the symbol's address in
7728         R_PARISC_FPTR64 relocations that don't need an opd entry.
7729         * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7730         (elf64_hppa_finalize_dynreloc): Likewise.
7731         (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7732         (elf64_hppa_finish_dynamic_symbol): Break up assert.
7733
7734 2002-06-14  Sergey Grigoriev  <serge@leopold.Physik.Uni-Augsburg.DE>
7735
7736         * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7737         alignment for .bss, .data and .text sections so that sse and sse2
7738         code will work.
7739         * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7740
7741 2002-06013  J"orn Rennecke  <joern.rennecke@superh.com>
7742
7743         config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7744         sh[1234]*-elf*.
7745
7746 2002-06-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
7747
7748         * elflink.h (elf_bfd_final_link): Improve error handling for missing
7749         dynamic sections.
7750
7751         * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7752         for a symbol that has no output section.
7753         (allocate_dynrel_entries): Correct comment.
7754         (elf64_hppa_finalize_dynreloc): Likewise.  Don't create an opd entry
7755         unless we want one.
7756         (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7757         (elf64_hppa_finalize_dlt): Likewise.  Prevent segfault for symbols
7758         with no section.  Remove unnecessary parentheses.
7759
7760 2002-06-11  Tom Rix  <trix@redhat.com>
7761
7762         * coffcode.h (coff_compute_section_file_positions): Add data
7763         section to AIX loader alignment check.
7764
7765         * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
7766         alignment to 4 bytes.
7767         (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7768         power accessor macro.
7769         (do_shared_object_padding): Remove invalid assertion.
7770
7771 2002-06-10  Richard Sandiford  <rsandifo@redhat.com>
7772
7773         * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7774         for removed output sections.
7775
7776 2002-06-10  Geoffrey Keating  <geoffk@redhat.com>
7777
7778         * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7779         htab_alloc.
7780         * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7781
7782 2002-06-08  H.J. Lu <hjl@gnu.org>
7783
7784         * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7785         work around a long long bug in gcc 2.96 on mips.
7786
7787 2002-06-08  Jason Thorpe  <thorpej@wasabisystems.com>
7788
7789         * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7790         (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7791         Regenerate dependency lists.
7792         * Makefile.in: Regenerate.
7793         * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7794         vax1knetbsd_vec to targ_selvecs.
7795         * configure.in: Add vax1knetbsd_vec.
7796         * configure: Regenerate.
7797         * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7798         * vax1knetbsd.c: New file.
7799         * vaxnetbsd.c: Update copyright years.
7800         (TARGET_PAGE_SIZE): Set to 0x1000.
7801         (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7802
7803 2002-06-08  Matt Thomas  <matt@3am-software.com>
7804
7805         * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7806
7807 2002-06-08  Alan Modra  <amodra@bigpond.net.au>
7808
7809         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7810
7811 2002-06-08  Alan Modra  <amodra@bigpond.net.au>
7812
7813         * Makefile.am: Run "make dep-am".
7814         * Makefile.in: Regenerate.
7815
7816         * armnetbsd.c: Replace CONST with const.
7817         * corefile.c: Likewise.
7818         * elf32-dlx.c: Likewise.
7819         * elf64-mips.c: Likewise.
7820         * mmo.c: Likewise.
7821         * ns32knetbsd.c: Likewise.
7822
7823         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7824         table is elf64-sparc.
7825
7826 2002-06-08  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7827
7828         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7829         Fix RELA addends to get not shifted in the result. Don't do special
7830         handling of R_MIPS_64 for NewABI.
7831
7832 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
7833
7834         * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7835         (NAME(aout,slurp_reloc_table)): Likewise.
7836         * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7837         * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7838         (xcoff_write_archive_contents_big): Likewise.
7839         (xcoff_generate_rtinit): Likewise.
7840         (xcoff_generate_rtinit): Likewise, and check error return.
7841         * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7842         * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7843         (coff_get_normalized_symtab): Likewise.
7844         (coff_make_empty_symbol): Likewise.
7845         (bfd_coff_set_symbol_class): Likewise.
7846         * cofflink.c (coff_link_add_symbols): Likewise.
7847         * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7848         * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7849         (bfd_ecoff_write_accumulated_debug): Likewise.
7850         * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7851         * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7852         * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7853         * ieee.c (do_with_relocs): Use bfd_zalloc.
7854         * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7855         * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7856         (NAME(aout,slurp_reloc_table)): Likewise.
7857         (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7858         * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7859         * som.c (som_build_and_write_symbol_table): Likewise.
7860         (som_slurp_string_table): Likewise.
7861         (som_slurp_symbol_table): Likewise.
7862         (som_bfd_ar_write_symbol_stuff): Likewise.
7863         * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7864         * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7865         * tekhex.c (find_chunk): Likewise.  Get rid of unused "sname".
7866         * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7867         * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7868
7869 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
7870
7871         * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7872         "group" union.
7873         (elf_group_name): Update.
7874         (elf_group_id): Define.
7875         (bfd_elf_set_group_contents): Declare.
7876         * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7877         (set_group_contents): Rename to bfd_elf_set_group_contents.  Remove
7878         ATTRIBUTE_UNUSED from failedptrarg.  If elf_group_id is set, use
7879         that sym for the signature.
7880         (_bfd_elf_compute_section_file_positions): Don't call
7881         set_group_contents for "ld -r" case.
7882         (swap_out_syms): Use bfd_zalloc.
7883         * elflink.h (elf_link_add_archive_symbols): Likewise.
7884         (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7885         (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7886
7887 2002-06-07  Alan Modra  <amodra@bigpond.net.au>
7888
7889         * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7890         relocs in opd for non-shared too.
7891
7892 2002-06-06  Jeffrey Law  <law@redhat.com>
7893
7894         * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7895         relocations.
7896
7897 2002-06-06  Nick Clifton  <nickc@cambridge.redhat.com>
7898
7899         * merge.c: Include libiberty.h.
7900         * elf-strtab.c: Include libiberty.h.
7901
7902 2002-06-06  Elias Athanasopoulos  <eathan@otenet.gr>
7903
7904         * peXXigen.c (pe_print_idata): Remove unused variable.
7905
7906 2002-06-06  David Heine <dlheine@tensilica.com>
7907
7908         * elf.c (assign_file_positions_for_segments): Remove unallocated
7909         sections from the section to segment mapping for PT_LOAD segments.
7910         Update comment about empty loadable segments.
7911
7912 2002-06-06  Richard Sandiford  <rsandifo@redhat.com>
7913
7914         * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7915         is within the .stabstr section.
7916
7917 2002-06-06  Alan Modra  <amodra@bigpond.net.au>
7918
7919         * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7920         are "const PTR", not "const PTR *".
7921         (bfd_elf32_swap_symbol_in): Likewise.
7922         (bfd_elf64_swap_symbol_in): Likewise.
7923         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7924         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7925         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7926         (elf_link_add_object_symbols): Likewise.
7927         (elf_link_record_local_dynamic_symbol): Likewise.
7928         (elf_link_input_bfd): Likewise.
7929         (elf_gc_mark): Likewise.
7930         (elf_reloc_symbol_deleted_p): Likewise.
7931         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7932         (mn10200_elf_relax_delete_bytes): Likewise.
7933         (mn10200_elf_symbol_address_p): Likewise.
7934         (mn10200_elf_get_relocated_section_contents): Likewise.
7935         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7936         (mn10300_elf_relax_section): Likewise.
7937         (mn10300_elf_relax_delete_bytes): Likewise.
7938         (mn10300_elf_symbol_address_p): Likewise.
7939         (mn10300_elf_get_relocated_section_contents): Likewise.
7940         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7941         (elf32_h8_relax_delete_bytes): Likewise.
7942         (elf32_h8_symbol_address_p): Likewise.
7943         (elf32_h8_get_relocated_section_contents): Likewise.
7944         * elf32-hppa.c (get_local_syms): Likewise.
7945         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7946         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7947         * elf32-sh.c (sh_elf_relax_section): Likewise.
7948         (sh_elf_relax_delete_bytes): Likewise.
7949         (sh_elf_get_relocated_section_contents): Likewise.
7950         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7951         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7952         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7953         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7954         * elf64-ppc.c (get_local_syms): Likewise.
7955         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7956         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7957
7958 2002-06-05  J"orn Rennecke <joern.rennecke@superh.com>
7959
7960         * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
7961
7962 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
7963
7964         * elf.c (group_signature): Swap in the whole symbol, and handle
7965         extracting section symbol names.
7966         (setup_group): Add comment.
7967         (set_group_contents): When called from objcopy or ld, arrange for
7968         section contents to be written.  Write group member output section
7969         indices to allow objcopy to reorganize sections.
7970         (_bfd_elf_copy_private_section_data): Copy group info.
7971
7972         * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
7973         (bfd_elf32_swap_symbol_in): Update prototype.
7974         (bfd_elf64_swap_symbol_in): Likewise.
7975         * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
7976         (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7977         * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7978         (elf_link_add_object_symbols): Likewise.
7979         (elf_link_record_local_dynamic_symbol): Likewise.
7980         (elf_link_input_bfd): Likewise.
7981         (elf_gc_mark): Likewise.
7982         (elf_reloc_symbol_deleted_p): Likewise.
7983         * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7984         (mn10200_elf_relax_delete_bytes): Likewise.
7985         (mn10200_elf_symbol_address_p): Likewise.
7986         (mn10200_elf_get_relocated_section_contents): Likewise.
7987         * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7988         (mn10300_elf_relax_section): Likewise.
7989         (mn10300_elf_relax_delete_bytes): Likewise.
7990         (mn10300_elf_symbol_address_p): Likewise.
7991         (mn10300_elf_get_relocated_section_contents): Likewise.
7992         * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7993         (elf32_h8_relax_delete_bytes): Likewise.
7994         (elf32_h8_symbol_address_p): Likewise.
7995         (elf32_h8_get_relocated_section_contents): Likewise.
7996         * elf32-hppa.c (get_local_syms): Likewise.
7997         * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7998         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7999         * elf32-sh.c (sh_elf_relax_section): Likewise.
8000         (sh_elf_relax_delete_bytes): Likewise.
8001         (sh_elf_get_relocated_section_contents): Likewise.
8002         * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8003         * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8004         * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8005         * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8006         * elf64-ppc.c (get_local_syms): Likewise.
8007         * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8008         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8009         * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8010         * elf64-alpha.c (alpha_elf_size_info): Likewise.
8011         * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8012         * elf64-mips.c (mips_elf64_size_info): Likewise.
8013         * elf64-s390.c (s390_elf64_size_info): Likewise.
8014         * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8015
8016 2002-06-05  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
8017
8018         * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8019         elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8020         elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8021         _bfd_mips_elf_ignore_discarded_relocs.
8022         elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8023
8024 2002-06-05  H.J. Lu <hjl@gnu.org>
8025
8026         * elfxx-mips.c (mips_elf_calculate_relocation): Call
8027         _bfd_elf_rel_local_sym for STT_SECTION relocations against
8028         the SEC_MERGE section.
8029
8030 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
8031
8032         * coff-alpha.c: Update copyright date.
8033         * coff-mips.c: Likewise.
8034         * xcoff-target.h: Likewise.
8035
8036         * bfd-in.h: Remove "taken from the source" comment.
8037         * libbfd-in.h: Likewise.
8038         * libcoff-in.h: Likewise.
8039         * bfd-in2.h: Regenerate.
8040         * libbfd.h: Regenerate.
8041         * libcoff.h: Regenerate.
8042
8043         * elf.c (bfd_elf_discard_group): Return true.
8044         * elf-bfd.h (bfd_elf_discard_group): Declare.
8045         * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8046         * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8047         * bfd.c (bfd_discard_group): Define.
8048         * targets.c (struct bfd_target): Add _bfd_discard_group.
8049         (BFD_JUMP_TABLE_LINK): Here too.
8050         * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8051         * aout-adobe.c (aout_32_bfd_discard_group): Define.
8052         * aout-target.h (MY_bfd_discard_group): Define.
8053         * aout-tic30.c (MY_bfd_discard_group): Define.
8054         * binary.c (binary_bfd_discard_group): Define.
8055         * bout.c (b_out_bfd_discard_group): Define.
8056         * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8057         * coffcode.h (coff_bfd_discard_group): Define.
8058         * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8059         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8060         * i386msdos.c (msdos_bfd_discard_group): Define.
8061         * i386os9k.c (os9k_bfd_discard_group): Define.
8062         * ieee.c (ieee_bfd_discard_group): Define.
8063         * ihex.c (ihex_bfd_discard_group): Define.
8064         * mmo.c (mmo_bfd_discard_group): Define.
8065         * nlm-target.h (nlm_bfd_discard_group): Define.
8066         * oasys.c (oasys_bfd_discard_group): Define.
8067         * ppcboot.c (ppcboot_bfd_discard_group): Define.
8068         * som.c (som_bfd_discard_group): Define.
8069         * srec.c (srec_bfd_discard_group): Define.
8070         * tekhex.c (tekhex_bfd_discard_group): Define.
8071         * versados.c (versados_bfd_discard_group): Define.
8072         * vms.c (vms_bfd_discard_group): Define.
8073         * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8074         * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8075         (aix5coff64_vec): Likewise.
8076         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8077
8078 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
8079
8080         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8081         (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8082         (elf32-sh64-com.lo): New dependency list.
8083         * Makefile.in: Regenerate.
8084         * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8085         (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8086         elf32-sh64-com.lo.
8087         * configure: Regenerate.
8088         * elf32-sh64.c (sh64_address_in_cranges)
8089         (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8090         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8091         (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8092         * elf32-sh64-com.c: ...here.  New file.
8093
8094 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
8095
8096         * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8097         ATTRIBUTE_UNUSED on used params.
8098         * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8099         before calling bfd_section_from_elf_index on local syms.
8100         * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8101
8102 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
8103
8104         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8105         (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8106         (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8107         (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8108         (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8109         * Makefile.in: Regenerate.
8110         * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8111         (sh64-*-netbsd*): New targets.
8112         * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8113         bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8114         * configure: Regenerate.
8115         * elf32-sh64-nbsd.c: New file.
8116         * elf64-sh64-nbsd.c: New file.
8117         * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8118         bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8119         bfd_elf64_sh64lnbsd_vec.
8120
8121 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
8122
8123         * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8124         (bfd_section_from_shdr): Likewise.  Set section name of group
8125         sections from signature.
8126         (group_signature): Split out from setup_group.  Ensure symbol table
8127         is available.
8128         (bfd_elf_discard_group): New function.
8129         (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8130         .gnu.linkonce* sections if they are members of a group.
8131         (set_group_contents): Set GRP_COMDAT flag.
8132         * section.c (bfd_discard_group): New function.
8133         * bfd-in.h (bfd_elf_discard_group): Declare.
8134         * bfd-in2.h: Regenerate.
8135         * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8136         (elf_linkonce_p): Define.
8137
8138 2002-06-04  Alan Modra  <amodra@bigpond.net.au>
8139
8140         * elf.c (bfd_section_from_shdr): Make "name" const.
8141         * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8142         * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8143         * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8144         * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8145         * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8146         * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8147         * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8148         * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8149         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8150         * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8151         * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8152
8153 2002-06-03  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
8154
8155         * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8156         ABI.
8157
8158 2002-06-02  Kazu Hirata  <kazu@cs.umass.edu>
8159
8160         * elf32-arc.c: Fix formatting.
8161         * elf32-arm.h: Likewise.
8162         * elf32-cris.c: Likewise.
8163         * elf32-dlx.c: Likewise.
8164         * elf32-hppa.c: Likewise.
8165         * elf32-i386.c: Likewise.
8166         * elf32-i386qnx.c: Likewise.
8167         * elf32-or32.c: Likewise.
8168         * elf32-s390.c: Likewise.
8169         * elf32-sh64.c: Likewise.
8170         * elf32-vax.c: Likewise.
8171         * elf32-xstormy16.c: Likewise.
8172         * elf64-alpha.c: Likewise.
8173         * elf64-mmix.c: Likewise.
8174         * elf64-ppc.c: Likewise.
8175         * elf64-s390.c: Likewise.
8176         * elf64-sh64.c: Likewise.
8177         * elf64-x86-64.c: Likewise.
8178
8179 2002-06-02  Richard Henderson  <rth@redhat.com>
8180
8181         * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8182         null when there are no got entries for a symbol.
8183         (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8184         uninitialized variable warning.
8185
8186 2002-06-01  Richard Henderson  <rth@redhat.com>
8187
8188         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8189         undefined symbols here.
8190         (elf64_alpha_relax_section): Do it here.  Also test for not
8191         defined in the current module.
8192         (elf64_alpha_relocate_section_r): Split out of ...
8193         (elf64_alpha_relocate_section): ... here.  Don't dereference
8194         NULL when looking up local got entries.
8195
8196 2002-06-01  Richard Henderson  <rth@redhat.com>
8197
8198         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8199         symbols from JSR relaxation.
8200         (elf64_alpha_size_plt_section_1): New.
8201         (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8202         (elf64_alpha_size_rela_got_1): ... here.
8203         (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8204         (elf64_alpha_size_rela_got_section): ... here.
8205         (elf64_alpha_size_plt_section): New.
8206         (elf64_alpha_relax_section): Call them.
8207         (elf64_alpha_size_got_sections): Remove output_bfd arg.
8208         (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8209
8210 2002-06-01  Richard Henderson  <rth@redhat.com>
8211
8212         * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8213         (elf64_alpha_relocate_section): Use them.  Reject LE TLS relocs
8214         in shared libraries.  Fix DTPRELHI and TPRELHI value.
8215         (INSN_ADDQ, INSN_RDUNIQ): New.
8216         (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8217         (elf64_alpha_relax_with_lituse): Return boolean.  Remove irelend
8218         argument.  Reject dynamic symbols.  Use LITUSE symbolic constants.
8219         (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8220         Handle GOTDTPREL and GOTTPREL relocations.
8221         (elf64_alpha_relax_gprelhilo): New.
8222         (elf64_alpha_relax_tls_get_addr): New.
8223         (elf64_alpha_relax_find_tls_segment): New.
8224         (elf64_alpha_relax_section): Handle TLS relocations.
8225         (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8226         (elf64_alpha_check_relocs): Set it.
8227
8228 2002-06-01  Richard Henderson  <rth@redhat.com>
8229
8230         * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8231
8232         * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8233         check; don't suppress dynamic relocs for non-allocated sections.
8234
8235         * elf64-alpha.c: Remove dead code.
8236
8237 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
8238
8239         * bfd-in2.h: Regenerate.
8240         * libbfd.h: Regenerate.
8241         * po/SRC-POTFILES.in: Regenerate.
8242
8243         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8244         space for bss .plt.
8245
8246 2002-05-31  Graeme Peterson  <gp@qnx.com>
8247
8248         * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8249         (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8250         Run "make dep-am".
8251         * Makefile.in: Regenerate.
8252         * config.bfd: Add i[3456]86-*-nto-qnx* support.
8253         * configure.in: Add bfd_elf32_i386qnx_vec support.
8254         * configure: Regenerate.
8255         * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8256         is_contained_by_filepos, and copy_private_bfd_data_p.
8257         * elf.c (assign_file_positions_for_segments): Call backend
8258         set_nonloadable_filepos.  Fix non-K&R call to _bfd_error_handler.
8259         (IS_CONTAINED_BY_FILEPOS): Define.
8260         (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8261         (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS.  Typo fix.
8262         Fix non-K&R call to _bfd_error_handler.
8263         (_bfd_elf_copy_private_section_data): Use backend
8264         copy_private_bfd_data_p.
8265         * elf32-i386.c: Don't include elfxx-target.h when
8266         ELF32_I386_C_INCLUDED is defined.
8267         * elf32-i386qnx.c: New QNX elf backend file.
8268         * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8269         elf_backend_is_contained_by_filepos, and
8270         elf_backend_do_copy_private_bfd_data.
8271         * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8272
8273 2002-05-31  Alan Modra  <amodra@bigpond.net.au>
8274
8275         * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8276         Move other similar defines to start of file.
8277
8278 2002-05-30  Tom Rix  <trix@redhat.com>
8279
8280         * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8281         * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8282
8283 2002-05-30  Richard Henderson  <rth@redhat.com>
8284
8285         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8286         ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8287         (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8288         (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8289         (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8290         (struct alpha_elf_obj_tdata): Rename total_got_entries and
8291         n_local_got_entries to total_got_size and local_got_size.
8292         (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8293         (alpha_got_entry_size): New.
8294         (elf64_alpha_relax_with_lituse): Use it.
8295         (elf64_alpha_relax_without_lituse): Likewise.
8296         (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8297         (get_got_entry): New.
8298         (elf64_alpha_check_relocs): Handle TLS relocs.  Reorganize.
8299         (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8300         (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8301         (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8302         (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8303         (elf64_alpha_calc_got_offsets): Likewise.
8304         (alpha_dynamic_entries_for_reloc): New.
8305         (elf64_alpha_calc_dynrel_sizes): Use it.
8306         (elf64_alpha_size_dynamic_sections): Likewise.
8307         (elf64_alpha_relocate_section): Handle TLS relocations.
8308         * reloc.c: Add Alpha TLS relocations.
8309         * bfd-in2.h, libbfd.h: Rebuild.
8310
8311 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8312
8313         * peXXigen.c (pe_print_idata): Remove double printed
8314         import table lines; add Bound-To comment.
8315
8316 2002-05-29  Matt Thomas  <matt@3am-software.com>
8317
8318         * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8319         (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8320         (elf32-vax.lo): New rule.
8321         * Makefile.in: Regenerate.
8322         * configure.in (bfd_elf32_vax_vec)
8323         (vaxnetbsd_vec): New vectors.
8324         * configure: Regenerate.
8325         * config.bfd (vax-*-netbsdelf*)
8326         (vax-*-netbsdaout*)
8327         (vax-*-netbsd*): New targets.
8328         * elf32-vax.c: New file.
8329         * reloc.c: Add VAX relocations.
8330         * bfd-in2.h: Regenerate.
8331         * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8332
8333 2002-05-29  Jason Thorpe  <thorpej@wasabisystems.com>
8334
8335         * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8336         and bfd_elf32_bigarm_vec to targ_selvecs.
8337
8338 2002-05-29  Ralf Habacker  <ralf.habacker@freenet.de>
8339
8340         * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8341         with auto-imported symbols.
8342
8343 2002-05-29  Adam Nemet  <anemet@lnxw.com>
8344
8345         * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8346         sections only record bfd.
8347         (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8348         * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8349         * bfd-in2.h: Regenerate.
8350
8351 2002-05-28  Nick Clifton  <nickc@cambridge.redhat.com>
8352
8353         * syms.c (_bfd_stab_section_find_nearest_line): Move
8354         declaration and initialisation of saw_line and saw_func out of
8355         for loop.
8356
8357 2002-05-29  Alan Modra  <amodra@bigpond.net.au>
8358
8359         * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8360         (bfd_elf64_get_symbol_info): Define.
8361         * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8362
8363 2002-05-29  Andrey Volkov  <avolkov@transas.com>
8364
8365         * cpu-h8300.c: Make default h8300 machine first in machine list.
8366
8367 2002-05-28  Kuang Hwa Lin <kuang@sbcglobal.net>
8368
8369         * config.bfd: Added DLX configuraton.
8370         * Makefile.am: Added DLX configuraton.
8371         * configure.in: Added DLX configuraton.
8372         * archures.c: Add DLX architecure.
8373         * reloc.c: Add DLX relocs.
8374         * targets.c: Added DLX target vector.
8375         * configure: Regenerate.
8376         * Makefile.in: Regenreate.
8377         * bfd-in2.h: Regenreate.
8378         * elf32-dlx.c: New file: Support DLX target.
8379         * cpu-dlx.c: New file: Support DLX target.
8380
8381 2002-05-25  Alan Modra  <amodra@bigpond.net.au>
8382
8383         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8384
8385         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8386         (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8387         strings to point inside function code sym string.
8388         (func_desc_adjust): Likewise.
8389         (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8390
8391 2002-05-24  Michal Ludvig  <mludvig@suse.cz>
8392
8393         * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8394         (elf64_x86_64_grok_psinfo): Added.
8395
8396 2002-05-24  TAMURA Kent <kent@netbsd.org>
8397
8398         * config.bfd: Add a target for i386-netbsdpe.
8399
8400 2002-05-24  Alan Modra  <amodra@bigpond.net.au>
8401
8402         * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8403         and is_func_descriptor.
8404         (func_desc_adjust): Hide function code sym in shared libs unless
8405         there is a matching exported function descriptor sym.
8406
8407 2002-05-23  Jakub Jelinek  <jakub@redhat.com>
8408
8409         * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8410         for symbols from SHF_TLS section.
8411         (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8412         (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8413         (map_sections_to_segments): Build PT_TLS segment if necessary.
8414         (assign_file_positions_for_segments): Likewise.
8415         (get_program_header_size): Account for PT_TLS segment.
8416         (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8417         SEC_THREAD_LOCAL sections to STT_TLS.
8418         * reloc.c: Add 386 and IA-64 TLS relocs.
8419         * section.c (SEC_THREAD_LOCAL): Define.
8420         (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8421         Remove.
8422         * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8423         (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8424         unconditionally.
8425         (struct elf_final_link_info): Add first_tls_sec.
8426         (elf_bfd_final_link): Set first_tls_sec.
8427         Compute elf_hash_table (info)->tls_segment.
8428         (elf_link_output_extsym): Handle STT_TLS symbols.
8429         (elf_link_input_bfd): Likewise.
8430         * syms.c (BSF_THREAD_LOCAL): Define.
8431         * bfd-in2.h: Rebuilt.
8432         * libbfd.h: Rebuilt.
8433         * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8434         elf_i386_mkobject, elf_i386_object_p): New functions.
8435         (elf_howto_table): Add TLS relocs.
8436         (elf_i386_reloc_type_lookup): Support TLS relocs.
8437         (elf_i386_info_to_howto_rel): Likewise.
8438         (struct elf_i386_link_hash_entry): Add tls_type.
8439         (struct elf_i386_obj_tdata): New.
8440         (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8441         New macros.
8442         (struct elf_i386_link_hash_table): Add tls_ldm_got.
8443         (link_hash_newfunc): Clear tls_type.
8444         (elf_i386_check_relocs): Support TLS relocs.
8445         (elf_i386_gc_sweep_hook): Likewise.
8446         (allocate_dynrelocs): Likewise.
8447         (elf_i386_size_dynamic_sections): Likewise.
8448         (elf_i386_relocate_section): Likewise.
8449         (elf_i386_finish_dynamic_symbol): Likewise.
8450         (bfd_elf32_mkobject, elf_backend_object_p): Define.
8451         * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8452         dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8453         want_tprel, want_dtpmod, want_dtprel.
8454         (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8455         (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8456         R_IA64_LTOFF_TPREL22.
8457         (elf_code_to_howto_index): Add TLS relocs.
8458         (elfNN_ia64_check_relocs): Support TLS relocs.
8459         (allocate_global_data_got): Account for TLS .got data.
8460         (allocate_dynrel_entries): Account for TLS dynamic relocations.
8461         (elfNN_ia64_install_value): Supprt TLS relocs.
8462         (set_got_entry): Support TLS relocs.
8463         (elfNN_ia64_relocate_section): Likewise.
8464
8465 2002-05-23  Nick Clifton  <nickc@cambridge.redhat.com>
8466
8467         * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8468         BLX reloc round the relocation up rather than down.
8469         * coff-arm.c (coff_arm_relocate_section): Likewise.
8470
8471 2002-05-21  H.J. Lu  (hjl@gnu.org)
8472
8473         * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8474         definition.
8475
8476 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
8477
8478         * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8479         (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8480
8481 2002-05-22  Alan Modra  <amodra@bigpond.net.au>
8482
8483         * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8484         unresolved relocs.
8485         (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8486
8487 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8488
8489         * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8490         non-ELF targets.
8491
8492 2002-05-21  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8493
8494         * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8495         an error value.
8496         * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8497         return with false on error.
8498         (elf_link_input_bfd): Check reloc_emitter return value.
8499
8500 2002-05-21  Jason Thorpe  <thorpej@wasabisystems.com>
8501
8502         * config.bfd (armeb-*-netbsdelf*): New target.
8503
8504 2002-05-20  Alan Modra  <amodra@bigpond.net.au>
8505
8506         * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8507         at the plt call stub.
8508
8509 2002-05-19  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8510
8511         * cpu-mips.c (mips_compatible): Don't try to check machine
8512         compatibility.
8513
8514 2002-05-18  Tom Rix  <trix@redhat.com>
8515
8516         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8517
8518 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
8519
8520         * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8521         (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8522         we've already warned about an undefined symbol.  Report more
8523         detail on reloc errors.
8524
8525 2002-05-17  Alan Modra  <amodra@bigpond.net.au>
8526
8527         * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8528         * configure.in: Invoke AM_INSTALL_LIBBFD.
8529         * Makefile.am (install-data-local): Revert 2002-05-13.  Move to..
8530         (install_libbfd): .. New target.
8531         (uninstall_libbfd): Likewise.
8532         (install-bfdlibLTLIBRARIES): Likewise.
8533         (uninstall-bfdlibLTLIBRARIES): Likewise.
8534         (bfdlibdir): New.
8535         (bfdincludedir): New.
8536         (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8537         * aclocal.m4: Regenerate.
8538         * configure: Regenerate.
8539         * Makefile.in: Regenerate.
8540
8541 2002-05-17  Stuart Balfour <sbalfour@cisco.com>
8542
8543         * hash.c (bfd_hash_lookup): Remove computation of len from inside
8544         hash loop.
8545
8546 2002-05-16  Nick Clifton  <nickc@cambridge.redhat.com>
8547
8548         * config.bfd: Add targets for sh64-linux (little endian and
8549         big endian).
8550
8551 2002-05-15  Laurent Pinchart <laurent.pinchart@skynet.be>
8552
8553         * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8554         is located in the same section as the import table.  Instead
8555         check, and if necessary load the section containing the thunk.
8556
8557 2002-05-15  Nick Clifton  <nickc@cambridge.redhat.com>
8558
8559         * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8560         bfd_bread.
8561         (xcoff64_core_file_matches_executable_p): Replace bfd_read
8562         with bfd_bread.
8563
8564 2002-05-15  Alan Modra  <amodra@bigpond.net.au>
8565
8566         * aix5ppc-core.c: Warning fixes.
8567         * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8568         * aout-target.h (MY_bfd_link_just_syms): Define.
8569         * aout-tic30.c (MY_bfd_link_just_syms): Define.
8570         * bfd.c (bfd_link_just_syms): Define.
8571         * binary.c (binary_bfd_link_just_syms): Define.
8572         * bout.c (b_out_bfd_link_just_syms): Define.
8573         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8574         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8575         * coffcode.h (coff_bfd_link_just_syms): Define.
8576         * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8577         (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8578         (_bfd_elf_link_just_syms): Declare.
8579         * elf.c (_bfd_elf_link_just_syms): New function.
8580         * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8581         sections haven't already been discarded by the linker.
8582         * elflink.h (elf_link_add_object_symbols): Likewise for stab
8583         sections and SEC_MERGE sections.
8584         (elf_bfd_discard_info): Similarly here.
8585         * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8586         * i386msdos.c (msdos_bfd_link_just_syms): Define.
8587         * i386os9k.c (os9k_bfd_link_just_syms): Define.
8588         * ieee.c (ieee_bfd_link_just_syms): Define.
8589         * ihex.c (ihex_bfd_link_just_syms): Define.
8590         * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8591         (_bfd_generic_link_just_syms): Declare.
8592         * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8593         * linker.c (_bfd_generic_link_just_syms): New function.
8594         * mmo.c (mmo_bfd_link_just_syms): Define.
8595         * nlm-target.h (nlm_bfd_link_just_syms): Define.
8596         * oasys.c (oasys_bfd_link_just_syms): Define.
8597         * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8598         * som.c (som_bfd_link_just_syms): Define.
8599         * srec.c (srec_bfd_link_just_syms): Define.
8600         * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8601         (BFD_JUMP_TABLE_LINK): And here.
8602         * tekhex.c (tekhex_bfd_link_just_syms): Define.
8603         * versados.c (versados_bfd_link_just_syms): Define.
8604         * vms.c (vms_bfd_link_just_syms): Define.
8605         * libbfd.h: Regenerate.
8606         * bfd-in2.h: Regenerate.
8607
8608 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8609
8610         * elf32-mips.c: Remove superfluous definitions copied from
8611         elfxx-mips.c.
8612         (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8613         SGIish vectors to check the special case.
8614         (mips_elf_hi16_reloc): Fix comment.
8615         (mips_elf_got16_reloc): Likewise.
8616         (_bfd_mips_elf32_gprel16_reloc): Likewise.
8617         (elf_reloc_map): Code cleanup.
8618         (mips_reloc_map): Add comment.
8619         (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8620         (mips_elf32_rtype_to_howto): Likewise.
8621         (mips_elf32_discard_info): Likewise.
8622         (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8623         lead to IRIX compatibility now.
8624
8625 2002-05-15  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8626
8627         * elfxx-mips.c: Call it IRIX, not Irix in comments.
8628
8629 2002-05-13  Jason Thorpe  <thorpej@wasabisystems.com>
8630
8631         * config.bfd (shle-*-netbsdelf*): Add target which includes
8632         sh64 support.
8633
8634 2002-05-13  David Edelsohn  <edelsohn@gnu.org>
8635
8636         * configure.in: Revert 2002-04-07.  Instead, auto-configure
8637         HAVE_ST_C_IMPL.
8638         * configure: Regenerate.
8639         * config.in: Regenerate.
8640         * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8641         or AIX_5_CORE.
8642
8643 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
8644
8645         * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8646         corefiles as well.2
8647         * configure: Regenerate.
8648
8649 2002-05-13  Alan Modra  <amodra@bigpond.net.au>
8650
8651         * Makefile.am (install-data-local): Install headers to
8652         $(exec_prefix)/include.
8653         * Makefile.in: Regenerate.
8654
8655 2002-05-11  Ralf Corsepius  <corsepiu@faw.uni-ulm.de>
8656             Daniel Jacobowitz  <drow@mvista.com>
8657
8658         * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE.  Don't
8659         map BFD_RELOC_RVA.
8660
8661 2002-05-11  Federico G. Schwindt <fgsch@olimpo.com.br>
8662
8663         * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8664         hppa*-*-openbsd*): New targets.
8665         * configure.in (alpha*-*-openbsd*): Set COREFILE.
8666         * configure: Regenerate.
8667
8668 2002-05-10  Tom Rix  <trix@redhat.com>
8669
8670         * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8671         xcoff64_ppc_relocate_section.
8672         * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8673         * libxcoff.h: Common xcoff_reloc_type function declaration.
8674
8675 2002-05-10  Alan Modra  <amodra@bigpond.net.au>
8676
8677         * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8678         added in 2002-05-09 commit.
8679
8680         * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8681         don't look for stubs on all undefined syms.
8682
8683 2002-05-09  Alan Modra  <amodra@bigpond.net.au>
8684
8685         * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8686         (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8687         pcrel_offset.
8688
8689         * elf32-i386.c (elf_howto_table): Comments.
8690         (elf_i386_relocate_section): Handle more relocs for relocatable
8691         linking and against SEC_MERGE sections.
8692
8693 2002-05-08  Alan Modra  <amodra@bigpond.net.au>
8694
8695         * elf32-ppc.c (ppc_elf_create_got): New function.
8696         (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8697         _bfd_elf_create_dynamic_sections.  Correct .plt flags.
8698         (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8699         _bfd_elf_create_got_section.
8700
8701 2002-05-07  Alan Modra  <amodra@bigpond.net.au>
8702
8703         * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8704         * elfxx-target.h (elf_backend_rela_normal): Define.
8705         (elfNN_bed): Init rela_normal.
8706         * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8707         for section symbols here if rela_normal.  Simplify abs section test.
8708         * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8709         return immediately.  Remove code handling relocatable linking.
8710         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8711         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8712         * elf32-i370.c (i370_elf_relocate_section): Likewise.
8713         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8714         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8715         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8716         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8717         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8718         * elf32-s390.c (elf_s390_relocate_section): Likewise.
8719         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8720         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8721         * elf64-s390.c (elf_s390_relocate_section): Likewise.
8722         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8723         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8724         * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8725         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8726         * elf-m10200.c (elf_backend_rela_normal): Define.
8727         * elf-m10300.c (elf_backend_rela_normal): Define.
8728         * elf32-fr30.c (elf_backend_rela_normal): Define.
8729         * elf32-i370.c (elf_backend_rela_normal): Define.
8730         * elf32-i860.c (elf_backend_rela_normal): Define.
8731         * elf32-m68k.c (elf_backend_rela_normal): Define.
8732         * elf32-mcore.c (elf_backend_rela_normal): Define.
8733         * elf32-openrisc.c (elf_backend_rela_normal): Define.
8734         * elf32-ppc.c (elf_backend_rela_normal): Define.
8735         * elf32-s390.c (elf_backend_rela_normal): Define.
8736         * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8737         * elf64-ppc.c (elf_backend_rela_normal): Define.
8738         * elf64-s390.c (elf_backend_rela_normal): Define.
8739         * elf64-x86-64.c (elf_backend_rela_normal): Define.
8740         * elfxx-ia64.c (elf_backend_rela_normal): Define.
8741         * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8742         * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8743
8744 2002-05-06  Nick Clifton  <nickc@cambridge.redhat.com>
8745
8746         * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8747         'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8748
8749 2002-05-06  Alan Modra  <amodra@bigpond.net.au>
8750
8751         * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8752         when not relocatable.  Fix reloc_emitter call for K&R.
8753
8754 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
8755
8756         * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8757         reloading local sym addend mistakenly removed in 2002-05-01 change.
8758
8759         * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8760         (read_abbrevs): Change "offset" param to bfd_vma.
8761         (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8762         Change "abbrev_offset" to bfd_vma.
8763         (read_indirect_string): Use correct conversion chars in error
8764         message format string, cast bfd_vma's to unsigned long.
8765         (read_abbrevs): Likewise.
8766         (read_attribute_value): Likewise.
8767         (decode_line_info): Likewise.
8768         (scan_unit_for_functions): Likewise.
8769         (parse_comp_unit): Likewise.
8770
8771 2002-05-04  Tom Rix  <trix@redhat.com>
8772
8773         * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8774         (coff_swap_reloc_out): Same.
8775         * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8776         (xcoff_swap_reloc_out): Same.
8777         (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8778         case some 16 bit relocs. Add reloc value to output.
8779         (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
8780         R_RBR. Improve names.
8781         (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8782         (bfd_xcoff_backend_data): Update with new reloc swap names.
8783         (bfd_pmac_xcoff_backend_data) : Same.
8784         * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8785         (xcoff64_swap_reloc_out): Same.
8786         (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
8787         R_POS. Add reloc value to output.
8788         (xcoff64_howto_table): Move 64 bit R_POS to first entry.  Add 16
8789         bit R_RBR. Improve names, masks.
8790         (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8791         (bfd_xcoff_backend_data): Update with new reloc swap names.
8792         (bfd_xcoff_aix5_backend_data) : Same.
8793
8794 2002-05-04  Alan Modra  <amodra@bigpond.net.au>
8795
8796         * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8797         bfd_count top_index, input_list, all_local_syms.
8798         (elf32_hppa_setup_section_lists): New function, split from
8799         elf32_hppa_size_stubs.
8800         (elf32_hppa_next_input_section): Likewise.
8801         (group_sections): Likewise.
8802         (get_local_syms): Likewise.
8803         (elf32_hppa_size_stubs): Adjust for split out functions.  Look for
8804         stubs on undefined syms too.
8805         (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8806         Only access htab elf fields when we have an elf hash table.
8807         * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8808         (elf32_hppa_next_input_section): Declare.
8809
8810 2002-05-04  Bob Byrnes  <byrnes@curl.com>
8811
8812         * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8813         _bfd_new_bfd.
8814
8815 2002-05-03  H.J. Lu  (hjl@gnu.org)
8816
8817         * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8818         (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8819         (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8820         to hide a global symbol.
8821         (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
8822         forced_local to true.
8823
8824 2002-05-02  Richard Henderson  <rth@redhat.com>
8825
8826         * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8827         vs SHN_UNDEF to zero.
8828
8829 2002-05-02  Alan Modra  <amodra@bigpond.net.au>
8830
8831         * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8832         16 bit reloc.
8833         <R_PPC64_SECTOFF_DS>: Likewise.
8834         (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8835         SECTOFF reloc.
8836         * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8837         (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8838         SECTOFF reloc.
8839
8840         * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8841         (ppc64_elf_ha_reloc): New function.
8842         (ppc64_elf_brtaken_reloc): New function.
8843         (ppc64_elf_sectoff_reloc): New function.
8844         (ppc64_elf_sectoff_ha_reloc): New function.
8845         (ppc64_elf_toc_reloc): New function.
8846         (ppc64_elf_toc_ha_reloc): New function.
8847         (ppc64_elf_toc64_reloc): New function.
8848         (ppc64_elf_unhandled_reloc): New function.
8849         (ppc64_elf_howto_raw): Use the above.
8850         <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8851         <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset.  Fix dst_mask.
8852         <R_PPC64_SECTOFF_DS>: Likewise.
8853         (IS_ABSOLUTE_RELOC): Update.
8854         (struct ppc_link_hash_table): Add have_undefweak.
8855         (ppc64_elf_link_hash_table_create): Init.
8856         (func_desc_adjust): Set have_undefweak.
8857         (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier.  Only
8858         add the .sfpr blr when have_undefweak.
8859         (ppc64_elf_setup_section_lists): Check hash table flavour.
8860         (ppc64_elf_next_input_section): Move output_section->owner test to
8861         ppc64elf.em.
8862         (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8863         and relocatable test.  Return TOCstart and don't set elf_gp.
8864         (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8865         offset calculation.  Add assert on weak sym branch tweaks.
8866         * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8867         (ppc64_elf_toc): Declare.
8868         (ppc64_elf_next_input_section): Update.
8869
8870 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
8871
8872         * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8873         file_name.
8874
8875 2002-05-01  Alan Modra  <amodra@bigpond.net.au>
8876
8877         * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8878         (ppc64_elf_relocate_section): Use them.  Don't look for plt calls
8879         on R_PPC64_ADDR24 relocs.  Require a nop or no link reg on plt
8880         call branches.  Correct undefined weak destination.
8881         (ppc64_elf_func_desc_adjust): Always create at least one blr in
8882         .sfpr, and correct case where either only savef* or restf* is
8883         needed.
8884
8885         Long branch stubs, multiple stub sections.
8886         * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8887         (ppc64_elf_next_input_section): Declare.
8888         * elf64-ppc.c: Move linker-only prototypes.
8889         (STUB_SUFFIX): Define.
8890         (enum ppc_stub_type): New.
8891         (struct ppc_stub_hash_entry): New.
8892         (struct ppc_branch_hash_entry): New.
8893         (struct ppc_link_hash_entry): Add stub_cache, oh.
8894         (struct ppc_link_hash_table): Add stub_hash_table etc.  Remove
8895         sstub.  Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8896         Rename plt_overflow to stub_error.
8897         (ppc_stub_hash_lookup): Define.
8898         (ppc_branch_hash_lookup): Define.
8899         (stub_hash_newfunc): New function.
8900         (branch_hash_newfunc): New function.
8901         (link_hash_newfunc): Init new fields.
8902         (ppc64_elf_link_hash_table_create): Likewise.
8903         (ppc64_elf_link_hash_table_free): New function.
8904         (ppc_stub_name): New function.
8905         (ppc_get_stub_entry): New function.
8906         (ppc_add_stub): New function.
8907         (create_linkage_sections): Use bfd_make_section_anyway.  Create
8908         .branch_lt and .rela.branch_lt sections.  Don't create .stub.
8909         (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8910         and set up for plt call stubs.  Link func and func desc syms.
8911         (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8912         (func_desc_adjust): Avoid hash lookup when func desc sym available
8913         via shortcut, and set links when processing.
8914         (ppc64_elf_hide_symbol): Likewise.
8915         (allocate_dynrelocs): Don't allocate stub section here.
8916         (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8917         Remove sstub code.
8918         (ppc_type_of_stub): New function.
8919         (build_one_stub): Delete.
8920         (ppc_build_one_stub): New function.
8921         (ppc_size_one_stub): New function.
8922         (ppc64_elf_setup_section_lists): New function.
8923         (ppc64_elf_next_input_section): New function.
8924         (group_sections): New function.
8925         (get_local_syms): New function.
8926         (ppc64_elf_size_stubs): Rewrite.
8927         (ppc64_elf_build_stubs): Rewrite.
8928         (ppc64_elf_relocate_section): Look up stub entry for REL24
8929         relocs.  Don't propagate REL14* to dynamic objects.  Look for long
8930         branch stubs if REL14* or REL24 relocs won't reach.
8931         (bfd_elf64_bfd_link_hash_table_free): Define.
8932
8933 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
8934
8935         * config.bfd: Add support for powerpc-*-windiss.
8936
8937 2002-04-30  Tom Rix  <trix@redhat.com>
8938
8939         * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8940         symbol names into the hash table.
8941
8942 2002-04-28  Tom Rix  <trix@redhat.com>
8943
8944         * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
8945         calulating relocations.
8946         (xcoff_complain_overflow) : Function table for relocation errors.
8947         (xcoff_ppc_relocate_section): Use relocation and complain function
8948         tables.
8949         (xcoff_complain_overflow_unsigned_func): New complain function.
8950         (xcoff_complain_overflow_signed_func): Same.
8951         (xcoff_complain_overflow_bitfield_func): Same.
8952         (xcoff_complain_overflow_dont_func): Same.
8953         (xcoff_reloc_type_crel): New recot function.
8954         (xcoff_reloc_type_br): Same.
8955         (xcoff_reloc_type_ba): Same.
8956         (xcoff_reloc_type_toc): Same.
8957         (xcoff_reloc_type_rel): Same.
8958         (xcoff_reloc_type_neg): Same.
8959         (xcoff_reloc_type_pos): Same.
8960         (xcoff_reloc_type_fail): Same.
8961         (xcoff_reloc_type_noop): Same.
8962         * libxcoff.h : Declare common parts for xcoff64.
8963         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
8964         and complain function tables.
8965
8966 2002-04-28  Alan Modra  <amodra@bigpond.net.au>
8967
8968         * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
8969         * elf32-hppa.c (elf32_hppa_final_link): Formatting.
8970
8971 2002-04-26  Alan Modra  <amodra@bigpond.net.au>
8972
8973         * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
8974         * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
8975
8976         * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
8977         same as the output before calling elf_link_input_bfd.
8978
8979         * coffcode.h (coff_compute_section_file_positions): Set
8980         section_tail after shuffling section list.
8981
8982 2002-04-24  Christian Groessler <chris@groessler.org>
8983
8984         * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
8985         addresses are 23bit with a special layout, not plain 32bit
8986         values.  Prevent relocation of immediate values.
8987
8988 2002-04-24  Chris G. Demetriou  <cgd@broadcom.com>
8989
8990         * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
8991         MIPS-16 ASE flags are set, print something to indicate that.
8992
8993 2002-04-23  Alan Modra  <amodra@bigpond.net.au>
8994
8995         * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
8996         under which a plt call stub is used.
8997         (final_link_relocate): Similarly.
8998         (allocate_plt_static): Clear h-plabel except when plt entry is
8999         exclusively used for a plabel.
9000         (allocate_dynrelocs): Use the above to simplify plt sizing.
9001         (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9002         (elf32_hppa_link_hash_table_create): Init.
9003         (BL22_RP): Define.
9004         (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9005         (elf32_hppa_check_relocs): Set has_22bit_branch.
9006
9007         * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9008         (final_link_relocate): Likewise.
9009
9010 2002-04-22  Jakub Jelinek  <jakub@redhat.com>
9011
9012         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9013         search table if some FDE is DW_EH_PE_aligned encoded either.
9014         (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9015
9016 2002-04-22  Richard Smith  <richard@ex-parrot.com>
9017             Jakub Jelinek  <jakub@redhat.com>
9018
9019         * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9020         (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9021         encoded personality.
9022         (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9023         for CIE/FDE removal.
9024
9025 2002-04-20  Tom Rix  <trix@redhat.com>
9026
9027         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9028
9029 2002-04-20  Alan Modra  <amodra@bigpond.net.au>
9030
9031         * archures.c (bfd_lookup_arch): Move the list order comment..
9032         (struct bfd_arch_info): ..to where it belongs.
9033         * bfd-in2.h: Regenerate.
9034
9035         * archures.c (bfd_lookup_arch): Add comment on list order.
9036         (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9037         * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9038         is always at head of list.
9039
9040 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
9041
9042         * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9043         insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9044         definition of these functions for ARM_WINCE builds as they are
9045         not used.
9046         (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9047         for ARM_WINCE builds.
9048
9049 2002-04-18  Nick Clifton  <nickc@cambridge.redhat.com>
9050
9051         * coff-arm.c (bfd_arm_process_before_allocation):
9052
9053 2002-04-17  J"orn Rennecke <joern.rennecke@superh.com>
9054
9055         * cpu-sh.c (scan_mach): Delete.
9056         (arch_info_struct): Replace scan_mach with bfd_default_scan.
9057         (bfd_sh_arch): Likewise.
9058
9059 2002-04-16  Nick Clifton  <nickc@cambridge.redhat.com>
9060
9061         * ihex.c (ihex_write_object_contents): Fix check for records
9062         crossing 64K boundaries.
9063
9064 2002-04-16  Alan Modra  <amodra@bigpond.net.au>
9065
9066         * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9067         type rather than just assuming entries are ELF.
9068         * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9069         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9070         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9071         * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9072         rather than elf_link_hash_entry.
9073
9074 2002-04-15  Richard Henderson  <rth@redhat.com>
9075
9076         * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9077         n32 binaries.
9078
9079 2002-04-15  Michael Snyder  <msnyder@redhat.com>
9080
9081         * opncls.c (bfd_close): Write contents if writeable.
9082         Minor formatting tidy-ups.
9083
9084 2002-04-15  Alan Modra  <amodra@bigpond.net.au>
9085
9086         * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9087
9088 2002-04-12  Michael Snyder  <msnyder@redhat.com>
9089
9090         * bfd-in.h (bfd_get_section_lma): New access macro.
9091         Minor white-space fix-up.
9092
9093 2002-04-12  Alan Modra  <amodra@bigpond.net.au>
9094
9095         * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9096         header pad.
9097
9098 2002-04-09  DJ Delorie  <dj@redhat.com>
9099
9100         * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9101
9102 2002-04-09  Casper S. Hornstrup <chorns@users.sourceforge.net>
9103
9104         * coffcode.h (coff_read_word): New.
9105         (coff_compute_checksum): New.
9106         (coff_apply_checksum): New.
9107         (coff_write_object_contents): Call coff_apply_checksum () to
9108         apply checksum to PE image.
9109
9110 2002-04-08  Randolph Chung  <tausq@debian.org>
9111
9112         * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9113         (elf32_hppa_final_link): Split out sorting logic to..
9114         * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9115         (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9116
9117 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
9118
9119         * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9120         pattern.
9121         * configure: Re-generate.
9122
9123 2002-04-07  Andrew Cagney  <ac131313@redhat.com>
9124
9125         * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9126         is greater or equal to 4.3.3.
9127         * configure: Regenerate.
9128         Fix PR gdb/344.
9129
9130 2002-04-05  Hans-Peter Nilsson  <hp@axis.com>
9131
9132         * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9133         R_CRIS_32_PCREL>: Fix typo in name.
9134         (cris_elf_check_relocs): Always create .rela.got here when
9135         R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9136         (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9137         assume it's created.
9138
9139 2002-04-04  Daniel Jacobowitz  <drow@mvista.com>
9140
9141         * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9142         * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9143         define.
9144         * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9145         * bfd.c (bfd_link_hash_table_free): Define.
9146         * binary.c (binary_bfd_link_hash_table_free): Define.
9147         * bout.c (b_out_bfd_link_hash_table_free): Define.
9148         * coff-rs6000.c (rs6000coff_vec): Include
9149         _bfd_generic_link_hash_table_free.
9150         (pmac_xcoff_vec): Likewise.
9151         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9152         (aix5coff64_vec): Likewise.
9153         * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9154         * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9155         (bfd_elf32_bfd_link_hash_table_free): Define.
9156         * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9157         (bfd_elf32_bfd_link_hash_table_free): Define.
9158         * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9159         define.
9160         * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9161         * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9162         * ieee.c (ieee_bfd_link_hash_table_free): Define.
9163         * ihex.c (ihex_bfd_link_hash_table_free): Define.
9164         * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9165         (_bfd_generic_link_hash_table_free): Add prototype.
9166         * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9167         * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9168         * linker.c (_bfd_generic_link_hash_table_free): New function.
9169         * mmo.c (mmo_bfd_link_hash_table_free): Define.
9170         * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9171         * oasys.c (oasys_bfd_link_hash_table_free): Define.
9172         * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9173         * som.c (som_bfd_link_hash_table_free): Define.
9174         * srec.c (srec_bfd_link_hash_table_free): Define.
9175         * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9176         * versados.c (versados_bfd_link_hash_table_free): Define.
9177         * vms.c (vms_bfd_link_hash_table_free): New function.
9178         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9179
9180         * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9181         instead of bfd_alloc.
9182         * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9183         * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9184         * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9185         * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9186         * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9187         * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9188         * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9189         * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9190         * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9191         * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9192         * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9193         * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9194         * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9195         * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9196         * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9197         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9198         * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9199         * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9200         * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9201         * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9202         * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9203         * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9204         * m68klinux.c (linux_link_hash_table_create): Likewise.
9205         * sparclinux.c (linux_link_hash_table_create): Likewise.
9206         * sunos.c (sunos_link_hash_table_create): Likewise.
9207         * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9208
9209         * targets.c: Add _bfd_link_hash_table_free to xvec.
9210
9211         * bfd-in2.h: Regenerate.
9212         * libbfd.h: Regenerate.
9213         * libcoff.h: Regenerate.
9214
9215 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
9216
9217         * dep-in.sed: Cope with absolute paths.
9218         * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9219         Run "make dep-am".
9220         * Makefile.in: Regenerate.
9221         * coff-arm.c: Fix copyright date.
9222         * cpu-h8300.c: Likewise.
9223         * cpu-i370.c: Likewise.
9224         * cpu-s390.c: Likewise.
9225         * cpu-mips.c: Likewise.
9226         * po/SRC-POTFILES.in: Regenerate.
9227
9228 2002-04-04  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9229
9230         * Makefile.am: Add elfxx-mips.c to the known backends.
9231         (elf32-mips.lo): remove dependency to coff/external.h.
9232         * Makefile.in: Regenerate.
9233         * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9234         Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9235         accordingly.
9236         * configure: Regenerate.
9237         * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9238         (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9239         (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9240         MIPS specific backend functions.
9241         * elf32-mips.c: Moved most code to elfxx-mips.c.
9242         (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9243         static.
9244         (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9245         (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9246         (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9247         (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9248         interface to allow selection of the right REL or RELA howto table.
9249         (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9250         static. Let it refuse n32 objects.
9251         (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9252         (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9253         (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9254         (elf32_mips_ignore_discarded_relocs): Rename from
9255         _bfd_elf32_mips_ignore_discarded_relocs.
9256         (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9257         (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9258         (elf_mips_howto_table_rela): Remove.
9259         * elf64-mips.c: Moved most code to elfxx-mips.c.
9260         (bfd_elf64_bfd_reloc_type_lookup): Make static.
9261         (mips_elf64_rtype_to_howto): New function.
9262         (mips_elf64_object_p): Likewise.
9263         (elf64_mips_irix_compat): Likewise.
9264         * elfxx-mips.c: New file containing common code merged together from
9265         elf32-mips.c and elf64-mips.c.
9266         * elfxx-mips.h: New file containing MIPS specific prototypes from
9267         elf-bfd.h.
9268         * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9269         elf_backend_mips_rtype_to_howto.
9270
9271 2002-04-04  Alan Modra  <amodra@bigpond.net.au>
9272
9273         * srec.c (MAXCHUNK, Chunk): Revise comments.
9274         (srec_write_record): Correct buffer size.
9275         (srec_write_header): Do without intermediate buffer.
9276         (srec_write_section): Validate Chunk.
9277         (srec_write_terminator): Pass NULL instead of dummy buffer.
9278         (srec_write_symbols): Pass file and symbol names directly to
9279         bfd_bwrite so sprintf won't overflow buffer.
9280
9281 2002-04-03  Jakub Jelinek  <jakub@redhat.com>
9282
9283         * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9284         PC relative relocs against hidden symbols.
9285         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9286
9287 2002-04-03  Alan Modra  <amodra@bigpond.net.au>
9288
9289         * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9290         LMAs, loop over segments until p_vaddr and p_memsz specify an
9291         extent enclosing the section.
9292
9293 2002-04-02  Nick Clifton  <nickc@cambridge.redhat.com>
9294
9295         * ihex.c (ihex_write_object_contents): Do not allow records to
9296         cross a 64K boundary - wrap if necessary.
9297
9298 2002-04-01  Nathan Williams  <nathanw@wasabisystems.com>
9299
9300         * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9301         which caused the returned LWP ID to always be 0.
9302
9303 2002-04-01  Richard Henderson  <rth@redhat.com>
9304
9305         * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9306         (elf32_sparc_relocate_section): Use it to figure out when to
9307         initialize .got entries.
9308         * elf64-sparc.c: Similarly.
9309
9310 2002-03-28  Alan Modra  <amodra@bigpond.net.au>
9311
9312         * linker.c (link_action): Ignore duplicate warning syms.
9313         (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9314         * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9315         (elf_adjust_dynamic_symbol): Likewise.
9316         (elf_export_symbol): Likewise.
9317         (elf_link_find_version_dependencies): Likewise.
9318         (elf_link_assign_sym_version): Likewise.
9319         (elf_link_sec_merge_syms): Likewise.
9320         (elf_link_output_extsym): Likewise.
9321         (elf_gc_sweep_symbol): Likewise.
9322         (elf_gc_propagate_vtable_entries_used): Likewise.
9323         (elf_gc_smash_unused_vtentry_relocs): Likewise.
9324         (elf_gc_allocate_got_offsets): Likewise.
9325         (elf_collect_hash_codes): Likewise.
9326         * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9327         * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9328         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9329         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9330         * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9331         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9332         (elf_cris_discard_excess_dso_dynamics): Likewise.
9333         * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9334         (mark_PIC_calls): Likewise.
9335         (allocate_plt_static): Likewise.
9336         (allocate_dynrelocs): Likewise.
9337         (readonly_dynrelocs): Likewise.
9338         * elf32-i386.c (allocate_dynrelocs): Likewise.
9339         (readonly_dynrelocs): Likewise.
9340         * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9341         * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9342         * elf32-mips.c (mips_elf_output_extsym): Likewise.
9343         (mips_elf_sort_hash_table_f): Likewise.
9344         (mips_elf_check_mips16_stubs): Likewise.
9345         * elf32-s390.c (allocate_dynrelocs): Likewise.
9346         (readonly_dynrelocs): Likewise.
9347         * elf32-sh.c (sh_elf_discard_copies): Likewise.
9348         * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9349         (xstormy16_relax_plt_realloc): Likewise.
9350         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9351         (elf64_alpha_output_extsym): Likewise.
9352         * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9353         * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9354         (mips_elf64_check_mips16_stubs): Likewise.
9355         (mips_elf64_output_extsym): Likewise.
9356         * elf64-ppc.c (func_desc_adjust): Likewise.
9357         (allocate_dynrelocs): Likewise.
9358         (readonly_dynrelocs): Likewise.
9359         * elf64-s390.c (allocate_dynrelocs): Likewise.
9360         (readonly_dynrelocs): Likewise.
9361         * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9362         * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9363         (readonly_dynrelocs): Likewise.
9364         * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9365         * aoutx.h (aout_link_write_other_symbol): Likewise.
9366         * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9367         (_bfd_coff_write_global_sym): Likewise.
9368         * i386linux.c (linux_tally_symbols): Likewise.
9369         * m68klinux.c (linux_tally_symbols): Likewise.
9370         * sparclinux.c (linux_tally_symbols): Likewise.
9371         * pdp11.c (aout_link_write_other_symbol): Likewise.
9372         * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9373         * xcofflink.c (xcoff_build_ldsyms): Likewise.
9374         (xcoff_write_global_symbol): Likewise.
9375
9376         * cofflink.c (_bfd_coff_final_link): Formatting.
9377         * cpu-mips.c (mips_compatible): Make static, prototype.
9378         * elf32-i386.c (elf_i386_check_relocs): Formatting.
9379         * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9380         * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9381         * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9382         (mips_elf64_final_link): Likewise.
9383         * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9384         prototype.
9385
9386 2002-03-27  Nick Clifton  <nickc@cambridge.redhat.com>
9387
9388         * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9389         (SWAP_OUT_RELOC_OFFSET): Define.
9390
9391 2002-03-27  Gregory Steuck <greg@nest.cx>
9392
9393         * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9394         terminating NULL if empty symbol table.
9395         (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9396
9397 2002-03-26  H.J. Lu  (hjl@gnu.org)
9398
9399         * elflink.h (elf_link_input_bfd): Revert the last change since
9400         the gcc exception handling isn't fixed yet.
9401
9402 2002-03-26  H.J. Lu  (hjl@gnu.org)
9403
9404         * elflink.h (elf_link_input_bfd): Complain about relocations
9405         against local symbols in discarded sections.
9406
9407 2002-03-26  Alan Modra  <amodra@bigpond.net.au>
9408
9409         * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9410
9411 2002-03-23  Alan Modra  <amodra@bigpond.net.au>
9412
9413         * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9414         section file offset for !SEC_LOAD sections.
9415
9416 2002-03-21  Richard Earnshaw  <rearnsha@arm.com>
9417
9418         * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9419         <case R_ARM_GOT>): Handle relocations to Thumb functions.
9420
9421 2002-03-21  Alan Modra  <amodra@bigpond.net.au>
9422
9423         * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9424         Whitespace changes.
9425         * archive.c: Update copyright date.
9426         * bfd-in2.h: Regenerate.
9427         * libbfd.h: Regenerate.
9428         * Makefile.am: Run "make dep-am"
9429         * Makefile.in: Regenerate.
9430         * po/SRC-POTFILES.in: Regenerate.
9431
9432 2002-03-20  Daniel Jacobowitz  <drow@mvista.com>
9433
9434         * dwarf2.c (struct funcinfo): Move up.
9435         (lookup_address_in_function_table): New argument function_ptr.
9436         Set it.
9437         (lookup_address_in_line_table): New argument function.  If function
9438         is non-NULL, use it to handle ``addr'' before the first line note of
9439         the function.
9440         (comp_unit_find_nearest_line): Update and swap calls to
9441         lookup_address_in_function_table and lookup_address_in_line_table.
9442         * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9443         N_SLINE encountered if we see an N_FUN before any N_SLINE.
9444
9445 2002-03-20  Tom Rix  <trix@redhat.com>
9446
9447         * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9448         _bfd_xcoff_generic_stat_arch_elt.  Fix format check.
9449         * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9450
9451 2002-03-19  Tom Rix  <trix@redhat.com>
9452
9453         * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9454         dynamic objects in archives.
9455
9456 2002-03-19  Hans-Peter Nilsson  <hp@bitrange.com>
9457
9458         * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9459         STT_NOTYPE symbols to STT_OBJECT.
9460
9461 2002-03-18  Jan Hubicka  <jh@suse.cz>
9462
9463         * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9464
9465 2002-03-18  Tom Rix  <trix@redhat.com>
9466
9467         * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9468         * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9469         * coff-rs6000 (do_pad) : New function for archive padding.
9470         (do_copy) : New function for object file copying in archives.
9471         (do_shared_object_padding) : New function for padding shared
9472         objects to their text section alignment in archives.
9473         (bfd_xcoff_ar_achive_set_magic) : Stub.
9474         (xcoff_write_armap_big) : Use do_copy and do_pad.
9475         (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9476         do_copy and do_pad.
9477         * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9478         bfd_xcoff_magic_number.
9479         (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9480         fop.
9481         (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9482         (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9483         (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9484         * rs6000-core.c : Update copyright date.
9485         * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9486         csectpp.
9487         * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9488         (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9489         (coff_set_flags) : Use bfd_xcoff_magic_number.
9490         * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9491         * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9492         * Makefile.am : Same.
9493         * config.bfd : Same.
9494         * targets.c : Same.
9495         * configure : Regnerate.
9496         * Makefile.in : Same.
9497         * bfd-in2.h : Same.
9498
9499 2002-03-18  Nick Clifton  <nickc@cambridge.redhat.com>
9500
9501         * po/fr.po: Updated version.
9502
9503 2002-03-18  Alan Modra  <amodra@bigpond.net.au>
9504
9505         * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9506         * libbfd.h: Regenerate.
9507         * archive.c (coff_write_armap): Pass on failures from
9508         bfd_write_bigendian_4byte_int.
9509
9510 2002-03-14  H.J. Lu <hjl@gnu.org>
9511
9512         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9513         error to bfd_error_nonrepresentable_section for reinit_array
9514         section in DSO.
9515
9516 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
9517
9518         * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9519         OR it in rather than replacing previously selected flags.
9520
9521         * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9522         (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9523
9524 2002-03-14  Alan Modra  <amodra@bigpond.net.au>
9525
9526         * cpu-mips.c (mips_compatible): New.  Don't check bits_per_word.
9527         (N): Use the above.
9528         * elflink.h (elf_bfd_final_link): Revert last change.  Instead,
9529         ensure reloc size matches before calling elf_link_input_bfd.
9530         Add an assert to check reloc size when counting output relocs.
9531
9532 2002-03-14  Nick Clifton  <nickc@cambridge.redhat.com>
9533
9534         * mmo.c (mmo_get_loc): Return NULL rather than false.
9535
9536 2002-03-13  Nick Clifton  <nickc@cambridge.redhat.com>
9537
9538         * po/fr.po: Updated version.
9539
9540 2002-03-13  Alan Modra  <amodra@bigpond.net.au>
9541
9542         * archures.c (bfd_default_compatible): Test bits_per_word.
9543         * cpu-i386.c (i386_compatible): Remove.  Replace occurrences with
9544         bfd_default_compatible.
9545         * cpu-i370.c (i370_compatible): Likewise.
9546         * cpu-sparc.c (sparc_compatible): Likewise.
9547         * cpu-h8300.c (compatible): Test in->arch == out->arch.
9548
9549         * elflink.h: Formatting fixes.
9550         (elf_link_output_extsym): Merge undefined and undef weak cases.
9551
9552         * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9553         when word size of input matches output word size.
9554
9555 2002-03-12  Andreas Jaeger  <aj@suse.de>
9556
9557         * cpu-i386.c (i386_compatible): New.  Use it instead of
9558         bfd_default_compatible.
9559
9560 2002-03-07  H.J. Lu  (hjl@gnu.org)
9561
9562         * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9563         as the type for bfd_reloc_val.
9564
9565 2002-03-05  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9566
9567         * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9568         (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9569         (elf_hppa_final_link_relocate): Correct relocations for indirect
9570         references to local data through the DLT.  Fix .opd creation for
9571         local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9572         relocations.  Use e_lsel selector for R_PARISC_DLTIND21L,
9573         R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9574         "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9575         Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9576         * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9577         as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9578
9579 2002-03-05  Jakub Jelinek  <jakub@redhat.com>
9580
9581         * merge.c (_bfd_merge_sections): Don't segfault if there
9582         is nothing to merge due to GC.
9583
9584 2002-03-05  Alan Modra  <amodra@bigpond.net.au>
9585
9586         * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9587         symbols that have been forced local.
9588
9589         * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9590         to output forced local syms for non-shared link.
9591         (elf_link_output_extsym): Tweak condition for calling backend
9592         adjust_dynamic_symbol so that previous behaviour is kept.
9593         Whitespace changes throughout file.
9594
9595 2002-03-04  H.J. Lu <hjl@gnu.org>
9596
9597         * elf.c (bfd_section_from_shdr): Handle special sections,
9598         .init_array, .fini_array and .preinit_array.
9599         (elf_fake_sections): Likewise.
9600
9601         * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9602         DT entry only if the section is in output for .init_array,
9603         .fini_array and .preinit_array. Complain about .preinit_array
9604         section in DSO.
9605         (elf_bfd_final_link): Warn zero size for .init_array,
9606         .fini_array and .preinit_array sections.
9607
9608         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9609         SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9610         (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9611         .preinit_array.
9612
9613 2002-03-04  Alan Modra  <amodra@bigpond.net.au>
9614
9615         * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9616         * configure: Regenerate.
9617
9618 2002-03-02  Tom Rix  <trix@redhat.com>
9619
9620         * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9621         symbolic equiv.
9622         * coff-rs6000.c (xcoff_howto_table): Same.
9623
9624 2002-03-01  David Mosberger  <davidm@hpl.hp.com>
9625
9626         * elflink.h (size_dynamic_sections): If section named
9627         ".preinit_array" exists, create DT_PREINIT_ARRAY and
9628         DT_PREINIT_ARRAYSZ entries in dynamic table.  Analogously for
9629         ".init_array" and ".fini_array".
9630         (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9631         DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9632         DT_FINI_ARRAY.
9633
9634 2002-02-26  Andrew Macleod  <amacleod@cygnus.com>
9635
9636         * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9637         dynsyms.
9638
9639 2002-02-25  Alan Modra  <amodra@bigpond.net.au>
9640
9641         * elf64-hppa.h: Update copyright date.
9642
9643         * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9644         (ppc64_elf_relocate_section): Don't generate power4 style branch
9645         hints for *_BRTAKEN and *_BRNTAKEN relocs.
9646
9647 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
9648
9649         * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9650         last patch.
9651         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9652
9653 2002-02-21  Andreas Jaeger  <aj@suse.de>
9654
9655         * elf64-x86-64.c: Major rework that introduces all recent changes
9656         to the x86-64 backend.  Get a closer match to elf32-i386.
9657         (struct elf64_x86_64_dyn_relocs): Rename from
9658         elf64_x86_64_pcrel_relocs_copied, add additional fields.  Change
9659         all users.
9660         (struct elf64_x86_64_link_hash_table): Add short cuts to some
9661         sections.
9662         (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9663         remove casts, initialize new hash members.
9664         (create_got_section): New.
9665         (elf64_x86_64_create_dynamic_sections): New.
9666         (elf64_x86_64_copy_indirect_symbol): New.
9667         (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9668         relocs, .got or .relgot here but do it in allocate_dynrelocs.
9669         Reference count possible .plt and .got entries.  Don't test input
9670         section SEC_READONLY here to try to avoid copy relocs, and keep
9671         dyn_relocs regardless of ELF_LINK_NON_GOT_REF.  Don't set
9672         DF_TEXTREL here.  Delay setting of variables until needed.  Cache
9673         pointer to "sreloc" section in elf_section_data. Tweak condition
9674         under which .got created.  Report files with bad relocation
9675         section names.
9676         (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9677         Reference count possible .plt entries.  Don't deallocate .got and
9678         .relgot space here.
9679         (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc.  Don't
9680         do copy reloc processing for weakdefs.  Remove redundant casts and
9681         aborts.  Delay setting of vars until needed.  Move creation of
9682         dynamic symbols and allocation of .plt and .rela.plt to
9683         allocate_dynrelocs.  Replace BFD_ASSERT with abort.
9684         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9685         (allocate_dynrelocs): New.
9686         (readonly_dynrelocs): New.
9687         (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9688         Allocate space for dyn relocs.  Replace BFD_ASSERT with abort.
9689         Zero out the dynamic allocated content space.
9690         (elf64_x86_64_discard_copies): Removed.
9691         (elf64_x86_64_relocate_section): Make use of dynamic section
9692         short-cuts.  Localise vars, and delay setting.  Better error
9693         reporting, replace BFD_ASSERT with abort.  Check
9694         ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9695         regular object file and tread the weak definition as the normal
9696         one.  Don't discard relocs for undefweak or undefined symbols and
9697         check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9698         relocs.
9699         (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9700         symbols that have been forced local.  Use same test to decide if
9701         we can use a relative reloc for got as relocate_section.  Expand
9702         SHN_UNDEF comment.  Move expressions out of function calls.
9703         Replace BFD_ASSERT with abort.
9704         (bfd_elf64_bfd_final_link): Removed.
9705         (elf_backend_copy_indirect_symbol): Define.
9706
9707 2002-02-20  Tom Rix  <trix@redhat.com>
9708
9709         * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9710         (_bfd_xcoff_reloc_type_lookup): Use it.
9711         * coff64-rs6000.c (xcoff64_howto_table): Same.
9712         (xcoff64_reloc_type_lookup): Same.
9713
9714 2002-02-20  Peter Schauer  <pes@regent.e-technik.tu-muenchen.de>
9715
9716         * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9717         little endian.
9718
9719 2002-02-19  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9720
9721         * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9722         (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9723         * bfd-in2.h: Regenerate.
9724         * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9725         Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9726         with "s390:64-bit".
9727         * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9728         (elf_s390_reloc_type_lookup): Likewise.
9729         (elf_s390_check_relocs): Likewise.
9730         (elf_s390_gc_sweep_hook): Likewise.
9731         (elf_s390_relocate_section): Likewise.
9732         (elf_s390_object_p): Use renamed architecture define.
9733         * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9734
9735 2002-02-19  Frank Ch. Eigler  <fche@redhat.com>
9736
9737         * syms.c (stt[]): Sorted.  Added .init/.fini -> "t" mapping.
9738
9739 2002-02-19  Jakub Jelinek  <jakub@redhat.com>
9740
9741         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9742         absptr -> pcrel optimization for shared libs.
9743         Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9744         library cannot be converted to pcrel.
9745         (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9746         relative.
9747         * elf32-i386.c (elf_i386_relocate_section): If
9748         _bfd_elf_section_offset returned -2, skip, but make sure the
9749         relocation is installed.
9750         * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9751         * elf32-cris.c (cris_elf_relocate_section): Likewise.
9752         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9753         * elf32-i370.c (i370_elf_relocate_section): Likewise.
9754         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9755         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9756         * elf32-s390.c (elf_s390_relocate_section): Likewise.
9757         * elf32-sh.c (sh_elf_relocate_section): Likewise.
9758         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9759         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9760         * elf64-s390.c (elf_s390_relocate_section): Likewise.
9761         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9762         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9763         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9764         * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9765         _bfd_elf_section_offset returning -2 the same way as -1.
9766         * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9767         * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9768         and BFD_ASSERT.
9769         * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9770
9771 2002-02-18  Tom Rix  <trix@redhat.com>
9772
9773         * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9774         (bfd_xcoff_size_dynamic_sections): Same.
9775         * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9776         (bfd_xcoff_size_dynamic_sections): Same.
9777         * coff-rs6000.c (xcoff_generate_rtinit): Same.
9778         * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9779         * libxcoff.h (struct xcoff_backend_data_rec): Same.
9780         * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9781         * bfd-in2.h: Regenerate.
9782
9783 2002-02-18  Alan Modra  <amodra@bigpond.net.au>
9784
9785         * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9786         (struct ppc_link_hash_table): Add sfpr.
9787         (ppc64_elf_link_hash_table_create): Init it.
9788         (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9789         .glink out to..
9790         (create_linkage_sections): ..here.  Make .sfpr too.
9791         (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9792         dynobj early.
9793         (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9794         (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9795         ._restf* functions, and create as needed.
9796         (func_desc_adjust): Only force_local for shared libs.
9797
9798 2002-02-18  David O'Brien  <obrien@FreeBSD.org>
9799
9800         * configure.in: Bump version number post 2.12 branching.
9801         * configure: Regenerate.
9802
9803 2002-02-17  Hans-Peter Nilsson  <hp@bitrange.com>
9804
9805         * mmo.c: Correct and improve comments.
9806         (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9807         zero-pad.  Use input to fill up non-empty bfd buffer.
9808         (mmo_flush_chunk): New function.
9809         (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9810         changed.  Don't emit location specifier if VMA is same as
9811         *LAST_VMAP after omitting leading zero contents.  Call
9812         mmo_flush_chunk before emitting location specifier.
9813         (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9814         with mmo_write_loc_chunk calls.
9815         (mmo_internal_write_section): Call mmo_flush_chunk after
9816         mmo_write_chunk.
9817         (mmo_write_symbols_and_terminator): Move :Main to first position
9818         in symbol array.  Add faked one if it does not exist if there are
9819         other symbols.  Don't add it if there are no symbols at all.  Move
9820         out test for value of :Main from symbol loop.  Rename table
9821         fakemain to maintable and variable mainsym to fakemain.
9822
9823 2002-02-15  Richard Henderson  <rth@redhat.com>
9824
9825         * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9826         section with no got matches any got.  Simplify error generaion.
9827
9828 2002-02-15  Alan Modra  <amodra@bigpond.net.au>
9829
9830         Support arbitrary length fill patterns.
9831         * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9832         (_bfd_default_link_order): Remove bfd_fill_link_order code.
9833         Call default_data_link_order.
9834         (default_fill_link_order): Delete.
9835         (default_data_link_order): New function.
9836         * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9837         of bfd_fill_link_order with bfd_data_link_order.
9838         * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9839         * elf64-mips.c (mips_elf64_final_link): Likewise.
9840
9841         * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9842         Correct value returned in "end" for "0x<non-hex>".
9843
9844 2002-02-14  Nick Clifton  <nickc@cambridge.redhat.com>
9845
9846         * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9847         (scan): Test against 'mach' field in info structure.
9848
9849 2002-02-14  Alan Modra  <amodra@bigpond.net.au>
9850
9851         * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9852
9853 2002-02-14  Matt Fredette  <fredette@netbsd.org>
9854
9855         * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9856         EF_M68000.
9857
9858 2002-02-13  Nick Clifton  <nickc@cambridge.redhat.com>
9859
9860         * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
9861         non-zero physical addresses when adjusting the LMAs of new
9862         sections.
9863
9864 2002-02-12  John David Anglin  <dave@hiauly1.hia.nrc.ca>
9865
9866         * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9867         from _bfd_elf_hppa_gen_reloc_type.
9868         (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9869         * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9870         * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9871         * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9872
9873 2002-02-12  Alexandre Oliva  <aoliva@redhat.com>
9874
9875         * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9876         loading its contents if there's nothing to do in it.
9877
9878 2002-02-12  Alan Modra  <amodra@bigpond.net.au>
9879
9880         * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9881         64k boundary.
9882
9883         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9884         DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9885         (ppc64_elf_finish_dynamic_sections): Set values for them.
9886
9887 2002-02-11  Michael Snyder  <msnyder@redhat.com>
9888
9889         * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9890         * elf.c (elfcore_grok_pstatus): Add prototype.
9891         (elfcore_grok_lwpstatus): Add prototype.
9892         (elfcore_write_lwpstatus): New function.
9893         (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9894
9895 2002-02-11  Alexandre Oliva  <aoliva@redhat.com>
9896
9897         * elf32-sh.c: Added missing prototypes.
9898         * elf32-sh64.c: Likewise.
9899         (sh_elf_align_loads): Mark unused args as such.
9900         * elf64-sh64.c: Added missing prototypes.
9901         (struct elf_sh64_link_hash_entry): Fix typo.
9902         (sh_elf64_relocate_section): Fix info argument passed to
9903         _bfd_elf_section_offset.
9904
9905 2002-02-11  Alan Modra  <amodra@bigpond.net.au>
9906
9907         * Makefile.am: "make dep-am".
9908         * Makefile.in: Regenerate.
9909         * aclocal.m4: Regenerate.
9910         * config.in: Regenerate.
9911         * configure: Regenerate.
9912
9913 2002-02-10  Daniel Jacobowitz  <drow@mvista.com>
9914
9915         * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9916         variable warnings.
9917         * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9918         comparison warning.
9919         * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9920         cast warnings for the common case.
9921
9922 2002-02-10  Hans-Peter Nilsson  <hp@bitrange.com>
9923
9924         * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9925         vectors.
9926         (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9927         vectors.
9928
9929 2002-02-09  Richard Henderson  <rth@redhat.com>
9930
9931         * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9932         (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9933         (elf64_alpha_relocate_section): Likewise.
9934         * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9935         * bfd-in2.h, libbfd.h: Rebuild.
9936
9937 2002-02-09  Hans-Peter Nilsson  <hp@bitrange.com>
9938
9939         * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9940         that base-plus-offset reloc accounting is consistent.
9941         (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9942         up to date for undefined symbols.
9943
9944 2002-02-08  Eric Christopher  <echristo@redhat.com>
9945
9946         From Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
9947
9948         * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9949         sections for the O32 ABI.
9950
9951 2002-02-08  Chris Demetriou  <cgd@broadcom.com>
9952
9953         * elf32-arm.h: Fix formatting of _("...").
9954         * elf32-d10v.c: Likewise.
9955         * elf32-m68k.c: Likewise.
9956         * elf32-mips.c: Likewise.
9957
9958 2002-02-08  Ivan Guzvinec <ivang@opencores.org>
9959
9960         * coff-or32.c: Fix compile time warning messages.
9961
9962 2002-02-08  Alexandre Oliva  <aoliva@redhat.com>
9963
9964         Contribute sh64-elf.
9965         2002-01-23  Alexandre Oliva  <aoliva@redhat.com>
9966         * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
9967         R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
9968         R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
9969         R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
9970         R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
9971         R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
9972         R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
9973         R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
9974         R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
9975         New relocs.
9976         * libbfd.h, bfd-in2.h: Rebuilt.
9977         * elf32-sh.c (sh_elf_howto_table): Define new relocs.
9978         (sh_reloc_map): Map them.
9979         (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
9980         elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
9981         elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
9982         elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
9983         elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
9984         elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
9985         movi_shori_putval) [INCLUDE_SHMEDIA]: New.
9986         (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
9987         datalabel_got_offset.
9988         (sh_elf_link_hash_newfunc): Initialize it.
9989         (sh_elf_relocate_section): Augment the scope of
9990         seen_stt_datalabel.  Introduce GOTPLT support.  Extend GOTPC, PLT,
9991         GOT and GOTOFF handling to new SHmedia relocation types.  Support
9992         GOT_BIAS.
9993         (sh_elf_check_relocs): Likewise.
9994         (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
9995         PLT entries using movi_shori_putval.  Support GOT_BIAS.
9996         (sh_elf_finish_dynamic_sections): Likewise.
9997         * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
9998         relocation, it's now done by the caller.
9999         (GOT_BIAS): New.
10000         * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10001         elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10002         elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10003         elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10004         elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10005         elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10006         sh64_elf64_hash_table): New.
10007         (sh_elf64_howto_table): Introduce new relocs.
10008         (sh_elf64_info_to_howto): Accept new PIC relocs.
10009         (sh_elf64_relocate_section): Augment the scope of
10010         seen_stt_datalabel.  Support new PIC relocs.
10011         (sh_elf64_check_relocs): Support new PIC relocs.
10012         (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10013         elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10014         elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10015         elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10016         sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10017         movi_shori_putval, movi_3shori_putval,
10018         sh64_elf64_create_dynamic_sections,
10019         sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10020         sh64_elf64_size_dynamic_sections,
10021         sh64_elf64_finish_dynamic_symbol,
10022         sh64_elf64_finish_dynamic_sections): New.
10023         (elf_backend_create_dynamic-sections,
10024         bfd_elf64_bfd_link_hash_table_create,
10025         elf_backend_adjust_dynamic_symbol,
10026         elf_backend_size_dynamic_sections,
10027         elf_backend_finish_dynamic_symbol,
10028         elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10029         elf_backend_plt_readonly, elf_backend_want_plt_sym,
10030         elf_backend_got_header_size, elf_backend_plt_header_size):
10031         Define.
10032         2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
10033         * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10034         match official numbers and names; moved unmaching ones to the
10035         range 0xf2-0xff.
10036         * elf32-sh64.c, elf64-sh64.c: Likewise.
10037         2001-03-12  DJ Delorie  <dj@redhat.com>
10038         * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10039         sections.
10040         2001-03-12  DJ Delorie  <dj@redhat.com>
10041         * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10042         be aligned.
10043         * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10044         2001-01-14  Hans-Peter Nilsson  <hpn@cygnus.com>
10045         * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10046         (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10047         .cranges section with SEC_SORT_ENTRIES set.
10048         (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10049         incoming sorted .cranges section.
10050         (sh64_bfd_elf_copy_private_section_data): New.
10051         (sh64_elf_final_write_processing): Only sort .cranges and modify
10052         start address if called by linker.
10053         2001-01-08  Ben Elliston  <bje@redhat.com>
10054         * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10055         Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10056         * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10057         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
10058         * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10059         line.  Add comments before all entries.
10060         <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10061         comment.
10062         (sh_elf64_reloc): Correct head comment.
10063         (sh_elf64_relocate_section): Correct spacing.
10064         <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10065         instead call reloc_dangerous callback.
10066         <case R_SH_SHMEDIA_CODE>: New case.
10067         (sh_elf64_gc_mark_hook): Correct spacing.
10068         (sh_elf64_check_relocs): Ditto.
10069         * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10070         New case.
10071         * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10072         functions.
10073         (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10074         clarify describing comment.  Add comments before all entries.
10075         (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10076         honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10077         2001-01-06  Hans-Peter Nilsson  <hpn@cygnus.com>
10078         Sort .cranges section in final link.  Prepare to set bit 0 on
10079         entry address.
10080         * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10081         (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10082         (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10083         .cranges section.
10084         (sh64_backend_section_from_shdr): New, to recognize
10085         SHT_SH5_CR_SORTED on incoming .cranges section.
10086         (elf_backend_section_from_shdr): Define.
10087         (sh64_elf_final_write_processing): Sort outgoing .cranges
10088         section.  (New, temporarily disabled:) Set bit 0 on entry address
10089         according to ISA type.
10090         (sh64_find_section_for_address): New.
10091         (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10092         crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10093         (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c.  Use
10094         bfd_malloc, not xmalloc.
10095         (sh64_get_contents_type): Move here from opcodes/sh64-dis.c.  Make
10096         global.
10097         * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10098         temporarily disabled) setting bit 0 on entry address.
10099         (elf_backend_final_write_processing): Define.
10100         2001-01-05  Hans-Peter Nilsson  <hpn@cygnus.com>
10101         * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10102         be a proper relocation for PTA and PTB rather than a marker.
10103         <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10104         R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10105         R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10106         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10107         R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10108         Zero src_mask.
10109         * elf64-sh64.c: Ditto.
10110         (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10111         * elf32-sh64.c: Include opcodes/sh64-opc.h
10112         (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10113         argument.  Drop const qualifiers from "bfd *" and "bfd_byte *"
10114         parameters.  No unused parameters.  Caller changed.
10115         <case R_SH_PT_16>: New case.
10116         * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10117         * Makefile.in: Regenerate.
10118         2000-12-30  Hans-Peter Nilsson  <hpn@cygnus.com>
10119         * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10120         all code sections.
10121         (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10122         (sh64_elf_merge_private_data): Ditto.
10123         * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10124         to access stored section flags.
10125         (sh64_elf_final_write_processing): Return immediately unless
10126         called by linker.  Use sh64_elf_section_data (cranges) to get size
10127         of linker-generated cranges entries.
10128         (sh64_elf_copy_private_data): Add missing "return true".
10129         (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10130         (sh_elf64_merge_private_data): Ditto.
10131         2000-12-19  Hans-Peter Nilsson  <hpn@cygnus.com>
10132         * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10133         elf64-sh64.c:sh64_elf_fake_sections.
10134         (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10135         2000-12-18  Hans-Peter Nilsson  <hpn@cygnus.com>
10136         * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10137         (sh64_elf_final_write_processing): New.
10138         (elf_backend_final_write_processing): Define.
10139         (sh64_elf_fake_sections): Get header flags from tdata field.
10140         (sh64_elf_copy_private_data): Do not call
10141         sh64_elf_copy_private_data_internal, just copy e_flags field.
10142         (sh64_elf_merge_private_data): Do not call
10143         sh64_elf_copy_private_data_internal.
10144         2000-12-12  Hans-Peter Nilsson  <hpn@cygnus.com>
10145         Remove EF_SH64_ABI64, let ELF size make difference.
10146         Remove SH64-specific BFD section flag.
10147         * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10148         containing SHmedia through elf_section_data (asect)->tdata
10149         non-zero, not using a BFD section flag.
10150         (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10151         (sh64_elf_merge_private_data): Similar.
10152         (elf_backend_section_flags): Don't define.
10153         (sh64_elf_backend_section_flags): Delete.
10154         * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10155         not EF_SH64_ABI64.
10156         (sh_elf64_merge_private_data): Similar.
10157         * section.c (Section flags definitions): Don't define
10158         SEC_SH_ISA_SHMEDIA.
10159         (bfd-in2.h): Regenerate.
10160         2000-12-09  Hans-Peter Nilsson  <hpn@cygnus.com>
10161         Make DataLabel references work with partial linking.
10162         * elf32-sh64.c: Fix formatting.
10163         (sh64_elf_link_output_symbol_hook): New.
10164         (elf_backend_link_output_symbol_hook): Define to
10165         sh64_elf_link_output_symbol_hook.
10166         (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10167         undefined if partial linking.  Adjust sanity check.
10168         * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10169         (elf_backend_link_output_symbol_hook): Define to
10170         sh64_elf64_link_output_symbol_hook.
10171         (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10172         undefined if partial linking.  Adjust sanity check.
10173         2000-12-07  Hans-Peter Nilsson  <hpn@cygnus.com>
10174         Implement semantics for inter-file DataLabel references.
10175         * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10176         (sh64_elf64_add_symbol_hook): New.
10177         (sh_elf64_relocate_section): If passing an indirect symbol with
10178         st_type STT_DATALABEL on the way to a symbol with st_other
10179         STO_SH5_ISA32, do not bitor 1 to the relocation.
10180         (elf_backend_add_symbol_hook): Define to
10181         sh64_elf64_add_symbol_hook.
10182         * elf64-sh32.c: Tweak comments.
10183         (DATALABEL_SUFFIX): Define.
10184         (sh64_elf_add_symbol_hook): New.
10185         (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10186         * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10187         symbol with st_type STT_DATALABEL on the way to a symbol with
10188         st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10189         2000-12-05  Hans-Peter Nilsson  <hpn@cygnus.com>
10190         Pass through STT_DATALABEL.
10191         * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10192         (elf_backend_get_symbol_type): Define.
10193         * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10194         (elf_backend_get_symbol_type): Define.
10195         2000-11-30  Hans-Peter Nilsson  <hpn@cygnus.com>
10196         * elf32-sh64.c: Tweak comments.
10197         (sh64_elf_copy_private_data_internal): Add prototype.
10198         (bfd_elf32_bfd_set_private_flags): Define.
10199         (sh64_elf_copy_private_data_internal): Compare machine name, not
10200         textual BFD target name, to check whether to copy section flag
10201         SHF_SH5_ISA32.
10202         (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10203         Tweak section-contents-type-mismatch message.
10204         (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10205         Validize reloc-types.
10206         * elf64-sh64.c: New file.
10207         * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10208         * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10209         (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10210         Regenerate dependencies.
10211         * Makefile.in: Regenerate.
10212         * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10213         bfd_elf64_sh64l_vec.
10214         * configure.in: Handle bfd_elf64_sh64_vec and
10215         bfd_elf64_sh64l_vec.
10216         * configure: Regenerate.
10217         * po/POTFILES.in: Regenerate.
10218         * po/bfd.pot: Regenerate.
10219         2000-11-29  Hans-Peter Nilsson  <hpn@cygnus.com>
10220         * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10221         anything else but EF_SH64 and EF_SH64_ABI64.
10222         (sh64_elf_merge_private_data): Emit error for anything else but
10223         EF_SH64 and EF_SH64_ABI64.
10224         * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10225         from targ_selvecs.
10226         * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10227         bfd_elf32_sh64l_vec as a temporary measure.
10228         * configure: Regenerate.
10229         2000-11-27  Hans-Peter Nilsson  <hpn@cygnus.com>
10230         * cpu-sh.c (arch_info_struct): Include sh5 item
10231         unconditionalized.
10232         * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10233         Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10234         bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10235         * elf32-sh64.c: Tweak comments.
10236         (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10237         are proper subsets of SH64 as bfd_mach_sh5.  Add EF_SH64_ABI64.
10238         (sh64_elf_copy_private_data_internal): Wrap long line.
10239         (sh64_elf_merge_private_data): Rewrite to allow objects from
10240         SH64 subsets to be linked together.
10241         (INCLUDE_SHMEDIA): Define.
10242         * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10243         Parenthesize plus-expression inside or-expression.
10244         <global symbol>: Ditto.
10245         (sh_elf_set_mach_from_flags): Remove code refusing
10246         deleted EF_SH64_32BIT_ABI flag.
10247         2000-11-26  Hans-Peter Nilsson  <hpn@cygnus.com>
10248         * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10249         R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10250         R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10251         (sh_elf_relocate_section) <local symbol>: Or 1 in
10252         calculation of relocation if sym->st_other & STO_SH5_ISA32.
10253         <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10254         * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10255         relocation.
10256         2000-11-24  Hans-Peter Nilsson  <hpn@cygnus.com>
10257         * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10258         (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10259         Regenerate dependencies.
10260         * Makefile.in: Regenerate.
10261         * archures.c: Add bfd_mach_sh5.
10262         * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10263         Handle sh64-*-elf*.  Set targ_cflags to -DINCLUDE_SHMEDIA.
10264         * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10265         * configure: Regenerate.
10266         * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10267         BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10268         BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10269         BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10270         BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10271         BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10272         BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10273         BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10274         BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10275         * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10276         in item for SH5.
10277         * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10278         for SHmedia relocs.
10279         [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10280         [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10281         shmedia_prepare_reloc, goto final_link_relocate if it returns
10282         non-zero, else fail as before.
10283         (sh_elf_set_mach_from_flags): Provide function only if not defined
10284         as macro.  Do not recognize objects with EF_SH64_32BIT_ABI set.
10285         (sh_elf_set_private_flags): Provide function only if not defined
10286         as a macro.
10287         (sh_elf_copy_private_data): Similar.
10288         (sh_elf_merge_private_data): Similar.
10289         * section.c (SEC_SH_ISA_SHMEDIA): New.
10290         * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10291         * elf32-sh64.c: New file.
10292         * libbfd.h: Regenerate.
10293         * bfd-in2.h: Regenerate.
10294         * po/POTFILES.in: Regenerate.
10295         * po/bfd.pot: Regenerate.
10296         * bfd-in2.h: Regenerate.
10297         * libbfd.h: Regenerate.
10298
10299 2002-02-07  Daniel Jacobowitz  <drow@mvista.com>
10300
10301         * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10302         been included, not drag it in.
10303         * bfd-in2.h: Regenerate.
10304
10305 2002-02-06  H.J. Lu  (hjl@gnu.org)
10306
10307         * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10308         the mach and ISA fields if necessary.
10309
10310 2002-02-06  Nick Clifton  <nickc@cambridge.redhat.com>
10311
10312         * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10313         ARM architecture when an F_ARM_5 flag is detected, since we cannot
10314         be sure exactly which architecture this represents.
10315
10316 2002-02-05  Nick Clifton  <nickc@redhat.com>
10317
10318         * po/tr.po: Updated translation.
10319
10320 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
10321
10322         From Jimi X <jimix@watson.ibm.com>
10323         * archures (bfd_mach_ppc64): Define.
10324         (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10325         (bfd_powerpc_arch): Define.
10326         * bfd-in2.h: Regenerate.
10327         * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10328         (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10329         (bfd_powerpc_archs): Add default powerpc64 arch.
10330
10331 2002-02-05  Alan Modra  <amodra@bigpond.net.au>
10332
10333         * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10334         against section syms in readonly sections.  Don't do the global
10335         sym check if we find one.
10336         * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10337         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10338         * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10339         * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10340         (elf_s390_grok_prstatus): Add missing prototype.
10341
10342 2002-02-04  Hans-Peter Nilsson  <hp@bitrange.com>
10343
10344         * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10345         (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10346         Call bfd_get_section_by_name only once.  Initialize
10347         bpodata->n_bpo_relocs_this_section.
10348         (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10349         referring to DSOs.
10350         (bpo_reloc_request_sort_fn): Don't use difference of values as
10351         return-value.
10352
10353 2002-02-02  David O'Brien  <obrien@FreeBSD>
10354
10355         * configure.in: Tweak the FreeBSD 4.x recognition more.  Only treat
10356         version 4.5 and later the same as 5-CURRENT.
10357         * configure: Re-generate.
10358
10359 2002-02-02  Jason Thorpe  <thorpej@wasabisystems.com>
10360
10361         * config.bfd (hppa*-*-netbsd*): New target.
10362
10363 2002-01-31  Philipp Thomas  <pthomas@suse.de>
10364
10365         * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10366         to front of message. Unify messages with elf32-arm.h. Use
10367         commas where neccessary.
10368         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10369         ERROR in messages. Unify messages with coff-arm.c. Correct
10370         VFP/FPA error message.
10371         (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10372         APCS-32 for translation.
10373
10374 2002-02-01  Hans-Peter Nilsson  <hp@bitrange.com>
10375
10376         Perform on-demand global register allocation from
10377         R_MMIX_BASE_PLUS_OFFSET relocs.
10378         * elf64-mmix.c (struct bpo_reloc_section_info, struct
10379         bpo_reloc_request, struct bpo_greg_section_info): New.
10380         (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10381         bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10382         _bfd_mmix_check_all_relocs,
10383         _bfd_mmix_prepare_linker_allocated_gregs,
10384         _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10385         (elf_mmix_howto_table): Correct src_mask for most relocs.
10386         (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10387         case.
10388         (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10389         case.  Fix typo in comment.  New label do_mmix_reloc.
10390         (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10391         store first object file with a base-plus-offset reloc.  Call
10392         mmix_elf_check_common_relocs for the part common with mmo.
10393         (mmix_elf_final_link): Write out linker-allocated register
10394         contents section.
10395         (elf_backend_gc_sweep_hook): Define.
10396         (bfd_elf64_bfd_relax_section): Define.
10397
10398         * mmo.c: Don't include <ctype.h>
10399         (mmo_init): Correct init-once logic.
10400
10401 2002-02-01  Tom Rix  <trix@redhat.com>
10402
10403         * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10404
10405 2002-02-01  Alan Modra  <amodra@bigpond.net.au>
10406
10407         * Makefile.am: Run "make dep-am"
10408         * Makefile.in: Regenerate.
10409
10410 2002-01-31  David O'Brien  <obrien@FreeBSD>
10411
10412         * configure.in: Recognize the differences in core files from FreeBSD
10413         4.{0,1} and later versions of 4.x.  This treats 4.2+ the same as
10414         5-CURRENT.
10415         * configure: Regenerate.
10416
10417 2002-01-31  Ivan Guzvinec  <ivang@opencores.org>
10418
10419         * coff-or32.c: New file.
10420         * cpu-or32.c: New file.
10421         * elf32-or32.c: New file.
10422         * archures.c: Add support for or32.
10423         * targets.c: Add support for or32.
10424         * bfd-in2.h: Regenerate.
10425         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10426         coff_write_object_contents): Add support for or32.
10427         * config.bfd: Add target.
10428         * configure.in: Add support for or32.
10429         * configure: Regenerate.
10430         * Makefile.am: Add support for or32.
10431         * Makefile.in: Regenerate.
10432         * po/SRC-POTFILES.in: Add or32 files.
10433         * po/bfd.pot: Regenerate.
10434
10435 2002-01-31  Nick Clifton  <nickc@cambridge.redhat.com>
10436             Don Lindsay  <lindsayd@cisco.com>
10437
10438         * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10439         false' with a return of a bfd_reloc_ error code.
10440
10441 2002-01-31  Hans-Peter Nilsson  <hp@axis.com>
10442
10443         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10444         unexport unreferenced symbols when --export-dynamic.  Call
10445         _bfd_elf_strtab_delref when unexporting.
10446
10447 2002-01-30  Daniel Jacobowitz  <drow@mvista.com>
10448
10449         * bfd-in.h: Include <stdbool.h> if it is available.
10450         * bfd-in2.h: Regenerated.
10451
10452 2002-01-31  Alan Modra  <amodra@bigpond.net.au>
10453
10454         * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10455         not go via the plt.
10456
10457 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
10458
10459         * archures.c: Tidy up formatting of embedded comments.
10460         * bfd.c: Tidy up formatting of embedded comments.
10461         * bfd-in.h: Fix formatting of comments.
10462         * reloc.c: Tidy up formatting of ordinary & embedded comments.
10463         * section.c: Tidy up formatting of embedded comments.
10464         * syms.c: Tidy up formatting of embedded comments.
10465         * targets.c: Tidy up formatting of embedded comments.
10466
10467         * bfd-in2.h: Regenerate.
10468
10469 2002-01-30  Nick Clifton  <nickc@cambridge.redhat.com>
10470
10471         * vms-tir.c (cmd_name): New function.
10472         (tir_cmd_name): New function.
10473         (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10474         (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10475         Fix formatting.
10476
10477         * peXXigen.c (pe_print_idata): Rearrange message to aid in
10478         translation.
10479         (pe_print_pdata): Rearrange message to aid in translation.
10480
10481         * libbfd.c (warn_deprecated): Rearrange error message to aid in
10482         translation.
10483
10484         * ihex.c (ihex_write_object_contents): Fix spelling typo.
10485
10486         * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10487
10488         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10489         message to aid in translation.
10490
10491         * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10492         to aid in translation.
10493
10494         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10495
10496 2002-01-30  Philipp Thomas  <pthomas@suse.de>
10497
10498         * coff-arm.c, elf32-elf.h: Unify messages.
10499
10500 2002-01-30  Nick Clifton <nickc@redhat.com>
10501
10502         * po/sv.po: Updated translation.
10503
10504 2002-01-30  Philipp Thomas  <pthomas@suse.de>
10505
10506         * dwarf2.c (read_abbrev): Use full section name in error message.
10507         (decode_line_info): Likewise.
10508
10509         * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10510         message.
10511
10512 2002-01-30  Alan Modra  <amodra@bigpond.net.au>
10513
10514         * elf64-ppc.c (func_desc_adjust): Only provide missing function
10515         descriptor symbols for undefined function code syms.  Clear
10516         ELF_LINK_NON_ELF so that they can stay weak.
10517
10518 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
10519             Mitch Lichtenberg  <mpl@broadcom.com>
10520
10521         * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10522         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10523         to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10524         generation.
10525         * bfd-in2.h: Regenerate.
10526
10527 2002-01-29  Chris Demetriou  <cgd@broadcom.com>
10528
10529         * elf32-mips.c: Add additional comments about HI16 relocation
10530         processing.
10531         (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10532         pc-relative relocations.  (Reverts change made on 2001-10-31.)
10533         (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10534         for pc-relative relocations.
10535         (mips_elf_calculate_relocation): Add a comment about a kludge
10536         in the R_MIPS_GNU_REL_HI16 handling.
10537         (_bfd_mips_elf_relocate_section): Implement that kludge;
10538         adjust pc-relative HI16 relocation for difference in HI16 and
10539         LO16 addresses, since it can't easily be done in
10540         mips_elf_calculate_relocation.
10541
10542 2002-01-29  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10543
10544         * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10545         relocations with PC32 relocations for undefined or weak symbols.
10546         * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10547         * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10548
10549 2002-01-28  Jason Thorpe  <thorpej@wasabisystems.com>
10550
10551         * elfcore.h (elf_core_file_p): Improve comment for last change.
10552
10553 2002-01-27  Daniel Jacobowitz  <drow@mvista.com>
10554
10555         * configure: Regenerated.
10556
10557 2002-01-27  Jason Thorpe  <thorpej@wasabisystems.com>
10558
10559         * elfcore.h (elf_core_file_p): Set the machine architecture
10560         before processing the program headers.
10561
10562 2002-01-26  Hans-Peter Nilsson  <hp@bitrange.com>
10563
10564         * configure.in <64-bit configuration>: If using gcc, check and
10565         emit error for egcs-1.1.2.
10566         * configure: Regenerate.
10567
10568 2002-01-26  Egor Duda  <deo@logos-m.ru>
10569
10570         * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10571         as possible to avoid stack corruption.
10572
10573 2002-01-26  Richard Henderson  <rth@redhat.com>
10574
10575         * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10576         for non-allocated sections.
10577
10578 2002-01-25  Mark Kettenis  <kettenis@gnu.org>
10579
10580         * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10581         prstat.pr_reg even if it is a struct.
10582
10583 2002-01-25  Steve Ellcey <sje@cup.hp.com>
10584
10585         * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10586
10587 2002-01-25  Philipp Thomas  <pthomas@suse.de>
10588
10589         * coffgen.c (coff_print_symbol): Don't mark info message
10590         for translation.
10591
10592 2002-01-25  Nick Clifton <nickc@redhat.com>
10593
10594         * po/fr.po: Updated translation.
10595         * po/es.po: Updated translation.
10596
10597 2002-01-25  Philipp Thomas  <pthomas@suse.de>
10598
10599         * coff-alpha.c (alpha_relocate_section): Unify warning message
10600         for GP relative relocations without GP defined.
10601         * coff-mips.c (mips_relocate_section): Likewise.
10602
10603 2002-01-25  Alan Modra  <amodra@bigpond.net.au>
10604
10605         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10606         unsigned overflow when new_offset < old_offset.
10607
10608 2002-01-24  Philipp Thomas  <pthomas@suse.de>
10609
10610         * bfd.c (_bfd_abort): Fix typo.
10611
10612 2002-01-23  Richard Henderson  <rth@redhat.com>
10613
10614         * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10615         plt entries for undefweak symbols.
10616
10617 2002-01-23  Steve Ellcey <sje@cup.hp.com>
10618
10619         * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10620         (bfd_elf64_ia64_hpux_big_vec): Ditto.
10621         (bfd_elf32_h8300_vec): Ditto.
10622
10623 2002-01-23  Alan Modra  <amodra@bigpond.net.au>
10624
10625         * elf64-ppc.c: Remove stale part of ABI comment.
10626         (NO_OPD_RELOCS): Define.
10627         (ppc64_elf_check_relocs): Use it.
10628         (ppc64_elf_relocate_section): Here too.
10629         (build_one_stub): Don't point function syms at the stub.  Instead,
10630         hijack plt.offset.
10631         (ppc64_elf_relocate_section): Check whether REL24 relocs should
10632         really go to the stub.  Make all dynamic relocs in opd against
10633         locals.
10634         (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10635         plt.offset.
10636
10637 2002-01-22  Richard Henderson  <rth@redhat.com>
10638
10639         * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10640
10641 2002-01-22  Alan Modra  <amodra@bigpond.net.au>
10642
10643         * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10644         TOC_BASE_OFF adjustment.
10645
10646         * Makefile.am: Run "make dep-am".
10647         * Makefile.in: Regenerate.
10648         * po/SRC-POTFILES.in: Regenerate.
10649
10650 2002-01-22  John David Anglin  <dave@hiauly1.hia.nrc.ca>
10651
10652         * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10653         host defines.
10654
10655 2002-01-21  Hans-Peter Nilsson  <hp@axis.com>
10656
10657         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10658         Check for and emit error if sgot is NULL at this point.
10659
10660 2002-01-21  Jason Thorpe  <thorpej@wasabisystems.com>
10661
10662         * config.bfd (ia64*-*-netbsd*): New target.
10663
10664 2002-01-21  Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10665
10666         * som.c (som_write_space_strings): Comment typo fix.
10667
10668 2002-01-21  Alan Modra  <amodra@bigpond.net.au>
10669
10670         * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10671         is_func_descriptor fields.
10672         (link_hash_newfunc): Init them.
10673         (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10674         dot are candidates for plt entries.  When processing .opd relocs,
10675         set function descriptor strings to point inside function code
10676         string, and set new ppc_link_hash_entry fields.
10677         (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10678         (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10679         function descriptors.  It's now done in..
10680         (func_desc_adjust): New.
10681         (ppc64_elf_func_desc_adjust): New.
10682         (define elf_backend_always_size_sections): Define.
10683         (ppc64_elf_hide_symbol): New.
10684         (define elf_backend_hide_symbol): Define.
10685         (allocate_dynrelocs): Remove code looking up function descriptors
10686         as that has been done earlier.
10687         (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10688         table.
10689         (ppc64_elf_finish_dynamic_symbol): Likewise.  Remove code looking
10690         up function descriptor.
10691         (build_one_stub): Look up the function code sym.  Check for
10692         invalid plt offsets.
10693         (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10694         Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10695
10696         * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10697         boolean param.
10698         (_bfd_elf_link_hash_hide_symbol): Likewise.
10699         * elflink.h (elf_link_add_object_symbols): Adjust call to
10700         elf_backend_hide_symbol.
10701         (elf_fix_symbol_flags): Likewise.
10702         (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10703         than bfd_alloc.
10704         * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10705         Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10706         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10707         (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10708         * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10709         and adjust to suit.
10710         * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10711         _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10712         * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10713
10714 2002-01-18  Alan Modra  <amodra@bigpond.net.au>
10715
10716         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10717         dynamic function descriptor symbol, not the associated function
10718         symbol.
10719
10720 2002-01-17  Eric Christopher  <echristo@redhat.com>
10721
10722         * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10723
10724 2002-01-17  Nick Clifton  <nickc@cambridge.redhat.com>
10725
10726         * po/bfd.pot: Regenerate.
10727         * po/fr.po: Regenerate.
10728
10729 2002-01-17  Alan Modra  <amodra@bigpond.net.au>
10730
10731         * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10732         Remove "Elf_Internal_Shdr *" param.
10733         (_bfd_mips_elf_section_from_bfd_section): Ditto.
10734         * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10735         * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10736         * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10737         * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10738         * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10739         * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10740         function to override special sections.  Remove hdr arg from
10741         backend call, and don't loop.
10742
10743 2002-01-16  Eric Christopher  <echristo@redhat.com>
10744
10745         * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10746         on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10747         relocations requiring gp0 and gp.
10748
10749 2002-01-16  Richard Earnshaw  <rearnsha@arm.com>
10750
10751         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
10752         EF_ARM_VFP_FLOAT.
10753         (elf32_arm_print_private_bfd_data): Likewise.
10754
10755 2002-01-16  Nick Clifton  <nickc@cambridge.redhat.com>
10756
10757         * po/tr.po: Import new version.
10758
10759 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
10760
10761         * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10762         (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10763         (ORI_R0_R0_0): Correct.
10764
10765 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
10766
10767         * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10768         when plt_not_loaded.
10769         * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10770         clear .plt SEC_CODE here.  Create .stub and correct .glink flags.
10771         (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10772         (ppc64_elf_glink_code): Delete.
10773         (PPC64_ELF_GLINK_SIZE): Delete.
10774         (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10775         BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10776         ORI_R0_R0_0): Define.
10777         (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10778         (struct ppc_link_hash_table): Add sstub and plt_overflow.
10779         (ppc64_elf_link_hash_table_create): Init them.
10780         (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10781         Don't copy to shared lib.
10782         (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10783         (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10784         (allocate_dynrelocs <plt>): Don't change function sym here.  Make
10785         room for .stub and .glink code.
10786         (ppc64_elf_size_dynamic_sections): Handle .stub.  Make entry for
10787         DT_PPC64_GLINK.
10788         (ppc64_elf_final_link): Rename to ppc64_elf_set_toc.  Don't call
10789         bfd_elf64_bfd_final_link.
10790         (bfd_elf64_bfd_final_link): Don't define.
10791         (ppc64_elf_size_stubs): New.
10792         (build_plt_stub): New.
10793         (build_one_stub): New.
10794         (ppc64_elf_build_stubs): New.
10795         (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10796         (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10797         (ppc64_elf_finish_dynamic_symbol): Don't build stubs here.  Set
10798         DT_PPC64_GLINK entry.  Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10799         case output sections not separate.  Adjust DT_RELASZ to not
10800         include plt relocs.  Set reserved got entry.  Set got and plt
10801         entry size.
10802         (elf_backend_got_header_size): Set to 8.
10803         * elf64-ppc.h: New file.
10804
10805 2002-01-16  Alan Modra  <amodra@bigpond.net.au>
10806
10807         * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10808         sections, use bfd_section_list_remove.
10809         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10810         * elflink.h (elf_link_add_object_symbols): When removing all
10811         sections, use bfd_section_list_clear.
10812
10813 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
10814
10815         * po/sv.po: New file: Swedish translation.
10816         * configure.in (ALL_LINGUAS): Add sv.
10817         * configure: Regenerate.
10818
10819 2002-01-15  Jakub Jelinek  <jakub@redhat.com>
10820
10821         * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10822         * elf.c (merge_sections_remove_hook): New function.
10823         (_bfd_elf_merge_sections): Pass it as 3rd argument to
10824         _bfd_merge_sections.
10825         * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10826         * libbfd.h: Rebuilt.
10827         * merge.c (_bfd_merge_sections): Add remove_hook argument.
10828         Call remove_hook if a SEC_EXCLUDE section is encountered.
10829
10830 2002-01-15  Nick Clifton  <nickc@cambridge.redhat.com>
10831
10832         * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10833         (xstormy16_reloc_map): Initialise new field with correct howto
10834         table.
10835         (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10836         howto entry.
10837
10838 2002-01-10  Michael Snyder  <msnyder@redhat.com>
10839
10840         * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10841         (elfcore_write_pstatus): Use long instead of pid_t;
10842         * elf-bfd.h: Change prototypes to use long instead of pid_t;
10843
10844 2002-01-09  Jason Thorpe  <thorpej@wasabisystems.com>
10845
10846         * elf.c: Update copyright years.
10847         (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10848         and NT_NETBSDCORE_FIRSTMACH.  Improve a comment.
10849
10850 2002-01-08  Michael Snyder  <msnyder@redhat.com>
10851
10852         Add capability to write corefile note sections, for gdb.
10853         * elf.c (elfcore_write_note): New function.
10854         (elfcore_write_prpsinfo): New function.
10855         (elfcore_write_prstatus): New function.
10856         (elfcore_write_pstatus): New function.
10857         (elfcore_write_prfpreg): New function.
10858         (elfcore_write_prxfpreg): New function.
10859         * elf-bfd.h: Add prototypes for above functions.
10860
10861 2002-01-08  Alexandre Oliva  <aoliva@redhat.com>
10862
10863         * elf.c (elf_fake_sections): Propagate errors from
10864         elf_backend_fake_section.
10865
10866 2002-01-07  Jason Thorpe  <thorpej@wasabisystems.com>
10867
10868         * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10869         (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10870         (elf32-sh-nbsd.lo): New rule.
10871         * Makefile.in: Regenerate.
10872         * config.bfd (sh*le-*-netbsdelf*): New target.
10873         (sh*-*-netbsdelf*): New target.
10874         * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10875         (bfd_elf32_shnbsd_vec): New vector.
10876         (bfd_elf32_shlnbsd_vec): New vector.
10877         * configure: Regenerate.
10878         * elf32-sh-nbsd.c: New file.
10879         * targets.c: Update copyright years.
10880         (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
10881         bfd_elf32_shnbsd_vec.
10882
10883 2002-01-07  Aldy Hernandez  <aldyh@redhat.com>
10884
10885         * coff-rs6000.c (READ20): Use bfd_scan_vma.
10886
10887 2002-01-07  Geoffrey Keating  <geoffk@redhat.com>
10888
10889         * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10890         of a symbol in a section that will be deleted.
10891
10892 2002-01-07  Nick Clifton  <nickc@cambridge.redhat.com>
10893
10894         * po/es.po: New file: Spanish translation.
10895         * configure.in (ALL_LINGUAS): Add es.
10896         * configure: Regenerate.
10897
10898 2002-01-06  Steve Ellcey  <sje@cup.hp.com>
10899
10900         * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10901         argument so we can handle HP-UX specially.
10902         (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10903         (elfNN_hpux_backend_section_from_bfd_section): New for support
10904         of SHN_IA_64_ANSI_COMMON.
10905         (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10906         (is_unwind_section_name): Add special HP-UX support.
10907         (elfNN_ia64_section_from_shdr): Add support for more sections.
10908         (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10909         add support for more sections.
10910         (elfNN_ia64_additional_program_headers): Modify
10911         is_unwind_section_name call.
10912         (elfNN_ia64_modify_segment_map): Remove assumption that there is
10913         only one unwind section in segment.
10914
10915 2002-01-06  Alan Modra  <amodra@bigpond.net.au>
10916
10917         * syms.c (_bfd_generic_make_empty_symbol): New function.
10918         * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10919         _bfd_generic_make_empty_symbol.
10920         * libbfd.h: Regenerate.
10921         * bfd-in2.h: Regenerate.
10922         * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10923         (hppabsd_core_get_symtab_upper_bound): Don't define.
10924         (hppabsd_core_get_symtab): Likewise.
10925         (hppabsd_core_print_symbol): Likewise.
10926         (hppabsd_core_get_symbol_info): Likewise.
10927         (hppabsd_core_bfd_is_local_label_name): Likewise.
10928         (hppabsd_core_get_lineno): Likewise.
10929         (hppabsd_core_find_nearest_line): Likewise.
10930         (hppabsd_core_bfd_make_debug_symbol): Likewise.
10931         (hppabsd_core_read_minisymbols): Likewise.
10932         (hppabsd_core_minisymbol_to_symbol): Likewise.
10933         (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10934         Formatting fixes.
10935         * hpux-core.c: Similarly.
10936         * irix-core.c: Similarly.
10937         * osf-core.c: Similarly.
10938         * sco5-core.c: Similarly.
10939         * binary.c (binary_make_empty_symbol): Remove function, define as
10940         _bfd_generic_make_empty_symbol.
10941         * ihex.c (ihex_make_empty_symbol): Likewise.
10942         * mmo.c (mmo_make_empty_symbol): Likewise.
10943         * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10944         * srec.c (srec_make_empty_symbol): Likewise.
10945         * versados.c (versados_make_empty_symbol): Likewise.
10946         * vms.c (_bfd_vms_make_empty_symbol): Remove.
10947         (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10948         * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10949         rather than _bfd_vms_make_empty_symbol.
10950         * vms-misc.c (new_symbol): Likewise.
10951
10952 2002-01-05  Alan Modra  <amodra@bigpond.net.au>
10953
10954         * section.c (bfd_section_init): Remove unnecessary initialisations.
10955         (bfd_section_list_clear): New function.
10956         (bfd_section_list_remove, bfd_section_list_insert): New macros.
10957         (_bfd_strip_section_from_output): Use them.
10958         * coffcode.h (coff_set_alignment_hook): Likewise.
10959         * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
10960         * elf64-mips.c (mips_elf64_final_link): Likewise.
10961         * elf64-mmix.c (mmix_elf_final_link): Likewise.
10962         * sunos.c (sunos_add_dynamic_symbols): Likewise.
10963         * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
10964         * bfd-in2.h: Regenerate.
10965
10966         * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
10967         rather than doing our own section handling.  Clean up after errors
10968         with bfd_release and bfd_section_list_clear.  Handle unexpected
10969         flags.
10970         * aoutf1.h (sunos4_core_file_p): Likewise.
10971         * aix386-core.c (aix386_core_file_p): Likewise.
10972         * cisco-core.c (cisco_core_file_validate): Likewise.
10973         * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
10974         * trad-core.c (trad_unix_core_file_p): Likewise.
10975
10976         * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
10977         with bfd_release and bfd_section_list_clear.
10978         * hpux-core.c (hpux_core_core_file_p): Likewise.
10979         * irix-core.c (irix_core_core_file_p): Likewise.
10980         * lynx-core.c (lynx_core_file_p): Likewise.
10981         * osf-core.c (osf_core_core_file_p): Likewise.
10982         * rs6000-core.c (rs6000coff_core_p): Likewise.
10983         * sco5-core.c (sco5_core_file_p): Likewise.
10984
10985         * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
10986         sign extension adjustments without conditionals.
10987
10988 2002-01-04  Jakub Jelinek  <jakub@redhat.com>
10989
10990         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
10991         CIE at .eh_frame start is removed due to no FDEs referencing it.
10992
10993 2002-01-04  Jason Thorpe  <thorpej@wasabisystems.com>
10994
10995         * config.bfd (x86_64-*-netbsd*): New target.
10996         * configure.in (x86_64-*-netbsd*): Set COREFILE
10997         to netbsd-core.lo.
10998         * configure: Regenerated.
10999
11000 2002-01-03  Tom Rix  <trix@redhat.com>
11001
11002         * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11003         for recent bfd_make_section_anyway change.
11004
11005 2002-01-03  Nick Clifton  <nickc@cambridge.redhat.com>
11006
11007         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11008         R_ARM_THM_PC11 reloc.
11009
11010 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
11011
11012         * configure.in (LINGUAS): Add ja.
11013         * configure: Regenerate.
11014         * po/ja.po: Import from translation project's web site.
11015
11016 2002-01-02  Nick Clifton  <nickc@cambridge.redhat.com>
11017
11018         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11019         messages to ease translation into other languages.
11020
11021 For older changes see ChangeLog-0001
11022 \f
11023 Local Variables:
11024 mode: change-log
11025 left-margin: 8
11026 fill-column: 74
11027 version-control: never
11028 End: