2005-04-27 H.J. Lu <hongjiu.lu@intel.com>
[external/binutils.git] / bfd / ChangeLog
1 2005-04-27  H.J. Lu  <hongjiu.lu@intel.com>
2
3         * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
4
5         * elf.c (bfd_elf_sym_name): Updated.
6         (group_signature): Likewise.
7         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8         * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
9         (ppc64_elf_edit_toc): Likewise.
10         (ppc64_elf_relocate_section): Likewise.
11         * elfcode.h (elf_slurp_symbol_table): Likewise.
12         * elflink.c (elf_link_input_bfd): Likewise.
13
14         * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
15         bfd_elf_sym_name to get local symbol name when reporting errors.
16
17 2005-04-27  Nick Clifton  <nickc@redhat.com>
18
19         * elflink.c (elf_link_input_bfd): Handle the case where a badly
20         formatted input file results in a reloc which has no associated
21         global symbol.
22
23 2005-04-26  Jerome Guitton  <guitton@gnat.com>
24
25         * bfd.m4 (BFD_NEED_DECLARATION): Restore.
26
27 2005-04-25  David S. Miller  <davem@davemloft.net>
28
29         * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
30         (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
31         sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
32         Likewise.
33
34 2005-04-25  H.J. Lu  <hongjiu.lu@intel.com>
35
36         PR 858
37         * elflink.c (elf_link_input_bfd): Make non-debugging reference
38         to discarded section an error.
39
40 2005-04-21  Jerome Guitton  <guitton@gnat.com>
41
42         * configure.in: Replace BFD_NEED_DECLARATION checks by the
43         corresponding AC_CHECK_DECLS.
44         * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
45         HAVE_DECL_*.
46         * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
47         * configure: Regenerate.
48         * config.in: Ditto.
49
50 2005-04-21  Andreas Schwab  <schwab@suse.de>
51
52         * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
53         unsigned from type of dynamic_interpreter.
54         * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
55         casts again.
56
57         * elf.c (assign_section_numbers): Fix comment.
58
59 2005-04-21  Jerome Guitton  <guitton@gnat.com>
60
61         * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
62         for struct som_exec_auxhdr fields.
63
64 2005-04-21  Nick Clifton  <nickc@redhat.com>
65
66         * aout-adobe.c: Convert to ISO C and fix formatting.
67         * aout-arm.c: Convert to ISO C and fix formatting.
68         * aout-cris.c: Convert to ISO C and fix formatting.
69         * aout-ns32k.c: Convert to ISO C and fix formatting.
70         * aout-tic30.c: Convert to ISO C and fix formatting.
71         * coffcode.h: Convert to ISO C and fix formatting.
72         * coffswap.h: Convert to ISO C and fix formatting.
73         * i386aout.c: Convert to ISO C and fix formatting.
74         * libaout.h: Convert to ISO C and fix formatting.
75         * libcoff-in.h: Convert to ISO C and fix formatting.
76         * libcoff.h: Convert to ISO C and fix formatting.
77         * libecoff.h: Convert to ISO C and fix formatting.
78         * libnlm.h: Convert to ISO C and fix formatting.
79         * libpei.h: Convert to ISO C and fix formatting.
80         * libxcoff.h: Convert to ISO C and fix formatting.
81         * nlm-target.h: Convert to ISO C and fix formatting.
82         * nlm.c: Convert to ISO C and fix formatting.
83         * nlm32-alpha.c: Convert to ISO C and fix formatting.
84         * nlm32-i386.c: Convert to ISO C and fix formatting.
85         * nlm32-ppc.c: Convert to ISO C and fix formatting.
86         * nlm32-sparc.c: Convert to ISO C and fix formatting.
87         * nlmcode.h: Convert to ISO C and fix formatting.
88         * nlmswap.h: Convert to ISO C and fix formatting.
89         * pe-mips.c: Convert to ISO C and fix formatting.
90         * peXXigen.c: Convert to ISO C and fix formatting.
91         * peicode.h: Convert to ISO C and fix formatting.
92         * vms-gsd.c: Convert to ISO C and fix formatting.
93         * vms-hdr.c: Convert to ISO C and fix formatting.
94         * vms-misc.c: Convert to ISO C and fix formatting.
95         * vms-tir.c: Convert to ISO C and fix formatting.
96         * vms.c: Convert to ISO C and fix formatting.
97         * vms.h: Convert to ISO C and fix formatting.
98
99         * coffgen.c (coff_print_symbol): Restore correct formatting of
100         output.
101
102 2005-04-20  David S. Miller  <davem@davemloft.net>
103
104         * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
105         (_bfd_sparc_elf_link_hash_table_create): Likewise.
106         (allocate_dynrelocs): Likewise.
107
108 2005-04-20  Jerome Guitton  <guitton@gnat.com>
109
110         * configure.in: Fix the check for basename declaration. Add check
111         for declarations of ftello, ftello64, fseeko, fseeko64.
112         * configure: Regenerate.
113         * config.in: Ditto.
114         * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
115
116 2005-04-19  David S. Miller  <davem@davemloft.net>
117
118         * elfxx-sparc.c: New file.
119         * elfxx-sparc.h: New file.
120         * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
121         (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
122         (elfxx-sparc.lo): New rule.
123         (elf32-sparc.lo): Add elfxx-sparc.h dependency.
124         (elf64-sparc.lo): Likewise.
125         * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
126         (bfd_elf64_sparc_vec): Likewise.
127         * configure: Regenerate.
128         * elf32-sparc.c: Remove common code now in elfxx-sparc.c
129         * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
130         which is more consistent with elf32-sparc.c
131
132 2005-04-19  Daniel Jacobowitz  <dan@codesourcery.com>
133
134         * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
135         (mips_elf_create_local_got_entry): Check h->root.forced_local.
136
137 2005-04-19  Alan Modra  <amodra@bigpond.net.au>
138
139         * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
140         dynamic relocs in non-SEC_ALLOC sections.
141         (ppc_elf_gc_sweep_hook): Likewise.
142         (ppc_elf_relax_section): Likewise.
143         (ppc_elf_relocate_section): Likewise.
144
145 2005-04-18  Nick Clifton  <nickc@redhat.com>
146
147         * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
148         assigning a value to return_value.
149
150 2005-04-17  H.J. Lu  <hongjiu.lu@intel.com>
151
152         PR 855
153         * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
154         created group data.
155
156 2005-04-17  H.J. Lu  <hongjiu.lu@intel.com>
157
158         PR 855
159         * elf.c (setup_group): Properly handle zero group count.
160
161 2005-04-17  Mark Kettenis  <kettenis@gnu.org>
162
163         * som.c (hppa_som_reloc, som_mkobject, som_is_space)
164         (som_is_subspace, compare_subspaces, som_compute_checksum)
165         (som_build_and_write_symbol_table, som_slurp_symbol_table): New
166         protoypes.
167         (hppa_som_reloc, compare_syms, compare_subspaces)
168         (som_print_symbol, som_get_section_contents)
169         (som_set_section_contents): Remove space after 'void *'.
170         (som_bfd_print_private_bfd_data): Use %lx to print longs.
171         (som_bfd_merge_private_bfd_data)
172         (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
173         defines.
174
175 2004-04-15  Julian Brown  <julian@codesourcery.com>
176
177         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
178         * bfd-in2.h: Regenerate.
179         * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
180         (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
181         (bfd_elf32_arm_set_target_relocs): Handle use_blx.
182         (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
183         relocations if requested to.
184         (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
185         use_blx rather than symbian_p.
186         (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
187         use_blx is in effect.
188         (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
189         for SymbianOS.
190
191 2005-04-15  Nick Clifton  <nickc@redhat.com>
192
193         * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
194         values.
195
196 2005-04-15  Alan Modra  <amodra@bigpond.net.au>
197
198         PR ld/815
199         * elflink.c (elf_smash_syms): Clear undef.next if it's not being
200         used as a list pointer.
201
202 2005-04-14  Alan Modra  <amodra@bigpond.net.au>
203
204         * Makefile.am (NO_WERROR): Define.
205         * warning.m4: New file
206         * acinclude.m4: Include warning.m4.
207         * configure.in: Invoke AM_BINUTILS_WARNINGS.
208         * Makefile.in: Regenerate.
209         * configure: Regenerate.
210
211 2005-04-14  Alan Modra  <amodra@bigpond.net.au>
212
213         * merge.c (sec_merge_emit): Tidy.  Check for bfd_zmalloc errors.
214         Write trailing padding.
215
216         * merge.c (merge_strings): Round up section size for alignment.
217
218 2005-04-14  David S. Miller  <davem@davemloft.net>
219
220         Add TLS support for 64-bit Sparc ELF.
221         *  elf64-sparc.c (sparc64_elf_dyn_relocs,
222         sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
223         (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
224         sparc64_elf_hash_entry, sparc64_elf_tdata,
225         sparc64_elf_local_got_tls_type): New defines.
226         (sparc64_elf_mkobject): New function.
227         (sparc64_elf_link_hash_table): Add members for dynamic linker
228         sections PLT, RELPLT, DYNBSS, and RELBSS.  Add tls_ldm_got
229         uion to track TLS GOT references.  Add sym_sec to cache
230         mappings from local sym to section.
231         (link_hash_newfunc): New function.
232         (sparc64_elf_bfd_link_hash_table_create): Rename to
233         sparc64_elf_link_hash_table_create for consistency.
234         Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
235         (sparc64_elf_create_dynamic_sections): Initialize new section
236         members of sparc64_elf_link_hash_table.  Only init srelbss
237         if not-shared.
238         (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
239         New functions.
240         (SPARC_NOP): Define.
241         (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
242         sparc64_elf_plt_ptr_offset): Delete.
243         (sparc64_plt_entry_build): New function to build PLT entries
244         gradually instread of all at once at the end of linking.
245         (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
246         local vars.  Get them from sparc64_elf_hash_table instead.
247         Check early on if r_symndx is in bounds.  Handle TLS transitions.
248         Account for TLS GOT references and DF_STATIC_TLS, as needed.
249         For TLS relocs, record the tls_type in either
250         sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
251         appropriate.  For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
252         to the __tls_get_addr symbol.  For PLT relocs, track references
253         via h->plt.refcount.  When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
254         PC_LM22} and h not-NULL, set h->non_got_ref.  For global data
255         symbol references, count the number of relocations needed for
256         that symbol.  For default switch case, don't error, this lets
257         the TLS relocs not explicitly handled by this function get
258         accepted.
259         (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
260         (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
261         it from sparc64_elf_hash_table.  Store the real PLT offset
262         in h->plt.offset, and build PLT entries one at a time.  Also
263         get .dynbss section pointer from htab.
264         (allocate_dynrelocs, readonly_dynrelocs,
265         sparc64_omit_section_dynsym): New functions.
266         (sparc64_elf_omit_section_dynsym): Use these new functions as
267         helpers.
268         (dtpoff_base, tpoff): New functions.
269         (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
270         locals, get them from sparc64_elf_hash_table.  Handle TLS
271         relocations and refcounting in main relocation loop.
272         (sparc64_elf_finish_dynamic_symbol): Use
273         sparc64_elf_link_hash_table.  Build PLT entries as we see
274         them.  Handle TLS GOT relocations.
275         (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
276         from sparc64_elf_hash_table.  Initialize only PLT header
277         not all entries since we not build PLT entries one by one.
278         (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
279         elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
280         elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
281
282 2005-04-13  Daniel Jacobowitz  <dan@codesourcery.com>
283
284         * elflink.c (elf_link_input_bfd): Update check for removed
285         sections.
286
287 2005-04-12  Alan Modra  <amodra@bigpond.net.au>
288
289         * Makefile.am: Run "make dep-am".
290         * Makefile.in: Regenerate.
291         * aclocal.m4: Regenerate.
292         * libcoff.h: Regenerate.
293
294 2005-04-11  H.J. Lu  <hongjiu.lu@intel.com>
295
296         * linker.c (_bfd_generic_link_output_symbols): Also check if
297         the output section of an input section has been removed from
298         the output file.
299
300         * section.c (bfd_section_list_remove): Clear the next field
301         of the removed section.
302         (bfd_section_removed_from_list): New.
303         * bfd-in2.h: Regenerated.
304
305 2005-04-11  David S. Miller  <davem@davemloft.net>
306
307         * elf32-sparc.c (elf32_sparc_relocate_section,
308         R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
309         R_SPARC_TLS_LE_{HIX22,LOX10}.
310         (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
311         xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
312         (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
313         or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
314
315 2005-04-11  H.J. Lu  <hongjiu.lu@intel.com>
316
317         * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
318
319 2005-04-11  Nick Clifton  <nickc@redhat.com>
320         
321         * aout-target.h:  Convert to ISO C.
322         * aoutf1.h:  Convert to ISO C.
323         * aoutx.h:  Convert to ISO C.
324         * bout.c:  Convert to ISO C.
325         * dwarf1.c:  Convert to ISO C.
326         * ecoffswap.h:  Convert to ISO C.
327         * freebsd.h:  Convert to ISO C.
328         * genlink.h:  Convert to ISO C.
329         * ieee.c:  Convert to ISO C.
330         * ihex.c:  Convert to ISO C.
331         * libcoff-in.h:  Convert to ISO C.
332         * mach-o.c:  Convert to ISO C.
333         * mach-o.h:  Convert to ISO C.
334         * netbsd.h:  Convert to ISO C.
335         * ns32k.h:  Convert to ISO C.
336         * ns32knetbsd.c:  Convert to ISO C.
337         * oasys.c:  Convert to ISO C.
338         * pdp11.c:  Convert to ISO C.
339         * pef-traceback.h:  Convert to ISO C.
340         * pef.c:  Convert to ISO C.
341         * pef.h:  Convert to ISO C.
342         * riscix.c:  Convert to ISO C.
343         * som.c:  Convert to ISO C.
344         * som.h:  Convert to ISO C.
345         * srec.c:  Convert to ISO C.
346         * stabs.c:  Convert to ISO C.
347         * sunos.c:  Convert to ISO C.
348         * tekhex.c:  Convert to ISO C.
349         * versados.c:  Convert to ISO C.
350         * version.h:  Convert to ISO C.
351         * xcoff-target.h:  Convert to ISO C.
352         * xcofflink.c:  Convert to ISO C.
353         * xsym.c:  Convert to ISO C.
354         * xsym.h:  Convert to ISO C.
355
356 2005-04-08  Paul Brook  <paul@codesourcery.com>
357
358         * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
359         (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
360         (ARM2THUMB_PIC_GLUE_SIZE): Define.
361         (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
362         (elf32_arm_to_thumb_stub): Create PIC stubs.
363         (record_arm_to_thumb_glue): Use different stub size for relocatable
364         images.
365
366 2005-04-05  Alan Modra  <amodra@bigpond.net.au>
367
368         * elf64-ppc.c (dec_dynrel_count): New function split out from
369         ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
370         (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
371         (ppc64_elf_tls_optimize): Likewise.
372
373 2005-04-05  Mark Kettenis  <kettenis@gnu.org>
374
375         * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
376         CORE_WCOOKIE_OFFSET.
377         (SPARC64_WCOOKIE_OFFSET): New.
378         (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
379
380 2005-04-05  Nick Clifton  <nickc@redhat.com>
381
382         * po/rw.po: New translation: Kinyarwanda
383         * configure.in (ALL_LINGUAS): Add rw
384         * configure: Regenerate.
385
386 2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
387
388         * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
389         (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
390         SHT_MIPS_OPTIONS names.  Allow all sections with unrecognised
391         section flags.
392         (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
393         to check for SHT_MIPS_OPTIONS sections.
394         (_bfd_mips_elf_set_section_contents): Likewise.
395
396 2005-04-04  Eric Christopher  <echristo@redhat.com>
397
398         * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
399         Clean up gp handling code.
400
401 2005-04-04  H.J. Lu  <hongjiu.lu@intel.com>
402
403         * elf.c (bfd_elf_set_group_contents): Ignore linker created
404         group section. 
405         (assign_section_numbers): Accept link_info. Check SHT_GROUP
406         sections for relocatable files only. Remove the linker created
407         group sections.
408         (_bfd_elf_compute_section_file_positions): Pass link_info to
409         assign_section_numbers.
410
411         * elfxx-ia64.c (elfNN_ia64_object_p): New.
412         (elf_backend_object_p): Defined.
413
414 2005-04-04  H.J. Lu  <hongjiu.lu@intel.com>
415
416         * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
417
418 2005-04-03  Fred Fish  <fnf@specifixinc.com>
419
420         * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
421         dwarf_ranges_size members.
422         (struct comp_unit): Add base_address member.
423         (struct funcinfo): Replace low/high members with an arange.
424         (arange_add): Replace incoming "unit" parameter with "abfd" and
425         "first_arange" pointers.  Reorganize/rewrite function body.
426         (decode_line_info): Change arange_add call to pass bfd and arange
427         pointers.
428         (lookup_address_in_line_info_table): Use arange list instead of
429         individual low/high members.  Walk function's arange list to find
430         lowest PC in list, to test for overlapping functions.
431         (read_debug_ranges): New function, reads the debug_ranges section.
432         (lookup_address_in_function_table): Use arange list instead of
433         individual low/high members.  Rewrite to find smallest range that
434         matches.
435         (read_rangelist): Read a given rangelist from debug_ranges.
436         (scan_unit_for_functions): Use arange list instead of individual
437         low/high members.  Handle a DW_AT_ranges attribute.
438         (parse_comp_unit): Use arange list instead of individual low/high
439         members.  Save comp unit base address.  Handle a DW_AT_ranges
440         attribute.
441
442 2005-04-01  H.J. Lu  <hongjiu.lu@intel.com>
443
444         * elf.c (assign_section_numbers): Really use the kept section.
445
446 2005-03-31  H.J. Lu  <hongjiu.lu@intel.com>
447
448         * elf-bfd.h (_bfd_elf_check_kept_section): New.
449
450         * elf.c (assign_section_numbers): When sh_link points to a
451         discarded section, call _bfd_elf_check_kept_section to see if
452         the kept section can be used. Otherwise reject sh_link
453         pointing to discarded section.
454
455         * elflink.c (_bfd_elf_check_kept_section): New.
456         (elf_link_input_bfd): Use it.
457
458 2005-04-01  Alan Modra  <amodra@bigpond.net.au>
459
460         * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
461         that we no longer need.
462
463 2005-04-01  Alan Modra  <amodra@bigpond.net.au>
464
465         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
466         rather than 0.
467         (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
468
469 2005-03-31  H.J. Lu  <hongjiu.lu@intel.com>
470
471         * elf.c (assign_section_numbers): Fix a typo.
472
473 2005-03-31  H.J. Lu  <hongjiu.lu@intel.com>
474
475         * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
476         error message.
477         (_bfd_elf_section_already_linked): Likewise.
478
479 2005-03-31  Jerome Guitton  <guitton@gnat.com>
480
481         * config.in: Regenerate.
482
483 2005-03-31  Jerome Guitton  <guitton@gnat.com>
484
485         * config.in (HAVE_DECL_BASENAME): New configure macro.
486         * configure.in: Check for basename.
487         * configure: Regenerate.
488
489 2005-03-30  Julian Brown  <julian@codesourcery.com>
490
491         * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
492         bfd_elf32_is_arm_mapping_symbol_name.
493         * bfd-in2.h: Regenerate.
494         * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
495         bfd_elf32_is_arm_mapping_symbol_name.
496         * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
497         bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
498         (arm_elf_find_function): Likewise.
499         (elf32_arm_output_symbol_hook): Likewise.
500
501 2005-03-30  Julian Brown  <julian@codesourcery.com>
502
503         * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
504         * bfd-in2.h: Regenerate.
505         * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
506         bfd_elf32_is_arm_mapping_symbol_name.
507         (elf32_arm_output_symbol_hook): Likewise.
508         (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
509         mapping symbols.
510         (is_arm_mapping_symbol_name): Function moved from here...
511         * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
512         and made global.
513
514 2005-03-29  Aaron W. LaFramboise  <aaron98wiridge9@aaronwl.com>
515
516         * configure.in: Check for ffs decl and alphabetize.
517         * config.in: Regenerate.
518         * configure: Regenerate.
519         * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and 
520         alphabetize.
521
522 2005-03-29  Fred Fish  <fnf@specifixinc.com>
523
524         * dwarf2.c (struct comp_unit): Fix typo.
525         (scan_unit_for_functions): Remove unused local variable "name"
526         and dead code that set it.
527
528 2005-03-29  Daniel Jacobowitz  <dan@codesourcery.com>
529             Phil Blundell  <philb@gnu.org>
530
531         * bfd-in2.h, libbfd.h: Regenerated.
532         * reloc.c: Add ARM TLS relocations.
533         * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
534         relocations.
535         (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
536         (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
537         (elf32_arm_tls_ie32_howto): New.
538         (elf32_arm_howto_from_type): Support TLS relocations.
539         (elf32_arm_reloc_map): Likewise.
540         (elf32_arm_reloc_type_lookup): Likewise.
541         (TCB_SIZE): Define.
542         (struct elf32_arm_obj_tdata): New.
543         (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
544         (elf32_arm_mkobject): New function.
545         (struct elf32_arm_relocs_copied): Add pc_count.
546         (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
547         (GOT_TLS_IE): Define.
548         (struct elf32_arm_link_hash_table): Add tls_ldm_got.
549         (elf32_arm_link_hash_newfunc): Initialize tls_type.
550         (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
551         (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
552         (dtpoff_base, tpoff): New functions.
553         (elf32_arm_final_link_relocate): Handle TLS relocations.
554         (IS_ARM_TLS_RELOC): Define.
555         (elf32_arm_relocate_section): Warn about TLS mismatches.
556         (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
557         (elf32_arm_check_relocs): Detect invalid symbol indexes.  Handle
558         TLS relocations and pc_count.
559         (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
560         (allocate_dynrelocs): Handle TLS.  Bind REL32 relocs to local
561         calls.
562         (elf32_arm_size_dynamic_sections): Handle TLS.
563         (elf32_arm_finish_dynamic_symbol): Likewise.
564         (bfd_elf32_mkobject): Define.
565
566 2005-03-29  Daniel Jacobowitz  <dan@codesourcery.com>
567
568         * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
569         relocation types.  Don't count relocations which will use a PLT.
570
571 2005-03-29  Joel Brobecker  <brobecker@gnat.com>
572
573         * elf.c (elfcore_grok_nto_status): Print tid as long.
574         (elfcore_grok_nto_regs): Likewise.
575
576 2005-03-29  Joel Brobecker  <brobecker@gnat.com>
577
578         * irix-core.c: Remove some unnecessary prototypes.
579
580 2005-03-28  Joel Brobecker  <brobecker@adacore.com>
581
582         * irix-core.c: Convert to ISO C.
583
584 2005-03-28  Joel Brobecker  <brobecker@adacore.com>
585
586         * irix-core.c (do_sections): Replace + by | in expression.
587         (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
588         to unused parameters to avoid a compiler warning.
589
590 2005-03-28  Mark Kettenis  <kettenis@gnu.org>
591
592         * netbsd-core.c: Convert to ISO C.  Fix formatting.
593
594 2005-03-24  Eric Christopher  <echristo@redhat.com>
595
596         * elfxx-mips.c: Revert previous patch.
597
598 2005-03-24  Nick Clifton  <nickc@redhat.com>
599
600         * targets.c (_bfd_target_vector): Only include the
601         bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
602         all targets enabled.
603
604 2005-03-24  James E Wilson  <wilson@specifixinc.com>
605
606         * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
607         (BFD64_BACKENDS): Add elf32-ia64.lo.
608         * Makefile.in: Regenerate.
609
610 2005-03-23  Eric Christopher  <echristo@redhat.com>
611
612         * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
613         (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
614         after emitting relocation.
615         (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
616         (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
617         and readonly_reloc.
618
619 2005-03-23  Mike Frysinger  <vapier@gentoo.org>
620             Nick Clifton  <nickc@redhat.com>
621
622         * config.bfd: Accept any C library to accompany a GNU Linux
623         implementation, not just the GNU C library.
624         * configure.in: Likewise.
625         * configure: Regenerate.
626
627 2005-03-22  H.J. Lu  <hongjiu.lu@intel.com>
628
629         * bfd-in.h (_bfd_elf_provide_symbol): New.
630         * bfd-in2.h: Regenerated.
631
632         * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
633         (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
634         of set_linker_sym.
635
636         * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
637         from elf32-ppc.c.
638
639 2005-03-22  Hans-Peter Nilsson  <hp@axis.com>
640
641         * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
642
643 2005-03-22  Bob Wilson  <bob.wilson@acm.org>
644
645         * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
646         xtensa_sysreg_lookup_name, xtensa_interface_lookup,
647         xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
648         (xtensa_opcode_decode): Rearrange code.
649
650 2005-03-22  Nick Clifton  <nickc@redhat.com>
651
652         * binary.c: Convert to ISO C90 formatting.
653         * coff-arm.c: Convert to ISO C90 formatting.
654         * coffgen.c: Convert to ISO C90 formatting.
655         * elf32-gen.c: Convert to ISO C90 formatting.
656         * elf64-gen.c: Convert to ISO C90 formatting.
657         * hash.c: Convert to ISO C90 formatting.
658         * ieee.c: Convert to ISO C90 formatting.
659
660 2005-03-22  Daniel Jacobowitz  <dan@codesourcery.com>
661
662         * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
663         unresolved symbols in R_ARM_NONE relocations.
664
665 2005-03-22  Daniel Jacobowitz  <dan@codesourcery.com>
666
667         * elf32-arm.c (elf32_arm_final_link_relocate): Add
668         UNRESOLVED_RELOC_P argument.  Set it appropriately.
669         (elf32_arm_relocate_section): Update call to
670         elf32_arm_final_link_relocate.  Don't clobber RELOCATION; use
671         unresolved_reloc instead.
672
673 2005-03-23  Alan Modra  <amodra@bigpond.net.au>
674
675         * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
676         .gnu.warning.* sections.
677
678 2005-03-22  Alan Modra  <amodra@bigpond.net.au>
679
680         * elf32-ppc.c (elf_linker_section_pointers_t): Remove
681         written_address_p.
682         (ppc_elf_create_linker_section): Don't try to reuse existing section.
683         (elf_create_pointer_linker_section): Delete info parm.  Don't make
684         h dynamic.  Don't set written_address_p.
685         (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
686         (bfd_put_ptr): Delete.
687         (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
688         Always write section contents.  Assert global sym is def_regular.
689         Use offset bottom bit as a written flag.
690         (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
691         calls.
692
693 2005-03-22  Alan Modra  <amodra@bigpond.net.au>
694
695         * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
696         (ppc_elf_set_sdata_syms): ..here.  Expand comment.  Set .sbss start
697         and end syms.
698
699 2005-03-21  Nick Clifton  <nickc@redhat.com>
700
701         * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
702         targets.
703         (t2a1_bx_pc_insn): Likewise.
704         (t2a2_noop_insn): Likewise.
705         (t2a3_b_insn): Likewise.
706         (t2a1_push_insn): Likewise.
707         (t2a2_ldr_insn): Likewise.
708         (t2a3_mov_insn): Likewise.
709         (t2a4_bx_insn): Likewise.
710         (t2a5_pop_insn): Likewise.
711         (t2a6_bx_insn): Likewise.
712         (coff_arm_relocate_section): Only declare the high_address
713         variable for non WINCE targets.
714
715 2005-03-22  Alan Modra  <amodra@bigpond.net.au>
716
717         * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
718         SEC_LINKER_CREATED.  Attach to dynobj.
719         (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
720
721 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
722
723         * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
724         sym_offset.  Add name, bss_name, sym_name, sym_val.
725         (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
726         Add sdata array of elf_linker_section_t.
727         (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
728         (enum elf_linker_section_enum): Delete.
729         (ppc_elf_create_linker_section): Rewrite.  Don't create syms here.
730         (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
731         the special sections are needed.  Adjust htab->sdata refs.
732         Ensure dynobj is set in sreloc code.
733         (ppc_elf_size_dynamic_sections): Strip sdata sections.
734         (ppc_elf_set_sdata_syms): New function.
735         (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
736         (ppc_elf_relocate_section): Adjust references to htab->sdata.  Use
737         sym_val instead of sym_hash.
738         * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
739
740 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
741
742         * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
743         (ppc_elf_merge_private_bfd_data): Likewise.
744
745 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
746
747         * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
748         (ppc_elf_create_linker_section): Don't create rel_section.
749         (elf_create_pointer_linker_section): Don't size relocs.
750         (elf_finish_pointer_linker_section): Remove relative_reloc parm.
751         Don't generate relocs.
752         (ppc_elf_relocate_section): Adjust calls to
753         elf_finish_pointer_linker_section.
754
755 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
756
757         * elf32-ppc.c (is_ppc_elf_target): New function.
758         (ppc_elf_merge_private_bfd_data): Use it rather than just testing
759         for bfd_target_elf_flavour.  Do this test before endian check.
760         (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
761         (ppc_elf_size_dynamic_sections): Likewise.
762
763 2005-03-20  H.J. Lu  <hongjiu.lu@intel.com>
764
765         * elf-bfd.h (elf_backend_data): Add int to
766         elf_backend_section_from_shdr.
767         (bfd_elf_section_data): Update comment for this_idx.
768         (_bfd_elf_make_section_from_shdr): Add int.
769         * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
770
771         * elf.c (_bfd_elf_make_section_from_shdr): Take section index
772         and use it to set this_idx in bfd_elf_section_data.
773         (bfd_section_from_shdr): Pass shindex to
774         _bfd_elf_make_section_from_shdr.
775         (_bfd_elf_section_from_bfd_section): Use this_idx in
776         bfd_elf_section_data to find section index.
777
778         * elf32-arm.c (elf32_arm_section_from_shdr): Take section
779         index and pass it to _bfd_elf_make_section_from_shdr.
780         * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
781         * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
782         * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
783         * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
784         * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
785         * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
786         * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
787         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
788         * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
789
790 2005-03-19  Danny Smith <dannysmith@users.sourceforge.net>
791             Ross Ridge  <rridge@csclub.uwaterloo.ca>
792
793         * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
794         character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
795         cases.  Add comment.
796
797 2005-03-18  H.J. Lu  <hongjiu.lu@intel.com>
798
799         * elflink.c (elf_mark_used_section): Remove check for special
800         sections.
801
802 2005-03-18  Andreas Schwab  <schwab@suse.de>
803
804         * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
805         from bfd_vma to ia64_insn, remove broken cast.
806
807 2005-03-18  C Jaiprakash  <cjaiprakash@noida.hcltech.com>
808
809         * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
810         (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
811          elf_m68k_finish_dynamic_sections): Use it.
812
813 2005-03-17  Paul Brook <paul@codesourcery.com>
814             Dan Jacobowitz <dan@codesourcery.com>
815             Mark Mitchell  <mark@codesourcery.com>
816
817         * elf32-arm.c (elf32_arm_modify_segment_map): New function.
818         (elf32_arm_additional_program_headers): Likewise.
819         (elf_backend_modify_segment_map): Define.
820         (elf_backend_additional_program_headers): Likewise.
821         (elf32_arm_symbian_modify_segment_map): Use
822         elf32_arm_modify_segment_map.
823
824 2005-03-18  H.J. Lu  <hongjiu.lu@intel.com>
825
826         * elflink.c (elf_mark_used_section): Check bfd_is_const_section
827         for special sections.
828
829 2005-03-18  Alan Modra  <amodra@bigpond.net.au>
830
831         * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
832         * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
833         section_sym_count param, and return number of section symbols.
834         (bfd_elf_size_dynamic_sections): Clear section symbol area of
835         .dynsym contents.  Don't bother calling swap_symbol_out on the
836         first all-zero dynsym.
837         (elf_mark_used_section): Formatting.  Avoid twiddling flags in
838         special sections like bfd_abs_section.
839         (bfd_elf_gc_sections): Spelling fix.
840
841 2005-03-16  Fred Fish  <fnf@specifixinc.com>
842
843         PR binutils/790
844         * dwarf2.c (read_indirect_string): Fix apparent typo, check
845         dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
846
847 2005-03-16  H.J. Lu  <hongjiu.lu@intel.com>
848
849         * elflink.c (elf_mark_used_section): New.
850         (bfd_elf_gc_sections): Call elf_gc_mark_section for
851         non-relocatable link if we don't do GC.
852
853 2005-03-16  Nick Clifton  <nickc@redhat.com>
854             Ben Elliston  <bje@au.ibm.com>
855
856         * configure.in (werror): New switch: Add -Werror to the
857         compiler command line.  Enabled by default.  Disable via
858         --disable-werror.
859         * configure: Regenerate.
860
861 2005-03-16  Nick Clifton  <nickc@redhat.com>
862
863         * ecoff.c: Convert to ISO C90 formatting.
864
865 2005-03-16  Alan Modra  <amodra@bigpond.net.au>
866
867         * elf32-ppc.c: Divide file into general and linker specific
868         functions.  Sort linker functions into roughly the order in which
869         they are called by the ELF linker code.
870
871 2005-03-16  Alan Modra  <amodra@bigpond.net.au>
872
873         * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
874         on section.  Correct comment, and add FIXME.
875         (ppc_elf_additional_program_headers): Don't bump header count for
876         interp.  Test SEC_ALLOC, not SEC_LOAD, and don't test size.
877         (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
878         do allocate memory if they need it.
879
880 2005-03-15  Mikkel Krautz  <krautz@gmail.com>
881
882         * config.bfd (x86_64-elf): Add target.
883
884 2005-03-15  Alan Modra  <amodra@bigpond.net.au>
885
886         * po/es.po: Commit new Spanish translation.
887
888 2005-03-14  H.J. Lu  <hongjiu.lu@intel.com>
889
890         * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
891         for global symbol when reporting overflow.
892
893 2005-03-11  Jakub Jelinek  <jakub@redhat.com>
894
895         * libbfd-in.h (_bfd_ar_spacepad): New prototype.
896         * libbfd.h: Rebuilt.
897         * archive.c (_bfd_ar_spacepad): New function.
898         (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
899         bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
900         coff_write_armap): Use it.
901         (bfd_ar_hdr_from_filesystem): Likewise.  Fix HP-UX large
902         uid/gid support.
903         * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
904
905 2005-03-10  Mark Kettenis  <kettenis@gnu.org>
906
907         * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
908         has_table to the start of the function.
909
910 2005-03-10  Ben Elliston  <bje@au.ibm.com>
911
912         * archive.c: Include hashtab.h.
913         (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
914         (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
915         (hash_file_ptr): New function.
916         (eq_file_ptr): Likewise.
917         (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
918         * libbfd-in.h: Include hashtab.h.
919         (struct artdata): Change `cache' member type to htab_t.
920         * libbfd.h: Rebuild.
921
922 2005-03-08  Daniel Jacobowitz  <dan@codesourcery.com>
923
924         * configure.in: Bump version to 2.16.90.
925         * configure: Regenerated.
926
927 2005-03-07  Jakub Jelinek  <jakub@redhat.com>
928
929         * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
930         close is a function like macro in system headers.
931
932 2005-03-07  Alan Modra  <amodra@bigpond.net.au>
933
934         PR ld/778
935         * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
936         _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
937
938 2005-03-06  Alan Modra  <amodra@bigpond.net.au>
939
940         * elf.c (elfcore_grok_win32pstatus): Warning fixes.
941
942 2005-03-05  Alan Modra  <amodra@bigpond.net.au>
943
944         * po/bfd.pot: Regenerate.
945
946 2005-03-05  Alan Modra  <amodra@bigpond.net.au>
947
948         * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
949         with is_func.
950         (func_desc_adjust): Force dot-syms local in executables as well
951         as shared libs.
952
953 2005-03-04  David Daney  <ddaney@avtrex.com>
954
955         * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
956         '__gnu_local_gp' symbol used by gas -mno-shared.
957
958 2005-03-03  H.J. Lu  <hongjiu.lu@intel.com>
959
960         * elf-bfd.h (elf_backend_data): Add "const char *" to
961         elf_backend_section_from_phdr.
962
963         * elf.c (bfd_section_from_phdr): Pass "proc" to the
964         elf_backend_section_from_phdr hook.
965
966 2005-03-02  Daniel Jacobowitz  <dan@codesourcery.com>
967             Joseph Myers  <joseph@codesourcery.com>
968
969         * elfxx-mips.c (struct mips_got_entry): Add tls_type.
970         (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
971         and tls_ldm_offset.
972         (struct mips_elf_got_per_bfd_arg): Add global_count.
973         (struct mips_elf_count_tls_arg): New.
974         (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
975         (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
976         (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
977         (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
978         (TLS_RELOC_P): Define.
979         (TP_OFFSET, DTP_OFFSET): Define.
980         (dtprel_base, tprel_base): New functions.
981         (mips_elf_link_hash_newfunc): Initialize tls_type.
982         (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
983         (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
984         TLS entries.
985         (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
986         (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
987         (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
988         (mips_tls_got_index): New functions.
989         (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
990         arguments.  Pass them to mips_elf_create_local_got_entry.  Use
991         mips_tls_got_index.
992         (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
993         Handle TLS entries.
994         (mips_elf_got_page, mips_elf_got16_entry): Update calls to
995         mips_elf_create_local_got_entry.
996         (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
997         arguments.  Handle TLS entries.
998         (mips_elf_sort_hash_table_f): Add non-TLS assertions.
999         (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument.  Handle
1000         TLS entries.
1001         (mips_elf_record_global_got_symbol): Likewise.
1002         (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
1003         Count TLS entries.
1004         (mips_elf_merge_gots): Handle TLS entries when merging.
1005         (mips_elf_initialize_tls_index): New function.
1006         (mips_elf_set_global_got_offset): Handle TLS entries.
1007         (mips_elf_adjust_gp): Handle TLS.
1008         (mips_elf_multi_got): Remove redundant call to
1009         mips_elf_resolve_final_got_entries.  Initialize global_count.
1010         Correct a comment.  Initialize new TLS members of mips_got_info.
1011         Assign TLS GOT indexes for new GOTs.
1012         (mips_elf_create_got_section): Initialize new TLS members of
1013         mips_got_info.
1014         (mips_elf_calculate_relocation): Handle TLS relocs.
1015         (_bfd_mips_elf_check_relocs): Likewise.  Update calls to changed
1016         functions.
1017         (_bfd_mips_elf_always_size_sections): Handle TLS.
1018         (_bfd_mips_elf_size_dynamic_sections): Likewise.
1019         (_bfd_mips_elf_finish_dynamic_symbol): Likewise.  Update calls to
1020         changed functions.
1021         (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
1022         (_bfd_mips_elf_hide_symbol): Handle TLS.
1023         * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
1024         (mips_reloc_map): Add TLS relocs.
1025         * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
1026         * elf64-mips.c (mips_elf64_howto_table_rel)
1027         (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
1028         * reloc.c: Define new MIPS TLS relocations.
1029         * libbfd.h, bfd-in2.h: Regenerated.
1030
1031 2005-03-02  Jan Beulich  <jbeulich@novell.com>
1032
1033         * Makefile.am: Add dependency of cache.o on libiberty.h.
1034         * cache.c: Include libiberty.h.
1035         (bfd_open_file): Use unlink_if_ordinary instead of unlink.
1036
1037 2005-03-01  Zack Weinberg  <zack@codesourcery.com>
1038
1039         * elf.c (bfd_section_from_shdr <default case>): Call
1040         elf_backend_section_from_shdr hook unconditionally, and return
1041         what it returns.
1042         (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
1043         * elfxx-target.h (elf_backend_section_from_shdr)
1044         (elf_backend_section_from_phdr): Default to
1045         _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
1046         respectively.
1047
1048 2005-03-01  Alan Modra  <amodra@bigpond.net.au>
1049
1050         * targets.h: Typo fix.
1051         * bfd-in2.h: Regenerate.
1052
1053         * bout.c (b_out_write_object_contents): Don't use sizeof on host
1054         structs to size on-disk structures.
1055         (b_out_set_section_contents): Size the external struct, not the
1056         internal one for on-disk size.
1057         (b_out_sizeof_headers): Likewise.
1058
1059 2005-03-01  Alan Modra  <amodra@bigpond.net.au>
1060
1061         * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
1062         entry points with the func descriptor as well as undefweak.
1063
1064 2005-02-28  Ross Ridge  <rridge@csclub.uwaterloo.ca>
1065
1066         * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
1067         present when IMPORT_NAME_UNDOECRATE is used.
1068
1069 2005-02-28  H.J. Lu  <hongjiu.lu@intel.com>
1070
1071         PR 757
1072         * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
1073         int.
1074
1075         * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
1076         to _bfd_elf_merge_symbol.
1077
1078         * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
1079         unsigned int to return the alignment of the old common symbol
1080         in the dynamic object.
1081         (_bfd_elf_add_default_symbol): Pass NULL to
1082         _bfd_elf_merge_symbol.
1083         (elf_link_add_object_symbols): Pass &old_alignment to
1084         _bfd_elf_merge_symbol. Get the alignment of the new common
1085         symbol in the dynamic object.
1086
1087 2005-02-24  Ben Elliston  <bje@au.ibm.com>
1088
1089         * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
1090         * format.c (bfd_check_format_matches): Likewise.
1091         * archive.c (BFD_GNU960_ARMAG): Likewise.
1092         (bfd_generic_archive_p): Likewise.
1093         (_bfd_write_archive_contents): Likewise.
1094
1095 2005-02-24  H.J. Lu  <hongjiu.lu@intel.com>
1096
1097         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
1098         * configure: Regenerate.
1099
1100 2005-02-24  Julian Brown  <julian@sirius.codesourcery.com>
1101
1102         * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
1103         COMDAT group sections to have default visibility.
1104
1105 2005-02-24  Alan Modra  <amodra@bigpond.net.au>
1106
1107         * coffcode.h (coff_print_aux): Warning fix.
1108         * elf-m10300.c (mn10300_elf_relax_section): Use section->id
1109         instead of section pointer to identify.
1110         * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.  Allocate
1111         the correct size buffer for local sym mangling too.
1112         (h8300_bfd_link_add_symbols): Likewise.
1113         * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
1114         warning.
1115         * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
1116         * elf32-xtensa.c (literal_value_hash): Warning fix.
1117         * versados.c (process_otr): Warning fix.
1118         (versados_canonicalize_reloc): Likewise.
1119         * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
1120         * vms.c (fill_section_ptr): Warning fix.
1121
1122 2005-02-23  H.J. Lu  <hongjiu.lu@intel.com>
1123
1124         * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
1125         * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
1126
1127 2005-02-23  Nick Clifton  <nickc@redhat.com>
1128
1129         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
1130         the relvaddr field of the Elf32_crinfo structure.
1131
1132         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
1133         variables that are passed by reference to
1134         m68hc11_get_relocation_value in case that function does not
1135         initialise them.
1136
1137         * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
1138         return statements and replace with a single return at the end of
1139         the function.  This helps pacify the flow analysis code in gcc 4.0.
1140
1141         * elf.c (_bfd_elf_compute_section_file_positions): Initialise
1142         strtab to avoid compile time warning.
1143
1144 2005-02-23  Ben Elliston  <bje@au.ibm.com>
1145
1146         * opncls.c (bfd_zalloc): Document this function.
1147
1148 2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>
1149
1150         * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
1151         SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
1152         Replace SEC_SHARED with SEC_COFF_SHARED.
1153         (styp_to_sec_flags): Likewise.
1154
1155         * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
1156         (TARGET_LITTLE_SYM): Likewise.
1157
1158         * section.c (SEC_ARCH_BIT_0): Removed.
1159         (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
1160         SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
1161         (SEC_SHARED): Renamed to ...
1162         (SEC_COFF_SHARED): This.
1163         (SEC_BLOCK): Renamed to ...
1164         (SEC_TIC54X_BLOCK): This.
1165         (SEC_CLINK): Renamed to ...
1166         (SEC_TIC54X_CLINK): This.
1167         (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
1168         SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
1169         end.
1170         * bfd-in2.h: Regenerated.
1171
1172 2005-02-21  Fred Fish  <fnf@specifixinc.com>
1173
1174         * dwarf2.c (find_abstract_instance_name): Call recursively
1175         to handle a DW_AT_specification.
1176
1177 2005-02-21  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
1178
1179         * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
1180         mips_elf_create_dynamic_relocation,
1181         _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
1182         Remove #if 0'd code.
1183
1184 2005-02-21  Alan Modra  <amodra@bigpond.net.au>
1185
1186         * Makefile.am: Run "make dep-am"
1187         * Makefile.in: Regenerate.
1188
1189 2005-02-21  Alan Modra  <amodra@bigpond.net.au>
1190
1191         * coffgen.c (bfd_coff_get_comdat_section): Check that
1192         coff_section_data isn't NULL.
1193
1194 2005-02-21  Alan Modra  <amodra@bigpond.net.au>
1195
1196         * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
1197         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
1198         * coff-rs6000.c (xcoff_write_armap_big): Warning fixes.  Remove
1199         useless assignments.
1200         (xcoff_write_archive_contents_big): Likewise.
1201         (_bfd_xcoff_put_ldsymbol_name): Likewise.
1202         * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
1203         * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
1204         * cofflink.c (process_embedded_commands): Warning fixes.
1205         * cpu-arm.c: Delete unnecessary prototypes.  Convert to C90.
1206         Warning fixes.
1207         * dwarf2.c: Warning fixes.
1208         * elf-bfd.h: Likewise.
1209         * elf-eh-frame.c: Likewise.
1210         * elf-strtab.c: Likewise.
1211         * elf.c: Likewise.
1212         * elf32-m68k.c: Likewise.
1213         * elf32-ppc.c: Likewise.
1214         * elf32-sh-symbian.c: Likewise.
1215         * elf32-sh.c: Delete unnecessary prototypes.  Warning fixes.
1216         * elf64-sh64.c: Likewise.
1217         * peicode.h: Likewise.
1218         * elf64-mmix.c: Warning fixes.
1219         * elfcode.h: Likewise.
1220         * elfxx-mips.c: Likewise.
1221         * libbfd-in.h: Likewise.
1222         * libbfd.c: Likewise.
1223         * mach-o.c: Likewise.
1224         * merge.c: Likewise.
1225         * mmo.c: Likewise.
1226         * opncls.c: Likewise.
1227         * pef.c: Likewise.
1228         * srec.c: Likewise.
1229         * vms-hdr.c: Likewise.
1230         * vms-tir.c: Likewise.
1231         * xtensa-isa.c: Likewise.
1232         * xtensa-modules.c: Likewise.
1233         * xsym.c: Likewise.
1234         (pstrcmp): Use correct choice of string lengths.  Fix return value.
1235         (bfd_sym_module_name): Correct string length.
1236         * bfd-in2.h: Regenerate.
1237         * libbfd.h: Regenerate.
1238
1239 2005-02-17  Alexandre Oliva  <aoliva@redhat.com>
1240
1241         * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
1242         uninitialized check_segment[1] in TLSMOFF case.
1243         Reported by Alan Modra.
1244         (elf32_frv_relocate_section): Improve errors and warnings.
1245
1246 2005-02-17  Alan Modra  <amodra@bigpond.net.au>
1247
1248         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
1249
1250 2005-02-16  Alan Modra  <amodra@bigpond.net.au>
1251
1252         * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
1253         * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
1254         * pef.c (bfd_pef_scan): Don't ignore return value of
1255         bfd_pef_scan_start_address.
1256         * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
1257         bfd_mach_o_scan_start_address.
1258         * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
1259         * elfxx-mips.c: Remove unnecessary prototypes.
1260         (sort_dynamic_relocs_64): Abort if not BFD64.
1261
1262 2005-02-16  Alan Modra  <amodra@bigpond.net.au>
1263
1264         * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
1265         Skip toc reloc adjust if reloc_count is zero.
1266
1267 2005-02-15  Nigel Stephens  <nigel@mips.com>
1268             Maciej W. Rozycki  <macro@mips.com>
1269
1270         * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
1271         reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
1272         R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1273         (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
1274         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
1275         dst_mask.
1276         (mips16_gprel_reloc): Remove bit shuffling; call
1277         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1278         and _bfd_mips16_elf_reloc_shuffle() instead.
1279         (mips16_reloc_map): New reloc map for MIPS16 relocs.
1280         (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1281         relocs.
1282         (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
1283         elf_mips16_howto_table_rel.
1284         * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
1285         MIPS16 REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16
1286         relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1287         (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
1288         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
1289         dst_mask.
1290         (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
1291         reloc howtos.  Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
1292         R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
1293         placeholders.
1294         (mips16_gprel_reloc): Remove bit shuffling; call
1295         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1296         and _bfd_mips16_elf_reloc_shuffle() instead.
1297         (mips16_reloc_map): New reloc map for MIPS16 relocs.
1298         (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1299         relocs.
1300         (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
1301         mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
1302         * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
1303         REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
1304         R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
1305         (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
1306         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
1307         dst_mask.
1308         (mips16_gprel_reloc): Remove bit shuffling; call
1309         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
1310         and _bfd_mips16_elf_reloc_shuffle() instead.
1311         (mips16_reloc_map): New reloc map for MIPS16 relocs.
1312         (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
1313         relocs.
1314         (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
1315         elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
1316         * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
1317         handle bit shuffling for MIPS16 relocs.
1318         (_bfd_mips16_elf_reloc_shuffle): Likewise.
1319         (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
1320         and _bfd_mips16_elf_reloc_shuffle().
1321         (_bfd_mips_elf_generic_reloc): Likewise.
1322         (mips_elf_calculate_relocation): Likewise.  Handle R_MIPS16_HI16
1323         and R_MIPS16_LO16.
1324         (mips_elf_obtain_contents): Remove bit shuffling.
1325         (mips_elf_perform_relocation): Likewise; call
1326         _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
1327         instead.
1328         (_bfd_mips_elf_relocate_section): Likewise.  Handle R_MIPS16_HI16
1329         and R_MIPS16_LO16.
1330         * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
1331         (_bfd_mips16_elf_reloc_shuffle): Likewise.
1332         * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
1333         (BFD_RELOC_MIPS16_HI16_S): Likewise.
1334         (BFD_RELOC_MIPS16_LO16): Likewise.
1335         * bfd-in2.h: Regenerate.
1336         * libbfd.h: Regenerate.
1337
1338 2005-02-15  Jan Beulich  <jbeulich@novell.com>
1339
1340         * elfxx-ia64.c (ia64_howto_table): Correct strings for
1341         R_IA64_DTPMOD64[LM]SB.
1342
1343 2005-02-14  H.J. Lu  <hongjiu.lu@intel.com>
1344
1345         * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
1346         backward branch in the same section.
1347         (elfNN_ia64_relocate_section): Inform users that the input
1348         section is too big to relax br instruction when overflow
1349         happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
1350         and R_IA64_PCREL21F.
1351
1352 2005-02-14 Orjan Friberg <orjanf@axis.com>
1353
1354         * elfcore.h (elf_core_file_p): Move the call to
1355         elf_backend_object_p to allow the correct machine to be set before
1356         processing the program headers.
1357
1358 2005-02-14  Nick Clifton  <nickc@redhat.com>
1359
1360         PR binutils/716
1361         * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
1362         aware flag from the input bfd to the output bfd.
1363
1364 2005-02-11  Maciej W. Rozycki  <macro@mips.com>
1365
1366         * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
1367         R_MIPS_LITERAL relocations for external symbols.
1368         * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
1369         * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
1370
1371 2005-02-11  H.J. Lu  <hongjiu.lu@intel.com>
1372
1373         * bfd-in2.h: Rebuilt.
1374
1375 2005-02-11  Paul Brook  <paul@codesourcery.com>
1376
1377         * elf-bfd.h (struct elf_link_hash_table): Add
1378         is_relocatable_executable.
1379         * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
1380         * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
1381         symbols in relocatable executables.
1382         (bfd_elf_record_link_assignment): Create dynamic section symbols in
1383         relocatable executables.
1384         (_bfd_elf_link_renumber_dynsyms): Ditto.
1385         (bfd_elf_final_link): Ditto.
1386         * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
1387         relocations into relocatable executables.
1388         (elf32_arm_check_relocs): Crate dynamic sections for relocatable
1389         executables.  Also copy absolute relocations.
1390         (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
1391         in relocatable executables.
1392         (allocate_dynrelocs): Copy relocations for relocatable executables.
1393         Output dynamic symbols for symbols defined in linker scripts.
1394
1395 2005-02-11  Nick Clifton  <nickc@redhat.com>
1396
1397         * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
1398         to avoid a compile time warning.
1399
1400         * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
1401         BFD_ASSERT.
1402
1403         * coff-tic4x.c (coff_rtype_to_howto): Move definition before
1404         inclusion of coffcode.h so that it is actually picked up.
1405
1406         * coffcode.h (coff_std_swap_table): Add an unused attribute in
1407         case it is not used.
1408
1409         * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
1410         structure and macro.
1411
1412         * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
1413         array.
1414
1415         * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
1416         to protect the declaration of this array.
1417
1418         * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
1419         Avoid call to memcpy with a size of 0.
1420
1421 2005-02-12  Alan Modra  <amodra@bigpond.net.au>
1422
1423         * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
1424         old-style branches to undefined dot-symbols which will be
1425         satisfied by a plt call.
1426
1427 2005-02-11  Alan Modra  <amodra@bigpond.net.au>
1428
1429         * elf64-ppc.c (move_plt_plist): New function, extracted from..
1430         (ppc64_elf_copy_indirect_symbol): ..here.
1431         (func_desc_adjust): Use move_plt_plist.
1432
1433 2005-02-10  Paul Brook  <paul@codesourcery.com>
1434
1435         * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
1436
1437 2005-02-10  Paul Brook  <paul@codesourcery.com>
1438
1439         * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
1440         symbols local.
1441         (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
1442         (elf_link_renumber_local_hash_table_dynsyms): New function.
1443         (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
1444
1445 2005-02-10  Jakub Jelinek  <jakub@redhat.com>
1446
1447         * bfd-in.h (BFD_LINKER_CREATED): Define.
1448         * bfd-in2.h: Rebuilt.
1449         * elflink.c (bfd_elf_size_dynamic_sections): Disregard
1450         BFD_LINKER_CREATED bfds when determining input bfds without
1451         .note.GNU-stack section.
1452
1453 2005-02-10  Maciej W. Rozycki  <macro@mips.com>
1454
1455         * elf64-mips.c (mips16_gprel_reloc): Update a comment.
1456         * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
1457         relocations against external symbols unchanged.
1458
1459 2005-02-08  Paul Brook  <paul@codesourcery.com>
1460
1461         * elflink.c (elf_link_input_bfd): Ignore symbols from null input
1462         sections.
1463
1464 2005-02-08  Hans-Peter Nilsson  <hp@axis.com>
1465
1466         * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
1467         prefix here.
1468
1469 2005-02-07  Maciej W. Rozycki  <macro@mips.com>
1470
1471         * elf64-mips.c: Fix formatting throughout.
1472
1473 2005-02-07  Maciej W. Rozycki  <macro@mips.com>
1474
1475         * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
1476
1477 2005-02-07  Alexandre Oliva  <aoliva@redhat.com>
1478
1479         * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
1480         *ABS*/*UND* sections.
1481         (elf32_frv_relocate_section): Move zero-addend-required error...
1482         (_frv_emit_got_relocs_plt_entries): ... here.  Report error for
1483         missing needed TLS section.
1484
1485 2005-02-07  Hans-Peter Nilsson  <hp@axis.com>
1486
1487         * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
1488         being the last symbol.
1489         (aout_link_add_symbols): Just return TRUE if a warning
1490         symbol was last.
1491
1492 2005-02-07  Maciej W. Rozycki  <macro@mips.com>
1493
1494         * elf32-mips.c (mips_elf_gprel32_reloc): Reject
1495         R_MIPS_GPREL32 relocations against external symbols.
1496         * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
1497         comment.
1498
1499 2005-02-07  Alan Modra  <amodra@bigpond.net.au>
1500
1501         * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
1502         * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
1503         elf_string_from_elf_strtab.
1504         (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
1505         (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
1506         if it exists.  Don't do the reverse for SHT_SYMTAB_SHNDX.  For
1507         SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
1508         looking at cached symtab info first, before iterating over headers.
1509         For SHT_REL and SHT_RELA, load dynsymtab if needed.
1510         * elfcode.h (elf_object_p): Don't load section header stringtab
1511         specially.
1512
1513 2005-02-06  H.J. Lu  <hongjiu.lu@intel.com>
1514
1515         * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
1516         against protected function when building shared library.
1517
1518         PR 584
1519         * elf64-x86-64.c (is_32bit_relative_branch): New.
1520         (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
1521         protected function symbol when building shared library for
1522         32bit relative branch instruction.
1523
1524 2005-02-06  Alan Modra  <amodra@bigpond.net.au>
1525
1526         * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
1527         syms when doing a relocatable link.
1528         (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
1529         at u.def.section.
1530         (ppc64_elf_tls_setup): Likewise.
1531         (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
1532
1533 2005-02-04  Alan Modra  <amodra@bigpond.net.au>
1534
1535         * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
1536         (link_hash_newfunc): Clear all locals using memset.
1537         (make_fdh): Remove flags param.  Always create fake func desc
1538         weak.  Link the descriptor with the code entry sym.
1539         (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
1540         (add_symbol_adjust): Adjust make_fdh call.
1541         (func_desc_adjust): Likewise.  Twiddle any pre-existing fake
1542         descriptor to strong undefined if code entry is strong.
1543
1544 2005-02-04  Alan Modra  <amodra@bigpond.net.au>
1545
1546         * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
1547         lookup here.  Set to new before calling bfd_link_repair_undef_list.
1548         (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
1549
1550 2005-02-03  Alan Modra  <amodra@bigpond.net.au>
1551
1552         * linker.c (_bfd_link_hash_newfunc): Set all local fields.
1553
1554 2005-02-03  Alan Modra  <amodra@bigpond.net.au>
1555
1556         * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
1557         * elflink.c (elf_smash_syms): Restore symbols that were undefweak
1558         before the as-needed lib was loaded.  Abort on unexpected refs.
1559
1560 2005-02-02  Alan Modra  <amodra@bigpond.net.au>
1561
1562         * elflink.c (elf_smash_syms): Expand comments.
1563         (elf_link_add_object_symbols): Only call elf_smash_syms for
1564         as-needed dynamic objects.
1565
1566         * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
1567         everything, just the field specific to ia64.
1568         * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
1569
1570 2005-02-01  Alan Modra  <amodra@bigpond.net.au>
1571
1572         * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
1573         (make_fdh): ..here.  New function.  Don't set BSF_OBJECT for
1574         undefined syms.
1575         (struct add_symbol_adjust_data): New.
1576         (add_symbol_adjust): Make an undefweak func desc for old ABI
1577         objects to link with --as-needed shared libs.  Return fail status.
1578         Don't adjust old ABI func entry sym to weak if func desc syms
1579         isn't defined.
1580         (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
1581         and return status.
1582
1583 2005-02-01  Hans-Peter Nilsson  <hp@axis.com>
1584
1585         * cpu-cris.c (get_compatible): Rearrange disabled code and comment
1586         for clarity.
1587
1588 2005-02-01  Alan Modra  <amodra@bigpond.net.au>
1589
1590         * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
1591         * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
1592         remove anything but new and undefweak.
1593         * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
1594         existing _DYNAMIC.
1595         (_bfd_elf_create_dynamic_sections): Formatting.
1596         (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
1597         (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
1598         (struct elf_smash_data): New.
1599         (elf_smash_syms): New function.
1600         (elf_link_add_object_symbols): Call elf_smash_syms.  Don't add
1601         unneeded dynamic objects to loaded list.
1602         (elf_link_output_extsym): Don't handle as-needed here.  Strip
1603         bfd_link_hash_new symbols.
1604         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1605         delref when dynindx is already -1.
1606         * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
1607         symbols.
1608         * elfxx-mips.c (mips_elf_output_extsym): Likewise.
1609
1610 2005-02-01  Ben Elliston  <bje@au.ibm.com>
1611
1612         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
1613
1614 2005-02-01  Ben Elliston  <bje@au.ibm.com>
1615
1616         * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
1617         bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
1618         coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
1619         coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
1620         cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
1621         elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
1622         elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
1623         elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
1624         i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
1625         nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
1626         pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
1627         sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c, doc/chew.c,
1628         hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
1629         throughout. Similarly, collapse #if 1'd code.
1630
1631 2005-02-01  Ben Elliston  <bje@au.ibm.com>
1632
1633         * elf-bfd.h (bfd_elf_discard_group): Remove.
1634         * elf.c (bfd_elf_discard_group): Likewise.
1635         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
1636
1637 2005-01-31  Richard Sandiford  <rsandifo@redhat.com>
1638
1639         * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
1640         (_bfd_elf_eh_frame_address_size): Declare.
1641         * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
1642         (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
1643         * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
1644         (elf_backend_eh_frame_address_size): Define.
1645         * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
1646         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
1647         size from the new backend hook.
1648         (_bfd_elf_write_section_eh_frame): Likewise.
1649         (_bfd_elf_eh_frame_address_size): New function.
1650
1651 2005-01-31  Andrew Cagney  <cagney@gnu.org>
1652
1653         * configure: Regenerate to track ../gettext.m4.
1654
1655 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
1656
1657         * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
1658         SHF_WRITE for .init_array, .fini_array, and .preinit_array.
1659
1660 2005-01-31  Nick Clifton  <nickc@redhat.com>
1661
1662         * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
1663         sparc-lynxos, vax-vms) be obsolete.
1664
1665 2005-01-28  Daniel Jacobowitz  <dan@codesourcery.com>
1666
1667         * elf-bfd.h (struct elf_backend_data): Add minpagesize.
1668         * elf32-arm.c (ELF_MINPAGESIZE): Define.
1669         * elf32-ppc.c (ELF_MINPAGESIZE): Define.
1670         * elfcode.h (elf_object_p): Use minpagesize instead of
1671         maxpagesize.
1672         * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
1673         (elfNN_bed): Include ELF_MINPAGESIZE.
1674
1675 2005-01-28  Julian Brown  <julian@codesourcery.com>
1676
1677         * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1678         * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1679         * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
1680         (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
1681         passing flag value from ld. Set flag value in global hash table entry.
1682         (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
1683         relocation.
1684
1685 2005-01-27  Andrew Cagney  <cagney@gnu.org>
1686
1687         * configure: Regenerate to track ../gettext.m4 change.
1688
1689 2005-01-25  Mark Mitchell  <mark@codesourcery.com>
1690
1691         * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
1692         SymbianOS.
1693
1694 2005-01-25  Alexandre Oliva  <aoliva@redhat.com>
1695
1696         2004-12-10  Alexandre Oliva  <aoliva@redhat.com>
1697         * elf32-frv.c (elf32_frv_relocate_section): Force local binding
1698         for TLSMOFF.
1699         * reloc.c: Add R_FRV_TLSMOFF.
1700         * elf32-frv.c (elf32_frv_howto_table): Likewise.
1701         (frv_reloc_map, frv_reloc_type_lookup): Map it.
1702         (elf32_frv_relocate_section): Handle it.
1703         (elf32_frv_check_relocs): Likewise.
1704         * libbfd.h, bfd-in2.h: Rebuilt.
1705         2004-11-26  Alexandre Oliva  <aoliva@redhat.com>
1706         * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
1707         when given an undefweak TLS symbol.  Fix constant TLS PLT entries
1708         such that they return the constant in gr9.
1709         (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
1710         symbols.
1711         (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
1712         too, such that they shrink on relaxation.
1713         (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
1714         marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
1715         (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
1716         if we can guarantee the use of 16-bit constants.
1717         2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
1718         Introduce TLS support for FR-V FDPIC.
1719         * reloc.c: Add TLS relocations.
1720         * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
1721         (elf32_frv_rel_tlsdesc_value_howto): New.
1722         (elf32_frv_rel_tlsoff_howto): New.
1723         (frv_reloc_map): Add new mappings.
1724         (struct frvfdpic_elf_link_hash_table): Add pointer to summary
1725         reloc information.
1726         (frvfdpic_dynamic_got_plt_info): New.
1727         (frvfdpic_plt_tls_ret_offset): New.
1728         (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
1729         (struct _frvfdpic_dynamic_got_info): Likewise.  Add TLS members.
1730         (struct _frvfdpic_dynamic_got_plt_info): Likewise.
1731         (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
1732         section as local.
1733         (struct frvfdpic_relocs_info): Add TLS fields.
1734         (frvfdpic_relocs_info_hash): Warning clean up.
1735         (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
1736         (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
1737         (FRVFDPIC_TLS_BIAS): Define.
1738         (tls_biased_base): New.
1739         (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
1740         relocations.
1741         (frv_reloc_type_lookup): Likewise.
1742         (frvfdpic_info_to_howto_rel): Likewise.
1743         (elf32_frv_relocate_section): Likewise.
1744         (_frv_create_got_section): Create the PLT section here.
1745         (elf32_frvfdpic_create_dynamic_sections): Not here.
1746         (_frvfdpic_count_nontls_entries): Move out of...
1747         (_frvfdpic_count_got_plt_entries): ... here.
1748         (_frvfdpic_count_tls_entries): Likewise.  Add TLS support.
1749         (_frvfdpic_count_relocs_fixups): Likewise.  Add relaxation
1750         support.
1751         (_frvfdpic_relax_tls_entries): New.
1752         (_frvfdpic_compute_got_alloc_data): Add TLS support.
1753         (_frvfdpic_get_tlsdesc_entry): New.
1754         (_frvfdpic_assign_got_entries): Add TLS support.
1755         (_frvfdpic_assign_plt_entries): Likewise.
1756         (_frvfdpic_reset_got_plt_entries): New.
1757         (_frvfdpic_size_got_plt): Move out of...
1758         (elf32_frvfdpic_size_dynamic_sections): ... here.
1759         (_frvfdpic_relax_got_plt_entries): New.
1760         (elf32_frvfdpic_relax_section): New.
1761         (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
1762         (elf32_frv_check_relocs): Add TLS support.
1763         (bfd_elf32_bfd_relax_section): Define for FDPIC.
1764         * libbfd.h, bfd-in2.h: Rebuilt.
1765
1766 2005-01-25  Alan Modra  <amodra@bigpond.net.au>
1767
1768         * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
1769         loadable reloc sections.
1770         (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
1771         (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
1772
1773 2005-01-25  Alan Modra  <amodra@bigpond.net.au>
1774
1775         * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
1776         sections immediately when linking shared libs.  Instead, wait until
1777         we know a lib is needed.
1778         (_bfd_elf_link_create_dynstrtab): Extract from..
1779         (_bfd_elf_link_create_dynamic_sections_): ..here.
1780         (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
1781         _bfd_elf_link_create_dynamic_sections.  Add abfd param.  Allow
1782         for non-existent .dynamic.
1783         (elf_link_output_extsym): Don't complain about undefined symbols
1784         in as-needed dynamic libs that aren't actually linked.
1785
1786 2005-01-24  Andrew Cagney  <cagney@gnu.org>
1787
1788         * configure: Regenerate, ../gettext.m4 was updated.
1789
1790 2005-01-21  Ben Elliston  <bje@au.ibm.com>
1791
1792         * aout-encap.c: Remove unused file.
1793
1794 2005-01-19  H.J. Lu  <hongjiu.lu@intel.com>
1795
1796         PR 679
1797         * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
1798         non-function symbols are local.
1799         (_bfd_elf_symbol_refs_local_p): Likewise.
1800
1801 2005-01-18  Alan Modra  <amodra@bigpond.net.au>
1802
1803         * bfd.c (bfd_link_just_syms): Add abfd param.
1804         * bfd-in2.h: Regenerate.
1805
1806 2005-01-17  Richard Sandiford  <rsandifo@redhat.com>
1807
1808         * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
1809         (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
1810         instructions.  If the amount of padding is known, reduce the size
1811         of the CIE or FDE by that amount.
1812
1813 2005-01-17  Richard Sandiford  <rsandifo@redhat.com>
1814
1815         * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
1816         augmentation_size.  Use bfd_signed_vmas for data_align.
1817         * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
1818         (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
1819         functions.  Don't read past the end of the enclosing CIE or FDE.
1820         (skip_bytes): New utility function.
1821         (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
1822         sanity checking.
1823         (_bfd_elf_write_section_eh_frame): Use new functions.
1824
1825 2005-01-17  Richard Sandiford  <rsandifo@redhat.com>
1826
1827         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
1828         assert-style REQUIRE() macro to handle sanity checks.
1829
1830 2005-01-17  H.J. Lu  <hongjiu.lu@intel.com>
1831
1832         * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
1833         (comp_unit): Here.
1834         (read_unsigned_leb128): Removed.
1835         (read_signed_leb128): Removed.
1836         (find_abstract_instance_name): Updated.
1837         (parse_comp_unit): Accept info_ptr_unit.
1838         (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
1839         comp unit and pass it to parse_comp_unit.
1840
1841         * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
1842         (read_signed_leb128): Moved to ...
1843         * libbfd.c: Here.
1844
1845         * libbfd-in.h (read_unsigned_leb128): New prototype.
1846         (read_signed_leb128): Likewise.
1847         * libbfd.h: Regenerated.
1848
1849 2005-01-17  Andrew Stubbs  <andrew.stubbs@st.com>
1850             Nick Clifton   <nickc@redhat.com>
1851
1852         * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
1853         arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
1854         arch_sh4a_nofpu_up in order to match the external names and make the
1855         testsuite's job easier.
1856         * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
1857         names.
1858         * bfd-in2.h: Regenerate.
1859
1860 2005-01-15  Andrew Cagney  <cagney@gnu.org>
1861
1862         * bfd.m4: New file.
1863         * acinclude.m4: Move BFD_NEED_DECLARATION,
1864         BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
1865         the new file bfd.m4.  Include ../bfd/bfd.m4.
1866         * configure: Re-generate.
1867
1868 2005-01-12  Alan Modra  <amodra@bigpond.net.au>
1869
1870         * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
1871         (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
1872         reaching PLT.
1873         (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
1874         R_PPC_RELAX32PC_PLT.
1875
1876 2005-01-11  Alan Modra  <amodra@bigpond.net.au>
1877
1878         * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
1879         symbols.
1880         * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
1881         * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
1882         * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
1883         * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
1884         * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
1885         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
1886         * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
1887         * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
1888         * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
1889         * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
1890         * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
1891         * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
1892         * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
1893         * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
1894
1895 2005-01-11  Alan Modra  <amodra@bigpond.net.au>
1896
1897         * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
1898         .dynsbss flags.
1899
1900 2005-01-10  Inderpreet Singh <inderpreetb@noida.hcltech.com>
1901
1902         * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
1903         * bfd-in2.h:  Regenerate.
1904         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
1905         to support these new machine values.
1906         * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
1907         the maxq10.
1908         (bfd_maxq_arch): Update values for the maxq20.
1909
1910 2005-01-10  Eric Botcazou  <ebotcazou@libertysurf.fr>
1911
1912         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
1913         non-shared object, do not reserve space in .plt and .rela.plt for
1914         regular symbols neither defined nor referenced in shared objects.
1915
1916 2005-01-09  Eric Botcazou  <ebotcazou@libertysurf.fr>
1917
1918         * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
1919         to zero the structure.
1920         (create_got_section): Use BFD_ASSERT instead of abort.
1921         * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
1922         'srelgot' fields.
1923         (create_got_section): New function.
1924         (sparc64_elf_create_dynamic_sections): Likewise.
1925         (sparc64_elf_check_relocs): Invoke create_got_section instead of
1926         _bfd_elf_create_got_section.  Use the sgot and srelgot shortcuts.
1927         (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
1928         (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
1929         (sparc64_elf_finish_dynamic_symbol): Likewise.
1930         (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
1931         (elf_backend_create_dynamic_sections): Define to
1932         sparc64_elf_create_dynamic_sections.
1933
1934 2005-01-09  Eric Botcazou  <ebotcazou@libertysurf.fr>
1935
1936         * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
1937         (elf_backend_omit_section_dynsym): Define to it.
1938         * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
1939         (elf_backend_omit_section_dynsym): Define to it.
1940
1941 2005-01-07  Jakub Jelinek  <jakub@redhat.com>
1942
1943         * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
1944         PT_DYNAMIC segment, unless .dynamic.
1945
1946 2005-01-06  Paul Brook  <paul@codesourcery.com>
1947
1948         * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
1949         * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
1950         * configure: Regenerate.
1951         * elf32-arm.c: Add VxWorks target bfd.
1952         (USE_REL): Remove.
1953         (elf32_arm_link_hash_table): Add use_rel.
1954         (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
1955         elf32_arm_relocate_section): Replace USE_REL with runtime check.
1956         Correct offset calculation for RELA case.
1957         (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
1958         elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
1959         (elf32_arm_vxworks_link_hash_table_create): New function.
1960         * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
1961         (bfd_elf32_littlearm_vxworks_vec): Ditto.
1962         (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
1963
1964 2005-01-06  Alan Modra  <amodra@bigpond.net.au>
1965
1966         * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
1967         multi_toc_needed.
1968         (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
1969         (ppc64_elf_check_relocs): Update references to has_gp_reloc.
1970         (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
1971         (ppc64_elf_next_toc_section): Heed no_multi_toc.
1972         (ppc64_elf_reinit_toc): Set multi_toc_needed.
1973         (toc_adjusting_stub_needed): Rewrite.
1974         (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
1975         toc tests.  Adjust for toc_adjusting_stub_needed changes.
1976         (ppc64_elf_size_stubs): Update references to has_gp_reloc.
1977         * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
1978         * section.c: Expand comment on backend bits.
1979         * bfd-in2.h: Regenerate.
1980         * libbfd.h: Regenerate.
1981
1982 2005-01-06  Alan Modra  <amodra@bigpond.net.au>
1983
1984         * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
1985         toc adjusting stub, do not test source section flags.
1986
1987 2005-01-05  Eric Botcazou  <ebotcazou@libertysurf.fr>
1988
1989         * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
1990         from STABS debugging sections again.
1991
1992 2005-01-05  Fred Fish  <fnf@specifixinc.com>
1993
1994         * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
1995         (find_abstract_instance_name): New function.
1996         (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
1997         (scan_unit_for_functions): Handle DW_AT_abstract_origin.
1998         (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
1999
2000 2004-12-31  Paul Brook  <paul@copdesourcery.com>
2001
2002         * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
2003
2004 2004-12-31  Alan Modra  <amodra@bigpond.net.au>
2005
2006         * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
2007         Commit missing changes from 2004-12-22.
2008         * bfd-in2.h: Regenerate.
2009
2010 2004-12-23  Tomer Levi  <Tomer.Levi@nsc.com>
2011
2012         * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
2013
2014 2004-12-21  Kris Warkentin  <kewarken@qnx.com>
2015
2016         * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
2017         Add 'base' argument for constructing register sections.  Reformat.
2018         (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
2019         gp and fp regs.  Reformat.
2020
2021 2004-12-22  Klaus Rudolph  <lts-rudolph@gmx.de>
2022
2023         * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
2024         * bfd-in2.h: Regenerate.
2025         * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
2026         (avr_reloc_map): Likewise.
2027         (avr_final_link_relocate): Likewise.
2028
2029 2004-12-22  Alan Modra  <amodra@bigpond.net.au>
2030
2031         * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
2032         as-needed dynamic libs as undefined.
2033         (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
2034         libs when finding they are needed.
2035
2036 2004-12-20  Alan Modra  <amodra@bigpond.net.au>
2037
2038         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
2039         (opd_entry_value): Use opd_relocs if available.
2040         (ppc64_elf_relocate_section): Don't set reloc_done.  Instead
2041         copy .opd relocations to opd_relocs.
2042         (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
2043
2044 2004-12-16  Richard Sandiford  <rsandifo@redhat.com>
2045
2046         * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
2047         * elf32-v850.c (v850_elf_howto_table): Add entry for
2048         R_V850_LO16_SPLIT_OFFSET.
2049         (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
2050         (v850_elf_perform_lo16_relocation): New function, extracted from...
2051         (v850_elf_perform_relocation): ...here.  Use it to handle
2052         R_V850_LO16_SPLIT_OFFSET.
2053         (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
2054         R_V850_LO16_SPLIT_OFFSET.
2055         * libbfd.h, bfd-in2.h: Regenerate.
2056
2057 2004-12-14  P.J. Darcy  <darcypj@us.ibm.com>
2058
2059         * config.bfd: Add s390x-ibm-tpf support.
2060
2061 2004-12-14  Tomer Levi  <Tomer.Levi@nsc.com>
2062
2063         * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
2064         to prototype, to make hash info available.
2065         Prevent wrapped symbols from being adjusted twice.
2066
2067 2004-12-14  Richard Sandiford  <rsandifo@redhat.com>
2068
2069         * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
2070         overflow for calls to undefined weak symbols.
2071
2072 2004-12-11  Alan Modra  <amodra@bigpond.net.au>
2073
2074         * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
2075         canonical sections syms have a name.
2076
2077 2004-12-11  Alan Modra  <amodra@bigpond.net.au>
2078
2079         * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
2080         have been adjusted for output.
2081         (ppc64_elf_relocate_section): Mark sections with reloc_done.
2082
2083 2004-12-10  Alan Modra  <amodra@bigpond.net.au>
2084
2085         * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
2086         add symtab_hdr param.
2087         (group_signature): Update calls.
2088         * elf-bfd.h (bfd_elf_sym_name): Update.
2089         * elf32-ppc.c (ppc_elf_relocate_section): Update.
2090         * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
2091         (ppc64_elf_relocate_section): Update.
2092         * elflink.c (elf_link_input_bfd): Update.
2093
2094 2004-12-10  Jakub Jelinek  <jakub@redhat.com>
2095
2096         * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
2097         st_shndx on STT_SECTION sections.
2098
2099 2004-12-09  Daniel Jacobowitz  <dan@codesourcery.com>
2100
2101         * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
2102         ELF section symbols.
2103
2104 2004-12-09  Ian Lance Taylor  <ian@wasabisystems.com>
2105
2106         * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
2107         return a real value, unless it is a PLT symbol.
2108         (mips_elf_perform_relocation): On the RM9000, turn a jal into a
2109         bal if possible.
2110
2111         * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
2112         R_MIPS_JALR entry to 0.
2113
2114         * archures.c: Define bfd_mach_mips9000.
2115         * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
2116         (mips_set_isa_flags): Handle bfd_mach_mips9000.
2117         * cpu-mips.c (I_mips9000): Define.
2118         (arch_info_struct): Add case for bfd_mach_mips9000.
2119         * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
2120         * bfd-in2.h: Regenerate.
2121
2122 2004-12-08  Ian Lance Taylor  <ian@wasabisystems.com>
2123
2124         * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
2125         overflow.
2126
2127 2004-12-07  Ben Elliston  <bje@gnu.org>
2128
2129         * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
2130
2131 2004-12-06  Daniel Jacobowitz  <dan@debian.org>
2132
2133         Suggested by Fergal Daly <fergal@esatclear.ie>:
2134         * simple.c (simple_dummy_multiple_definition): New function.
2135         (bfd_simple_get_relocated_section_contents): Use it.
2136
2137 2004-12-03  Jan Beulich  <jbeulich@novell.com>
2138
2139         * elf.c (elf_find_function): Don't use the last file symbol ever,
2140         seen, but the last one seen prior to the symbol being reported.
2141         Don't report a filename at all for global symbols when that might
2142         be ambiguous/wrong.
2143
2144 2004-12-01  Paul Brook  <paul@codesourcery.com>
2145
2146         * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
2147         (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
2148         version.
2149
2150 2004-12-01  Paul Brook  <paul@codesourcery.com>
2151
2152         * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
2153         sections undefined.
2154
2155 2004-11-30  Paul Brook  <paul@codesourcery.com>
2156
2157         * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
2158         no_pipeline_knowledge
2159         (elf32_arm_link_hash_table_create): Ditto.
2160         (bfd_elf32_arm_process_before_allocation): Ditto.
2161         (elf32_arm_final_link_relocate): Ditto.  Remove oabi relocation
2162         handling.
2163         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
2164         prototype.
2165         * bfd-in2.h: Regenerate.
2166
2167 2004-11-30  Randolph Chung  <tausq@debian.org>
2168
2169         * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
2170         (elf32_hppa_grok_psinfo): New function.
2171         (elf_backend_grok_prstatus): Define.
2172         (elf_backend_grok_psinfo): Define.
2173
2174 2004-11-24  H.J. Lu  <hongjiu.lu@intel.com>
2175
2176         PR 574:
2177         * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
2178
2179 2004-11-24  Paul Brook  <paul@codesourcery.com>
2180
2181         * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
2182
2183 2004-11-24  Paul Brook  <paul@codesourcery.com>
2184
2185         * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
2186         (elf32_arm_swap_symbol_out): New function.
2187         (elf32_arm_size_info): Add.
2188         (elf_backend_size_info): Define.
2189
2190 2004-11-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2191
2192         * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
2193         make_bfd_asection.
2194
2195 2004-11-19  Alan Modra  <amodra@bigpond.net.au>
2196
2197         * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
2198         * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
2199         * nlmcode.h (nlm_write_object_contents): Warning fix.
2200
2201 2004-11-18  Bob Wilson  <bob.wilson@acm.org>
2202
2203         * elf32-xtensa.c (ebb_propose_action): Fix argument order.
2204
2205 2004-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
2206
2207         * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
2208         (elf32_arm_plt_thumb_stub): New.
2209         (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
2210         and plt_got_offset.
2211         (elf32_arm_link_hash_traverse): Fix typo.
2212         (elf32_arm_link_hash_table): Add obfd.
2213         (elf32_arm_link_hash_newfunc): Initialize new fields.
2214         (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
2215         (elf32_arm_link_hash_table_create): Initialize obfd.
2216         (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
2217         (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
2218         (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
2219         interworking BFD is not dynamic.
2220         (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32.  Do
2221         not emit glue for PLT references.
2222         (elf32_arm_final_link_relocate): Handle Thumb functions.  Do not
2223         emit glue for PLT references.  Support the Thumb PLT prefix.
2224         (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
2225         plt_thumb_refcount.
2226         (elf32_arm_check_relocs): Likewise.
2227         (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
2228         plt_thumb_refcount.
2229         (allocate_dynrelocs): Handle Thumb PLT references.
2230         (elf32_arm_finish_dynamic_symbol): Likewise.
2231         (elf32_arm_symbol_processing): New function.
2232         (elf_backend_symbol_processing): Define.
2233
2234 2004-11-16  Richard Sandiford  <rsandifo@redhat.com>
2235
2236         * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
2237         add_fde_encoding.  Remove need_relative.
2238         * elf-eh-frame.c (extra_augmentation_string_bytes)
2239         (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
2240         (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
2241         in cases where the CIE has no existing 'R' augmentation.  Use
2242         size_of_output_cie_fde when assigning offsets.  Use the final offset
2243         as the new section size.
2244         (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
2245         Account for any extra augmentation bytes in the returned offset.
2246         (_bfd_elf_write_section_eh_frame): Rework so that the entries are
2247         moved before being modified.  Pad growing entries with DW_CFA_nops.
2248         Add 'z' and 'R' augmentations as directed by add_augmentation_size
2249         and add_fde_encoding.
2250
2251 2004-11-15  Mark Mitchell  <mark@codesourcery.com>
2252
2253         * elf32-arm.c (elf32_arm_relocate_section): Use
2254         arm_real_reloc_type.
2255
2256 2004-11-16  Richard Sandiford  <rsandifo@redhat.com>
2257
2258         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
2259         for discard relocations; don't add an R_MIPS_NONE to the main body
2260         of .rel.dyn.
2261
2262 2004-11-04  Paul Brook  <paul@codesourcery.com>
2263
2264         * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
2265         * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
2266         (_bfd_elf_slurp_version_tables): Add extra argument.  Create extra
2267         default version definition for unversioned symbols.
2268         * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
2269         * elflink.c (elf_link_add_object_symbols): Pass extra argument to
2270         _bfd_elf_slurp_version_tables.  Set default version for unversioned
2271         imported symbols.
2272
2273 2004-11-15  Paul Brook  <paul@codesourcery.com>
2274
2275         * elflink.c (elf_link_add_object_symbols): Don't assume version
2276         indices are consecutive.
2277
2278 2004-11-14  Richard Sandiford  <rsandifo@redhat.com>
2279
2280         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
2281         composite relocations against the personality data.
2282
2283 2004-11-13  Paul Brook  <paul@codesourcery.com>
2284
2285         * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
2286         R_ARM_PREL31 relocations to PLT entries.
2287         (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
2288         (elf32_arm_check_relocs): Ditto.
2289
2290 2004-11-12  Bob Wilson  <bob.wilson@acm.org>
2291
2292         * xtensa-isa.c (xtensa_interface_class_id): New.
2293
2294 2004-11-11  Bob Wilson  <bob.wilson@acm.org>
2295
2296         * elf32-xtensa.c (property_table_compare): Remove assertion about
2297         entries with the same address and non-zero size.
2298         (xtensa_read_table_entries): Report such entries as errors.
2299
2300 2004-11-11  Mark Mitchell  <mark@codesourcery.com>
2301
2302         * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
2303         R_ARM_RELATIVE on Symbian OS.
2304
2305 2004-11-09  Mark Mitchell  <mark@codesourcery.com>
2306
2307         * som.c (som_bfd_print_private_bfd_data): New function.
2308         (som_object_setup): Save the auxiliary header.  Don't assume that
2309         zero is an invalid entry point for a shared library.
2310         (som_object_p): Allocate the auxiliary header on the heap.
2311
2312         * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
2313         declaration.
2314         (elf32_arm_symbian_modify_segment_map): Likewise.
2315
2316 2004-11-09  Daniel Jacobowitz  <dan@debian.org>
2317
2318         From David Poole <daveml@mbuf.com>:
2319         * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
2320         (elf32_arm_size_dynamic_sections): Call it.
2321
2322 2004-11-09  Alan Modra  <amodra@bigpond.net.au>
2323
2324         * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
2325         (ALL_MACHINES_CFILES): Fix typo.
2326         * Makefile.in: Regenerate.
2327         * po/SRC-POTFILES.in: Regenerate.
2328
2329 2004-11-08  Mark Mitchell  <mark@codesourcery.com>
2330
2331         * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
2332         R_ARM_RELATIVE relocation for Symbian OS, mention the section
2333         symbol in the relocation.
2334
2335 2004-11-08  Inderpreet Singh  <inderpreetb@nioda.hcltech.com>
2336             Vineet Sharma  <vineets@noida.hcltech.com>
2337
2338         * coff-maxq.c: New File.
2339         * cpu-maxq.c: New File.
2340         * coffcode.h: Likewise.
2341         * config.bfd: Likewise.
2342         * configure.in (maxqcoff_vec): New target vector.
2343         * Makefile.am: Add support for maxq target.
2344         * configure.in: Likewise.
2345         * archures.c:. Likewise.
2346         * targets.c: Likewise.
2347         * bfd_in2.h : Regenerated.
2348         * Makefile.in: Regenerated.
2349         * configure: Regenerated.
2350         * doc/Makefile.in: Regenerated.
2351
2352 2004-11-08  Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2353
2354         * coff-i386.c (coff_i386_reloc): Fix weak symbols.
2355         * cofflink.c (_bfd_coff_link_input_bfd): Don't process
2356         C_NT_WEAK aux entries.
2357         (_bfd_coff_generic_relocate_section): Handle undefined
2358         aliases.
2359
2360 2004-11-07  Andreas Schwab  <schwab@suse.de>
2361
2362         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
2363         SYMBOL_CALLS_LOCAL and check for undefweak symbols with
2364         non-default visibility.
2365
2366 2004-11-01  Mark Mitchell  <mark@codesourcery.com>
2367
2368         * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
2369         D_PAGED.
2370         (elf32_arm_symbian_modify_segment_map): Don't
2371         reset includes_filehdr and includes_phdrs here.
2372
2373 2004-11-04  Daniel Jacobowitz  <dan@debian.org>
2374
2375         * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
2376         elfarm-nabi with elf32-arm.  Remove elfarm-oabi.
2377         (elf32-arm.lo): Replace elfarm-nabi.lo rule.  Remove elf32-arm.h
2378         dependency.
2379         * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
2380         to a new removed list.  Remove normal configuration stanzas.
2381         * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
2382         (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
2383         elfarm-nabi.lo with elf32-arm.lo.
2384         (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
2385         * elf32-arm.c: Renamed from elfarm-nabi.c.  Inline elf32-arm.h.
2386         * elf32-arm.h: Remove.
2387         * elfarm-oabi.c: Remove.
2388         * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
2389         and bfd_elf32_littlearm_oabi_vec.
2390         * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
2391
2392 2004-11-04  Hans-Peter Nilsson  <hp@axis.com>
2393
2394         * config.bfd: Support crisv32-*-* like cris-*-*.
2395         * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
2396         (bfd_mach_cris_v10_v32): New macros.
2397         * cpu-cris.c: Tweak formatting.
2398         (get_compatible): New function.
2399         (N): New macro.
2400         (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
2401         bfd_arch_info_type:s.
2402         (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
2403         get_compatible for member compatible and link bfd_cris_arch_v32 as
2404         next.
2405         * elf32-cris.c (cris_elf_pcrel_reloc)
2406         (cris_elf_set_mach_from_flags): New functions.
2407         (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
2408         <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
2409         (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
2410         numbers for bfd_mach_cris_v32.
2411         (PLT_ENTRY_SIZE_V32): New macro.
2412         (elf_cris_plt0_entry): Drop last comma in initializer.
2413         (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
2414         (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
2415         PLT initializers.
2416         (cris_elf_relocate_section): Change all "%B(%A)" messages to
2417         "%B, section %A".
2418         (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
2419         (elf_cris_finish_dynamic_sections): Similar.
2420         (elf_cris_adjust_dynamic_symbol): Similar.
2421         (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
2422         section %A".
2423         <switch with PIC relocs>: Emit error and return FALSE for
2424         bfd_mach_cris_v10_v32.
2425         <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
2426         Emit warning when generating textrel reloc.
2427         (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
2428         (cris_elf_final_write_processing): Set flags according to mach.
2429         (cris_elf_print_private_bfd_data): Display
2430         EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
2431         (cris_elf_merge_private_bfd_data): Drop variables old_flags,
2432         new_flags.  Don't call cris_elf_final_write_processing.  Don't
2433         look at the actual elf header flags at all; use
2434         bfd_get_symbol_leading_char to check ibfd, obfd.  Trap difference
2435         in bfd_get_mach for ibfd and obfd and handle merging of compatible
2436         objects.
2437         (bfd_elf32_bfd_copy_private_bfd_data): Define.
2438         * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
2439         (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
2440         (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
2441         * bfd-in2.h, libbfd.h: Regenerate.
2442
2443 2004-11-04  Alan Modra  <amodra@bigpond.net.au>
2444
2445         * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
2446         * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
2447         comment.
2448         (struct adjust_toc_info): New.
2449         (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
2450
2451 2004-11-03  Bob Wilson  <bob.wilson@acm.org>
2452
2453         * elf.c (assign_file_positions_for_segments): Set next_file_pos even
2454         if there are no segments.
2455
2456 2004-11-02  Daniel Jacobowitz  <dan@debian.org>
2457
2458         * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
2459
2460 2004-11-02  Nick Clifton  <nickc@redhat.com>
2461
2462         * elf32-iq2000.c: Convert to ISO C90 formatting.
2463
2464 2004-11-02  Hans-Peter Nilsson  <hp@axis.com>
2465
2466         * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
2467
2468 2004-10-28  H.J. Lu  <hongjiu.lu@intel.com>
2469
2470         * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
2471         undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
2472         R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
2473
2474 2004-10-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2475
2476         * elf32-sh.c (tpoff): Take alignment into account.
2477
2478 2004-10-28  Nick Clifton  <nickc@redhat.com>
2479
2480         * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
2481         performing a relocatable link.
2482         (iq2000_elf_object_p): Do not set elf_bad_symtab.  This is only
2483         for MIPS ports under Irix.
2484
2485 2004-10-27  Richard Earnshaw  <rearnsha@arm.com>
2486
2487         * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
2488         R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
2489         (elf32_arm_final_link_relocate): Ditto.
2490         (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
2491         (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
2492         (elf32_arm_adjust_dynamic_symbol): Ditto.
2493         * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
2494         R_ARM_JUMP32.  Move R_ARM_R{REL32,ABS32,PC24,BASE}...
2495         (elf32_arm_r_howto): ... To here.
2496         (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
2497
2498 2004-10-26  H.J. Lu  <hongjiu.lu@intel.com>
2499
2500         PR 475
2501         * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
2502         R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
2503         and R_IA64_SECREL64LSB.
2504
2505 2004-10-26  Paul Brook  <paul@codesourcery.com>
2506
2507         * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
2508         (bfd_elf_size_dynamic_sections): Create default version definition.
2509         (elf_link_output_extsym): Adjust for default symbol version.
2510
2511 2004-10-24  Hans-Peter Nilsson  <hp@bitrange.com>
2512
2513         * mmo.c: Adjust to ISO C.
2514
2515         * mmo.c (mmo_write_section_description): New function broken out
2516         of mmo_internal_write_section.
2517         (mmo_internal_write_section): For each of .text and .data, call
2518         mmo_write_section_description before outputting contents if it has
2519         nontrivially deducible vma or contents.
2520         (mmo_has_leading_or_trailing_zero_tetra_p): New function.
2521         (mmo_canonicalize_symtab): Adjust absolute symbols to .data
2522         symbols if found within the .data address range.
2523
2524 2004-10-24  Daniel Jacobowitz  <dan@debian.org>
2525
2526         * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
2527
2528 2004-10-24  Hans-Peter Nilsson  <hp@bitrange.com>
2529
2530         * mmo.c (File Layout): Correct place of misplaced blurb about
2531         special data.
2532
2533 2004-10-22  Mark Kettenis  <kettenis@gnu.org>
2534
2535         * config.bfd: Add mips64*-*-openbsd.
2536
2537 2004-10-21  Bob Wilson  <bob.wilson@acm.org>
2538
2539         * elf32-xtensa.c (ebb_propose_action): Put declarations before
2540         statements.
2541
2542 2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
2543
2544         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
2545         * configure: Regenerate.
2546
2547 2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
2548
2549         PR 463
2550         * aoutx.h (aout_link_input_section_std): Pass proper hash entry
2551         to linker reloc_overflow callback.
2552         (aout_link_input_section_ext): Likewise.
2553         (aout_link_reloc_link_order): Likewise.
2554         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
2555         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
2556         Likewise.
2557         (alpha_relocate_section): Likewise.
2558         * coff-arm.c (coff_arm_relocate_section): Likewise.
2559         * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
2560         * coff-h8500.c (extra_case): Likewise.
2561         * coff-i960.c (coff_i960_relocate_section): Likewise.
2562         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2563         * coff-mips.c (mips_relocate_section): Likewise.
2564         * coff-or32.c (coff_or32_relocate_section): Likewise.
2565         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2566         * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
2567         * coff-sh.c (sh_relocate_section): Likewise.
2568         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2569         * coff-w65.c (w65_reloc16_extra_cases): Likewise.
2570         * coff-z8k.c (extra_case): Likewise.
2571         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
2572         * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
2573         (_bfd_coff_generic_relocate_section): Likewise.
2574         * ecoff.c (ecoff_reloc_link_order): Likewise.
2575         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
2576         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
2577         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2578         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
2579         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
2580         * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
2581         * elf32-cris.c (cris_elf_relocate_section): Likewise.
2582         * elf32-crx.c (elf32_crx_relocate_section): Likewise.
2583         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
2584         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2585         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2586         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
2587         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2588         * elf32-i370.c (i370_elf_relocate_section): Likewise.
2589         * elf32-i386.c (elf_i386_relocate_section): Likewise.
2590         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2591         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2592         * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
2593         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2594         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
2595         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2596         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2597         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
2598         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2599         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2600         * elf32-s390.c (elf_s390_relocate_section): Likewise.
2601         * elf32-sh.c (sh_elf_relocate_section): Likewise.
2602         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2603         * elf32-v850.c (v850_elf_relocate_section): Likewise.
2604         * elf32-vax.c (elf_vax_relocate_section): Likewise.
2605         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2606         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2607         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
2608         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2609         * elf64-s390.c (elf_s390_relocate_section): Likewise.
2610         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2611         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2612         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2613         * elflink.c (elf_reloc_link_order): Likewise.
2614         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2615         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2616         (_bfd_elf_mips_get_relocated_section_contents): Likewise.
2617         * linker.c (_bfd_generic_reloc_link_order): Likewise.
2618         * pdp11.c (pdp11_aout_link_input_section): Likewise.
2619         (aout_link_reloc_link_order): Likewise.
2620         * reloc.c (bfd_generic_get_relocated_section_contents):
2621         Likewise.
2622         * xcofflink.c (xcoff_reloc_link_order): Likewise.
2623         * simple.c (simple_dummy_reloc_overflow): Updated.
2624
2625 2004-10-20  Andreas Schwab  <schwab@suse.de>
2626
2627         * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
2628         (elf_backend_plt_sym_val): Define.
2629
2630 2004-10-19  Danny Smith  <dannysmith@users.sourceforege.net>
2631
2632         * config.bfd: Set targ_underscore=yes for PE COFF targets
2633
2634 2004-10-19  Alan Modra  <amodra@bigpond.net.au>
2635
2636         * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
2637         (ppc64_elf_edit_opd): Likewise.
2638
2639 2004-10-18  Mark Mitchell  <mark@codesourcery.com>
2640
2641         * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
2642         * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
2643         set SEC_ALLOC and SEC_LOAD.
2644
2645 2004-10-18  Nick Clifton  <nickc@redhat.com>
2646
2647         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
2648         'name' for relocs against both local and global symbols.
2649
2650 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
2651
2652         * bfd-in2.h: Regenerate.
2653         * bfd.c (struct bfd): Add no_export.
2654         * elflink.c (elf_link_add_object_symbols): Handle no_export.
2655
2656 2004-10-15  Alan Modra  <amodra@bigpond.net.au>
2657
2658         * config.bfd: Whitespace cleanup.
2659         * Makefile.am: Run "make dep-am"
2660         * Makefile.in: Regenerate.
2661
2662 2004-10-15  Jakub Jelinek  <jakub@redhat.com>
2663
2664         * elflink.c (struct already_linked_section): Removed.
2665         (try_match_symbols_in_sections, already_linked): Removed.
2666         (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
2667         prefix of section names when finding already_linked_table
2668         chain.  Compare section names.  Instead of calling already_linked,
2669         do it inline and only for sections in the same already_linked_list.
2670
2671 2004-10-15  Alan Modra  <amodra@bigpond.net.au>
2672
2673         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
2674         parameter.  If called after _bfd_elf_write_section_eh_frame,
2675         don't allow a -2 return unless need_* bit is already set, and
2676         handle offsets adjusted for output_offset.
2677         * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
2678         * elf.c (_bfd_elf_section_offset): Update call.
2679
2680 2004-10-13  H.J. Lu  <hongjiu.lu@intel.com>
2681
2682         PR 440
2683         * coffcode.h (coff_compute_section_file_positions): Cast to
2684         bfd_vma when computing page alignment.
2685
2686 2004-10-13  Mark Mitchell  <mark@codesourcery.com>
2687
2688         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
2689         offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
2690
2691 2004-10-12  Mark Mitchell  <mark@codesourcery.com>
2692
2693         * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
2694         relocations use a virtual address, not a section offset.
2695
2696 2004-10-12  Bob Wilson  <bob.wilson@acm.org>
2697
2698         * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
2699         (narrow_instruction, widen_instruction): Remove unnecessary calls to
2700         xtensa_format_encode.
2701         (ebb_propose_action): Inline call to ebb_add_proposed_action.
2702         (ebb_add_proposed_action): Delete.
2703
2704 2004-10-12  Bob Wilson  <bob.wilson@acm.org>
2705
2706         * elf32-xtensa.c: Use ISO C90 formatting.
2707
2708 2004-10-12  Paul Brook  <paul@codesourcery.com>
2709
2710         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
2711         message.
2712
2713 2004-10-12  Paul Brook  <paul@codesourcery.com>
2714
2715         * elf32-arm.h: Support EABI version 4 objects.
2716
2717 2004-10-12  Alan Modra  <amodra@bigpond.net.au>
2718
2719         PR 325
2720         * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
2721         Don't mark as default.
2722         (bfd_x86_64_arch): Don't mark as default.
2723
2724 2004-10-12  Alan Modra  <amodra@bigpond.net.au>
2725
2726         * elflink.c (enum action_discarded): New.
2727         (elf_section_complain_discarded): Delete.
2728         (elf_action_discarded): New function subsuming the above and also
2729         controlling reloc behaviour.
2730         (elf_link_input_bfd): Use it.
2731
2732 2004-10-11  Jakub Jelinek  <jakub@redhat.com>
2733
2734         * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
2735         (special_sections): Add .gnu.liblist and .gnu.conflict.
2736         (assign_section_numbers): Handle SHT_GNU_LIBLIST.
2737
2738 2004-10-11  Alan Modra  <amodra@bigpond.net.au>
2739
2740         PR 233
2741         * elflink.c (elf_link_input_bfd): Try harder to support
2742         relocations against symbols in removed linkonce sections.
2743
2744 2004-10-11  Alan Modra  <amodra@bigpond.net.au>
2745
2746         * elflink.c (elf_link_input_bfd): Revert PR 354 change.
2747
2748         PR 354
2749         * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
2750         sections do not reference symbols in non-SEC_ALLOC sections.
2751
2752 2004-10-11  Alan Modra  <amodra@bigpond.net.au>
2753
2754         PR 437
2755         * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
2756         (_bfd_elf_link_omit_section_dynsym): Formatting.
2757
2758 2004-10-10  Alan Modra  <amodra@bigpond.net.au>
2759
2760         * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
2761         * libbfd.h: Regnerate.
2762         * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
2763         * elf32-frv.c: Likewise.
2764         * elf32-m32r.c: Likewise.
2765         * elf32-ppc.c: Likewise.
2766         * elf64-hppa.c: Likewise.
2767         * elfxx-ia64.c: Likewise.
2768         * opncls.c: Likewise.
2769
2770 2004-10-10  Alan Modra  <amodra@bigpond.net.au>
2771
2772         * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
2773         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
2774         offsets stored in struct eh_cie_fde entries before doing other
2775         work.
2776
2777         * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
2778         (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
2779         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
2780         setting offsets for removed CIEs.  Don't set "sec", instead set
2781         cie_inf for FDEs.  Keep a pointer to last struct eh_cie_fde for a
2782         CIE in hdr_info.  Only set make_relative and make_lsda_relative
2783         for CIEs.  Use pointers rather than array indices.
2784         (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
2785         make_lsda_relative, need_* on cie_inf for FDEs.
2786         (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
2787         section output_offset.  Delete cie_offset, instead use cie_inf
2788         pointer to CIE entry.  Use need_relative and need_lsda_relative on
2789         CIE entry for FDEs.  Use pointers rather than array indices.
2790
2791 2004-10-09  Alan Modra  <amodra@bigpond.net.au>
2792
2793         * coff-rs6000.c (rs6000coff_vec): Add initializer for
2794         bfd_is_target_special_symbol.
2795         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2796         * som.c (som_bfd_is_target_special_symbol): Define.
2797
2798 2004-10-08  Nick Clifton  <nickc@redhat.com>
2799
2800         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
2801         * configure: Regenerate.
2802         * bfd-in2.h: Regenerate.
2803         * syms.c (bfd_is_target_special_symbol): New interface function.
2804         Returns true when a symbol should be considered to be special.
2805         * targets.c (bfd_target): Include bfd_is_target_special_symbol in
2806         the symbol jump table.
2807         * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
2808         Return true iff the symbol is a mapping symbol.
2809         (bfd_elf32_bfd_is_target_special_symbol): Define.
2810         * elfxx-target.h: Provide a default definition for
2811         bfd_is_target_special_symbol.
2812         * aout-target.h: Likewise.
2813         * aout-tic30.c: Likewise.
2814         * binary.c: Likewise.
2815         * coffcode.h: Likewise.
2816         * i386msdos.c: Likewise.
2817         * ieee.c: Likewise.
2818         * ihex.c: Likewise.
2819         * libaout.h: Likewise.
2820         * libbfd-in.h: Likewise
2821         * libecoff.h: Likewise.
2822         * mach-o.c: Likewise.
2823         * mmo.c: Likewise.
2824         * nlm-target.h: Likewise.
2825         * oasys.c: Likewise.
2826         * pef.c: Likewise.
2827         * ppcboot.c: Likewise.
2828         * srec.c: Likewise.
2829         * tekhex.c: Likewise.
2830         * versados.c: Likewise.
2831         * vms.c: Likewise.
2832         * xcoff-target.h: Likewise.
2833         * xsym.c: Likewise.
2834         * libbfd.h: Regenerate.
2835
2836 2004-10-08  Daniel Jacobowitz  <dan@debian.org>
2837
2838         * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
2839         * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
2840         (elf_backend_section_from_shdr): Define.
2841
2842 2004-10-08  Alan Modra  <amodra@bigpond.net.au>
2843
2844         * syms.c (bfd_is_local_label): Return false for file symbols.
2845
2846 2004-10-07  Bob Wilson  <bob.wilson@acm.org>
2847             David Heine  <dlheine@tensilica.com>
2848
2849         * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
2850         (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
2851         (elf32xtensa_no_literal_movement): New global variable.
2852         (elf_howto_table): Add entries for new relocations.
2853         (elf_xtensa_reloc_type_lookup): Handle new relocations.
2854         (property_table_compare): When addresses are equal, compare sizes and
2855         various property flags.
2856         (property_table_matches): New.
2857         (xtensa_read_table_entries): Extend to read new property tables.  Add
2858         output_addr parameter to indicate that output addresses should be used.
2859         Use bfd_get_section_limit.
2860         (elf_xtensa_find_property_entry): New.
2861         (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
2862         (elf_xtensa_check_relocs): Handle new relocations.
2863         (elf_xtensa_do_reloc): Use bfd_get_section_limit.  Handle new
2864         relocations.  Use new xtensa-isa.h functions.
2865         (build_encoding_error_message): Remove encode_result parameter.  Add
2866         new target_address parameter used to detect alignment errors.
2867         (elf_xtensa_relocate_section): Use bfd_get_section_limit.  Clean up
2868         error handling.  Use new is_operand_relocation function.
2869         (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
2870         Use underbar macro for error messages.  Formatting.
2871         (get_const16_opcode): New.
2872         (get_l32r_opcode): Add a separate flag for initialization.
2873         (get_relocation_opnd): Operand number is no longer explicit in the
2874         relocation.  Change to decode the opcode and analyze its operands.
2875         (get_relocation_slot): New.
2876         (get_relocation_opcode): Add bfd parameter.  Use bfd_get_section_limit.
2877         Use new xtensa-isa.h functions to handle multislot instructions.
2878         (is_l32r_relocation): Add bfd parameter.  Use is_operand_relocation.
2879         (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
2880         insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
2881         check_loop_aligned, check_branch_target_aligned_address, narrowable,
2882         widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
2883         get_single_format, init_op_single_format_table): New.
2884         (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
2885         instead of calling _bfd_error_handler.  Use new xtensa-isa.h functions.
2886         (contract_asm_expansion): Add error_message parameter and pass it to
2887         elf_xtensa_do_asm_simplify.  Replace use of R_XTENSA_OP0 relocation
2888         with R_XTENSA_SLOT0_OP.
2889         (get_expanded_call_opcode): Extend to handle either L32R or CONST16
2890         instructions.  Use new xtensa-isa.h functions.
2891         (r_reloc struct): Add new virtual_offset field.
2892         (r_reloc_init): Add contents and content_length parameters.  Set
2893         virtual_offset field to zero.  Add contents to target_offset field for
2894         partial_inplace relocations.
2895         (r_reloc_is_defined): Check for null.
2896         (print_r_reloc): New debug function.
2897         (source_reloc struct): Replace xtensa_operand field with pair of the
2898         opcode and the operand position.  Add is_abs_literal field.
2899         (init_source_reloc): Specify operand by opcode/position pair.  Set
2900         is_abs_literal field.
2901         (source_reloc_compare): When target_offsets are equal, compare other
2902         fields to make sorting predictable.
2903         (literal_value struct): Add is_abs_literal field.
2904         (value_map_hash_table struct): Add has_last_loc and last_loc fields.
2905         (init_literal_value): New.
2906         (is_same_value): Replace with ...
2907         (literal_value_equal): ... this function.  Add comparisons of
2908         virtual_offset and is_abs_literal fields.
2909         (value_map_hash_table_init): Use bfd_zmalloc.  Check for allocation
2910         failure.  Initialize has_last_loc field.
2911         (value_map_hash_table_delete): New.
2912         (hash_literal_value): Rename to ...
2913         (literal_value_hash): ... this.  Include is_abs_literal flag and
2914         virtual_offset field in the hash value.
2915         (get_cached_value): Rename to ...
2916         (value_map_get_cached_value): ... this.  Update calls to
2917         literal_value_hash and literal_value_equal.
2918         (add_value_map): Check for allocation failure.  Update calls to
2919         value_map_get_cached_value and literal_value_hash.
2920         (text_action, text_action_list, text_action_t): New types.
2921         (find_fill_action, compute_removed_action_diff, adjust_fill_action,
2922         text_action_add, text_action_add_literal, offset_with_removed_text,
2923         offset_with_removed_text_before_fill, find_insn_action,
2924         print_action_list, print_removed_literals): New.
2925         (offset_with_removed_literals): Delete.
2926         (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
2927         fix_array, fix_array_count, allocated_relocs, relocs_count, and
2928         allocated_relocs_count fields.
2929         (init_xtensa_relax_info): Initialize new fields.
2930         (reloc_bfd_fix struct): Add new translated field.
2931         (reloc_bfd_fix_init): Add translated parameter and use it to set the
2932         translated field.
2933         (fix_compare, cache_fix_array): New.
2934         (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
2935         section via get_xtensa_relax_info.  Use cache_fix_array to set up
2936         sorted fix_array and use bsearch instead of linear search.
2937         (section_cache_t): New struct.
2938         (init_section_cache, section_cache_section, clear_section_cache): New.
2939         (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
2940         (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
2941         extend_ebb_bounds_forward, extend_ebb_bounds_backward,
2942         insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
2943         New.
2944         (retrieve_contents): Use bfd_get_section_limit.
2945         (elf_xtensa_relax_section): Add relocations_analyzed flag.  Update call
2946         to compute_removed_literals.  Free value_map_hash_table when no longer
2947         needed.
2948         (analyze_relocations): Check is_relaxable_asm_section flag.  Call
2949         compute_text_actions for all sections.
2950         (find_relaxable_sections): Mark sections as relaxable if they contain
2951         ASM_EXPAND relocations that can be optimized.  Adjust r_reloc_init
2952         call.  Increment relax_info src_count field only for appropriate
2953         relocation types.  Remove is_literal_section check.
2954         (collect_source_relocs): Use bfd_get_section_limit.  Adjust calls to
2955         r_reloc_init and find_associated_l32r_irel.  Check
2956         is_relaxable_asm_section flag.  Handle L32R instructions with absolute
2957         literals.  Pass is_abs_literal flag to init_source_reloc.
2958         (is_resolvable_asm_expansion): Use bfd_get_section_limit.  Check for
2959         CONST16 instructions.  Adjust calls to r_reloc_init and
2960         pcrel_reloc_fits.  Handle weak symbols conservatively.
2961         (find_associated_l32r_irel): Add bfd parameter and pass it to
2962         is_l32r_relocation.
2963         (compute_text_actions, compute_ebb_proposed_actions,
2964         compute_ebb_actions, check_section_ebb_pcrels_fit,
2965         check_section_ebb_reduces, text_action_add_proposed,
2966         compute_fill_extra_space): New.
2967         (remove_literals): Replace with ...
2968         (compute_removed_literals): ... this function.  Call
2969         init_section_cache.  Use bfd_get_section_limit.  Sort internal_relocs.
2970         Call xtensa_read_table_entries to get the property table.  Skip
2971         relocations other than R_XTENSA_32 and R_XTENSA_PLT.  Use new
2972         is_removable_literal, remove_dead_literal, and
2973         identify_literal_placement functions.
2974         (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
2975         instead of linear search.
2976         (is_removable_literal, remove_dead_literal,
2977         identify_literal_placement): New.
2978         (relocations_reach): Update check for literal not referenced by any
2979         PC-relative relocations.  Adjust call to pcrel_reloc_fits.
2980         (coalesce_shared_literal, move_shared_literal): New.
2981         (relax_section): Use bfd_get_section_limit.  Call
2982         translate_section_fixes.  Update calls to r_reloc_init and
2983         offset_with_removed_text.  Check new is_relaxable_asm_section flag.
2984         Add call to pin_internal_relocs.  Add special handling for
2985         R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs.  Use virtual_offset
2986         info to calculate new addend_displacement variable.  Replace code for
2987         deleting literals with more general code to perform the actions
2988         determined by the action_list for the section.
2989         (translate_section_fixes, translate_reloc_bfd_fix): New.
2990         (translate_reloc): Check new is_relaxable_asm_section flag.  Call
2991         find_removed_literal only if is_operand_relocation.  Update call to
2992         offset_with_removed_text.  Use new target_offset and removed_bytes
2993         variables.
2994         (move_literal): New.
2995         (relax_property_section):  Use bfd_get_section_limit.  Set new
2996         is_full_prop_section flag and handle new property tables.  Update calls
2997         to r_reloc_init and offset_with_removed_text.  Check
2998         is_relaxable_asm_section flag.  Handle expansion of zero-sized
2999         unreachable entries, with use of offset_with_removed_text_before_fill.
3000         For relocatable links, combine entries only for literal tables.
3001         (relax_section_symbols): Check is_relaxable_asm_section flag.  Update
3002         calls to offset_with_removed_text.  Translate st_size field for
3003         function symbols.
3004         (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
3005         failure.  Add contents parameter.  Update call to get_bfd_fix.  Update
3006         call to r_reloc_init.  Call _bfd_error_handler and return FALSE for
3007         R_XTENSA_ASM_EXPAND relocs.
3008         (do_fix_for_final_link): Add input_bfd and contents parameters.  Update
3009         call to get_bfd_fix.  Include offset from contents for partial_inplace
3010         relocations.
3011         (is_reloc_sym_weak): New.
3012         (pcrel_reloc_fits): Use new xtensa-isa.h functions.
3013         (prop_sec_len): New.
3014         (xtensa_is_property_section): Handle new property sections.
3015         (is_literal_section): Delete.
3016         (internal_reloc_compare): When r_offset matches, compare r_info and
3017         r_addend to make sorting predictable.
3018         (internal_reloc_matches): New.
3019         (xtensa_get_property_section_name): Handle new property sections.
3020         (xtensa_get_property_predef_flags): New.
3021         (xtensa_callback_required_dependence): Use bfd_get_section_limit.
3022         Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
3023         * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
3024         (xtisa_errno, xtisa_error_msg): New variables.
3025         (xtensa_isa_errno, xtensa_isa_error_msg): New.
3026         (xtensa_insnbuf_alloc): Add error handling.
3027         (xtensa_insnbuf_to_chars): Add num_chars parameter.  Update to
3028         use xtensa_format_decode.  Add error handling.
3029         (xtensa_insnbuf_from_chars): Add num_chars parameter.  Decode the
3030         instruction length to find the number of bytes to copy.
3031         (xtensa_isa_init): Add error handling.  Replace calls to
3032         xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
3033         tables in the xtensa_modules structure.
3034         (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
3035         xtensa_extend_isa): Delete.
3036         (xtensa_isa_free): Change to only free lookup tables.
3037         (opname_lookup_compare): Replace with ...
3038         (xtensa_isa_name_compare): ... this function.  Use strcasecmp.
3039         (xtensa_insn_maxlength): Rename to ...
3040         (xtensa_isa_maxlength): ... this.
3041         (xtensa_insn_length): Delete.
3042         (xtensa_insn_length_from_first_byte): Replace with ...
3043         (xtensa_isa_length_from_chars): ... this function.
3044         (xtensa_num_opcodes): Rename to ...
3045         (xtensa_isa_num_opcodes): ... this.
3046         (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
3047         xtensa_isa_num_regfiles, xtensa_isa_num_stages,
3048         xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
3049         xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
3050         xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
3051         xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
3052         xtensa_format_get_slot, xtensa_format_set_slot): New functions.
3053         (xtensa_opcode_lookup): Add error handling.
3054         (xtensa_decode_insn): Replace with ...
3055         (xtensa_opcode_decode): ... this function, with new format and
3056         slot parameters.  Add error handling.
3057         (xtensa_encode_insn): Replace with ...
3058         (xtensa_opcode_encode): ... this function, which does the encoding via
3059         one of the entries in the "encode_fns" array.  Add error handling.
3060         (xtensa_opcode_name): Add error handling.
3061         (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
3062         xtensa_opcode_is_call): New.
3063         (xtensa_num_operands): Replace with ...
3064         (xtensa_opcode_num_operands): ... this function.  Add error handling.
3065         (xtensa_opcode_num_stateOperands,
3066         xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
3067         xtensa_opcode_funcUnit_use, xtensa_operand_name,
3068         xtensa_operand_is_visible): New.
3069         (xtensa_get_operand, xtensa_operand_kind): Delete.
3070         (xtensa_operand_inout): Add error handling and special-case for
3071         "sout" operands.
3072         (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
3073         operate on one slot of an instruction.  Added error handling.
3074         (xtensa_operand_encode): Handle default operands with no encoding
3075         functions.  Check for success by comparing against decoded value.
3076         Add error handling.
3077         (xtensa_operand_decode): Handle default operands.  Return decoded value
3078         through argument pointer.  Add error handling.
3079         (xtensa_operand_is_register, xtensa_operand_regfile,
3080         xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
3081         (xtensa_operand_isPCRelative): Rename to ...
3082         (xtensa_operand_is_PCrelative): ... this.  Add error handling.
3083         (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
3084         through argument pointer.  Add error handling.
3085         (xtensa_stateOperand_state, xtensa_stateOperand_inout,
3086         xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
3087         xtensa_regfile_lookup_shortname, xtensa_regfile_name,
3088         xtensa_regfile_shortname, xtensa_regfile_view_parent,
3089         xtensa_regfile_num_bits, xtensa_regfile_num_entries,
3090         xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
3091         xtensa_state_is_exported, xtensa_sysreg_lookup,
3092         xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
3093         xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
3094         xtensa_interface_num_bits, xtensa_interface_inout,
3095         xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
3096         xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
3097         * xtensa-modules.c: Rewrite to use new data structures.
3098         * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
3099         BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
3100         BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
3101         BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
3102         BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
3103         BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
3104         BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
3105         BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
3106         BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
3107         BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
3108         BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
3109         BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
3110         BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
3111         BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
3112         BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
3113         BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
3114         BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
3115         * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
3116         * Makefile.in: Regenerate.
3117         * bfd-in2.h: Likewise.
3118         * libbfd.h: Likewise.
3119
3120 2004-10-07  Richard Sandiford  <rsandifo@redhat.com>
3121
3122         * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
3123         against the absolute section.
3124         (mips_elf64_write_rela): Likewise.
3125
3126 2004-10-07  Jan Beulich <jbeulich@novell.com>
3127
3128         * elf.c (elf_find_function): Don't generally check for matching
3129         section, just for non-file symbols.  Remove redunant comparison
3130         for the latter.
3131         * elf32-arm.h (arm_elf_find_function): Likewise.
3132
3133 2004-10-07  Jeff Baker  <jbaker@qnx.com>
3134
3135         * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
3136         adding a DT_TEXTREL to a shared object and --warn-shared-textrel
3137         was specified.
3138
3139 2004-10-04  Roland McGrath  <roland@redhat.com>
3140
3141         * hash.c (bfd_hash_set_default_size): Use const for table.
3142         Use size_t instead of int for variable compared to sizeof results.
3143
3144 2004-10-05  Alan Modra  <amodra@bigpond.net.au>
3145
3146         PR 425
3147         * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
3148
3149 2004-10-01  Paul Brook  <paul@codesourcery.com>
3150
3151         * elf32-arm.h (elf32_arm_fake_sections,
3152         is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
3153         functions.
3154         (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
3155
3156 2004-10-01  Alan Modra  <amodra@bigpond.net.au>
3157
3158         * elf-bfd.h (struct eh_cie_fde): Add need_relative and
3159         need_lsda_relative.
3160         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
3161         need_relative or need_lsda_relative if we are processing an
3162         offset for a reloc on a FDE initial loc or LSDA field
3163         respectively.
3164         (_bfd_elf_write_section_eh_frame): Test need_relative and
3165         need_lsda_relative in place of corresponding make_* field
3166         when deciding to use pc-relative encodings.
3167
3168 2004-09-30  Paul Brook  <paul@codesourcery.com>
3169
3170         * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
3171         target2 relocation type.
3172
3173 2004-09-30  H.J. Lu  <hongjiu.lu@intel.com>
3174
3175         PR 414
3176         * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
3177
3178 2004-09-30  Paul Brook  <paul@codesourcery.com>
3179
3180         * reloc.c: Add BFD_RELOC_ARM_SMI.
3181         * bfd-in2.h: Regenerate.
3182         * libbfd.h: Ditto.
3183
3184 2004-09-24  Alan Modra  <amodra@bigpond.net.au>
3185
3186         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
3187         vma and output offset to address.
3188         * simple.c (simple_save_output_info): Only set output section
3189         and offset for debug sections, or those not already set up by
3190         the linker.
3191         (bfd_simple_get_relocated_section_contents): Update comment.
3192
3193 2004-09-24  Alan Modra  <amodra@bigpond.net.au>
3194
3195         * elf.c (IS_LOADED): Delete.
3196         (assign_file_positions_for_segments): Just test SEC_LOAD instead.
3197         Restore SEC_HAS_CONTENTS test to the one place it was used prior
3198         to 2004-09-22.
3199
3200 2004-09-23  Alan Modra  <amodra@bigpond.net.au>
3201
3202         PR gas/396
3203         * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
3204         bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite.  Remove
3205         redundant assignment of EM_SPARC.
3206
3207 2004-09-22  Brian Ford  <ford@vss.fsi.com>
3208
3209         * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
3210         alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
3211         constants.
3212         * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3213
3214 2004-09-22  Alan Modra  <amodra@bigpond.net.au>
3215
3216         * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
3217         (elf_backend_modify_segment_map): Don't define.
3218
3219 2004-09-22  Alan Modra  <amodra@bigpond.net.au>
3220
3221         * elf.c (IS_LOADED): Define.
3222         (assign_file_positions_for_segments): Don't round up file offset of
3223         PT_LOAD segments containing no SEC_LOAD sections, instead round down.
3224         Delete code handling link script adjustment of lma.  Do the adjust
3225         in later code handling similar ajustments.  Remove dead code error
3226         check.  Warn if section lma would require a negative offset
3227         adjustment.  Tweak lma adjustment to use p_filesz rather than p_memsz.
3228         Use p_vaddr + p_memsz inside section loop in place of voff.  Don't
3229         update voff in section loop.  Change voff in segment loop to be an
3230         adjustment on top of "off".  Set sec->filepos and update "off" later.
3231         Test for loadable sections consistently using IS_LOADED.  Similarly,
3232         test for alloc-only sections other than .tbss consistently.
3233         Don't bother checking SEC_ALLOC in PT_LOAD segments.  Remove FIXME.
3234         Tidy PT_NOTE handling.  Use %B and %A in error messages.
3235         (assign_file_positions_except_relocs): Use %B in error message.
3236
3237 2004-09-17  H.J. Lu  <hongjiu.lu@intel.com>
3238
3239         * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
3240         (CONFIG_STATUS_DEPENDENCIES): New.
3241         (Makefile): Removed.
3242         (config.status): Likewise.
3243         * Makefile.in: Regenerated.
3244
3245 2004-09-17  Paul Brook  <paul@codesourcery.com>
3246
3247         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
3248         (bfd_elf32_arm_process_before_allocation): Update prototype.
3249         * bfd-in2.h: Regenerate.
3250         * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
3251         (elf32_arm_link_hash_table_create): Set it.
3252         (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
3253         (bfd_elf32_arm_set_target_relocs): New function.
3254         (arm_real_reloc_type): New function.
3255         (elf32_arm_final_link_relocate): Use it.  Handle R_ARM_PREL31 and
3256         R_ARM_GOT_PREL.  Remove R_ARM_TARGET1.
3257         (elf32_arm_gc_sweep_hook): Ditto.
3258         (elf32_arm_check_relocs): Ditto.
3259         (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
3260         * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
3261         R_ARM_GOT_TARGET2.
3262         (elf32_arm_got_prel): New variable.
3263         (elf32_arm_howto_from_type): New function.
3264         (elf32_arm_info_to_howto): Use it.
3265         (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
3266         BFD_RELOC_ARM_TARGET2.
3267         * libbfd.h: Regenerate.
3268         * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
3269
3270 2004-09-17  Alan Modra  <amodra@bigpond.net.au>
3271
3272         * ecoff.c: Update u.undef.next refs.
3273         * elf64-ppc.c: Likewise.
3274         * elflink.c: Likewise.
3275         * linker.c: Likewise.
3276         * xcofflink.c: Likewise.
3277
3278         * elf-bfd.h (struct elf_link_hash_entry): Rearrange.  Add FIXME to
3279         dynamic_def.  Combine weakdef and elf_hash_value.  Move vtable
3280         fields to indirect struct.
3281         * elf-m10300.c: Update u.weakdef refs.
3282         * elf32-arm.h: Likewise.
3283         * elf32-cris.c: Likewise.
3284         * elf32-frv.c: Likewise.
3285         * elf32-hppa.c: Likewise.
3286         * elf32-i370.c: Likewise.
3287         * elf32-i386.c: Likewise.
3288         * elf32-m32r.c: Likewise.
3289         * elf32-m68k.c: Likewise.
3290         * elf32-ppc.c: Likewise.
3291         * elf32-s390.c: Likewise.
3292         * elf32-sh.c: Likewise.
3293         * elf32-sparc.c: Likewise.
3294         * elf32-vax.c: Likewise.
3295         * elf32-xtensa.c: Likewise.
3296         * elf64-alpha.c: Likewise.
3297         * elf64-hppa.c: Likewise.
3298         * elf64-ppc.c: Likewise.
3299         * elf64-s390.c: Likewise.
3300         * elf64-sh64.c: Likewise.
3301         * elf64-sparc.c: Likewise.
3302         * elf64-x86-64.c: Likewise.
3303         * elfxx-ia64.c: Likewise.
3304         * elfxx-mips.c: Likewise.
3305         * elflink.c: Likewise.  Also u.elf_hash_value.
3306         (elf_gc_propagate_vtable_entries_used): Update for h->vtable
3307         indirection.
3308         (elf_gc_smash_unused_vtentry_relocs): Likewise.
3309         (bfd_elf_gc_record_vtinherit): Alloc vtable.
3310         (bfd_elf_gc_record_vtentry): Likewise.
3311         * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
3312
3313 2004-09-17  Alan Modra  <amodra@bigpond.net.au>
3314
3315         * Makefile.am: Run "make dep-am".
3316         * Makefile.in: Regenerate.
3317         * bfd-in2.h: Regenerate.
3318         * po/SRC-POTFILES.in: Regenerate.
3319         * po/bfd.pot: Regenerate.
3320
3321 2004-09-16  Alan Modra  <amodra@bigpond.net.au>
3322
3323         * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
3324         with bitfields.  Make "type" and "other" bitfields too.
3325         (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
3326         ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
3327         ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
3328         ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
3329         ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
3330         ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
3331         ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
3332         (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
3333         * elf-hppa.h: Update all uses of elf_link_hash_flags.
3334         * elf-m10300.c: Likewise.
3335         * elf.c: Likewise.
3336         * elf32-arm.h: Likewise.
3337         * elf32-cris.c: Likewise.
3338         * elf32-frv.c: Likewise.
3339         * elf32-hppa.c: Likewise.
3340         * elf32-i370.c: Likewise.
3341         * elf32-i386.c: Likewise.
3342         * elf32-m32r.c: Likewise.
3343         * elf32-m68k.c: Likewise.
3344         * elf32-ppc.c: Likewise.
3345         * elf32-s390.c: Likewise.
3346         * elf32-sh-symbian.c: Likewise.
3347         * elf32-sh.c: Likewise.
3348         * elf32-sh64.c: Likewise.
3349         * elf32-sparc.c: Likewise.
3350         * elf32-vax.c: Likewise.
3351         * elf32-xtensa.c: Likewise.
3352         * elf64-alpha.c: Likewise.
3353         * elf64-hppa.c: Likewise.
3354         * elf64-ppc.c: Likewise.
3355         * elf64-s390.c: Likewise.
3356         * elf64-sh64.c: Likewise.
3357         * elf64-sparc.c: Likewise.
3358         * elf64-x86-64.c: Likewise.
3359         * elflink.c: Likewise.
3360         * elfxx-ia64.c: Likewise.
3361         * elfxx-mips.c: Likewise.
3362         * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
3363         * configure: Regenerate.
3364         * aclocal.m4: Regenerate.
3365
3366 2004-09-16  Alan Modra  <amodra@bigpond.net.au>
3367
3368         * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
3369         around uses of R_ARM_TARGET1.
3370         (elf32_arm_check_relocs): Likewise.
3371
3372 2004-09-13  Paul Brook  <paul@codesourcery.com>
3373
3374         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
3375         prototype.
3376         * bfd-in2.h: Regenerate.
3377         * libbfd.h: Regenerate.
3378         * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
3379         (elf32_arm_link_hash_table_create): Set target1_is_rel.
3380         (bfd_elf32_arm_process_before_allocation): Ditto.
3381         (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
3382         (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
3383         * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
3384         * reloc.c: Ditto.
3385
3386 2004-09-10  Joel Brobecker  <brobecker@gnat.com>
3387
3388         * hpux-core.c (thread_section_p): New function.
3389         (hpux_core_core_file_p): Fix computation of offset in call
3390         to bfd_seek. Create a ".reg" section from an arbitrary
3391         ".reg/<id>" section if none was created after having read
3392         all sections.
3393
3394 2004-09-11  Andreas Schwab  <schwab@suse.de>
3395
3396         * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
3397         * aclocal.m4: Rebuild.
3398         * configure: Rebuild.
3399
3400 2004-09-10  Joel Brobecker  <brobecker@gnat.com>
3401
3402         * section.c (bfd_sections_find_if): Fix parameter name in
3403         comment to match code.
3404
3405 2004-09-10  Alan Modra  <amodra@bigpond.net.au>
3406
3407         * elf.c  (assign_file_positions_except_relocs): Assign relocs
3408         stored in a bfd section.
3409
3410 2004-09-08  Hans-Peter Nilsson  <hp@axis.com>
3411
3412         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
3413         h->gotplt_refcount to 0, not -1.
3414
3415 2004-09-07  Hans-Peter Nilsson  <hp@axis.com>
3416
3417         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
3418         case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
3419         symname.
3420         (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
3421         handle symbol visibility here.
3422
3423 2004-09-07  Alan Modra  <amodra@bigpond.net.au>
3424
3425         * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
3426         (is_ppc64_elf_target): Rename from is_ppc64_target.  Update all
3427         callers.
3428         (ppc_stub_name): Remove trailing "+0" on stub name.
3429         (create_linkage_sections): Create relocations for
3430         branch lookup table when --emit-relocs as well as when --shared.
3431         (ppc_build_one_stub): Emit relocs for long branch stubs.  Adjust
3432         relbrlt test.  For --emit-stub-syms, always output a sym even when
3433         one already exists on a plt call stub.  Put stub type in the stub
3434         symbol name.
3435         (ppc_size_one_stub): Size long branch stub relocs.  Adjust relbrlt
3436         test.
3437         (ppc64_elf_size_stubs): Count global sym stubs added.  Zero
3438         reloc_count in stub sections.  Adjust relbrlt test.
3439         (ppc64_elf_build_stubs): Adjust relbrlt test.  Tweak stats output.
3440         * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
3441         (elf_link_input_bfd): Ignore symbol index zero relocs when checking
3442         for relocs against discarded symbols.  Fix comments.
3443
3444 2004-09-06  Mark Mitchell  <mark@codesourcery.com>
3445
3446         * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
3447         * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
3448         from ...
3449         (map_sections_to_segments): ... here.  Use it.  Assign a file
3450         position to the .dynamic section if it is not loadable, but part
3451         of the PT_DYNAMIC segment.
3452         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
3453         offsets, not VMAs, for the BPABI.  Do not fill in the header in
3454         the .got.plt section for the BPABI.
3455         * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
3456         PT_DYNAMIC segment.
3457         (elf_backend_want_got_plt): Define to zero for Symbian OS.
3458
3459 2004-09-06  Nick Clifton  <nickc@redhat.com>
3460
3461         * elflink.c (elf_link_add_object_symbols): Set the error code to
3462         bfd_error_wrong_format when the input format does not match the
3463         output format.
3464
3465 2004-09-06  Alan Modra  <amodra@bigpond.net.au>
3466
3467         * elf64-ppc.c (is_ppc64_target): New function, extracted from..
3468         (ppc64_elf_check_directives): ..here.
3469         (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
3470         before accessing ppc64_elf_tdata.
3471         (ppc64_elf_finish_dynamic_sections): And here too.
3472
3473 2004-09-04  Alan Modra  <amodra@bigpond.net.au>
3474
3475         * bfd.c (_bfd_default_error_handler): Correct loop exit.
3476
3477 2004-09-03  Mark Mitchell  <mark@codesourcery.com>
3478
3479         * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
3480         * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
3481         (bfd_elf32_littlearm_symbian_vec): Likewise.
3482         * configure: Regenerated.
3483         * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
3484         * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
3485         (PLT_ENTRY_SIZE): Likewise.
3486         (bfd_vma_elf32_arm_symbian_plt_entry): New
3487         variable.
3488         (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
3489         and symbian_p.
3490         (create_got_section): Don't create sections when generating BPABI
3491         objects.
3492         (elf32_arm_create_dynamic_sections): Tidy.
3493         (elf32_arm_link_hash_table_create): Set plt_header_size,
3494         plt_entry_size, and symbian_p.
3495         (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
3496         generating BPABI objects.
3497         (allocate_dynrelocs): Use htab->plt_header_size, not
3498         PLT_HEADER_SIZE.  Do not add to .got.plt when
3499         generating BPABI objects.
3500         (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
3501         * elfarm-nabi.c: Add SymbianOS target vectors.
3502         * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
3503         (_bfd_elf_link_create_dynamic_sections): Likewise.
3504         * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
3505         (elfNN_bed): Use it.
3506         * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
3507         (bfd_elf32_littlearm_symbian_vec): Likewise.
3508         (_bfd_target_vector): Add them.
3509
3510 2004-09-03  Nick Clifton  <nickc@redhat.com>
3511
3512         PR 360
3513         * coffcode.h (handle_COMDAT): Replace abort with an warning
3514         message and allow the scan to continue.
3515
3516 2004-09-02  Alan Modra  <amodra@bigpond.net.au>
3517
3518         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
3519         in when reading relocs, not our sorted syms.  Remove unnecessary
3520         var.
3521
3522 2004-08-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
3523
3524         * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
3525
3526 2004-08-30  Nathanael Nerode  <neroden@gcc.gnu.org>
3527
3528         * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
3529         Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
3530         replace uses of *_alias with *_noncanonical.
3531         * aclocal.m4: Rebuild with aclocal 1.4p6.
3532         * Makefile.in: Rebuild with automake 1.4p6.
3533         * doc/Makefile.in: Rebuild with automake 1.4p6.
3534         * configure.in: Autoupdate with autoupdate 2.59.
3535         * config.in: Regenerate with autoheader 2.59.
3536         * configure: Regnerate with autoconf 2.59.
3537
3538 2004-08-28  Alan Modra  <amodra@bigpond.net.au>
3539
3540         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
3541         symbol pointer arrays before modifying.
3542
3543 2004-08-28  Alan Modra  <amodra@bigpond.net.au>
3544
3545         * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
3546         * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
3547         * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
3548         * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
3549         * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
3550         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
3551         Use both symbol tables on non-relocatable objects.  Use a common
3552         error exit.  Fix "mid" warning.
3553         * libbfd.h: Regenerate.
3554         * bfd-in2.h: Regenerate.
3555
3556 2004-08-28  Alan Modra  <amodra@bigpond.net.au>
3557
3558         * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
3559         object file.
3560         (struct sfpr_def_parms): Save some space.
3561         (sfpr_define): Here too.
3562
3563         * elf64-ppc.c (compare_symbols): Put section syms first.
3564         (sym_exists_at): New function.
3565         (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
3566         points only for relocatable files.  Use .opd section contents
3567         otherwise.  Generally clean up the code.
3568
3569 2004-08-27  Alan Modra  <amodra@bigpond.net.au>
3570
3571         * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
3572         LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
3573         (struct sfpr_def_parms): New.
3574         (sfpr_define): New function.
3575         (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
3576         (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
3577         (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
3578         (savefpr1_tail, restfpr1_tail): New functions.
3579         (savevr, savevr_tail, restvr, restvr_tail): New functions.
3580         (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
3581         (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
3582         code.  Define all ABI mandated _save and _rest functions.
3583
3584 2004-08-26  Paul Brook  <paul@codesourcery.com>
3585
3586         * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
3587
3588 2004-08-26  Alan Modra  <amodra@bigpond.net.au>
3589
3590         * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
3591         TRUE or FALSE.
3592
3593 2004-08-26  Alan Modra  <amodra@bigpond.net.au>
3594
3595         * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
3596         that pcrel correction is applied for R_386_PC32.
3597
3598 2004-08-25  Alan Modra  <amodra@bigpond.net.au>
3599
3600         * elf32-i386.c (elf_i386_relocate_section): Zero section contents
3601         for R_386_32 and R_386_PC32 relocs against symbols defined in
3602         discarded sections.
3603
3604 2004-08-25  Dmitry Diky  <diwil@spec.ru>
3605
3606         * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
3607         Add new relocations.
3608         * bfd-in2.h: Regenerate.
3609         * libbfd.h: Regenerate.
3610         * elf32-msp430.c: Clean-up code.
3611         (elf_msp430_howto_table): Add new relocation entries.
3612         (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
3613         (msp430_elf_relax_section): New function.
3614         (msp430_elf_relax_delete_bytes): New function.
3615         (msp430_elf_symbol_address_p): New function.
3616
3617 2004-08-24  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
3618
3619         * elf32-m32r.c (m32r_elf_relocate_section): Handle
3620         R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
3621
3622 2004-08-20  Daniel Jacobowitz  <dan@debian.org>
3623
3624         * elflink.c (_bfd_elf_section_already_linked): Handle
3625         SEC_LINK_DUPLICATES_SAME_CONTENTS.
3626
3627 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
3628
3629         * config.bfd (arm*-*-symbianelf*): New target.
3630         (arm*-*-eabi*): Likewise.
3631
3632 2004-08-19  Alan Modra  <amodra@bigpond.net.au>
3633
3634         * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
3635         "struct ppc_link_hash_entry *".
3636         (ppc64_elf_relocate_section): Ditto for type of h.  Introduce h_elf
3637         to satisfy RELOC_FOR_GLOBAL_SYMBOL.
3638
3639 2004-08-19  Jakub Jelinek  <jakub@redhat.com>
3640
3641         * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
3642         entries (where fd_aux overlaps next entry's fd_func).
3643         Add non_overlapping argument, use it.
3644         (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
3645         ppc64_elf_size_stubs, ppc64_elf_relocate_section,
3646         ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
3647         as indexes into opd_sym_map/opd_adjust array.
3648         * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
3649
3650 2004-08-18  Alan Modra  <amodra@bigpond.net.au>
3651
3652         * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
3653         if we can look up their function descriptor in a regular file.
3654
3655 2004-08-18  Nick Clifton  <nickc@redhat.com>
3656
3657         PR 324
3658         * cofflink.c (coff_link_add_symbols): Check that the comdat
3659         pointer in the coff_section_data structure has been initialised
3660         before using it.
3661
3662 2004-08-18  Alan Modra  <amodra@bigpond.net.au>
3663
3664         PR 338
3665         * elflink.c (bfd_elf_record_link_assignment): Add comment about
3666         changing bfd_link_hash_undefined to bfd_link_hash_new.
3667
3668 2004-08-17  Jakub Jelinek  <jakub@redhat.com>
3669
3670         * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
3671         if not yet defined.
3672         * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
3673         (synthetic_opd, synthetic_relocatable): New variables.
3674         (compare_symbols, compare_relocs): New helper routines.
3675         (ppc64_elf_get_synthetic_symtab): New function.
3676         * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
3677         to relsyms.
3678         * bfd-in2.h: Regenerated.
3679         * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
3680         to relsyms.  Return 0 if abfd is relocatable.
3681
3682 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
3683
3684         * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
3685
3686 2004-08-17  Nick Clifton  <nickc@redhat.com>
3687
3688         * (is_arm_mapping_symbol_name): New function - return true
3689         when a symbol name matches the requirements for an ARM mapping
3690         symbol name.
3691         (arm_elf_find_function): New function based on
3692         elf_find_function in elf.c but skipping ARM mapping symbols
3693         and including thumb function symbols.
3694         (elf32_arm_find_nearest_line): Use arm_elf_find_function.
3695         (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
3696
3697 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
3698
3699         * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
3700         (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
3701         (ppc64_elf_brtaken_reloc): Here too.
3702
3703 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
3704
3705         * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
3706         symbol visibility.
3707         (ppc64_elf_check_directives): Check that we have the right hash
3708         table before proceeding.
3709
3710 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
3711
3712         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
3713         (adjust_opd_syms): Attach opd syms for deleted entries to one of
3714         the sections that will be discarded.
3715
3716 2004-08-16  Alan Modra  <amodra@bigpond.net.au>
3717
3718         * elflink.c (elf_section_complain_discarded): Ignore .fixup.
3719
3720 2004-08-16  Alan Modra  <amodra@bigpond.net.au>
3721
3722         * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
3723         free space available.
3724
3725 2004-08-16  Alan Modra  <amodra@bigpond.net.au>
3726
3727         * pdp11.c (struct pdp11_aout_reloc_external): Delete.  Replace
3728         occurrences with bfd_byte * thoughout file.
3729
3730         * coff-rs6000.c (do_shared_object_padding): Warning fix.
3731         (xcoff_write_armap_big): Likewise.
3732         (xcoff_write_archive_contents_old): Likewise.
3733         (xcoff_write_archive_contents_big): Likewise.
3734
3735         * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
3736
3737 2004-08-13  Nick Clifton  <nickc@redhat.com>
3738
3739         * elf32-arm.h: Convert to ISO C90.
3740
3741 2004-08-13  Alan Modra  <amodra@bigpond.net.au>
3742
3743         PR 293
3744         * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
3745         zero the plt field.
3746
3747 2004-08-13  Alan Modra  <amodra@bigpond.net.au>
3748
3749         * bfd.c (_bfd_default_error_handler): Handle %A and %B.
3750         (bfd_archive_filename, bfd_get_section_ident): Delete.
3751         * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
3752         bfd_archive_filename.
3753         * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
3754         to warn about symbols in discarded sections.  Use _bfd_error_handler.
3755         * aout-adobe.c (aout_adobe_callback): See below.
3756         * aout-cris.c (swap_ext_reloc_in): ..
3757         * coff-arm.c (find_thumb_glue, find_arm_glue,
3758         coff_arm_relocate_section, bfd_arm_process_before_allocation,
3759         coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
3760         coff_arm_copy_private_bfd_data): ..
3761         * coff-i860.c (i860_reloc_processing): ..
3762         * coff-mcore.c (mcore_coff_unsupported_reloc,
3763         coff_mcore_relocate_section): ..
3764         * coff-ppc.c (coff_ppc_relocate_section): ..
3765         * coff-rs6000.c (xcoff_create_csect_from_smclas
3766         * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
3767         sh_swap_insns, sh_relocate_section): ..
3768         * coff-tic54x.c (tic54x_reloc_processing): ..
3769         * coff-tic80.c (coff_tic80_relocate_section): ..
3770         * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
3771         * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
3772         coff_slurp_symbol_table, coff_classify_symbol,
3773         coff_slurp_reloc_table): ..
3774         * coffgen.c (_bfd_coff_read_string_table): ..
3775         * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
3776         _bfd_coff_generic_relocate_section): ..
3777         * cpu-arm.c (bfd_arm_merge_machines): ..
3778         * cpu-sh.c (sh_merge_bfd_arch): ..
3779         * elf-hppa.h (elf_hppa_relocate_section): ..
3780         * elf.c (bfd_elf_string_from_elf_section, setup_group,
3781         _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
3782         assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
3783         copy_private_bfd_data, _bfd_elf_validate_reloc): ..
3784         * elf32-arm.h (find_thumb_glue, find_arm_glue,
3785         bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
3786         elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
3787         elf32_arm_relocate_section, elf32_arm_set_private_flags,
3788         elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
3789         * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
3790         cris_elf_merge_private_bfd_data
3791         * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
3792         * elf32-gen.c (elf32_generic_link_add_symbols): ..
3793         * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
3794         elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
3795         elf32_hppa_relocate_section): ..
3796         * elf32-i370.c (i370_elf_merge_private_bfd_data,
3797         i370_elf_check_relocs, i370_elf_relocate_section): ..
3798         * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
3799         elf_i386_relocate_section): ..
3800         * elf32-m32r.c (m32r_elf_relocate_section,
3801         m32r_elf_merge_private_bfd_data): ..
3802         * elf32-m68hc1x.c (m68hc12_add_stub,
3803         _bfd_m68hc11_elf_merge_private_bfd_data): ..
3804         * elf32-m68k.c (elf_m68k_relocate_section): ..
3805         * elf32-mcore.c (mcore_elf_unsupported_reloc,
3806         mcore_elf_relocate_section): ..
3807         * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
3808         ppc_elf_check_relocs, ppc_elf_relocate_section,
3809         ppc_elf_begin_write_processing): ..
3810         * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
3811         elf_s390_relocate_section): ..
3812         * elf32-sh-symbian.c (sh_symbian_import_as,
3813         sh_symbian_process_embedded_commands,
3814         sh_symbian_relocate_section): ..
3815         * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
3816         sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
3817         sh_elf_merge_private_data): ..
3818         * elf32-sparc.c (elf32_sparc_check_relocs,
3819         elf32_sparc_relocate_section,
3820         elf32_sparc_merge_private_bfd_data): ..
3821         * elf32-v850.c (v850_elf_check_relocs,
3822         v850_elf_merge_private_bfd_data): ..
3823         * elf32-xtensa.c (elf_xtensa_check_relocs,
3824         elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
3825         * elf64-alpha.c (elf64_alpha_relax_with_lituse,
3826         elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
3827         elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
3828         * elf64-gen.c (elf64_generic_link_add_symbols): ..
3829         * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
3830         ppc64_elf_check_relocs, ppc64_elf_edit_opd,
3831         ppc64_elf_relocate_section): ..
3832         * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
3833         elf_s390_relocate_section): ..
3834         * elf64-sh64.c (sh_elf64_relocate_section): ..
3835         * elf64-sparc.c (sparc64_elf_check_relocs,
3836         sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
3837         sparc64_elf_merge_private_bfd_data): ..
3838         * elf64-x86-64.c (elf64_x86_64_check_relocs,
3839         elf64_x86_64_relocate_section): ..
3840         * elflink.c (_bfd_elf_add_default_symbol,
3841         _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
3842         _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
3843         bfd_elf_size_dynamic_sections, elf_link_output_extsym,
3844         elf_get_linked_section_vma, elf_fixup_link_order,
3845         bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
3846         bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
3847         * elfxx-ia64.c (elfNN_ia64_relax_section,
3848         elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
3849         * elfxx-mips.c (mips_elf_perform_relocation,
3850         _bfd_mips_elf_check_relocs,
3851         _bfd_mips_elf_merge_private_bfd_data): ..
3852         * ieee.c (ieee_slurp_external_symbols): ..
3853         * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
3854         * libbfd.c (_bfd_generic_verify_endian_match): ..
3855         * linker.c (_bfd_generic_link_add_one_symbol,
3856         _bfd_generic_section_already_linked): ..
3857         * pdp11.c (translate_to_native_sym_flags): ..
3858         * pe-mips.c (coff_pe_mips_relocate_section): ..
3859         * peicode.h (pe_ILF_build_a_bfd): ..
3860         * srec.c (srec_bad_byte): ..
3861         * stabs.c (_bfd_link_section_stabs): ..
3862         * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
3863         Replace all uses of bfd_archive_filename and bfd_get_section_ident
3864         with corresponding %B and %A in _bfd_error_handler format string.
3865         Replace occurrences of "fprintf (stderr," with _bfd_error_handler
3866         calls to use %A and %B.  Fix "against symbol .. from section" and
3867         similar error messages.  Combine multiple _bfd_error_handler calls
3868         where they were separated due to bfd_archive_filename deficiencies.
3869         * bfd-in2.h: Regenerate.
3870
3871 2004-08-12  H.J. Lu  <hongjiu.lu@intel.com>
3872
3873         * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
3874         relocation.
3875
3876 2004-08-10  Alan Modra  <amodra@bigpond.net.au>
3877
3878         * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
3879         (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
3880         Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
3881         Add twiddled_syms.
3882         (link_hash_newfunc): Init was_undefined.
3883         (add_symbol_adjust): Don't set undefined dot symbols to defweak;
3884         Use undefweak instead.
3885         (ppc64_elf_check_directives): Fix undefs chain.
3886         (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
3887         references.
3888         (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
3889         (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
3890         * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
3891
3892 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
3893
3894         * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
3895         error, test input_section flags rather than sec.
3896
3897 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
3898
3899         * elf-bfd.h (struct elf_backend_data): Add
3900         elf_backend_archive_symbol_lookup.
3901         (_bfd_elf_archive_symbol_lookup): Declare.
3902         * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
3903         (elf_link_add_archive_symbols): ..extracted from here.  Call the
3904         backend version.
3905         * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
3906         (elfNN_bed): Init new field.
3907         * elf64-ppc.c (elf_backend_check_directives): Define.
3908         (elf_backend_archive_symbol_lookup): Define.
3909         (struct ppc_link_hash_table): Add tls_get_add_fd.  Make tls_get_add
3910         a ppc_link_hash_entry pointer.
3911         (get_fdh): Move.
3912         (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
3913         (add_symbol_adjust, ppc64_elf_check_directives): New functions.
3914         (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
3915         ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
3916         ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
3917         ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
3918         ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
3919         descriptor symbols.
3920
3921 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
3922
3923         * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
3924         (ppc64_elf_add_symbol_hook): Test for NULL section.
3925         (get_sym_h): Formatting.
3926         (ppc64_elf_size_stubs): Include reloc addend in value stored as
3927         stub target_value.
3928
3929         * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
3930         long branch stubs with code handling plt and r2off branch stubs.
3931
3932 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
3933
3934         * elf-bfd.h (_bfd_elf_gc_mark): Declare.
3935         * elflink.c (elf_link_input_bfd): Formatting.
3936         (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global.  Adjust
3937         all callers.
3938         * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
3939         (link_hash_newfunc): Don't set it.
3940         (ppc64_elf_copy_indirect_symbol): Nor copy it.
3941         (ppc64_elf_mark_entry_syms): Delete.
3942         (ppc64_elf_gc_mark_hook): Mark entry syms here.  Also mark opd
3943         sections.  Use get_opd_info.
3944         * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
3945
3946 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
3947
3948         * elf64-ppc.c (adjust_opd_syms): Fix merge error.
3949
3950         * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
3951         (func_desc_adjust): Don't set have_undefweak.
3952         (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
3953         (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
3954
3955         * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
3956         "struct ppc_link_hash_entry *".  Adjust all references.
3957         (ppc64_elf_hide_symbol): Correct a comment.
3958
3959         * elf64-ppc.c (get_opd_info): New function.
3960         (adjust_opd_syms): Use get_opd_info.  Define removed symbols as zero.
3961         (ppc64_elf_edit_opd): Use get_opd_info.  Check that sym has a dot
3962         before calling get_fdh.  Test fdh rather than h before dereferencing
3963         fdh.  Mark removed symbols in opd_adjust.
3964         (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
3965         (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
3966         opd symbols.
3967         (ppc64_elf_output_symbol_hook): Likewise.
3968
3969 2004-08-06  Paul Brook  <paul@codesourcery.com>
3970
3971         * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
3972         (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
3973         BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
3974         * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
3975         and BFD_RELOC_ARM_SBREL32.
3976         * bfd-in2.h, bbfd.h: Regenerate.
3977
3978 2004-08-01  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
3979
3980         * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
3981         the dynamic link symbol actually in use.
3982
3983 2004-08-01  Stephane Carrez  <stcarrez@nerim.fr>
3984
3985         * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
3986
3987 2004-07-31  Joel Brobecker  <brobecker@gnat.com>
3988             Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
3989
3990         * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
3991         SHN_MIPS_TEXT and SHN_MIPS_DATA.
3992
3993 2004-07-30  H.J. Lu  <hongjiu.lu@intel.com>
3994             Nick Clifton  <nickc@redhat.com>
3995
3996         PR 290
3997         * bfd.c (_bfd_default_error_handler): Make it global.
3998
3999         * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
4000
4001         * elf.c (assign_section_numbers): Cope gracefully with sections
4002         which have SHF_LINK_ORDER set but no sh_link set up.
4003         * elflink.c (elf_get_linked_section_vma): Likewise.
4004
4005         * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
4006         it to NULL.
4007
4008         * elfxx-target.h (elf_backend_link_order_error_handler): New.
4009         Set it to _bfd_default_error_handler.
4010         (elfNN_bed): Add elf_backend_link_order_error_handler.
4011
4012         * libbfd-in.h (_bfd_default_error_handler): New.
4013
4014         * libbfd.h: Regenerated.
4015
4016 2004-07-30  Jakub Jelinek  <jakub@redhat.com>
4017
4018         * archures.c (bfd_mach_sparc_64bit_p): Define.
4019         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
4020         * bfd-in2.h: Rebuilt.
4021
4022 2004-07-29  Alexandre Oliva  <aoliva@redhat.com>
4023
4024         Introduce SH2a support.
4025         2004-02-18  Corinna Vinschen  <vinschen@redhat.com>
4026         * archures.c (bfd_mach_sh2a_nofpu): New.
4027         * bfd-in2.h: Rebuilt.
4028         * cpu-sh.c (SH2A_NOFPU_NEXT): New.
4029         (arch_info_struct): Add sh2a_nofpu.
4030         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
4031         2003-12-29  DJ Delorie  <dj@redhat.com>
4032         * reloc.c: Add relocs for sh2a.
4033         * bfd-in2.h: Regenerate.
4034         * libbfd.hh: Regenerate.
4035         2003-12-01  Michael Snyder  <msnyder@redhat.com>
4036         * archures.c (bfd_mach_sh2a): New.
4037         * bfd-in2.h: Rebuilt.
4038         * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
4039         (SH2A_NEXT): New.
4040         (arch_info_struct): Add sh2a.
4041         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
4042
4043 2004-07-28  Nick Clifton  <nickc@redhat.com>
4044             John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4045
4046         PR 273
4047         * som.c (setup_sections): Improve estimation of space sizes in
4048         relocatable objects.
4049
4050 2004-07-27  Jason Thorpe  <thorpej@wasabisystems.com>
4051         * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
4052         bfd_elf32_hppa_nbsd_vec.  Add bfd_elf32_hppa_linux_vec
4053         to targ_selvecs.
4054         * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
4055         * configure: Regenerate.
4056         * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
4057         case that accepts OSABI=NetBSD and OSABI=SysV.
4058         (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
4059         the base of .got or .data (if .got does not exist).
4060         (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
4061         set OSABI=NetBSD.
4062         (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
4063         (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
4064         * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
4065         (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
4066
4067 2004-07-27  H.J. Lu  <hongjiu.lu@intel.com>
4068
4069         PR 161/251
4070         * elf-bfd.h (bfd_elf_section_data): Add sec_group.
4071         (elf_sec_group): Defined.
4072         (bfd_elf_match_symbols_in_sections): New prototype.
4073         (_bfd_elf_setup_group_pointers): Likewise.
4074
4075         * elf.c (bfd_elf_discard_group): Abort.
4076         (bfd_elf_set_group_contents): Also include relocation sections.
4077         Remove zero-fill for ld -r.
4078         (_bfd_elf_setup_group_pointers): New function.
4079         (elf_sort_elf_symbol): Likewise.
4080         (elf_sym_name_compare): Likewise.
4081         (bfd_elf_match_symbols_in_sections): Likewise.
4082
4083         * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
4084
4085         * elflink.c (match_group_member): New.
4086         (elf_link_input_bfd): Check group member for discarded section.
4087         (try_match_symbols_in_sections): New function.
4088         (already_linked): Likewise.
4089         (_bfd_elf_section_already_linked): Support mixing comdat group
4090         and linkonce section.
4091
4092         * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
4093         * linker.c (bfd_section_already_linked_table_traverse): New.
4094
4095         * libbfd.h: Regenerated.
4096
4097 2004-07-27  Tomer Levi  <Tomer.Levi@nsc.com>
4098
4099         * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
4100         BFD_RELOC_CRX_SWITCH32.
4101         * bfd-in2.h: Regenerate.
4102         * libbfd.h: Regenerate.
4103         * elf32-crx.c: Support relocation/relaxation of
4104         BFD_RELOC_CRX_SWITCH* types.
4105
4106 2004-07-27  Alan Modra  <amodra@bigpond.net.au>
4107
4108         * elf64-ppc.c: Correct "Linker stubs" comment.
4109
4110 2004-07-26  H.J. Lu  <hongjiu.lu@intel.com>
4111
4112         * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
4113         linked-to section.
4114         (elf_linked_to_section): New.
4115
4116         * elf.c (assign_section_numbers): Set up sh_link for
4117         SHF_LINK_ORDER.
4118
4119         * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
4120         to sh_link for SHT_IA_64_UNWIND sections.
4121
4122 2004-07-22  H.J. Lu  <hongjiu.lu@intel.com>
4123
4124         * elflink.c (elf_fixup_link_order): Add _() to error message.
4125
4126 2004-07-22  H.J. Lu  <hongjiu.lu@intel.com>
4127
4128         * elflink.c (elf_fixup_link_order): Issue a warning and flag
4129         an error if failed.
4130
4131 2004-07-21  H.J. Lu  <hongjiu.lu@intel.com>
4132
4133         * aout-adobe.c (aout_32_section_already_linked): Defined.
4134         * aout-target.h (MY_section_already_linked): Likewise.
4135         * aout-tic30.c (MY_section_already_linked): Likewise.
4136         * binary.c (binary_section_already_linked): Likewise.
4137         * bout.c (b_out_section_already_linked): Likewise.
4138         * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
4139         * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
4140         * coffcode.h (coff_section_already_linked): Likewise.
4141         * i386msdos.c (msdos_section_already_linked): Likewise.
4142         * i386os9k.c (os9k_section_already_linked): Likewise.
4143         * ieee.c (ieee_section_already_linked): Likewise.
4144         * ihex.c (ihex_section_already_linked): Likewise.
4145         * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
4146         * mmo.c (mmo_section_already_linked): Likewise.
4147         * nlm-target.h (nlm_section_already_linked): Likewise.
4148         * oasys.c (oasys_section_already_linked): Likewise.
4149         * pef.c (bfd_pef_section_already_linked): Likewise.
4150         * ppcboot.c (ppcboot_section_already_linked): Likewise.
4151         * som.c (som_bfd_discard_group): Likewise.
4152         * srec.c (srec_section_already_linked): Likewise.
4153         * tekhex.c (tekhex_section_already_linked): Likewise.
4154         * versados.c (versados_section_already_linked): Likewise.
4155         * vms.c (vms_section_already_linked): Likewise.
4156         * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
4157         * xsym.c (bfd_sym_section_already_linked): Likewise.
4158
4159         * bfd-in.h (bfd_section_already_linked_table_init): New.
4160         (bfd_section_already_linked_table_free): Likewise.
4161
4162         * coff-rs6000.c (rs6000coff_vec): Add
4163         _bfd_generic_section_already_linked.
4164         (pmac_xcoff_vec): Likewise.
4165         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4166         (aix5coff64_vec): Likewise.
4167
4168         * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
4169         * elflink.c (_bfd_elf_section_already_linked): New function.
4170
4171         * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
4172
4173         * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
4174         (_bfd_generic_section_already_linked): New.
4175         (bfd_section_already_linked_hash_entry): Likewise.
4176         (bfd_section_already_linked): Likewise.
4177         (bfd_section_already_linked_table_lookup): Likewise.
4178         (bfd_section_already_linked_table_insert): Likewise.
4179
4180         * linker.c (bfd_section_already_linked): New.
4181         (_bfd_section_already_linked_table): Likewise.
4182         (bfd_section_already_linked_table_lookup): Likewise.
4183         (bfd_section_already_linked_table_insert): Likewise.
4184         (already_linked_newfunc): Likewise.
4185         (bfd_section_already_linked_table_init): Likewise.
4186         (bfd_section_already_linked_table_free): Likewise.
4187         (_bfd_generic_section_already_linked): Likewise.
4188
4189         * section.c (bfd_section): Remove comdat.
4190         (bfd_comdat_info): Moved to ...
4191         * bfd-in.h (coff_comdat_info): Here.
4192         (bfd_coff_get_comdat_section): New.
4193         * coffgen.c (bfd_coff_get_comdat_section): Likewise.
4194         * libcoff-in.h (coff_section_tdata): Add comdat.
4195         * coffcode.h (handle_COMDAT): Updated.
4196         * cofflink.c (coff_link_add_symbols): Likewise.
4197         * ecoff.c (bfd_debug_section): Likewise.
4198
4199         * targets.c (bfd_target): Add _section_already_linked.
4200         (BFD_JUMP_TABLE_LINK): Updated.
4201
4202         * bfd-in2.h: Regenerated.
4203         * libbfd.h: Likewise.
4204         * libcoff.h: Likewise.
4205
4206 2003-07-21  Paul Brook  <paul@codesourcery.com>
4207
4208         * elflink.c (elf_get_linked_section_vma, compare_link_order,
4209         elf_fixup_link_order): New functions.
4210         (bfd_elf_final_link): Call elf_fixup_link_order.
4211
4212 2004-07-21  Alexandre Oliva  <aoliva@redhat.com>
4213
4214         * elf-bfd.h (ELF_COMMON_DEF_P): New.
4215         * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
4216         common definitions.
4217         * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
4218         _bfd_elf_symbol_refs_local_p.
4219         * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
4220         symbols.
4221
4222 2004-07-19  H.J. Lu  <hongjiu.lu@intel.com>
4223
4224         * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
4225         DYN_NO_NEEDED.
4226         (bfd_elf_get_dyn_lib_class): New prototype.
4227         * elf.c (bfd_elf_get_dyn_lib_class): New function.
4228
4229         * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
4230         DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
4231         entry is needed. Issue an error if a DT_NEEDED entry is needed
4232         for a file marked DYN_NO_NEEDED.
4233         (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
4234         for DT_NEEDED tags.
4235
4236         * bfd-in2.h: Regenerated.
4237
4238 2004-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4239
4240         * elflink.c (elf_section_complain_discarded): Don't complain in
4241         .PARISC.unwind.
4242
4243 2004-07-10  James E Wilson  <wilson@specifixinc.com>
4244
4245         * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
4246         (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
4247         (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
4248         elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
4249         Fix callers.
4250         (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64.  Change
4251         bfd_put_64 to bfd_putl64.
4252         (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
4253
4254 2004-07-09  H.J. Lu  <hongjiu.lu@intel.com>
4255
4256         PR 240
4257         * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
4258         .init/.fini sections when trying to relax it.
4259
4260 2004-07-09  Jie Zhang  <zhangjie@magima.com.cn>
4261
4262         * elf.c (assign_file_positions_for_segments): Make sure the
4263         .dynamic section is the first section in the PT_DYNAMIC segment.
4264
4265 2004-07-09  Nick Clifton  <nickc@redhat.com>
4266
4267         * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
4268         * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
4269         sh_elf_get_flags_from_mach functions so that they do not conflict
4270         when this target is built with other sh-elf targets.
4271         * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
4272         suppression of this function.
4273         (sh_elf_find_flags): Likewise.
4274
4275 2004-07-07  Tomer Levi  <Tomer.Levi@nsc.com>
4276
4277         * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
4278         (ALL_MACHINES_CFILES): Add cpu-crx.c.
4279         (BFD32_BACKENDS): Add elf32-crx.lo.
4280         (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
4281         (cpu-crx.lo): New target.
4282         (elf32-crx.lo): New target.
4283         * Makefile.in: Regenerate.
4284         * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
4285         (bfd_archures_list): Add bfd_crx_arch.
4286         * bfd-in2.h: Regenerate.
4287         * config.bfd: Handle crx-*-elf*, crx*.
4288         * configure.in: Handle bfd_elf32_crx_vec.
4289         * configure: Regenerate.
4290         * cpu-crx.c: New file.
4291         * elf32-crx.c: Likewise.
4292         * libbfd.h: Regenerate.
4293         * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
4294         BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
4295         BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
4296         BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
4297         BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
4298         BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
4299         * targets.c (bfd_elf32_crx_vec): Declare.
4300         (bfd_target_vector): Add bfd_elf32_crx_vec.
4301
4302 2004-07-06  Nick Clifton  <nickc@redhat.com>
4303
4304         * config.bfd: Add sh-symbian-elf target.
4305         * configure.in: Add bfd_elf32_shl_symbian_vec.
4306         * configure: Regenerate.
4307         * elf-bfd.h (struct elf_backend_data): Add new field
4308         'check_directives'.
4309         * elflink.c (elf_link_add_object_symbols): Invoke the
4310         check_directives function, if defined.
4311         * elfxx-target.h: Provide a default, NULL definition for
4312         check_directives.
4313         * targets.c: Add bfd_elf32_shl_symbian_vec.
4314         * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
4315         definition.
4316         (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
4317         * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
4318         (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
4319         not already been defined.
4320         * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
4321         * sh-symbian.c: New file.  Provide functions to support the
4322         * sh-symbian-elf target.
4323         * Makefile.am: Add elf32-sh-symbian.c
4324         * Makefile.in: Regenerate.
4325
4326 2004-07-05  Andrew Stubbs <andrew.stubbs@superh.com>
4327
4328         * elf32-sh.c: Include ../opcodes/sh-opc.h.
4329         * Makefile.am: Ran make dep-am.
4330         * Makefile.in: Ran make dep-in.
4331
4332 2004-07-03  Aaron W. LaFramboise  <aaron98wiridge9@aaronwl.com>
4333
4334         * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
4335         externals properly.
4336
4337 2004-07-02  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4338
4339         * config.bfd: Add want64 to configuration target s390-*-linux*.
4340
4341 2004-07-01  H.J. Lu  <hongjiu.lu@intel.com>
4342
4343         * bfd.c (bfd_get_section_ident): New.
4344
4345         * elflink.c (elf_link_read_relocs_from_section): Call
4346         bfd_get_section_ident to identify the section when reporting
4347         error.
4348         (_bfd_elf_link_output_relocs): Likewise.
4349         (elf_link_output_extsym): Likewise.
4350         (elf_link_input_bfd): Likewise.
4351         (bfd_elf_gc_record_vtinherit): Likewise.
4352
4353         * bfd-in2.h: Regenerated.
4354
4355 2004-07-01  Jie Zhang  <zhangjie@magima.com.cn>
4356             Nick Clifton  <nickc@redhat.com>
4357
4358         PR 204
4359         * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
4360         of section symbols to mips_elf_sort_hash_table ().
4361
4362 2004-07-01  Alan Modra  <amodra@bigpond.net.au>
4363
4364         * elflink.c (elf_section_ignore_discarded_relocs): Revert last
4365         change.  Comment.
4366         (elf_section_complain_discarded): New function.  Handle
4367         .gcc_except_table too.
4368         (elf_link_input_bfd): Rewrite handling of relocs against symbols
4369         in discarded sections.
4370         * elf-bfd.h (elf_discarded_section): Protect macro arg.
4371
4372 2004-06-30  James E Wilson  <wilson@specifixinc.com>
4373
4374         * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff.  Initialize
4375         to NULL.  Call get_pltoff if NULL and NEED_PLTOFF is true.
4376
4377 2004-06-30  H.J. Lu  <hongjiu.lu@intel.com>
4378
4379         PR 233
4380         * elflink.c (elf_link_input_bfd): Issue an error for non-debug
4381         local references to discarded sections and report their
4382         locations.
4383
4384 2004-06-30  Alan Modra  <amodra@bigpond.net.au>
4385
4386         * elflink.c (elf_section_ignore_discarded_relocs): Don't test
4387         sec_info_type, test section name instead.
4388
4389 2004-06-29  H.J. Lu  <hongjiu.lu@intel.com>
4390
4391         PR 240
4392         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
4393         in .init/.fini sections.
4394
4395 2004-06-29  Bob Wilson  <bob.wilson@acm.org>
4396
4397         * elf32-xtensa.c (elf_xtensa_relocate_section): Use
4398         bfd_get_section_limit.
4399
4400 2004-06-29  Bob Wilson  <bob.wilson@acm.org>
4401
4402         * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
4403         output section size.
4404
4405 2004-06-29  Alan Modra  <amodra@bigpond.net.au>
4406
4407         * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
4408         rawsize.
4409         (mmix_elf_perform_relocation): Adjust for above change.
4410         (mmix_elf_relocate_section): Likewise.
4411         (mmix_elf_relax_section): Likewise.  Use output_section->rawsize.
4412         (mmix_elf_get_section_contents): Delete.
4413         (bfd_elf64_get_section_contents): Delete.
4414         (mmix_elf_relocate_section): Zero stub area.
4415         * linker.c (default_indirect_link_order): Alloc max of section size
4416         and rawsize.
4417         * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
4418         * section.c (bfd_malloc_and_get_section): Likewise.
4419         (struct bfd_section): Update rawsize comment.
4420         * bfd-in2.h: Regenerate.
4421
4422         * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
4423
4424 2004-06-29  Alan Modra  <amodra@bigpond.net.au>
4425
4426         * bfd-in.h (bfd_get_section_limit): Define.
4427         * reloc.c (bfd_perform_relocation, bfd_install_relocation)
4428         (_bfd_final_link_relocate): Use bfd_get_section_limit.
4429         * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
4430         * coff-arm.c (coff_arm_relocate_section): Likewise.
4431         * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
4432         * cpu-ns32k.c (do_ns32k_reloc): Likewise.
4433         (bfd_ns32k_final_link_relocate): Likewise.
4434         * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
4435         * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
4436         * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
4437         (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
4438         * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
4439         (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
4440         * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
4441         * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
4442         * elf32-or32.c (or32_elf_consth_reloc): Likewise.
4443         * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
4444         * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
4445         * elf32-sh.c (sh_elf_reloc_loop): Likewise.
4446         * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
4447         (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
4448         * elf32-v850.c (v850_elf_reloc): Likewise.
4449         * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
4450         * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
4451         * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
4452         * elf64-mips.c (mips_elf64_gprel32_reloc)
4453         (mips16_gprel_reloc): Likewise.
4454         * elf64-mmix.c (mmix_elf_reloc): Likewise.
4455         * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
4456         * elf64-sparc.c (init_insn_reloc): Likewise.
4457         * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
4458         * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
4459         (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
4460         (_bfd_mips_elf_generic_reloc): Likewise.
4461         * bfd-in2.h: Regenerate.
4462
4463 2004-06-28  Alan Modra  <amodra@bigpond.net.au>
4464
4465         * bfd-in.h (struct stab_info): Move from stabs.c.
4466         * stabs.c (struct stab_link_includes_table): Delete.
4467         (stab_link_includes_lookup): Delete.
4468         (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
4469         level of indirection from sinfo parm.
4470         (_bfd_link_section_stabs): Likewise.  Set SEC_LINKER_CREATED on
4471         stabstr section.  Adjust hash table accesses.
4472         * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
4473         alloc.  Adjust stab_info test.
4474         * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
4475         (_bfd_coff_final_link): Adjust stab_info test.
4476         (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
4477         * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
4478         in place.
4479         * libcoff-in.h (struct coff_link_hash_table): Likewise.
4480         * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
4481         * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
4482         stabstr section.  Adjust stab_info test.
4483         * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
4484         (_bfd_write_stab_strings): Adjust prototypes.
4485         * libbfd.h: Regenerate.
4486         * libcoff.h: Regenerate.
4487         * bfd-in2.h: Regenerate.
4488
4489 2004-06-27  Mark Kettenis  <kettenis@gnu.org>
4490
4491         From Miod Vallat <miod@online.fr>:
4492         * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
4493
4494 2004-06-26  Alexandre Oliva  <aoliva@redhat.com>
4495
4496         * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
4497         (struct elf32_mn10300_link_hash_entry): Remove
4498         pcrel_relocs_copied.
4499         (mn10300_elf_check_relocs): Only reserve dynamic relocations for
4500         R_MN10300_32.  Don't adjust pcrel_relocs_copied.
4501         (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
4502         and gotoff relocations if the symbol doesn't bind locally.  Use
4503         _bfd_elf_symbol_refs_local_p to test.  Don't create dynamic
4504         relocation for PCREL32.
4505         (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
4506         to test whether a symbol binds locally.
4507         (elf32_mn10300_link_hash_newfunc): Don't initialize
4508         pcrel_relocs_copied.
4509         (_bfd_mn10300_elf_discard_copies): Delete.
4510         (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
4511
4512 2004-06-26  Mark Kettenis  <kettenis@gnu.org>
4513
4514         * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
4515
4516 2004-06-25  Joel Brobecker  <brobecker@gnat.com>
4517
4518         * som.c (som_set_reloc_info): Correct small typo.
4519
4520 2004-06-25  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
4521
4522         * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
4523         (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
4524         (m32r_elf_gcsweep_hook): Likewise.
4525         (m32r_elf_check_relocs): Likewise.
4526         (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
4527         R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
4528         * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
4529         BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
4530         * bfd-in2.h: Regenerated.
4531         * libbfd.h: Regenerated.
4532
4533 2004-06-24  H.J. Lu  <hongjiu.lu@intel.com>
4534
4535         * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
4536         relocation symbol.
4537         (elf64_x86_64_relocate_section): Issue an error for
4538         R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
4539         against global symbols when building shared library.
4540
4541 2004-06-24  Alan Modra  <amodra@bigpond.net.au>
4542
4543         * section.c (struct sec): Rename "_cooked_size" to "size".
4544         Rename "_raw_size" to "rawsize".
4545         (STD_SECTION): Adjust comments.
4546         (bfd_set_section_size, bfd_get_section_contents): Use size.
4547         (bfd_malloc_and_get_section): New function.
4548         * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
4549         * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
4550         Correctly free reloc and contents memory.
4551         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
4552         and fake CIE now that we can shink section size to zero.
4553         (_bfd_elf_write_section_eh_frame): Likewise..
4554         * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
4555         * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
4556         _bfd_stab_section_offset.  Use _bfd_elf_section_offset.
4557         * stabs.c (_bfd_stab_section_offset_): Remove unused args and
4558         unneeded indirection.
4559         * elf.c (_bfd_elf_section_offset): .. and update call.
4560         * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
4561         * libbfd.h: Regenerate.
4562         * bfd-in2.h: Regenerate.
4563
4564         Replace occurrences of "_raw_size" and "_cooked_size" in most places
4565         with "size".  Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
4566         sections.  Use "rawsize", if non-zero, for bfd_get_section_contents
4567         calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
4568         Similarly use "rawsize", if non-zero, in reloc functions to validate
4569         reloc addresses.  Use new bfd_malloc_and_get_section in most places
4570         where bfd_get_section_contents was called.  Expand all occurrences of
4571         bfd_section_size and bfd_get_section_size.  Rename "raw_size" var in
4572         grok_prstatus and similar functions to "size".
4573         * aix386-core.c (aix386_core_file_p): ..
4574         * aix5ppc-core.c (xcoff64_core_p): ..
4575         * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
4576         aout_adobe_set_section_contents): ..
4577         * aout-target.h (callback): ..
4578         * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
4579         MY_bfd_final_link): ..
4580         * aoutf1.h (sunos4_core_file_p): ..
4581         * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
4582         adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
4583         final_link, aout_link_input_section): ..
4584         * binary.c (binary_object_p, binary_canonicalize_symtab,
4585         binary_set_section_contents): ..
4586         * bout.c (b_out_callback, b_out_write_object_contents,
4587         b_out_set_section_contents, b_out_bfd_relax_section,
4588         b_out_bfd_get_relocated_section_contents): ..
4589         * cisco-core.c (cisco_core_file_validate): ..
4590         * coff-alpha.c (alpha_ecoff_object_p,
4591         alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
4592         * coff-arm.c (coff_arm_relocate_section,
4593         bfd_arm_allocate_interworking_sections): ..
4594         * coff-h8300.c (h8300_reloc16_extra_cases,
4595         h8300_bfd_link_add_symbols): ..
4596         * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
4597         * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
4598         ppc_bfd_coff_final_link): ..
4599         * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
4600         * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
4601         sh_align_loads, sh_coff_get_relocated_section_contents): ..
4602         * coff64-rs6000.c (xcoff64_write_object_contents,
4603         xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
4604         * coffcode.h (coff_compute_section_file_positions,
4605         coff_write_object_contents): ..
4606         * coffgen.c (make_a_section_from_file, coff_write_symbols,
4607         coff_section_symbol, build_debug_section): ..
4608         * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
4609         process_embedded_commands, _bfd_coff_link_input_bfd,
4610         _bfd_coff_write_global_sym): ..
4611         * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
4612         * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
4613         * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
4614         * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
4615         _bfd_dwarf2_find_nearest_line): ..
4616         * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
4617         ecoff_compute_section_file_positions,
4618         _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
4619         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
4620         _bfd_elf_discard_section_eh_frame_hdr,
4621         _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
4622         _bfd_elf_write_section_eh_frame,
4623         _bfd_elf_write_section_eh_frame_hdr): ..
4624         * elf-hppa.h (elf_hppa_sort_unwind): ..
4625         * elf-m10200.c (mn10200_elf_relax_section,
4626         mn10200_elf_relax_delete_bytes,
4627         mn10200_elf_get_relocated_section_contents): ..
4628         * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
4629         mn10300_elf_check_relocs, mn10300_elf_relax_section,
4630         mn10300_elf_relax_delete_bytes,
4631         mn10300_elf_get_relocated_section_contents,
4632         _bfd_mn10300_elf_adjust_dynamic_symbol,
4633         _bfd_mn10300_elf_discard_copies,
4634         _bfd_mn10300_elf_size_dynamic_sections,
4635         _bfd_mn10300_elf_finish_dynamic_sections): ..
4636         * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
4637         _bfd_elf_make_section_from_phdr, elf_fake_sections,
4638         bfd_elf_set_group_contents, map_sections_to_segments,
4639         elf_sort_sections, assign_file_positions_for_segments,
4640         SECTION_SIZE, copy_private_bfd_data,
4641         _bfd_elf_get_dynamic_reloc_upper_bound,
4642         _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
4643         _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
4644         elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
4645         elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
4646         _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
4647         * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
4648         bfd_elf32_arm_process_before_allocation,
4649         elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
4650         elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
4651         elf32_arm_write_section): ..
4652         * elf32-cris.c (cris_elf_grok_prstatus,
4653         elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
4654         elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
4655         cris_elf_check_relocs, elf_cris_size_dynamic_sections,
4656         elf_cris_discard_excess_dso_dynamics,
4657         elf_cris_discard_excess_program_dynamics): ..
4658         * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
4659         * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
4660         * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
4661         _frv_create_got_section, _frvfdpic_assign_plt_entries,
4662         elf32_frvfdpic_size_dynamic_sections,
4663         elf32_frvfdpic_modify_segment_map,
4664         elf32_frvfdpic_finish_dynamic_sections): ..
4665         * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
4666         elf32_h8_get_relocated_section_contents): ..
4667         * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
4668         elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
4669         allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
4670         elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
4671         elf32_hppa_finish_dynamic_sections): ..
4672         * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
4673         i370_elf_size_dynamic_sections, i370_elf_check_relocs,
4674         i370_elf_finish_dynamic_sections): ..
4675         * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
4676         allocate_dynrelocs, elf_i386_size_dynamic_sections,
4677         elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
4678         * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
4679         i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
4680         * elf32-ip2k.c (ip2k_is_switch_table_128,
4681         ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
4682         ip2k_relax_switch_table_256, ip2k_elf_relax_section,
4683         adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
4684         * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
4685         m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
4686         allocate_dynrelocs, m32r_elf_size_dynamic_sections,
4687         m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
4688         m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
4689         m32r_elf_get_relocated_section_contents): ..
4690         * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
4691         m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
4692         m68hc11_elf_relax_delete_bytes): ..
4693         * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
4694         m68hc12_elf_size_one_stub): ..
4695         * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
4696         elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
4697         * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
4698         elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
4699         elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
4700         * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
4701         elf32_mips_grok_prstatus): ..
4702         * elf32-or32.c (or32_elf_consth_reloc): ..
4703         * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
4704         elf_create_pointer_linker_section, ppc_elf_create_linker_section,
4705         ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
4706         allocate_dynrelocs, ppc_elf_size_dynamic_sections,
4707         ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
4708         ppc_elf_final_write_processing): ..
4709         * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
4710         allocate_dynrelocs, elf_s390_size_dynamic_sections,
4711         elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
4712         * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
4713         sh_elf_relax_delete_bytes, sh_elf_align_loads,
4714         sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
4715         sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
4716         sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
4717         * elf32-sh64-com.c (sh64_address_in_cranges,
4718         sh64_get_contents_type): ..
4719         * elf32-sh64.c (sh64_find_section_for_address,
4720         sh64_elf_final_write_processing): ..
4721         * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
4722         sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
4723         allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
4724         elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
4725         * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
4726         * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
4727         elf_vax_size_dynamic_sections, elf_vax_discard_copies,
4728         elf_vax_instantiate_got_entries, elf_vax_relocate_section,
4729         elf_vax_finish_dynamic_sections): ..
4730         * elf32-xstormy16.c (xstormy16_elf_24_reloc,
4731         xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
4732         xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
4733         xstormy16_elf_finish_dynamic_sections): ..
4734         * elf32-xtensa.c (xtensa_read_table_entries,
4735         elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
4736         elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
4737         bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
4738         elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
4739         elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
4740         get_relocation_opcode, retrieve_contents, find_relaxable_sections,
4741         collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
4742         relax_section, shrink_dynamic_reloc_sections, relax_property_section,
4743         xtensa_callback_required_dependence): ..
4744         * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
4745         elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
4746         elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
4747         elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
4748         elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
4749         elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
4750         elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
4751         elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
4752         * elf64-hppa.c (allocate_dynrel_entries,
4753         elf64_hppa_size_dynamic_sections,
4754         elf64_hppa_finish_dynamic_sections): ..
4755         * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
4756         mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
4757         elf64_mips_grok_prstatus): ..
4758         * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
4759         mmix_elf_relocate_section, mmix_elf_final_link,
4760         mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
4761         mmix_elf_relax_section, mmix_elf_get_section_contents): ..
4762         * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
4763         ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
4764         ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
4765         allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
4766         ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
4767         toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
4768         ppc64_elf_build_stubs, ppc64_elf_relocate_section,
4769         ppc64_elf_finish_dynamic_sections): ..
4770         * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
4771         allocate_dynrelocs, elf_s390_size_dynamic_sections,
4772         elf_s390_finish_dynamic_sections): ..
4773         * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
4774         sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
4775         sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
4776         sh64_elf64_finish_dynamic_sections): ..
4777         * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
4778         sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
4779         sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
4780         sparc64_elf_finish_dynamic_symbol,
4781         sparc64_elf_finish_dynamic_sections): ..
4782         * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
4783         elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
4784         elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
4785         elf64_x86_64_finish_dynamic_sections): ..
4786         * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
4787         * elfcode.h (elf_slurp_reloc_table): ..
4788         * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
4789         elf_finalize_dynstr, elf_link_add_object_symbols,
4790         bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
4791         elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
4792         * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
4793         elf32_mips_grok_prstatus): ..
4794         * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
4795         elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
4796         elfNN_ia64_choose_gp, elfNN_ia64_final_link,
4797         elfNN_ia64_finish_dynamic_sections): ..
4798         * elfxx-mips.c (mips_elf_create_procedure_table,
4799         mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
4800         _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
4801         mips_elf_global_got_index, mips_elf_multi_got,
4802         mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
4803         mips_elf_allocate_dynamic_relocations,
4804         mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
4805         _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
4806         _bfd_mips_elf_always_size_sections,
4807         _bfd_mips_elf_size_dynamic_sections,
4808         _bfd_mips_elf_finish_dynamic_symbol,
4809         _bfd_mips_elf_finish_dynamic_sections,
4810         _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
4811         _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
4812         _bfd_elf_mips_get_relocated_section_contents,
4813         _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
4814         * hp300hpux.c (callback): ..
4815         * hppabsd-core.c (make_bfd_asection): ..
4816         * hpux-core.c (make_bfd_asection): ..
4817         * i386linux.c (linux_link_create_dynamic_sections,
4818         bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
4819         * i386msdos.c (msdos_write_object_contents): ..
4820         * i386os9k.c (os9k_callback, os9k_write_object_contents,
4821         os9k_set_section_contents): ..
4822         * ieee.c (parse_expression, ieee_slurp_external_symbols,
4823         ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
4824         ieee_write_section_part, do_with_relocs, do_as_repeat,
4825         do_without_relocs, ieee_write_debug_part, init_for_output,
4826         ieee_set_section_contents): ..
4827         * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
4828         * irix-core.c (do_sections, make_bfd_asection): ..
4829         * libaout.h (aout_section_merge_with_text_p): ..
4830         * libbfd.c (_bfd_generic_get_section_contents,
4831         _bfd_generic_get_section_contents_in_window): ..
4832         * linker.c (default_indirect_link_order): ..
4833         * lynx-core.c (make_bfd_asection): ..
4834         * m68klinux.c (linux_link_create_dynamic_sections,
4835         bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
4836         * mach-o.c (bfd_mach_o_make_bfd_section,
4837         bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
4838         bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
4839         bfd_mach_o_scan_read_segment): ..
4840         * merge.c (_bfd_add_merge_section, record_section, merge_strings,
4841         _bfd_merge_sections): ..
4842         * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
4843         mmo_map_set_sizes, mmo_canonicalize_symtab,
4844         mmo_internal_write_section, mmo_write_object_contents): ..
4845         * netbsd-core.c (netbsd_core_file_p): ..
4846         * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
4847         nlm_alpha_set_public_section): ..
4848         * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
4849         * nlm32-sparc.c (nlm_sparc_write_import): ..
4850         * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
4851         nlm_compute_section_file_positions): ..
4852         * oasys.c (oasys_object_p, oasys_slurp_section_data,
4853         oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
4854         * opncls.c (get_debug_link_info): ..
4855         * osf-core.c (make_bfd_asection): ..
4856         * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
4857         adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
4858         final_link, aout_link_input_section): ..
4859         * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
4860         pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
4861         * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
4862         bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
4863         * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
4864         * ptrace-core.c (ptrace_unix_core_file_p): ..
4865         * reloc.c (bfd_perform_relocation, bfd_install_relocation,
4866         _bfd_final_link_relocate, bfd_generic_relax_section,
4867         bfd_generic_get_relocated_section_contents): ..
4868         * reloc16.c (bfd_coff_reloc16_relax_section,
4869         bfd_coff_reloc16_get_relocated_section_c): ..
4870         * riscix.c (riscix_some_aout_object_p): ..
4871         * rs6000-core.c (read_hdr, make_bfd_asection): ..
4872         * sco5-core.c (make_bfd_asection): ..
4873         * simple.c (bfd_simple_get_relocated_section_contents): ..
4874         * som.c (som_object_setup, setup_sections, som_prep_headers,
4875         som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
4876         som_set_reloc_info, som_get_section_contents,
4877         som_bfd_link_split_section): ..
4878         * sparclinux.c (linux_link_create_dynamic_sections,
4879         bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
4880         * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
4881         * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
4882         _bfd_write_stab_strings, _bfd_stab_section_offset): ..
4883         * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
4884         bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
4885         sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
4886         sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
4887         sunos_finish_dynamic_link): ..
4888         * syms.c (_bfd_stab_section_find_nearest_line): ..
4889         * tekhex.c (first_phase, tekhex_set_section_contents,
4890         tekhex_write_object_contents): ..
4891         * trad-core.c (trad_unix_core_file_p): ..
4892         * versados.c (process_esd, process_otr, process_otr): ..
4893         * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
4894         * vms-misc.c (add_new_contents): ..
4895         * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
4896         * vms.c (vms_set_section_contents): ..
4897         * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
4898         xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
4899         _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
4900         * xsym.c (bfd_sym_scan): .. See above.
4901
4902 2004-06-21  H.J. Lu  <hongjiu.lu@intel.com>
4903
4904         * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
4905         calling _bfd_merged_section_offset only for section symbols.
4906
4907 2004-06-22  Alan Modra  <amodra@bigpond.net.au>
4908
4909         * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
4910         for handling SEC_MERGE symbols in relax_section.
4911
4912 2004-06-21  Alexandre Oliva  <aoliva@redhat.com>
4913
4914         2003-05-15  Richard Sandiford  <rsandifo@redhat.com>
4915         * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
4916         linked together. Mark the result as h8300sx code.
4917
4918 2004-06-21  Alexandre Oliva  <aoliva@redhat.com>
4919
4920         * elf-bfd.h (struct elf_backend_data): Added
4921         elf_backend_omit_section_dynsym.
4922         (_bfd_elf_link_omit_section_dynsym): Declare.
4923         * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
4924         (elf_backend_omit_section_dynsym): Use it for frvfdpic.
4925         * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
4926         (_bfd_elf_link_renumber_dynsyms): ... this function.
4927         * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
4928         _bfd_elf_link_omit_section_dynsym).
4929         (elfNN_bed): Added elf_backend_omit_section_dynsym.
4930
4931 2004-06-21  Nick Clifton  <nickc@redhat.com>
4932
4933         * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
4934         flags.
4935
4936 2004-06-17  Jerome Guitton  <guitton@gnat.com>
4937
4938         * bfd-in.h (bfd_cache_close_all): New function declaration.
4939         * bfd-in2.h: Regenerate.
4940         * cache.c (bfd_cache_close_all): New function definition.
4941
4942 2004-06-16  Mark Kettenis  <kettenis@gnu.org>
4943
4944         * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
4945         4.10 and beyond.
4946         * configure: Regenerate.
4947
4948 2004-06-16  Daniel Jacobowitz  <dan@debian.org>
4949
4950         * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
4951         the pre-existing section.
4952
4953 2004-06-15  Alan Modra  <amodra@bigpond.net.au>
4954
4955         * section.c (struct sec): Remove usused flags.  Reorganize a little.
4956         (bfd_get_section_size_before_reloc): Delete.
4957         (bfd_get_section_size_after_reloc): Delete.
4958         (STD_SECTION): Update.
4959         (bfd_get_section_size_now): Delete.
4960         (bfd_set_section_contents): Don't referece reloc_done.
4961         (bfd_get_section_contents): Remove reloc_done comment.
4962         * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
4963         reloc_done.
4964         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
4965         * ecoff.c (bfd_debug_section): Update initializer.
4966         * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
4967         * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
4968         * bfd-in.h (bfd_section_size): Expand.
4969         (bfd_get_section_size): New macro.
4970         * bfd-in2.h: Regenerate.
4971         * coff64-rs6000.c (xcoff64_write_object_contents): Replace
4972         bfd_get_section_size_before_reloc with bfd_get_section_size.
4973         * coffcode.h (coff_write_object_contents): Likewise.
4974         * coffgen.c (build_debug_section): Likewise.
4975         * dwarf1.c (parse_line_table): Likewise.
4976         (_bfd_dwarf1_find_nearest_line): Likewise.
4977         * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
4978         * i386msdos.c (msdos_write_object_contents): Likewise.
4979         * pdp11.c (squirt_out_relocs): Likewise.
4980         * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
4981         * elf64-mmix.c (mmix_elf_final_link): Update comment.
4982
4983 2004-06-14  Chris Demetriou  <cgd@broadcom.com>
4984
4985         * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
4986         removal) with updated comment.
4987         (bfd_elf32_bfd_reloc_type_lookup): Add back case for
4988         BFD_RELOC_32_PCREL.
4989         (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
4990         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
4991
4992 2004-06-12  Alan Modra  <amodra@bigpond.net.au>
4993
4994         * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
4995         overflow on branches to undefweaks.
4996
4997 2004-06-11  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4998
4999         * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
5000         as ecoff_section_data() does not return a valid lvalue.
5001
5002 2004-06-09  Alexandre Oliva  <aoliva@redhat.com>
5003
5004         * elflink.c (elf_sort_symbol): Compare section id, not pointers.
5005         (elf_link_add_object_symbols): Likewise.
5006
5007         * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
5008         (elf_backend_reloc_type_class): New.
5009
5010 2004-06-08  Mark Kettenis  <kettenis@gnu.org>
5011
5012         * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
5013         netbsd-core.lo.
5014         * configure: Regenerate.
5015
5016 2004-06-07  Daniel Jacobowitz  <dan@debian.org>
5017
5018         From:  Albert Chin-A-Young  <china@thewrittenword.com>
5019         * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
5020         to unsigned int.
5021
5022 2004-05-29  H.J. Lu  <hongjiu.lu@intel.com>
5023
5024         * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
5025         change.
5026
5027 2004-05-28  DJ Delorie  <dj@redhat.com>
5028
5029         * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
5030         for linking, but otherwise adjust reloc for merged sections.
5031
5032 2004-05-28  H.J. Lu  <hongjiu.lu@intel.com>
5033
5034         * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
5035         _bfd_merged_section_offset for local symbols.
5036
5037 2004-05-28  Andrew Stubbs <andrew.stubbs@superh.com>
5038
5039         * Makefile.am: Regenerate dependencies.
5040         * Makefile.in: Regenerate.
5041         * archures.c: Add bfd_mach_sh3_nommu .
5042         * bfd-in2.h: Regenerate.
5043         * cpu-sh.c: Add sh3-nommu architecture.
5044         (bfd_to_arch_table): Create new table.
5045         (sh_get_arch_from_bfd_mach): Create new function.
5046         (sh_get_arch_up_from_bfd_mach): Create new function.
5047         (sh_merge_bfd_arch): Create new function.
5048         * elf32-sh.c (sh_ef_bfd_table): Add table.
5049         (sh_elf_check_relocs): Replace switch statement with
5050         use of sh_ef_bfd_table .
5051         (sh_elf_get_flags_from_mach): Add new function.
5052         (sh_find_elf_flags): Likewise.
5053         (sh_elf_copy_private_data): Replace most of non-elf contents
5054         with a call to sh_merge_bfd_arch() .
5055
5056 2004-05-27  Michael Chastain  <mec.gnu@mindspring.com>
5057
5058         * Makefile.am (bfdver.h): Use explicit filename, not $< .
5059         * Makefile.in: Regenerate.
5060
5061 2004-05-27  Alexandre Oliva  <aoliva@redhat.com>
5062
5063         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
5064         custom calling conventions for dynamic symbols.
5065         (mn10300_elf_relax_section): Avoid relaxing a function as a local
5066         symbol if it's an alias to a global one.
5067
5068 2004-05-26  H.J. Lu  <hongjiu.lu@intel.com>
5069
5070         * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
5071         change.
5072
5073 2004-05-27  Alexandre Oliva  <aoliva@redhat.com>
5074
5075         * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
5076         loop over hashes.
5077
5078 2004-05-26  Alan Modra  <amodra@bigpond.net.au>
5079
5080         * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
5081         for SHT_GROUP sections.
5082
5083 2004-05-25  Alan Modra  <amodra@bigpond.net.au>
5084
5085         * elflink.c (elf_link_add_object_symbols): Don't set up merge
5086         section data here..
5087         * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
5088         * merge.c: Formatting.  Remove unnecessary casts.  Expand
5089         bfd_get_section_alignment macro.
5090         (struct sec_merge_sec_info): Rename "first" to "first_str".  Update
5091         use throughout file.
5092         (_bfd_add_merge_section): Rename from _bfd_merge_section.  Update
5093         comment.  Abort on dynamic or non-SEC_MERGE input.  Don't test
5094         section name to determine sinfo group, instead test output section
5095         and alignment.
5096         (_bfd_merge_sections): Add struct bfd_link_info param.  Call
5097         _bfd_strip_section_from_output rather than just twiddling flags.
5098         * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
5099         (_bfd_merge_sections): Update prototype.
5100         * libbfd.h: Regenerate.
5101
5102 2004-05-24  Mark Kettenis  <kettenis@gnu.org>
5103
5104         * netbsd-core.c: Correctly indent section that sets architecture
5105         from machine ID.
5106
5107         From Miod Vallat <miod@online.fr>:
5108         * m88kopenbsd.c: New file.
5109         * targets.c (m88k_openbsd_vec): New.
5110         * config.bfd: Add m88k-*-openbsd*.
5111         * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
5112         (m88kopenbsd_vec): New.
5113         * configure: Regenerate.
5114         * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
5115         (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
5116         Run "make dep-am".
5117         * Makefile.in: Regenerate.
5118         * po/SRC-POTFILES.in: Regenerate.
5119
5120 2004-05-24  Nick Clifton  <nickc@redhat.com>
5121
5122         * hash.c: Remove bogus node "Changing the default Hash Table Size"
5123         introduced by hash table size patch.
5124
5125 2004-05-22  Ben Elliston  <bje@au.ibm.com>
5126
5127         * configure.in (is_release): Remove.
5128         (bfd_version_date, bfd_version, bfd_version_string): Likewise.
5129         (AC_OUTPUT): Don't output bfdver.h from version.h.
5130         * configure: Regenerate.
5131         * Makefile.am (RELEASE): New variable.
5132         (bfdver.h): New target.
5133         * Makefile.in: Regenerate.
5134         * doc/Makefile.in: Likewise.
5135
5136 2004-05-22  Ben Elliston  <bje@au.ibm.com>
5137
5138         * Makefile.am (config.status): Don't depend on version.h.
5139         * Makefile.in: Regenerate.
5140
5141 2004-05-22  Alan Modra  <amodra@bigpond.net.au>
5142
5143         * merge.c (_bfd_merged_section_offset): Remove "addend" param.
5144         * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
5145         * libbfd.h: Regenerate.
5146         * elf.c (_bfd_elf_rela_local_sym): Adjust call.
5147         (_bfd_elf_rel_local_sym): Likewise.
5148         * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
5149         (elf_link_input_bfd): Likewise.
5150         * elf32-ppc.c (ppc_elf_relax_section): Likewise.
5151         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5152         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
5153         (elfNN_ia64_relocate_section): Likewise.
5154
5155 2004-05-21  Andy Chittenden  <achittenden@bluearc.com>
5156
5157         * hash.c (bfd_default_hash_table_size): New variable.
5158         (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
5159         (bfd_hash_set_default_size): New function.  Set the default size
5160         to a selected prime number close to the argument.  Document new
5161         function.
5162         * bfd-in.h: Add prototype for  bfd_hash_set_default_size.
5163         * bfd-in2.h: Regenerate.
5164         * Makefile.am (hash.lo): Add dependency upon libiberty.h.
5165         * Makefile.in: Regenerate.
5166
5167 2004-05-21  Mark Kettenis  <kettenis@gnu.org>
5168
5169         * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
5170         * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
5171         arm, m68k, m88k and hppa core files.
5172
5173 2004-05-21  Nick Clifton  <nickc@redhat.com>
5174
5175         * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
5176         (bfd_bwrite): Likewise.
5177         (bfd_tell): Likewise.
5178         (bfd_flush): Likewise.
5179         (bfd_stat): Likewise.
5180         (bfd_seek): Likewise.
5181         (bfd_get_mtime): Likewise.
5182         (bfd_get_size): Likewise.
5183
5184 2004-05-19  Ben Elliston  <bje@au.ibm.com>
5185
5186         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
5187
5188 2004-05-19  Mikulas Patocka  <mikulas@artax.karlin.mff.cuni.cz>
5189
5190         * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
5191         (bfd_generic_openr_next_archived_file): Likewise.
5192
5193 2004-05-17  Bob Wilson  <bob.wilson@acm.org>
5194
5195         * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
5196         section names by inserting a new substring after .gnu.linkonce, except
5197         for .gnu.linkonce.t.* where the "t." is replaced.
5198
5199 2004-05-17  Adam Nemet  <anemet@lnxw.com>
5200
5201         * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
5202         (m68-*-lynxos* case): Likewise.
5203         (powerpc-*-lyxnos* case): New case.
5204         (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
5205
5206 2004-05-17  David Heine  <dlheine@tensilica.com>
5207
5208         * aout-target.h (MY_bfd_copy_private_header_data): Define.
5209         * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
5210         * bfd.c (bfd_copy_private_header_data): Define.
5211         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
5212         interface.
5213         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
5214         * coffcode.h (coff_bfd_copy_private_header_data): Define.
5215         * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
5216         * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
5217         segments by calling copy_private_bfd_data.
5218         (_bfd_elf_copy_private_header_data): Define.
5219         * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
5220         * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
5221         * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
5222         * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
5223         * mmo.c (mmo_bfd_copy_private_header_data): Define.
5224         * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
5225         * som.c (som_bfd_copy_private_header_data): Define.
5226         * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
5227         * vms.c (vms_bfd_copy_private_header_data): Define.
5228         * bfd-in2.h: Regenerate.
5229         * libbfd.h: Regenerate.
5230
5231 2004-05-15  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
5232
5233         * elfxx-mips.c (MINUS_TWO): Define.
5234         (mips_elf_higher, mips_elf_highest,
5235         mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
5236         some bfd_vma values.
5237         (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
5238
5239 2004-05-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
5240
5241         * som.c (log2): Rename to exact_log2.  Adjust all callers.
5242
5243 2004-05-13  Paul Brook  <paul@codesourcery.com>
5244
5245         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
5246         dwarf3 format CIE entries.  Remove comment about the size of the
5247         ra_column field.  It is now correctly deduced.
5248
5249 2004-05-13  Joel Sherrill <joel@oarcorp.com>
5250
5251         * config.bfd (or32-*-rtems*): Switch to elf.
5252
5253 2004-05-13  Nick Clifton  <nickc@redhat.com>
5254
5255         * po/fr.po: Updated French translation.
5256
5257 2004-05-11  Jakub Jelinek  <jakub@redhat.com>
5258
5259         * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
5260         into .dynsym if elf_section_data (sec)->dynindx <= 0.
5261         Adjust counting of last_local.
5262         (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
5263         other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
5264         created by the linker nor !SHF_ALLOC.
5265
5266         * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
5267         DT_PLTGOT to the start of the .got.plt section instead of the
5268         .got output section.  Set sh_entsize for .got section in addition
5269         to .got.plt.
5270         (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
5271         is at sgot->output_section->vma.
5272         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
5273         DT_PLTGOT to the start of the .got.plt section instead of the
5274         .got output section.
5275         (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
5276         is at sgot->output_section->vma.  Set sh_entsize for .got section
5277         in addition to .got.plt.
5278         * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
5279         (bfd_section_from_phdr): Likewise.
5280         (map_sections_to_segments): Likewise.
5281         (assign_file_positions_for_segments): Likewise.
5282         (get_program_header_size): Likewise.
5283         * elflink.c (bfd_elf_size_dynamic_sections): Set
5284         elf_tdata (output_bfd)->relro from info->relro.
5285         * elf-bfd.h (struct elf_obj_tdata): Add relro field.
5286
5287 2004-05-08  Alexandre Oliva  <aoliva@redhat.com>
5288
5289         * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
5290         a zero symndx for which we hadn't accounted a dynamic relocation.
5291         (_frvfdpic_add_rofixup): Likewise.
5292
5293 2004-05-07  Brian Ford  <ford@vss.fsi.com>
5294             DJ Delorie  <dj@redhat.com>
5295
5296         * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
5297         Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
5298         * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
5299         IMAGE_FILE_LARGE_ADDRESS_AWARE.  Use PE defines.
5300
5301 2004-05-07  Alexandre Oliva  <aoliva@redhat.com>
5302
5303         * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
5304         immediately if there's no link info.
5305         (elf32_frvfdpic_copy_private_bfd_data): New.
5306         (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
5307
5308 2004-05-06  Zack Weinberg  <zack@codesourcery.com>
5309
5310         * dwarf2.c (add_line_info): Also set info->filename to NULL if
5311         filename argument is null; do not call strlen on a null pointer.
5312
5313 2004-05-06  Daniel Jacobowitz  <drow@mvista.com>
5314
5315         * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
5316         special case.
5317
5318 2004-05-05  Alexandre Oliva  <aoliva@redhat.com>
5319
5320         * configure.in (bfd_elf32_frvfdpic_vec): New.
5321         * configure: Rebuilt.
5322         * targets.c (bfd_elf32_frvfdpic_vec): New.
5323         * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
5324         on the latter.
5325         * elf32-frv.c: Prefix all identifiers added for FDPIC support with
5326         frvfdpic instead of frv.  Rearrange elf-target macros such that
5327         the FDPIC-specific ones are only defined for this new target
5328         vector.
5329         (bfd_elf32_frvfdpic_vec): Declare.
5330         (IS_FDPIC): New.
5331         (elf32_frv_relocate_section): Use it to enable segment checking
5332         and to control rofixup emission.  Add output section vma to
5333         applied relocation in non-LOAD non-ALLOC sections.  Use
5334         _bfd_error_handler for errors.
5335         (_frv_create_got_section): Create .rel.got and .rofixup only in
5336         FDPIC.  Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
5337         linker script.
5338         (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
5339         (elf32_frvfdpic_modify_segment_map): Likewise.
5340         (elf32_frv_finish_dynamic_sections): New, do-nothing.
5341         (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC.  Improve
5342         error message if we miscompute the rofixup size.
5343         (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
5344         (frvfdpic_elf_encode_eh_address): Likewise.
5345         (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
5346         Record relocs only in FDPIC.  Make sure _gp is defined for GPREL
5347         relocs.  Reject unknown relocation types.
5348         (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
5349         (frv_elf_merge_private_bfd_data): Likewise.
5350         (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
5351         0x4000 for newly-added elf32-frvfdpic.
5352
5353 2004-05-05  Nick Clifton  <nickc@redhat.com>
5354
5355         PR/136
5356         * cache.c (bfd_cache_lookup_worker): Call abort() rather than
5357         returning NULL as most users of this function do not check its
5358         return value.
5359         * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
5360         of bfd_cache_lookup().
5361         * sco5-core.c (sco5_core_file_p): Likewise.
5362         * trad-core.c (trad_unix_core_file_p): Likewise.
5363
5364 2004-05-05  Nick Clifton  <nickc@redhat.com>
5365
5366         * cache.c (bfd_cache_lookup): Improve formatting.
5367         * archive.c: Fix formatting.
5368
5369 2004-05-05  Peter Barada  <peter@the-baradas.com>
5370
5371         * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
5372         * cpu-m68k.c(bfd_m68k_arch): Likewise.
5373         * bfd-in2.h(bfd_architecture): Regenerate.
5374
5375 2004-05-03  Alan Modra  <amodra@bigpond.net.au>
5376
5377         * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
5378         SEC_MERGE sections.
5379         * elflink.c (elf_link_input_bfd): Adjust output reloc index for
5380         those against discarded link-once and SEC_MERGE section symbols.
5381
5382 2004-05-02  H.J. Lu  <hongjiu.lu@intel.com>
5383
5384         * section.c (bfd_get_section_by_name_if): New.
5385         * bfd-in2.h: Regenerated.
5386
5387 2004-05-02  Alan Modra  <amodra@bigpond.net.au>
5388
5389         * som.c (som_bfd_is_group_section): Define.
5390
5391 2004-05-01  Alan Modra  <amodra@bigpond.net.au>
5392
5393         * section.c (bfd_make_section_anyway): Copy the whole
5394         bfd_hash_entry, not just "next" from existing entry.
5395
5396 2004-04-30  H.J. Lu  <hongjiu.lu@intel.com>
5397
5398         * elf.c (bfd_section_from_shdr): Maintain the section order in
5399         a section group.
5400         (special_sections): Add ".note.GNU-stack".
5401         (elf_fake_sections): Handle section group for relocatable
5402         link..
5403
5404 2004-04-30  H.J. Lu  <hongjiu.lu@intel.com>
5405
5406         * section.c (bfd_sections_find_if): New.
5407         * bfd-in2.h: Regenerated.
5408
5409 2004-04-30  Alan Modra  <amodra@bigpond.net.au>
5410
5411         * section.c (bfd_make_section_anyway): Add all sections to hash tab.
5412
5413         * elf-bfd.h (bfd_elf_is_group_section): Declare.
5414         * elf.c (bfd_elf_is_group_section): New function.
5415         * elfxx-target.h (bfd_elfNN_bfd_is_group_section
5416         * section.c (bfd_generic_is_group_section): New function.
5417         * targets.c (struct bfd_target): Add _bfd_is_group_section field.
5418         (BFD_JUMP_TABLE_LINK): Adjust.
5419         * aout-adobe.c (aout_32_bfd_is_group_section): Define.
5420         * aout-target.h (MY_bfd_is_group_section): Define.
5421         * aout-tic30.c (MY_bfd_is_group_section): Define.
5422         * bfd.c (bfd_is_group_section): Define.
5423         * binary.c (binary_bfd_is_group_section): Define.
5424         * bout.c (b_out_bfd_is_group_section): Define.
5425         * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
5426         * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
5427         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
5428         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
5429         * coffcode.h (coff_bfd_is_group_section): Define.
5430         * i386msdos.c (msdos_bfd_is_group_section): Define.
5431         * i386os9k.c (os9k_bfd_is_group_section): Define.
5432         * ieee.c (ieee_bfd_is_group_section): Define.
5433         * ihex.c (ihex_bfd_is_group_section): Define.
5434         * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
5435         * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
5436         * mmo.c (mmo_bfd_is_group_section): Define.
5437         * nlm-target.h (nlm_bfd_is_group_section): Define.
5438         * oasys.c (oasys_bfd_is_group_section): Define.
5439         * pef.c (bfd_pef_bfd_is_group_section): Define.
5440         * ppcboot.c (ppcboot_bfd_is_group_section): Define.
5441         * srec.c (srec_bfd_is_group_section): Define.
5442         * tekhex.c (tekhex_bfd_is_group_section): Define.
5443         * versados.c (versados_bfd_is_group_section): Define.
5444         * vms.c (vms_bfd_is_group_section): Define.
5445         * xsym.c (bfd_sym_bfd_is_group_section): Define.
5446         * bfd-in2.h: Regenerate.
5447         * libbfd.h: Regenerate.
5448
5449 2004-04-30  Alan Modra  <amodra@bigpond.net.au>
5450
5451         * elflink.c (elf_gc_mark): Follow indirect and warning syms.
5452
5453 2004-04-30  Hans-Peter Nilsson  <hp@axis.com>
5454
5455         * configure.in: Update version to 2.15.91.
5456         * configure: Regenerate.
5457
5458 2004-04-29  Brian Ford  <ford@vss.fsi.com>
5459
5460         * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
5461         * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
5462         [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
5463         (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
5464         [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
5465         .gnu.linkonce.wi. sections.
5466         * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
5467         (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
5468         .gnu.linkonce.wi..
5469         * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
5470         (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5471
5472 2004-04-28  Chris Demetriou  <cgd@broadcom.com>
5473
5474         * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
5475         * bfd-in2.h: Regenerate.
5476         * libbfd.h: Likewise.
5477
5478 2004-04-28  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
5479
5480         * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
5481         dup_common fields.
5482         (setup_sections): Use som_subspace_dictionary_record struct instead
5483         subspace_dictionary_record.  Set SEC_LINK_ONCE if subspace is
5484         is_comdat, is_common or dup_common.
5485         (som_prep_headers): Use som_subspace_dictionary_record struct.  Set
5486         is_comdat, is_common and dup_common in section subspace_dict from
5487         copy_data.
5488         (som_begin_writing): Use som_subspace_dictionary_record struct.
5489         (som_finish_writing): Likewise.
5490         (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
5491         is_common and dup_common flags in info for symbol.  Add comment
5492         regarding linker support for these fields.  Slightly reorganize
5493         function.
5494         (som_build_and_write_symbol_table): Set is_comdat, is_common and
5495         dup_common fields in symbol table from symbol info.
5496         (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
5497         arguments.  Set corresponding fields in copy_data.  Change all callers.
5498         (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
5499         symbol table.
5500         (som_vec): Add SEC_LINK_ONCE to applicable section flags.
5501         * som.h (som_subspace_dictionary_record): Define.
5502         (som_copyable_section_data_struct): Add is_comdat, is_common and
5503         dup_common fields.
5504         (som_section_data_struct): Use som_subspace_dictionary_record struct
5505         instead of subspace_dictionary_record.
5506         (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
5507
5508 2004-04-27  Bob Wilson  <bob.wilson@acm.org>
5509
5510         * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
5511         if set.  Check reloc_done flag before applying relocations.  Use
5512         output addresses, both when applying relocations and when comparing
5513         against the specified section.
5514         (elf_xtensa_relocate_section): Use output address to check if dynamic
5515         reloc is in a literal pool.  Set section's reloc_done flag.
5516
5517 2004-04-27  H.J. Lu  <hongjiu.lu@intel.com>
5518
5519         * elf32-sh64.c (elf_backend_section_flags): New. Defined.
5520         (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
5521         section.
5522         (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
5523         section.
5524
5525 2004-04-27  Alan Modra  <amodra@bigpond.net.au>
5526
5527         * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
5528         structure field removed in 2004-04-24 patch.
5529         * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
5530
5531         * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
5532         Constify hdr arg.
5533         * elf32-arm.h (elf32_arm_section_flags): Likewise.
5534         * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
5535         * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
5536         * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
5537         field before calling elf_backend_section_flags.
5538
5539 2004-04-24  Chris Demetriou  <cgd@broadcom.com>
5540
5541         * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
5542         (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
5543         (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
5544         BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
5545         and BFD_RELOC_32_PCREL.
5546         (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
5547         R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
5548         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
5549         (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
5550         (mips_elf_next_relocation): Move comment about matching HI/LO
5551         relocations to...
5552         (_bfd_mips_elf_relocate_section): Here.  Remove handling for
5553         R_MIPS_GNU_REL_HI16.
5554
5555 2004-04-23  Chris Demetriou  <cgd@broadcom.com>
5556
5557         * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
5558         (mips_switch_reloc, mips_read_relocs, mips_relax_section)
5559         (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
5560         (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
5561         and update comments to reflect current usage.
5562         (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
5563         and MIPS_R_SWITCH, as well as several empty entries.  Update comment
5564         for MIPS_R_PCREL16.
5565         (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
5566         (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
5567         for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
5568         (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
5569         type number to be MIPS_R_PCREL16.
5570         (mips_relocate_section): Remove support for link-time relaxation
5571         of branches used by embedded-PIC.  Remove support for MIPS_R_SWITCH,
5572         MIPS_R_RELLO, and MIPS_R_RELHI relocations.
5573         (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
5574         * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
5575         relaxation of branches used by embedded-PIC.
5576         * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
5577         * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
5578         related members, update comment.
5579         * pe-mips.c: Remove disabled (commented-out and #if 0'd)
5580         code related to embedded-PIC.
5581         * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
5582         initialization of now-removed 'adjust' member of
5583         'struct ecoff_debug_info'.
5584
5585 2004-04-23  Chris Demetriou  <cgd@broadcom.com>
5586
5587         * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
5588
5589 2004-04-21  Philip Blundell  <pb@nexus.co.uk>
5590
5591         * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
5592         relocs for locally defined symbols during -shared final link.
5593         (elf32_arm_final_link_relocate): Likewise.
5594
5595 2004-04-22  Jakub Jelinek  <jakub@redhat.com>
5596
5597         * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
5598         ELF_LINK_POINTER_EQUALITY_NEEDED.
5599         (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
5600         if r_type is not R_X86_64_PC32.
5601         (elf64_x86_64_finish_dynamic_symbol): If
5602         ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
5603         SHN_UNDEF symbols.
5604
5605 2004-04-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5606
5607         * elf32-sh.c (sh_elf_plt_sym_val): New function.
5608         (elf_backend_plt_sym_val): Define.
5609
5610 2004-04-22  Andrew Cagney  <cagney@redhat.com>
5611
5612         * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
5613
5614 2004-04-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
5615
5616         * hpux-core.c (hpux_core_core_file_p): Add cast in call to
5617         make_bfd_asection.
5618         * som.c (som_set_section_contents): Constantify second argument.
5619         (hppa_som_gen_reloc_type): Abort for unsupported selectors.
5620         (som_object_setup): Rework to avoid warning.
5621         (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
5622         Likewise.
5623
5624 2004-04-22  Andrew Cagney  <cagney@redhat.com>
5625
5626         * cache.c (bfd_cache_close): Check for a previously closed file.
5627
5628 2004-04-22  Jakub Jelinek  <jakub@redhat.com>
5629
5630         * bfd.c (bfd_get_synthetic_symtab): Define.
5631         * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
5632         NAME##_get_synthetic_symtab.
5633         (struct bfd_target): Add _bfd_get_synthetic_symtab.
5634         * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
5635         * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
5636         relplt_name fields.
5637         (_bfd_elf_get_synthetic_symtab): New prototype.
5638         * elfcode.h (elf_get_synthetic_symtab): Define.
5639         * elf.c (_bfd_elf_get_synthetic_symtab): New function.
5640         * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
5641         (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
5642         (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
5643         * bfd-in2.h: Rebuilt.
5644         * libbfd.h: Rebuilt.
5645         * elf32-i386.c (elf_i386_plt_sym_val): New function.
5646         (elf_backend_plt_sym_val): Define.
5647         * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
5648         (elf_backend_plt_sym_val): Define.
5649         * elf32-s390.c (elf_s390_plt_sym_val): New function.
5650         (elf_backend_plt_sym_val): Define.
5651         * elf64-s390.c (elf_s390_plt_sym_val): New function.
5652         (elf_backend_plt_sym_val): Define.
5653         * elf32-sparc (elf32_sparc_plt_sym_val): New function.
5654         (elf_backend_plt_sym_val): Define.
5655         * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
5656         (elf_backend_plt_sym_val): Define.
5657         * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
5658         (elf_backend_plt_sym_val): Define.
5659         * aout-target.h (MY_get_synthetic_symtab): Define.
5660         * aout-tic30.c (MY_get_synthetic_symtab): Define.
5661         * coff-rs6000.c (rs6000coff_vec): Add
5662         _bfd_nodynamic_get_synthetic_symtab.
5663         (pmac_xcoff_vec): Likewise.
5664         * coff64-rs6000.c (rs6000coff64_vec): Add
5665         _bfd_nodynamic_get_synthetic_symtab.
5666         (aix5coff64_vec): Likewise.
5667         * sunos.c (MY_get_synthetic_symtab): Define.
5668         * vms.c (vms_get_synthetic_symtab): Define.
5669
5670 2004-04-22  Nick Clifton  <nickc@redhat.com>
5671
5672         * bfd.c (bfd_archive_filename): Return NULL on NULL input.
5673
5674 2004-04-22  Peter Barada <peter@the-baradas.com>
5675
5676         * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
5677         * bfd2-in.h: Regenerate.
5678         * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
5679
5680 2004-04-21  Chris Demetriou  <cgd@broadcom.com>
5681
5682         * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
5683         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
5684         * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
5685         (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
5686         * bfd-in2.h: Regenerate.
5687
5688 2004-04-21  Bob Wilson  <bob.wilson@acm.org>
5689
5690         * elf32-xtensa.c (is_same_value): Add final_static_link argument and
5691         require relocations against a weak symbol to reference the same
5692         symbol hash entry if not a final, static link.
5693         (get_cached_value, add_value_map): Add final_static_link argument.
5694         (remove_literals): Pass final_static_link argument as needed.
5695
5696 2004-04-21  Andrew Cagney  <cagney@redhat.com>
5697
5698         * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
5699         (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
5700         (opncls_bwrite, opncls_bclose, opncls_bflush)
5701         (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
5702         bfd iovec that uses function callbacks.
5703         (bfd_close): Use the iovec's bclose.
5704         * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
5705         (cache_bclose, cache_bflush, cache_bstat)
5706         (cache_iovec): New functions and global variable, implement a
5707         cache "iovec", where applicable set bfd_error.
5708         (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
5709         * bfdio.c (struct bfd_iovec): Define.
5710         (real_read): Delete function.
5711         (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
5712         (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
5713         assume that bread and bwrite set bfd_error.
5714         * bfd.c (struct bfd): Add "iovec", update comments.
5715         * bfd-in2.h, libbfd.h: Re-generate.
5716
5717 2004-04-21  Andrew Cagney  <cagney@redhat.com>
5718
5719         * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
5720
5721 2004-04-21  Eric Botcazou  <ebotcazou@act-europe.fr>
5722
5723         * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
5724         (bfd_elf_gc_sections): Fail if a shared object is being created.
5725         Do not fail if dynamic sections have been created.  Instead call
5726         elf_gc_mark_dynamic_ref_symbol to mark sections that contain
5727         dynamically referenced symbols.  Do not mark the whole graph
5728         rooted at .eh_frame, only the section proper.
5729
5730 2004-04-20  DJ Delorie  <dj@redhat.com>
5731
5732         * reloc.c: Add BFD_RELOC_32_SECREL.
5733         * bfd-in2.h: Regenerate.
5734         * libbfd.h: Likewise.
5735         * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
5736         (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
5737         (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
5738
5739 2004-04-19  Jakub Jelinek  <jakub@redhat.com>
5740
5741         * elf32-sparc.c (elf32_sparc_relocate_section): Handle
5742         relocs against hidden/protected undefweak symbols properly.
5743         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5744
5745 2004-04-18  Mark Kettenis  <kettenis@gnu.org>
5746
5747         * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
5748         * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
5749         core files.
5750
5751 2004-04-17  Brian Ford  <ford@vss.fsi.com>
5752
5753         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
5754         filepos for the SizeOfHeaders field.
5755         (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
5756         overflow.
5757         (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
5758
5759 2004-04-16  Alan Modra  <amodra@bigpond.net.au>
5760
5761         * simple.c (bfd_simple_get_relocated_section_contents): Don't
5762         change reloc_done.  Set and restore _cooked_size.
5763         (RETURN): Delete.
5764
5765 2004-04-15  Mark Kettenis  <kettenis@gnu.org>
5766
5767         * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
5768         core files.
5769
5770 2004-04-15  Nick Clifton  <nickc@redhat.com>
5771
5772         * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
5773
5774 2004-04-15  Alan Modra  <amodra@bigpond.net.au>
5775
5776         * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
5777
5778 2004-04-15  H.J. Lu  <hongjiu.lu@intel.com>
5779
5780         * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
5781         when it is a definition.
5782
5783 2004-04-14  Alan Modra  <amodra@bigpond.net.au>
5784
5785         * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
5786         when statically linking PIC code.
5787         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5788
5789 2004-04-11  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
5790
5791         * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
5792         * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
5793         targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
5794         * configure: Regenerate.
5795
5796 2004-04-08  Richard Sandiford  <rsandifo@redhat.com>
5797
5798         * elflink.c: Include libiberty.h.
5799         * Makefile.am (elflink.lo): Depend on libiberty.h.
5800         * Makefile.in: Regenerate.
5801
5802 2004-04-06  Daniel Jacobowitz  <drow@mvista.com>
5803
5804         * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
5805         ".MIPS.stubs".
5806
5807 2004-04-05  H.J. Lu  <hongjiu.lu@intel.com>
5808
5809         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
5810         reserve the memory for dynamic linker
5811
5812 2004-04-05  Mark Kettenis  <kettenis@gnu.org>
5813
5814         * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
5815         (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
5816
5817 2004-04-02  H.J. Lu  <hongjiu.lu@intel.com>
5818
5819         * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
5820         RELOC_FOR_GLOBAL_SYMBOL.
5821         (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
5822
5823 2004-04-02  H.J. Lu  <hongjiu.lu@intel.com>
5824
5825         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5826         R_ARM_ALU* only if OLD_ARM_ABI is not defined.
5827
5828 2004-04-01  Paul Brook  <paul@codesourcery.com>
5829
5830         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
5831         * elf32-arm.h (struct elf32_elf_section_map): New.
5832         (struct _arm_elf_section_data): New.
5833         (elf32_arm_section_data): Define.
5834         (struct elf32_arm_link_hash_table): Add byteswap_code.
5835         (elf32_arm_link_hash_table_create): Initialize byteswap_code.
5836         (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
5837         (elf32_arm_post_process_headers): Set EF_ARM_BE8.
5838         (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
5839         elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
5840         (bfd_elf32_new_section_hook, elf_backend_write_section,
5841         elf_backend_link_output_symbol_hook): Define.
5842
5843 2004-04-01  Andy Chittenden  <achittenden@bluearc.com>
5844
5845         * stabs.c (struct stab_link_includes_totals): Add field 'symb'
5846         that keeps the characters in a B_INCL..B_EINCL range.
5847         (_bfd_link_section_stabs): When computing the sum of the
5848         characters in a B_INCL..B_EINCL range also keep a copy of those
5849         characters.  Use this information to distinguish between
5850         include sections that have the same sum and the same length
5851         but which are nevertheless unique.
5852
5853 2004-03-31  Paul Brook  <paul@codesourcery.com>
5854
5855         * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
5856         * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
5857
5858 2004-03-31  Andy Chittenden <achittenden@bluearc.com>
5859
5860         * stabs.c (struct stab_link_includes_totals): Rename field 'total'
5861         to 'sum_chars' and add field 'num_chars'.
5862         (_bfd_link_section_stabs): When computing the sum of the
5863         characters in a B_INCL..B_EINCL range also keep a count of the
5864         number of characters.  Use this information to help distinguish
5865         between include sections when have the same sum but which
5866         nevertheless are still unique.
5867
5868 2004-03-31  Mattias EngdegÃ¥rd  <mattias@virtutech.se>
5869
5870         * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
5871
5872 2004-03-30  Galit Heller  <Galit.Heller@nsc.com>
5873             Tomer Levi    <Tomer.Levi@nsc.com>
5874
5875         * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
5876         (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
5877         (BFD32_BACKENDS): Add elf32-cr16c.lo.
5878         (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
5879         (cpu-cr16c.lo): New target.
5880         (elf32-cr16c.lo): Likewise.
5881         * Makefile.in: Regenerate.
5882         * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
5883         (bfd_archures_list): Add bfd_cr16c_arch.
5884         * config.bfd: Handle cr16c-*-elf*.
5885         * configure.in: Handle bfd_elf32_cr16c_vec.
5886         * configure: Regenerate.
5887         * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
5888         BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
5889         BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
5890         BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
5891         BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
5892         BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
5893         BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
5894         BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
5895         BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
5896         BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
5897         BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
5898         BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
5899         BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
5900         BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
5901         BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
5902         BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
5903         BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
5904         BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
5905         BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
5906         BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
5907         * targets.c (bfd_elf32_cr16c_vec): Declare.
5908         (bfd_target_vector): Add bfd_elf32_cr16c_vec.
5909         * cpu-cr16c.c: New file.
5910         * elf32-cr16c.c: Likewise.
5911         * libbfd.h: Regenerate.
5912         * bfd-in2.h: Likewise.
5913
5914 2004-03-30  Jakub Jelinek  <jakub@redhat.com>
5915
5916         * elf.c (map_sections_to_segments): Fix handling of .tbss.
5917
5918 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
5919
5920         * Makefile.am: Remove all mention of elflink.h.
5921         * Makefile.in: Regenerate.
5922         * bfd-in.h (bfd_elf_discard_info): Declare.
5923         (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
5924         * bfd-in2.h: Regenerate.
5925         * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
5926         bfd_elf32_link_record_dynamic_symbol,
5927         bfd_elf64_link_record_dynamic_symbol,
5928         _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
5929         bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
5930         _bfd_elf32_link_record_local_dynamic_symbol,
5931         _bfd_elf64_link_record_local_dynamic_symbol,
5932         _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
5933         _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
5934         _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
5935         _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
5936         _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
5937         _bfd_elf32_reloc_symbol_deleted_p,
5938         _bfd_elf64_reloc_symbol_deleted_p): Delete.
5939         (bfd_elf_link_record_dynamic_symbol,
5940         bfd_elf_link_record_local_dynamic_symbol,
5941         bfd_elf_final_link, bfd_elf_gc_sections,
5942         bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
5943         bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
5944         bfd_elf_reloc_symbol_deleted_p): Declare.
5945         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
5946         * elf32-arm.h: Update for changed function names.  Remove local
5947         WILL_CALL_FINISH_DYNAMIC_SECTION define.
5948         * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
5949         * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
5950         * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
5951         * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
5952         * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5953         * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
5954         * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
5955         * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
5956         * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
5957         (bfd_elfNN_print_symbol): Define.
5958         * elfcode.h: Don't include elflink.h.
5959         (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
5960         elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
5961         elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
5962         elf_gc_record_vtinherit, elf_gc_record_vtentry,
5963         elf_link_record_local_dynamic_symbol): Don't define.
5964         * elflink.c: Update for changed function names.  Move elflink.h
5965         code here.
5966         * elflink.h: Delete file.
5967         * po/SRC-POTFILES.in: Regenerate.
5968         * po/bfd.pot: Regenerate.
5969
5970 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
5971
5972         * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
5973         "name" for global syms accidentally removed in 2004-03-20 change.
5974
5975 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
5976
5977         * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
5978         * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
5979         where Elf_External_* is different for 64 and 32 bit, with
5980         corresponding elf_size_info field.
5981         (struct elf_final_link_info): Use "bfd_byte *" instead
5982         of "Elf_External_Sym *" for external_syms and symbuf.
5983         (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
5984         vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
5985         (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
5986         (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
5987         (elf_link_sort_cmp2): Adjust.
5988         (elf_link_sort_relocs): Set up r_sym_mask local var instead of
5989         using ELF_R_SYM macro.  Set u.sym_mask.
5990         (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
5991         version, elf_stringtab_init.  Ditto for bfd_section_from_elf_index
5992         vs. section_from_elf_index.  Adjust Elf_External_Sym pointer
5993         arithmetic.  Pass bed to elf_link_flush_output_syms.  Adjust
5994         Elf_External_Dyn pointer arithmentic.  Use bed swap_dyn_in and
5995         swap_syn_out functions.  Rearrange dyn swap in/out switch.
5996         (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
5997         Pass bed to elf_link_flush_output_syms.  Use bed swap_symbol_out.
5998         (elf_link_flush_output_syms): Add elf_backend_data arg.
5999         (elf_link_check_versioned_symbol): Likewise.
6000         (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
6001         Adjust Elf_External_Sym pointer arithmetic.  Use bed swap_symbol_out.
6002         (elf_link_input_bfd): Use bfd_section_from_elf_index.  Set up
6003         r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
6004         ELF_R_TYPE and ELF_R_INFO macros.
6005         (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
6006         based on size rather than using ELF_R_INFO.
6007         (elf_gc_mark): Set up r_sym_shift local var and use instead of
6008         ELF_R_SYM macro.
6009         (struct alloc_got_off_arg): New.
6010         (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
6011         ARCH_SIZE.  Pass get entry size down to elf_gc_allocate_got_offsets.
6012         (elf_gc_allocate_got_offsets): Adjust.
6013         (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
6014         ELF_R_SYM.  Use bfd_section_from_elf_index.
6015         (elf_bfd_discard_info): Set cookie.r_sym_shift.
6016         * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
6017         (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
6018
6019 2004-03-26  Stan Shebs  <shebs@apple.com>
6020
6021         Remove MPW support, no longer used.
6022         * config.bfd (powerpc-*-mpw*): Remove configuration.
6023         * mpw-config.in, mpw-make.sed: Remove files.
6024         * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
6025
6026 2004-03-26  Alan Modra  <amodra@bigpond.net.au>
6027
6028         * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
6029         (ppc64_elf_add_symbol_hook): New function.
6030         * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
6031         const from Elf_Internal_Sym param.
6032         * elflink.c (elf_link_add_object_symbols): Adjust.
6033         * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
6034         * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
6035         * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
6036         * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
6037         * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
6038         * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
6039         * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
6040         * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
6041         * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
6042         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
6043         * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
6044         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
6045         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
6046         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
6047         * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
6048         * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
6049
6050 2004-03-26  Alan Modra  <amodra@bigpond.net.au>
6051
6052         * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
6053         * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
6054         (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
6055         (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
6056         (bfd_elf64_bfd_link_add_symbols): Delete.
6057         (bfd_elf_link_add_symbols): Declare.
6058         * elfcode.h (elf_bfd_link_add_symbols): Delete.
6059         * elflink.c: Include safe-ctype.h.
6060         (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
6061         make static.
6062         (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
6063         (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
6064         static.
6065         (elf_link_add_archive_symbols): Rename from
6066         _bfd_elf_link_add_archive_symbols, make static.
6067         (elf_link_add_object_symbols): New function.  Corresponding
6068         elflink.h function converted to use elf_size_info.
6069         (bfd_elf_link_add_symbols): Likewise.
6070         (bfd_elf_size_dynamic_sections): Adjust.
6071         * elflink.h (elf_bfd_link_add_symbols): Delete.
6072         (elf_link_add_object_symbols): Delete.
6073         * elf32-gen.c (elf32_generic_link_add_symbols): Call
6074         bfd_elf_link_add_symbols.
6075         * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
6076
6077 2004-03-25  Alan Modra  <amodra@bigpond.net.au>
6078
6079         * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
6080         and chained shared libs only if dynsym.  Clear dynsym on forced-local.
6081
6082         * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
6083         (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
6084         (_bfd_elf_add_dt_needed_tag): Declare.
6085         (_bfd_elf_sort_symbol): Declare.
6086         (_bfd_elf_finalize_dynstr): Declare.
6087         (RELOC_FOR_GLOBAL_SYM): Formatting.
6088         * elfcode.h (elf_add_dynamic_entry): Delete.
6089         * elflink.c (_bfd_elf_add_dynamic_entry): New function.  Corresponding
6090         elflink.h function converted to use elf_size_info.
6091         (_bfd_elf_add_dt_needed_tag): Likewise.
6092         (_bfd_elf_sort_symbol): Likewise.
6093         (_bfd_elf_finalize_dynstr): Likewise.
6094         (compute_bucket_count): Likewise.
6095         (bfd_elf_size_dynamic_sections): Likewise.  Check result of
6096         _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
6097         (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
6098         * elflink.h: ..here.
6099         (sort_symbol, add_dt_needed_tag): Delete.
6100         (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
6101         (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
6102         Update all users.
6103         * elf32-arm.h (add_dynamic_entry): Update.  Remove casts.
6104         * elf32-cris.c (add_dynamic_entry): Likewise.
6105         * elf32-hppa.c (add_dynamic_entry): Likewise.
6106         * elf32-i370.c (add_dynamic_entry): Likewise.
6107         * elf32-i386.c (add_dynamic_entry): Likewise.
6108         * elf32-m32r.c (add_dynamic_entry): Likewise.
6109         * elf32-m68k.c (add_dynamic_entry): Likewise.
6110         * elf32-ppc.c (add_dynamic_entry): Likewise.
6111         * elf32-s390.c (add_dynamic_entry): Likewise.
6112         * elf32-sh.c (add_dynamic_entry): Likewise.
6113         * elf32-sparc.c (add_dynamic_entry): Likewise.
6114         * elf32-vax.c (add_dynamic_entry): Likewise.
6115         * elf32-xtensa.c (add_dynamic_entry): Likewise.
6116         * elf64-alpha.c (add_dynamic_entry): Likewise.
6117         * elf64-hppa.c (add_dynamic_entry): Likewise.
6118         * elf64-ppc.c (add_dynamic_entry): Likewise.
6119         * elf64-s390.c (add_dynamic_entry): Likewise.
6120         * elf64-sparc.c (add_dynamic_entry): Likewise.
6121         * elf64-x86-64.c (add_dynamic_entry): Likewise.
6122         * elfxx-ia64.c (add_dynamic_entry): Likewise.
6123         * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
6124         * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
6125         * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
6126         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6127
6128 2004-03-23  Paul Brook  <paul@codesourcery.com>
6129
6130         * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
6131
6132 2004-03-22  Bob Wilson  <bob.wilson@acm.org>
6133
6134         * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
6135         literal tables and check for relocs outside of literal pools.
6136         (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
6137         (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
6138         set DF_TEXTREL.
6139         (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
6140         (elf_xtensa_relocate_section): Read literal tables and check for
6141         dynamic relocations in read-only sections and not in literal pools.
6142
6143 2004-03-23  Alan Modra  <amodra@bigpond.net.au>
6144
6145         PR 51.
6146         * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
6147
6148 2004-03-22  Hans-Peter Nilsson  <hp@axis.com>
6149
6150         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
6151         R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
6152         not defined by the executable, or defined in a DSO.
6153         <eliding run-time relocation of .got>: Initialize GOT entry for a
6154         function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
6155         executable.
6156         (cris_elf_gc_sweep_hook): Improve fallthrough marking.
6157         (elf_cris_try_fold_plt_to_got): Improve head comment.  Do not fold
6158         a PLT reloc to GOT for an executable.
6159         (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
6160         .got for a DSO and explain why.
6161         (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
6162         and unreferenced symbols for which a PLT is defined.  Adjust
6163         dynamic-symbol pruning correspondingly, to make sure we don't lose
6164         a dynamic symbol also defined by a DSO.
6165
6166 2004-03-22  Alan Modra  <amodra@bigpond.net.au>
6167
6168         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
6169         and rel args.  Group input and output args.  Wrap to 80 columns.
6170         * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
6171         elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
6172         elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
6173         elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
6174         elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
6175         elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
6176         elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
6177         elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
6178         RELOC_FOR_GLOBAL_SYMBOL invocation.
6179
6180 2004-03-20  H.J. Lu  <hongjiu.lu@intel.com>
6181
6182         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
6183         unresolved symbols in objects aren't allowed.
6184
6185         * elf-hppa.h (elf_hppa_relocate_section): Properly handle
6186         unresolved symbols.
6187         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
6188         (elf_hppa_unmark_useless_dynamic_symbols):
6189         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6190         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
6191         (elf32_hppa_relocate_section): Likewise.
6192         * elf32-i370.c (i370_elf_relocate_section): Likewise.
6193         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6194         * elf32-sh.c (sh_elf_relocate_section): Likewise.
6195         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
6196         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6197
6198         * elf-m10200.c (mn10200_elf_relocate_section): Use
6199         RELOC_FOR_GLOBAL_SYMBOL.
6200         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6201         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
6202         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
6203         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6204         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6205         * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
6206         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
6207         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
6208         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6209         * elf32-v850.c (v850_elf_relocate_section): Likewise.
6210         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6211         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
6212
6213 2004-03-19  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
6214
6215         * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
6216         (final_link_relocate): Likewise.
6217         * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
6218         R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
6219
6220 2004-03-19  Alan Modra  <amodra@bigpond.net.au>
6221
6222         * Makefile.am: Run "make dep-am".
6223         * Makefile.in: Regenerate.
6224         * aclocal.m4: Regenerate.
6225         * config.in: Regenerate.
6226         * po/bfd.pot: Regenerate.
6227
6228 2004-03-19  Alan Modra  <amodra@bigpond.net.au>
6229             H.J. Lu  <hongjiu.lu@intel.com>
6230
6231         * elflink.c (_bfd_elf_merge_symbol): Revert last change.  Move
6232         type and size change code to where it was previously.  Remove
6233         dt_needed param.  Treat old weak syms as strong if new sym is
6234         from a shared lib, even when old sym is from another shared
6235         lib.  Remove unnecessary tests of oldweak and newweak.  Correct
6236         comments.
6237         (_bfd_elf_add_default_symbol): Remove dt_needed param.  Update
6238         _bfd_elf_merge_symbol calls.
6239         * elflink.h (elf_link_add_object_symbols): Update calls.  Remove
6240         dt_needed local var.  Update comments.
6241         * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
6242         (_bfd_elf_add_default_symbol): Likewise.
6243
6244         * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
6245         strong syms in one shared object overriding weak syms in another.
6246
6247 2004-03-18  Alan Modra  <amodra@bigpond.net.au>
6248
6249         * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field.  Add
6250         dyn_lib_class field.  Rearrange for better packing.
6251         (elf_dt_soname): Delete.
6252         (elf_dyn_lib_class): Define.
6253         * elf.c (bfd_elf_set_dt_needed_name): Update comment.
6254         (bfd_elf_set_dt_needed_soname): Delete.
6255         (bfd_elf_set_dyn_lib_class): New function.
6256         * elflink.h (add_dt_needed_tag): New function.  Split out from..
6257         (elf_link_add_object_symbols): ..here.  Rename "name" to "soname".
6258         Use elf_dyn_lib_class to set dt_needed and add_needed.  Move fallback
6259         initialization of soname.
6260         (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
6261         elf_dt_soname.
6262         * bfd-in.h (enum dynamic_lib_link_class): New.
6263         (bfd_elf_set_dt_needed_soname): Delete.
6264         (bfd_elf_set_dyn_lib_class): Declare.
6265         * bfd-in2.h: Regenerate.
6266
6267         * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
6268         (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
6269         * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
6270         symbol loop.  Instead use add_needed to flag tag as written.
6271
6272 2004-03-17  Nathan Sidwell  <nathan@codesourcery.com>
6273
6274         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
6275         logic for null_input_bfd detection.
6276
6277 2004-03-17  Ralf Corsepius <corsepiu@faw.uni-ulm.de>
6278
6279         * config.bfd: Switch sh-*-rtems* to ELF.  Add sh-*-rtemscoff*.
6280
6281 2004-03-16  Mark Kettenis  <kettenis@gnu.org>
6282
6283         * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
6284         code.
6285
6286 2004-03-16  Alan Modra  <amodra@bigpond.net.au>
6287
6288         * elflink.c (elf_link_read_relocs_from_section): Don't use
6289         NUM_SHDR_ENTRIES in end of reloc calc.  Move NULL shdr check..
6290         (_bfd_elf_link_read_relocs): ..to here.
6291         * elf32-ppc.c (ppc_elf_relax_section): Formatting.
6292
6293 2004-03-16  Alan Modra  <amodra@bigpond.net.au>
6294
6295         * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
6296         values selected in configure.host.  Require both to be defined
6297         before setting BFD_HOST_64_BIT_DEFINED.  Protect assignment to
6298         corresponding BFD_HOST vars with quotes.
6299         <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
6300         Always require BFD_HOST_64_BIT_DEFINED.
6301         <file_ptr type>: Find off_t size before emitting message.  Combine
6302         off_t and ftello64 conditional.
6303         * configure: Regenerate.
6304
6305 2004-03-16  Alan Modra  <amodra@bigpond.net.au>
6306
6307         * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
6308         aliasing warning.  Remove trailing whitespace throughout file.
6309
6310 2004-03-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
6311
6312         * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
6313         input_section in calls to get_dyn_name.
6314         * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *".        Use section id of first section in input BFD to build dynamic name for
6315         local symbols.
6316         (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
6317
6318 2004-03-15  Alan Modra  <amodra@bigpond.net.au>
6319
6320         * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
6321         (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
6322         (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
6323         (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
6324         (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
6325         * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
6326         (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
6327         when using long.
6328         * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
6329         (bfd_getb64): Return bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
6330         (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
6331         (bfd_putb64): Accept bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
6332         (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
6333         * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
6334         (read_8_bytes, read_indirect_string, read_address): Likewise.
6335         (read_abbrevs, parse_comp_unit): Likewise.
6336         * targets.c (struct bfd_target): Likewise.
6337         * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
6338         * hppabsd-core.c: Likewise.  Formatting.
6339         * hpux-core.c: Likewise.
6340         * irix-core.c: Likewise.
6341         * netbsd-core.c: Likewise.
6342         * osf-core.c: Likewise.
6343         * ptrace-core.c: Likewise.
6344         * sco5-core.c: Likewise.
6345         * trad-core.c: Likewise.
6346         * configure: Regenerate.
6347         * bfd-in2.h: Regenerate.
6348
6349 2004-03-15  Alan Modra  <amodra@bigpond.net.au>
6350
6351         * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
6352         (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
6353         (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
6354         (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
6355         (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
6356         (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
6357         (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
6358         * libbfd.c: Likewise in function definitions.
6359         (bfd_put_8): Mask with 0xff rather than casting to char.
6360         (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
6361         (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
6362         (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
6363         (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
6364         (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
6365         (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
6366         * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
6367         (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
6368         (H_GET_64, H_GET_32, H_GET_16): Likewise.
6369         (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
6370         * archive.c (do_slurp_coff_armap): Update swap prototype.
6371         * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
6372         (tic54x_getl_signed_32): Likewise.
6373         (tic54x_putl32): Likewise.  Mask with 0xff rather than casting to char.
6374         * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
6375         * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
6376         (bfd_getp_signed_32, bfd_putp32): Likewise.
6377         * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
6378         bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
6379         bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
6380         bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
6381         bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
6382         bfd_h_getx_signed_16, bfd_h_putx16.
6383         * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
6384         * hppabsd-core.c: Similarly.  Rename NO_SIGNED_GET to NO_GETS.
6385         * hpux-core.c: Likewise.
6386         * irix-core.c: Likewise.
6387         * netbsd-core.c: Likewise.
6388         * osf-core.c: Likewise.
6389         * ptrace-core.c: Likewise.
6390         * sco5-core.c: Likewise.
6391         * trad-core.c: Likewise.
6392         * bfd-in2.h: Regenerate.
6393
6394 2004-03-15  Matt Thomas  <matt@3am-software.com>
6395
6396         * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
6397         selected.
6398
6399 2004-03-13  Mark Kettenis  <kettenis@gnu.org>
6400
6401         * config.bfd: Add x86_64-*-openbsd*.
6402         * configure.in (x86_64-*-openbsd*): Set COREFILE to
6403         netbsd-core.lo.
6404         * configure: Regenerate.
6405
6406 2004-03-12  Nick Clifton  <nickc@redhat.com>
6407             Dave Murphy  <wintermute2k4@ntlworld.com>
6408
6409         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
6410         if the input bfd does not contain any code.
6411
6412 2004-03-09  Steve Ellcey  <sje@cup.hp.com>
6413
6414         * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
6415
6416 2004-03-05  Fred Fish  <fnf@redhat.com>
6417
6418         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
6419         mips16 symbols to be even rather than testing first for even/odd.
6420         (_bfd_mips_elf_link_output_symbol_hook): Ditto.
6421
6422 2004-03-05  Nathan Sidwell  <nathan@codesourcery.com>
6423
6424         * elf.c (map_sections_to_segments): Ignore .tbss sections for
6425         layout purposes.
6426
6427 2004-03-03  Alexandre Oliva  <aoliva@redhat.com>
6428
6429         * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
6430         undefined symbols as hash_new.
6431
6432 2003-03-03  Andrew Stubbs  <andrew.stubbs@superh.com>
6433
6434         * archures.c: Add bfd_mach_sh4_nommu_nofpu.
6435         * cpu-sh.c: Ditto.
6436         * elf32-sh.c: Ditto.
6437         * bfd-in2.h: Regenerate.
6438
6439 2004-03-02  Alexandre Oliva  <aoliva@redhat.com>
6440
6441         * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
6442         dynrelocs.
6443         (_frv_count_got_plt_entries): Initialize them.
6444         (frv_pic_relocs_info_find): Add insert argument.  Adjust all
6445         callers.
6446         (frv_pic_relocs_info_for_global): Likewise.
6447         (frv_pic_relocs_info_for_local): Likewise.
6448         (frv_pic_merge_early_relocs_info): New.
6449         (_frv_resolve_final_relocs_info): Use it in case one entry maps to
6450         another.
6451         (_frv_add_dyn_reloc): Add entry argument.  Adjust all callers.
6452         Check that we don't exceed the allocated count for entry.
6453         (_frv_add_rofixup): Likewise.
6454         (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
6455         (elf32_frv_finish_dynamic_sections): Improve error message in case
6456         we emit too few rofixup entries.
6457
6458 2004-03-01  Richard Sandiford  <rsandifo@redhat.com>
6459
6460         * archures.c (bfd_mach_fr450): New.
6461         * bfd-in2.h: Regenerate.
6462         * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
6463         (arch_info_500): Link to it.
6464         * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
6465         (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
6466         (frv_elf_arch_extension_p): New function.
6467         (frv_elf_merge_private_bfd_data): Use it.
6468
6469 2004-02-28  H.J. Lu  <hongjiu.lu@intel.com>
6470
6471         * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
6472
6473         * elflink.h (is_global_data_symbol_definition): Moved to
6474         elflink.c.
6475         (elf_link_is_defined_archive_symbol): Likewise.
6476         (elf_link_add_archive_symbols): Likewise. Renamed to
6477         _bfd_elf_link_add_archive_symbols.
6478
6479         * elflink.c (elf_link_is_defined_archive_symbol): Get the size
6480         of ELF symbol table entry from backend.
6481         (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
6482         instead of elf_link_add_object_symbols.
6483
6484 2004-02-27  Alexandre Oliva  <aoliva@redhat.com>
6485
6486         * elf-bfd.h (struct elf_backend_data): Added
6487         elf_backend_can_make_relative_eh_frame,
6488         elf_backend_can_make_lsda_relative_eh_frame and
6489         elf_backend_encode_eh_address.
6490         (_bfd_elf_encode_eh_address): Declare.
6491         (_bfd_elf_can_make_relative): Declare.
6492         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
6493         hooks to decide whether to attempt to make_relative and
6494         make_lsda_relative.
6495         (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
6496         (_bfd_elf_can_make_relative): New.
6497         (_bfd_elf_encode_eh_address): New.
6498         * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
6499         (frv_elf_encode_eh_address): New.
6500         (elf_backend_can_make_relative_eh_frame): Define.
6501         (elf_backend_can_make_lsda_relative_eh_frame): Define.
6502         (elf_backend_encode_eh_address): Define.
6503         * elfxx-target.h
6504         (elf_backend_can_make_relative_eh_frame): Define.
6505         (elf_backend_can_make_lsda_relative_eh_frame): Define.
6506         (elf_backend_encode_eh_address): Define.
6507         (elfNN_bed): Add them.
6508
6509 2004-02-27  Alexandre Oliva  <aoliva@redhat.com>
6510
6511         * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
6512         complain_on_overflow to signed.
6513
6514 2004-02-27  H.J. Lu  <hongjiu.lu@intel.com>
6515
6516         * elflink.h (sort_symbol): New.
6517         (elf_link_add_object_symbols): Use a sorted symbol array for
6518         weakdef.
6519
6520 2004-02-27  Jakub Jelinek  <jakub@redhat.com>
6521
6522         * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
6523         for pc relative relocs.
6524         (elf_s390_relocate_section): Likewise.
6525         * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
6526         for pc relative relocs.
6527         (elf_s390_relocate_section): Likewise.
6528
6529 2004-02-26  H.J. Lu  <hongjiu.lu@intel.com>
6530
6531         * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
6532         count_dyn_reloc.
6533
6534 2004-02-25  H.J. Lu  <hongjiu.lu@intel.com>
6535
6536         * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
6537         field to track if a relocation is against readonly section.
6538         (count_dyn_reloc): Take a new argument for rent->reltext.
6539         (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
6540         (get_reloc_section): Don't set ia64_info->reltext here.
6541         (allocate_dynrel_entries): Set ia64_info->reltext here.
6542
6543 2004-02-24  Alexandre Oliva  <aoliva@redhat.com>
6544
6545         * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
6546         (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
6547         function's descriptor to symbol+offset, and map local undefweak
6548         symbol to NULL function descriptor.
6549         (elf32_frv_relocate_section): Likewise.
6550
6551 2004-02-23  Mark Kettenis  <kettenis@gnu.org>
6552
6553         * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
6554         M_X86_64_NETBSD.
6555         * netbsd-core.c (M_SPARC64_OPENBSD): Define.
6556         (netbsd_core_file_p): Set architecture from machine ID for
6557         selected machines.
6558
6559 2004-02-23  Jakub Jelinek  <jakub@redhat.com>
6560
6561         * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
6562         DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
6563
6564 2004-02-21  H.J. Lu  <hongjiu.lu@intel.com>
6565
6566         * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
6567         symbols with non-default visibility.
6568
6569 2004-02-21  Danny Smith  <daanysmith@users.sourceforge.net>
6570
6571         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
6572         IMAGE_SCN_MEM_WRITE on known sections only.
6573
6574 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
6575
6576         * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
6577         symbols used in PIE relocs.
6578
6579 2004-02-19  Jakub Jelinek  <jakub@redhat.com>
6580
6581         * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
6582         .plt sh_entsize.
6583
6584 2004-02-18  Daniel Jacobowitz  <drow@mvista.com>
6585
6586         * configure.in: Update version to 2.15.90.
6587         * configure: Regenerate.
6588
6589 2004-02-17  Daniel Jacobowitz  <drow@mvista.com>
6590             Richard Sandiford  <rsandifo@redhat.com>
6591
6592         * elfxx-mips.c (mips_elf_calculate_relocation): Use
6593         _bfd_elf_symbol_refs_local_p to decide whether to decay
6594         a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
6595         (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
6596         relocs if the symbol wasn't defined by a regular object file.
6597         Don't check the symbol's dynindx.
6598
6599 2004-02-16  Andrew Cagney  <cagney@redhat.com>
6600
6601         * bfd-in.h (file_ptr, ufile_ptr): Configure type using
6602         @bfd_file_ptr@.
6603         * bfd-in2.h: Re-generate.
6604
6605 2004-02-14  Andrew Cagney  <cagney@redhat.com>
6606
6607         * configure.host (HDEFINES): When hppa*-*-hpux*, define
6608         _LARGEFILE64_SOURCE.
6609
6610 2004-02-13  Andrew Cagney  <cagney@redhat.com>
6611
6612         * elf.c (vma_page_aligned_bias): New function.
6613         (assign_file_positions_except_relocs)
6614         (assign_file_positions_for_segments): Replace broken modulo
6615         arithmetic with call to vma_page_aligned_bias.
6616
6617 2004-02-11  Andrew Cagney  <cagney@redhat.com>
6618
6619         * bfd-in.h: Update copyright.
6620         (bfd_tell): Change return type to file_ptr.
6621         * bfd-in2.h: Re-generate.
6622         * cache.c: Update copyright.
6623         (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
6624         parameter.
6625         (close_one): Use real_ftell.
6626         * bfdio.c: Update copyright.
6627         (real_ftell, real_fseek): New functions.
6628         (bfd_tell): Use real_fseek and real_ftell, change return type to
6629         file_ptr.
6630         (bfd_seek): Use real_ftell and real_fseek, change type of
6631         file_position to a file_ptr.
6632         * libbfd-in.h: Update copyright.
6633         (real_ftell, real_fseek): Declare.
6634         * libbfd.h: Re-generate.
6635
6636         * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
6637         fseeko and fseeko64.  Determine bfd_file_ptr.
6638         * configure: Re-generate.
6639         * config.in: Re-generate.
6640
6641 2004-02-09  Anil Paranjpe  <anilp1@KPITCummins.com>
6642
6643         * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
6644         * elf32-h8300.c: Likewise.
6645
6646 2004-02-09  Christian Vogel <vogelchr@vogel.cx>
6647             Nick Clifton  <nickc@redhat.com>
6648
6649         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
6650         GOT entries with no associated GOT subsection.
6651
6652 2004-02-09  Richard Sandiford  <rsandifo@redhat.com>
6653
6654         * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
6655         * elf.c (swap_out_syms): Use it to decide whether local section
6656         symbols should be named.
6657         * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
6658         * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
6659         (elf_backend_name_local_section_symbols): Define.
6660         * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
6661
6662 2004-01-30  H.J. Lu  <hongjiu.lu@intel.com>
6663
6664         * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
6665         (elfNN_ia64_relax_section): Optimize brl to br during the relax
6666         finalize pass.
6667
6668 2004-01-30  Alexandre Oliva  <aoliva@redhat.com>
6669
6670         * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
6671         to bfd_link_hash_entry passed by reference to
6672         _bfd_generic_link_add_one_symbol.
6673
6674 2004-01-25  H.J. Lu  <hongjiu.lu@intel.com>
6675
6676         * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
6677         relocations against dynamic symbols.
6678
6679 2004-01-23  Daniel Jacobowitz  <drow@mvista.com>
6680
6681         * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
6682         change.
6683
6684 2004-01-21  Tom Rix  <tcrix@worldnet.att.net>
6685
6686         * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
6687         * bfd-in2.h, libbfd.h: Rebuilt.
6688
6689 2004-01-20  Danny Smith  <dannysmith@users.sourceforge.net>
6690
6691         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
6692         IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
6693         flag has been cleared.
6694
6695 2004-01-19  Kazu Hirata  <kazu@cs.umass.edu>
6696
6697         * coff-h8300.c: Add and adjust comments about relaxation.
6698         * elf32-h8300.c: Likewise.
6699
6700 2004-01-16  Kazu Hirata  <kazu@cs.umass.edu>
6701
6702         * coff-h8300.c: Fix comment typos.
6703         * elf32-h8300.c: Likewise.
6704
6705 2004-01-16  Kazu Hirata  <kazu@cs.umass.edu>
6706
6707         * coff-h8300.c: Add comments about relaxation.
6708         * elf32-h8300.c: Likewise.
6709
6710 2004-01-14  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
6711
6712         * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
6713         throughout.
6714         * aclocal.m4: Regenerate.
6715         * configure: Regenerate.
6716
6717 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
6718
6719         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
6720         mips_elf64_rtype_to_howto instead of using howto_table.
6721
6722 2004-01-13  Daniel Jacobowitz  <drow@mvista.com>
6723
6724         * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
6725         the .plt section.
6726         (elf32_arm_check_relocs): Don't increment the PLT refcount for
6727         relocs which would not use the PLT.
6728
6729 2004-01-13  Alan Modra  <amodra@bigpond.net.au>
6730
6731         * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
6732         (ppc64_elf_gc_sweep_hook): Likewise.
6733         (ppc64_elf_size_dynamic_sections): Test for .plt directly.
6734
6735 2004-01-12  Anil Paranjpe  <anilp1@KPITCummins.com>
6736
6737         Adds linker relaxation support for bit manipulation insns like
6738         band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
6739         bst, btst, bxor.
6740         * elf32-h8300.c: Opcode for bit manipulation insn is checked in
6741         elf32_h8_relax_section function while relxation for aa:16 and aa:32.
6742         * coff-h8300.c: Opcode for bit manipulation insn is checked in
6743         h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
6744
6745 2004-01-12  Alan Modra  <amodra@bigpond.net.au>
6746
6747         * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
6748
6749 2004-01-11  Kazu Hirata  <kazu@cs.umass.edu>
6750
6751         * elf32-h8300.c: Fix formatting.
6752
6753 2004-01-11  Kazu Hirata  <kazu@cs.umass.edu>
6754
6755         * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
6756         dynamic object is present.  Declare r_symndx and h in an inner
6757         scope.
6758         * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
6759
6760 2004-01-09  Daniel Jacobowitz  <drow@mvista.com>
6761
6762         * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
6763         (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
6764         (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
6765         identically.  Do not emit PC24 relocations for shared libraries.
6766         (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
6767         identically.  Don't adjust pc_count.
6768         (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
6769         Set ELF_LINK_HASH_NEEDS_PLT for both.  Don't adjust pc_count; don't
6770         adjust count for branch relocations.
6771         (allocate_dynrelocs): Correct typo in call to
6772         WILL_CALL_FINISH_DYNAMIC_SYMBOL.  Never allocate space for
6773         PC24 or PLT32 relocs when linking.
6774
6775 2004-01-09  Dmitry Semyonov  <Dmitry.Semyonov@oktet.ru>
6776
6777         * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
6778         relocation howto with ARM_26 one for consistency.
6779         (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
6780         that will be converted to ARM_26D ones, since we always want 'done'
6781         relocations to be reflected in section's data.
6782         (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
6783         offset.
6784         (_bfd_final_link_relocate): Do not modify "inplace" data, if not
6785         requested.
6786
6787 2004-01-08  Dmitry Semyonov  <Dmitry.Semyonov@oktet.ru>
6788
6789         * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
6790         are not partial_inplace during a relocatable link.
6791
6792 2004-01-08  Kazu Hirata  <kazu@cs.umass.edu>
6793
6794         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
6795         if no dynamic object is present.  Declare r_symndx and h in an
6796         inner scope.
6797
6798 2004-01-07  H.J. Lu  <hongjiu.lu@intel.com>
6799
6800         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
6801         trampoline if it is known out of range.
6802
6803 2004-01-06  Alexandre Oliva  <aoliva@redhat.com>
6804
6805         2003-12-17  Alexandre Oliva  <aoliva@redhat.com>
6806         * elf32-frv.c (_frv_osec_readonly_p): New.
6807         (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
6808         undefweak symbol.
6809         (_frv_count_got_plt_entries): Adjust expected count accordingly.
6810         (elf32_frv_relocate_section): Likewise.  Error out if attempting
6811         to emit rofixups or dynamic relocs in read-only segments.  Use
6812         _bfd_elf_section_offset to adjust r_offsets in rofixups and
6813         dynamic relocations.
6814         2003-12-12  Alexandre Oliva  <aoliva@redhat.com>
6815         * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
6816         relocations or fixups involving merged sections correctly.  Avoid
6817         crash when undefined symbol is referenced by R_FRV_32 or
6818         R_FRV_FUNCDESC_VALUE.
6819         2003-12-02  Alexandre Oliva  <aoliva@redhat.com>
6820         * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
6821         input section holding local symbol to addend of R_FRV_32 or
6822         R_FRV_FUNCDESC_VALUE dynamic relocation.
6823         2003-11-27  Alexandre Oliva  <aoliva@redhat.com>
6824         * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
6825         (elf32_frv_always_size_sections): Don't store pointer to
6826         __stacksize symbol in sec_info.
6827         (elf32_frv_modify_segment_map): Look it up here.
6828         2003-11-26  Alexandre Oliva  <aoliva@redhat.com>
6829         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
6830         of the lazy PLT entry, not only its offset, as the low word of a
6831         function descriptor.
6832         2003-11-10  Alexandre Oliva  <aoliva@redhat.com>
6833         * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
6834         if a hash table entry already exists but is not a definition.
6835         2003-11-05  Alexandre Oliva  <aoliva@redhat.com>
6836         * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
6837         (_frv_add_rofixup): Don't inline.
6838         (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
6839         for undefweak symbols.
6840         (elf32_frv_relocate_section): Avoid crash while computing
6841         relocation when linking with shared library.  Only emit rofixups
6842         and dynamic relocations for alloc&load sections.  Mark binaries
6843         with inter-segment relocations for relocation as a unit.
6844         (_frv_create_got_section): Rename .rofixup.got to .rofixup.
6845         (DEFAULT_STACK_SIZE): New.
6846         (_frv_count_got_plt_entries): Fix thinko in deciding whether to
6847         emit rofixups or dynamic relocs when linking dynamic non-PIE
6848         executables.
6849         (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
6850         shared libs too.  Reserve the last entry for the GOT pointer.
6851         (elf32_frv_finish_dynamic_sections): Emit it.
6852         (elf32_frv_always_size_sections): New.
6853         (elf32_frv_modify_segment_map): New.
6854         (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
6855         sections.
6856         (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
6857         (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
6858         (elf_backend_always_size_sections): New.
6859         (elf_backend_modify_segment_map): New.
6860         2003-10-31  Alexandre Oliva  <aoliva@redhat.com>
6861         * config.bfd: Added frv-*-*linux*.
6862         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
6863         ABS section, instead of crashing.
6864         (elf32_frv_relocate_section): Don't crash before warning about
6865         different segments in non-PIC relocation.
6866         2003-10-17  Alexandre Oliva  <aoliva@redhat.com>
6867         * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
6868         relocs to undefweak symbols.
6869         (elf32_frv_relocate_section): Ditto for undefined symbols.
6870         2003-10-06  Alexandre Oliva  <aoliva@redhat.com>
6871         * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
6872         gotfixup section was created.
6873         2003-09-30  Alexandre Oliva  <aoliva@redhat.com>
6874         * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
6875         FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
6876         complain_overflow_signed.
6877         * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
6878         have not been allocated.
6879         (_frv_emit_got_relocs_plt_entries): Return non-void.  Assert
6880         privfd only if dynamic sections were created.
6881         (elf32_frv_relocate_section): Compute gprel_segment, and use it
6882         for GPREL relocs.  When linking relocatable FDPIC executables,
6883         emit warnings for relocations that would be illegal on PIE or
6884         shared libraries.  Emit rofixup for R_FRV_32 only if input object
6885         is not FDPIC.
6886         (_frv_create_got_section): Define _gp symbol in the rofixup
6887         section.
6888         (elf32_frv_finish_dynamic_sections): If rofixups needed but
6889         dynamic sections missing, error out requesting -melf32frvfd.
6890         2003-09-19  Alexandre Oliva  <aoliva@redhat.com>
6891         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
6892         computation of addends from section and global or local symbol
6893         value.  Change return type to bfd_boolean, and return a failure if
6894         a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
6895         nonzero addend is required.
6896         (elf32_frv_relocate_section): Likewise.  Print error for
6897         unsupported nonzero addends.
6898         2003-09-18  Alexandre Oliva  <aoliva@redhat.com>
6899         * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
6900         force everything local.
6901         (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
6902         * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
6903         (frv_gotfixup_section): New.
6904         (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
6905         (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
6906         and relocsfdv.
6907         (_frv_add_rofixup): New.
6908         (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
6909         fdpic executables.  Use FRV_SYM_LOCAL more widely to simplify and
6910         improve some ugly conditions.
6911         (elf32_frv_relocate_section): Likewise.  Reject inter-segment
6912         relocations in fdpic.
6913         (_frv_create_got_section): Create .rofixup.got section.
6914         (struct _frv_dynamic_got_info): Added fixups.
6915         (_frv_count_got_plt_entries): Account in-GOT relocations into
6916         relocs32, relocsfd and relocsfdv.  Account them into relocs or
6917         fixups, as appropriate.
6918         (elf32_frv_size_dynamic_sections): Size rofixup section.  Simplify
6919         sizing of gotrel.
6920         (elf32_frv_finish_dynamic_sections): Verify that the right number
6921         of relocations and fixups was generated.
6922         (elf32_frv_check_relocs): Compute relocs32, relocsfd and
6923         relocsfdv.
6924         * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
6925         SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
6926         (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
6927         descriptor of a (formerly-)global symbol is local.
6928         (struct frv_pic_relocs_info): Adjust comments.
6929         (_frv_emit_got_relocs_plt_entries): Adjust.
6930         (elf32_frv_relocate_section): Likewise.
6931         (_frv_count_got_plt_entries): Likewise.
6932         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
6933         symbol's value to addend in the common preamble.  Decay dynamic
6934         symbols to section+offset if they bind or call locally, for GOT
6935         and FUNCDESC_VALUE, respectively.
6936         (elf32_frv_relocate_section): Likewise.
6937         (elf32_frv_check_relocs): Don't register as dynamic symbols of
6938         internal or hidden visibility.
6939         2003-09-17  Alexandre Oliva  <aoliva@redhat.com>
6940         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
6941         argument, so as to not call _bfd_elf_rel_local_sym to compute it.
6942         (elf32_frv_relocate_section): Pass relocation addend in.  Use
6943         original relocation addend to look up the got relocs/plt entries
6944         table.  Do not call _bfd_elf_rel_local_sym.  Don't error out when
6945         processing relocations that reference .scommon symbols.
6946         2003-09-15  Alexandre Oliva  <aoliva@redhat.com>
6947         Introduce support for dynamic linking.
6948         * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
6949         (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
6950         elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
6951         (frv_reloc_type_lookup): Return REL howtos for executables and
6952         dynamic libraries.
6953         (frv_info_to_howto_rel): New.
6954         (struct frv_elf_link_hash_table): New.
6955         (frv_hash_table, frv_got_section, frv_gotrel_section,
6956         frv_plt_section, frv_pltrel_section, frv_relocs_info,
6957         frv_got_initial_offset, frv_plt_initial_offset): New macros.
6958         (frv_elf_link_hash_table_create): New.
6959         (struct frv_pic_relocs_info): New.
6960         (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
6961         (frv_pic_relocs_info_find): New.
6962         (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
6963         New.
6964         (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
6965         (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
6966         (_frv_emit_got_relocs_plt_entries): New.
6967         (elf32_frv_relocate_section): Add support for dynamic linking.
6968         Handle new relocations.
6969         (_frv_create_got_section): New.
6970         (elf32_frv_create_dynamic_sections): New.
6971         (ELF_DYNAMIC_INTERPRETER): New.
6972         (struct _frv_dynamic_got_info): New.
6973         (_frv_count_got_plt_entries): New.
6974         (struct _frv_dynamic_got_plt_info): New.
6975         (_frv_compute_got_alloc_data): New.
6976         (_frv_get_got_entry, _frv_get_fd_entry): New.
6977         (_frv_assign_got_entries, _frv_assign_plt_entries): New.
6978         (_frv_resolve_final_relocs_info): New.
6979         (elf32_frv_size_dynamic_sections): New.
6980         (elf32_frv_finish_dynamic_sections): New.
6981         (elf32_frv_adjust_dynamic_symbol): New.
6982         (elf32_frv_finish_dynamic_symbol): New.
6983         (elf32_frv_check_relocs): Handle new relocs.  Explain how the
6984         whole thing works.
6985         (elf_info_to_howto_rel): Define.
6986         (bfd_elf32_bfd_link_hash_table_create): Define.
6987         (elf_backend_create_dynamic_sections): Define.
6988         (elf_backend_adjust_dynamic_symbol): Define.
6989         (elf_backend_size_dynamic_sections): Define.
6990         (elf_backend_finish_dynamic_symbol): Define.
6991         (elf_backend_finish_dynamic_sections): Define.
6992         (elf_backend_want_got_sym): Define.
6993         (elf_backend_got_header_size): Define.
6994         (elf_backend_want_got_plt): Define.
6995         (elf_backend_plt_readonly): Define.
6996         (elf_backend_want_plt_sym): Define.
6997         (elf_backend_plt_header_size): Define.
6998         (elf_backend_may_use_rel_p): Define.
6999         (elf_backend_may_use_rela_p): Define.
7000         (elf_backend_default_use_rela_p): Define.
7001         2003-08-08  Alexandre Oliva  <aoliva@redhat.com>
7002         * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
7003         R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
7004         R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
7005         (frv_reloc_map): Map the corresponding BFD relocs to them.
7006         (frv_reloc_type_lookup): ... and back to BFD relocs.
7007         * reloc.c: New relocs.
7008         * bfd-in2.h, libbfd.h: Rebuilt.
7009         2003-08-04  Alexandre Oliva  <aoliva@redhat.com>
7010         * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
7011         R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
7012         R_FRV_FUNCDESC_GOTLO): New.
7013         (frv_reloc_map): Map the corresponding BFD relocs to them.
7014         (frv_reloc_type_lookup): ... and back to BFD relocs.
7015         * reloc.c: New relocs.
7016         * bfd-in2.h, libbfd.h: Rebuilt.
7017
7018 2004-01-05  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
7019
7020         * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7021         targets to support pages of up to 64kB.
7022         (elf32_bed): Redefine to get a separate backend data structure for
7023         traditional targets.
7024         * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7025         targets to support pages of up to 64kB.
7026         (elf64_bed): Redefine to get a separate backend data structure for
7027         traditional targets.
7028         * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7029         targets to support pages of up to 64kB.
7030         (elf32_bed): Redefine to get a separate backend data structure for
7031         traditional targets.
7032
7033 2004-01-04  Mark Kettenis  <kettenis@gnu.org>
7034
7035         * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
7036
7037 2004-01-02  Mark Kettenis  <kettenis@gnu.org>
7038
7039         * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
7040         (elf_i386_grok_psinfo): Likewise.
7041
7042 2004-01-02  Bernardo Innocenti  <bernie@develer.com>
7043
7044         * config.bfd: Add m68k-uClinux target.
7045
7046 2004-01-01  Grant Edwards <grante@visi.com>
7047
7048         * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
7049         * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
7050         (elf32_h8_gc_sweep_hook): New function.
7051         (elf_backend_gc_mark_hook): Define.
7052         (elf_backend_gc_sweep_hook): Define.
7053         (elf_backend_can_gc_sections): Define.
7054
7055 For older changes see ChangeLog-0203
7056 \f
7057 Local Variables:
7058 mode: change-log
7059 left-margin: 8
7060 fill-column: 74
7061 version-control: never
7062 End: