PR ld/1135
[platform/upstream/binutils.git] / bfd / ChangeLog
1 2005-08-13  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
2
3         PR ld/1135
4         * elf64-hppa.c (elf64_hppa_special_sections): Add flag definitions for
5         .plt, .dlt, .sdata, .sbss and .tbss.
6
7 2005-08-12  Dmitry Diky  <diwil@spec.ru>
8
9         * elf32-msp430.c (msp430_elf_relax_delete_bytes): Adjust relocations
10         referenced by .section + DISPLACEMENT.
11
12 2005-08-10  James E. Wilson  <wilson@specifix.com>
13
14         * dwarf2.c (scan_unit_for_symbols, case DT_AT_location): Verify that
15         DW_OP_addr is only opcode in location before using it.
16
17 2005-08-09  H.J. Lu  <hongjiu.lu@intel.com>
18
19         * elfxx-ia64.c (elfNN_ia64_final_link): Reset gp.
20
21 2005-08-09  Rodney Brown  <rbrown@bravurasolutions.com.au>
22             Nick Clifton  <nickc@redhat.com>
23
24         * aix5ppc-core.c (xcoff64_core_p): Constify return_value
25         variable.  Also, do not use core_hdr macro as it evaluates to a
26         cast of an lvalue which is no longer supported by GCC 4.0.
27
28 2005-08-08  Eric Dönges <Eric.Doenges@betty-tv.com>
29
30         * archures.c (bfd_mach_msp21): New MSP430 machine number.
31         * bfd-in2.h: Regenerate.
32         * cpu-msp430.c (arch_info_struct): Add support for msp430x21xx
33         variants.
34
35 2005-08-07  Nick Clifton  <nickc@redhat.com>
36             Paul Brook  <paul@codesourcery.com>
37
38         PR 1147
39         * elf32-arm.c (bfd_elf32_close_and_cleanup): Define.
40         (elf32_arm_close_and_cleanup): New function - walk over the
41         sections in the bfd that is being closed removing them from the
42         list of recorded sections.
43         (unrecord_section_via_map_over_sections): New helper function.
44         (record_section_with_arm_elf_section_data): Call bfd_malloc
45         instead of bfd_alloc.  Remove unneeded abfd parameter.
46         (elf32_arm_new_section_hook): Do not pass bfd to
47         record_section_with_arm_elf_section_data.
48
49         * elfxx-target.h (bfd_elfNN_close_and_cleanup): Only define if not
50         already defined by the target.
51
52 2005-08-05  Fred Fish  <fnf@specifix.com>
53
54         * dwarf2.c (read_rangelist): Use addr_size instead of offset_size
55         to determine how many bytes to read from each rangelist entry.
56
57 2005-08-05  H.J. Lu  <hongjiu.lu@intel.com>
58
59         * bfd.c (bfd_hide_symbol): New.
60         * bfd-in2.h: Regenerated.
61
62 2005-08-04  H.J. Lu  <hongjiu.lu@intel.com>
63
64         * elf64-x86-64.c (elf64_x86_64_merge_symbol): When mixing a
65         large common symbol and a normal common symbol, always turn
66         the large common symbol into a normal one.
67
68 2005-08-04  Alan Modra  <amodra@bigpond.net.au>
69
70         * elf32-ppc.c (struct elf_linker_section): Replace sym_val field
71         with sym.
72         (ppc_elf_relocate_section): Adjust for above.
73         (create_sdata_sym): New function.
74         (ppc_elf_create_linker_section): Call it.
75         (ppc_elf_check_relocs): Correct has_sda_refs and non_got_refs.
76         Create sdata syms for all SDA relocs.
77         (ppc_elf_adjust_dynamic_symbol): Don't special case _SDA_BASE_
78         and _SDA2_BASE_.
79         (ppc_elf_set_sdata_syms): Delete.
80         * elflink.c (bfd_elf_size_dynamic_sections): Don't create DT_INIT
81         and DT_FINI tags unless associated section has input.
82         (bfd_elf_set_symbol, _bfd_elf_provide_symbol): Delete.
83         (_bfd_elf_provide_section_bound_symbols): Delete.
84         * bfd-in.h (_bfd_elf_provide_symbol): Delete.
85         (_bfd_elf_provide_section_bound_symbols): Delete.
86         * bfd-in2.h: Regenerate.
87
88 2005-08-04  Alan Modra  <amodra@bigpond.net.au>
89
90         * elflink.c (fix_syms, _bfd_elf_fix_excluded_sec_syms): Move to..
91         * linker.c (fix_syms, _bfd_fix_excluded_sec_syms): ..here.
92         * bfd-in.h (_bfd_fix_excluded_sec_syms): Rename.
93         * bfd-in2.h: Regenerate.
94
95 2005-08-03  H.J. Lu  <hongjiu.lu@intel.com>
96
97         * elfxx-ia64.c (elfNN_ia64_relax_section): Resize .rela.got
98         only if it isn't NULL.
99
100 2005-08-03  H.J. Lu  <hongjiu.lu@intel.com>
101
102         * elf32-i386.c (elf_howto_table): Undo the overflow change for
103         R_386_PC16 made on 2005-07-18.
104
105         * elf64-x86-64.c (x86_64_elf_howto_table): Undo the overflow
106         change for R_X86_64_PC16 made on 2005-07-18.
107
108 2005-08-03  Alan Modra  <amodra@bigpond.net.au>
109
110         * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove hgot.  Use
111         elf.hgot throughout file.
112
113 2005-08-03  Alan Modra  <amodra@bigpond.net.au>
114
115         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Correct value of
116         _GLOBAL_OFFSET_TABLE_ for > 32k GOT.
117
118 2005-08-02  Andreas Schwab  <schwab@suse.de>
119
120         * elfxx-ia64.c (struct elfNN_ia64_allocate_data): Add only_got.
121         (elfNN_ia64_relax_section): Reallocate .rela.got when .got has
122         changed.
123         (allocate_dynrel_entries): Look only at GOT relocations when
124         only_got is true.
125         (elfNN_ia64_size_dynamic_sections): Set only_got to false before
126         calling allocate_dynrel_entries.
127
128 2005-08-02  Nick Clifton  <nickc@redhat.com>
129
130         PR 1147
131         * elf32-arm.c (struct _arm_elf_section_data): Turn into a typedef
132         and make the mapcount field unsigned.
133         (struct section_list): New: Used to keep track of which sections
134         have an _arm_elf_section_data structure.
135         (record_section_with_arm_elf_section_data): New function.
136         (get_arm_elf_section_data): New function.
137         (unrecord_section_with_arm_elf_section_data): New function.
138         (elf32_arm_output_symbol_hook): Use get_arm_elf_section_data.
139         (elf32_arm_new_section_hook): Call
140         record_section_with_arm_elf_section_data.
141         (elf32_arm_write_section): Use get_arm_elf_section_data and
142         unrecord_section_with_arm_elf_section_data.
143
144 2005-08-01  Richard Sandiford  <richard@codesourcery.com>
145
146         * elfxx-mips.c (mips_mach_extends_p): Treat MIPS64 as an extension
147         of MIPS32 and MIPS64r2 as an extension of MIPS32r2.
148
149 2005-07-30  David Daney  <ddaney@avtrex.com>
150
151         * elflink.c (elf_gc_sweep):  Set dynsymcount to correct value.
152
153 2005-07-29  David Daney  <ddaney@avtrex.com>
154
155         * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook):  Ignore _gp_disp
156         if it is in the *ABS* section.
157
158 2005-07-29  Paul Brook  <paul@codesourcery.com>
159
160         * reloc.c: Add BFD_RELOC_ARM_T32_ADD_PC12.
161         * bfd-in2.h: Regenerate.
162         * libbfd.h: Regenerate.
163
164 2005-07-29  Paul Brook  <paul@codesourcery.com>
165
166         * reloc.c (BFD_RELOC_ARM_T32_IMM12): Add.
167         * bfd-in2.h: Regeenrate.
168         * libbfd.h: Regenerate.
169
170 2005-07-29  Pavel Kankovsky  <peak@argo.troja.mff.cuni.cz>
171
172         * peXXigen.c (pe_print_edata): Compute the size of the export
173         table from the size field in the DataDictionary and not the size
174         of the section.  Some linkers embed the export table inside a
175         larger section.
176
177 2005-07-29  Alan Modra  <amodra@bigpond.net.au>
178
179         * elf-bfd.h (struct elf_backend_data): Add action_discarded.
180         (enum action_discarded): Move from..
181         * elflink.c (enum action_discarded): ..here.
182         (_bfd_elf_default_action_discarded): Rename from elf_action_discarded.
183         Remove target specific section checks.
184         (elf_link_input_bfd): Adjust.
185         * elfxx-target.h (elf_backend_action_discarded): Define.
186         (elfNN_bed): Init new field.
187         * bfd-in.h (_bfd_elf_default_action_discarded): Declare.
188         * bfd-in2.h: Regenerate.
189         * elf-hppa.h (elf_hppa_action_discarded): New function.
190         * elf32-hppa.c (elf_backend_action_discarded): Define.
191         * elf64-hppa.c (elf_backend_action_discarded): Define.
192         * elf32-ppc.c (ppc_elf_action_discarded): New function.
193         (elf_backend_action_discarded): Define.
194
195 2005-07-27  Alan Modra  <amodra@bigpond.net.au>
196
197         * elflink.c (fix_syms): Handle symbols defined in input sections.
198
199 2005-07-27  Jan Beulich  <jbeulich@novell.com>
200
201         * elf64-x86-64.c (R_X86_64_standard, R_X86_64_vt_offset): New.
202         (elf64_x86_64_info_to_howto): Use them.
203
204 2005-07-27  Alan Modra  <amodra@bigpond.net.au>
205
206         * elflink.c (_bfd_elf_merge_symbol): Skip weak redefinition
207         regardless of strength of previous definition.
208
209 2005-07-26  Alan Modra  <amodra@bigpond.net.au>
210
211         * elflink.c (elf_gc_mark_dynamic_ref_symbol): Handle -shared.
212         (bfd_elf_gc_sections): Allow -gc-sections when -shared.
213         * elf32-ppc.c (ppc_elf_gc_sweep_hook): Correct for -shared.
214
215 2005-07-26  Alan Modra  <amodra@bigpond.net.au>
216
217         * elflink.c (elf_gc_sweep): Move gcc_except_table code..
218         (bfd_elf_gc_sections): ..to here.
219
220 2005-07-25  DJ Delorie  <dj@redhat.com>
221
222         * reloc.c: Remove unused M32C relocs, add BFD_RELOC_M32C_HI8.
223         * libbfd.h: Regenerate.
224         * bfd-in2.h: Regenerate.
225
226         * elf32-m32c.c (m32c_elf_howto_table): Add R_M32C_8, R_M32C_LO16,
227         R_M32C_HI8, R_M32C_HI16.
228         (m32c_reloc_map): Likewise.
229         (m32c_elf_relocate_section): Add R_M32C_HI8 and R_M32C_HI16.
230
231 2005-07-25  Jan Hubicka  <jh@suse.cz>
232             H.J. Lu  <hongjiu.lu@intel.com>
233
234         * elf-bfd.h (_bfd_elf_large_com_section): New.
235         * elf.c (_bfd_elf_large_com_section): New. Defined.
236
237         * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): New.
238         (elf64_x86_64_elf_section_from_bfd_section): New.
239         (elf64_x86_64_symbol_processing): New.
240         (elf64_x86_64_common_definition): New.
241         (elf64_x86_64_common_section_index): New.
242         (elf64_x86_64_common_section): New.
243         (elf64_x86_64_merge_symbol): New.
244         (elf64_x86_64_additional_program_headers): New.
245         (elf64_x86_64_special_sections): New.
246         (elf_backend_section_from_bfd_section): New. Defined.
247         (elf_backend_add_symbol_hook): Likewise.
248         (elf_backend_common_section_index): Likewise.
249         (elf_backend_common_section): Likewise.
250         (elf_backend_common_definition): Likewise.
251         (elf_backend_merge_symbol): Likewise.
252         (elf_backend_special_sections): Likewise.
253         (elf_backend_additional_program_headers): Likewise.
254
255 2005-07-25  H.J. Lu  <hongjiu.lu@intel.com>
256
257         * elf-bfd.h (elf_backend_data): Add common_definition,
258         common_section_index, common_section, and merge_symbol.
259         (_bfd_elf_common_definition): New.
260         (_bfd_elf_common_section_index): New.
261         (_bfd_elf_common_section): New.
262
263         * elf.c (elf_fake_sections): Don't clear sh_flags.
264
265         * elflink.c (_bfd_elf_merge_symbol): Call backend merge_symbol
266         if it is available.
267         (is_global_data_symbol_definition): Call backend
268         common_definition instead of checking SHN_COMMON.
269         (elf_link_add_object_symbols): Likewise.
270         (elf_link_output_extsym): Call backend common_section_index
271         for common section index.
272         (_bfd_elf_common_definition): New.
273         (_bfd_elf_common_section_index): New.
274         (_bfd_elf_common_section): New.
275
276         * elfxx-target.h (elf_backend_common_definition): New.
277         (elf_backend_common_section_index): New.
278         (elf_backend_common_section): New.
279         (elf_backend_merge_symbol): New.
280         (elfNN_bed): Initialize common_definition, common_section_index,
281         common_section, and merge_symbol.
282
283         * section.c (BFD_FAKE_SECTION): New.
284         (STD_SECTION): Use it.
285         * bfd-in2.h: Regenerated.
286
287 2005-07-23  Olaf Hering <olh@suse.de>
288
289         * elflink.c (elf_link_input_bfd): Add '\n' for linker einfo
290         callback.
291
292 2005-07-21  Ralf Corsepius  <ralf.corsepius@rtems.org>
293
294         * config.bfd: Remove i[3-7]86-*-rtemself*.
295         Remove sparc-*-rtemself*.
296
297 2005-07-22  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
298
299         * elf32-m32r.c (m32r_elf_check_relocs): Fix pc count for
300         R_M32R_REL32.
301
302 2005-07-21  Ben Elliston  <bje@gnu.org>
303
304         * Makefile.am (BFD32_BACKENDS): Remove cf-m68klynx.lo.
305         (BFD32_BACKENDS): Likewise, remove m68klynx.lo.
306         (BFD32_BACKENDS_CFILES): Remove cf-m68klynx.c, m68klynx.c.
307         (cf-m68klynx.lo, m68klynx.lo): Remove targets.
308         * Makefile.in: Regenerate.
309         * cf-m68klynx.c: Remove.
310         * m68klynx.c: Likewise.
311         * configure.in (m68klynx_aout_vec): Remove vector.
312         (m68klynx_coff_vec): Likewise.
313         * configure: Regenerate.
314         * targets.c (m68klynx_aout_vec): Remove extern.
315         (m68klynx_coff_vec): Likewise.
316         (_bfd_target_vector): Remove m68klynx_{aout,coff}_vec.
317         * po/SRC-POTFILES.in: Remove cf-m68klynx.c, m68klynx.c.
318
319 2005-07-20  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
320
321         * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_REL32.
322         (m32r_reloc_map): Likewise.
323         (m32r_elf_relocate_section): Likewise.
324         (m32r_elf_gc_sweep_hook): Likewise.
325         (m32r_elf_check_relocs): Likewise.
326
327 2005-07-18  Nick Clifton  <nickc@redhat.com>
328
329         * reloc.c: Add M32C and MS1 relocs.
330         * bfd-in2.h: Regenerate.
331         * libbfd.h: Regenerate.
332
333 2005-07-18  Nick Clifton  <nickc@redhat.com>
334
335         * config.bfd: Move m32c entry to correct location.
336         * archures.c: Likewise.
337         * configure.in: Likewise.
338         * configure: Regenerate.
339         * targets.c: Move ms1 vector to correct location.
340
341 2005-07-18  Jan Beulich  <jbeulich@novell.com>
342
343         * elf32-i386.c (elf_howto_table): Adjust overflow complaint handler
344         for R_386_PC16.
345         * elf64-x86-64.c (x86_64_elf_howto_table): Adjust overflow complaint
346         handler for R_X86_64_PC16, R_X86_64_8, and R_X86_64_DTPOFF.
347
348 2005-07-16  Eric Botcazou  <ebotcazou@libertysurf.fr>
349
350         PR ld/1021
351         PR ld/1031
352         * elflink.c (elf_link_add_object_symbols): Also append the version
353         name to non-hidden absolute symbols that are functions.
354
355 2005-07-16  Alan Modra  <amodra@bigpond.net.au>
356
357         * elf32-ppc.c (ppc_elf_set_sdata_syms): Return void.  Remove hack
358         for zero size sections.  Don't set .sbss syms here.
359         * elf32-ppc.h (ppc_elf_set_sdata_syms): Adjust prototype.
360
361 2005-07-16  Alan Modra  <amodra@bigpond.net.au>
362
363         * Makefile.am: Run "make dep-am".
364         * Makefile.in: Regenerate.
365
366 2005-07-15  Bob Wilson  <bob.wilson@acm.org>
367
368         * elf32-xtensa.c (vsprint_msg): Add prototype.
369         (build_encoding_error_message): Delete.  Code moved into....
370         (elf_xtensa_do_reloc): ....here, and changed to give better
371         error messages for out of range literals.
372
373 2005-07-15  Alan Modra  <amodra@bigpond.net.au>
374
375         * elflink.c (bfd_elf_record_link_assignment): Remove output_bfd param.
376         (_bfd_elf_provide_symbol): Allow redefinition of weak syms and those
377         defined in output sections.  Call bfd_elf_record_link_assignment.
378         * bfd-in.h (bfd_elf_record_link_assignment): Update prototype.
379         * bfd-in2.h: Regenerate.
380
381 2005-07-14  Jim Blandy  <jimb@redhat.com>
382
383         Add support for m32c-*-elf (Renesas m32c and m16c).
384         * Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
385         (ALL_MACHINES_CFILES): Add cpu-m32c.c.
386         (BFD32_BACKENDS): Add elf32-m32c.lo.
387         (BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
388         (cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
389         * Makefile.in: Regenerated.
390         * archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
391         arch and mach codes.
392         (bfd_m32c_arch): New arch info object.
393         (bfd_archures_list): List bfd_m32c_arch.
394         * bfd-in2.h: Regenerated.
395         * config.bfd: Add case for the m32c.
396         * configure.in: Add case for the m32c.
397         * configure: Regenerated.
398         * cpu-m32c.c, elf32-m32c.c: New files.
399         * libbfd.h: Regenerated.
400         * targets.c (bfd_elf32_m32c_vec): Declare.
401         (_bfd_target_vector): List bfd_elf32_m32c_vec.
402
403 2005-07-14  Alan Modra  <amodra@bigpond.net.au>
404
405         * bfd-in.h (_bfd_elf_fix_excluded_sec_syms): Declare.
406         (_bfd_elf_provide_section_bound_symbols): Remove param name.
407         Formatting.
408         * bfd-in2.h: Regenerate.
409         * elflink.c (bfd_elf_gc_sections): Don't call generic function.
410         (_bfd_elf_provide_symbol): Formatting.
411         (_bfd_elf_provide_section_bound_symbols): Remove all hacks, just
412         create section relative syms.
413         (fix_syms, _bfd_elf_fix_excluded_sec_syms): New functions.
414         * elf32-ppc.c (ppc_elf_set_sdata_syms): Use
415         _bfd_elf_provide_section_bound_symbols.
416         * reloc.c (bfd_mark_used_section): Delete.
417         (bfd_generic_gc_sections): Don't call the above.
418
419 2005-07-14  Paul Woegerer <paul.woegerer@nsc.com>
420
421         PR 1063
422         * cache.c (bfd_last_cache): Initialise to NULL.
423
424 2005-07-14  Daniel Marques  <marques@cs.cornell.edu>
425             Nick Clifton  <nickc@redhat.com>
426
427         * coff-alpha.c (alpha_ecoff_bad_format_hook): Detect compressed
428         Alpha binaries and issue a helpful error message.
429         (alpha_ecoff_swap_reloc_out): Increase maximum allowed internal
430         symbol index to 15 to allow for binaries produced by DEC
431         compilers.
432
433 2005-07-13  Steve Ellcey  <sje@cup.hp.com>
434
435         * bfd.m4 (BFD_NEED_DECLARATION): Remove.
436
437 2005-07-12  Alan Modra  <amodra@bigpond.net.au>
438
439         * elf64-ppc.c (ppc64_elf_relocate_section): Don't use a plt stub
440         when !can_plt_call.
441
442 2005-07-12  Alan Modra  <amodra@bigpond.net.au>
443
444         * elf32-xtensa.c (bfd_elf_xtensa_reloc): Warning fix.
445
446 2005-07-12  Alan Modra  <amodra@bigpond.net.au>
447
448         * elf32-ppc.c (ppc_elf_set_sdata_syms): Correct __sbss_start value.
449
450 2005-07-11  H.J. Lu  <hongjiu.lu@intel.com>
451
452         * elflink.c (_bfd_elf_symbol_refs_local_p): Revert the last
453         change.
454
455 2005-07-08  Paul Koning  <pkoning@equallogic.com>
456
457         * dwarf2.c (read_address): Check sign_extend_vma to handle targets
458         where addresses are sign extended.
459
460 2005-07-08  Ralf Corsepius <ralf.corsepius@rtems.org>
461
462         * config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
463         Mark a29k-*rtems*, hppa*-*-rtems*, *-go32-rtems*,
464         i[3-7]86*-*-rtemscoff*, mips*el-*-rtems*, powerpcle-*-rtems*,
465         sparc*-*-rtemsaout* as removed
466
467 2005-07-08  Alan Modra  <amodra@bigpond.net.au>
468
469         * elf-hppa.h (elf_hppa_final_link): Use gp val of zero when none
470         of the usual sections are found.
471         * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Tidy.
472         Strip .dynbss if it is zero size.
473         * elf32-arm.c (elf32_arm_size_dynamic_sections): Likewise.
474         * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
475         * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
476         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise, and
477         .dynsbss.
478         (i370_elf_finish_dynamic_sections): Don't attempt to write .got
479         when it is zero size.
480         * elf32-i386.c (elf_i386_size_dynamic_sections): Correct handling
481         of .dynbss and zero size sections.
482         * elf32-m32r.c (m32r_elf_size_dynamic_sections): Strip .dynbss if
483         it is zero size.
484         * elf32-m68k.c (elf_m68k_size_dynamic_sections): Tidy.  Strip
485         .dynbss if zero size.
486         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise, .dynsbss
487         too.
488         * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
489         * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
490         * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
491         * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Tidy.  Strip
492         .plt.* and .got.plt.* if zero size.
493         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Tidy.  Strip
494         .got* and .dynbss if zero size.
495         * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Tidy.  Strip
496         * elf64-ppc.c (create_linkage_sections): Create branch lookup table
497         in .data.rel.ro.brlt or .rodata.brlt, and similarly for associated
498         reloc section.
499         (create_got_section): Always create new .got and .rela.got sections.
500         (ppc64_elf_size_dynamic_sections): Tidy.  Strip .dynbss if zero size.
501         * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
502         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
503         * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Handle
504         dynamic bss sections correctly.
505         * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Tidy.
506         * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Tidy.  Strip
507         .dynbss if zero size.
508
509 2005-07-08  Ben Elliston  <bje@au.ibm.com>
510
511         * elf32-xtensa.c: Include <stdarg.h> unconditionally, not only
512         when ANSI_PROTOTYPES is defined.  Remove #ifdef logic.
513
514 2005-07-07  H.J. Lu  <hongjiu.lu@intel.com>
515
516         * elf-bfd.h (elf_backend_data): Add special_sections.
517
518         * elf.c (_bfd_elf_get_sec_type_attr): Check special_sections
519         first.
520
521         * elf32-arm.c (elf_backend_get_sec_type_attr): Removed.
522         (elf_backend_special_sections): New. Defined.
523         * elf32-m32r.c: Likewise.
524         * elf32-m68hc11.c: Likewise.
525         * elf32-m68hc12.c: Likewise.
526         * elf32-mcore.c: Likewise.
527         * elf32-sh64.c: Likewise.
528         * elf32-v850.c: Likewise.
529         * elf32-xtensa.c: Likewise.
530         * elf64-alpha.c: Likewise.
531         * elf64-hppa.c: Likewise.
532         * elf64-ppc.c: Likewise.
533         * elf64-sh64.c: Likewise.
534         * elfxx-ia64.c: Likewise.
535         * elfxx-mips.c: Likewise.
536         * elfxx-mips.h: Likewise.
537
538         * elfxx-target.h (elf_backend_special_sections): New.
539         (elfNN_bed): Initialize special_sections.
540
541 2005-07-07  Bob Wilson  <bob.wilson@acm.org>
542
543         * xtensa-modules.c: Update tables with Xtensa MMU features.
544
545 2005-07-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
546
547         * elf32-xtensa.c (vsprint_msg): Add format attribute.  Fix
548         format bugs.
549         * vms.h (_bfd_vms_debug): Add format attribute.
550         (_bfd_vms_debug, _bfd_hexdump): Fix typos.
551
552 2005-07-07  H.J. Lu  <hongjiu.lu@intel.com>
553
554         PR 975
555         * elflink.c (_bfd_elf_symbol_refs_local_p): Only undefined
556         symbol with default visibility is local.
557
558 2005-07-07  Ben Elliston  <bje@gnu.org>
559
560         * config.bfd: Mark m68*-*-rtemscoff as obsolete.
561
562 2005-07-06  H.J. Lu  <hongjiu.lu@intel.com>
563
564         * dwarf2.c (varinfo): Add addr.
565         (lookup_symbol_in_variable_table): Also check addr.
566         (scan_unit_for_symbols): Set addr for variable.
567         (comp_unit_find_line): Updated.
568
569 2005-07-06  Nick Clifton  <nickc@redhat.com>
570
571         * coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error
572         message if an unknown reloc is encountered.
573         (alpha_relocate_section): Likewise.
574
575         * ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc
576         with a missing howto field.
577
578 2005-07-06  Alan Modra  <amodra@bigpond.net.au>
579
580         * po/SRC-POTFILES.in: Add cpu-ms1.c, elf32-ms1.c, elf-vxworks.c,
581         elfxx-sparc.c.
582
583 2005-07-05  Paul Brook  <paul@codesourcery.com>
584
585         * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove.
586         (ppc_elf_vxworks_get_sec_type_attr): New function.
587         (elf_backend_special_sections): Remove vxwords definition.
588         (elf_backend_get_sec_type_attr): Define for vxworks.
589
590 2005-07-05  Nick Clifton  <nickc@redhat.com>
591
592         * elf64-ppc.c (ppc64_elf_info_to_howto): Fix typo.
593
594 2005-07-05  Paul Brook  <paul@codesourcery.com>
595
596         * config.bfd: Add separate case for ppc-vxworks.
597         * configure: Regenerate.
598         * configure.in: Include elf-vxworks.lo on ppc targets.
599         * elf-vxworks.c (elf_vxworks_final_write_processing): Handle
600         .rela.plt.unloaded.
601         * elf32-ppc.c: Add VxWorks target vec.  Include elf-vxworks.h.
602         (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
603         (VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
604         ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
605         ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
606         VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
607         VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
608         (ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
609         is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
610         (ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
611         (ppc_elf_create_got): Create .got.plt for VxWorks.
612         (ppc_elf_create_dynamic_sections): Create unloaded plt relocation
613         section for VxWorks.
614         (ppc_elf_select_plt_layout): Handle VxWorks plt format.
615         (allocate_got): VxWorks does not need a got header.
616         (allocate_dynrelocs): Handle VxWorks plt format.
617         (ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
618         VxWorks.  Handle VxWorks plt/got.
619         (ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
620         (ppc_elf_vxworks_special_sections): New.
621         (ppc_elf_vxworks_link_hash_table_create,
622         ppc_elf_vxworks_add_symbol_hook,
623         elf_i386_vxworks_link_output_symbol_hook,
624         ppc_elf_vxworks_final_write_processing): New functions.
625         * targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
626         (_bfd_target_vector): Use it.
627
628 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
629
630         * libbfd-in.h (struct artdata): Add extended_names_size field.
631         * libbfd.h: Rebuilt.
632         * coff-rs600.c (_bfd_xcoff_archive_p): Don't clear fields in freshly
633         allocated object by bfd_zalloc.
634         * coff64-rs6000.c (xcoff64_archive_p): Likewise.
635         * ecoff.c (_bfd_ecoff_archive_p): Likewise.
636         * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p): Likewise.
637         (get_extended_arelt_filename): Fail if index is bigger or equal to
638         extended_names_size.
639         (_bfd_generic_read_ar_hdr_mag): Don't set bfd_error_malformed_archive,
640         get_extended_arelt_filename already did that.
641         (_bfd_slurp_extended_name_table): Initialize extended_names_size field.
642         Allocate one extra byte and clear it, in case extended names table
643         is not terminated.
644
645         * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
646         bfd_zalloc2): New prototypes.
647         * bfd-in.h (HALF_BFD_SIZE_TYPE): Define.
648         * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): New functions.
649         * opncls.c (bfd_alloc2, bfd_zalloc2): New functions.
650         * elf.c (bfd_elf_get_elf_syms, setup_group, assign_section_numbers,
651         elf_map_symbols, map_sections_to_segments,
652         assign_file_positions_for_segments, copy_private_bfd_data,
653         swap_out_syms, _bfd_elf_slurp_version_tables): Use bfd_*alloc2
654         where appropriate.
655         * bfd-in2.h: Rebuilt.
656         * libbfd.h: Rebuilt.
657
658         * elf.c (_bfd_elf_print_private_bfd_data): Don't crash on bogus
659         verdef or verneed section.
660         (_bfd_elf_slurp_version_tables): Handle corrupt verdef and/or
661         verneed sections gracefully.
662         * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto_ptr): Don't crash on
663         bogus relocation values.
664         * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
665         * elf64-s390.c (elf_s390_info_to_howto): Likewise.
666         * elf32-s390.c (elf_s390_info_to_howto): Likewise.
667         * elf64-x86-64.c (elf64_x86_64_info_to_howto): Likewise.
668         * elfxx-ia64.c (lookup_howto): Likewise.
669
670         * elf.c (bfd_elf_get_str_section): Allocate an extra byte after
671         the end of strtab and clear it.
672         (elf_read): Remove.
673
674 2005-07-05  Nick Clifton  <nickc@redhat.com>
675
676         * po/vi.po: New Vietnamese translation.
677         * configure.in (ALL_LINGUAS): Add vi.
678         * configure: Regenerate.
679
680 2005-07-05  Peter S. Mazinger <ps.m@gmx.net>
681
682         * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
683         touchup logic like i386/ppc.
684
685 2005-07-05  Alan Modra  <amodra@bigpond.net.au>
686
687         * elf.c (special_sections): Move const qualifier.
688         (special_sections_b..special_sections_t): Likewise.
689         * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
690         const.
691         (elf32_arm_symbian_special_sections): Move const qualifier.
692         * elf32-m32r.c: Similarly.
693         * elf32-m68hc11.c: Similarly.
694         * elf32-m68hc12.c: Similarly.
695         * elf32-mcore.c: Similarly.
696         * elf32-ppc.c: Similarly.
697         * elf32-sh64.c: Similarly.
698         * elf32-v850.c: Similarly.
699         * elf32-xtensa.c: Similarly.
700         * elf64-alpha.c: Similarly.
701         * elf64-hppa.c: Similarly.
702         * elf64-ppc.c: Similarly.
703         * elf64-sh64.c: Similarly.
704         * elfxx-ia64.c: Similarly.
705         * elfxx-mips.c: Similarly.
706
707 2005-07-04  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
708
709         * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
710         info->executable instead of !info->shared where appropriate.
711
712 2005-07-04  Alan Modra  <amodra@bigpond.net.au>
713
714         PR 1042
715         * elf.c (assign_file_positions_for_segments): Remove excluded
716         sections from the segment map.
717
718 2005-07-04  Alan Modra  <amodra@bigpond.net.au>
719
720         PR 1004
721         * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr.  Delete
722         special_sections.
723         (_bfd_elf_get_special_section): Declare.
724         (bfd_elf_special_section): Update prototype.
725         * elf.c (special_sections): Remove unused outer entries.
726         (get_special_section): Delete.
727         (_bfd_elf_get_special_section): New function.
728         (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec".  Update
729         special_sections indexing.
730         (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
731         * elf32-arm.c (symbian_special_sections_d): Delete.
732         (symbian_special_sections_g, symbian_special_sections_h): Delete.
733         (symbian_special_sections_i, symbian_special_sections_f): Delete.
734         (symbian_special_sections_p): Delete.
735         (elf32_arm_symbian_special_sections): Merge above to here.
736         (elf32_arm_symbian_get_sec_type_attr): New function.
737         (elf_backend_special_sections): Don't define.
738         (elf_backend_get_sec_type_attr): Define.
739         * elf32-m32r.c: Similarly to elf32-arm.c.
740         * elf32-m68hc11.c: Likewise.
741         * elf32-m68hc12.c: Likewise.
742         * elf32-mcore.c: Likewise.
743         * elf32-sh64.c: Likewise.
744         * elf32-v850.c: Likewise.
745         * elf32-xtensa.c: Likewise.
746         * elf64-alpha.c: Likewise.
747         * elf64-hppa.c: Likewise.
748         * elf64-ppc.c: Likewise.
749         * elf64-sh64.c: Likewise.
750         * elfxx-ia64.c: Likewise.
751         * elfxx-mips.c: Likewise.
752         * elf32-ppc.c: Likewise.
753         (bfd_elf_special_section ppc_alt_plt): New.  Use it if .plt loadable.
754         * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
755         (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
756         (elf_backend_get_sec_type_attr): Define.
757         * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
758         (elf_backend_special_sections): Don't define.
759         (elfNN_bed): Update.
760
761 2005-07-01  Nick Clifton  <nickc@redhat.com>
762
763         * cpu-d10v.c: Update to ISO C90 style function declarations and
764         fix formatting.
765         * cpu-d30v.c: Likewsie.
766         * cpu-i370.c: Likewsie.
767         * cpu-xstormy16.c: Likewsie.
768         * elf32-arc.c: Likewsie.
769         * elf32-d10v.c: Likewsie.
770         * elf32-d30v.c: Likewsie.
771         * elf32-dlx.c: Likewsie.
772         * elf32-i370.c: Likewsie.
773         * elf32-i960.c: Likewsie.
774         * elf32-ip2k.c: Likewsie.
775         * elf32-m32r.c: Likewsie.
776         * elf32-mcore.c: Likewsie.
777         * elf32-openrisc.c: Likewsie.
778         * elf32-or32.c: Likewsie.
779         * elf32-pj.c: Likewsie.
780         * elf32-v850.c: Likewsie.
781         * elf32-xstormy16.c: Likewsie.
782
783 2005-07-01  Alan Modra  <amodra@bigpond.net.au>
784
785         * elf64-alpha.c (elf64_alpha_create_got_section): Always create
786         a new .got section.
787         (elf64_alpha_create_dynamic_sections): Always make new sections
788         by using bfd_make_section_anyway_with_flags.  Check that .got not
789         already created.
790         (elf64_alpha_check_relocs): Delete "got_created".  Use tdata->gotobj
791         instead.
792
793 2005-06-30  Alan Modra  <amodra@bigpond.net.au>
794
795         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
796         _SDA_BASE_ and _SDA2_BASE_ symbols.
797         * elflink.c (_bfd_elf_provide_symbol): Correct comment.  Define
798         sym if not def_regular.
799         (_bfd_elf_provide_section_bound_symbols): Similarly.
800
801 2005-06-30  Ben Elliston  <bje@gnu.org>
802
803         * config.bfd: Mark as obsolete:
804             m68*-apollo-*
805             m68*-apple-aux*
806             m68*-bull-sysv*
807
808 2005-06-29  Alan Modra  <amodra@bigpond.net.au>
809
810         * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
811         .eh_frame specially..
812         (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
813         Don't recheck sections we have already marked.
814         (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
815         * section.c (struct bfd_section): Add gc_mark_from_eh.
816         (STD_SECTION): Adjust.
817         * ecoff.c (bfd_debug_section): Adjust.
818         * bfd-in2.h: Regenerate.
819
820 2005-06-29  Alan Modra  <amodra@bigpond.net.au>
821
822         * elflink.c (elf_gc_sweep): Do not refcount on sections that have
823         not been processed by check_relocs.
824
825 2005-06-29  Paul Brook  <paul@codesourcery.com>
826
827         * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
828         * bfd-in2.h: Regenerate.
829         * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
830         relative.
831         * elflink.c (bfd_elf_set_symbol): Add section argument.
832         (_bfd_elf_provide_symbol): Ditto.
833         (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
834
835 2005-06-27  Carlos O'Donell <carlos@systemhalted.org>
836
837         * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
838         Use bh_root, and hh.
839         (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
840         (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
841         (struct elf32_hppa_link_hash_table): Use etab and bstab.
842         (stub_hash_newfunc): Use hh.
843         (hppa_link_hash_newfunc): Use hsh_cache.
844         (elf32_hppa_link_hash_table_create): Use etab, and bstab.
845         (elf32_hppa_link_hash_table_free): Use bstab.
846         (hppa_stub_name): Use eh.
847         (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
848         (hppa_add_stub): Use bstab.
849         (hppa_type_of_stub): Use eh.
850         (hppa_build_one_stub): Use hh and bh_root.
851         (elf32_hppa_copy_indirect_symbol): Use hdh_next.
852         (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
853         (elf32_hppa_gc_sweep_hook): Use hdh_next.
854         (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
855         (allocate_plt_static): Use etab.
856         (allocate_dynrelocs): Use etab, and hdh_next.
857         (readonly_dynrelocs): Use hdh_next.
858         (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
859         (get_local_syms): Use eh, bstab, and hh.
860         (elf32_hppa_size_stubs): Use eh, bstab, and hh.
861         (elf32_hppa_set_gp): Use etab.
862         (elf32_hppa_build_stubs): Use bstab.
863         (final_link_relocate): Use eh, bh_root.
864         (elf32_hppa_relocate_section): Use elf, etab.
865         (elf32_hppa_finish_dynamic_sections): Use etab.
866
867 2005-06-27  H.J. Lu  <hongjiu.lu@intel.com>
868
869         * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
870         the extra `;'.
871
872 2005-06-21  Carlos O'Donell <carlos@systemhalted.org>
873
874         * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
875         (hppa_stub_hash_entry): Define.
876         (stub_hash_newfunc): Rename variables.
877         (hppa_link_hash_newfunc): Likewise.
878         (elf32_hppa_link_hash_table_free): Likewise.
879         (hppa_stub_name): Likewise.
880         (hppa_get_stub_entry): Likewise.
881         (hppa_add_stub): Likewise.
882         (hppa_type_of_stub): Likewise.
883         (hppa_build_one_stub): Likewise.
884         (hppa_size_one_stub): Likewise.
885         (elf32_hppa_create_dynamic_sections): Likewise.
886         (elf32_hppa_copy_indirect_symbol): Likewise.
887         (elf32_hppa_check_relocs): Likewise.
888         (elf32_hppa_gc_mark_hook): Likewise.
889         (elf32_hppa_gc_sweep_hook): Likewise.
890         (elf32_hppa_grok_psinfo): Likewise.
891         (elf32_hppa_hide_symbol): Likewise.
892         (elf32_hppa_adjust_dynamic_symbol): Likewise.
893         (allocate_dynrelocs): Likewise.
894         (clobber_millicode_symbols): Likewise.
895         (readonly_dynrelocs): Likewise.
896         (elf32_hppa_size_dynamic_sections): Likewise.
897         (get_local_syms): Likewise.
898         (elf32_hppa_size_stubs): Likewise.
899         (hppa_record_segment_addr): Likewise.
900         (final_link_relocate): Likewise.
901         (elf32_hppa_relocate_section): Likewise.
902         (elf32_hppa_finish_dynamic_symbol): Likewise.
903
904 2005-06-20  H.J. Lu  <hongjiu.lu@intel.com>
905
906         PR 1025
907         * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
908         symbol.
909         * elf32-arm.c (elf32_arm_check_relocs): Likewise.
910         * elf32-avr.c (elf32_avr_check_relocs): Likewise.
911         * elf32-cris.c (cris_elf_check_relocs): Likewise.
912         * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
913         * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
914         * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
915         * elf32-frv.c (elf32_frv_check_relocs): Likewise.
916         * elf32-i370.c (i370_elf_check_relocs): Likewise.
917         * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
918         * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
919         * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
920         * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
921         * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
922         * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
923         * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
924         * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
925         * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
926         * elf32-s390.c (elf_s390_check_relocs): Likewise.
927         * elf32-sh.c (sh_elf_check_relocs): Likewise.
928         * elf32-v850.c (v850_elf_check_relocs): Likewise.
929         * elf32-vax.c (elf_vax_check_relocs): Likewise.
930         * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
931         * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
932         * elf64-s390.c (elf_s390_check_relocs): Likewise.
933         * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
934         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
935         * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
936
937 2005-06-20  H.J. Lu  <hongjiu.lu@intel.com>
938
939         PR 1022
940         * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
941         symbol.
942
943 2005-06-20  H.J. Lu  <hongjiu.lu@intel.com>
944
945         PR 1025
946         * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
947         * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
948
949 2005-06-18  H.J. Lu  <hongjiu.lu@intel.com>
950
951         * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
952         BFD_RELOC_X86_64_GOTPC32.
953         * bfd-in2.h: Regenerated.
954
955 2005-06-17  Jakub Jelinek  <jakub@redhat.com>
956
957         * elf.c (bfd_section_from_shdr): Kill bogus warning.
958
959         * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
960         symbol, relocation, group or versym sections.
961
962         * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
963         is NULL.
964         * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
965         doesn't point into the section.
966
967 2005-06-17  Jan Beulich  <jbeulich@novell.com>
968
969         * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
970         and BFD_RELOC_X86_64_GOTPC32.
971         * libbfd.h (bfd_reloc_code_real_names): Likewise.
972         * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
973         R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
974         (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
975         and R_X86_64_GOTPC32.
976         (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
977         (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
978         R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
979         (elf64_x86_64_relocate_section): Likewise.
980         (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
981
982 2005-06-15  Mark Kettenis  <kettenis@gnu.org>
983
984         * archive.c: Include "libiberty.h".
985
986 2005-06-15  Nick Clifton  <nickc@redhat.com>
987
988         * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
989         produced by the GreenHills toolchain can be assimilated.
990
991 2005-06-14  Steve Ellcey  <sje@cup.hp.com>
992
993         * som.c (som_find_inliner_info): New.
994
995 2005-06-14  H.J. Lu  <hongjiu.lu@intel.com>
996
997         * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
998
999 2005-06-14  Jakub Jelinek  <jakub@redhat.com>
1000
1001         * elf.c (bfd_section_from_shdr): Fail if name is NULL.
1002         Prevent endless recursion on broken objects.
1003
1004         * archive.c (do_slurp_coff_armap): Check for overflows.
1005
1006 2005-06-10  Daniel Jacobowitz  <dan@codesourcery.com>
1007
1008         * elfcode.h (elf_write_relocs): Do nothing if there are no
1009         relocations.
1010
1011 2005-06-10  Alan Modra  <amodra@bigpond.net.au>
1012
1013         * dwarf2.c (decode_line_info): Revert last change.  Instead set
1014         initial low_pc to -1 to avoid need to test whether loc_pc has
1015         been set.
1016
1017 2005-06-09  Christopher Faylor  <cgf@timesys.com>
1018
1019         * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
1020         either SEC_ALLOC OR SEC_LOAD.
1021
1022 2005-06-09  Christopher Faylor  <cgf@timesys.com>
1023
1024         * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
1025         section header.  Do not add STYP_NOLOAD since it does not appear to be
1026         a valid PE flag.
1027
1028 2005-06-09  H.J. Lu  <hongjiu.lu@intel.com>
1029
1030         PR 1000
1031         * dwarf2.c (lookup_address_in_line_info_table): Restore code
1032         handling NULL function info, removed with 2005-04-03 change.
1033
1034 2005-06-08  Mark Mitchell  <mark@codesourcery.com>
1035
1036         * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
1037
1038 2005-06-09  Alan Modra  <amodra@bigpond.net.au>
1039
1040         * elflink.c (elf_mark_used_section): Delete.
1041         (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
1042         * reloc.c (bfd_mark_used_section): New function.
1043         (bfd_generic_gc_sections): Call bfd_mark_used_section.
1044
1045 2005-06-08  Alan Modra  <amodra@bigpond.net.au>
1046
1047         * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
1048         (bfd_fdopenr): Same.
1049
1050 2005-06-07  Mark Mitchell  <mark@codesourcery.com>
1051
1052         * opncls.c (bfd_fdopenr): Add missing break statements.
1053
1054 2005-06-07  Mark Mitchell  <mark@codesourcery.com>
1055
1056         * opncls.c (bfd_fopen): New API.
1057         (bfd_openr): Use it.
1058         (bfd_fdopenr): Likewise.
1059         * bfd-in2.h: Regenerated.
1060
1061 2005-06-07  Aldy Hernandez  <aldyh@redhat.com>
1062             Michael Snyder  <msnyder@redhat.com>
1063             Stan Cox  <scox@redhat.com>
1064
1065         * Makefile.am (ALL_MACHINES): Add ms1 support.
1066         (ALL_MACHINES_CFILES): Same.
1067         (BFD32_BACKENDS): Same.
1068         (BFD32_BACKENDS_CFILES): Same.
1069
1070         * Makefile.in: Regenerate.
1071
1072         * archures.c (bfd_architecture): Add ms1 entries.
1073         Externalize bfd_ms1_arch.
1074         (bfd_archures_list): Add bfd_ms1_arch.
1075
1076         * bfd-in2.h: Regenerate.
1077
1078         * cpu-ms1.c: New file.
1079
1080         * elf32-ms1.c: New file.
1081
1082         * targets.c: Define extern of bfd_elf32_ms1_vec.
1083         Add bfd_elf32_ms1_vec to _bfd_target_vector.
1084
1085         * configure.in: Add bfd_elf32_ms1_vec case.
1086
1087         * configure: Regenerate.
1088
1089         * config.bfd: Add ms1-*-elf to table.
1090
1091 2005-06-07  Zack Weinberg  <zack@codesourcery.com>
1092
1093         * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
1094
1095 2005-06-07  Alan Modra  <amodra@bigpond.net.au>
1096
1097         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
1098         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
1099
1100 2005-06-06  H.J. Lu  <hongjiu.lu@intel.com>
1101
1102         PR 990
1103         * bfd.c (bfd_find_line): New.
1104
1105         * dwarf2.c (comp_unit): Add variable_table.
1106         (funcinfo): Add file, line, and sec.
1107         (varinfo): New.
1108         (lookup_symbol_in_function_table): New.
1109         (lookup_symbol_in_variable_table): New.
1110         (scan_unit_for_functions): Renamed to ...
1111         (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
1112         DW_TAG_variable.
1113         (comp_unit_find_nearest_line): Updated.
1114         (comp_unit_find_line): New.
1115         (_bfd_dwarf2_find_line): New.
1116
1117         * elf-bfd.h (_bfd_elf_find_line): New.
1118         (_bfd_generic_find_line): New. Defined.
1119
1120         * elf.c (_bfd_elf_find_line): New.
1121
1122         * libbfd-in.h (_bfd_dwarf2_find_line): New.
1123         (_bfd_generic_find_line): New.
1124
1125         * bfd-in2.h: Regenerated.
1126         * libbfd.h: Likewise.
1127
1128         * libbfd.c (_bfd_generic_find_line): New.
1129
1130         * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
1131         with _bfd_generic_find_line.
1132         (bfd_target): Add _bfd_find_line.
1133
1134 2005-06-06  H.J. Lu  <hongjiu.lu@intel.com>
1135
1136         * dwarf2.c (decode_line_info): Properly set low_pc.
1137
1138 2005-06-06  Alan Modra  <amodra@bigpond.net.au>
1139
1140         * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
1141         case, include addend when indexing .opd section map.
1142         (ppc64_elf_edit_opd): Add no_opd_opt param.  Do nothing besides
1143         clear opd_adjust array if no_opd_opt set.  Tidy code.
1144         Ignore zero size .opd.  Check bfd_alloc return value.
1145         (ppc_stub_name): Return immediately on bfd_malloc fail.
1146         * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
1147
1148 2005-06-04  H.J. Lu  <hongjiu.lu@intel.com>
1149
1150         * dwarf2.c (comp_unit): Fix a typo in comment.
1151
1152 2005-06-03  Jan-Benedict Glaw  <jbglaw@lug-owl.de>
1153
1154         * elf32-vax.c (rtype_to_howto): Remove PARAMS.
1155         (reloc_type_lookup): Dito.
1156         (elf_vax_discard_copies): Dito.
1157         (elf_vax_instantiate_got_entries): Dito.
1158         (elf_vax_link_hash_traverse): Dito.
1159         (elf_vax_link_hash_newfunc): Dito.
1160         (elf_vax_link_hash_table_create): Dito.
1161         (elf32_vax_set_private_flags): Dito.
1162         (elf32_vax_merge_private_bfd_data): Dito.
1163         (elf32_vax_print_private_bfd_data): Dito.
1164         (elf_vax_check_relocs): Dito.
1165         (elf_vax_gc_mark_hook): Dito.
1166         (elf_vax_gc_sweep_hook): Dito.
1167         (elf_vax_size_dynamic_sections): Dito.
1168         (elf_vax_discard_copies): Dito.
1169         (elf_vax_instantiate_got_entries): Dito.
1170         (elf_vax_relocate_section): Dito.
1171         (elf_vax_finish_dynamic_symbol): Dito.
1172         (elf_vax_finish_dynamic_sections): Dito.
1173         (elf_vax_hash_table): Break-up of line isn't needed.
1174         (elf_vax_check_relocs): Remove leading whitespace
1175         (elf_vax_relocate_section): Remove redundant whitespace
1176         (elf_vax_link_hash_newfunc): Don't cast NULL.
1177         (elf_vax_link_hash_table_create): Dito.
1178         * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
1179
1180 2005-06-03  Alan Modra  <amodra@bigpond.net.au>
1181
1182         PR 568
1183         * configure.in: Bump version
1184         * configure: Regenerate.
1185         * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
1186         discarded section sym refs and kill linker output.
1187         * simple.c (simple_dummy_einfo): New function.
1188         (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
1189
1190         * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
1191         for all reloc types.
1192
1193 2005-06-02  Alan Modra  <amodra@bigpond.net.au>
1194
1195         * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
1196         restrictive of func code and func descr for undefined syms as well
1197         as defined.
1198
1199 2005-05-31  Jim Blandy  <jimb@redhat.com>
1200
1201         * Makefile.am: Regenerate dependencies with 'make dep-am'.
1202         * Makefile.in: Regenerate.
1203
1204 2005-05-31  Richard Henderson  <rth@redhat.com>
1205
1206         * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
1207         (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
1208         (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
1209         (elf64_alpha_want_plt): Update to match.
1210         (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
1211         (elf64_alpha_relax_with_lituse): Likewise.  Handle JSRDIRECT.
1212
1213 2005-05-31  Zack Weinberg  <zack@codesourcery.com>
1214
1215         * elf32-arm.c (elf32_arm_reloc_type_lookup)
1216         (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
1217         Use ISO C90 function declaration style.
1218
1219 2005-05-31  James E Wilson  <wilson@specifixinc.com>
1220
1221         * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
1222         header PF_R flag on PT_LOAD segments.
1223
1224 2005-05-30  Richard Henderson  <rth@redhat.com>
1225
1226         * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
1227         the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
1228
1229 2005-05-29  Richard Henderson  <rth@redhat.com>
1230
1231         * configure.in (--enable-secureplt): New.
1232         * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
1233         (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
1234         (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
1235         (elf64_alpha_use_secureplt): New.
1236         (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
1237         (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
1238         (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
1239         (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
1240         (struct alpha_elf_link_hash_entry): Add plt_offset.
1241         (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
1242         (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
1243         (PLT_ENTRY_WORD3): Remove.
1244         (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
1245         on .plt and create .got.plt.
1246         (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
1247         (get_got_entry): Initialize plt_offset.
1248         (elf64_alpha_want_plt): New.
1249         (elf64_alpha_check_relocs): Use it.
1250         (elf64_alpha_adjust_dynamic_symbol): Likewise.  Don't allocate
1251         plt entries here.
1252         (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
1253         error as user error.
1254         (elf64_alpha_size_plt_section_1): Allocate one plt entry per
1255         got subsection.
1256         (elf64_alpha_size_plt_section): Size .got.plt section.
1257         (elf64_alpha_size_rela_got_1): Don't allocate relocations if
1258         plt entries used.
1259         (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
1260         Add PLTRO DYNAMIC entry.
1261         (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
1262         (elf64_alpha_finish_dynamic_sections): Likewise.
1263
1264 2005-05-28  David Daney  <ddaney@avtrex.com>
1265
1266         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections):  Move
1267         calculation of DT_RELSZ to occur after all dynamic relocations
1268         are created.
1269
1270 2005-05-28  Eli Zaretskii  <eliz@gnu.org>
1271
1272         * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
1273         * config.in, configure: Regenerate.
1274
1275 2005-05-26  Mark Kettenis  <kettenis@gnu.org>
1276             Maciej W. Rozycki  <macro@linux-mips.org>
1277
1278         * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
1279         stop processing of options if one of invalid size is
1280         encountered.
1281         (_bfd_mips_elf_section_from_shdr): Likewise.
1282         (_bfd_mips_elf_fake_sections): Reset the type of empty special
1283         sections.
1284
1285 2005-05-26  Richard Henderson  <rth@redhat.com>
1286
1287         * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
1288         plt_old_section, plt_old_value.
1289         (elf64_alpha_adjust_dynamic_symbol): Don't set it.
1290         (elf64_alpha_size_plt_section_1): Don't use it.
1291
1292 2005-05-26  Jakub Jelinek  <jakub@redhat.com>
1293
1294         * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
1295         first shdr has sh_size == 0.  Fail if e_shnum is large to cause
1296         arithmetic overflow when allocating the i_shdr array.
1297         Sanity check sh_link and sh_info fields.  Fix e_shstrndx sanity check.
1298
1299 2005-05-25  Richard Henderson  <rth@redhat.com>
1300
1301         * elf64-alpha.c: Update all function definitions to ISO C.  Remove
1302         all function prototypes; rearrange functions into def-use order.
1303
1304 2005-05-25  Richard Henderson  <rth@redhat.com>
1305
1306         * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
1307         in the presence of deleting elements.
1308         (elf64_alpha_size_got_sections): Zero dead got section size.
1309
1310 2005-05-23  Fred Fish  <fnf@specifixinc.com>
1311
1312         * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
1313         (struct funcinfo): Add caller_func, caller_file, caller_line.
1314         tag, and nesting_level members.
1315         (lookup_address_in_function_table): Change first passed parameter
1316         from "struct funcinfo *" to "struct comp_unit *".
1317         (lookup_address_in_function_table): Dereference unit to find function
1318         table.
1319         (lookup_address_in_function_table): Traverse the function list to
1320         create a chain of inlined functions back to the first non inlined
1321         function.
1322         (scan_unit_for_functions): Remember tag and nesting level.  Handle
1323         DW_AT_call_file and DW_AT_call_line.
1324         (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
1325         call to pass unit pointer instead of function table pointer.  For
1326         inlined functions, save pointer to the inliner chain.
1327         (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
1328         (_bfd_dwarf2_find_inliner_info): New function that returns information
1329         from the inliner chain after a call to bfd_find_nearest_line.
1330
1331         * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
1332         * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
1333         NAME##_find_inliner_info.
1334         (bfd_target): Add _bfd_find_inliner_info.
1335         * bfd-in2.h: Regenerate.
1336
1337         * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
1338         macro that always returns bfd_false.
1339         (_bfd_dwarf2_find_inliner_info): Declare.
1340         * libbfd.h: Regenerate.
1341
1342         * elf32-arm.c (elf32_arm_find_inliner_info): New function
1343         that calls _bfd_dwarf2_find_inliner_info.
1344         (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
1345
1346         * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
1347         that calls _bfd_dwarf2_find_inliner_info.
1348         * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
1349         * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
1350         _bfd_mips_elf_find_inliner_info.
1351         * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
1352         * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
1353
1354         * elf.c (_bfd_elf_find_inliner_info): New function that calls
1355         _bfd_dwarf2_find_inliner_info.
1356         * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
1357         * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
1358         _bfd_elf_find_inliner_info.
1359
1360         * coffgen.c (coff_find_inliner_info): New function that
1361         calls _bfd_dwarf2_find_inliner_info.
1362         * libcoff-in.h (coff_find_inliner_info): Declare.
1363         * libcoff.h: Regenerate.
1364         * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
1365         (pmac_xcoff_vec) Ditto.
1366         * coff64-rs6000.c (rs6000coff64_vec): Ditto.
1367         (aix5coff64_vec): Ditto.
1368
1369         * aout-target.h (MY_find_inliner_info): Define as
1370         _bfd_nosymbols_find_inliner_info.
1371         * aout-tic30.c (MY_find_inliner_info): Ditto.
1372         * binary.c (binary_find_inliner_info): Ditto.
1373         * i386msdos.c (msdos_find_inliner_info): Ditto.
1374         * ihex.c (ihex_find_inliner_info): Ditto.
1375         * libaout.h (aout_32_find_inliner_info): Ditto.
1376         * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
1377         * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
1378         * mmo.c (mmo_find_inliner_info): Ditto.
1379         * nlm-target.h (nlm_find_inliner_info): Ditto.
1380         * pef.c (bfd_pef_find_inliner_info): Ditto.
1381         * ppcboot.c (ppcboot_find_inliner_info): Ditto.
1382         * srec.c (srec_find_inliner_info): Ditto.
1383         * tekhex.c (tekhex_find_inliner_info): Ditto.
1384         * versados.c (versados_find_inliner_info): Ditto.
1385         * xsym.c (bfd_sym_find_inliner_info): Ditto.
1386
1387         * ieee.c (ieee_find_inliner_info): New function that always
1388         returns FALSE.
1389         * oasys.c (oasys_find_inliner_info): Ditto.
1390         * vms.c (vms_find_inliner_info): Ditto.
1391
1392 2005-05-24  Alan Modra  <amodra@bigpond.net.au>
1393
1394         * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
1395         force old plt layout.
1396
1397 2005-05-22  Richard Henderson  <rth@redhat.com>
1398
1399         * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
1400         sections.
1401         (elf64_alpha_check_relocs): Likewise.
1402         (elf64_alpha_relocate_section): Don't emit dynamic relocations to
1403         non-allocated sections.
1404
1405 2005-05-22  Richard Henderson  <rth@redhat.com>
1406
1407         * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
1408         undefweak to use zero register.  Call elf64_alpha_relax_got_load
1409         if not all uses removed.
1410         (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
1411         (elf64_alpha_relax_section): Handle undefweak symbols.
1412         (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
1413         (elf64_alpha_size_rela_got_1): Likewise.
1414         (elf64_alpha_relocate_section): Likewise.
1415
1416 2005-05-22  Richard Henderson  <rth@redhat.com>
1417
1418         * elf64-alpha.c (elf64_alpha_relax_section): Only operate
1419         on SEC_CODE sections.
1420
1421 2005-05-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1422
1423         * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
1424         unsigned int *.
1425         (som_write_space_strings): Change type of tmp_space and p to char *.
1426         (som_write_symbol_strings): Likewise.  Also change type of comp to
1427         char *comp[4].
1428         (som_begin_writing): Change type of strings_size to unsigned int.
1429         (som_finish_writing): Likewise.
1430         (som_slurp_reloc_table): Change type of external_relocs to unsigned
1431         char *.
1432         * som.h (struct som_section_data_struct): Change type of reloc_stream
1433         field to unsigned char *.
1434
1435 2005-05-20  Daniel Jacobowitz  <dan@codesourcery.com>
1436
1437         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
1438         copy relocations for VxWorks.
1439
1440 2005-05-20  Daniel Jacobowitz  <dan@codesourcery.com>
1441
1442         * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
1443         has_sda_refs.
1444         (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
1445         (ppc_elf_check_relocs): Set has_sda_refs.
1446         (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
1447         copy relocations.  Use has_sda_refs to place variables in .sbss.
1448         (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
1449         .sbss.
1450
1451 2005-05-20  Bob Wilson  <bob.wilson@acm.org>
1452
1453         * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
1454         xtensa_default_isa is initialized.
1455
1456 2005-05-20  Alan Modra  <amodra@bigpond.net.au>
1457
1458         * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
1459         for second and subsequent list entries.  Only allocate multiple
1460         glink stubs when shared or pie.
1461         (ppc_elf_finish_dynamic_symbol): Break out early when only one
1462         glink stub is needed.
1463
1464 2005-05-19  Zack Weinberg  <zack@codesourcery.com>
1465
1466         * Makefile.am: Have 'all' depend on 'info'.
1467         * Makefile.in: Regenerate.
1468
1469 2005-05-19  Alan Modra  <amodra@bigpond.net.au>
1470
1471         * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
1472         init_offset.  Add init_got_refcount, init_plt_refcount,
1473         init_got_offset and init_plt_offset.
1474         * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
1475         (_bfd_elf_link_hash_hide_symbol): Likewise.
1476         (_bfd_elf_link_hash_table_init): Likewise.
1477         * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1478         * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1479         * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
1480         (bfd_elf_size_dynamic_sections): Likewise.
1481         * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
1482         (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
1483         LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
1484         (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
1485         LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
1486         (struct plt_entry): New.
1487         (ppc_elf_link_hash_table_create): Set new init_plt fields.
1488         (ppc_elf_copy_indirect_symbol): Handle merge of plt plist.  Don't
1489         use _bfd_elf_link_hash_copy_indirect.
1490         (update_plt_info, find_plt_ent): New functions.
1491         (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
1492         and adjust for use of plt list rather than refcount.
1493         (ppc_elf_gc_sweep_hook): Likewise.
1494         (ppc_elf_tls_optimize): Likewise.
1495         (ppc_elf_adjust_dynamic_symbol): Likewise.
1496         (allocate_dynrelocs): Likewise.
1497         (ppc_elf_relax_section): Likewise.
1498         (ppc_elf_relocate_section): Likewise.  Adjust R_PPC_PLTREL24 addends
1499         when performing a relocatable link.
1500         (ppc_elf_finish_dynamic_symbol): Likewise.  Write .glink stubs here..
1501         (ppc_elf_finish_dynamic_sections): ..rather than here.  Use new
1502         pic resolver stub.
1503
1504 2005-05-19  Alan Modra  <amodra@bigpond.net.au>
1505
1506         * elf.c (assign_file_positions_for_segments): Use maximum of
1507         maxpagesize and section alignment when adjusting initial
1508         segment offset and section offsets.
1509
1510 2005-05-18  Zack Weinberg  <zack@codesourcery.com>
1511
1512         * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
1513         unconditional.
1514
1515 2005-05-18  H.J. Lu  <hongjiu.lu@intel.com>
1516
1517         * elf.c (group_signature): Undo the last change. Check if the
1518         symbol table section is correct.
1519
1520 2005-05-17  Zack Weinberg  <zack@codesourcery.com>
1521
1522         * elf32-arm.c: Wherever possible, use official reloc names
1523         from AAELF.
1524         (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
1525         (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
1526         (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
1527         (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
1528         (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
1529         (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
1530         elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
1531         Add many new relocations from AAELF.
1532         (elf32_arm_howto_from_type): Update to match.
1533         (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
1534         R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
1535         R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
1536         (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
1537         (elf32_arm_final_link_relocate): Add support for
1538         R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6.  Remove
1539         case entries redundant with default.
1540
1541         * reloc.c: Reorganize ARM relocations.  Add Thumb
1542         assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
1543         BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
1544         Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
1545         BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
1546         Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
1547         * bfd-in2.h, libbfd.h: Regenerate.
1548
1549 2005-05-17  Daniel Jacobowitz  <dan@codesourcery.com>
1550
1551         * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
1552         elf_shstrtab.
1553         * format.c (bfd_check_format_matches): Set output_has_begun
1554         for both_direction.
1555         * section.c (bfd_set_section_contents): Use bfd_write_p.  Remove
1556         special case for both_direction.
1557
1558 2005-05-17  Nick Clifton  <nickc@redhat.com>
1559
1560         * elf.c (group_signature): Check for a group section which is
1561         actually a (corrupt) symbol table section in disguise and prevent
1562         an infinite loop from occurring.
1563
1564 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
1565
1566         * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
1567         2005-02-16.
1568
1569 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
1570
1571         * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
1572         predicate on slot 0 only if slot 0 isn't br.
1573
1574 2005-05-17  H.J. Lu  <hongjiu.lu@intel.com>
1575
1576         PR 797
1577         * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
1578         empty sdynbss section.
1579         * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
1580
1581 2005-05-17  Tavis Ormandy <taviso@gentoo.org>
1582
1583         * elf.c (bfd_section_from_shdr): Add sanity check when parsing
1584         dynamic sections.
1585
1586 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
1587
1588         * elf32-ppc.c (LIS_11. LIS_12): Define.
1589         (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
1590         (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
1591         for --data-plt when building non-pie executables.
1592
1593 2005-05-17  Nick Clifton  <nickc@redhat.com>
1594
1595         * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
1596         the situation where a symbols's section is not known but a section
1597         relative R_ARM_RELATIVE reloc has to be generated for the Symbian
1598         OS.
1599
1600         * elf32-v850.c (v850_elf_relocate_section): Move code to test for
1601         the presence of a symbol table to just before the symbol table is
1602         actually used.
1603
1604 2005-05-16  H.J. Lu  <hongjiu.lu@intel.com>
1605
1606         PR 834
1607         * elfxx-ia64.c (elfNN_ia64_relax_br): New.
1608         (elfNN_ia64_relax_section): Use it.
1609
1610 2005-05-14  Mark Kettenis  <kettenis@gnu.org>
1611
1612         * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
1613         of basename.
1614
1615 2005-05-14  Alan Modra  <amodra@bigpond.net.au>
1616
1617         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
1618         not DT_PPC_GLINK.
1619         (ppc_elf_finish_dynamic_sections): Likewise.
1620
1621 2005-05-13  Fred Fish  <fnf@specifixinc.com>
1622
1623         * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
1624         * libbfd.h: Rebuilt.
1625
1626 2005-05-13  Bob Wilson  <bob.wilson@acm.org>
1627
1628         * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
1629         periods in linkonce_kind values.
1630
1631 2005-05-12  H.J. Lu  <hongjiu.lu@intel.com>
1632
1633         * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
1634         against protected function when building executable.
1635
1636 2005-05-12  Alan Modra  <amodra@bigpond.net.au>
1637
1638         * elf32-ppc.c (LWZU_0_X_11): Delete.
1639         (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
1640         (ppc_elf_select_plt_layout): Set .got flags too.  Formatting.
1641         (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
1642         table.
1643         (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
1644         table.
1645         (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
1646         Generate .glink branch table and updated stubs.
1647
1648 2005-05-11  Alan Modra  <amodra@bigpond.net.au>
1649
1650         * reloc.c (BFD_RELOC_HI16_PCREL): Define.
1651         (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
1652         * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
1653         (CROR_151515, CROR_313131): Delete.
1654         (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
1655         LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
1656         LWZU_0_X_11): Define.
1657         (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
1658         and R_PPC_REL16_HA entries.
1659         (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
1660         (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
1661         (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
1662         new_plt, and old_plt.
1663         (ppc_elf_create_dynamic_sections): Create .glink section.
1664         (ppc_elf_check_relocs): Set new_plt and old_plt.
1665         (ppc_elf_select_plt_layout): New function.
1666         (ppc_elf_tls_setup): Set plt output section elf type and flags.
1667         (allocate_got): Handle differences between old and new got layout.
1668         (allocate_dynrelocs): Likewise for plt.
1669         (ppc_elf_size_dynamic_sections): Likewise.  Allocate memory for
1670         .glink.  Don't allocate memory for old bss .plt.  Emit DT_PPC_GLINK.
1671         (ppc_elf_relax_section): Rename ppc_info to htab.  Handle .glink
1672         destination of R_PPC_PLTREL24 relocs.
1673         (ppc_elf_relocate_section): Handle new relocs and changed destination
1674         of R_PPC_PLTREL24.
1675         (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
1676         differences in layout.
1677         (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value.  Don't
1678         put a blrl in new got.  Write glink contents.
1679         * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
1680         * libbfd.h: Regenerate.
1681         * bfd-in2.h: Regenerate.
1682
1683 2005-05-11  Andreas Schwab  <schwab@suse.de>
1684
1685         * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
1686         warning.
1687
1688 2005-05-10  H.J. Lu  <hongjiu.lu@intel.com>
1689
1690         * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
1691         section if SEC_ALLOC isn't set.
1692
1693 2005-05-09  Kelley Cook  <kcook@gcc.gnu.org>
1694
1695         * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
1696         * acinclude.m4: Don't sinclude accross.m4.
1697         * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
1698
1699 2005-05-09  Alan Modra  <amodra@bigpond.net.au>
1700
1701         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
1702         (ppc64_elf_add_symbol_hook): Set has_dotsym.
1703         (ppc64_elf_check_directives): Only process syms when has_dotsym.
1704         (func_desc_adjust): Hide fake function descriptors when function
1705         code entry is defined.
1706         (adjust_opd_syms): Adjust for deleted_section becoming union field.
1707
1708 2005-05-09  Alan Modra  <amodra@bigpond.net.au>
1709
1710         * elfcode.h (elf_object_p): Add more sanity checks on elf header.
1711
1712 2005-05-08  Dave Korn   <dave.korn@artimi.com>
1713
1714         * coff-tic80.c:  Undefine _CONST after system headers to prevent
1715         clash with tic80-specific definition in include/coff/tic80.h
1716
1717 2005-05-08  H.J. Lu  <hongjiu.lu@intel.com>
1718
1719         PR 939
1720         * elflink.c (elf_link_output_extsym): Use output_bfd if
1721         h->root.u.def.section is bfd_abs_section_ptr when reporting
1722         error.
1723
1724 2005-05-07  H.J. Lu  <hongjiu.lu@intel.com>
1725
1726         * elf-bfd.h (elf_backend_data): Update special_sections to
1727         array of pointer to bfd_elf_special_section.
1728         * elf.c (special_sections): Likewise.
1729         * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
1730         * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1731         * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1732         * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1733         * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1734         * elf32-ppc.c (ppc_elf_special_sections): Likewise.
1735         * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1736         * elf32-v850.c (v850_elf_special_sections): Likewise.
1737         * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1738         * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1739         * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1740         * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1741         * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1742         * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1743         * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1744         * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
1745
1746         * elf.c (get_special_section): Updated.
1747
1748 2005-05-07  Alan Modra  <amodra@bigpond.net.au>
1749
1750         * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
1751         * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
1752         * elflink.c (_bfd_elf_create_got_section): Use zero in place of
1753         got_symbol_offset.
1754         * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
1755         * elf32-frv.c (_frv_create_got_section): Likewise.
1756         * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
1757         (elf_backend_got_symbol_offset): Don't define.
1758         * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
1759         * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
1760         and got_gap.
1761         (ppc_elf_create_got): Tidy.
1762         (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
1763         (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
1764         (ppc_elf_gc_sweep_hook): Likewise.
1765         (ppc_elf_relocate_section): Likewise.
1766         (ppc_elf_finish_dynamic_symbol): Likewise.
1767         (allocate_got): New function.
1768         (allocate_dynrelocs): Use allocate_got.
1769         (ppc_elf_size_dynamic_sections): Likewise.  Delay tlsld_got allocation
1770         so that local got can refcount it.  Set got_header_size.
1771         (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
1772         coded 4.
1773         (ppc_elf_finish_dynamic_sections): Likewise.
1774         (elf_backend_got_symbol_offset): Don't define.
1775         (elf_backend_got_header_size): Ditto.
1776
1777 2005-05-05  Steve Ellcey  <sje@cup.hp.com>
1778
1779         * configure.in (ACX_HEADER_STRING): New.
1780         * configure: Regenerate.
1781         * config.in: Regenerate.
1782         * sysdep.h (STRING_WITH_STRINGS): Use.
1783
1784 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1785
1786         * elf.c (_bfd_elf_close_and_cleanup): Only call
1787         _bfd_dwarf2_cleanup_debug_info on bfd_object.
1788
1789 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1790
1791         * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
1792         "__bss_start" instead of "_edata" as fallback.
1793
1794 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1795
1796         * bfd-in2.h: Regenerated.
1797
1798 2005-05-05  Paul Brook  <paul@codesourcery.com>
1799
1800         * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
1801         * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
1802         elf-vxworks.lo.
1803         * configure: Regenerate.
1804         * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
1805         (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
1806         (elf32-i386.lo): Depend on elf-vxworks.h.
1807         (elf-vxworks.lo): New rule.
1808         * Makefile.in: Regenerate.
1809         * elf-bfd.h (elf_backend_data): Update type of
1810         elf_backend_emit_relocs.
1811         (_bfd_elf_link_output_relocs): Update prototype.
1812         * elflink.c (_bfd_elf_link_output_relocs): Always use
1813         bed->elf_backend_emit_relocs when outputting relocations.
1814         * elfxx-target.h (elf_backend_emit_relocs): Default to
1815         _bfd_elf_link_output_relocs.
1816         * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
1817         (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
1818         * elf32-i386.c: Add elf32-i386-vxworks target BFD.
1819         (elf_i386_plt0_entry): Remove padding.
1820         (elf_i386_pic_plt0_entry): Ditto.
1821         (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
1822         (PLT_NON_JUMP_SLOT_RELOCS): Define.
1823         (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
1824         plt0_pad_byte fields.
1825         (elf_i386_link_hash_table_create): Zero them.
1826         (elf_i386_create_dynamic_sections): Create static relocation section.
1827         (allocate_dynrelocs): Allocate space for static PLT relocations.
1828         (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
1829         symbols.  Give PLT symbols function type.  Don't strip PLT sections
1830         if we have exported symbols from them.
1831         (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
1832         relocation section.  Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
1833         VxWorks.
1834         (elf_i386_finish_dynamic_sections): Allow different pad bytes.
1835         Add relocation for GOT location.  Fill in PLT static relocations.
1836         (elf_i386_vxworks_link_hash_table_create): New function.
1837         (elf_i386_vxworks_link_output_symbol_hook): New function.
1838         * elf-vxworks.h: New file.
1839
1840 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1841
1842         * section.c (bfd_make_section_anyway_with_flags): New.
1843         (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
1844         (bfd_make_section_with_flags): New.
1845         (bfd_make_section): Call bfd_make_section_with_flags.
1846
1847         * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
1848         bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
1849         instead of bfd_make_section/bfd_make_section and don't call
1850         bfd_set_section_flags.
1851         (mn10300_elf_check_relocs): Likewise.
1852         (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
1853         * elf32-arm.c (create_got_section): Likewise.
1854         (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
1855         (elf32_arm_check_relocs): Likewise.
1856         * elf32-cris.c (cris_elf_check_relocs): Likewise.
1857         * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
1858         (_frv_create_got_section): Likewise.
1859         (elf32_frvfdpic_create_dynamic_sections): Likewise.
1860         * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1861         (elf32_hppa_check_relocs): Likewise.
1862         * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
1863         (i370_elf_check_relocs): Likewise.
1864         * elf32-i386.c (create_got_section): Likewise.
1865         (elf_i386_check_relocs): Likewise.
1866         * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
1867         (create_got_section): Likewise.
1868         (m32r_elf_create_dynamic_sections): Likewise.
1869         (m32r_elf_check_relocs): Likewise.
1870         * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1871         * elf32-ppc.c (ppc_elf_create_got): Likewise.
1872         (ppc_elf_create_dynamic_sections): Likewise.
1873         (ppc_elf_add_symbol_hook): Likewise.
1874         (ppc_elf_check_relocs): Likewise.
1875         * elf32-s390.c (create_got_section): Likewise.
1876         (elf_s390_check_relocs): Likewise.
1877         * elf32-sh.c (create_got_section): Likewise.
1878         (sh_elf_create_dynamic_sections): Likewise.
1879         (sh_elf_check_relocs): Likewise.
1880         * elf32-vax.c (elf_vax_check_relocs): Likewise.
1881         * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1882         * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1883         (add_extra_plt_sections): Likewise.
1884         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1885         (elf64_alpha_create_got_section): Likewise.
1886         (elf64_alpha_create_dynamic_sections): Likewise.
1887         (elf64_alpha_check_relocs): Likewise.
1888         * elf64-hppa.c (get_reloc_section): Likewise.
1889         (get_opd): Likewise.
1890         (get_plt): Likewise.
1891         (get_dlt): Likewise.
1892         (get_stub): Likewise.
1893         (elf64_hppa_create_dynamic_sectionso): Likewise.
1894         * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
1895         * elf64-ppc.c (create_linkage_sections): Likewise.
1896         (ppc64_elf_check_relocs): Likewise.
1897         * elf64-s390.c (create_got_section): Likewise.
1898         (elf_s390_check_relocs): Likewise.
1899         * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1900         (sh64_elf64_create_dynamic_sections): Likewise.
1901         * elf64-x86-64.c (create_got_section): Likewise.
1902         (elf64_x86_64_check_relocs): Likewise.
1903         * elflink.c (_bfd_elf_create_got_section): Likewise.
1904         (_bfd_elf_link_create_dynamic_sections): Likewise.
1905         (elf_link_add_object_symbols): Likewise.
1906         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1907         (elfNN_ia64_create_dynamic_sections): Likewise.
1908         (get_fptr): Likewise.
1909         (get_pltoff): Likewise.
1910         (get_reloc_section): Likewise.
1911         (elfNN_ia64_object_p): Likewise.
1912         * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
1913         (mips_elf_create_compact_rel_section): Likewise.
1914         (mips_elf_create_got_section): Likewise.
1915         (_bfd_mips_elf_create_dynamic_sections): Likewise.
1916         * elfxx-sparc.c (create_got_section): Likewise.
1917         (_bfd_sparc_elf_check_relocs): Likewise.
1918
1919         * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
1920         on linker created sections.
1921
1922 2005-05-05  H.J. Lu  <hongjiu.lu@intel.com>
1923
1924         PR 882
1925         * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
1926         script on executable.
1927
1928 2005-05-05  John Levon  <levon@movementarian.org>
1929
1930         * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
1931         allocated memory before returning.
1932         (decode_line_info): Likewise.
1933         (_bfd_dwarf2_cleanup_debug_info): New function:  Frees memory
1934         allocated by functions in this file.
1935         * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
1936         * elf.c (_bfd_elf_close_and_cleanup): Call
1937         _bfd_dwarf2_cleanup_debug_info.
1938
1939 2005-05-05  Hans-Peter Nilsson  <hp@axis.com>
1940
1941         * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
1942         * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
1943         * configure, config.in, Makefile.in: Regenerate.
1944         * sysdep.h (stpcpy): Revert last change.
1945
1946 2005-05-05  Hans-Peter Nilsson  <hp@axis.com>
1947
1948         * sysdep.h (stpcpy): Wrap declaration in parentheses.
1949
1950 2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>
1951
1952         * elfxx-ia64.c (ARCH_SIZE): New.
1953         (LOG_SECTION_ALIGN): Likewise.
1954         (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
1955         align relocation sections.
1956         (get_fptr): Likewise.
1957         (get_reloc_section): Likewise.
1958         (elfNN_ia64_tprel_base): Likewise.
1959         (elfNN_ia64_check_relocs): Support 32bit relocations.
1960         (allocate_global_fptr_got): Likewise.
1961         (allocate_dynrel_entries): Likewise.
1962         (set_got_entry): Likewise.
1963         (set_pltoff_entry): Likewise.
1964         (elfNN_ia64_relocate_section): Likewise.
1965
1966 2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>
1967
1968         * configure.in: Add AC_CHECK_DECLS(stpcpy).
1969         * configure: Regenerate.
1970         * config.in: Likewise.
1971
1972         * sysdep.h (stpcpy): New.
1973
1974 2005-05-04  Nick Clifton  <nickc@redhat.com>
1975
1976         * Update the address and phone number of the FSF organization in
1977         the GPL notices in the following files:
1978         aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
1979         aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
1980         aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
1981         archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
1982         bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
1983         cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
1984         coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
1985         coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
1986         coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
1987         coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
1988         coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
1989         coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
1990         coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
1991         coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
1992         corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
1993         cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
1994         cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
1995         cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
1996         cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
1997         cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
1998         cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
1999         cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
2000         cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
2001         cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
2002         cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
2003         cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
2004         dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
2005         efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
2006         elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
2007         elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
2008         elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
2009         elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
2010         elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
2011         elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2012         elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
2013         elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
2014         elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
2015         elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
2016         elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
2017         elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
2018         elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
2019         elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
2020         elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
2021         elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
2022         elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
2023         elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
2024         epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
2025         genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
2026         hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
2027         i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
2028         i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
2029         libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
2030         libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
2031         libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
2032         m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
2033         mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
2034         netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
2035         nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
2036         nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
2037         opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
2038         pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
2039         pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
2040         pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
2041         ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
2042         sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
2043         sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
2044         syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
2045         vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
2046         vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
2047         xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
2048         hosts/alphavms.h
2049
2050 2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>
2051
2052         * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
2053         * bfd-in2.h: Regenerated.
2054
2055         * elflink.c (bfd_elf_set_symbol): New.
2056         (_bfd_elf_provide_symbol): Call it.
2057         (_bfd_elf_provide_section_bound_symbols): New.
2058
2059 2005-05-04  H.J. Lu  <hongjiu.lu@intel.com>
2060
2061         * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
2062         at the end, if a strong definition has already been seen.
2063
2064 2005-05-04  Alan Modra  <amodra@bigpond.net.au>
2065
2066         * section.c (struct bfd_section): Replace link_order_head and
2067         link_order_tail with map_head and map_tail union.
2068         (STD_SECTION): Update.
2069         (_bfd_strip_section_from_output): Delete.
2070         * aoutx.h: Update throughout for above changes.
2071         * coff-ppc.c: Likewise.
2072         * cofflink.c: Likewise.
2073         * ecoff.c: Likewise.
2074         * elf-eh-frame.c: Likewise.
2075         * elf-m10300.c: Likewise.
2076         * elf.c: Likewise.
2077         * elf32-arm.c: Likewise.
2078         * elf32-cris.c: Likewise.
2079         * elf32-hppa.c: Likewise.
2080         * elf32-i386.c: Likewise.
2081         * elf32-m32r.c: Likewise.
2082         * elf32-m68hc1x.c: Likewise.
2083         * elf32-m68k.c: Likewise.
2084         * elf32-ppc.c: Likewise.
2085         * elf32-s390.c: Likewise.
2086         * elf32-sh.c: Likewise.
2087         * elf32-vax.c: Likewise.
2088         * elf32-xtensa.c: Likewise.
2089         * elf64-alpha.c: Likewise.
2090         * elf64-hppa.c: Likewise.
2091         * elf64-ppc.c: Likewise.
2092         * elf64-s390.c: Likewise.
2093         * elf64-sh64.c: Likewise.
2094         * elf64-x86-64.c: Likewise.
2095         * elflink.c: Likewise.
2096         * elfxx-ia64.c: Likewise.
2097         * elfxx-mips.c: Likewise.
2098         * elfxx-sparc.c: Likewise.
2099         * linker.c: Likewise.
2100         * merge.c: Likewise.
2101         * pdp11.c: Likewise.
2102         * xcofflink.c: Likewise.
2103         * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
2104         out from bfd_elf_size_dynamic_sections.
2105         * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
2106         * bfd-in2.h: Regenerate.
2107
2108 2005-05-04  Alan Modra  <amodra@bigpond.net.au>
2109
2110         * section.c (bfd_section_list_remove): Don't clear s->next.
2111         (bfd_section_list_append): Always init s->prev.
2112         (bfd_section_list_prepend): Define.
2113         (bfd_section_list_insert_after): Minor optimization.
2114         (bfd_section_removed_from_list): Rewrite.
2115         * elf.c (assign_section_numbers): Simplify list traversal now that
2116         bfd_section_list_remove doesn't destroy removed section next ptr.
2117         * sunos.c (sunos_add_dynamic_symbols): Likewise.
2118         * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
2119         * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
2120         * bfd-in2.h: Regenerate.
2121
2122 2005-05-02  H.J. Lu  <hongjiu.lu@intel.com>
2123
2124         * bfd.c (bfd): Remove section_tail and add section_last.
2125         (bfd_preserve): Likewise.
2126         (bfd_preserve_save): Likewise.
2127         (bfd_preserve_restore): Likewise.
2128         * opncls.c (_bfd_new_bfd): Likewise.
2129
2130         * coffcode.h (coff_compute_section_file_positions): Updated.
2131         (coff_compute_section_file_positions): Likewise.
2132         * elf.c (assign_section_numbers): Likewise.
2133         * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
2134         * elf64-mmix.c (mmix_elf_final_link): Likewise.
2135         * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
2136         * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
2137         * sunos.c (sunos_add_dynamic_symbols): Likewise.
2138         * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
2139
2140         * ecoff.c (bfd_debug_section): Initialize prev.
2141
2142         * section.c (bfd_section): Add prev.
2143         (bfd_section_list_remove): Updated.
2144         (bfd_section_list_append): New.
2145         (bfd_section_list_insert_after): New.
2146         (bfd_section_list_insert_before): New.
2147         (bfd_section_list_insert): Removed.
2148         (bfd_section_removed_from_list): Updated.
2149         (STD_SECTION): Initialize prev.
2150         (bfd_section_init): Updated.
2151         (bfd_section_list_clear): Updated.
2152
2153         * bfd-in2.h: Regenerated.
2154
2155 2005-05-02  H.J. Lu  <hongjiu.lu@intel.com>
2156
2157         * elf.c (_bfd_elf_new_section_hook): Don't call
2158         _bfd_elf_get_sec_type_attr on sections from input files.
2159
2160 2005-05-02  H.J. Lu  <hongjiu.lu@intel.com>
2161
2162         * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
2163         hash table size 16699 instead of bfd_hash_table_init.
2164
2165 2005-05-01  Paul Brook  <paul@codesourcery.com>
2166
2167         * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
2168         definition has already been seen.
2169
2170 2005-05-01  Paul Brook  <paul@codesourcery.com>
2171
2172         * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
2173         R_ARM_PLT32 the same as R_ARM_PC24.
2174         (arm_add_to_rel): Ditto.
2175
2176 2005-04-29  Ralf Corsepius <ralf.corsepius@rtems.org>
2177
2178         * config.bfd: Add h8300*-*-rtemscoff.
2179         Switch h8300*-*-rtems* to elf.
2180
2181 2005-04-29  Daniel Jacobowitz  <dan@codesourcery.com>
2182
2183         * aclocal.m4, Makefile.in: Regnerated.
2184
2185 2005-04-28  Paul Brook  <paul@codesourcery.com>
2186
2187         Merge changes only applied to Makefile.in.
2188         * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
2189         (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2190         (elfxx-sparc.lo): New rule.
2191         (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2192         (elf64-sparc.lo): Likewise.
2193
2194 2005-04-28  Julian Brown  <julian@codesourcery.com>
2195
2196         * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
2197         import.
2198
2199 2005-04-27  H.J. Lu  <hongjiu.lu@intel.com>
2200
2201         * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
2202
2203         * elf.c (bfd_elf_sym_name): Updated.
2204         (group_signature): Likewise.
2205         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2206         * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
2207         (ppc64_elf_edit_toc): Likewise.
2208         (ppc64_elf_relocate_section): Likewise.
2209         * elfcode.h (elf_slurp_symbol_table): Likewise.
2210         * elflink.c (elf_link_input_bfd): Likewise.
2211
2212         * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
2213         bfd_elf_sym_name to get local symbol name when reporting errors.
2214
2215 2005-04-27  Nick Clifton  <nickc@redhat.com>
2216
2217         * elflink.c (elf_link_input_bfd): Handle the case where a badly
2218         formatted input file results in a reloc which has no associated
2219         global symbol.
2220
2221 2005-04-26  Jerome Guitton  <guitton@gnat.com>
2222
2223         * bfd.m4 (BFD_NEED_DECLARATION): Restore.
2224
2225 2005-04-25  David S. Miller  <davem@davemloft.net>
2226
2227         * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
2228         (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
2229         sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
2230         Likewise.
2231
2232 2005-04-25  H.J. Lu  <hongjiu.lu@intel.com>
2233
2234         PR 858
2235         * elflink.c (elf_link_input_bfd): Make non-debugging reference
2236         to discarded section an error.
2237
2238 2005-04-21  Jerome Guitton  <guitton@gnat.com>
2239
2240         * configure.in: Replace BFD_NEED_DECLARATION checks by the
2241         corresponding AC_CHECK_DECLS.
2242         * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
2243         HAVE_DECL_*.
2244         * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
2245         * configure: Regenerate.
2246         * config.in: Ditto.
2247
2248 2005-04-21  Andreas Schwab  <schwab@suse.de>
2249
2250         * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
2251         unsigned from type of dynamic_interpreter.
2252         * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
2253         casts again.
2254
2255         * elf.c (assign_section_numbers): Fix comment.
2256
2257 2005-04-21  Jerome Guitton  <guitton@gnat.com>
2258
2259         * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
2260         for struct som_exec_auxhdr fields.
2261
2262 2005-04-21  Nick Clifton  <nickc@redhat.com>
2263
2264         * aout-adobe.c: Convert to ISO C and fix formatting.
2265         * aout-arm.c: Convert to ISO C and fix formatting.
2266         * aout-cris.c: Convert to ISO C and fix formatting.
2267         * aout-ns32k.c: Convert to ISO C and fix formatting.
2268         * aout-tic30.c: Convert to ISO C and fix formatting.
2269         * coffcode.h: Convert to ISO C and fix formatting.
2270         * coffswap.h: Convert to ISO C and fix formatting.
2271         * i386aout.c: Convert to ISO C and fix formatting.
2272         * libaout.h: Convert to ISO C and fix formatting.
2273         * libcoff-in.h: Convert to ISO C and fix formatting.
2274         * libcoff.h: Convert to ISO C and fix formatting.
2275         * libecoff.h: Convert to ISO C and fix formatting.
2276         * libnlm.h: Convert to ISO C and fix formatting.
2277         * libpei.h: Convert to ISO C and fix formatting.
2278         * libxcoff.h: Convert to ISO C and fix formatting.
2279         * nlm-target.h: Convert to ISO C and fix formatting.
2280         * nlm.c: Convert to ISO C and fix formatting.
2281         * nlm32-alpha.c: Convert to ISO C and fix formatting.
2282         * nlm32-i386.c: Convert to ISO C and fix formatting.
2283         * nlm32-ppc.c: Convert to ISO C and fix formatting.
2284         * nlm32-sparc.c: Convert to ISO C and fix formatting.
2285         * nlmcode.h: Convert to ISO C and fix formatting.
2286         * nlmswap.h: Convert to ISO C and fix formatting.
2287         * pe-mips.c: Convert to ISO C and fix formatting.
2288         * peXXigen.c: Convert to ISO C and fix formatting.
2289         * peicode.h: Convert to ISO C and fix formatting.
2290         * vms-gsd.c: Convert to ISO C and fix formatting.
2291         * vms-hdr.c: Convert to ISO C and fix formatting.
2292         * vms-misc.c: Convert to ISO C and fix formatting.
2293         * vms-tir.c: Convert to ISO C and fix formatting.
2294         * vms.c: Convert to ISO C and fix formatting.
2295         * vms.h: Convert to ISO C and fix formatting.
2296
2297         * coffgen.c (coff_print_symbol): Restore correct formatting of
2298         output.
2299
2300 2005-04-20  David S. Miller  <davem@davemloft.net>
2301
2302         * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
2303         (_bfd_sparc_elf_link_hash_table_create): Likewise.
2304         (allocate_dynrelocs): Likewise.
2305
2306 2005-04-20  Jerome Guitton  <guitton@gnat.com>
2307
2308         * configure.in: Fix the check for basename declaration. Add check
2309         for declarations of ftello, ftello64, fseeko, fseeko64.
2310         * configure: Regenerate.
2311         * config.in: Ditto.
2312         * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
2313
2314 2005-04-19  David S. Miller  <davem@davemloft.net>
2315
2316         * elfxx-sparc.c: New file.
2317         * elfxx-sparc.h: New file.
2318         * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
2319         (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
2320         (elfxx-sparc.lo): New rule.
2321         (elf32-sparc.lo): Add elfxx-sparc.h dependency.
2322         (elf64-sparc.lo): Likewise.
2323         * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
2324         (bfd_elf64_sparc_vec): Likewise.
2325         * configure: Regenerate.
2326         * elf32-sparc.c: Remove common code now in elfxx-sparc.c
2327         * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
2328         which is more consistent with elf32-sparc.c
2329
2330 2005-04-19  Daniel Jacobowitz  <dan@codesourcery.com>
2331
2332         * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
2333         (mips_elf_create_local_got_entry): Check h->root.forced_local.
2334
2335 2005-04-19  Alan Modra  <amodra@bigpond.net.au>
2336
2337         * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
2338         dynamic relocs in non-SEC_ALLOC sections.
2339         (ppc_elf_gc_sweep_hook): Likewise.
2340         (ppc_elf_relax_section): Likewise.
2341         (ppc_elf_relocate_section): Likewise.
2342
2343 2005-04-18  Nick Clifton  <nickc@redhat.com>
2344
2345         * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
2346         assigning a value to return_value.
2347
2348 2005-04-17  H.J. Lu  <hongjiu.lu@intel.com>
2349
2350         PR 855
2351         * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
2352         created group data.
2353
2354 2005-04-17  H.J. Lu  <hongjiu.lu@intel.com>
2355
2356         PR 855
2357         * elf.c (setup_group): Properly handle zero group count.
2358
2359 2005-04-17  Mark Kettenis  <kettenis@gnu.org>
2360
2361         * som.c (hppa_som_reloc, som_mkobject, som_is_space)
2362         (som_is_subspace, compare_subspaces, som_compute_checksum)
2363         (som_build_and_write_symbol_table, som_slurp_symbol_table): New
2364         protoypes.
2365         (hppa_som_reloc, compare_syms, compare_subspaces)
2366         (som_print_symbol, som_get_section_contents)
2367         (som_set_section_contents): Remove space after 'void *'.
2368         (som_bfd_print_private_bfd_data): Use %lx to print longs.
2369         (som_bfd_merge_private_bfd_data)
2370         (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
2371         defines.
2372
2373 2004-04-15  Julian Brown  <julian@codesourcery.com>
2374
2375         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2376         * bfd-in2.h: Regenerate.
2377         * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
2378         (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
2379         (bfd_elf32_arm_set_target_relocs): Handle use_blx.
2380         (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
2381         relocations if requested to.
2382         (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
2383         use_blx rather than symbian_p.
2384         (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
2385         use_blx is in effect.
2386         (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
2387         for SymbianOS.
2388
2389 2005-04-15  Nick Clifton  <nickc@redhat.com>
2390
2391         * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
2392         values.
2393
2394 2005-04-15  Alan Modra  <amodra@bigpond.net.au>
2395
2396         PR ld/815
2397         * elflink.c (elf_smash_syms): Clear undef.next if it's not being
2398         used as a list pointer.
2399
2400 2005-04-14  Alan Modra  <amodra@bigpond.net.au>
2401
2402         * Makefile.am (NO_WERROR): Define.
2403         * warning.m4: New file
2404         * acinclude.m4: Include warning.m4.
2405         * configure.in: Invoke AM_BINUTILS_WARNINGS.
2406         * Makefile.in: Regenerate.
2407         * configure: Regenerate.
2408
2409 2005-04-14  Alan Modra  <amodra@bigpond.net.au>
2410
2411         * merge.c (sec_merge_emit): Tidy.  Check for bfd_zmalloc errors.
2412         Write trailing padding.
2413
2414         * merge.c (merge_strings): Round up section size for alignment.
2415
2416 2005-04-14  David S. Miller  <davem@davemloft.net>
2417
2418         Add TLS support for 64-bit Sparc ELF.
2419         *  elf64-sparc.c (sparc64_elf_dyn_relocs,
2420         sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
2421         (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
2422         sparc64_elf_hash_entry, sparc64_elf_tdata,
2423         sparc64_elf_local_got_tls_type): New defines.
2424         (sparc64_elf_mkobject): New function.
2425         (sparc64_elf_link_hash_table): Add members for dynamic linker
2426         sections PLT, RELPLT, DYNBSS, and RELBSS.  Add tls_ldm_got
2427         uion to track TLS GOT references.  Add sym_sec to cache
2428         mappings from local sym to section.
2429         (link_hash_newfunc): New function.
2430         (sparc64_elf_bfd_link_hash_table_create): Rename to
2431         sparc64_elf_link_hash_table_create for consistency.
2432         Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
2433         (sparc64_elf_create_dynamic_sections): Initialize new section
2434         members of sparc64_elf_link_hash_table.  Only init srelbss
2435         if not-shared.
2436         (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
2437         New functions.
2438         (SPARC_NOP): Define.
2439         (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
2440         sparc64_elf_plt_ptr_offset): Delete.
2441         (sparc64_plt_entry_build): New function to build PLT entries
2442         gradually instread of all at once at the end of linking.
2443         (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
2444         local vars.  Get them from sparc64_elf_hash_table instead.
2445         Check early on if r_symndx is in bounds.  Handle TLS transitions.
2446         Account for TLS GOT references and DF_STATIC_TLS, as needed.
2447         For TLS relocs, record the tls_type in either
2448         sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
2449         appropriate.  For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
2450         to the __tls_get_addr symbol.  For PLT relocs, track references
2451         via h->plt.refcount.  When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
2452         PC_LM22} and h not-NULL, set h->non_got_ref.  For global data
2453         symbol references, count the number of relocations needed for
2454         that symbol.  For default switch case, don't error, this lets
2455         the TLS relocs not explicitly handled by this function get
2456         accepted.
2457         (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
2458         (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
2459         it from sparc64_elf_hash_table.  Store the real PLT offset
2460         in h->plt.offset, and build PLT entries one at a time.  Also
2461         get .dynbss section pointer from htab.
2462         (allocate_dynrelocs, readonly_dynrelocs,
2463         sparc64_omit_section_dynsym): New functions.
2464         (sparc64_elf_omit_section_dynsym): Use these new functions as
2465         helpers.
2466         (dtpoff_base, tpoff): New functions.
2467         (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
2468         locals, get them from sparc64_elf_hash_table.  Handle TLS
2469         relocations and refcounting in main relocation loop.
2470         (sparc64_elf_finish_dynamic_symbol): Use
2471         sparc64_elf_link_hash_table.  Build PLT entries as we see
2472         them.  Handle TLS GOT relocations.
2473         (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
2474         from sparc64_elf_hash_table.  Initialize only PLT header
2475         not all entries since we not build PLT entries one by one.
2476         (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
2477         elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
2478         elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
2479
2480 2005-04-13  Daniel Jacobowitz  <dan@codesourcery.com>
2481
2482         * elflink.c (elf_link_input_bfd): Update check for removed
2483         sections.
2484
2485 2005-04-12  Alan Modra  <amodra@bigpond.net.au>
2486
2487         * Makefile.am: Run "make dep-am".
2488         * Makefile.in: Regenerate.
2489         * aclocal.m4: Regenerate.
2490         * libcoff.h: Regenerate.
2491
2492 2005-04-11  H.J. Lu  <hongjiu.lu@intel.com>
2493
2494         * linker.c (_bfd_generic_link_output_symbols): Also check if
2495         the output section of an input section has been removed from
2496         the output file.
2497
2498         * section.c (bfd_section_list_remove): Clear the next field
2499         of the removed section.
2500         (bfd_section_removed_from_list): New.
2501         * bfd-in2.h: Regenerated.
2502
2503 2005-04-11  David S. Miller  <davem@davemloft.net>
2504
2505         * elf32-sparc.c (elf32_sparc_relocate_section,
2506         R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
2507         R_SPARC_TLS_LE_{HIX22,LOX10}.
2508         (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
2509         xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
2510         (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
2511         or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
2512
2513 2005-04-11  H.J. Lu  <hongjiu.lu@intel.com>
2514
2515         * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
2516
2517 2005-04-11  Nick Clifton  <nickc@redhat.com>
2518
2519         * aout-target.h:  Convert to ISO C.
2520         * aoutf1.h:  Convert to ISO C.
2521         * aoutx.h:  Convert to ISO C.
2522         * bout.c:  Convert to ISO C.
2523         * dwarf1.c:  Convert to ISO C.
2524         * ecoffswap.h:  Convert to ISO C.
2525         * freebsd.h:  Convert to ISO C.
2526         * genlink.h:  Convert to ISO C.
2527         * ieee.c:  Convert to ISO C.
2528         * ihex.c:  Convert to ISO C.
2529         * libcoff-in.h:  Convert to ISO C.
2530         * mach-o.c:  Convert to ISO C.
2531         * mach-o.h:  Convert to ISO C.
2532         * netbsd.h:  Convert to ISO C.
2533         * ns32k.h:  Convert to ISO C.
2534         * ns32knetbsd.c:  Convert to ISO C.
2535         * oasys.c:  Convert to ISO C.
2536         * pdp11.c:  Convert to ISO C.
2537         * pef-traceback.h:  Convert to ISO C.
2538         * pef.c:  Convert to ISO C.
2539         * pef.h:  Convert to ISO C.
2540         * riscix.c:  Convert to ISO C.
2541         * som.c:  Convert to ISO C.
2542         * som.h:  Convert to ISO C.
2543         * srec.c:  Convert to ISO C.
2544         * stabs.c:  Convert to ISO C.
2545         * sunos.c:  Convert to ISO C.
2546         * tekhex.c:  Convert to ISO C.
2547         * versados.c:  Convert to ISO C.
2548         * version.h:  Convert to ISO C.
2549         * xcoff-target.h:  Convert to ISO C.
2550         * xcofflink.c:  Convert to ISO C.
2551         * xsym.c:  Convert to ISO C.
2552         * xsym.h:  Convert to ISO C.
2553
2554 2005-04-08  Paul Brook  <paul@codesourcery.com>
2555
2556         * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
2557         (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
2558         (ARM2THUMB_PIC_GLUE_SIZE): Define.
2559         (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
2560         (elf32_arm_to_thumb_stub): Create PIC stubs.
2561         (record_arm_to_thumb_glue): Use different stub size for relocatable
2562         images.
2563
2564 2005-04-05  Alan Modra  <amodra@bigpond.net.au>
2565
2566         * elf64-ppc.c (dec_dynrel_count): New function split out from
2567         ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
2568         (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
2569         (ppc64_elf_tls_optimize): Likewise.
2570
2571 2005-04-05  Mark Kettenis  <kettenis@gnu.org>
2572
2573         * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
2574         CORE_WCOOKIE_OFFSET.
2575         (SPARC64_WCOOKIE_OFFSET): New.
2576         (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
2577
2578 2005-04-05  Nick Clifton  <nickc@redhat.com>
2579
2580         * po/rw.po: New translation: Kinyarwanda
2581         * configure.in (ALL_LINGUAS): Add rw
2582         * configure: Regenerate.
2583
2584 2005-04-05  Richard Sandiford  <rsandifo@redhat.com>
2585
2586         * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
2587         (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
2588         SHT_MIPS_OPTIONS names.  Allow all sections with unrecognised
2589         section flags.
2590         (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
2591         to check for SHT_MIPS_OPTIONS sections.
2592         (_bfd_mips_elf_set_section_contents): Likewise.
2593
2594 2005-04-04  Eric Christopher  <echristo@redhat.com>
2595
2596         * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
2597         Clean up gp handling code.
2598
2599 2005-04-04  H.J. Lu  <hongjiu.lu@intel.com>
2600
2601         * elf.c (bfd_elf_set_group_contents): Ignore linker created
2602         group section.
2603         (assign_section_numbers): Accept link_info. Check SHT_GROUP
2604         sections for relocatable files only. Remove the linker created
2605         group sections.
2606         (_bfd_elf_compute_section_file_positions): Pass link_info to
2607         assign_section_numbers.
2608
2609         * elfxx-ia64.c (elfNN_ia64_object_p): New.
2610         (elf_backend_object_p): Defined.
2611
2612 2005-04-04  H.J. Lu  <hongjiu.lu@intel.com>
2613
2614         * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
2615
2616 2005-04-03  Fred Fish  <fnf@specifixinc.com>
2617
2618         * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
2619         dwarf_ranges_size members.
2620         (struct comp_unit): Add base_address member.
2621         (struct funcinfo): Replace low/high members with an arange.
2622         (arange_add): Replace incoming "unit" parameter with "abfd" and
2623         "first_arange" pointers.  Reorganize/rewrite function body.
2624         (decode_line_info): Change arange_add call to pass bfd and arange
2625         pointers.
2626         (lookup_address_in_line_info_table): Use arange list instead of
2627         individual low/high members.  Walk function's arange list to find
2628         lowest PC in list, to test for overlapping functions.
2629         (read_debug_ranges): New function, reads the debug_ranges section.
2630         (lookup_address_in_function_table): Use arange list instead of
2631         individual low/high members.  Rewrite to find smallest range that
2632         matches.
2633         (read_rangelist): Read a given rangelist from debug_ranges.
2634         (scan_unit_for_functions): Use arange list instead of individual
2635         low/high members.  Handle a DW_AT_ranges attribute.
2636         (parse_comp_unit): Use arange list instead of individual low/high
2637         members.  Save comp unit base address.  Handle a DW_AT_ranges
2638         attribute.
2639
2640 2005-04-01  H.J. Lu  <hongjiu.lu@intel.com>
2641
2642         * elf.c (assign_section_numbers): Really use the kept section.
2643
2644 2005-03-31  H.J. Lu  <hongjiu.lu@intel.com>
2645
2646         * elf-bfd.h (_bfd_elf_check_kept_section): New.
2647
2648         * elf.c (assign_section_numbers): When sh_link points to a
2649         discarded section, call _bfd_elf_check_kept_section to see if
2650         the kept section can be used. Otherwise reject sh_link
2651         pointing to discarded section.
2652
2653         * elflink.c (_bfd_elf_check_kept_section): New.
2654         (elf_link_input_bfd): Use it.
2655
2656 2005-04-01  Alan Modra  <amodra@bigpond.net.au>
2657
2658         * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
2659         that we no longer need.
2660
2661 2005-04-01  Alan Modra  <amodra@bigpond.net.au>
2662
2663         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
2664         rather than 0.
2665         (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
2666
2667 2005-03-31  H.J. Lu  <hongjiu.lu@intel.com>
2668
2669         * elf.c (assign_section_numbers): Fix a typo.
2670
2671 2005-03-31  H.J. Lu  <hongjiu.lu@intel.com>
2672
2673         * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
2674         error message.
2675         (_bfd_elf_section_already_linked): Likewise.
2676
2677 2005-03-31  Jerome Guitton  <guitton@gnat.com>
2678
2679         * config.in: Regenerate.
2680
2681 2005-03-31  Jerome Guitton  <guitton@gnat.com>
2682
2683         * config.in (HAVE_DECL_BASENAME): New configure macro.
2684         * configure.in: Check for basename.
2685         * configure: Regenerate.
2686
2687 2005-03-30  Julian Brown  <julian@codesourcery.com>
2688
2689         * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
2690         bfd_elf32_is_arm_mapping_symbol_name.
2691         * bfd-in2.h: Regenerate.
2692         * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
2693         bfd_elf32_is_arm_mapping_symbol_name.
2694         * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
2695         bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
2696         (arm_elf_find_function): Likewise.
2697         (elf32_arm_output_symbol_hook): Likewise.
2698
2699 2005-03-30  Julian Brown  <julian@codesourcery.com>
2700
2701         * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
2702         * bfd-in2.h: Regenerate.
2703         * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
2704         bfd_elf32_is_arm_mapping_symbol_name.
2705         (elf32_arm_output_symbol_hook): Likewise.
2706         (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
2707         mapping symbols.
2708         (is_arm_mapping_symbol_name): Function moved from here...
2709         * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
2710         and made global.
2711
2712 2005-03-29  Aaron W. LaFramboise  <aaron98wiridge9@aaronwl.com>
2713
2714         * configure.in: Check for ffs decl and alphabetize.
2715         * config.in: Regenerate.
2716         * configure: Regenerate.
2717         * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
2718
2719 2005-03-29  Fred Fish  <fnf@specifixinc.com>
2720
2721         * dwarf2.c (struct comp_unit): Fix typo.
2722         (scan_unit_for_functions): Remove unused local variable "name"
2723         and dead code that set it.
2724
2725 2005-03-29  Daniel Jacobowitz  <dan@codesourcery.com>
2726             Phil Blundell  <philb@gnu.org>
2727
2728         * bfd-in2.h, libbfd.h: Regenerated.
2729         * reloc.c: Add ARM TLS relocations.
2730         * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
2731         relocations.
2732         (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
2733         (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
2734         (elf32_arm_tls_ie32_howto): New.
2735         (elf32_arm_howto_from_type): Support TLS relocations.
2736         (elf32_arm_reloc_map): Likewise.
2737         (elf32_arm_reloc_type_lookup): Likewise.
2738         (TCB_SIZE): Define.
2739         (struct elf32_arm_obj_tdata): New.
2740         (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
2741         (elf32_arm_mkobject): New function.
2742         (struct elf32_arm_relocs_copied): Add pc_count.
2743         (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
2744         (GOT_TLS_IE): Define.
2745         (struct elf32_arm_link_hash_table): Add tls_ldm_got.
2746         (elf32_arm_link_hash_newfunc): Initialize tls_type.
2747         (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
2748         (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
2749         (dtpoff_base, tpoff): New functions.
2750         (elf32_arm_final_link_relocate): Handle TLS relocations.
2751         (IS_ARM_TLS_RELOC): Define.
2752         (elf32_arm_relocate_section): Warn about TLS mismatches.
2753         (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
2754         (elf32_arm_check_relocs): Detect invalid symbol indexes.  Handle
2755         TLS relocations and pc_count.
2756         (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
2757         (allocate_dynrelocs): Handle TLS.  Bind REL32 relocs to local
2758         calls.
2759         (elf32_arm_size_dynamic_sections): Handle TLS.
2760         (elf32_arm_finish_dynamic_symbol): Likewise.
2761         (bfd_elf32_mkobject): Define.
2762
2763 2005-03-29  Daniel Jacobowitz  <dan@codesourcery.com>
2764
2765         * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
2766         relocation types.  Don't count relocations which will use a PLT.
2767
2768 2005-03-29  Joel Brobecker  <brobecker@gnat.com>
2769
2770         * elf.c (elfcore_grok_nto_status): Print tid as long.
2771         (elfcore_grok_nto_regs): Likewise.
2772
2773 2005-03-29  Joel Brobecker  <brobecker@gnat.com>
2774
2775         * irix-core.c: Remove some unnecessary prototypes.
2776
2777 2005-03-28  Joel Brobecker  <brobecker@adacore.com>
2778
2779         * irix-core.c: Convert to ISO C.
2780
2781 2005-03-28  Joel Brobecker  <brobecker@adacore.com>
2782
2783         * irix-core.c (do_sections): Replace + by | in expression.
2784         (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
2785         to unused parameters to avoid a compiler warning.
2786
2787 2005-03-28  Mark Kettenis  <kettenis@gnu.org>
2788
2789         * netbsd-core.c: Convert to ISO C.  Fix formatting.
2790
2791 2005-03-24  Eric Christopher  <echristo@redhat.com>
2792
2793         * elfxx-mips.c: Revert previous patch.
2794
2795 2005-03-24  Nick Clifton  <nickc@redhat.com>
2796
2797         * targets.c (_bfd_target_vector): Only include the
2798         bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
2799         all targets enabled.
2800
2801 2005-03-24  James E Wilson  <wilson@specifixinc.com>
2802
2803         * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
2804         (BFD64_BACKENDS): Add elf32-ia64.lo.
2805         * Makefile.in: Regenerate.
2806
2807 2005-03-23  Eric Christopher  <echristo@redhat.com>
2808
2809         * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
2810         (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
2811         after emitting relocation.
2812         (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
2813         (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
2814         and readonly_reloc.
2815
2816 2005-03-23  Mike Frysinger  <vapier@gentoo.org>
2817             Nick Clifton  <nickc@redhat.com>
2818
2819         * config.bfd: Accept any C library to accompany a GNU Linux
2820         implementation, not just the GNU C library.
2821         * configure.in: Likewise.
2822         * configure: Regenerate.
2823
2824 2005-03-22  H.J. Lu  <hongjiu.lu@intel.com>
2825
2826         * bfd-in.h (_bfd_elf_provide_symbol): New.
2827         * bfd-in2.h: Regenerated.
2828
2829         * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
2830         (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
2831         of set_linker_sym.
2832
2833         * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
2834         from elf32-ppc.c.
2835
2836 2005-03-22  Hans-Peter Nilsson  <hp@axis.com>
2837
2838         * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
2839
2840 2005-03-22  Bob Wilson  <bob.wilson@acm.org>
2841
2842         * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
2843         xtensa_sysreg_lookup_name, xtensa_interface_lookup,
2844         xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
2845         (xtensa_opcode_decode): Rearrange code.
2846
2847 2005-03-22  Nick Clifton  <nickc@redhat.com>
2848
2849         * binary.c: Convert to ISO C90 formatting.
2850         * coff-arm.c: Convert to ISO C90 formatting.
2851         * coffgen.c: Convert to ISO C90 formatting.
2852         * elf32-gen.c: Convert to ISO C90 formatting.
2853         * elf64-gen.c: Convert to ISO C90 formatting.
2854         * hash.c: Convert to ISO C90 formatting.
2855         * ieee.c: Convert to ISO C90 formatting.
2856
2857 2005-03-22  Daniel Jacobowitz  <dan@codesourcery.com>
2858
2859         * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
2860         unresolved symbols in R_ARM_NONE relocations.
2861
2862 2005-03-22  Daniel Jacobowitz  <dan@codesourcery.com>
2863
2864         * elf32-arm.c (elf32_arm_final_link_relocate): Add
2865         UNRESOLVED_RELOC_P argument.  Set it appropriately.
2866         (elf32_arm_relocate_section): Update call to
2867         elf32_arm_final_link_relocate.  Don't clobber RELOCATION; use
2868         unresolved_reloc instead.
2869
2870 2005-03-23  Alan Modra  <amodra@bigpond.net.au>
2871
2872         * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
2873         .gnu.warning.* sections.
2874
2875 2005-03-22  Alan Modra  <amodra@bigpond.net.au>
2876
2877         * elf32-ppc.c (elf_linker_section_pointers_t): Remove
2878         written_address_p.
2879         (ppc_elf_create_linker_section): Don't try to reuse existing section.
2880         (elf_create_pointer_linker_section): Delete info parm.  Don't make
2881         h dynamic.  Don't set written_address_p.
2882         (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
2883         (bfd_put_ptr): Delete.
2884         (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
2885         Always write section contents.  Assert global sym is def_regular.
2886         Use offset bottom bit as a written flag.
2887         (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
2888         calls.
2889
2890 2005-03-22  Alan Modra  <amodra@bigpond.net.au>
2891
2892         * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
2893         (ppc_elf_set_sdata_syms): ..here.  Expand comment.  Set .sbss start
2894         and end syms.
2895
2896 2005-03-21  Nick Clifton  <nickc@redhat.com>
2897
2898         * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
2899         targets.
2900         (t2a1_bx_pc_insn): Likewise.
2901         (t2a2_noop_insn): Likewise.
2902         (t2a3_b_insn): Likewise.
2903         (t2a1_push_insn): Likewise.
2904         (t2a2_ldr_insn): Likewise.
2905         (t2a3_mov_insn): Likewise.
2906         (t2a4_bx_insn): Likewise.
2907         (t2a5_pop_insn): Likewise.
2908         (t2a6_bx_insn): Likewise.
2909         (coff_arm_relocate_section): Only declare the high_address
2910         variable for non WINCE targets.
2911
2912 2005-03-22  Alan Modra  <amodra@bigpond.net.au>
2913
2914         * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
2915         SEC_LINKER_CREATED.  Attach to dynobj.
2916         (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
2917
2918 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
2919
2920         * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
2921         sym_offset.  Add name, bss_name, sym_name, sym_val.
2922         (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
2923         Add sdata array of elf_linker_section_t.
2924         (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
2925         (enum elf_linker_section_enum): Delete.
2926         (ppc_elf_create_linker_section): Rewrite.  Don't create syms here.
2927         (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
2928         the special sections are needed.  Adjust htab->sdata refs.
2929         Ensure dynobj is set in sreloc code.
2930         (ppc_elf_size_dynamic_sections): Strip sdata sections.
2931         (ppc_elf_set_sdata_syms): New function.
2932         (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
2933         (ppc_elf_relocate_section): Adjust references to htab->sdata.  Use
2934         sym_val instead of sym_hash.
2935         * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
2936
2937 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
2938
2939         * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
2940         (ppc_elf_merge_private_bfd_data): Likewise.
2941
2942 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
2943
2944         * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
2945         (ppc_elf_create_linker_section): Don't create rel_section.
2946         (elf_create_pointer_linker_section): Don't size relocs.
2947         (elf_finish_pointer_linker_section): Remove relative_reloc parm.
2948         Don't generate relocs.
2949         (ppc_elf_relocate_section): Adjust calls to
2950         elf_finish_pointer_linker_section.
2951
2952 2005-03-21  Alan Modra  <amodra@bigpond.net.au>
2953
2954         * elf32-ppc.c (is_ppc_elf_target): New function.
2955         (ppc_elf_merge_private_bfd_data): Use it rather than just testing
2956         for bfd_target_elf_flavour.  Do this test before endian check.
2957         (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
2958         (ppc_elf_size_dynamic_sections): Likewise.
2959
2960 2005-03-20  H.J. Lu  <hongjiu.lu@intel.com>
2961
2962         * elf-bfd.h (elf_backend_data): Add int to
2963         elf_backend_section_from_shdr.
2964         (bfd_elf_section_data): Update comment for this_idx.
2965         (_bfd_elf_make_section_from_shdr): Add int.
2966         * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2967
2968         * elf.c (_bfd_elf_make_section_from_shdr): Take section index
2969         and use it to set this_idx in bfd_elf_section_data.
2970         (bfd_section_from_shdr): Pass shindex to
2971         _bfd_elf_make_section_from_shdr.
2972         (_bfd_elf_section_from_bfd_section): Use this_idx in
2973         bfd_elf_section_data to find section index.
2974
2975         * elf32-arm.c (elf32_arm_section_from_shdr): Take section
2976         index and pass it to _bfd_elf_make_section_from_shdr.
2977         * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
2978         * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2979         * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2980         * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2981         * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2982         * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2983         * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
2984         * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2985         * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2986
2987 2005-03-19  Danny Smith <dannysmith@users.sourceforge.net>
2988             Ross Ridge  <rridge@csclub.uwaterloo.ca>
2989
2990         * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
2991         character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
2992         cases.  Add comment.
2993
2994 2005-03-18  H.J. Lu  <hongjiu.lu@intel.com>
2995
2996         * elflink.c (elf_mark_used_section): Remove check for special
2997         sections.
2998
2999 2005-03-18  Andreas Schwab  <schwab@suse.de>
3000
3001         * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
3002         from bfd_vma to ia64_insn, remove broken cast.
3003
3004 2005-03-18  C Jaiprakash  <cjaiprakash@noida.hcltech.com>
3005
3006         * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
3007         (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
3008          elf_m68k_finish_dynamic_sections): Use it.
3009
3010 2005-03-17  Paul Brook <paul@codesourcery.com>
3011             Dan Jacobowitz <dan@codesourcery.com>
3012             Mark Mitchell  <mark@codesourcery.com>
3013
3014         * elf32-arm.c (elf32_arm_modify_segment_map): New function.
3015         (elf32_arm_additional_program_headers): Likewise.
3016         (elf_backend_modify_segment_map): Define.
3017         (elf_backend_additional_program_headers): Likewise.
3018         (elf32_arm_symbian_modify_segment_map): Use
3019         elf32_arm_modify_segment_map.
3020
3021 2005-03-18  H.J. Lu  <hongjiu.lu@intel.com>
3022
3023         * elflink.c (elf_mark_used_section): Check bfd_is_const_section
3024         for special sections.
3025
3026 2005-03-18  Alan Modra  <amodra@bigpond.net.au>
3027
3028         * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
3029         * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
3030         section_sym_count param, and return number of section symbols.
3031         (bfd_elf_size_dynamic_sections): Clear section symbol area of
3032         .dynsym contents.  Don't bother calling swap_symbol_out on the
3033         first all-zero dynsym.
3034         (elf_mark_used_section): Formatting.  Avoid twiddling flags in
3035         special sections like bfd_abs_section.
3036         (bfd_elf_gc_sections): Spelling fix.
3037
3038 2005-03-16  Fred Fish  <fnf@specifixinc.com>
3039
3040         PR binutils/790
3041         * dwarf2.c (read_indirect_string): Fix apparent typo, check
3042         dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
3043
3044 2005-03-16  H.J. Lu  <hongjiu.lu@intel.com>
3045
3046         * elflink.c (elf_mark_used_section): New.
3047         (bfd_elf_gc_sections): Call elf_gc_mark_section for
3048         non-relocatable link if we don't do GC.
3049
3050 2005-03-16  Nick Clifton  <nickc@redhat.com>
3051             Ben Elliston  <bje@au.ibm.com>
3052
3053         * configure.in (werror): New switch: Add -Werror to the
3054         compiler command line.  Enabled by default.  Disable via
3055         --disable-werror.
3056         * configure: Regenerate.
3057
3058 2005-03-16  Nick Clifton  <nickc@redhat.com>
3059
3060         * ecoff.c: Convert to ISO C90 formatting.
3061
3062 2005-03-16  Alan Modra  <amodra@bigpond.net.au>
3063
3064         * elf32-ppc.c: Divide file into general and linker specific
3065         functions.  Sort linker functions into roughly the order in which
3066         they are called by the ELF linker code.
3067
3068 2005-03-16  Alan Modra  <amodra@bigpond.net.au>
3069
3070         * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
3071         on section.  Correct comment, and add FIXME.
3072         (ppc_elf_additional_program_headers): Don't bump header count for
3073         interp.  Test SEC_ALLOC, not SEC_LOAD, and don't test size.
3074         (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
3075         do allocate memory if they need it.
3076
3077 2005-03-15  Mikkel Krautz  <krautz@gmail.com>
3078
3079         * config.bfd (x86_64-elf): Add target.
3080
3081 2005-03-15  Alan Modra  <amodra@bigpond.net.au>
3082
3083         * po/es.po: Commit new Spanish translation.
3084
3085 2005-03-14  H.J. Lu  <hongjiu.lu@intel.com>
3086
3087         * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
3088         for global symbol when reporting overflow.
3089
3090 2005-03-11  Jakub Jelinek  <jakub@redhat.com>
3091
3092         * libbfd-in.h (_bfd_ar_spacepad): New prototype.
3093         * libbfd.h: Rebuilt.
3094         * archive.c (_bfd_ar_spacepad): New function.
3095         (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
3096         bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
3097         coff_write_armap): Use it.
3098         (bfd_ar_hdr_from_filesystem): Likewise.  Fix HP-UX large
3099         uid/gid support.
3100         * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
3101
3102 2005-03-10  Mark Kettenis  <kettenis@gnu.org>
3103
3104         * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
3105         has_table to the start of the function.
3106
3107 2005-03-10  Ben Elliston  <bje@au.ibm.com>
3108
3109         * archive.c: Include hashtab.h.
3110         (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
3111         (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
3112         (hash_file_ptr): New function.
3113         (eq_file_ptr): Likewise.
3114         (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
3115         * libbfd-in.h: Include hashtab.h.
3116         (struct artdata): Change `cache' member type to htab_t.
3117         * libbfd.h: Rebuild.
3118
3119 2005-03-08  Daniel Jacobowitz  <dan@codesourcery.com>
3120
3121         * configure.in: Bump version to 2.16.90.
3122         * configure: Regenerated.
3123
3124 2005-03-07  Jakub Jelinek  <jakub@redhat.com>
3125
3126         * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
3127         close is a function like macro in system headers.
3128
3129 2005-03-07  Alan Modra  <amodra@bigpond.net.au>
3130
3131         PR ld/778
3132         * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
3133         _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
3134
3135 2005-03-06  Alan Modra  <amodra@bigpond.net.au>
3136
3137         * elf.c (elfcore_grok_win32pstatus): Warning fixes.
3138
3139 2005-03-05  Alan Modra  <amodra@bigpond.net.au>
3140
3141         * po/bfd.pot: Regenerate.
3142
3143 2005-03-05  Alan Modra  <amodra@bigpond.net.au>
3144
3145         * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
3146         with is_func.
3147         (func_desc_adjust): Force dot-syms local in executables as well
3148         as shared libs.
3149
3150 2005-03-04  David Daney  <ddaney@avtrex.com>
3151
3152         * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
3153         '__gnu_local_gp' symbol used by gas -mno-shared.
3154
3155 2005-03-03  H.J. Lu  <hongjiu.lu@intel.com>
3156
3157         * elf-bfd.h (elf_backend_data): Add "const char *" to
3158         elf_backend_section_from_phdr.
3159
3160         * elf.c (bfd_section_from_phdr): Pass "proc" to the
3161         elf_backend_section_from_phdr hook.
3162
3163 2005-03-02  Daniel Jacobowitz  <dan@codesourcery.com>
3164             Joseph Myers  <joseph@codesourcery.com>
3165
3166         * elfxx-mips.c (struct mips_got_entry): Add tls_type.
3167         (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
3168         and tls_ldm_offset.
3169         (struct mips_elf_got_per_bfd_arg): Add global_count.
3170         (struct mips_elf_count_tls_arg): New.
3171         (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
3172         (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
3173         (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
3174         (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
3175         (TLS_RELOC_P): Define.
3176         (TP_OFFSET, DTP_OFFSET): Define.
3177         (dtprel_base, tprel_base): New functions.
3178         (mips_elf_link_hash_newfunc): Initialize tls_type.
3179         (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
3180         (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
3181         TLS entries.
3182         (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
3183         (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
3184         (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
3185         (mips_tls_got_index): New functions.
3186         (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
3187         arguments.  Pass them to mips_elf_create_local_got_entry.  Use
3188         mips_tls_got_index.
3189         (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
3190         Handle TLS entries.
3191         (mips_elf_got_page, mips_elf_got16_entry): Update calls to
3192         mips_elf_create_local_got_entry.
3193         (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
3194         arguments.  Handle TLS entries.
3195         (mips_elf_sort_hash_table_f): Add non-TLS assertions.
3196         (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument.  Handle
3197         TLS entries.
3198         (mips_elf_record_global_got_symbol): Likewise.
3199         (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
3200         Count TLS entries.
3201         (mips_elf_merge_gots): Handle TLS entries when merging.
3202         (mips_elf_initialize_tls_index): New function.
3203         (mips_elf_set_global_got_offset): Handle TLS entries.
3204         (mips_elf_adjust_gp): Handle TLS.
3205         (mips_elf_multi_got): Remove redundant call to
3206         mips_elf_resolve_final_got_entries.  Initialize global_count.
3207         Correct a comment.  Initialize new TLS members of mips_got_info.
3208         Assign TLS GOT indexes for new GOTs.
3209         (mips_elf_create_got_section): Initialize new TLS members of
3210         mips_got_info.
3211         (mips_elf_calculate_relocation): Handle TLS relocs.
3212         (_bfd_mips_elf_check_relocs): Likewise.  Update calls to changed
3213         functions.
3214         (_bfd_mips_elf_always_size_sections): Handle TLS.
3215         (_bfd_mips_elf_size_dynamic_sections): Likewise.
3216         (_bfd_mips_elf_finish_dynamic_symbol): Likewise.  Update calls to
3217         changed functions.
3218         (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
3219         (_bfd_mips_elf_hide_symbol): Handle TLS.
3220         * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
3221         (mips_reloc_map): Add TLS relocs.
3222         * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
3223         * elf64-mips.c (mips_elf64_howto_table_rel)
3224         (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
3225         * reloc.c: Define new MIPS TLS relocations.
3226         * libbfd.h, bfd-in2.h: Regenerated.
3227
3228 2005-03-02  Jan Beulich  <jbeulich@novell.com>
3229
3230         * Makefile.am: Add dependency of cache.o on libiberty.h.
3231         * cache.c: Include libiberty.h.
3232         (bfd_open_file): Use unlink_if_ordinary instead of unlink.
3233
3234 2005-03-01  Zack Weinberg  <zack@codesourcery.com>
3235
3236         * elf.c (bfd_section_from_shdr <default case>): Call
3237         elf_backend_section_from_shdr hook unconditionally, and return
3238         what it returns.
3239         (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
3240         * elfxx-target.h (elf_backend_section_from_shdr)
3241         (elf_backend_section_from_phdr): Default to
3242         _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
3243         respectively.
3244
3245 2005-03-01  Alan Modra  <amodra@bigpond.net.au>
3246
3247         * targets.h: Typo fix.
3248         * bfd-in2.h: Regenerate.
3249
3250         * bout.c (b_out_write_object_contents): Don't use sizeof on host
3251         structs to size on-disk structures.
3252         (b_out_set_section_contents): Size the external struct, not the
3253         internal one for on-disk size.
3254         (b_out_sizeof_headers): Likewise.
3255
3256 2005-03-01  Alan Modra  <amodra@bigpond.net.au>
3257
3258         * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
3259         entry points with the func descriptor as well as undefweak.
3260
3261 2005-02-28  Ross Ridge  <rridge@csclub.uwaterloo.ca>
3262
3263         * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
3264         present when IMPORT_NAME_UNDOECRATE is used.
3265
3266 2005-02-28  H.J. Lu  <hongjiu.lu@intel.com>
3267
3268         PR 757
3269         * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
3270         int.
3271
3272         * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
3273         to _bfd_elf_merge_symbol.
3274
3275         * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
3276         unsigned int to return the alignment of the old common symbol
3277         in the dynamic object.
3278         (_bfd_elf_add_default_symbol): Pass NULL to
3279         _bfd_elf_merge_symbol.
3280         (elf_link_add_object_symbols): Pass &old_alignment to
3281         _bfd_elf_merge_symbol. Get the alignment of the new common
3282         symbol in the dynamic object.
3283
3284 2005-02-24  Ben Elliston  <bje@au.ibm.com>
3285
3286         * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
3287         * format.c (bfd_check_format_matches): Likewise.
3288         * archive.c (BFD_GNU960_ARMAG): Likewise.
3289         (bfd_generic_archive_p): Likewise.
3290         (_bfd_write_archive_contents): Likewise.
3291
3292 2005-02-24  H.J. Lu  <hongjiu.lu@intel.com>
3293
3294         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
3295         * configure: Regenerate.
3296
3297 2005-02-24  Julian Brown  <julian@sirius.codesourcery.com>
3298
3299         * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
3300         COMDAT group sections to have default visibility.
3301
3302 2005-02-24  Alan Modra  <amodra@bigpond.net.au>
3303
3304         * coffcode.h (coff_print_aux): Warning fix.
3305         * elf-m10300.c (mn10300_elf_relax_section): Use section->id
3306         instead of section pointer to identify.
3307         * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.  Allocate
3308         the correct size buffer for local sym mangling too.
3309         (h8300_bfd_link_add_symbols): Likewise.
3310         * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
3311         warning.
3312         * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
3313         * elf32-xtensa.c (literal_value_hash): Warning fix.
3314         * versados.c (process_otr): Warning fix.
3315         (versados_canonicalize_reloc): Likewise.
3316         * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
3317         * vms.c (fill_section_ptr): Warning fix.
3318
3319 2005-02-23  H.J. Lu  <hongjiu.lu@intel.com>
3320
3321         * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
3322         * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
3323
3324 2005-02-23  Nick Clifton  <nickc@redhat.com>
3325
3326         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
3327         the relvaddr field of the Elf32_crinfo structure.
3328
3329         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
3330         variables that are passed by reference to
3331         m68hc11_get_relocation_value in case that function does not
3332         initialise them.
3333
3334         * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
3335         return statements and replace with a single return at the end of
3336         the function.  This helps pacify the flow analysis code in gcc 4.0.
3337
3338         * elf.c (_bfd_elf_compute_section_file_positions): Initialise
3339         strtab to avoid compile time warning.
3340
3341 2005-02-23  Ben Elliston  <bje@au.ibm.com>
3342
3343         * opncls.c (bfd_zalloc): Document this function.
3344
3345 2005-02-21  H.J. Lu  <hongjiu.lu@intel.com>
3346
3347         * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
3348         SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
3349         Replace SEC_SHARED with SEC_COFF_SHARED.
3350         (styp_to_sec_flags): Likewise.
3351
3352         * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
3353         (TARGET_LITTLE_SYM): Likewise.
3354
3355         * section.c (SEC_ARCH_BIT_0): Removed.
3356         (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
3357         SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
3358         (SEC_SHARED): Renamed to ...
3359         (SEC_COFF_SHARED): This.
3360         (SEC_BLOCK): Renamed to ...
3361         (SEC_TIC54X_BLOCK): This.
3362         (SEC_CLINK): Renamed to ...
3363         (SEC_TIC54X_CLINK): This.
3364         (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
3365         SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
3366         end.
3367         * bfd-in2.h: Regenerated.
3368
3369 2005-02-21  Fred Fish  <fnf@specifixinc.com>
3370
3371         * dwarf2.c (find_abstract_instance_name): Call recursively
3372         to handle a DW_AT_specification.
3373
3374 2005-02-21  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
3375
3376         * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
3377         mips_elf_create_dynamic_relocation,
3378         _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
3379         Remove #if 0'd code.
3380
3381 2005-02-21  Alan Modra  <amodra@bigpond.net.au>
3382
3383         * Makefile.am: Run "make dep-am"
3384         * Makefile.in: Regenerate.
3385
3386 2005-02-21  Alan Modra  <amodra@bigpond.net.au>
3387
3388         * coffgen.c (bfd_coff_get_comdat_section): Check that
3389         coff_section_data isn't NULL.
3390
3391 2005-02-21  Alan Modra  <amodra@bigpond.net.au>
3392
3393         * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
3394         * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
3395         * coff-rs6000.c (xcoff_write_armap_big): Warning fixes.  Remove
3396         useless assignments.
3397         (xcoff_write_archive_contents_big): Likewise.
3398         (_bfd_xcoff_put_ldsymbol_name): Likewise.
3399         * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
3400         * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
3401         * cofflink.c (process_embedded_commands): Warning fixes.
3402         * cpu-arm.c: Delete unnecessary prototypes.  Convert to C90.
3403         Warning fixes.
3404         * dwarf2.c: Warning fixes.
3405         * elf-bfd.h: Likewise.
3406         * elf-eh-frame.c: Likewise.
3407         * elf-strtab.c: Likewise.
3408         * elf.c: Likewise.
3409         * elf32-m68k.c: Likewise.
3410         * elf32-ppc.c: Likewise.
3411         * elf32-sh-symbian.c: Likewise.
3412         * elf32-sh.c: Delete unnecessary prototypes.  Warning fixes.
3413         * elf64-sh64.c: Likewise.
3414         * peicode.h: Likewise.
3415         * elf64-mmix.c: Warning fixes.
3416         * elfcode.h: Likewise.
3417         * elfxx-mips.c: Likewise.
3418         * libbfd-in.h: Likewise.
3419         * libbfd.c: Likewise.
3420         * mach-o.c: Likewise.
3421         * merge.c: Likewise.
3422         * mmo.c: Likewise.
3423         * opncls.c: Likewise.
3424         * pef.c: Likewise.
3425         * srec.c: Likewise.
3426         * vms-hdr.c: Likewise.
3427         * vms-tir.c: Likewise.
3428         * xtensa-isa.c: Likewise.
3429         * xtensa-modules.c: Likewise.
3430         * xsym.c: Likewise.
3431         (pstrcmp): Use correct choice of string lengths.  Fix return value.
3432         (bfd_sym_module_name): Correct string length.
3433         * bfd-in2.h: Regenerate.
3434         * libbfd.h: Regenerate.
3435
3436 2005-02-17  Alexandre Oliva  <aoliva@redhat.com>
3437
3438         * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
3439         uninitialized check_segment[1] in TLSMOFF case.
3440         Reported by Alan Modra.
3441         (elf32_frv_relocate_section): Improve errors and warnings.
3442
3443 2005-02-17  Alan Modra  <amodra@bigpond.net.au>
3444
3445         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
3446
3447 2005-02-16  Alan Modra  <amodra@bigpond.net.au>
3448
3449         * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
3450         * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
3451         * pef.c (bfd_pef_scan): Don't ignore return value of
3452         bfd_pef_scan_start_address.
3453         * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
3454         bfd_mach_o_scan_start_address.
3455         * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
3456         * elfxx-mips.c: Remove unnecessary prototypes.
3457         (sort_dynamic_relocs_64): Abort if not BFD64.
3458
3459 2005-02-16  Alan Modra  <amodra@bigpond.net.au>
3460
3461         * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
3462         Skip toc reloc adjust if reloc_count is zero.
3463
3464 2005-02-15  Nigel Stephens  <nigel@mips.com>
3465             Maciej W. Rozycki  <macro@mips.com>
3466
3467         * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3468         reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3469         R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3470         (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3471         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
3472         dst_mask.
3473         (mips16_gprel_reloc): Remove bit shuffling; call
3474         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3475         and _bfd_mips16_elf_reloc_shuffle() instead.
3476         (mips16_reloc_map): New reloc map for MIPS16 relocs.
3477         (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3478         relocs.
3479         (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
3480         elf_mips16_howto_table_rel.
3481         * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
3482         MIPS16 REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16
3483         relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3484         (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
3485         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
3486         dst_mask.
3487         (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
3488         reloc howtos.  Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
3489         R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
3490         placeholders.
3491         (mips16_gprel_reloc): Remove bit shuffling; call
3492         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3493         and _bfd_mips16_elf_reloc_shuffle() instead.
3494         (mips16_reloc_map): New reloc map for MIPS16 relocs.
3495         (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3496         relocs.
3497         (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
3498         mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
3499         * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3500         REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3501         R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3502         (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3503         (elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
3504         dst_mask.
3505         (mips16_gprel_reloc): Remove bit shuffling; call
3506         _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3507         and _bfd_mips16_elf_reloc_shuffle() instead.
3508         (mips16_reloc_map): New reloc map for MIPS16 relocs.
3509         (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3510         relocs.
3511         (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
3512         elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
3513         * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
3514         handle bit shuffling for MIPS16 relocs.
3515         (_bfd_mips16_elf_reloc_shuffle): Likewise.
3516         (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
3517         and _bfd_mips16_elf_reloc_shuffle().
3518         (_bfd_mips_elf_generic_reloc): Likewise.
3519         (mips_elf_calculate_relocation): Likewise.  Handle R_MIPS16_HI16
3520         and R_MIPS16_LO16.
3521         (mips_elf_obtain_contents): Remove bit shuffling.
3522         (mips_elf_perform_relocation): Likewise; call
3523         _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
3524         instead.
3525         (_bfd_mips_elf_relocate_section): Likewise.  Handle R_MIPS16_HI16
3526         and R_MIPS16_LO16.
3527         * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
3528         (_bfd_mips16_elf_reloc_shuffle): Likewise.
3529         * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
3530         (BFD_RELOC_MIPS16_HI16_S): Likewise.
3531         (BFD_RELOC_MIPS16_LO16): Likewise.
3532         * bfd-in2.h: Regenerate.
3533         * libbfd.h: Regenerate.
3534
3535 2005-02-15  Jan Beulich  <jbeulich@novell.com>
3536
3537         * elfxx-ia64.c (ia64_howto_table): Correct strings for
3538         R_IA64_DTPMOD64[LM]SB.
3539
3540 2005-02-14  H.J. Lu  <hongjiu.lu@intel.com>
3541
3542         * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
3543         backward branch in the same section.
3544         (elfNN_ia64_relocate_section): Inform users that the input
3545         section is too big to relax br instruction when overflow
3546         happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
3547         and R_IA64_PCREL21F.
3548
3549 2005-02-14 Orjan Friberg <orjanf@axis.com>
3550
3551         * elfcore.h (elf_core_file_p): Move the call to
3552         elf_backend_object_p to allow the correct machine to be set before
3553         processing the program headers.
3554
3555 2005-02-14  Nick Clifton  <nickc@redhat.com>
3556
3557         PR binutils/716
3558         * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
3559         aware flag from the input bfd to the output bfd.
3560
3561 2005-02-11  Maciej W. Rozycki  <macro@mips.com>
3562
3563         * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
3564         R_MIPS_LITERAL relocations for external symbols.
3565         * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
3566         * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
3567
3568 2005-02-11  H.J. Lu  <hongjiu.lu@intel.com>
3569
3570         * bfd-in2.h: Rebuilt.
3571
3572 2005-02-11  Paul Brook  <paul@codesourcery.com>
3573
3574         * elf-bfd.h (struct elf_link_hash_table): Add
3575         is_relocatable_executable.
3576         * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
3577         * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
3578         symbols in relocatable executables.
3579         (bfd_elf_record_link_assignment): Create dynamic section symbols in
3580         relocatable executables.
3581         (_bfd_elf_link_renumber_dynsyms): Ditto.
3582         (bfd_elf_final_link): Ditto.
3583         * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
3584         relocations into relocatable executables.
3585         (elf32_arm_check_relocs): Crate dynamic sections for relocatable
3586         executables.  Also copy absolute relocations.
3587         (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
3588         in relocatable executables.
3589         (allocate_dynrelocs): Copy relocations for relocatable executables.
3590         Output dynamic symbols for symbols defined in linker scripts.
3591
3592 2005-02-11  Nick Clifton  <nickc@redhat.com>
3593
3594         * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
3595         to avoid a compile time warning.
3596
3597         * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
3598         BFD_ASSERT.
3599
3600         * coff-tic4x.c (coff_rtype_to_howto): Move definition before
3601         inclusion of coffcode.h so that it is actually picked up.
3602
3603         * coffcode.h (coff_std_swap_table): Add an unused attribute in
3604         case it is not used.
3605
3606         * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
3607         structure and macro.
3608
3609         * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
3610         array.
3611
3612         * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
3613         to protect the declaration of this array.
3614
3615         * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
3616         Avoid call to memcpy with a size of 0.
3617
3618 2005-02-12  Alan Modra  <amodra@bigpond.net.au>
3619
3620         * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
3621         old-style branches to undefined dot-symbols which will be
3622         satisfied by a plt call.
3623
3624 2005-02-11  Alan Modra  <amodra@bigpond.net.au>
3625
3626         * elf64-ppc.c (move_plt_plist): New function, extracted from..
3627         (ppc64_elf_copy_indirect_symbol): ..here.
3628         (func_desc_adjust): Use move_plt_plist.
3629
3630 2005-02-10  Paul Brook  <paul@codesourcery.com>
3631
3632         * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
3633
3634 2005-02-10  Paul Brook  <paul@codesourcery.com>
3635
3636         * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
3637         symbols local.
3638         (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
3639         (elf_link_renumber_local_hash_table_dynsyms): New function.
3640         (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
3641
3642 2005-02-10  Jakub Jelinek  <jakub@redhat.com>
3643
3644         * bfd-in.h (BFD_LINKER_CREATED): Define.
3645         * bfd-in2.h: Rebuilt.
3646         * elflink.c (bfd_elf_size_dynamic_sections): Disregard
3647         BFD_LINKER_CREATED bfds when determining input bfds without
3648         .note.GNU-stack section.
3649
3650 2005-02-10  Maciej W. Rozycki  <macro@mips.com>
3651
3652         * elf64-mips.c (mips16_gprel_reloc): Update a comment.
3653         * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
3654         relocations against external symbols unchanged.
3655
3656 2005-02-08  Paul Brook  <paul@codesourcery.com>
3657
3658         * elflink.c (elf_link_input_bfd): Ignore symbols from null input
3659         sections.
3660
3661 2005-02-08  Hans-Peter Nilsson  <hp@axis.com>
3662
3663         * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
3664         prefix here.
3665
3666 2005-02-07  Maciej W. Rozycki  <macro@mips.com>
3667
3668         * elf64-mips.c: Fix formatting throughout.
3669
3670 2005-02-07  Maciej W. Rozycki  <macro@mips.com>
3671
3672         * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
3673
3674 2005-02-07  Alexandre Oliva  <aoliva@redhat.com>
3675
3676         * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
3677         *ABS*/*UND* sections.
3678         (elf32_frv_relocate_section): Move zero-addend-required error...
3679         (_frv_emit_got_relocs_plt_entries): ... here.  Report error for
3680         missing needed TLS section.
3681
3682 2005-02-07  Hans-Peter Nilsson  <hp@axis.com>
3683
3684         * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
3685         being the last symbol.
3686         (aout_link_add_symbols): Just return TRUE if a warning
3687         symbol was last.
3688
3689 2005-02-07  Maciej W. Rozycki  <macro@mips.com>
3690
3691         * elf32-mips.c (mips_elf_gprel32_reloc): Reject
3692         R_MIPS_GPREL32 relocations against external symbols.
3693         * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
3694         comment.
3695
3696 2005-02-07  Alan Modra  <amodra@bigpond.net.au>
3697
3698         * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
3699         * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
3700         elf_string_from_elf_strtab.
3701         (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
3702         (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
3703         if it exists.  Don't do the reverse for SHT_SYMTAB_SHNDX.  For
3704         SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
3705         looking at cached symtab info first, before iterating over headers.
3706         For SHT_REL and SHT_RELA, load dynsymtab if needed.
3707         * elfcode.h (elf_object_p): Don't load section header stringtab
3708         specially.
3709
3710 2005-02-06  H.J. Lu  <hongjiu.lu@intel.com>
3711
3712         * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
3713         against protected function when building shared library.
3714
3715         PR 584
3716         * elf64-x86-64.c (is_32bit_relative_branch): New.
3717         (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
3718         protected function symbol when building shared library for
3719         32bit relative branch instruction.
3720
3721 2005-02-06  Alan Modra  <amodra@bigpond.net.au>
3722
3723         * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
3724         syms when doing a relocatable link.
3725         (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
3726         at u.def.section.
3727         (ppc64_elf_tls_setup): Likewise.
3728         (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
3729
3730 2005-02-04  Alan Modra  <amodra@bigpond.net.au>
3731
3732         * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
3733         (link_hash_newfunc): Clear all locals using memset.
3734         (make_fdh): Remove flags param.  Always create fake func desc
3735         weak.  Link the descriptor with the code entry sym.
3736         (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
3737         (add_symbol_adjust): Adjust make_fdh call.
3738         (func_desc_adjust): Likewise.  Twiddle any pre-existing fake
3739         descriptor to strong undefined if code entry is strong.
3740
3741 2005-02-04  Alan Modra  <amodra@bigpond.net.au>
3742
3743         * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
3744         lookup here.  Set to new before calling bfd_link_repair_undef_list.
3745         (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
3746
3747 2005-02-03  Alan Modra  <amodra@bigpond.net.au>
3748
3749         * linker.c (_bfd_link_hash_newfunc): Set all local fields.
3750
3751 2005-02-03  Alan Modra  <amodra@bigpond.net.au>
3752
3753         * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
3754         * elflink.c (elf_smash_syms): Restore symbols that were undefweak
3755         before the as-needed lib was loaded.  Abort on unexpected refs.
3756
3757 2005-02-02  Alan Modra  <amodra@bigpond.net.au>
3758
3759         * elflink.c (elf_smash_syms): Expand comments.
3760         (elf_link_add_object_symbols): Only call elf_smash_syms for
3761         as-needed dynamic objects.
3762
3763         * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
3764         everything, just the field specific to ia64.
3765         * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
3766
3767 2005-02-01  Alan Modra  <amodra@bigpond.net.au>
3768
3769         * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
3770         (make_fdh): ..here.  New function.  Don't set BSF_OBJECT for
3771         undefined syms.
3772         (struct add_symbol_adjust_data): New.
3773         (add_symbol_adjust): Make an undefweak func desc for old ABI
3774         objects to link with --as-needed shared libs.  Return fail status.
3775         Don't adjust old ABI func entry sym to weak if func desc syms
3776         isn't defined.
3777         (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
3778         and return status.
3779
3780 2005-02-01  Hans-Peter Nilsson  <hp@axis.com>
3781
3782         * cpu-cris.c (get_compatible): Rearrange disabled code and comment
3783         for clarity.
3784
3785 2005-02-01  Alan Modra  <amodra@bigpond.net.au>
3786
3787         * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
3788         * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
3789         remove anything but new and undefweak.
3790         * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
3791         existing _DYNAMIC.
3792         (_bfd_elf_create_dynamic_sections): Formatting.
3793         (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
3794         (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
3795         (struct elf_smash_data): New.
3796         (elf_smash_syms): New function.
3797         (elf_link_add_object_symbols): Call elf_smash_syms.  Don't add
3798         unneeded dynamic objects to loaded list.
3799         (elf_link_output_extsym): Don't handle as-needed here.  Strip
3800         bfd_link_hash_new symbols.
3801         * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3802         delref when dynindx is already -1.
3803         * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
3804         symbols.
3805         * elfxx-mips.c (mips_elf_output_extsym): Likewise.
3806
3807 2005-02-01  Ben Elliston  <bje@au.ibm.com>
3808
3809         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
3810
3811 2005-02-01  Ben Elliston  <bje@au.ibm.com>
3812
3813         * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
3814         bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
3815         coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
3816         coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
3817         cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
3818         elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
3819         elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
3820         elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
3821         i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
3822         nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
3823         pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
3824         sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
3825         hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
3826         throughout. Similarly, collapse #if 1'd code.
3827
3828 2005-02-01  Ben Elliston  <bje@au.ibm.com>
3829
3830         * elf-bfd.h (bfd_elf_discard_group): Remove.
3831         * elf.c (bfd_elf_discard_group): Likewise.
3832         * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
3833
3834 2005-01-31  Richard Sandiford  <rsandifo@redhat.com>
3835
3836         * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
3837         (_bfd_elf_eh_frame_address_size): Declare.
3838         * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
3839         (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
3840         * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
3841         (elf_backend_eh_frame_address_size): Define.
3842         * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
3843         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
3844         size from the new backend hook.
3845         (_bfd_elf_write_section_eh_frame): Likewise.
3846         (_bfd_elf_eh_frame_address_size): New function.
3847
3848 2005-01-31  Andrew Cagney  <cagney@gnu.org>
3849
3850         * configure: Regenerate to track ../gettext.m4.
3851
3852 2005-01-31  Mark Mitchell  <mark@codesourcery.com>
3853
3854         * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
3855         SHF_WRITE for .init_array, .fini_array, and .preinit_array.
3856
3857 2005-01-31  Nick Clifton  <nickc@redhat.com>
3858
3859         * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
3860         sparc-lynxos, vax-vms) be obsolete.
3861
3862 2005-01-28  Daniel Jacobowitz  <dan@codesourcery.com>
3863
3864         * elf-bfd.h (struct elf_backend_data): Add minpagesize.
3865         * elf32-arm.c (ELF_MINPAGESIZE): Define.
3866         * elf32-ppc.c (ELF_MINPAGESIZE): Define.
3867         * elfcode.h (elf_object_p): Use minpagesize instead of
3868         maxpagesize.
3869         * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
3870         (elfNN_bed): Include ELF_MINPAGESIZE.
3871
3872 2005-01-28  Julian Brown  <julian@codesourcery.com>
3873
3874         * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3875         * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3876         * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
3877         (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
3878         passing flag value from ld. Set flag value in global hash table entry.
3879         (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
3880         relocation.
3881
3882 2005-01-27  Andrew Cagney  <cagney@gnu.org>
3883
3884         * configure: Regenerate to track ../gettext.m4 change.
3885
3886 2005-01-25  Mark Mitchell  <mark@codesourcery.com>
3887
3888         * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
3889         SymbianOS.
3890
3891 2005-01-25  Alexandre Oliva  <aoliva@redhat.com>
3892
3893         2004-12-10  Alexandre Oliva  <aoliva@redhat.com>
3894         * elf32-frv.c (elf32_frv_relocate_section): Force local binding
3895         for TLSMOFF.
3896         * reloc.c: Add R_FRV_TLSMOFF.
3897         * elf32-frv.c (elf32_frv_howto_table): Likewise.
3898         (frv_reloc_map, frv_reloc_type_lookup): Map it.
3899         (elf32_frv_relocate_section): Handle it.
3900         (elf32_frv_check_relocs): Likewise.
3901         * libbfd.h, bfd-in2.h: Rebuilt.
3902         2004-11-26  Alexandre Oliva  <aoliva@redhat.com>
3903         * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
3904         when given an undefweak TLS symbol.  Fix constant TLS PLT entries
3905         such that they return the constant in gr9.
3906         (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
3907         symbols.
3908         (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
3909         too, such that they shrink on relaxation.
3910         (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
3911         marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
3912         (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
3913         if we can guarantee the use of 16-bit constants.
3914         2004-11-10  Alexandre Oliva  <aoliva@redhat.com>
3915         Introduce TLS support for FR-V FDPIC.
3916         * reloc.c: Add TLS relocations.
3917         * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
3918         (elf32_frv_rel_tlsdesc_value_howto): New.
3919         (elf32_frv_rel_tlsoff_howto): New.
3920         (frv_reloc_map): Add new mappings.
3921         (struct frvfdpic_elf_link_hash_table): Add pointer to summary
3922         reloc information.
3923         (frvfdpic_dynamic_got_plt_info): New.
3924         (frvfdpic_plt_tls_ret_offset): New.
3925         (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
3926         (struct _frvfdpic_dynamic_got_info): Likewise.  Add TLS members.
3927         (struct _frvfdpic_dynamic_got_plt_info): Likewise.
3928         (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
3929         section as local.
3930         (struct frvfdpic_relocs_info): Add TLS fields.
3931         (frvfdpic_relocs_info_hash): Warning clean up.
3932         (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
3933         (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
3934         (FRVFDPIC_TLS_BIAS): Define.
3935         (tls_biased_base): New.
3936         (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
3937         relocations.
3938         (frv_reloc_type_lookup): Likewise.
3939         (frvfdpic_info_to_howto_rel): Likewise.
3940         (elf32_frv_relocate_section): Likewise.
3941         (_frv_create_got_section): Create the PLT section here.
3942         (elf32_frvfdpic_create_dynamic_sections): Not here.
3943         (_frvfdpic_count_nontls_entries): Move out of...
3944         (_frvfdpic_count_got_plt_entries): ... here.
3945         (_frvfdpic_count_tls_entries): Likewise.  Add TLS support.
3946         (_frvfdpic_count_relocs_fixups): Likewise.  Add relaxation
3947         support.
3948         (_frvfdpic_relax_tls_entries): New.
3949         (_frvfdpic_compute_got_alloc_data): Add TLS support.
3950         (_frvfdpic_get_tlsdesc_entry): New.
3951         (_frvfdpic_assign_got_entries): Add TLS support.
3952         (_frvfdpic_assign_plt_entries): Likewise.
3953         (_frvfdpic_reset_got_plt_entries): New.
3954         (_frvfdpic_size_got_plt): Move out of...
3955         (elf32_frvfdpic_size_dynamic_sections): ... here.
3956         (_frvfdpic_relax_got_plt_entries): New.
3957         (elf32_frvfdpic_relax_section): New.
3958         (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
3959         (elf32_frv_check_relocs): Add TLS support.
3960         (bfd_elf32_bfd_relax_section): Define for FDPIC.
3961         * libbfd.h, bfd-in2.h: Rebuilt.
3962
3963 2005-01-25  Alan Modra  <amodra@bigpond.net.au>
3964
3965         * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
3966         loadable reloc sections.
3967         (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
3968         (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
3969
3970 2005-01-25  Alan Modra  <amodra@bigpond.net.au>
3971
3972         * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
3973         sections immediately when linking shared libs.  Instead, wait until
3974         we know a lib is needed.
3975         (_bfd_elf_link_create_dynstrtab): Extract from..
3976         (_bfd_elf_link_create_dynamic_sections_): ..here.
3977         (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
3978         _bfd_elf_link_create_dynamic_sections.  Add abfd param.  Allow
3979         for non-existent .dynamic.
3980         (elf_link_output_extsym): Don't complain about undefined symbols
3981         in as-needed dynamic libs that aren't actually linked.
3982
3983 2005-01-24  Andrew Cagney  <cagney@gnu.org>
3984
3985         * configure: Regenerate, ../gettext.m4 was updated.
3986
3987 2005-01-21  Ben Elliston  <bje@au.ibm.com>
3988
3989         * aout-encap.c: Remove unused file.
3990
3991 2005-01-19  H.J. Lu  <hongjiu.lu@intel.com>
3992
3993         PR 679
3994         * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
3995         non-function symbols are local.
3996         (_bfd_elf_symbol_refs_local_p): Likewise.
3997
3998 2005-01-18  Alan Modra  <amodra@bigpond.net.au>
3999
4000         * bfd.c (bfd_link_just_syms): Add abfd param.
4001         * bfd-in2.h: Regenerate.
4002
4003 2005-01-17  Richard Sandiford  <rsandifo@redhat.com>
4004
4005         * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
4006         (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
4007         instructions.  If the amount of padding is known, reduce the size
4008         of the CIE or FDE by that amount.
4009
4010 2005-01-17  Richard Sandiford  <rsandifo@redhat.com>
4011
4012         * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
4013         augmentation_size.  Use bfd_signed_vmas for data_align.
4014         * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
4015         (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
4016         functions.  Don't read past the end of the enclosing CIE or FDE.
4017         (skip_bytes): New utility function.
4018         (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
4019         sanity checking.
4020         (_bfd_elf_write_section_eh_frame): Use new functions.
4021
4022 2005-01-17  Richard Sandiford  <rsandifo@redhat.com>
4023
4024         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
4025         assert-style REQUIRE() macro to handle sanity checks.
4026
4027 2005-01-17  H.J. Lu  <hongjiu.lu@intel.com>
4028
4029         * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
4030         (comp_unit): Here.
4031         (read_unsigned_leb128): Removed.
4032         (read_signed_leb128): Removed.
4033         (find_abstract_instance_name): Updated.
4034         (parse_comp_unit): Accept info_ptr_unit.
4035         (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
4036         comp unit and pass it to parse_comp_unit.
4037
4038         * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
4039         (read_signed_leb128): Moved to ...
4040         * libbfd.c: Here.
4041
4042         * libbfd-in.h (read_unsigned_leb128): New prototype.
4043         (read_signed_leb128): Likewise.
4044         * libbfd.h: Regenerated.
4045
4046 2005-01-17  Andrew Stubbs  <andrew.stubbs@st.com>
4047             Nick Clifton   <nickc@redhat.com>
4048
4049         * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
4050         arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
4051         arch_sh4a_nofpu_up in order to match the external names and make the
4052         testsuite's job easier.
4053         * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
4054         names.
4055         * bfd-in2.h: Regenerate.
4056
4057 2005-01-15  Andrew Cagney  <cagney@gnu.org>
4058
4059         * bfd.m4: New file.
4060         * acinclude.m4: Move BFD_NEED_DECLARATION,
4061         BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
4062         the new file bfd.m4.  Include ../bfd/bfd.m4.
4063         * configure: Re-generate.
4064
4065 2005-01-12  Alan Modra  <amodra@bigpond.net.au>
4066
4067         * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
4068         (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
4069         reaching PLT.
4070         (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
4071         R_PPC_RELAX32PC_PLT.
4072
4073 2005-01-11  Alan Modra  <amodra@bigpond.net.au>
4074
4075         * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
4076         symbols.
4077         * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
4078         * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
4079         * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
4080         * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
4081         * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
4082         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
4083         * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
4084         * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4085         * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4086         * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
4087         * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
4088         * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
4089         * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4090         * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4091
4092 2005-01-11  Alan Modra  <amodra@bigpond.net.au>
4093
4094         * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
4095         .dynsbss flags.
4096
4097 2005-01-10  Inderpreet Singh <inderpreetb@noida.hcltech.com>
4098
4099         * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
4100         * bfd-in2.h:  Regenerate.
4101         * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
4102         to support these new machine values.
4103         * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
4104         the maxq10.
4105         (bfd_maxq_arch): Update values for the maxq20.
4106
4107 2005-01-10  Eric Botcazou  <ebotcazou@libertysurf.fr>
4108
4109         * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
4110         non-shared object, do not reserve space in .plt and .rela.plt for
4111         regular symbols neither defined nor referenced in shared objects.
4112
4113 2005-01-09  Eric Botcazou  <ebotcazou@libertysurf.fr>
4114
4115         * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
4116         to zero the structure.
4117         (create_got_section): Use BFD_ASSERT instead of abort.
4118         * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
4119         'srelgot' fields.
4120         (create_got_section): New function.
4121         (sparc64_elf_create_dynamic_sections): Likewise.
4122         (sparc64_elf_check_relocs): Invoke create_got_section instead of
4123         _bfd_elf_create_got_section.  Use the sgot and srelgot shortcuts.
4124         (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
4125         (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
4126         (sparc64_elf_finish_dynamic_symbol): Likewise.
4127         (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
4128         (elf_backend_create_dynamic_sections): Define to
4129         sparc64_elf_create_dynamic_sections.
4130
4131 2005-01-09  Eric Botcazou  <ebotcazou@libertysurf.fr>
4132
4133         * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
4134         (elf_backend_omit_section_dynsym): Define to it.
4135         * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
4136         (elf_backend_omit_section_dynsym): Define to it.
4137
4138 2005-01-07  Jakub Jelinek  <jakub@redhat.com>
4139
4140         * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
4141         PT_DYNAMIC segment, unless .dynamic.
4142
4143 2005-01-06  Paul Brook  <paul@codesourcery.com>
4144
4145         * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
4146         * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
4147         * configure: Regenerate.
4148         * elf32-arm.c: Add VxWorks target bfd.
4149         (USE_REL): Remove.
4150         (elf32_arm_link_hash_table): Add use_rel.
4151         (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
4152         elf32_arm_relocate_section): Replace USE_REL with runtime check.
4153         Correct offset calculation for RELA case.
4154         (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
4155         elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
4156         (elf32_arm_vxworks_link_hash_table_create): New function.
4157         * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
4158         (bfd_elf32_littlearm_vxworks_vec): Ditto.
4159         (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
4160
4161 2005-01-06  Alan Modra  <amodra@bigpond.net.au>
4162
4163         * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
4164         multi_toc_needed.
4165         (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
4166         (ppc64_elf_check_relocs): Update references to has_gp_reloc.
4167         (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
4168         (ppc64_elf_next_toc_section): Heed no_multi_toc.
4169         (ppc64_elf_reinit_toc): Set multi_toc_needed.
4170         (toc_adjusting_stub_needed): Rewrite.
4171         (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
4172         toc tests.  Adjust for toc_adjusting_stub_needed changes.
4173         (ppc64_elf_size_stubs): Update references to has_gp_reloc.
4174         * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
4175         * section.c: Expand comment on backend bits.
4176         * bfd-in2.h: Regenerate.
4177         * libbfd.h: Regenerate.
4178
4179 2005-01-06  Alan Modra  <amodra@bigpond.net.au>
4180
4181         * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
4182         toc adjusting stub, do not test source section flags.
4183
4184 2005-01-05  Eric Botcazou  <ebotcazou@libertysurf.fr>
4185
4186         * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4187         from STABS debugging sections again.
4188
4189 2005-01-05  Fred Fish  <fnf@specifixinc.com>
4190
4191         * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
4192         (find_abstract_instance_name): New function.
4193         (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
4194         (scan_unit_for_functions): Handle DW_AT_abstract_origin.
4195         (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
4196
4197 2004-12-31  Paul Brook  <paul@copdesourcery.com>
4198
4199         * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
4200
4201 2004-12-31  Alan Modra  <amodra@bigpond.net.au>
4202
4203         * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
4204         Commit missing changes from 2004-12-22.
4205         * bfd-in2.h: Regenerate.
4206
4207 2004-12-23  Tomer Levi  <Tomer.Levi@nsc.com>
4208
4209         * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
4210
4211 2004-12-21  Kris Warkentin  <kewarken@qnx.com>
4212
4213         * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
4214         Add 'base' argument for constructing register sections.  Reformat.
4215         (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
4216         gp and fp regs.  Reformat.
4217
4218 2004-12-22  Klaus Rudolph  <lts-rudolph@gmx.de>
4219
4220         * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
4221         * bfd-in2.h: Regenerate.
4222         * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
4223         (avr_reloc_map): Likewise.
4224         (avr_final_link_relocate): Likewise.
4225
4226 2004-12-22  Alan Modra  <amodra@bigpond.net.au>
4227
4228         * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
4229         as-needed dynamic libs as undefined.
4230         (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
4231         libs when finding they are needed.
4232
4233 2004-12-20  Alan Modra  <amodra@bigpond.net.au>
4234
4235         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
4236         (opd_entry_value): Use opd_relocs if available.
4237         (ppc64_elf_relocate_section): Don't set reloc_done.  Instead
4238         copy .opd relocations to opd_relocs.
4239         (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
4240
4241 2004-12-16  Richard Sandiford  <rsandifo@redhat.com>
4242
4243         * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
4244         * elf32-v850.c (v850_elf_howto_table): Add entry for
4245         R_V850_LO16_SPLIT_OFFSET.
4246         (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
4247         (v850_elf_perform_lo16_relocation): New function, extracted from...
4248         (v850_elf_perform_relocation): ...here.  Use it to handle
4249         R_V850_LO16_SPLIT_OFFSET.
4250         (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
4251         R_V850_LO16_SPLIT_OFFSET.
4252         * libbfd.h, bfd-in2.h: Regenerate.
4253
4254 2004-12-14  P.J. Darcy  <darcypj@us.ibm.com>
4255
4256         * config.bfd: Add s390x-ibm-tpf support.
4257
4258 2004-12-14  Tomer Levi  <Tomer.Levi@nsc.com>
4259
4260         * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
4261         to prototype, to make hash info available.
4262         Prevent wrapped symbols from being adjusted twice.
4263
4264 2004-12-14  Richard Sandiford  <rsandifo@redhat.com>
4265
4266         * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
4267         overflow for calls to undefined weak symbols.
4268
4269 2004-12-11  Alan Modra  <amodra@bigpond.net.au>
4270
4271         * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
4272         canonical sections syms have a name.
4273
4274 2004-12-11  Alan Modra  <amodra@bigpond.net.au>
4275
4276         * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
4277         have been adjusted for output.
4278         (ppc64_elf_relocate_section): Mark sections with reloc_done.
4279
4280 2004-12-10  Alan Modra  <amodra@bigpond.net.au>
4281
4282         * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
4283         add symtab_hdr param.
4284         (group_signature): Update calls.
4285         * elf-bfd.h (bfd_elf_sym_name): Update.
4286         * elf32-ppc.c (ppc_elf_relocate_section): Update.
4287         * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
4288         (ppc64_elf_relocate_section): Update.
4289         * elflink.c (elf_link_input_bfd): Update.
4290
4291 2004-12-10  Jakub Jelinek  <jakub@redhat.com>
4292
4293         * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
4294         st_shndx on STT_SECTION sections.
4295
4296 2004-12-09  Daniel Jacobowitz  <dan@codesourcery.com>
4297
4298         * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
4299         ELF section symbols.
4300
4301 2004-12-09  Ian Lance Taylor  <ian@wasabisystems.com>
4302
4303         * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
4304         return a real value, unless it is a PLT symbol.
4305         (mips_elf_perform_relocation): On the RM9000, turn a jal into a
4306         bal if possible.
4307
4308         * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
4309         R_MIPS_JALR entry to 0.
4310
4311         * archures.c: Define bfd_mach_mips9000.
4312         * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
4313         (mips_set_isa_flags): Handle bfd_mach_mips9000.
4314         * cpu-mips.c (I_mips9000): Define.
4315         (arch_info_struct): Add case for bfd_mach_mips9000.
4316         * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
4317         * bfd-in2.h: Regenerate.
4318
4319 2004-12-08  Ian Lance Taylor  <ian@wasabisystems.com>
4320
4321         * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
4322         overflow.
4323
4324 2004-12-07  Ben Elliston  <bje@gnu.org>
4325
4326         * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
4327
4328 2004-12-06  Daniel Jacobowitz  <dan@debian.org>
4329
4330         Suggested by Fergal Daly <fergal@esatclear.ie>:
4331         * simple.c (simple_dummy_multiple_definition): New function.
4332         (bfd_simple_get_relocated_section_contents): Use it.
4333
4334 2004-12-03  Jan Beulich  <jbeulich@novell.com>
4335
4336         * elf.c (elf_find_function): Don't use the last file symbol ever,
4337         seen, but the last one seen prior to the symbol being reported.
4338         Don't report a filename at all for global symbols when that might
4339         be ambiguous/wrong.
4340
4341 2004-12-01  Paul Brook  <paul@codesourcery.com>
4342
4343         * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
4344         (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
4345         version.
4346
4347 2004-12-01  Paul Brook  <paul@codesourcery.com>
4348
4349         * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
4350         sections undefined.
4351
4352 2004-11-30  Paul Brook  <paul@codesourcery.com>
4353
4354         * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
4355         no_pipeline_knowledge
4356         (elf32_arm_link_hash_table_create): Ditto.
4357         (bfd_elf32_arm_process_before_allocation): Ditto.
4358         (elf32_arm_final_link_relocate): Ditto.  Remove oabi relocation
4359         handling.
4360         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4361         prototype.
4362         * bfd-in2.h: Regenerate.
4363
4364 2004-11-30  Randolph Chung  <tausq@debian.org>
4365
4366         * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
4367         (elf32_hppa_grok_psinfo): New function.
4368         (elf_backend_grok_prstatus): Define.
4369         (elf_backend_grok_psinfo): Define.
4370
4371 2004-11-24  H.J. Lu  <hongjiu.lu@intel.com>
4372
4373         PR 574:
4374         * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
4375
4376 2004-11-24  Paul Brook  <paul@codesourcery.com>
4377
4378         * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
4379
4380 2004-11-24  Paul Brook  <paul@codesourcery.com>
4381
4382         * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
4383         (elf32_arm_swap_symbol_out): New function.
4384         (elf32_arm_size_info): Add.
4385         (elf_backend_size_info): Define.
4386
4387 2004-11-20  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4388
4389         * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
4390         make_bfd_asection.
4391
4392 2004-11-19  Alan Modra  <amodra@bigpond.net.au>
4393
4394         * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
4395         * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
4396         * nlmcode.h (nlm_write_object_contents): Warning fix.
4397
4398 2004-11-18  Bob Wilson  <bob.wilson@acm.org>
4399
4400         * elf32-xtensa.c (ebb_propose_action): Fix argument order.
4401
4402 2004-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
4403
4404         * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
4405         (elf32_arm_plt_thumb_stub): New.
4406         (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
4407         and plt_got_offset.
4408         (elf32_arm_link_hash_traverse): Fix typo.
4409         (elf32_arm_link_hash_table): Add obfd.
4410         (elf32_arm_link_hash_newfunc): Initialize new fields.
4411         (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
4412         (elf32_arm_link_hash_table_create): Initialize obfd.
4413         (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
4414         (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
4415         (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
4416         interworking BFD is not dynamic.
4417         (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32.  Do
4418         not emit glue for PLT references.
4419         (elf32_arm_final_link_relocate): Handle Thumb functions.  Do not
4420         emit glue for PLT references.  Support the Thumb PLT prefix.
4421         (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
4422         plt_thumb_refcount.
4423         (elf32_arm_check_relocs): Likewise.
4424         (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
4425         plt_thumb_refcount.
4426         (allocate_dynrelocs): Handle Thumb PLT references.
4427         (elf32_arm_finish_dynamic_symbol): Likewise.
4428         (elf32_arm_symbol_processing): New function.
4429         (elf_backend_symbol_processing): Define.
4430
4431 2004-11-16  Richard Sandiford  <rsandifo@redhat.com>
4432
4433         * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
4434         add_fde_encoding.  Remove need_relative.
4435         * elf-eh-frame.c (extra_augmentation_string_bytes)
4436         (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
4437         (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
4438         in cases where the CIE has no existing 'R' augmentation.  Use
4439         size_of_output_cie_fde when assigning offsets.  Use the final offset
4440         as the new section size.
4441         (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
4442         Account for any extra augmentation bytes in the returned offset.
4443         (_bfd_elf_write_section_eh_frame): Rework so that the entries are
4444         moved before being modified.  Pad growing entries with DW_CFA_nops.
4445         Add 'z' and 'R' augmentations as directed by add_augmentation_size
4446         and add_fde_encoding.
4447
4448 2004-11-15  Mark Mitchell  <mark@codesourcery.com>
4449
4450         * elf32-arm.c (elf32_arm_relocate_section): Use
4451         arm_real_reloc_type.
4452
4453 2004-11-16  Richard Sandiford  <rsandifo@redhat.com>
4454
4455         * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
4456         for discard relocations; don't add an R_MIPS_NONE to the main body
4457         of .rel.dyn.
4458
4459 2004-11-04  Paul Brook  <paul@codesourcery.com>
4460
4461         * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
4462         * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
4463         (_bfd_elf_slurp_version_tables): Add extra argument.  Create extra
4464         default version definition for unversioned symbols.
4465         * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
4466         * elflink.c (elf_link_add_object_symbols): Pass extra argument to
4467         _bfd_elf_slurp_version_tables.  Set default version for unversioned
4468         imported symbols.
4469
4470 2004-11-15  Paul Brook  <paul@codesourcery.com>
4471
4472         * elflink.c (elf_link_add_object_symbols): Don't assume version
4473         indices are consecutive.
4474
4475 2004-11-14  Richard Sandiford  <rsandifo@redhat.com>
4476
4477         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
4478         composite relocations against the personality data.
4479
4480 2004-11-13  Paul Brook  <paul@codesourcery.com>
4481
4482         * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
4483         R_ARM_PREL31 relocations to PLT entries.
4484         (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
4485         (elf32_arm_check_relocs): Ditto.
4486
4487 2004-11-12  Bob Wilson  <bob.wilson@acm.org>
4488
4489         * xtensa-isa.c (xtensa_interface_class_id): New.
4490
4491 2004-11-11  Bob Wilson  <bob.wilson@acm.org>
4492
4493         * elf32-xtensa.c (property_table_compare): Remove assertion about
4494         entries with the same address and non-zero size.
4495         (xtensa_read_table_entries): Report such entries as errors.
4496
4497 2004-11-11  Mark Mitchell  <mark@codesourcery.com>
4498
4499         * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
4500         R_ARM_RELATIVE on Symbian OS.
4501
4502 2004-11-09  Mark Mitchell  <mark@codesourcery.com>
4503
4504         * som.c (som_bfd_print_private_bfd_data): New function.
4505         (som_object_setup): Save the auxiliary header.  Don't assume that
4506         zero is an invalid entry point for a shared library.
4507         (som_object_p): Allocate the auxiliary header on the heap.
4508
4509         * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
4510         declaration.
4511         (elf32_arm_symbian_modify_segment_map): Likewise.
4512
4513 2004-11-09  Daniel Jacobowitz  <dan@debian.org>
4514
4515         From David Poole <daveml@mbuf.com>:
4516         * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
4517         (elf32_arm_size_dynamic_sections): Call it.
4518
4519 2004-11-09  Alan Modra  <amodra@bigpond.net.au>
4520
4521         * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
4522         (ALL_MACHINES_CFILES): Fix typo.
4523         * Makefile.in: Regenerate.
4524         * po/SRC-POTFILES.in: Regenerate.
4525
4526 2004-11-08  Mark Mitchell  <mark@codesourcery.com>
4527
4528         * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
4529         R_ARM_RELATIVE relocation for Symbian OS, mention the section
4530         symbol in the relocation.
4531
4532 2004-11-08  Inderpreet Singh  <inderpreetb@nioda.hcltech.com>
4533             Vineet Sharma  <vineets@noida.hcltech.com>
4534
4535         * coff-maxq.c: New File.
4536         * cpu-maxq.c: New File.
4537         * coffcode.h: Likewise.
4538         * config.bfd: Likewise.
4539         * configure.in (maxqcoff_vec): New target vector.
4540         * Makefile.am: Add support for maxq target.
4541         * configure.in: Likewise.
4542         * archures.c:. Likewise.
4543         * targets.c: Likewise.
4544         * bfd_in2.h : Regenerated.
4545         * Makefile.in: Regenerated.
4546         * configure: Regenerated.
4547         * doc/Makefile.in: Regenerated.
4548
4549 2004-11-08  Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
4550
4551         * coff-i386.c (coff_i386_reloc): Fix weak symbols.
4552         * cofflink.c (_bfd_coff_link_input_bfd): Don't process
4553         C_NT_WEAK aux entries.
4554         (_bfd_coff_generic_relocate_section): Handle undefined
4555         aliases.
4556
4557 2004-11-07  Andreas Schwab  <schwab@suse.de>
4558
4559         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
4560         SYMBOL_CALLS_LOCAL and check for undefweak symbols with
4561         non-default visibility.
4562
4563 2004-11-01  Mark Mitchell  <mark@codesourcery.com>
4564
4565         * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
4566         D_PAGED.
4567         (elf32_arm_symbian_modify_segment_map): Don't
4568         reset includes_filehdr and includes_phdrs here.
4569
4570 2004-11-04  Daniel Jacobowitz  <dan@debian.org>
4571
4572         * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
4573         elfarm-nabi with elf32-arm.  Remove elfarm-oabi.
4574         (elf32-arm.lo): Replace elfarm-nabi.lo rule.  Remove elf32-arm.h
4575         dependency.
4576         * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
4577         to a new removed list.  Remove normal configuration stanzas.
4578         * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
4579         (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
4580         elfarm-nabi.lo with elf32-arm.lo.
4581         (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
4582         * elf32-arm.c: Renamed from elfarm-nabi.c.  Inline elf32-arm.h.
4583         * elf32-arm.h: Remove.
4584         * elfarm-oabi.c: Remove.
4585         * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
4586         and bfd_elf32_littlearm_oabi_vec.
4587         * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
4588
4589 2004-11-04  Hans-Peter Nilsson  <hp@axis.com>
4590
4591         * config.bfd: Support crisv32-*-* like cris-*-*.
4592         * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
4593         (bfd_mach_cris_v10_v32): New macros.
4594         * cpu-cris.c: Tweak formatting.
4595         (get_compatible): New function.
4596         (N): New macro.
4597         (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
4598         bfd_arch_info_type:s.
4599         (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
4600         get_compatible for member compatible and link bfd_cris_arch_v32 as
4601         next.
4602         * elf32-cris.c (cris_elf_pcrel_reloc)
4603         (cris_elf_set_mach_from_flags): New functions.
4604         (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
4605         <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
4606         (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
4607         numbers for bfd_mach_cris_v32.
4608         (PLT_ENTRY_SIZE_V32): New macro.
4609         (elf_cris_plt0_entry): Drop last comma in initializer.
4610         (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
4611         (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
4612         PLT initializers.
4613         (cris_elf_relocate_section): Change all "%B(%A)" messages to
4614         "%B, section %A".
4615         (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
4616         (elf_cris_finish_dynamic_sections): Similar.
4617         (elf_cris_adjust_dynamic_symbol): Similar.
4618         (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
4619         section %A".
4620         <switch with PIC relocs>: Emit error and return FALSE for
4621         bfd_mach_cris_v10_v32.
4622         <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4623         Emit warning when generating textrel reloc.
4624         (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
4625         (cris_elf_final_write_processing): Set flags according to mach.
4626         (cris_elf_print_private_bfd_data): Display
4627         EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
4628         (cris_elf_merge_private_bfd_data): Drop variables old_flags,
4629         new_flags.  Don't call cris_elf_final_write_processing.  Don't
4630         look at the actual elf header flags at all; use
4631         bfd_get_symbol_leading_char to check ibfd, obfd.  Trap difference
4632         in bfd_get_mach for ibfd and obfd and handle merging of compatible
4633         objects.
4634         (bfd_elf32_bfd_copy_private_bfd_data): Define.
4635         * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
4636         (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
4637         (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
4638         * bfd-in2.h, libbfd.h: Regenerate.
4639
4640 2004-11-04  Alan Modra  <amodra@bigpond.net.au>
4641
4642         * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
4643         * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
4644         comment.
4645         (struct adjust_toc_info): New.
4646         (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
4647
4648 2004-11-03  Bob Wilson  <bob.wilson@acm.org>
4649
4650         * elf.c (assign_file_positions_for_segments): Set next_file_pos even
4651         if there are no segments.
4652
4653 2004-11-02  Daniel Jacobowitz  <dan@debian.org>
4654
4655         * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
4656
4657 2004-11-02  Nick Clifton  <nickc@redhat.com>
4658
4659         * elf32-iq2000.c: Convert to ISO C90 formatting.
4660
4661 2004-11-02  Hans-Peter Nilsson  <hp@axis.com>
4662
4663         * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
4664
4665 2004-10-28  H.J. Lu  <hongjiu.lu@intel.com>
4666
4667         * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
4668         undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
4669         R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
4670
4671 2004-10-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4672
4673         * elf32-sh.c (tpoff): Take alignment into account.
4674
4675 2004-10-28  Nick Clifton  <nickc@redhat.com>
4676
4677         * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
4678         performing a relocatable link.
4679         (iq2000_elf_object_p): Do not set elf_bad_symtab.  This is only
4680         for MIPS ports under Irix.
4681
4682 2004-10-27  Richard Earnshaw  <rearnsha@arm.com>
4683
4684         * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
4685         R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
4686         (elf32_arm_final_link_relocate): Ditto.
4687         (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
4688         (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
4689         (elf32_arm_adjust_dynamic_symbol): Ditto.
4690         * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
4691         R_ARM_JUMP32.  Move R_ARM_R{REL32,ABS32,PC24,BASE}...
4692         (elf32_arm_r_howto): ... To here.
4693         (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
4694
4695 2004-10-26  H.J. Lu  <hongjiu.lu@intel.com>
4696
4697         PR 475
4698         * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
4699         R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
4700         and R_IA64_SECREL64LSB.
4701
4702 2004-10-26  Paul Brook  <paul@codesourcery.com>
4703
4704         * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
4705         (bfd_elf_size_dynamic_sections): Create default version definition.
4706         (elf_link_output_extsym): Adjust for default symbol version.
4707
4708 2004-10-24  Hans-Peter Nilsson  <hp@bitrange.com>
4709
4710         * mmo.c: Adjust to ISO C.
4711
4712         * mmo.c (mmo_write_section_description): New function broken out
4713         of mmo_internal_write_section.
4714         (mmo_internal_write_section): For each of .text and .data, call
4715         mmo_write_section_description before outputting contents if it has
4716         nontrivially deducible vma or contents.
4717         (mmo_has_leading_or_trailing_zero_tetra_p): New function.
4718         (mmo_canonicalize_symtab): Adjust absolute symbols to .data
4719         symbols if found within the .data address range.
4720
4721 2004-10-24  Daniel Jacobowitz  <dan@debian.org>
4722
4723         * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
4724
4725 2004-10-24  Hans-Peter Nilsson  <hp@bitrange.com>
4726
4727         * mmo.c (File Layout): Correct place of misplaced blurb about
4728         special data.
4729
4730 2004-10-22  Mark Kettenis  <kettenis@gnu.org>
4731
4732         * config.bfd: Add mips64*-*-openbsd.
4733
4734 2004-10-21  Bob Wilson  <bob.wilson@acm.org>
4735
4736         * elf32-xtensa.c (ebb_propose_action): Put declarations before
4737         statements.
4738
4739 2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4740
4741         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
4742         * configure: Regenerate.
4743
4744 2004-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4745
4746         PR 463
4747         * aoutx.h (aout_link_input_section_std): Pass proper hash entry
4748         to linker reloc_overflow callback.
4749         (aout_link_input_section_ext): Likewise.
4750         (aout_link_reloc_link_order): Likewise.
4751         * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4752         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4753         Likewise.
4754         (alpha_relocate_section): Likewise.
4755         * coff-arm.c (coff_arm_relocate_section): Likewise.
4756         * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
4757         * coff-h8500.c (extra_case): Likewise.
4758         * coff-i960.c (coff_i960_relocate_section): Likewise.
4759         * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4760         * coff-mips.c (mips_relocate_section): Likewise.
4761         * coff-or32.c (coff_or32_relocate_section): Likewise.
4762         * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4763         * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
4764         * coff-sh.c (sh_relocate_section): Likewise.
4765         * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4766         * coff-w65.c (w65_reloc16_extra_cases): Likewise.
4767         * coff-z8k.c (extra_case): Likewise.
4768         * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
4769         * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
4770         (_bfd_coff_generic_relocate_section): Likewise.
4771         * ecoff.c (ecoff_reloc_link_order): Likewise.
4772         * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4773         * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4774         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4775         * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4776         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4777         * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
4778         * elf32-cris.c (cris_elf_relocate_section): Likewise.
4779         * elf32-crx.c (elf32_crx_relocate_section): Likewise.
4780         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4781         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4782         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4783         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4784         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4785         * elf32-i370.c (i370_elf_relocate_section): Likewise.
4786         * elf32-i386.c (elf_i386_relocate_section): Likewise.
4787         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4788         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4789         * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
4790         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4791         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
4792         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4793         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4794         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
4795         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4796         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4797         * elf32-s390.c (elf_s390_relocate_section): Likewise.
4798         * elf32-sh.c (sh_elf_relocate_section): Likewise.
4799         * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4800         * elf32-v850.c (v850_elf_relocate_section): Likewise.
4801         * elf32-vax.c (elf_vax_relocate_section): Likewise.
4802         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4803         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4804         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
4805         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4806         * elf64-s390.c (elf_s390_relocate_section): Likewise.
4807         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4808         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4809         * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4810         * elflink.c (elf_reloc_link_order): Likewise.
4811         * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4812         * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4813         (_bfd_elf_mips_get_relocated_section_contents): Likewise.
4814         * linker.c (_bfd_generic_reloc_link_order): Likewise.
4815         * pdp11.c (pdp11_aout_link_input_section): Likewise.
4816         (aout_link_reloc_link_order): Likewise.
4817         * reloc.c (bfd_generic_get_relocated_section_contents):
4818         Likewise.
4819         * xcofflink.c (xcoff_reloc_link_order): Likewise.
4820         * simple.c (simple_dummy_reloc_overflow): Updated.
4821
4822 2004-10-20  Andreas Schwab  <schwab@suse.de>
4823
4824         * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
4825         (elf_backend_plt_sym_val): Define.
4826
4827 2004-10-19  Danny Smith  <dannysmith@users.sourceforege.net>
4828
4829         * config.bfd: Set targ_underscore=yes for PE COFF targets
4830
4831 2004-10-19  Alan Modra  <amodra@bigpond.net.au>
4832
4833         * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
4834         (ppc64_elf_edit_opd): Likewise.
4835
4836 2004-10-18  Mark Mitchell  <mark@codesourcery.com>
4837
4838         * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
4839         * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
4840         set SEC_ALLOC and SEC_LOAD.
4841
4842 2004-10-18  Nick Clifton  <nickc@redhat.com>
4843
4844         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
4845         'name' for relocs against both local and global symbols.
4846
4847 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
4848
4849         * bfd-in2.h: Regenerate.
4850         * bfd.c (struct bfd): Add no_export.
4851         * elflink.c (elf_link_add_object_symbols): Handle no_export.
4852
4853 2004-10-15  Alan Modra  <amodra@bigpond.net.au>
4854
4855         * config.bfd: Whitespace cleanup.
4856         * Makefile.am: Run "make dep-am"
4857         * Makefile.in: Regenerate.
4858
4859 2004-10-15  Jakub Jelinek  <jakub@redhat.com>
4860
4861         * elflink.c (struct already_linked_section): Removed.
4862         (try_match_symbols_in_sections, already_linked): Removed.
4863         (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
4864         prefix of section names when finding already_linked_table
4865         chain.  Compare section names.  Instead of calling already_linked,
4866         do it inline and only for sections in the same already_linked_list.
4867
4868 2004-10-15  Alan Modra  <amodra@bigpond.net.au>
4869
4870         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
4871         parameter.  If called after _bfd_elf_write_section_eh_frame,
4872         don't allow a -2 return unless need_* bit is already set, and
4873         handle offsets adjusted for output_offset.
4874         * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
4875         * elf.c (_bfd_elf_section_offset): Update call.
4876
4877 2004-10-13  H.J. Lu  <hongjiu.lu@intel.com>
4878
4879         PR 440
4880         * coffcode.h (coff_compute_section_file_positions): Cast to
4881         bfd_vma when computing page alignment.
4882
4883 2004-10-13  Mark Mitchell  <mark@codesourcery.com>
4884
4885         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4886         offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
4887
4888 2004-10-12  Mark Mitchell  <mark@codesourcery.com>
4889
4890         * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
4891         relocations use a virtual address, not a section offset.
4892
4893 2004-10-12  Bob Wilson  <bob.wilson@acm.org>
4894
4895         * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
4896         (narrow_instruction, widen_instruction): Remove unnecessary calls to
4897         xtensa_format_encode.
4898         (ebb_propose_action): Inline call to ebb_add_proposed_action.
4899         (ebb_add_proposed_action): Delete.
4900
4901 2004-10-12  Bob Wilson  <bob.wilson@acm.org>
4902
4903         * elf32-xtensa.c: Use ISO C90 formatting.
4904
4905 2004-10-12  Paul Brook  <paul@codesourcery.com>
4906
4907         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
4908         message.
4909
4910 2004-10-12  Paul Brook  <paul@codesourcery.com>
4911
4912         * elf32-arm.h: Support EABI version 4 objects.
4913
4914 2004-10-12  Alan Modra  <amodra@bigpond.net.au>
4915
4916         PR 325
4917         * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
4918         Don't mark as default.
4919         (bfd_x86_64_arch): Don't mark as default.
4920
4921 2004-10-12  Alan Modra  <amodra@bigpond.net.au>
4922
4923         * elflink.c (enum action_discarded): New.
4924         (elf_section_complain_discarded): Delete.
4925         (elf_action_discarded): New function subsuming the above and also
4926         controlling reloc behaviour.
4927         (elf_link_input_bfd): Use it.
4928
4929 2004-10-11  Jakub Jelinek  <jakub@redhat.com>
4930
4931         * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
4932         (special_sections): Add .gnu.liblist and .gnu.conflict.
4933         (assign_section_numbers): Handle SHT_GNU_LIBLIST.
4934
4935 2004-10-11  Alan Modra  <amodra@bigpond.net.au>
4936
4937         PR 233
4938         * elflink.c (elf_link_input_bfd): Try harder to support
4939         relocations against symbols in removed linkonce sections.
4940
4941 2004-10-11  Alan Modra  <amodra@bigpond.net.au>
4942
4943         * elflink.c (elf_link_input_bfd): Revert PR 354 change.
4944
4945         PR 354
4946         * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
4947         sections do not reference symbols in non-SEC_ALLOC sections.
4948
4949 2004-10-11  Alan Modra  <amodra@bigpond.net.au>
4950
4951         PR 437
4952         * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
4953         (_bfd_elf_link_omit_section_dynsym): Formatting.
4954
4955 2004-10-10  Alan Modra  <amodra@bigpond.net.au>
4956
4957         * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
4958         * libbfd.h: Regnerate.
4959         * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
4960         * elf32-frv.c: Likewise.
4961         * elf32-m32r.c: Likewise.
4962         * elf32-ppc.c: Likewise.
4963         * elf64-hppa.c: Likewise.
4964         * elfxx-ia64.c: Likewise.
4965         * opncls.c: Likewise.
4966
4967 2004-10-10  Alan Modra  <amodra@bigpond.net.au>
4968
4969         * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
4970         * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
4971         offsets stored in struct eh_cie_fde entries before doing other
4972         work.
4973
4974         * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
4975         (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
4976         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
4977         setting offsets for removed CIEs.  Don't set "sec", instead set
4978         cie_inf for FDEs.  Keep a pointer to last struct eh_cie_fde for a
4979         CIE in hdr_info.  Only set make_relative and make_lsda_relative
4980         for CIEs.  Use pointers rather than array indices.
4981         (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
4982         make_lsda_relative, need_* on cie_inf for FDEs.
4983         (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
4984         section output_offset.  Delete cie_offset, instead use cie_inf
4985         pointer to CIE entry.  Use need_relative and need_lsda_relative on
4986         CIE entry for FDEs.  Use pointers rather than array indices.
4987
4988 2004-10-09  Alan Modra  <amodra@bigpond.net.au>
4989
4990         * coff-rs6000.c (rs6000coff_vec): Add initializer for
4991         bfd_is_target_special_symbol.
4992         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4993         * som.c (som_bfd_is_target_special_symbol): Define.
4994
4995 2004-10-08  Nick Clifton  <nickc@redhat.com>
4996
4997         * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
4998         * configure: Regenerate.
4999         * bfd-in2.h: Regenerate.
5000         * syms.c (bfd_is_target_special_symbol): New interface function.
5001         Returns true when a symbol should be considered to be special.
5002         * targets.c (bfd_target): Include bfd_is_target_special_symbol in
5003         the symbol jump table.
5004         * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
5005         Return true iff the symbol is a mapping symbol.
5006         (bfd_elf32_bfd_is_target_special_symbol): Define.
5007         * elfxx-target.h: Provide a default definition for
5008         bfd_is_target_special_symbol.
5009         * aout-target.h: Likewise.
5010         * aout-tic30.c: Likewise.
5011         * binary.c: Likewise.
5012         * coffcode.h: Likewise.
5013         * i386msdos.c: Likewise.
5014         * ieee.c: Likewise.
5015         * ihex.c: Likewise.
5016         * libaout.h: Likewise.
5017         * libbfd-in.h: Likewise
5018         * libecoff.h: Likewise.
5019         * mach-o.c: Likewise.
5020         * mmo.c: Likewise.
5021         * nlm-target.h: Likewise.
5022         * oasys.c: Likewise.
5023         * pef.c: Likewise.
5024         * ppcboot.c: Likewise.
5025         * srec.c: Likewise.
5026         * tekhex.c: Likewise.
5027         * versados.c: Likewise.
5028         * vms.c: Likewise.
5029         * xcoff-target.h: Likewise.
5030         * xsym.c: Likewise.
5031         * libbfd.h: Regenerate.
5032
5033 2004-10-08  Daniel Jacobowitz  <dan@debian.org>
5034
5035         * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
5036         * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
5037         (elf_backend_section_from_shdr): Define.
5038
5039 2004-10-08  Alan Modra  <amodra@bigpond.net.au>
5040
5041         * syms.c (bfd_is_local_label): Return false for file symbols.
5042
5043 2004-10-07  Bob Wilson  <bob.wilson@acm.org>
5044             David Heine  <dlheine@tensilica.com>
5045
5046         * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
5047         (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
5048         (elf32xtensa_no_literal_movement): New global variable.
5049         (elf_howto_table): Add entries for new relocations.
5050         (elf_xtensa_reloc_type_lookup): Handle new relocations.
5051         (property_table_compare): When addresses are equal, compare sizes and
5052         various property flags.
5053         (property_table_matches): New.
5054         (xtensa_read_table_entries): Extend to read new property tables.  Add
5055         output_addr parameter to indicate that output addresses should be used.
5056         Use bfd_get_section_limit.
5057         (elf_xtensa_find_property_entry): New.
5058         (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
5059         (elf_xtensa_check_relocs): Handle new relocations.
5060         (elf_xtensa_do_reloc): Use bfd_get_section_limit.  Handle new
5061         relocations.  Use new xtensa-isa.h functions.
5062         (build_encoding_error_message): Remove encode_result parameter.  Add
5063         new target_address parameter used to detect alignment errors.
5064         (elf_xtensa_relocate_section): Use bfd_get_section_limit.  Clean up
5065         error handling.  Use new is_operand_relocation function.
5066         (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
5067         Use underbar macro for error messages.  Formatting.
5068         (get_const16_opcode): New.
5069         (get_l32r_opcode): Add a separate flag for initialization.
5070         (get_relocation_opnd): Operand number is no longer explicit in the
5071         relocation.  Change to decode the opcode and analyze its operands.
5072         (get_relocation_slot): New.
5073         (get_relocation_opcode): Add bfd parameter.  Use bfd_get_section_limit.
5074         Use new xtensa-isa.h functions to handle multislot instructions.
5075         (is_l32r_relocation): Add bfd parameter.  Use is_operand_relocation.
5076         (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
5077         insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
5078         check_loop_aligned, check_branch_target_aligned_address, narrowable,
5079         widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
5080         get_single_format, init_op_single_format_table): New.
5081         (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
5082         instead of calling _bfd_error_handler.  Use new xtensa-isa.h functions.
5083         (contract_asm_expansion): Add error_message parameter and pass it to
5084         elf_xtensa_do_asm_simplify.  Replace use of R_XTENSA_OP0 relocation
5085         with R_XTENSA_SLOT0_OP.
5086         (get_expanded_call_opcode): Extend to handle either L32R or CONST16
5087         instructions.  Use new xtensa-isa.h functions.
5088         (r_reloc struct): Add new virtual_offset field.
5089         (r_reloc_init): Add contents and content_length parameters.  Set
5090         virtual_offset field to zero.  Add contents to target_offset field for
5091         partial_inplace relocations.
5092         (r_reloc_is_defined): Check for null.
5093         (print_r_reloc): New debug function.
5094         (source_reloc struct): Replace xtensa_operand field with pair of the
5095         opcode and the operand position.  Add is_abs_literal field.
5096         (init_source_reloc): Specify operand by opcode/position pair.  Set
5097         is_abs_literal field.
5098         (source_reloc_compare): When target_offsets are equal, compare other
5099         fields to make sorting predictable.
5100         (literal_value struct): Add is_abs_literal field.
5101         (value_map_hash_table struct): Add has_last_loc and last_loc fields.
5102         (init_literal_value): New.
5103         (is_same_value): Replace with ...
5104         (literal_value_equal): ... this function.  Add comparisons of
5105         virtual_offset and is_abs_literal fields.
5106         (value_map_hash_table_init): Use bfd_zmalloc.  Check for allocation
5107         failure.  Initialize has_last_loc field.
5108         (value_map_hash_table_delete): New.
5109         (hash_literal_value): Rename to ...
5110         (literal_value_hash): ... this.  Include is_abs_literal flag and
5111         virtual_offset field in the hash value.
5112         (get_cached_value): Rename to ...
5113         (value_map_get_cached_value): ... this.  Update calls to
5114         literal_value_hash and literal_value_equal.
5115         (add_value_map): Check for allocation failure.  Update calls to
5116         value_map_get_cached_value and literal_value_hash.
5117         (text_action, text_action_list, text_action_t): New types.
5118         (find_fill_action, compute_removed_action_diff, adjust_fill_action,
5119         text_action_add, text_action_add_literal, offset_with_removed_text,
5120         offset_with_removed_text_before_fill, find_insn_action,
5121         print_action_list, print_removed_literals): New.
5122         (offset_with_removed_literals): Delete.
5123         (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
5124         fix_array, fix_array_count, allocated_relocs, relocs_count, and
5125         allocated_relocs_count fields.
5126         (init_xtensa_relax_info): Initialize new fields.
5127         (reloc_bfd_fix struct): Add new translated field.
5128         (reloc_bfd_fix_init): Add translated parameter and use it to set the
5129         translated field.
5130         (fix_compare, cache_fix_array): New.
5131         (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
5132         section via get_xtensa_relax_info.  Use cache_fix_array to set up
5133         sorted fix_array and use bsearch instead of linear search.
5134         (section_cache_t): New struct.
5135         (init_section_cache, section_cache_section, clear_section_cache): New.
5136         (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
5137         (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
5138         extend_ebb_bounds_forward, extend_ebb_bounds_backward,
5139         insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
5140         New.
5141         (retrieve_contents): Use bfd_get_section_limit.
5142         (elf_xtensa_relax_section): Add relocations_analyzed flag.  Update call
5143         to compute_removed_literals.  Free value_map_hash_table when no longer
5144         needed.
5145         (analyze_relocations): Check is_relaxable_asm_section flag.  Call
5146         compute_text_actions for all sections.
5147         (find_relaxable_sections): Mark sections as relaxable if they contain
5148         ASM_EXPAND relocations that can be optimized.  Adjust r_reloc_init
5149         call.  Increment relax_info src_count field only for appropriate
5150         relocation types.  Remove is_literal_section check.
5151         (collect_source_relocs): Use bfd_get_section_limit.  Adjust calls to
5152         r_reloc_init and find_associated_l32r_irel.  Check
5153         is_relaxable_asm_section flag.  Handle L32R instructions with absolute
5154         literals.  Pass is_abs_literal flag to init_source_reloc.
5155         (is_resolvable_asm_expansion): Use bfd_get_section_limit.  Check for
5156         CONST16 instructions.  Adjust calls to r_reloc_init and
5157         pcrel_reloc_fits.  Handle weak symbols conservatively.
5158         (find_associated_l32r_irel): Add bfd parameter and pass it to
5159         is_l32r_relocation.
5160         (compute_text_actions, compute_ebb_proposed_actions,
5161         compute_ebb_actions, check_section_ebb_pcrels_fit,
5162         check_section_ebb_reduces, text_action_add_proposed,
5163         compute_fill_extra_space): New.
5164         (remove_literals): Replace with ...
5165         (compute_removed_literals): ... this function.  Call
5166         init_section_cache.  Use bfd_get_section_limit.  Sort internal_relocs.
5167         Call xtensa_read_table_entries to get the property table.  Skip
5168         relocations other than R_XTENSA_32 and R_XTENSA_PLT.  Use new
5169         is_removable_literal, remove_dead_literal, and
5170         identify_literal_placement functions.
5171         (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
5172         instead of linear search.
5173         (is_removable_literal, remove_dead_literal,
5174         identify_literal_placement): New.
5175         (relocations_reach): Update check for literal not referenced by any
5176         PC-relative relocations.  Adjust call to pcrel_reloc_fits.
5177         (coalesce_shared_literal, move_shared_literal): New.
5178         (relax_section): Use bfd_get_section_limit.  Call
5179         translate_section_fixes.  Update calls to r_reloc_init and
5180         offset_with_removed_text.  Check new is_relaxable_asm_section flag.
5181         Add call to pin_internal_relocs.  Add special handling for
5182         R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs.  Use virtual_offset
5183         info to calculate new addend_displacement variable.  Replace code for
5184         deleting literals with more general code to perform the actions
5185         determined by the action_list for the section.
5186         (translate_section_fixes, translate_reloc_bfd_fix): New.
5187         (translate_reloc): Check new is_relaxable_asm_section flag.  Call
5188         find_removed_literal only if is_operand_relocation.  Update call to
5189         offset_with_removed_text.  Use new target_offset and removed_bytes
5190         variables.
5191         (move_literal): New.
5192         (relax_property_section):  Use bfd_get_section_limit.  Set new
5193         is_full_prop_section flag and handle new property tables.  Update calls
5194         to r_reloc_init and offset_with_removed_text.  Check
5195         is_relaxable_asm_section flag.  Handle expansion of zero-sized
5196         unreachable entries, with use of offset_with_removed_text_before_fill.
5197         For relocatable links, combine entries only for literal tables.
5198         (relax_section_symbols): Check is_relaxable_asm_section flag.  Update
5199         calls to offset_with_removed_text.  Translate st_size field for
5200         function symbols.
5201         (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
5202         failure.  Add contents parameter.  Update call to get_bfd_fix.  Update
5203         call to r_reloc_init.  Call _bfd_error_handler and return FALSE for
5204         R_XTENSA_ASM_EXPAND relocs.
5205         (do_fix_for_final_link): Add input_bfd and contents parameters.  Update
5206         call to get_bfd_fix.  Include offset from contents for partial_inplace
5207         relocations.
5208         (is_reloc_sym_weak): New.
5209         (pcrel_reloc_fits): Use new xtensa-isa.h functions.
5210         (prop_sec_len): New.
5211         (xtensa_is_property_section): Handle new property sections.
5212         (is_literal_section): Delete.
5213         (internal_reloc_compare): When r_offset matches, compare r_info and
5214         r_addend to make sorting predictable.
5215         (internal_reloc_matches): New.
5216         (xtensa_get_property_section_name): Handle new property sections.
5217         (xtensa_get_property_predef_flags): New.
5218         (xtensa_callback_required_dependence): Use bfd_get_section_limit.
5219         Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
5220         * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
5221         (xtisa_errno, xtisa_error_msg): New variables.
5222         (xtensa_isa_errno, xtensa_isa_error_msg): New.
5223         (xtensa_insnbuf_alloc): Add error handling.
5224         (xtensa_insnbuf_to_chars): Add num_chars parameter.  Update to
5225         use xtensa_format_decode.  Add error handling.
5226         (xtensa_insnbuf_from_chars): Add num_chars parameter.  Decode the
5227         instruction length to find the number of bytes to copy.
5228         (xtensa_isa_init): Add error handling.  Replace calls to
5229         xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
5230         tables in the xtensa_modules structure.
5231         (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
5232         xtensa_extend_isa): Delete.
5233         (xtensa_isa_free): Change to only free lookup tables.
5234         (opname_lookup_compare): Replace with ...
5235         (xtensa_isa_name_compare): ... this function.  Use strcasecmp.
5236         (xtensa_insn_maxlength): Rename to ...
5237         (xtensa_isa_maxlength): ... this.
5238         (xtensa_insn_length): Delete.
5239         (xtensa_insn_length_from_first_byte): Replace with ...
5240         (xtensa_isa_length_from_chars): ... this function.
5241         (xtensa_num_opcodes): Rename to ...
5242         (xtensa_isa_num_opcodes): ... this.
5243         (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
5244         xtensa_isa_num_regfiles, xtensa_isa_num_stages,
5245         xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
5246         xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
5247         xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
5248         xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
5249         xtensa_format_get_slot, xtensa_format_set_slot): New functions.
5250         (xtensa_opcode_lookup): Add error handling.
5251         (xtensa_decode_insn): Replace with ...
5252         (xtensa_opcode_decode): ... this function, with new format and
5253         slot parameters.  Add error handling.
5254         (xtensa_encode_insn): Replace with ...
5255         (xtensa_opcode_encode): ... this function, which does the encoding via
5256         one of the entries in the "encode_fns" array.  Add error handling.
5257         (xtensa_opcode_name): Add error handling.
5258         (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
5259         xtensa_opcode_is_call): New.
5260         (xtensa_num_operands): Replace with ...
5261         (xtensa_opcode_num_operands): ... this function.  Add error handling.
5262         (xtensa_opcode_num_stateOperands,
5263         xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
5264         xtensa_opcode_funcUnit_use, xtensa_operand_name,
5265         xtensa_operand_is_visible): New.
5266         (xtensa_get_operand, xtensa_operand_kind): Delete.
5267         (xtensa_operand_inout): Add error handling and special-case for
5268         "sout" operands.
5269         (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
5270         operate on one slot of an instruction.  Added error handling.
5271         (xtensa_operand_encode): Handle default operands with no encoding
5272         functions.  Check for success by comparing against decoded value.
5273         Add error handling.
5274         (xtensa_operand_decode): Handle default operands.  Return decoded value
5275         through argument pointer.  Add error handling.
5276         (xtensa_operand_is_register, xtensa_operand_regfile,
5277         xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
5278         (xtensa_operand_isPCRelative): Rename to ...
5279         (xtensa_operand_is_PCrelative): ... this.  Add error handling.
5280         (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
5281         through argument pointer.  Add error handling.
5282         (xtensa_stateOperand_state, xtensa_stateOperand_inout,
5283         xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
5284         xtensa_regfile_lookup_shortname, xtensa_regfile_name,
5285         xtensa_regfile_shortname, xtensa_regfile_view_parent,
5286         xtensa_regfile_num_bits, xtensa_regfile_num_entries,
5287         xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
5288         xtensa_state_is_exported, xtensa_sysreg_lookup,
5289         xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
5290         xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
5291         xtensa_interface_num_bits, xtensa_interface_inout,
5292         xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
5293         xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
5294         * xtensa-modules.c: Rewrite to use new data structures.
5295         * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
5296         BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
5297         BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
5298         BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
5299         BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
5300         BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
5301         BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
5302         BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
5303         BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
5304         BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
5305         BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
5306         BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
5307         BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
5308         BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
5309         BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
5310         BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
5311         BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
5312         * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
5313         * Makefile.in: Regenerate.
5314         * bfd-in2.h: Likewise.
5315         * libbfd.h: Likewise.
5316
5317 2004-10-07  Richard Sandiford  <rsandifo@redhat.com>
5318
5319         * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
5320         against the absolute section.
5321         (mips_elf64_write_rela): Likewise.
5322
5323 2004-10-07  Jan Beulich <jbeulich@novell.com>
5324
5325         * elf.c (elf_find_function): Don't generally check for matching
5326         section, just for non-file symbols.  Remove redunant comparison
5327         for the latter.
5328         * elf32-arm.h (arm_elf_find_function): Likewise.
5329
5330 2004-10-07  Jeff Baker  <jbaker@qnx.com>
5331
5332         * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
5333         adding a DT_TEXTREL to a shared object and --warn-shared-textrel
5334         was specified.
5335
5336 2004-10-04  Roland McGrath  <roland@redhat.com>
5337
5338         * hash.c (bfd_hash_set_default_size): Use const for table.
5339         Use size_t instead of int for variable compared to sizeof results.
5340
5341 2004-10-05  Alan Modra  <amodra@bigpond.net.au>
5342
5343         PR 425
5344         * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
5345
5346 2004-10-01  Paul Brook  <paul@codesourcery.com>
5347
5348         * elf32-arm.h (elf32_arm_fake_sections,
5349         is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
5350         functions.
5351         (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
5352
5353 2004-10-01  Alan Modra  <amodra@bigpond.net.au>
5354
5355         * elf-bfd.h (struct eh_cie_fde): Add need_relative and
5356         need_lsda_relative.
5357         * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
5358         need_relative or need_lsda_relative if we are processing an
5359         offset for a reloc on a FDE initial loc or LSDA field
5360         respectively.
5361         (_bfd_elf_write_section_eh_frame): Test need_relative and
5362         need_lsda_relative in place of corresponding make_* field
5363         when deciding to use pc-relative encodings.
5364
5365 2004-09-30  Paul Brook  <paul@codesourcery.com>
5366
5367         * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
5368         target2 relocation type.
5369
5370 2004-09-30  H.J. Lu  <hongjiu.lu@intel.com>
5371
5372         PR 414
5373         * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
5374
5375 2004-09-30  Paul Brook  <paul@codesourcery.com>
5376
5377         * reloc.c: Add BFD_RELOC_ARM_SMI.
5378         * bfd-in2.h: Regenerate.
5379         * libbfd.h: Ditto.
5380
5381 2004-09-24  Alan Modra  <amodra@bigpond.net.au>
5382
5383         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
5384         vma and output offset to address.
5385         * simple.c (simple_save_output_info): Only set output section
5386         and offset for debug sections, or those not already set up by
5387         the linker.
5388         (bfd_simple_get_relocated_section_contents): Update comment.
5389
5390 2004-09-24  Alan Modra  <amodra@bigpond.net.au>
5391
5392         * elf.c (IS_LOADED): Delete.
5393         (assign_file_positions_for_segments): Just test SEC_LOAD instead.
5394         Restore SEC_HAS_CONTENTS test to the one place it was used prior
5395         to 2004-09-22.
5396
5397 2004-09-23  Alan Modra  <amodra@bigpond.net.au>
5398
5399         PR gas/396
5400         * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
5401         bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite.  Remove
5402         redundant assignment of EM_SPARC.
5403
5404 2004-09-22  Brian Ford  <ford@vss.fsi.com>
5405
5406         * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
5407         alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
5408         constants.
5409         * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5410
5411 2004-09-22  Alan Modra  <amodra@bigpond.net.au>
5412
5413         * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
5414         (elf_backend_modify_segment_map): Don't define.
5415
5416 2004-09-22  Alan Modra  <amodra@bigpond.net.au>
5417
5418         * elf.c (IS_LOADED): Define.
5419         (assign_file_positions_for_segments): Don't round up file offset of
5420         PT_LOAD segments containing no SEC_LOAD sections, instead round down.
5421         Delete code handling link script adjustment of lma.  Do the adjust
5422         in later code handling similar ajustments.  Remove dead code error
5423         check.  Warn if section lma would require a negative offset
5424         adjustment.  Tweak lma adjustment to use p_filesz rather than p_memsz.
5425         Use p_vaddr + p_memsz inside section loop in place of voff.  Don't
5426         update voff in section loop.  Change voff in segment loop to be an
5427         adjustment on top of "off".  Set sec->filepos and update "off" later.
5428         Test for loadable sections consistently using IS_LOADED.  Similarly,
5429         test for alloc-only sections other than .tbss consistently.
5430         Don't bother checking SEC_ALLOC in PT_LOAD segments.  Remove FIXME.
5431         Tidy PT_NOTE handling.  Use %B and %A in error messages.
5432         (assign_file_positions_except_relocs): Use %B in error message.
5433
5434 2004-09-17  H.J. Lu  <hongjiu.lu@intel.com>
5435
5436         * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
5437         (CONFIG_STATUS_DEPENDENCIES): New.
5438         (Makefile): Removed.
5439         (config.status): Likewise.
5440         * Makefile.in: Regenerated.
5441
5442 2004-09-17  Paul Brook  <paul@codesourcery.com>
5443
5444         * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
5445         (bfd_elf32_arm_process_before_allocation): Update prototype.
5446         * bfd-in2.h: Regenerate.
5447         * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
5448         (elf32_arm_link_hash_table_create): Set it.
5449         (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
5450         (bfd_elf32_arm_set_target_relocs): New function.
5451         (arm_real_reloc_type): New function.
5452         (elf32_arm_final_link_relocate): Use it.  Handle R_ARM_PREL31 and
5453         R_ARM_GOT_PREL.  Remove R_ARM_TARGET1.
5454         (elf32_arm_gc_sweep_hook): Ditto.
5455         (elf32_arm_check_relocs): Ditto.
5456         (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
5457         * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
5458         R_ARM_GOT_TARGET2.
5459         (elf32_arm_got_prel): New variable.
5460         (elf32_arm_howto_from_type): New function.
5461         (elf32_arm_info_to_howto): Use it.
5462         (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
5463         BFD_RELOC_ARM_TARGET2.
5464         * libbfd.h: Regenerate.
5465         * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
5466
5467 2004-09-17  Alan Modra  <amodra@bigpond.net.au>
5468
5469         * ecoff.c: Update u.undef.next refs.
5470         * elf64-ppc.c: Likewise.
5471         * elflink.c: Likewise.
5472         * linker.c: Likewise.
5473         * xcofflink.c: Likewise.
5474
5475         * elf-bfd.h (struct elf_link_hash_entry): Rearrange.  Add FIXME to
5476         dynamic_def.  Combine weakdef and elf_hash_value.  Move vtable
5477         fields to indirect struct.
5478         * elf-m10300.c: Update u.weakdef refs.
5479         * elf32-arm.h: Likewise.
5480         * elf32-cris.c: Likewise.
5481         * elf32-frv.c: Likewise.
5482         * elf32-hppa.c: Likewise.
5483         * elf32-i370.c: Likewise.
5484         * elf32-i386.c: Likewise.
5485         * elf32-m32r.c: Likewise.
5486         * elf32-m68k.c: Likewise.
5487         * elf32-ppc.c: Likewise.
5488         * elf32-s390.c: Likewise.
5489         * elf32-sh.c: Likewise.
5490         * elf32-sparc.c: Likewise.
5491         * elf32-vax.c: Likewise.
5492         * elf32-xtensa.c: Likewise.
5493         * elf64-alpha.c: Likewise.
5494         * elf64-hppa.c: Likewise.
5495         * elf64-ppc.c: Likewise.
5496         * elf64-s390.c: Likewise.
5497         * elf64-sh64.c: Likewise.
5498         * elf64-sparc.c: Likewise.
5499         * elf64-x86-64.c: Likewise.
5500         * elfxx-ia64.c: Likewise.
5501         * elfxx-mips.c: Likewise.
5502         * elflink.c: Likewise.  Also u.elf_hash_value.
5503         (elf_gc_propagate_vtable_entries_used): Update for h->vtable
5504         indirection.
5505         (elf_gc_smash_unused_vtentry_relocs): Likewise.
5506         (bfd_elf_gc_record_vtinherit): Alloc vtable.
5507         (bfd_elf_gc_record_vtentry): Likewise.
5508         * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
5509
5510 2004-09-17  Alan Modra  <amodra@bigpond.net.au>
5511
5512         * Makefile.am: Run "make dep-am".
5513         * Makefile.in: Regenerate.
5514         * bfd-in2.h: Regenerate.
5515         * po/SRC-POTFILES.in: Regenerate.
5516         * po/bfd.pot: Regenerate.
5517
5518 2004-09-16  Alan Modra  <amodra@bigpond.net.au>
5519
5520         * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
5521         with bitfields.  Make "type" and "other" bitfields too.
5522         (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
5523         ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
5524         ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
5525         ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
5526         ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
5527         ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
5528         ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
5529         (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
5530         * elf-hppa.h: Update all uses of elf_link_hash_flags.
5531         * elf-m10300.c: Likewise.
5532         * elf.c: Likewise.
5533         * elf32-arm.h: Likewise.
5534         * elf32-cris.c: Likewise.
5535         * elf32-frv.c: Likewise.
5536         * elf32-hppa.c: Likewise.
5537         * elf32-i370.c: Likewise.
5538         * elf32-i386.c: Likewise.
5539         * elf32-m32r.c: Likewise.
5540         * elf32-m68k.c: Likewise.
5541         * elf32-ppc.c: Likewise.
5542         * elf32-s390.c: Likewise.
5543         * elf32-sh-symbian.c: Likewise.
5544         * elf32-sh.c: Likewise.
5545         * elf32-sh64.c: Likewise.
5546         * elf32-sparc.c: Likewise.
5547         * elf32-vax.c: Likewise.
5548         * elf32-xtensa.c: Likewise.
5549         * elf64-alpha.c: Likewise.
5550         * elf64-hppa.c: Likewise.
5551         * elf64-ppc.c: Likewise.
5552         * elf64-s390.c: Likewise.
5553         * elf64-sh64.c: Likewise.
5554         * elf64-sparc.c: Likewise.
5555         * elf64-x86-64.c: Likewise.
5556         * elflink.c: Likewise.
5557         * elfxx-ia64.c: Likewise.
5558         * elfxx-mips.c: Likewise.
5559         * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
5560         * configure: Regenerate.
5561         * aclocal.m4: Regenerate.
5562
5563 2004-09-16  Alan Modra  <amodra@bigpond.net.au>
5564
5565         * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
5566         around uses of R_ARM_TARGET1.
5567         (elf32_arm_check_relocs): Likewise.
5568
5569 2004-09-13  Paul Brook  <paul@codesourcery.com>
5570
5571         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
5572         prototype.
5573         * bfd-in2.h: Regenerate.
5574         * libbfd.h: Regenerate.
5575         * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
5576         (elf32_arm_link_hash_table_create): Set target1_is_rel.
5577         (bfd_elf32_arm_process_before_allocation): Ditto.
5578         (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
5579         (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
5580         * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
5581         * reloc.c: Ditto.
5582
5583 2004-09-10  Joel Brobecker  <brobecker@gnat.com>
5584
5585         * hpux-core.c (thread_section_p): New function.
5586         (hpux_core_core_file_p): Fix computation of offset in call
5587         to bfd_seek. Create a ".reg" section from an arbitrary
5588         ".reg/<id>" section if none was created after having read
5589         all sections.
5590
5591 2004-09-11  Andreas Schwab  <schwab@suse.de>
5592
5593         * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
5594         * aclocal.m4: Rebuild.
5595         * configure: Rebuild.
5596
5597 2004-09-10  Joel Brobecker  <brobecker@gnat.com>
5598
5599         * section.c (bfd_sections_find_if): Fix parameter name in
5600         comment to match code.
5601
5602 2004-09-10  Alan Modra  <amodra@bigpond.net.au>
5603
5604         * elf.c  (assign_file_positions_except_relocs): Assign relocs
5605         stored in a bfd section.
5606
5607 2004-09-08  Hans-Peter Nilsson  <hp@axis.com>
5608
5609         * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
5610         h->gotplt_refcount to 0, not -1.
5611
5612 2004-09-07  Hans-Peter Nilsson  <hp@axis.com>
5613
5614         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
5615         case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
5616         symname.
5617         (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
5618         handle symbol visibility here.
5619
5620 2004-09-07  Alan Modra  <amodra@bigpond.net.au>
5621
5622         * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
5623         (is_ppc64_elf_target): Rename from is_ppc64_target.  Update all
5624         callers.
5625         (ppc_stub_name): Remove trailing "+0" on stub name.
5626         (create_linkage_sections): Create relocations for
5627         branch lookup table when --emit-relocs as well as when --shared.
5628         (ppc_build_one_stub): Emit relocs for long branch stubs.  Adjust
5629         relbrlt test.  For --emit-stub-syms, always output a sym even when
5630         one already exists on a plt call stub.  Put stub type in the stub
5631         symbol name.
5632         (ppc_size_one_stub): Size long branch stub relocs.  Adjust relbrlt
5633         test.
5634         (ppc64_elf_size_stubs): Count global sym stubs added.  Zero
5635         reloc_count in stub sections.  Adjust relbrlt test.
5636         (ppc64_elf_build_stubs): Adjust relbrlt test.  Tweak stats output.
5637         * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
5638         (elf_link_input_bfd): Ignore symbol index zero relocs when checking
5639         for relocs against discarded symbols.  Fix comments.
5640
5641 2004-09-06  Mark Mitchell  <mark@codesourcery.com>
5642
5643         * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
5644         * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
5645         from ...
5646         (map_sections_to_segments): ... here.  Use it.  Assign a file
5647         position to the .dynamic section if it is not loadable, but part
5648         of the PT_DYNAMIC segment.
5649         * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5650         offsets, not VMAs, for the BPABI.  Do not fill in the header in
5651         the .got.plt section for the BPABI.
5652         * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
5653         PT_DYNAMIC segment.
5654         (elf_backend_want_got_plt): Define to zero for Symbian OS.
5655
5656 2004-09-06  Nick Clifton  <nickc@redhat.com>
5657
5658         * elflink.c (elf_link_add_object_symbols): Set the error code to
5659         bfd_error_wrong_format when the input format does not match the
5660         output format.
5661
5662 2004-09-06  Alan Modra  <amodra@bigpond.net.au>
5663
5664         * elf64-ppc.c (is_ppc64_target): New function, extracted from..
5665         (ppc64_elf_check_directives): ..here.
5666         (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
5667         before accessing ppc64_elf_tdata.
5668         (ppc64_elf_finish_dynamic_sections): And here too.
5669
5670 2004-09-04  Alan Modra  <amodra@bigpond.net.au>
5671
5672         * bfd.c (_bfd_default_error_handler): Correct loop exit.
5673
5674 2004-09-03  Mark Mitchell  <mark@codesourcery.com>
5675
5676         * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
5677         * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
5678         (bfd_elf32_littlearm_symbian_vec): Likewise.
5679         * configure: Regenerated.
5680         * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
5681         * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
5682         (PLT_ENTRY_SIZE): Likewise.
5683         (bfd_vma_elf32_arm_symbian_plt_entry): New
5684         variable.
5685         (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
5686         and symbian_p.
5687         (create_got_section): Don't create sections when generating BPABI
5688         objects.
5689         (elf32_arm_create_dynamic_sections): Tidy.
5690         (elf32_arm_link_hash_table_create): Set plt_header_size,
5691         plt_entry_size, and symbian_p.
5692         (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
5693         generating BPABI objects.
5694         (allocate_dynrelocs): Use htab->plt_header_size, not
5695         PLT_HEADER_SIZE.  Do not add to .got.plt when
5696         generating BPABI objects.
5697         (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
5698         * elfarm-nabi.c: Add SymbianOS target vectors.
5699         * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
5700         (_bfd_elf_link_create_dynamic_sections): Likewise.
5701         * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
5702         (elfNN_bed): Use it.
5703         * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
5704         (bfd_elf32_littlearm_symbian_vec): Likewise.
5705         (_bfd_target_vector): Add them.
5706
5707 2004-09-03  Nick Clifton  <nickc@redhat.com>
5708
5709         PR 360
5710         * coffcode.h (handle_COMDAT): Replace abort with an warning
5711         message and allow the scan to continue.
5712
5713 2004-09-02  Alan Modra  <amodra@bigpond.net.au>
5714
5715         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
5716         in when reading relocs, not our sorted syms.  Remove unnecessary
5717         var.
5718
5719 2004-08-31  Eric Botcazou  <ebotcazou@libertysurf.fr>
5720
5721         * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
5722
5723 2004-08-30  Nathanael Nerode  <neroden@gcc.gnu.org>
5724
5725         * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
5726         Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
5727         replace uses of *_alias with *_noncanonical.
5728         * aclocal.m4: Rebuild with aclocal 1.4p6.
5729         * Makefile.in: Rebuild with automake 1.4p6.
5730         * doc/Makefile.in: Rebuild with automake 1.4p6.
5731         * configure.in: Autoupdate with autoupdate 2.59.
5732         * config.in: Regenerate with autoheader 2.59.
5733         * configure: Regnerate with autoconf 2.59.
5734
5735 2004-08-28  Alan Modra  <amodra@bigpond.net.au>
5736
5737         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
5738         symbol pointer arrays before modifying.
5739
5740 2004-08-28  Alan Modra  <amodra@bigpond.net.au>
5741
5742         * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
5743         * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
5744         * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
5745         * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
5746         * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
5747         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
5748         Use both symbol tables on non-relocatable objects.  Use a common
5749         error exit.  Fix "mid" warning.
5750         * libbfd.h: Regenerate.
5751         * bfd-in2.h: Regenerate.
5752
5753 2004-08-28  Alan Modra  <amodra@bigpond.net.au>
5754
5755         * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
5756         object file.
5757         (struct sfpr_def_parms): Save some space.
5758         (sfpr_define): Here too.
5759
5760         * elf64-ppc.c (compare_symbols): Put section syms first.
5761         (sym_exists_at): New function.
5762         (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
5763         points only for relocatable files.  Use .opd section contents
5764         otherwise.  Generally clean up the code.
5765
5766 2004-08-27  Alan Modra  <amodra@bigpond.net.au>
5767
5768         * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
5769         LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
5770         (struct sfpr_def_parms): New.
5771         (sfpr_define): New function.
5772         (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
5773         (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
5774         (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
5775         (savefpr1_tail, restfpr1_tail): New functions.
5776         (savevr, savevr_tail, restvr, restvr_tail): New functions.
5777         (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
5778         (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
5779         code.  Define all ABI mandated _save and _rest functions.
5780
5781 2004-08-26  Paul Brook  <paul@codesourcery.com>
5782
5783         * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
5784
5785 2004-08-26  Alan Modra  <amodra@bigpond.net.au>
5786
5787         * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
5788         TRUE or FALSE.
5789
5790 2004-08-26  Alan Modra  <amodra@bigpond.net.au>
5791
5792         * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
5793         that pcrel correction is applied for R_386_PC32.
5794
5795 2004-08-25  Alan Modra  <amodra@bigpond.net.au>
5796
5797         * elf32-i386.c (elf_i386_relocate_section): Zero section contents
5798         for R_386_32 and R_386_PC32 relocs against symbols defined in
5799         discarded sections.
5800
5801 2004-08-25  Dmitry Diky  <diwil@spec.ru>
5802
5803         * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
5804         Add new relocations.
5805         * bfd-in2.h: Regenerate.
5806         * libbfd.h: Regenerate.
5807         * elf32-msp430.c: Clean-up code.
5808         (elf_msp430_howto_table): Add new relocation entries.
5809         (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
5810         (msp430_elf_relax_section): New function.
5811         (msp430_elf_relax_delete_bytes): New function.
5812         (msp430_elf_symbol_address_p): New function.
5813
5814 2004-08-24  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
5815
5816         * elf32-m32r.c (m32r_elf_relocate_section): Handle
5817         R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
5818
5819 2004-08-20  Daniel Jacobowitz  <dan@debian.org>
5820
5821         * elflink.c (_bfd_elf_section_already_linked): Handle
5822         SEC_LINK_DUPLICATES_SAME_CONTENTS.
5823
5824 2004-08-19  Mark Mitchell  <mark@codesourcery.com>
5825
5826         * config.bfd (arm*-*-symbianelf*): New target.
5827         (arm*-*-eabi*): Likewise.
5828
5829 2004-08-19  Alan Modra  <amodra@bigpond.net.au>
5830
5831         * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
5832         "struct ppc_link_hash_entry *".
5833         (ppc64_elf_relocate_section): Ditto for type of h.  Introduce h_elf
5834         to satisfy RELOC_FOR_GLOBAL_SYMBOL.
5835
5836 2004-08-19  Jakub Jelinek  <jakub@redhat.com>
5837
5838         * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
5839         entries (where fd_aux overlaps next entry's fd_func).
5840         Add non_overlapping argument, use it.
5841         (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
5842         ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5843         ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
5844         as indexes into opd_sym_map/opd_adjust array.
5845         * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
5846
5847 2004-08-18  Alan Modra  <amodra@bigpond.net.au>
5848
5849         * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
5850         if we can look up their function descriptor in a regular file.
5851
5852 2004-08-18  Nick Clifton  <nickc@redhat.com>
5853
5854         PR 324
5855         * cofflink.c (coff_link_add_symbols): Check that the comdat
5856         pointer in the coff_section_data structure has been initialised
5857         before using it.
5858
5859 2004-08-18  Alan Modra  <amodra@bigpond.net.au>
5860
5861         PR 338
5862         * elflink.c (bfd_elf_record_link_assignment): Add comment about
5863         changing bfd_link_hash_undefined to bfd_link_hash_new.
5864
5865 2004-08-17  Jakub Jelinek  <jakub@redhat.com>
5866
5867         * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
5868         if not yet defined.
5869         * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
5870         (synthetic_opd, synthetic_relocatable): New variables.
5871         (compare_symbols, compare_relocs): New helper routines.
5872         (ppc64_elf_get_synthetic_symtab): New function.
5873         * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
5874         to relsyms.
5875         * bfd-in2.h: Regenerated.
5876         * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
5877         to relsyms.  Return 0 if abfd is relocatable.
5878
5879 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
5880
5881         * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
5882
5883 2004-08-17  Nick Clifton  <nickc@redhat.com>
5884
5885         * (is_arm_mapping_symbol_name): New function - return true
5886         when a symbol name matches the requirements for an ARM mapping
5887         symbol name.
5888         (arm_elf_find_function): New function based on
5889         elf_find_function in elf.c but skipping ARM mapping symbols
5890         and including thumb function symbols.
5891         (elf32_arm_find_nearest_line): Use arm_elf_find_function.
5892         (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
5893
5894 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
5895
5896         * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
5897         (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
5898         (ppc64_elf_brtaken_reloc): Here too.
5899
5900 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
5901
5902         * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
5903         symbol visibility.
5904         (ppc64_elf_check_directives): Check that we have the right hash
5905         table before proceeding.
5906
5907 2004-08-17  Alan Modra  <amodra@bigpond.net.au>
5908
5909         * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
5910         (adjust_opd_syms): Attach opd syms for deleted entries to one of
5911         the sections that will be discarded.
5912
5913 2004-08-16  Alan Modra  <amodra@bigpond.net.au>
5914
5915         * elflink.c (elf_section_complain_discarded): Ignore .fixup.
5916
5917 2004-08-16  Alan Modra  <amodra@bigpond.net.au>
5918
5919         * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
5920         free space available.
5921
5922 2004-08-16  Alan Modra  <amodra@bigpond.net.au>
5923
5924         * pdp11.c (struct pdp11_aout_reloc_external): Delete.  Replace
5925         occurrences with bfd_byte * thoughout file.
5926
5927         * coff-rs6000.c (do_shared_object_padding): Warning fix.
5928         (xcoff_write_armap_big): Likewise.
5929         (xcoff_write_archive_contents_old): Likewise.
5930         (xcoff_write_archive_contents_big): Likewise.
5931
5932         * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
5933
5934 2004-08-13  Nick Clifton  <nickc@redhat.com>
5935
5936         * elf32-arm.h: Convert to ISO C90.
5937
5938 2004-08-13  Alan Modra  <amodra@bigpond.net.au>
5939
5940         PR 293
5941         * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
5942         zero the plt field.
5943
5944 2004-08-13  Alan Modra  <amodra@bigpond.net.au>
5945
5946         * bfd.c (_bfd_default_error_handler): Handle %A and %B.
5947         (bfd_archive_filename, bfd_get_section_ident): Delete.
5948         * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
5949         bfd_archive_filename.
5950         * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
5951         to warn about symbols in discarded sections.  Use _bfd_error_handler.
5952         * aout-adobe.c (aout_adobe_callback): See below.
5953         * aout-cris.c (swap_ext_reloc_in): ..
5954         * coff-arm.c (find_thumb_glue, find_arm_glue,
5955         coff_arm_relocate_section, bfd_arm_process_before_allocation,
5956         coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
5957         coff_arm_copy_private_bfd_data): ..
5958         * coff-i860.c (i860_reloc_processing): ..
5959         * coff-mcore.c (mcore_coff_unsupported_reloc,
5960         coff_mcore_relocate_section): ..
5961         * coff-ppc.c (coff_ppc_relocate_section): ..
5962         * coff-rs6000.c (xcoff_create_csect_from_smclas
5963         * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5964         sh_swap_insns, sh_relocate_section): ..
5965         * coff-tic54x.c (tic54x_reloc_processing): ..
5966         * coff-tic80.c (coff_tic80_relocate_section): ..
5967         * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
5968         * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
5969         coff_slurp_symbol_table, coff_classify_symbol,
5970         coff_slurp_reloc_table): ..
5971         * coffgen.c (_bfd_coff_read_string_table): ..
5972         * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
5973         _bfd_coff_generic_relocate_section): ..
5974         * cpu-arm.c (bfd_arm_merge_machines): ..
5975         * cpu-sh.c (sh_merge_bfd_arch): ..
5976         * elf-hppa.h (elf_hppa_relocate_section): ..
5977         * elf.c (bfd_elf_string_from_elf_section, setup_group,
5978         _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
5979         assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
5980         copy_private_bfd_data, _bfd_elf_validate_reloc): ..
5981         * elf32-arm.h (find_thumb_glue, find_arm_glue,
5982         bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
5983         elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
5984         elf32_arm_relocate_section, elf32_arm_set_private_flags,
5985         elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
5986         * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
5987         cris_elf_merge_private_bfd_data
5988         * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
5989         * elf32-gen.c (elf32_generic_link_add_symbols): ..
5990         * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
5991         elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
5992         elf32_hppa_relocate_section): ..
5993         * elf32-i370.c (i370_elf_merge_private_bfd_data,
5994         i370_elf_check_relocs, i370_elf_relocate_section): ..
5995         * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
5996         elf_i386_relocate_section): ..
5997         * elf32-m32r.c (m32r_elf_relocate_section,
5998         m32r_elf_merge_private_bfd_data): ..
5999         * elf32-m68hc1x.c (m68hc12_add_stub,
6000         _bfd_m68hc11_elf_merge_private_bfd_data): ..
6001         * elf32-m68k.c (elf_m68k_relocate_section): ..
6002         * elf32-mcore.c (mcore_elf_unsupported_reloc,
6003         mcore_elf_relocate_section): ..
6004         * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
6005         ppc_elf_check_relocs, ppc_elf_relocate_section,
6006         ppc_elf_begin_write_processing): ..
6007         * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
6008         elf_s390_relocate_section): ..
6009         * elf32-sh-symbian.c (sh_symbian_import_as,
6010         sh_symbian_process_embedded_commands,
6011         sh_symbian_relocate_section): ..
6012         * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
6013         sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
6014         sh_elf_merge_private_data): ..
6015         * elf32-sparc.c (elf32_sparc_check_relocs,
6016         elf32_sparc_relocate_section,
6017         elf32_sparc_merge_private_bfd_data): ..
6018         * elf32-v850.c (v850_elf_check_relocs,
6019         v850_elf_merge_private_bfd_data): ..
6020         * elf32-xtensa.c (elf_xtensa_check_relocs,
6021         elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
6022         * elf64-alpha.c (elf64_alpha_relax_with_lituse,
6023         elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
6024         elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
6025         * elf64-gen.c (elf64_generic_link_add_symbols): ..
6026         * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
6027         ppc64_elf_check_relocs, ppc64_elf_edit_opd,
6028         ppc64_elf_relocate_section): ..
6029         * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
6030         elf_s390_relocate_section): ..
6031         * elf64-sh64.c (sh_elf64_relocate_section): ..
6032         * elf64-sparc.c (sparc64_elf_check_relocs,
6033         sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
6034         sparc64_elf_merge_private_bfd_data): ..
6035         * elf64-x86-64.c (elf64_x86_64_check_relocs,
6036         elf64_x86_64_relocate_section): ..
6037         * elflink.c (_bfd_elf_add_default_symbol,
6038         _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
6039         _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
6040         bfd_elf_size_dynamic_sections, elf_link_output_extsym,
6041         elf_get_linked_section_vma, elf_fixup_link_order,
6042         bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
6043         bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
6044         * elfxx-ia64.c (elfNN_ia64_relax_section,
6045         elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
6046         * elfxx-mips.c (mips_elf_perform_relocation,
6047         _bfd_mips_elf_check_relocs,
6048         _bfd_mips_elf_merge_private_bfd_data): ..
6049         * ieee.c (ieee_slurp_external_symbols): ..
6050         * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
6051         * libbfd.c (_bfd_generic_verify_endian_match): ..
6052         * linker.c (_bfd_generic_link_add_one_symbol,
6053         _bfd_generic_section_already_linked): ..
6054         * pdp11.c (translate_to_native_sym_flags): ..
6055         * pe-mips.c (coff_pe_mips_relocate_section): ..
6056         * peicode.h (pe_ILF_build_a_bfd): ..
6057         * srec.c (srec_bad_byte): ..
6058         * stabs.c (_bfd_link_section_stabs): ..
6059         * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
6060         Replace all uses of bfd_archive_filename and bfd_get_section_ident
6061         with corresponding %B and %A in _bfd_error_handler format string.
6062         Replace occurrences of "fprintf (stderr," with _bfd_error_handler
6063         calls to use %A and %B.  Fix "against symbol .. from section" and
6064         similar error messages.  Combine multiple _bfd_error_handler calls
6065         where they were separated due to bfd_archive_filename deficiencies.
6066         * bfd-in2.h: Regenerate.
6067
6068 2004-08-12  H.J. Lu  <hongjiu.lu@intel.com>
6069
6070         * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
6071         relocation.
6072
6073 2004-08-10  Alan Modra  <amodra@bigpond.net.au>
6074
6075         * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
6076         (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
6077         Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
6078         Add twiddled_syms.
6079         (link_hash_newfunc): Init was_undefined.
6080         (add_symbol_adjust): Don't set undefined dot symbols to defweak;
6081         Use undefweak instead.
6082         (ppc64_elf_check_directives): Fix undefs chain.
6083         (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
6084         references.
6085         (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
6086         (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
6087         * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
6088
6089 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
6090
6091         * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
6092         error, test input_section flags rather than sec.
6093
6094 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
6095
6096         * elf-bfd.h (struct elf_backend_data): Add
6097         elf_backend_archive_symbol_lookup.
6098         (_bfd_elf_archive_symbol_lookup): Declare.
6099         * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
6100         (elf_link_add_archive_symbols): ..extracted from here.  Call the
6101         backend version.
6102         * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
6103         (elfNN_bed): Init new field.
6104         * elf64-ppc.c (elf_backend_check_directives): Define.
6105         (elf_backend_archive_symbol_lookup): Define.
6106         (struct ppc_link_hash_table): Add tls_get_add_fd.  Make tls_get_add
6107         a ppc_link_hash_entry pointer.
6108         (get_fdh): Move.
6109         (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
6110         (add_symbol_adjust, ppc64_elf_check_directives): New functions.
6111         (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
6112         ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
6113         ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
6114         ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
6115         ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
6116         descriptor symbols.
6117
6118 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
6119
6120         * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
6121         (ppc64_elf_add_symbol_hook): Test for NULL section.
6122         (get_sym_h): Formatting.
6123         (ppc64_elf_size_stubs): Include reloc addend in value stored as
6124         stub target_value.
6125
6126         * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
6127         long branch stubs with code handling plt and r2off branch stubs.
6128
6129 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
6130
6131         * elf-bfd.h (_bfd_elf_gc_mark): Declare.
6132         * elflink.c (elf_link_input_bfd): Formatting.
6133         (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global.  Adjust
6134         all callers.
6135         * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
6136         (link_hash_newfunc): Don't set it.
6137         (ppc64_elf_copy_indirect_symbol): Nor copy it.
6138         (ppc64_elf_mark_entry_syms): Delete.
6139         (ppc64_elf_gc_mark_hook): Mark entry syms here.  Also mark opd
6140         sections.  Use get_opd_info.
6141         * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
6142
6143 2004-08-09  Alan Modra  <amodra@bigpond.net.au>
6144
6145         * elf64-ppc.c (adjust_opd_syms): Fix merge error.
6146
6147         * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
6148         (func_desc_adjust): Don't set have_undefweak.
6149         (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
6150         (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
6151
6152         * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
6153         "struct ppc_link_hash_entry *".  Adjust all references.
6154         (ppc64_elf_hide_symbol): Correct a comment.
6155
6156         * elf64-ppc.c (get_opd_info): New function.
6157         (adjust_opd_syms): Use get_opd_info.  Define removed symbols as zero.
6158         (ppc64_elf_edit_opd): Use get_opd_info.  Check that sym has a dot
6159         before calling get_fdh.  Test fdh rather than h before dereferencing
6160         fdh.  Mark removed symbols in opd_adjust.
6161         (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
6162         (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
6163         opd symbols.
6164         (ppc64_elf_output_symbol_hook): Likewise.
6165
6166 2004-08-06  Paul Brook  <paul@codesourcery.com>
6167
6168         * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
6169         (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
6170         BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
6171         * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
6172         and BFD_RELOC_ARM_SBREL32.
6173         * bfd-in2.h, bbfd.h: Regenerate.
6174
6175 2004-08-01  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
6176
6177         * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
6178         the dynamic link symbol actually in use.
6179
6180 2004-08-01  Stephane Carrez  <stcarrez@nerim.fr>
6181
6182         * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
6183
6184 2004-07-31  Joel Brobecker  <brobecker@gnat.com>
6185             Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
6186
6187         * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
6188         SHN_MIPS_TEXT and SHN_MIPS_DATA.
6189
6190 2004-07-30  H.J. Lu  <hongjiu.lu@intel.com>
6191             Nick Clifton  <nickc@redhat.com>
6192
6193         PR 290
6194         * bfd.c (_bfd_default_error_handler): Make it global.
6195
6196         * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
6197
6198         * elf.c (assign_section_numbers): Cope gracefully with sections
6199         which have SHF_LINK_ORDER set but no sh_link set up.
6200         * elflink.c (elf_get_linked_section_vma): Likewise.
6201
6202         * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
6203         it to NULL.
6204
6205         * elfxx-target.h (elf_backend_link_order_error_handler): New.
6206         Set it to _bfd_default_error_handler.
6207         (elfNN_bed): Add elf_backend_link_order_error_handler.
6208
6209         * libbfd-in.h (_bfd_default_error_handler): New.
6210
6211         * libbfd.h: Regenerated.
6212
6213 2004-07-30  Jakub Jelinek  <jakub@redhat.com>
6214
6215         * archures.c (bfd_mach_sparc_64bit_p): Define.
6216         * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
6217         * bfd-in2.h: Rebuilt.
6218
6219 2004-07-29  Alexandre Oliva  <aoliva@redhat.com>
6220
6221         Introduce SH2a support.
6222         2004-02-18  Corinna Vinschen  <vinschen@redhat.com>
6223         * archures.c (bfd_mach_sh2a_nofpu): New.
6224         * bfd-in2.h: Rebuilt.
6225         * cpu-sh.c (SH2A_NOFPU_NEXT): New.
6226         (arch_info_struct): Add sh2a_nofpu.
6227         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
6228         2003-12-29  DJ Delorie  <dj@redhat.com>
6229         * reloc.c: Add relocs for sh2a.
6230         * bfd-in2.h: Regenerate.
6231         * libbfd.hh: Regenerate.
6232         2003-12-01  Michael Snyder  <msnyder@redhat.com>
6233         * archures.c (bfd_mach_sh2a): New.
6234         * bfd-in2.h: Rebuilt.
6235         * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
6236         (SH2A_NEXT): New.
6237         (arch_info_struct): Add sh2a.
6238         * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
6239
6240 2004-07-28  Nick Clifton  <nickc@redhat.com>
6241             John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
6242
6243         PR 273
6244         * som.c (setup_sections): Improve estimation of space sizes in
6245         relocatable objects.
6246
6247 2004-07-27  Jason Thorpe  <thorpej@wasabisystems.com>
6248         * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
6249         bfd_elf32_hppa_nbsd_vec.  Add bfd_elf32_hppa_linux_vec
6250         to targ_selvecs.
6251         * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
6252         * configure: Regenerate.
6253         * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
6254         case that accepts OSABI=NetBSD and OSABI=SysV.
6255         (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
6256         the base of .got or .data (if .got does not exist).
6257         (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
6258         set OSABI=NetBSD.
6259         (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
6260         (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
6261         * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
6262         (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
6263
6264 2004-07-27  H.J. Lu  <hongjiu.lu@intel.com>
6265
6266         PR 161/251
6267         * elf-bfd.h (bfd_elf_section_data): Add sec_group.
6268         (elf_sec_group): Defined.
6269         (bfd_elf_match_symbols_in_sections): New prototype.
6270         (_bfd_elf_setup_group_pointers): Likewise.
6271
6272         * elf.c (bfd_elf_discard_group): Abort.
6273         (bfd_elf_set_group_contents): Also include relocation sections.
6274         Remove zero-fill for ld -r.
6275         (_bfd_elf_setup_group_pointers): New function.
6276         (elf_sort_elf_symbol): Likewise.
6277         (elf_sym_name_compare): Likewise.
6278         (bfd_elf_match_symbols_in_sections): Likewise.
6279
6280         * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
6281
6282         * elflink.c (match_group_member): New.
6283         (elf_link_input_bfd): Check group member for discarded section.
6284         (try_match_symbols_in_sections): New function.
6285         (already_linked): Likewise.
6286         (_bfd_elf_section_already_linked): Support mixing comdat group
6287         and linkonce section.
6288
6289         * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
6290         * linker.c (bfd_section_already_linked_table_traverse): New.
6291
6292         * libbfd.h: Regenerated.
6293
6294 2004-07-27  Tomer Levi  <Tomer.Levi@nsc.com>
6295
6296         * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
6297         BFD_RELOC_CRX_SWITCH32.
6298         * bfd-in2.h: Regenerate.
6299         * libbfd.h: Regenerate.
6300         * elf32-crx.c: Support relocation/relaxation of
6301         BFD_RELOC_CRX_SWITCH* types.
6302
6303 2004-07-27  Alan Modra  <amodra@bigpond.net.au>
6304
6305         * elf64-ppc.c: Correct "Linker stubs" comment.
6306
6307 2004-07-26  H.J. Lu  <hongjiu.lu@intel.com>
6308
6309         * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
6310         linked-to section.
6311         (elf_linked_to_section): New.
6312
6313         * elf.c (assign_section_numbers): Set up sh_link for
6314         SHF_LINK_ORDER.
6315
6316         * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
6317         to sh_link for SHT_IA_64_UNWIND sections.
6318
6319 2004-07-22  H.J. Lu  <hongjiu.lu@intel.com>
6320
6321         * elflink.c (elf_fixup_link_order): Add _() to error message.
6322
6323 2004-07-22  H.J. Lu  <hongjiu.lu@intel.com>
6324
6325         * elflink.c (elf_fixup_link_order): Issue a warning and flag
6326         an error if failed.
6327
6328 2004-07-21  H.J. Lu  <hongjiu.lu@intel.com>
6329
6330         * aout-adobe.c (aout_32_section_already_linked): Defined.
6331         * aout-target.h (MY_section_already_linked): Likewise.
6332         * aout-tic30.c (MY_section_already_linked): Likewise.
6333         * binary.c (binary_section_already_linked): Likewise.
6334         * bout.c (b_out_section_already_linked): Likewise.
6335         * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
6336         * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
6337         * coffcode.h (coff_section_already_linked): Likewise.
6338         * i386msdos.c (msdos_section_already_linked): Likewise.
6339         * i386os9k.c (os9k_section_already_linked): Likewise.
6340         * ieee.c (ieee_section_already_linked): Likewise.
6341         * ihex.c (ihex_section_already_linked): Likewise.
6342         * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
6343         * mmo.c (mmo_section_already_linked): Likewise.
6344         * nlm-target.h (nlm_section_already_linked): Likewise.
6345         * oasys.c (oasys_section_already_linked): Likewise.
6346         * pef.c (bfd_pef_section_already_linked): Likewise.
6347         * ppcboot.c (ppcboot_section_already_linked): Likewise.
6348         * som.c (som_bfd_discard_group): Likewise.
6349         * srec.c (srec_section_already_linked): Likewise.
6350         * tekhex.c (tekhex_section_already_linked): Likewise.
6351         * versados.c (versados_section_already_linked): Likewise.
6352         * vms.c (vms_section_already_linked): Likewise.
6353         * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
6354         * xsym.c (bfd_sym_section_already_linked): Likewise.
6355
6356         * bfd-in.h (bfd_section_already_linked_table_init): New.
6357         (bfd_section_already_linked_table_free): Likewise.
6358
6359         * coff-rs6000.c (rs6000coff_vec): Add
6360         _bfd_generic_section_already_linked.
6361         (pmac_xcoff_vec): Likewise.
6362         * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6363         (aix5coff64_vec): Likewise.
6364
6365         * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
6366         * elflink.c (_bfd_elf_section_already_linked): New function.
6367
6368         * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
6369
6370         * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
6371         (_bfd_generic_section_already_linked): New.
6372         (bfd_section_already_linked_hash_entry): Likewise.
6373         (bfd_section_already_linked): Likewise.
6374         (bfd_section_already_linked_table_lookup): Likewise.
6375         (bfd_section_already_linked_table_insert): Likewise.
6376
6377         * linker.c (bfd_section_already_linked): New.
6378         (_bfd_section_already_linked_table): Likewise.
6379         (bfd_section_already_linked_table_lookup): Likewise.
6380         (bfd_section_already_linked_table_insert): Likewise.
6381         (already_linked_newfunc): Likewise.
6382         (bfd_section_already_linked_table_init): Likewise.
6383         (bfd_section_already_linked_table_free): Likewise.
6384         (_bfd_generic_section_already_linked): Likewise.
6385
6386         * section.c (bfd_section): Remove comdat.
6387         (bfd_comdat_info): Moved to ...
6388         * bfd-in.h (coff_comdat_info): Here.
6389         (bfd_coff_get_comdat_section): New.
6390         * coffgen.c (bfd_coff_get_comdat_section): Likewise.
6391         * libcoff-in.h (coff_section_tdata): Add comdat.
6392         * coffcode.h (handle_COMDAT): Updated.
6393         * cofflink.c (coff_link_add_symbols): Likewise.
6394         * ecoff.c (bfd_debug_section): Likewise.
6395
6396         * targets.c (bfd_target): Add _section_already_linked.
6397         (BFD_JUMP_TABLE_LINK): Updated.
6398
6399         * bfd-in2.h: Regenerated.
6400         * libbfd.h: Likewise.
6401         * libcoff.h: Likewise.
6402
6403 2003-07-21  Paul Brook  <paul@codesourcery.com>
6404
6405         * elflink.c (elf_get_linked_section_vma, compare_link_order,
6406         elf_fixup_link_order): New functions.
6407         (bfd_elf_final_link): Call elf_fixup_link_order.
6408
6409 2004-07-21  Alexandre Oliva  <aoliva@redhat.com>
6410
6411         * elf-bfd.h (ELF_COMMON_DEF_P): New.
6412         * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
6413         common definitions.
6414         * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
6415         _bfd_elf_symbol_refs_local_p.
6416         * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
6417         symbols.
6418
6419 2004-07-19  H.J. Lu  <hongjiu.lu@intel.com>
6420
6421         * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
6422         DYN_NO_NEEDED.
6423         (bfd_elf_get_dyn_lib_class): New prototype.
6424         * elf.c (bfd_elf_get_dyn_lib_class): New function.
6425
6426         * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
6427         DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
6428         entry is needed. Issue an error if a DT_NEEDED entry is needed
6429         for a file marked DYN_NO_NEEDED.
6430         (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
6431         for DT_NEEDED tags.
6432
6433         * bfd-in2.h: Regenerated.
6434
6435 2004-07-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
6436
6437         * elflink.c (elf_section_complain_discarded): Don't complain in
6438         .PARISC.unwind.
6439
6440 2004-07-10  James E Wilson  <wilson@specifixinc.com>
6441
6442         * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
6443         (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
6444         (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
6445         elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
6446         Fix callers.
6447         (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64.  Change
6448         bfd_put_64 to bfd_putl64.
6449         (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
6450
6451 2004-07-09  H.J. Lu  <hongjiu.lu@intel.com>
6452
6453         PR 240
6454         * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
6455         .init/.fini sections when trying to relax it.
6456
6457 2004-07-09  Jie Zhang  <zhangjie@magima.com.cn>
6458
6459         * elf.c (assign_file_positions_for_segments): Make sure the
6460         .dynamic section is the first section in the PT_DYNAMIC segment.
6461
6462 2004-07-09  Nick Clifton  <nickc@redhat.com>
6463
6464         * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
6465         * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
6466         sh_elf_get_flags_from_mach functions so that they do not conflict
6467         when this target is built with other sh-elf targets.
6468         * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
6469         suppression of this function.
6470         (sh_elf_find_flags): Likewise.
6471
6472 2004-07-07  Tomer Levi  <Tomer.Levi@nsc.com>
6473
6474         * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
6475         (ALL_MACHINES_CFILES): Add cpu-crx.c.
6476         (BFD32_BACKENDS): Add elf32-crx.lo.
6477         (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
6478         (cpu-crx.lo): New target.
6479         (elf32-crx.lo): New target.
6480         * Makefile.in: Regenerate.
6481         * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
6482         (bfd_archures_list): Add bfd_crx_arch.
6483         * bfd-in2.h: Regenerate.
6484         * config.bfd: Handle crx-*-elf*, crx*.
6485         * configure.in: Handle bfd_elf32_crx_vec.
6486         * configure: Regenerate.
6487         * cpu-crx.c: New file.
6488         * elf32-crx.c: Likewise.
6489         * libbfd.h: Regenerate.
6490         * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
6491         BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
6492         BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
6493         BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
6494         BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
6495         BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
6496         * targets.c (bfd_elf32_crx_vec): Declare.
6497         (bfd_target_vector): Add bfd_elf32_crx_vec.
6498
6499 2004-07-06  Nick Clifton  <nickc@redhat.com>
6500
6501         * config.bfd: Add sh-symbian-elf target.
6502         * configure.in: Add bfd_elf32_shl_symbian_vec.
6503         * configure: Regenerate.
6504         * elf-bfd.h (struct elf_backend_data): Add new field
6505         'check_directives'.
6506         * elflink.c (elf_link_add_object_symbols): Invoke the
6507         check_directives function, if defined.
6508         * elfxx-target.h: Provide a default, NULL definition for
6509         check_directives.
6510         * targets.c: Add bfd_elf32_shl_symbian_vec.
6511         * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
6512         definition.
6513         (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
6514         * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
6515         (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
6516         not already been defined.
6517         * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
6518         * sh-symbian.c: New file.  Provide functions to support the
6519         * sh-symbian-elf target.
6520         * Makefile.am: Add elf32-sh-symbian.c
6521         * Makefile.in: Regenerate.
6522
6523 2004-07-05  Andrew Stubbs <andrew.stubbs@superh.com>
6524
6525         * elf32-sh.c: Include ../opcodes/sh-opc.h.
6526         * Makefile.am: Ran make dep-am.
6527         * Makefile.in: Ran make dep-in.
6528
6529 2004-07-03  Aaron W. LaFramboise  <aaron98wiridge9@aaronwl.com>
6530
6531         * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
6532         externals properly.
6533
6534 2004-07-02  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6535
6536         * config.bfd: Add want64 to configuration target s390-*-linux*.
6537
6538 2004-07-01  H.J. Lu  <hongjiu.lu@intel.com>
6539
6540         * bfd.c (bfd_get_section_ident): New.
6541
6542         * elflink.c (elf_link_read_relocs_from_section): Call
6543         bfd_get_section_ident to identify the section when reporting
6544         error.
6545         (_bfd_elf_link_output_relocs): Likewise.
6546         (elf_link_output_extsym): Likewise.
6547         (elf_link_input_bfd): Likewise.
6548         (bfd_elf_gc_record_vtinherit): Likewise.
6549
6550         * bfd-in2.h: Regenerated.
6551
6552 2004-07-01  Jie Zhang  <zhangjie@magima.com.cn>
6553             Nick Clifton  <nickc@redhat.com>
6554
6555         PR 204
6556         * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
6557         of section symbols to mips_elf_sort_hash_table ().
6558
6559 2004-07-01  Alan Modra  <amodra@bigpond.net.au>
6560
6561         * elflink.c (elf_section_ignore_discarded_relocs): Revert last
6562         change.  Comment.
6563         (elf_section_complain_discarded): New function.  Handle
6564         .gcc_except_table too.
6565         (elf_link_input_bfd): Rewrite handling of relocs against symbols
6566         in discarded sections.
6567         * elf-bfd.h (elf_discarded_section): Protect macro arg.
6568
6569 2004-06-30  James E Wilson  <wilson@specifixinc.com>
6570
6571         * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff.  Initialize
6572         to NULL.  Call get_pltoff if NULL and NEED_PLTOFF is true.
6573
6574 2004-06-30  H.J. Lu  <hongjiu.lu@intel.com>
6575
6576         PR 233
6577         * elflink.c (elf_link_input_bfd): Issue an error for non-debug
6578         local references to discarded sections and report their
6579         locations.
6580
6581 2004-06-30  Alan Modra  <amodra@bigpond.net.au>
6582
6583         * elflink.c (elf_section_ignore_discarded_relocs): Don't test
6584         sec_info_type, test section name instead.
6585
6586 2004-06-29  H.J. Lu  <hongjiu.lu@intel.com>
6587
6588         PR 240
6589         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
6590         in .init/.fini sections.
6591
6592 2004-06-29  Bob Wilson  <bob.wilson@acm.org>
6593
6594         * elf32-xtensa.c (elf_xtensa_relocate_section): Use
6595         bfd_get_section_limit.
6596
6597 2004-06-29  Bob Wilson  <bob.wilson@acm.org>
6598
6599         * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
6600         output section size.
6601
6602 2004-06-29  Alan Modra  <amodra@bigpond.net.au>
6603
6604         * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
6605         rawsize.
6606         (mmix_elf_perform_relocation): Adjust for above change.
6607         (mmix_elf_relocate_section): Likewise.
6608         (mmix_elf_relax_section): Likewise.  Use output_section->rawsize.
6609         (mmix_elf_get_section_contents): Delete.
6610         (bfd_elf64_get_section_contents): Delete.
6611         (mmix_elf_relocate_section): Zero stub area.
6612         * linker.c (default_indirect_link_order): Alloc max of section size
6613         and rawsize.
6614         * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
6615         * section.c (bfd_malloc_and_get_section): Likewise.
6616         (struct bfd_section): Update rawsize comment.
6617         * bfd-in2.h: Regenerate.
6618
6619         * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
6620
6621 2004-06-29  Alan Modra  <amodra@bigpond.net.au>
6622
6623         * bfd-in.h (bfd_get_section_limit): Define.
6624         * reloc.c (bfd_perform_relocation, bfd_install_relocation)
6625         (_bfd_final_link_relocate): Use bfd_get_section_limit.
6626         * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
6627         * coff-arm.c (coff_arm_relocate_section): Likewise.
6628         * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
6629         * cpu-ns32k.c (do_ns32k_reloc): Likewise.
6630         (bfd_ns32k_final_link_relocate): Likewise.
6631         * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
6632         * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
6633         * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
6634         (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
6635         * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
6636         (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
6637         * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
6638         * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6639         * elf32-or32.c (or32_elf_consth_reloc): Likewise.
6640         * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
6641         * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
6642         * elf32-sh.c (sh_elf_reloc_loop): Likewise.
6643         * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
6644         (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
6645         * elf32-v850.c (v850_elf_reloc): Likewise.
6646         * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
6647         * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
6648         * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
6649         * elf64-mips.c (mips_elf64_gprel32_reloc)
6650         (mips16_gprel_reloc): Likewise.
6651         * elf64-mmix.c (mmix_elf_reloc): Likewise.
6652         * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
6653         * elf64-sparc.c (init_insn_reloc): Likewise.
6654         * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6655         * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
6656         (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
6657         (_bfd_mips_elf_generic_reloc): Likewise.
6658         * bfd-in2.h: Regenerate.
6659
6660 2004-06-28  Alan Modra  <amodra@bigpond.net.au>
6661
6662         * bfd-in.h (struct stab_info): Move from stabs.c.
6663         * stabs.c (struct stab_link_includes_table): Delete.
6664         (stab_link_includes_lookup): Delete.
6665         (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
6666         level of indirection from sinfo parm.
6667         (_bfd_link_section_stabs): Likewise.  Set SEC_LINKER_CREATED on
6668         stabstr section.  Adjust hash table accesses.
6669         * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
6670         alloc.  Adjust stab_info test.
6671         * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
6672         (_bfd_coff_final_link): Adjust stab_info test.
6673         (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
6674         * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
6675         in place.
6676         * libcoff-in.h (struct coff_link_hash_table): Likewise.
6677         * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
6678         * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
6679         stabstr section.  Adjust stab_info test.
6680         * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
6681         (_bfd_write_stab_strings): Adjust prototypes.
6682         * libbfd.h: Regenerate.
6683         * libcoff.h: Regenerate.
6684         * bfd-in2.h: Regenerate.
6685
6686 2004-06-27  Mark Kettenis  <kettenis@gnu.org>
6687
6688         From Miod Vallat <miod@online.fr>:
6689         * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
6690
6691 2004-06-26  Alexandre Oliva  <aoliva@redhat.com>
6692
6693         * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
6694         (struct elf32_mn10300_link_hash_entry): Remove
6695         pcrel_relocs_copied.
6696         (mn10300_elf_check_relocs): Only reserve dynamic relocations for
6697         R_MN10300_32.  Don't adjust pcrel_relocs_copied.
6698         (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
6699         and gotoff relocations if the symbol doesn't bind locally.  Use
6700         _bfd_elf_symbol_refs_local_p to test.  Don't create dynamic
6701         relocation for PCREL32.
6702         (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
6703         to test whether a symbol binds locally.
6704         (elf32_mn10300_link_hash_newfunc): Don't initialize
6705         pcrel_relocs_copied.
6706         (_bfd_mn10300_elf_discard_copies): Delete.
6707         (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
6708
6709 2004-06-26  Mark Kettenis  <kettenis@gnu.org>
6710
6711         * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
6712
6713 2004-06-25  Joel Brobecker  <brobecker@gnat.com>
6714
6715         * som.c (som_set_reloc_info): Correct small typo.
6716
6717 2004-06-25  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
6718
6719         * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
6720         (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
6721         (m32r_elf_gcsweep_hook): Likewise.
6722         (m32r_elf_check_relocs): Likewise.
6723         (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
6724         R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
6725         * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
6726         BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
6727         * bfd-in2.h: Regenerated.
6728         * libbfd.h: Regenerated.
6729
6730 2004-06-24  H.J. Lu  <hongjiu.lu@intel.com>
6731
6732         * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
6733         relocation symbol.
6734         (elf64_x86_64_relocate_section): Issue an error for
6735         R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
6736         against global symbols when building shared library.
6737
6738 2004-06-24  Alan Modra  <amodra@bigpond.net.au>
6739
6740         * section.c (struct sec): Rename "_cooked_size" to "size".
6741         Rename "_raw_size" to "rawsize".
6742         (STD_SECTION): Adjust comments.
6743         (bfd_set_section_size, bfd_get_section_contents): Use size.
6744         (bfd_malloc_and_get_section): New function.
6745         * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
6746         * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
6747         Correctly free reloc and contents memory.
6748         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
6749         and fake CIE now that we can shink section size to zero.
6750         (_bfd_elf_write_section_eh_frame): Likewise..
6751         * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
6752         * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
6753         _bfd_stab_section_offset.  Use _bfd_elf_section_offset.
6754         * stabs.c (_bfd_stab_section_offset_): Remove unused args and
6755         unneeded indirection.
6756         * elf.c (_bfd_elf_section_offset): .. and update call.
6757         * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
6758         * libbfd.h: Regenerate.
6759         * bfd-in2.h: Regenerate.
6760
6761         Replace occurrences of "_raw_size" and "_cooked_size" in most places
6762         with "size".  Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
6763         sections.  Use "rawsize", if non-zero, for bfd_get_section_contents
6764         calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
6765         Similarly use "rawsize", if non-zero, in reloc functions to validate
6766         reloc addresses.  Use new bfd_malloc_and_get_section in most places
6767         where bfd_get_section_contents was called.  Expand all occurrences of
6768         bfd_section_size and bfd_get_section_size.  Rename "raw_size" var in
6769         grok_prstatus and similar functions to "size".
6770         * aix386-core.c (aix386_core_file_p): ..
6771         * aix5ppc-core.c (xcoff64_core_p): ..
6772         * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
6773         aout_adobe_set_section_contents): ..
6774         * aout-target.h (callback): ..
6775         * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
6776         MY_bfd_final_link): ..
6777         * aoutf1.h (sunos4_core_file_p): ..
6778         * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6779         adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
6780         final_link, aout_link_input_section): ..
6781         * binary.c (binary_object_p, binary_canonicalize_symtab,
6782         binary_set_section_contents): ..
6783         * bout.c (b_out_callback, b_out_write_object_contents,
6784         b_out_set_section_contents, b_out_bfd_relax_section,
6785         b_out_bfd_get_relocated_section_contents): ..
6786         * cisco-core.c (cisco_core_file_validate): ..
6787         * coff-alpha.c (alpha_ecoff_object_p,
6788         alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
6789         * coff-arm.c (coff_arm_relocate_section,
6790         bfd_arm_allocate_interworking_sections): ..
6791         * coff-h8300.c (h8300_reloc16_extra_cases,
6792         h8300_bfd_link_add_symbols): ..
6793         * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
6794         * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
6795         ppc_bfd_coff_final_link): ..
6796         * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
6797         * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6798         sh_align_loads, sh_coff_get_relocated_section_contents): ..
6799         * coff64-rs6000.c (xcoff64_write_object_contents,
6800         xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
6801         * coffcode.h (coff_compute_section_file_positions,
6802         coff_write_object_contents): ..
6803         * coffgen.c (make_a_section_from_file, coff_write_symbols,
6804         coff_section_symbol, build_debug_section): ..
6805         * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
6806         process_embedded_commands, _bfd_coff_link_input_bfd,
6807         _bfd_coff_write_global_sym): ..
6808         * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
6809         * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
6810         * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
6811         * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
6812         _bfd_dwarf2_find_nearest_line): ..
6813         * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
6814         ecoff_compute_section_file_positions,
6815         _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
6816         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
6817         _bfd_elf_discard_section_eh_frame_hdr,
6818         _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
6819         _bfd_elf_write_section_eh_frame,
6820         _bfd_elf_write_section_eh_frame_hdr): ..
6821         * elf-hppa.h (elf_hppa_sort_unwind): ..
6822         * elf-m10200.c (mn10200_elf_relax_section,
6823         mn10200_elf_relax_delete_bytes,
6824         mn10200_elf_get_relocated_section_contents): ..
6825         * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
6826         mn10300_elf_check_relocs, mn10300_elf_relax_section,
6827         mn10300_elf_relax_delete_bytes,
6828         mn10300_elf_get_relocated_section_contents,
6829         _bfd_mn10300_elf_adjust_dynamic_symbol,
6830         _bfd_mn10300_elf_discard_copies,
6831         _bfd_mn10300_elf_size_dynamic_sections,
6832         _bfd_mn10300_elf_finish_dynamic_sections): ..
6833         * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
6834         _bfd_elf_make_section_from_phdr, elf_fake_sections,
6835         bfd_elf_set_group_contents, map_sections_to_segments,
6836         elf_sort_sections, assign_file_positions_for_segments,
6837         SECTION_SIZE, copy_private_bfd_data,
6838         _bfd_elf_get_dynamic_reloc_upper_bound,
6839         _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
6840         _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
6841         elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
6842         elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
6843         _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
6844         * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
6845         bfd_elf32_arm_process_before_allocation,
6846         elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
6847         elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
6848         elf32_arm_write_section): ..
6849         * elf32-cris.c (cris_elf_grok_prstatus,
6850         elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
6851         elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
6852         cris_elf_check_relocs, elf_cris_size_dynamic_sections,
6853         elf_cris_discard_excess_dso_dynamics,
6854         elf_cris_discard_excess_program_dynamics): ..
6855         * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
6856         * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
6857         * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
6858         _frv_create_got_section, _frvfdpic_assign_plt_entries,
6859         elf32_frvfdpic_size_dynamic_sections,
6860         elf32_frvfdpic_modify_segment_map,
6861         elf32_frvfdpic_finish_dynamic_sections): ..
6862         * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
6863         elf32_h8_get_relocated_section_contents): ..
6864         * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
6865         elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
6866         allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
6867         elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
6868         elf32_hppa_finish_dynamic_sections): ..
6869         * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
6870         i370_elf_size_dynamic_sections, i370_elf_check_relocs,
6871         i370_elf_finish_dynamic_sections): ..
6872         * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
6873         allocate_dynrelocs, elf_i386_size_dynamic_sections,
6874         elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
6875         * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
6876         i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
6877         * elf32-ip2k.c (ip2k_is_switch_table_128,
6878         ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
6879         ip2k_relax_switch_table_256, ip2k_elf_relax_section,
6880         adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
6881         * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
6882         m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
6883         allocate_dynrelocs, m32r_elf_size_dynamic_sections,
6884         m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
6885         m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
6886         m32r_elf_get_relocated_section_contents): ..
6887         * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
6888         m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
6889         m68hc11_elf_relax_delete_bytes): ..
6890         * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
6891         m68hc12_elf_size_one_stub): ..
6892         * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
6893         elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
6894         * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
6895         elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
6896         elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
6897         * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6898         elf32_mips_grok_prstatus): ..
6899         * elf32-or32.c (or32_elf_consth_reloc): ..
6900         * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
6901         elf_create_pointer_linker_section, ppc_elf_create_linker_section,
6902         ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
6903         allocate_dynrelocs, ppc_elf_size_dynamic_sections,
6904         ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
6905         ppc_elf_final_write_processing): ..
6906         * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6907         allocate_dynrelocs, elf_s390_size_dynamic_sections,
6908         elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
6909         * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
6910         sh_elf_relax_delete_bytes, sh_elf_align_loads,
6911         sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
6912         sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
6913         sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
6914         * elf32-sh64-com.c (sh64_address_in_cranges,
6915         sh64_get_contents_type): ..
6916         * elf32-sh64.c (sh64_find_section_for_address,
6917         sh64_elf_final_write_processing): ..
6918         * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
6919         sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
6920         allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
6921         elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
6922         * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
6923         * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
6924         elf_vax_size_dynamic_sections, elf_vax_discard_copies,
6925         elf_vax_instantiate_got_entries, elf_vax_relocate_section,
6926         elf_vax_finish_dynamic_sections): ..
6927         * elf32-xstormy16.c (xstormy16_elf_24_reloc,
6928         xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
6929         xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
6930         xstormy16_elf_finish_dynamic_sections): ..
6931         * elf32-xtensa.c (xtensa_read_table_entries,
6932         elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
6933         elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
6934         bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
6935         elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
6936         elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
6937         get_relocation_opcode, retrieve_contents, find_relaxable_sections,
6938         collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
6939         relax_section, shrink_dynamic_reloc_sections, relax_property_section,
6940         xtensa_callback_required_dependence): ..
6941         * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
6942         elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
6943         elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
6944         elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
6945         elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
6946         elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
6947         elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
6948         elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
6949         * elf64-hppa.c (allocate_dynrel_entries,
6950         elf64_hppa_size_dynamic_sections,
6951         elf64_hppa_finish_dynamic_sections): ..
6952         * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
6953         mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
6954         elf64_mips_grok_prstatus): ..
6955         * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
6956         mmix_elf_relocate_section, mmix_elf_final_link,
6957         mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
6958         mmix_elf_relax_section, mmix_elf_get_section_contents): ..
6959         * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
6960         ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
6961         ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
6962         allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
6963         ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
6964         toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
6965         ppc64_elf_build_stubs, ppc64_elf_relocate_section,
6966         ppc64_elf_finish_dynamic_sections): ..
6967         * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6968         allocate_dynrelocs, elf_s390_size_dynamic_sections,
6969         elf_s390_finish_dynamic_sections): ..
6970         * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
6971         sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
6972         sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
6973         sh64_elf64_finish_dynamic_sections): ..
6974         * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
6975         sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
6976         sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
6977         sparc64_elf_finish_dynamic_symbol,
6978         sparc64_elf_finish_dynamic_sections): ..
6979         * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
6980         elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
6981         elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
6982         elf64_x86_64_finish_dynamic_sections): ..
6983         * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
6984         * elfcode.h (elf_slurp_reloc_table): ..
6985         * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
6986         elf_finalize_dynstr, elf_link_add_object_symbols,
6987         bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
6988         elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
6989         * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6990         elf32_mips_grok_prstatus): ..
6991         * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
6992         elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
6993         elfNN_ia64_choose_gp, elfNN_ia64_final_link,
6994         elfNN_ia64_finish_dynamic_sections): ..
6995         * elfxx-mips.c (mips_elf_create_procedure_table,
6996         mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
6997         _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
6998         mips_elf_global_got_index, mips_elf_multi_got,
6999         mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
7000         mips_elf_allocate_dynamic_relocations,
7001         mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
7002         _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
7003         _bfd_mips_elf_always_size_sections,
7004         _bfd_mips_elf_size_dynamic_sections,
7005         _bfd_mips_elf_finish_dynamic_symbol,
7006         _bfd_mips_elf_finish_dynamic_sections,
7007         _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
7008         _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
7009         _bfd_elf_mips_get_relocated_section_contents,
7010         _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
7011         * hp300hpux.c (callback): ..
7012         * hppabsd-core.c (make_bfd_asection): ..
7013         * hpux-core.c (make_bfd_asection): ..
7014         * i386linux.c (linux_link_create_dynamic_sections,
7015         bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
7016         * i386msdos.c (msdos_write_object_contents): ..
7017         * i386os9k.c (os9k_callback, os9k_write_object_contents,
7018         os9k_set_section_contents): ..
7019         * ieee.c (parse_expression, ieee_slurp_external_symbols,
7020         ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
7021         ieee_write_section_part, do_with_relocs, do_as_repeat,
7022         do_without_relocs, ieee_write_debug_part, init_for_output,
7023         ieee_set_section_contents): ..
7024         * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
7025         * irix-core.c (do_sections, make_bfd_asection): ..
7026         * libaout.h (aout_section_merge_with_text_p): ..
7027         * libbfd.c (_bfd_generic_get_section_contents,
7028         _bfd_generic_get_section_contents_in_window): ..
7029         * linker.c (default_indirect_link_order): ..
7030         * lynx-core.c (make_bfd_asection): ..
7031         * m68klinux.c (linux_link_create_dynamic_sections,
7032         bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7033         * mach-o.c (bfd_mach_o_make_bfd_section,
7034         bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
7035         bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
7036         bfd_mach_o_scan_read_segment): ..
7037         * merge.c (_bfd_add_merge_section, record_section, merge_strings,
7038         _bfd_merge_sections): ..
7039         * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
7040         mmo_map_set_sizes, mmo_canonicalize_symtab,
7041         mmo_internal_write_section, mmo_write_object_contents): ..
7042         * netbsd-core.c (netbsd_core_file_p): ..
7043         * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
7044         nlm_alpha_set_public_section): ..
7045         * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
7046         * nlm32-sparc.c (nlm_sparc_write_import): ..
7047         * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
7048         nlm_compute_section_file_positions): ..
7049         * oasys.c (oasys_object_p, oasys_slurp_section_data,
7050         oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
7051         * opncls.c (get_debug_link_info): ..
7052         * osf-core.c (make_bfd_asection): ..
7053         * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
7054         adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
7055         final_link, aout_link_input_section): ..
7056         * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
7057         pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
7058         * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
7059         bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
7060         * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
7061         * ptrace-core.c (ptrace_unix_core_file_p): ..
7062         * reloc.c (bfd_perform_relocation, bfd_install_relocation,
7063         _bfd_final_link_relocate, bfd_generic_relax_section,
7064         bfd_generic_get_relocated_section_contents): ..
7065         * reloc16.c (bfd_coff_reloc16_relax_section,
7066         bfd_coff_reloc16_get_relocated_section_c): ..
7067         * riscix.c (riscix_some_aout_object_p): ..
7068         * rs6000-core.c (read_hdr, make_bfd_asection): ..
7069         * sco5-core.c (make_bfd_asection): ..
7070         * simple.c (bfd_simple_get_relocated_section_contents): ..
7071         * som.c (som_object_setup, setup_sections, som_prep_headers,
7072         som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
7073         som_set_reloc_info, som_get_section_contents,
7074         som_bfd_link_split_section): ..
7075         * sparclinux.c (linux_link_create_dynamic_sections,
7076         bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
7077         * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
7078         * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
7079         _bfd_write_stab_strings, _bfd_stab_section_offset): ..
7080         * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
7081         bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
7082         sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
7083         sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
7084         sunos_finish_dynamic_link): ..
7085         * syms.c (_bfd_stab_section_find_nearest_line): ..
7086         * tekhex.c (first_phase, tekhex_set_section_contents,
7087         tekhex_write_object_contents): ..
7088         * trad-core.c (trad_unix_core_file_p): ..
7089         * versados.c (process_esd, process_otr, process_otr): ..
7090         * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
7091         * vms-misc.c (add_new_contents): ..
7092         * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
7093         * vms.c (vms_set_section_contents): ..
7094         * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
7095         xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
7096         _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
7097         * xsym.c (bfd_sym_scan): .. See above.
7098
7099 2004-06-21  H.J. Lu  <hongjiu.lu@intel.com>
7100
7101         * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
7102         calling _bfd_merged_section_offset only for section symbols.
7103
7104 2004-06-22  Alan Modra  <amodra@bigpond.net.au>
7105
7106         * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
7107         for handling SEC_MERGE symbols in relax_section.
7108
7109 2004-06-21  Alexandre Oliva  <aoliva@redhat.com>
7110
7111         2003-05-15  Richard Sandiford  <rsandifo@redhat.com>
7112         * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
7113         linked together. Mark the result as h8300sx code.
7114
7115 2004-06-21  Alexandre Oliva  <aoliva@redhat.com>
7116
7117         * elf-bfd.h (struct elf_backend_data): Added
7118         elf_backend_omit_section_dynsym.
7119         (_bfd_elf_link_omit_section_dynsym): Declare.
7120         * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
7121         (elf_backend_omit_section_dynsym): Use it for frvfdpic.
7122         * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
7123         (_bfd_elf_link_renumber_dynsyms): ... this function.
7124         * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
7125         _bfd_elf_link_omit_section_dynsym).
7126         (elfNN_bed): Added elf_backend_omit_section_dynsym.
7127
7128 2004-06-21  Nick Clifton  <nickc@redhat.com>
7129
7130         * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
7131         flags.
7132
7133 2004-06-17  Jerome Guitton  <guitton@gnat.com>
7134
7135         * bfd-in.h (bfd_cache_close_all): New function declaration.
7136         * bfd-in2.h: Regenerate.
7137         * cache.c (bfd_cache_close_all): New function definition.
7138
7139 2004-06-16  Mark Kettenis  <kettenis@gnu.org>
7140
7141         * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
7142         4.10 and beyond.
7143         * configure: Regenerate.
7144
7145 2004-06-16  Daniel Jacobowitz  <dan@debian.org>
7146
7147         * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
7148         the pre-existing section.
7149
7150 2004-06-15  Alan Modra  <amodra@bigpond.net.au>
7151
7152         * section.c (struct sec): Remove usused flags.  Reorganize a little.
7153         (bfd_get_section_size_before_reloc): Delete.
7154         (bfd_get_section_size_after_reloc): Delete.
7155         (STD_SECTION): Update.
7156         (bfd_get_section_size_now): Delete.
7157         (bfd_set_section_contents): Don't referece reloc_done.
7158         (bfd_get_section_contents): Remove reloc_done comment.
7159         * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
7160         reloc_done.
7161         * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
7162         * ecoff.c (bfd_debug_section): Update initializer.
7163         * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
7164         * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
7165         * bfd-in.h (bfd_section_size): Expand.
7166         (bfd_get_section_size): New macro.
7167         * bfd-in2.h: Regenerate.
7168         * coff64-rs6000.c (xcoff64_write_object_contents): Replace
7169         bfd_get_section_size_before_reloc with bfd_get_section_size.
7170         * coffcode.h (coff_write_object_contents): Likewise.
7171         * coffgen.c (build_debug_section): Likewise.
7172         * dwarf1.c (parse_line_table): Likewise.
7173         (_bfd_dwarf1_find_nearest_line): Likewise.
7174         * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
7175         * i386msdos.c (msdos_write_object_contents): Likewise.
7176         * pdp11.c (squirt_out_relocs): Likewise.
7177         * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
7178         * elf64-mmix.c (mmix_elf_final_link): Update comment.
7179
7180 2004-06-14  Chris Demetriou  <cgd@broadcom.com>
7181
7182         * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
7183         removal) with updated comment.
7184         (bfd_elf32_bfd_reloc_type_lookup): Add back case for
7185         BFD_RELOC_32_PCREL.
7186         (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
7187         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7188
7189 2004-06-12  Alan Modra  <amodra@bigpond.net.au>
7190
7191         * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
7192         overflow on branches to undefweaks.
7193
7194 2004-06-11  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
7195
7196         * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
7197         as ecoff_section_data() does not return a valid lvalue.
7198
7199 2004-06-09  Alexandre Oliva  <aoliva@redhat.com>
7200
7201         * elflink.c (elf_sort_symbol): Compare section id, not pointers.
7202         (elf_link_add_object_symbols): Likewise.
7203
7204         * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
7205         (elf_backend_reloc_type_class): New.
7206
7207 2004-06-08  Mark Kettenis  <kettenis@gnu.org>
7208
7209         * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
7210         netbsd-core.lo.
7211         * configure: Regenerate.
7212
7213 2004-06-07  Daniel Jacobowitz  <dan@debian.org>
7214
7215         From:  Albert Chin-A-Young  <china@thewrittenword.com>
7216         * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
7217         to unsigned int.
7218
7219 2004-05-29  H.J. Lu  <hongjiu.lu@intel.com>
7220
7221         * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
7222         change.
7223
7224 2004-05-28  DJ Delorie  <dj@redhat.com>
7225
7226         * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
7227         for linking, but otherwise adjust reloc for merged sections.
7228
7229 2004-05-28  H.J. Lu  <hongjiu.lu@intel.com>
7230
7231         * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
7232         _bfd_merged_section_offset for local symbols.
7233
7234 2004-05-28  Andrew Stubbs <andrew.stubbs@superh.com>
7235
7236         * Makefile.am: Regenerate dependencies.
7237         * Makefile.in: Regenerate.
7238         * archures.c: Add bfd_mach_sh3_nommu .
7239         * bfd-in2.h: Regenerate.
7240         * cpu-sh.c: Add sh3-nommu architecture.
7241         (bfd_to_arch_table): Create new table.
7242         (sh_get_arch_from_bfd_mach): Create new function.
7243         (sh_get_arch_up_from_bfd_mach): Create new function.
7244         (sh_merge_bfd_arch): Create new function.
7245         * elf32-sh.c (sh_ef_bfd_table): Add table.
7246         (sh_elf_check_relocs): Replace switch statement with
7247         use of sh_ef_bfd_table .
7248         (sh_elf_get_flags_from_mach): Add new function.
7249         (sh_find_elf_flags): Likewise.
7250         (sh_elf_copy_private_data): Replace most of non-elf contents
7251         with a call to sh_merge_bfd_arch() .
7252
7253 2004-05-27  Michael Chastain  <mec.gnu@mindspring.com>
7254
7255         * Makefile.am (bfdver.h): Use explicit filename, not $< .
7256         * Makefile.in: Regenerate.
7257
7258 2004-05-27  Alexandre Oliva  <aoliva@redhat.com>
7259
7260         * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
7261         custom calling conventions for dynamic symbols.
7262         (mn10300_elf_relax_section): Avoid relaxing a function as a local
7263         symbol if it's an alias to a global one.
7264
7265 2004-05-26  H.J. Lu  <hongjiu.lu@intel.com>
7266
7267         * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
7268         change.
7269
7270 2004-05-27  Alexandre Oliva  <aoliva@redhat.com>
7271
7272         * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
7273         loop over hashes.
7274
7275 2004-05-26  Alan Modra  <amodra@bigpond.net.au>
7276
7277         * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
7278         for SHT_GROUP sections.
7279
7280 2004-05-25  Alan Modra  <amodra@bigpond.net.au>
7281
7282         * elflink.c (elf_link_add_object_symbols): Don't set up merge
7283         section data here..
7284         * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
7285         * merge.c: Formatting.  Remove unnecessary casts.  Expand
7286         bfd_get_section_alignment macro.
7287         (struct sec_merge_sec_info): Rename "first" to "first_str".  Update
7288         use throughout file.
7289         (_bfd_add_merge_section): Rename from _bfd_merge_section.  Update
7290         comment.  Abort on dynamic or non-SEC_MERGE input.  Don't test
7291         section name to determine sinfo group, instead test output section
7292         and alignment.
7293         (_bfd_merge_sections): Add struct bfd_link_info param.  Call
7294         _bfd_strip_section_from_output rather than just twiddling flags.
7295         * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
7296         (_bfd_merge_sections): Update prototype.
7297         * libbfd.h: Regenerate.
7298
7299 2004-05-24  Mark Kettenis  <kettenis@gnu.org>
7300
7301         * netbsd-core.c: Correctly indent section that sets architecture
7302         from machine ID.
7303
7304         From Miod Vallat <miod@online.fr>:
7305         * m88kopenbsd.c: New file.
7306         * targets.c (m88k_openbsd_vec): New.
7307         * config.bfd: Add m88k-*-openbsd*.
7308         * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
7309         (m88kopenbsd_vec): New.
7310         * configure: Regenerate.
7311         * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
7312         (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
7313         Run "make dep-am".
7314         * Makefile.in: Regenerate.
7315         * po/SRC-POTFILES.in: Regenerate.
7316
7317 2004-05-24  Nick Clifton  <nickc@redhat.com>
7318
7319         * hash.c: Remove bogus node "Changing the default Hash Table Size"
7320         introduced by hash table size patch.
7321
7322 2004-05-22  Ben Elliston  <bje@au.ibm.com>
7323
7324         * configure.in (is_release): Remove.
7325         (bfd_version_date, bfd_version, bfd_version_string): Likewise.
7326         (AC_OUTPUT): Don't output bfdver.h from version.h.
7327         * configure: Regenerate.
7328         * Makefile.am (RELEASE): New variable.
7329         (bfdver.h): New target.
7330         * Makefile.in: Regenerate.
7331         * doc/Makefile.in: Likewise.
7332
7333 2004-05-22  Ben Elliston  <bje@au.ibm.com>
7334
7335         * Makefile.am (config.status): Don't depend on version.h.
7336         * Makefile.in: Regenerate.
7337
7338 2004-05-22  Alan Modra  <amodra@bigpond.net.au>
7339
7340         * merge.c (_bfd_merged_section_offset): Remove "addend" param.
7341         * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
7342         * libbfd.h: Regenerate.
7343         * elf.c (_bfd_elf_rela_local_sym): Adjust call.
7344         (_bfd_elf_rel_local_sym): Likewise.
7345         * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
7346         (elf_link_input_bfd): Likewise.
7347         * elf32-ppc.c (ppc_elf_relax_section): Likewise.
7348         * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7349         * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7350         (elfNN_ia64_relocate_section): Likewise.
7351
7352 2004-05-21  Andy Chittenden  <achittenden@bluearc.com>
7353
7354         * hash.c (bfd_default_hash_table_size): New variable.
7355         (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
7356         (bfd_hash_set_default_size): New function.  Set the default size
7357         to a selected prime number close to the argument.  Document new
7358         function.
7359         * bfd-in.h: Add prototype for  bfd_hash_set_default_size.
7360         * bfd-in2.h: Regenerate.
7361         * Makefile.am (hash.lo): Add dependency upon libiberty.h.
7362         * Makefile.in: Regenerate.
7363
7364 2004-05-21  Mark Kettenis  <kettenis@gnu.org>
7365
7366         * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
7367         * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
7368         arm, m68k, m88k and hppa core files.
7369
7370 2004-05-21  Nick Clifton  <nickc@redhat.com>
7371
7372         * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
7373         (bfd_bwrite): Likewise.
7374         (bfd_tell): Likewise.
7375         (bfd_flush): Likewise.
7376         (bfd_stat): Likewise.
7377         (bfd_seek): Likewise.
7378         (bfd_get_mtime): Likewise.
7379         (bfd_get_size): Likewise.
7380
7381 2004-05-19  Ben Elliston  <bje@au.ibm.com>
7382
7383         * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
7384
7385 2004-05-19  Mikulas Patocka  <mikulas@artax.karlin.mff.cuni.cz>
7386
7387         * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
7388         (bfd_generic_openr_next_archived_file): Likewise.
7389
7390 2004-05-17  Bob Wilson  <bob.wilson@acm.org>
7391
7392         * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
7393         section names by inserting a new substring after .gnu.linkonce, except
7394         for .gnu.linkonce.t.* where the "t." is replaced.
7395
7396 2004-05-17  Adam Nemet  <anemet@lnxw.com>
7397
7398         * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
7399         (m68-*-lynxos* case): Likewise.
7400         (powerpc-*-lyxnos* case): New case.
7401         (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
7402
7403 2004-05-17  David Heine  <dlheine@tensilica.com>
7404
7405         * aout-target.h (MY_bfd_copy_private_header_data): Define.
7406         * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
7407         * bfd.c (bfd_copy_private_header_data): Define.
7408         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
7409         interface.
7410         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7411         * coffcode.h (coff_bfd_copy_private_header_data): Define.
7412         * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
7413         * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
7414         segments by calling copy_private_bfd_data.
7415         (_bfd_elf_copy_private_header_data): Define.
7416         * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
7417         * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
7418         * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
7419         * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
7420         * mmo.c (mmo_bfd_copy_private_header_data): Define.
7421         * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
7422         * som.c (som_bfd_copy_private_header_data): Define.
7423         * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
7424         * vms.c (vms_bfd_copy_private_header_data): Define.
7425         * bfd-in2.h: Regenerate.
7426         * libbfd.h: Regenerate.
7427
7428 2004-05-15  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
7429
7430         * elfxx-mips.c (MINUS_TWO): Define.
7431         (mips_elf_higher, mips_elf_highest,
7432         mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
7433         some bfd_vma values.
7434         (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
7435
7436 2004-05-14  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7437
7438         * som.c (log2): Rename to exact_log2.  Adjust all callers.
7439
7440 2004-05-13  Paul Brook  <paul@codesourcery.com>
7441
7442         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
7443         dwarf3 format CIE entries.  Remove comment about the size of the
7444         ra_column field.  It is now correctly deduced.
7445
7446 2004-05-13  Joel Sherrill <joel@oarcorp.com>
7447
7448         * config.bfd (or32-*-rtems*): Switch to elf.
7449
7450 2004-05-13  Nick Clifton  <nickc@redhat.com>
7451
7452         * po/fr.po: Updated French translation.
7453
7454 2004-05-11  Jakub Jelinek  <jakub@redhat.com>
7455
7456         * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
7457         into .dynsym if elf_section_data (sec)->dynindx <= 0.
7458         Adjust counting of last_local.
7459         (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
7460         other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
7461         created by the linker nor !SHF_ALLOC.
7462
7463         * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
7464         DT_PLTGOT to the start of the .got.plt section instead of the
7465         .got output section.  Set sh_entsize for .got section in addition
7466         to .got.plt.
7467         (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7468         is at sgot->output_section->vma.
7469         * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
7470         DT_PLTGOT to the start of the .got.plt section instead of the
7471         .got output section.
7472         (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7473         is at sgot->output_section->vma.  Set sh_entsize for .got section
7474         in addition to .got.plt.
7475         * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
7476         (bfd_section_from_phdr): Likewise.
7477         (map_sections_to_segments): Likewise.
7478         (assign_file_positions_for_segments): Likewise.
7479         (get_program_header_size): Likewise.
7480         * elflink.c (bfd_elf_size_dynamic_sections): Set
7481         elf_tdata (output_bfd)->relro from info->relro.
7482         * elf-bfd.h (struct elf_obj_tdata): Add relro field.
7483
7484 2004-05-08  Alexandre Oliva  <aoliva@redhat.com>
7485
7486         * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
7487         a zero symndx for which we hadn't accounted a dynamic relocation.
7488         (_frvfdpic_add_rofixup): Likewise.
7489
7490 2004-05-07  Brian Ford  <ford@vss.fsi.com>
7491             DJ Delorie  <dj@redhat.com>
7492
7493         * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
7494         Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
7495         * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
7496         IMAGE_FILE_LARGE_ADDRESS_AWARE.  Use PE defines.
7497
7498 2004-05-07  Alexandre Oliva  <aoliva@redhat.com>
7499
7500         * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
7501         immediately if there's no link info.
7502         (elf32_frvfdpic_copy_private_bfd_data): New.
7503         (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
7504
7505 2004-05-06  Zack Weinberg  <zack@codesourcery.com>
7506
7507         * dwarf2.c (add_line_info): Also set info->filename to NULL if
7508         filename argument is null; do not call strlen on a null pointer.
7509
7510 2004-05-06  Daniel Jacobowitz  <drow@mvista.com>
7511
7512         * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
7513         special case.
7514
7515 2004-05-05  Alexandre Oliva  <aoliva@redhat.com>
7516
7517         * configure.in (bfd_elf32_frvfdpic_vec): New.
7518         * configure: Rebuilt.
7519         * targets.c (bfd_elf32_frvfdpic_vec): New.
7520         * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
7521         on the latter.
7522         * elf32-frv.c: Prefix all identifiers added for FDPIC support with
7523         frvfdpic instead of frv.  Rearrange elf-target macros such that
7524         the FDPIC-specific ones are only defined for this new target
7525         vector.
7526         (bfd_elf32_frvfdpic_vec): Declare.
7527         (IS_FDPIC): New.
7528         (elf32_frv_relocate_section): Use it to enable segment checking
7529         and to control rofixup emission.  Add output section vma to
7530         applied relocation in non-LOAD non-ALLOC sections.  Use
7531         _bfd_error_handler for errors.
7532         (_frv_create_got_section): Create .rel.got and .rofixup only in
7533         FDPIC.  Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
7534         linker script.
7535         (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
7536         (elf32_frvfdpic_modify_segment_map): Likewise.
7537         (elf32_frv_finish_dynamic_sections): New, do-nothing.
7538         (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC.  Improve
7539         error message if we miscompute the rofixup size.
7540         (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
7541         (frvfdpic_elf_encode_eh_address): Likewise.
7542         (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
7543         Record relocs only in FDPIC.  Make sure _gp is defined for GPREL
7544         relocs.  Reject unknown relocation types.
7545         (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
7546         (frv_elf_merge_private_bfd_data): Likewise.
7547         (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
7548         0x4000 for newly-added elf32-frvfdpic.
7549
7550 2004-05-05  Nick Clifton  <nickc@redhat.com>
7551
7552         PR/136
7553         * cache.c (bfd_cache_lookup_worker): Call abort() rather than
7554         returning NULL as most users of this function do not check its
7555         return value.
7556         * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
7557         of bfd_cache_lookup().
7558         * sco5-core.c (sco5_core_file_p): Likewise.
7559         * trad-core.c (trad_unix_core_file_p): Likewise.
7560
7561 2004-05-05  Nick Clifton  <nickc@redhat.com>
7562
7563         * cache.c (bfd_cache_lookup): Improve formatting.
7564         * archive.c: Fix formatting.
7565
7566 2004-05-05  Peter Barada  <peter@the-baradas.com>
7567
7568         * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
7569         * cpu-m68k.c(bfd_m68k_arch): Likewise.
7570         * bfd-in2.h(bfd_architecture): Regenerate.
7571
7572 2004-05-03  Alan Modra  <amodra@bigpond.net.au>
7573
7574         * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
7575         SEC_MERGE sections.
7576         * elflink.c (elf_link_input_bfd): Adjust output reloc index for
7577         those against discarded link-once and SEC_MERGE section symbols.
7578
7579 2004-05-02  H.J. Lu  <hongjiu.lu@intel.com>
7580
7581         * section.c (bfd_get_section_by_name_if): New.
7582         * bfd-in2.h: Regenerated.
7583
7584 2004-05-02  Alan Modra  <amodra@bigpond.net.au>
7585
7586         * som.c (som_bfd_is_group_section): Define.
7587
7588 2004-05-01  Alan Modra  <amodra@bigpond.net.au>
7589
7590         * section.c (bfd_make_section_anyway): Copy the whole
7591         bfd_hash_entry, not just "next" from existing entry.
7592
7593 2004-04-30  H.J. Lu  <hongjiu.lu@intel.com>
7594
7595         * elf.c (bfd_section_from_shdr): Maintain the section order in
7596         a section group.
7597         (special_sections): Add ".note.GNU-stack".
7598         (elf_fake_sections): Handle section group for relocatable
7599         link..
7600
7601 2004-04-30  H.J. Lu  <hongjiu.lu@intel.com>
7602
7603         * section.c (bfd_sections_find_if): New.
7604         * bfd-in2.h: Regenerated.
7605
7606 2004-04-30  Alan Modra  <amodra@bigpond.net.au>
7607
7608         * section.c (bfd_make_section_anyway): Add all sections to hash tab.
7609
7610         * elf-bfd.h (bfd_elf_is_group_section): Declare.
7611         * elf.c (bfd_elf_is_group_section): New function.
7612         * elfxx-target.h (bfd_elfNN_bfd_is_group_section
7613         * section.c (bfd_generic_is_group_section): New function.
7614         * targets.c (struct bfd_target): Add _bfd_is_group_section field.
7615         (BFD_JUMP_TABLE_LINK): Adjust.
7616         * aout-adobe.c (aout_32_bfd_is_group_section): Define.
7617         * aout-target.h (MY_bfd_is_group_section): Define.
7618         * aout-tic30.c (MY_bfd_is_group_section): Define.
7619         * bfd.c (bfd_is_group_section): Define.
7620         * binary.c (binary_bfd_is_group_section): Define.
7621         * bout.c (b_out_bfd_is_group_section): Define.
7622         * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
7623         * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
7624         * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
7625         * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
7626         * coffcode.h (coff_bfd_is_group_section): Define.
7627         * i386msdos.c (msdos_bfd_is_group_section): Define.
7628         * i386os9k.c (os9k_bfd_is_group_section): Define.
7629         * ieee.c (ieee_bfd_is_group_section): Define.
7630         * ihex.c (ihex_bfd_is_group_section): Define.
7631         * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
7632         * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
7633         * mmo.c (mmo_bfd_is_group_section): Define.
7634         * nlm-target.h (nlm_bfd_is_group_section): Define.
7635         * oasys.c (oasys_bfd_is_group_section): Define.
7636         * pef.c (bfd_pef_bfd_is_group_section): Define.
7637         * ppcboot.c (ppcboot_bfd_is_group_section): Define.
7638         * srec.c (srec_bfd_is_group_section): Define.
7639         * tekhex.c (tekhex_bfd_is_group_section): Define.
7640         * versados.c (versados_bfd_is_group_section): Define.
7641         * vms.c (vms_bfd_is_group_section): Define.
7642         * xsym.c (bfd_sym_bfd_is_group_section): Define.
7643         * bfd-in2.h: Regenerate.
7644         * libbfd.h: Regenerate.
7645
7646 2004-04-30  Alan Modra  <amodra@bigpond.net.au>
7647
7648         * elflink.c (elf_gc_mark): Follow indirect and warning syms.
7649
7650 2004-04-30  Hans-Peter Nilsson  <hp@axis.com>
7651
7652         * configure.in: Update version to 2.15.91.
7653         * configure: Regenerate.
7654
7655 2004-04-29  Brian Ford  <ford@vss.fsi.com>
7656
7657         * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
7658         * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
7659         [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
7660         (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
7661         [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
7662         .gnu.linkonce.wi. sections.
7663         * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
7664         (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
7665         .gnu.linkonce.wi..
7666         * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
7667         (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7668
7669 2004-04-28  Chris Demetriou  <cgd@broadcom.com>
7670
7671         * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
7672         * bfd-in2.h: Regenerate.
7673         * libbfd.h: Likewise.
7674
7675 2004-04-28  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7676
7677         * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
7678         dup_common fields.
7679         (setup_sections): Use som_subspace_dictionary_record struct instead
7680         subspace_dictionary_record.  Set SEC_LINK_ONCE if subspace is
7681         is_comdat, is_common or dup_common.
7682         (som_prep_headers): Use som_subspace_dictionary_record struct.  Set
7683         is_comdat, is_common and dup_common in section subspace_dict from
7684         copy_data.
7685         (som_begin_writing): Use som_subspace_dictionary_record struct.
7686         (som_finish_writing): Likewise.
7687         (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
7688         is_common and dup_common flags in info for symbol.  Add comment
7689         regarding linker support for these fields.  Slightly reorganize
7690         function.
7691         (som_build_and_write_symbol_table): Set is_comdat, is_common and
7692         dup_common fields in symbol table from symbol info.
7693         (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
7694         arguments.  Set corresponding fields in copy_data.  Change all callers.
7695         (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
7696         symbol table.
7697         (som_vec): Add SEC_LINK_ONCE to applicable section flags.
7698         * som.h (som_subspace_dictionary_record): Define.
7699         (som_copyable_section_data_struct): Add is_comdat, is_common and
7700         dup_common fields.
7701         (som_section_data_struct): Use som_subspace_dictionary_record struct
7702         instead of subspace_dictionary_record.
7703         (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
7704
7705 2004-04-27  Bob Wilson  <bob.wilson@acm.org>
7706
7707         * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
7708         if set.  Check reloc_done flag before applying relocations.  Use
7709         output addresses, both when applying relocations and when comparing
7710         against the specified section.
7711         (elf_xtensa_relocate_section): Use output address to check if dynamic
7712         reloc is in a literal pool.  Set section's reloc_done flag.
7713
7714 2004-04-27  H.J. Lu  <hongjiu.lu@intel.com>
7715
7716         * elf32-sh64.c (elf_backend_section_flags): New. Defined.
7717         (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
7718         section.
7719         (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
7720         section.
7721
7722 2004-04-27  Alan Modra  <amodra@bigpond.net.au>
7723
7724         * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
7725         structure field removed in 2004-04-24 patch.
7726         * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
7727
7728         * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
7729         Constify hdr arg.
7730         * elf32-arm.h (elf32_arm_section_flags): Likewise.
7731         * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
7732         * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
7733         * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
7734         field before calling elf_backend_section_flags.
7735
7736 2004-04-24  Chris Demetriou  <cgd@broadcom.com>
7737
7738         * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
7739         (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
7740         (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
7741         BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
7742         and BFD_RELOC_32_PCREL.
7743         (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
7744         R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
7745         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7746         (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
7747         (mips_elf_next_relocation): Move comment about matching HI/LO
7748         relocations to...
7749         (_bfd_mips_elf_relocate_section): Here.  Remove handling for
7750         R_MIPS_GNU_REL_HI16.
7751
7752 2004-04-23  Chris Demetriou  <cgd@broadcom.com>
7753
7754         * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
7755         (mips_switch_reloc, mips_read_relocs, mips_relax_section)
7756         (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
7757         (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
7758         and update comments to reflect current usage.
7759         (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
7760         and MIPS_R_SWITCH, as well as several empty entries.  Update comment
7761         for MIPS_R_PCREL16.
7762         (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
7763         (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
7764         for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7765         (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
7766         type number to be MIPS_R_PCREL16.
7767         (mips_relocate_section): Remove support for link-time relaxation
7768         of branches used by embedded-PIC.  Remove support for MIPS_R_SWITCH,
7769         MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7770         (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
7771         * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
7772         relaxation of branches used by embedded-PIC.
7773         * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
7774         * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
7775         related members, update comment.
7776         * pe-mips.c: Remove disabled (commented-out and #if 0'd)
7777         code related to embedded-PIC.
7778         * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
7779         initialization of now-removed 'adjust' member of
7780         'struct ecoff_debug_info'.
7781
7782 2004-04-23  Chris Demetriou  <cgd@broadcom.com>
7783
7784         * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
7785
7786 2004-04-21  Philip Blundell  <pb@nexus.co.uk>
7787
7788         * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
7789         relocs for locally defined symbols during -shared final link.
7790         (elf32_arm_final_link_relocate): Likewise.
7791
7792 2004-04-22  Jakub Jelinek  <jakub@redhat.com>
7793
7794         * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
7795         ELF_LINK_POINTER_EQUALITY_NEEDED.
7796         (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
7797         if r_type is not R_X86_64_PC32.
7798         (elf64_x86_64_finish_dynamic_symbol): If
7799         ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
7800         SHN_UNDEF symbols.
7801
7802 2004-04-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7803
7804         * elf32-sh.c (sh_elf_plt_sym_val): New function.
7805         (elf_backend_plt_sym_val): Define.
7806
7807 2004-04-22  Andrew Cagney  <cagney@redhat.com>
7808
7809         * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
7810
7811 2004-04-22  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
7812
7813         * hpux-core.c (hpux_core_core_file_p): Add cast in call to
7814         make_bfd_asection.
7815         * som.c (som_set_section_contents): Constantify second argument.
7816         (hppa_som_gen_reloc_type): Abort for unsupported selectors.
7817         (som_object_setup): Rework to avoid warning.
7818         (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
7819         Likewise.
7820
7821 2004-04-22  Andrew Cagney  <cagney@redhat.com>
7822
7823         * cache.c (bfd_cache_close): Check for a previously closed file.
7824
7825 2004-04-22  Jakub Jelinek  <jakub@redhat.com>
7826
7827         * bfd.c (bfd_get_synthetic_symtab): Define.
7828         * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
7829         NAME##_get_synthetic_symtab.
7830         (struct bfd_target): Add _bfd_get_synthetic_symtab.
7831         * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
7832         * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
7833         relplt_name fields.
7834         (_bfd_elf_get_synthetic_symtab): New prototype.
7835         * elfcode.h (elf_get_synthetic_symtab): Define.
7836         * elf.c (_bfd_elf_get_synthetic_symtab): New function.
7837         * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
7838         (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
7839         (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
7840         * bfd-in2.h: Rebuilt.
7841         * libbfd.h: Rebuilt.
7842         * elf32-i386.c (elf_i386_plt_sym_val): New function.
7843         (elf_backend_plt_sym_val): Define.
7844         * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
7845         (elf_backend_plt_sym_val): Define.
7846         * elf32-s390.c (elf_s390_plt_sym_val): New function.
7847         (elf_backend_plt_sym_val): Define.
7848         * elf64-s390.c (elf_s390_plt_sym_val): New function.
7849         (elf_backend_plt_sym_val): Define.
7850         * elf32-sparc (elf32_sparc_plt_sym_val): New function.
7851         (elf_backend_plt_sym_val): Define.
7852         * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
7853         (elf_backend_plt_sym_val): Define.
7854         * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
7855         (elf_backend_plt_sym_val): Define.
7856         * aout-target.h (MY_get_synthetic_symtab): Define.
7857         * aout-tic30.c (MY_get_synthetic_symtab): Define.
7858         * coff-rs6000.c (rs6000coff_vec): Add
7859         _bfd_nodynamic_get_synthetic_symtab.
7860         (pmac_xcoff_vec): Likewise.
7861         * coff64-rs6000.c (rs6000coff64_vec): Add
7862         _bfd_nodynamic_get_synthetic_symtab.
7863         (aix5coff64_vec): Likewise.
7864         * sunos.c (MY_get_synthetic_symtab): Define.
7865         * vms.c (vms_get_synthetic_symtab): Define.
7866
7867 2004-04-22  Nick Clifton  <nickc@redhat.com>
7868
7869         * bfd.c (bfd_archive_filename): Return NULL on NULL input.
7870
7871 2004-04-22  Peter Barada <peter@the-baradas.com>
7872
7873         * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
7874         * bfd2-in.h: Regenerate.
7875         * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
7876
7877 2004-04-21  Chris Demetriou  <cgd@broadcom.com>
7878
7879         * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
7880         * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
7881         * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
7882         (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
7883         * bfd-in2.h: Regenerate.
7884
7885 2004-04-21  Bob Wilson  <bob.wilson@acm.org>
7886
7887         * elf32-xtensa.c (is_same_value): Add final_static_link argument and
7888         require relocations against a weak symbol to reference the same
7889         symbol hash entry if not a final, static link.
7890         (get_cached_value, add_value_map): Add final_static_link argument.
7891         (remove_literals): Pass final_static_link argument as needed.
7892
7893 2004-04-21  Andrew Cagney  <cagney@redhat.com>
7894
7895         * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
7896         (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
7897         (opncls_bwrite, opncls_bclose, opncls_bflush)
7898         (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
7899         bfd iovec that uses function callbacks.
7900         (bfd_close): Use the iovec's bclose.
7901         * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
7902         (cache_bclose, cache_bflush, cache_bstat)
7903         (cache_iovec): New functions and global variable, implement a
7904         cache "iovec", where applicable set bfd_error.
7905         (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
7906         * bfdio.c (struct bfd_iovec): Define.
7907         (real_read): Delete function.
7908         (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
7909         (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
7910         assume that bread and bwrite set bfd_error.
7911         * bfd.c (struct bfd): Add "iovec", update comments.
7912         * bfd-in2.h, libbfd.h: Re-generate.
7913
7914 2004-04-21  Andrew Cagney  <cagney@redhat.com>
7915
7916         * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7917
7918 2004-04-21  Eric Botcazou  <ebotcazou@act-europe.fr>
7919
7920         * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
7921         (bfd_elf_gc_sections): Fail if a shared object is being created.
7922         Do not fail if dynamic sections have been created.  Instead call
7923         elf_gc_mark_dynamic_ref_symbol to mark sections that contain
7924         dynamically referenced symbols.  Do not mark the whole graph
7925         rooted at .eh_frame, only the section proper.
7926
7927 2004-04-20  DJ Delorie  <dj@redhat.com>
7928
7929         * reloc.c: Add BFD_RELOC_32_SECREL.
7930         * bfd-in2.h: Regenerate.
7931         * libbfd.h: Likewise.
7932         * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
7933         (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
7934         (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
7935
7936 2004-04-19  Jakub Jelinek  <jakub@redhat.com>
7937
7938         * elf32-sparc.c (elf32_sparc_relocate_section): Handle
7939         relocs against hidden/protected undefweak symbols properly.
7940         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7941
7942 2004-04-18  Mark Kettenis  <kettenis@gnu.org>
7943
7944         * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7945         * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
7946         core files.
7947
7948 2004-04-17  Brian Ford  <ford@vss.fsi.com>
7949
7950         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
7951         filepos for the SizeOfHeaders field.
7952         (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
7953         overflow.
7954         (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
7955
7956 2004-04-16  Alan Modra  <amodra@bigpond.net.au>
7957
7958         * simple.c (bfd_simple_get_relocated_section_contents): Don't
7959         change reloc_done.  Set and restore _cooked_size.
7960         (RETURN): Delete.
7961
7962 2004-04-15  Mark Kettenis  <kettenis@gnu.org>
7963
7964         * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
7965         core files.
7966
7967 2004-04-15  Nick Clifton  <nickc@redhat.com>
7968
7969         * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
7970
7971 2004-04-15  Alan Modra  <amodra@bigpond.net.au>
7972
7973         * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
7974
7975 2004-04-15  H.J. Lu  <hongjiu.lu@intel.com>
7976
7977         * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
7978         when it is a definition.
7979
7980 2004-04-14  Alan Modra  <amodra@bigpond.net.au>
7981
7982         * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
7983         when statically linking PIC code.
7984         * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7985
7986 2004-04-11  Thiemo Seufer  <seufer@csv.ica.uni-stuttgart.de>
7987
7988         * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
7989         * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
7990         targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
7991         * configure: Regenerate.
7992
7993 2004-04-08  Richard Sandiford  <rsandifo@redhat.com>
7994
7995         * elflink.c: Include libiberty.h.
7996         * Makefile.am (elflink.lo): Depend on libiberty.h.
7997         * Makefile.in: Regenerate.
7998
7999 2004-04-06  Daniel Jacobowitz  <drow@mvista.com>
8000
8001         * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
8002         ".MIPS.stubs".
8003
8004 2004-04-05  H.J. Lu  <hongjiu.lu@intel.com>
8005
8006         * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
8007         reserve the memory for dynamic linker
8008
8009 2004-04-05  Mark Kettenis  <kettenis@gnu.org>
8010
8011         * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
8012         (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
8013
8014 2004-04-02  H.J. Lu  <hongjiu.lu@intel.com>
8015
8016         * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
8017         RELOC_FOR_GLOBAL_SYMBOL.
8018         (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
8019
8020 2004-04-02  H.J. Lu  <hongjiu.lu@intel.com>
8021
8022         * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8023         R_ARM_ALU* only if OLD_ARM_ABI is not defined.
8024
8025 2004-04-01  Paul Brook  <paul@codesourcery.com>
8026
8027         * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
8028         * elf32-arm.h (struct elf32_elf_section_map): New.
8029         (struct _arm_elf_section_data): New.
8030         (elf32_arm_section_data): Define.
8031         (struct elf32_arm_link_hash_table): Add byteswap_code.
8032         (elf32_arm_link_hash_table_create): Initialize byteswap_code.
8033         (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
8034         (elf32_arm_post_process_headers): Set EF_ARM_BE8.
8035         (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
8036         elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
8037         (bfd_elf32_new_section_hook, elf_backend_write_section,
8038         elf_backend_link_output_symbol_hook): Define.
8039
8040 2004-04-01  Andy Chittenden  <achittenden@bluearc.com>
8041
8042         * stabs.c (struct stab_link_includes_totals): Add field 'symb'
8043         that keeps the characters in a B_INCL..B_EINCL range.
8044         (_bfd_link_section_stabs): When computing the sum of the
8045         characters in a B_INCL..B_EINCL range also keep a copy of those
8046         characters.  Use this information to distinguish between
8047         include sections that have the same sum and the same length
8048         but which are nevertheless unique.
8049
8050 2004-03-31  Paul Brook  <paul@codesourcery.com>
8051
8052         * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
8053         * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
8054
8055 2004-03-31  Andy Chittenden <achittenden@bluearc.com>
8056
8057         * stabs.c (struct stab_link_includes_totals): Rename field 'total'
8058         to 'sum_chars' and add field 'num_chars'.
8059         (_bfd_link_section_stabs): When computing the sum of the
8060         characters in a B_INCL..B_EINCL range also keep a count of the
8061         number of characters.  Use this information to help distinguish
8062         between include sections when have the same sum but which
8063         nevertheless are still unique.
8064
8065 2004-03-31  Mattias EngdegÃ¥rd  <mattias@virtutech.se>
8066
8067         * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
8068
8069 2004-03-30  Galit Heller  <Galit.Heller@nsc.com>
8070             Tomer Levi    <Tomer.Levi@nsc.com>
8071
8072         * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
8073         (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
8074         (BFD32_BACKENDS): Add elf32-cr16c.lo.
8075         (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
8076         (cpu-cr16c.lo): New target.
8077         (elf32-cr16c.lo): Likewise.
8078         * Makefile.in: Regenerate.
8079         * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
8080         (bfd_archures_list): Add bfd_cr16c_arch.
8081         * config.bfd: Handle cr16c-*-elf*.
8082         * configure.in: Handle bfd_elf32_cr16c_vec.
8083         * configure: Regenerate.
8084         * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
8085         BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
8086         BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
8087         BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
8088         BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
8089         BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
8090         BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
8091         BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
8092         BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
8093         BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
8094         BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
8095         BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
8096         BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
8097         BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
8098         BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
8099         BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
8100         BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
8101         BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
8102         BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
8103         BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
8104         * targets.c (bfd_elf32_cr16c_vec): Declare.
8105         (bfd_target_vector): Add bfd_elf32_cr16c_vec.
8106         * cpu-cr16c.c: New file.
8107         * elf32-cr16c.c: Likewise.
8108         * libbfd.h: Regenerate.
8109         * bfd-in2.h: Likewise.
8110
8111 2004-03-30  Jakub Jelinek  <jakub@redhat.com>
8112
8113         * elf.c (map_sections_to_segments): Fix handling of .tbss.
8114
8115 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
8116
8117         * Makefile.am: Remove all mention of elflink.h.
8118         * Makefile.in: Regenerate.
8119         * bfd-in.h (bfd_elf_discard_info): Declare.
8120         (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
8121         * bfd-in2.h: Regenerate.
8122         * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
8123         bfd_elf32_link_record_dynamic_symbol,
8124         bfd_elf64_link_record_dynamic_symbol,
8125         _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
8126         bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
8127         _bfd_elf32_link_record_local_dynamic_symbol,
8128         _bfd_elf64_link_record_local_dynamic_symbol,
8129         _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
8130         _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
8131         _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
8132         _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
8133         _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
8134         _bfd_elf32_reloc_symbol_deleted_p,
8135         _bfd_elf64_reloc_symbol_deleted_p): Delete.
8136         (bfd_elf_link_record_dynamic_symbol,
8137         bfd_elf_link_record_local_dynamic_symbol,
8138         bfd_elf_final_link, bfd_elf_gc_sections,
8139         bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
8140         bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
8141         bfd_elf_reloc_symbol_deleted_p): Declare.
8142         (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
8143         * elf32-arm.h: Update for changed function names.  Remove local
8144         WILL_CALL_FINISH_DYNAMIC_SECTION define.
8145         * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
8146         * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
8147         * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
8148         * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8149         * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
8150         * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
8151         * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
8152         * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
8153         * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
8154         (bfd_elfNN_print_symbol): Define.
8155         * elfcode.h: Don't include elflink.h.
8156         (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
8157         elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
8158         elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
8159         elf_gc_record_vtinherit, elf_gc_record_vtentry,
8160         elf_link_record_local_dynamic_symbol): Don't define.
8161         * elflink.c: Update for changed function names.  Move elflink.h
8162         code here.
8163         * elflink.h: Delete file.
8164         * po/SRC-POTFILES.in: Regenerate.
8165         * po/bfd.pot: Regenerate.
8166
8167 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
8168
8169         * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
8170         "name" for global syms accidentally removed in 2004-03-20 change.
8171
8172 2004-03-27  Alan Modra  <amodra@bigpond.net.au>
8173
8174         * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
8175         * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
8176         where Elf_External_* is different for 64 and 32 bit, with
8177         corresponding elf_size_info field.
8178         (struct elf_final_link_info): Use "bfd_byte *" instead
8179         of "Elf_External_Sym *" for external_syms and symbuf.
8180         (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
8181         vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
8182         (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
8183         (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
8184         (elf_link_sort_cmp2): Adjust.
8185         (elf_link_sort_relocs): Set up r_sym_mask local var instead of
8186         using ELF_R_SYM macro.  Set u.sym_mask.
8187         (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
8188         version, elf_stringtab_init.  Ditto for bfd_section_from_elf_index
8189         vs. section_from_elf_index.  Adjust Elf_External_Sym pointer
8190         arithmetic.  Pass bed to elf_link_flush_output_syms.  Adjust
8191         Elf_External_Dyn pointer arithmentic.  Use bed swap_dyn_in and
8192         swap_syn_out functions.  Rearrange dyn swap in/out switch.
8193         (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
8194         Pass bed to elf_link_flush_output_syms.  Use bed swap_symbol_out.
8195         (elf_link_flush_output_syms): Add elf_backend_data arg.
8196         (elf_link_check_versioned_symbol): Likewise.
8197         (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
8198         Adjust Elf_External_Sym pointer arithmetic.  Use bed swap_symbol_out.
8199         (elf_link_input_bfd): Use bfd_section_from_elf_index.  Set up
8200         r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
8201         ELF_R_TYPE and ELF_R_INFO macros.
8202         (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
8203         based on size rather than using ELF_R_INFO.
8204         (elf_gc_mark): Set up r_sym_shift local var and use instead of
8205         ELF_R_SYM macro.
8206         (struct alloc_got_off_arg): New.
8207         (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
8208         ARCH_SIZE.  Pass get entry size down to elf_gc_allocate_got_offsets.
8209         (elf_gc_allocate_got_offsets): Adjust.
8210         (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
8211         ELF_R_SYM.  Use bfd_section_from_elf_index.
8212         (elf_bfd_discard_info): Set cookie.r_sym_shift.
8213         * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
8214         (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
8215
8216 2004-03-26  Stan Shebs  <shebs@apple.com>
8217
8218         Remove MPW support, no longer used.
8219         * config.bfd (powerpc-*-mpw*): Remove configuration.
8220         * mpw-config.in, mpw-make.sed: Remove files.
8221         * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
8222
8223 2004-03-26  Alan Modra  <amodra@bigpond.net.au>
8224
8225         * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
8226         (ppc64_elf_add_symbol_hook): New function.
8227         * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
8228         const from Elf_Internal_Sym param.
8229         * elflink.c (elf_link_add_object_symbols): Adjust.
8230         * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
8231         * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
8232         * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
8233         * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
8234         * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
8235         * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
8236         * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
8237         * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
8238         * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
8239         * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
8240         * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
8241         * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
8242         * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
8243         * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
8244         * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
8245         * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
8246
8247 2004-03-26  Alan Modra  <amodra@bigpond.net.au>
8248
8249         * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
8250         * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
8251         (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
8252         (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
8253         (bfd_elf64_bfd_link_add_symbols): Delete.
8254         (bfd_elf_link_add_symbols): Declare.
8255         * elfcode.h (elf_bfd_link_add_symbols): Delete.
8256         * elflink.c: Include safe-ctype.h.
8257         (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
8258         make static.
8259         (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
8260         (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
8261         static.
8262         (elf_link_add_archive_symbols): Rename from
8263         _bfd_elf_link_add_archive_symbols, make static.
8264         (elf_link_add_object_symbols): New function.  Corresponding
8265         elflink.h function converted to use elf_size_info.
8266         (bfd_elf_link_add_symbols): Likewise.
8267         (bfd_elf_size_dynamic_sections): Adjust.
8268         * elflink.h (elf_bfd_link_add_symbols): Delete.
8269         (elf_link_add_object_symbols): Delete.
8270         * elf32-gen.c (elf32_generic_link_add_symbols): Call
8271         bfd_elf_link_add_symbols.
8272         * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
8273
8274 2004-03-25  Alan Modra  <amodra@bigpond.net.au>
8275
8276         * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
8277         and chained shared libs only if dynsym.  Clear dynsym on forced-local.
8278
8279         * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
8280         (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
8281         (_bfd_elf_add_dt_needed_tag): Declare.
8282         (_bfd_elf_sort_symbol): Declare.
8283         (_bfd_elf_finalize_dynstr): Declare.
8284         (RELOC_FOR_GLOBAL_SYM): Formatting.
8285         * elfcode.h (elf_add_dynamic_entry): Delete.
8286         * elflink.c (_bfd_elf_add_dynamic_entry): New function.  Corresponding
8287         elflink.h function converted to use elf_size_info.
8288         (_bfd_elf_add_dt_needed_tag): Likewise.
8289         (_bfd_elf_sort_symbol): Likewise.
8290         (_bfd_elf_finalize_dynstr): Likewise.
8291         (compute_bucket_count): Likewise.
8292         (bfd_elf_size_dynamic_sections): Likewise.  Check result of
8293         _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
8294         (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
8295         * elflink.h: ..here.
8296         (sort_symbol, add_dt_needed_tag): Delete.
8297         (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
8298         (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
8299         Update all users.
8300         * elf32-arm.h (add_dynamic_entry): Update.  Remove casts.
8301         * elf32-cris.c (add_dynamic_entry): Likewise.
8302         * elf32-hppa.c (add_dynamic_entry): Likewise.
8303         * elf32-i370.c (add_dynamic_entry): Likewise.
8304         * elf32-i386.c (add_dynamic_entry): Likewise.
8305         * elf32-m32r.c (add_dynamic_entry): Likewise.
8306         * elf32-m68k.c (add_dynamic_entry): Likewise.
8307         * elf32-ppc.c (add_dynamic_entry): Likewise.
8308         * elf32-s390.c (add_dynamic_entry): Likewise.
8309         * elf32-sh.c (add_dynamic_entry): Likewise.
8310         * elf32-sparc.c (add_dynamic_entry): Likewise.
8311         * elf32-vax.c (add_dynamic_entry): Likewise.
8312         * elf32-xtensa.c (add_dynamic_entry): Likewise.
8313         * elf64-alpha.c (add_dynamic_entry): Likewise.
8314         * elf64-hppa.c (add_dynamic_entry): Likewise.
8315         * elf64-ppc.c (add_dynamic_entry): Likewise.
8316         * elf64-s390.c (add_dynamic_entry): Likewise.
8317         * elf64-sparc.c (add_dynamic_entry): Likewise.
8318         * elf64-x86-64.c (add_dynamic_entry): Likewise.
8319         * elfxx-ia64.c (add_dynamic_entry): Likewise.
8320         * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
8321         * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
8322         * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
8323         * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
8324
8325 2004-03-23  Paul Brook  <paul@codesourcery.com>
8326
8327         * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
8328
8329 2004-03-22  Bob Wilson  <bob.wilson@acm.org>
8330
8331         * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
8332         literal tables and check for relocs outside of literal pools.
8333         (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
8334         (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
8335         set DF_TEXTREL.
8336         (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
8337         (elf_xtensa_relocate_section): Read literal tables and check for
8338         dynamic relocations in read-only sections and not in literal pools.
8339
8340 2004-03-23  Alan Modra  <amodra@bigpond.net.au>
8341
8342         PR 51.
8343         * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
8344
8345 2004-03-22  Hans-Peter Nilsson  <hp@axis.com>
8346
8347         * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
8348         R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
8349         not defined by the executable, or defined in a DSO.
8350         <eliding run-time relocation of .got>: Initialize GOT entry for a
8351         function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
8352         executable.
8353         (cris_elf_gc_sweep_hook): Improve fallthrough marking.
8354         (elf_cris_try_fold_plt_to_got): Improve head comment.  Do not fold
8355         a PLT reloc to GOT for an executable.
8356         (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
8357         .got for a DSO and explain why.
8358         (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
8359         and unreferenced symbols for which a PLT is defined.  Adjust
8360         dynamic-symbol pruning correspondingly, to make sure we don't lose
8361         a dynamic symbol also defined by a DSO.
8362
8363 2004-03-22  Alan Modra  <amodra@bigpond.net.au>
8364
8365         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
8366         and rel args.  Group input and output args.  Wrap to 80 columns.
8367         * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
8368         elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
8369         elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
8370         elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
8371         elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
8372         elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
8373         elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
8374         elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
8375         RELOC_FOR_GLOBAL_SYMBOL invocation.
8376
8377 2004-03-20  H.J. Lu  <hongjiu.lu@intel.com>
8378
8379         * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
8380         unresolved symbols in objects aren't allowed.
8381
8382         * elf-hppa.h (elf_hppa_relocate_section): Properly handle
8383         unresolved symbols.
8384         (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8385         (elf_hppa_unmark_useless_dynamic_symbols):
8386         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
8387         * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
8388         (elf32_hppa_relocate_section): Likewise.
8389         * elf32-i370.c (i370_elf_relocate_section): Likewise.
8390         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8391         * elf32-sh.c (sh_elf_relocate_section): Likewise.
8392         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8393         * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
8394
8395         * elf-m10200.c (mn10200_elf_relocate_section): Use
8396         RELOC_FOR_GLOBAL_SYMBOL.
8397         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
8398         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
8399         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8400         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
8401         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8402         * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
8403         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8404         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
8405         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8406         * elf32-v850.c (v850_elf_relocate_section): Likewise.
8407         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8408         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
8409
8410 2004-03-19  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
8411
8412         * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
8413         (final_link_relocate): Likewise.
8414         * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
8415         R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
8416
8417 2004-03-19  Alan Modra  <amodra@bigpond.net.au>
8418
8419         * Makefile.am: Run "make dep-am".
8420         * Makefile.in: Regenerate.
8421         * aclocal.m4: Regenerate.
8422         * config.in: Regenerate.
8423         * po/bfd.pot: Regenerate.
8424
8425 2004-03-19  Alan Modra  <amodra@bigpond.net.au>
8426             H.J. Lu  <hongjiu.lu@intel.com>
8427
8428         * elflink.c (_bfd_elf_merge_symbol): Revert last change.  Move
8429         type and size change code to where it was previously.  Remove
8430         dt_needed param.  Treat old weak syms as strong if new sym is
8431         from a shared lib, even when old sym is from another shared
8432         lib.  Remove unnecessary tests of oldweak and newweak.  Correct
8433         comments.
8434         (_bfd_elf_add_default_symbol): Remove dt_needed param.  Update
8435         _bfd_elf_merge_symbol calls.
8436         * elflink.h (elf_link_add_object_symbols): Update calls.  Remove
8437         dt_needed local var.  Update comments.
8438         * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
8439         (_bfd_elf_add_default_symbol): Likewise.
8440
8441         * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
8442         strong syms in one shared object overriding weak syms in another.
8443
8444 2004-03-18  Alan Modra  <amodra@bigpond.net.au>
8445
8446         * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field.  Add
8447         dyn_lib_class field.  Rearrange for better packing.
8448         (elf_dt_soname): Delete.
8449         (elf_dyn_lib_class): Define.
8450         * elf.c (bfd_elf_set_dt_needed_name): Update comment.
8451         (bfd_elf_set_dt_needed_soname): Delete.
8452         (bfd_elf_set_dyn_lib_class): New function.
8453         * elflink.h (add_dt_needed_tag): New function.  Split out from..
8454         (elf_link_add_object_symbols): ..here.  Rename "name" to "soname".
8455         Use elf_dyn_lib_class to set dt_needed and add_needed.  Move fallback
8456         initialization of soname.
8457         (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
8458         elf_dt_soname.
8459         * bfd-in.h (enum dynamic_lib_link_class): New.
8460         (bfd_elf_set_dt_needed_soname): Delete.
8461         (bfd_elf_set_dyn_lib_class): Declare.
8462         * bfd-in2.h: Regenerate.
8463
8464         * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
8465         (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
8466         * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
8467         symbol loop.  Instead use add_needed to flag tag as written.
8468
8469 2004-03-17  Nathan Sidwell  <nathan@codesourcery.com>
8470
8471         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
8472         logic for null_input_bfd detection.
8473
8474 2004-03-17  Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8475
8476         * config.bfd: Switch sh-*-rtems* to ELF.  Add sh-*-rtemscoff*.
8477
8478 2004-03-16  Mark Kettenis  <kettenis@gnu.org>
8479
8480         * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
8481         code.
8482
8483 2004-03-16  Alan Modra  <amodra@bigpond.net.au>
8484
8485         * elflink.c (elf_link_read_relocs_from_section): Don't use
8486         NUM_SHDR_ENTRIES in end of reloc calc.  Move NULL shdr check..
8487         (_bfd_elf_link_read_relocs): ..to here.
8488         * elf32-ppc.c (ppc_elf_relax_section): Formatting.
8489
8490 2004-03-16  Alan Modra  <amodra@bigpond.net.au>
8491
8492         * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
8493         values selected in configure.host.  Require both to be defined
8494         before setting BFD_HOST_64_BIT_DEFINED.  Protect assignment to
8495         corresponding BFD_HOST vars with quotes.
8496         <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
8497         Always require BFD_HOST_64_BIT_DEFINED.
8498         <file_ptr type>: Find off_t size before emitting message.  Combine
8499         off_t and ftello64 conditional.
8500         * configure: Regenerate.
8501
8502 2004-03-16  Alan Modra  <amodra@bigpond.net.au>
8503
8504         * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
8505         aliasing warning.  Remove trailing whitespace throughout file.
8506
8507 2004-03-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
8508
8509         * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
8510         input_section in calls to get_dyn_name.
8511         * 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
8512         local symbols.
8513         (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
8514
8515 2004-03-15  Alan Modra  <amodra@bigpond.net.au>
8516
8517         * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
8518         (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
8519         (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
8520         (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
8521         (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
8522         * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
8523         (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
8524         when using long.
8525         * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
8526         (bfd_getb64): Return bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
8527         (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8528         (bfd_putb64): Accept bfd_uint64_t.  Enable when BFD_HOST_64_BIT.
8529         (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
8530         * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
8531         (read_8_bytes, read_indirect_string, read_address): Likewise.
8532         (read_abbrevs, parse_comp_unit): Likewise.
8533         * targets.c (struct bfd_target): Likewise.
8534         * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
8535         * hppabsd-core.c: Likewise.  Formatting.
8536         * hpux-core.c: Likewise.
8537         * irix-core.c: Likewise.
8538         * netbsd-core.c: Likewise.
8539         * osf-core.c: Likewise.
8540         * ptrace-core.c: Likewise.
8541         * sco5-core.c: Likewise.
8542         * trad-core.c: Likewise.
8543         * configure: Regenerate.
8544         * bfd-in2.h: Regenerate.
8545
8546 2004-03-15  Alan Modra  <amodra@bigpond.net.au>
8547
8548         * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
8549         (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
8550         (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8551         (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
8552         (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
8553         (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
8554         (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
8555         * libbfd.c: Likewise in function definitions.
8556         (bfd_put_8): Mask with 0xff rather than casting to char.
8557         (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
8558         (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
8559         (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
8560         (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
8561         (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
8562         (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
8563         * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
8564         (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
8565         (H_GET_64, H_GET_32, H_GET_16): Likewise.
8566         (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
8567         * archive.c (do_slurp_coff_armap): Update swap prototype.
8568         * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
8569         (tic54x_getl_signed_32): Likewise.
8570         (tic54x_putl32): Likewise.  Mask with 0xff rather than casting to char.
8571         * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
8572         * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
8573         (bfd_getp_signed_32, bfd_putp32): Likewise.
8574         * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
8575         bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
8576         bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
8577         bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
8578         bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
8579         bfd_h_getx_signed_16, bfd_h_putx16.
8580         * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
8581         * hppabsd-core.c: Similarly.  Rename NO_SIGNED_GET to NO_GETS.
8582         * hpux-core.c: Likewise.
8583         * irix-core.c: Likewise.
8584         * netbsd-core.c: Likewise.
8585         * osf-core.c: Likewise.
8586         * ptrace-core.c: Likewise.
8587         * sco5-core.c: Likewise.
8588         * trad-core.c: Likewise.
8589         * bfd-in2.h: Regenerate.
8590
8591 2004-03-15  Matt Thomas  <matt@3am-software.com>
8592
8593         * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
8594         selected.
8595
8596 2004-03-13  Mark Kettenis  <kettenis@gnu.org>
8597
8598         * config.bfd: Add x86_64-*-openbsd*.
8599         * configure.in (x86_64-*-openbsd*): Set COREFILE to
8600         netbsd-core.lo.
8601         * configure: Regenerate.
8602
8603 2004-03-12  Nick Clifton  <nickc@redhat.com>
8604             Dave Murphy  <wintermute2k4@ntlworld.com>
8605
8606         * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
8607         if the input bfd does not contain any code.
8608
8609 2004-03-09  Steve Ellcey  <sje@cup.hp.com>
8610
8611         * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
8612
8613 2004-03-05  Fred Fish  <fnf@redhat.com>
8614
8615         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
8616         mips16 symbols to be even rather than testing first for even/odd.
8617         (_bfd_mips_elf_link_output_symbol_hook): Ditto.
8618
8619 2004-03-05  Nathan Sidwell  <nathan@codesourcery.com>
8620
8621         * elf.c (map_sections_to_segments): Ignore .tbss sections for
8622         layout purposes.
8623
8624 2004-03-03  Alexandre Oliva  <aoliva@redhat.com>
8625
8626         * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
8627         undefined symbols as hash_new.
8628
8629 2003-03-03  Andrew Stubbs  <andrew.stubbs@superh.com>
8630
8631         * archures.c: Add bfd_mach_sh4_nommu_nofpu.
8632         * cpu-sh.c: Ditto.
8633         * elf32-sh.c: Ditto.
8634         * bfd-in2.h: Regenerate.
8635
8636 2004-03-02  Alexandre Oliva  <aoliva@redhat.com>
8637
8638         * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
8639         dynrelocs.
8640         (_frv_count_got_plt_entries): Initialize them.
8641         (frv_pic_relocs_info_find): Add insert argument.  Adjust all
8642         callers.
8643         (frv_pic_relocs_info_for_global): Likewise.
8644         (frv_pic_relocs_info_for_local): Likewise.
8645         (frv_pic_merge_early_relocs_info): New.
8646         (_frv_resolve_final_relocs_info): Use it in case one entry maps to
8647         another.
8648         (_frv_add_dyn_reloc): Add entry argument.  Adjust all callers.
8649         Check that we don't exceed the allocated count for entry.
8650         (_frv_add_rofixup): Likewise.
8651         (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
8652         (elf32_frv_finish_dynamic_sections): Improve error message in case
8653         we emit too few rofixup entries.
8654
8655 2004-03-01  Richard Sandiford  <rsandifo@redhat.com>
8656
8657         * archures.c (bfd_mach_fr450): New.
8658         * bfd-in2.h: Regenerate.
8659         * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
8660         (arch_info_500): Link to it.
8661         * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
8662         (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
8663         (frv_elf_arch_extension_p): New function.
8664         (frv_elf_merge_private_bfd_data): Use it.
8665
8666 2004-02-28  H.J. Lu  <hongjiu.lu@intel.com>
8667
8668         * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
8669
8670         * elflink.h (is_global_data_symbol_definition): Moved to
8671         elflink.c.
8672         (elf_link_is_defined_archive_symbol): Likewise.
8673         (elf_link_add_archive_symbols): Likewise. Renamed to
8674         _bfd_elf_link_add_archive_symbols.
8675
8676         * elflink.c (elf_link_is_defined_archive_symbol): Get the size
8677         of ELF symbol table entry from backend.
8678         (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
8679         instead of elf_link_add_object_symbols.
8680
8681 2004-02-27  Alexandre Oliva  <aoliva@redhat.com>
8682
8683         * elf-bfd.h (struct elf_backend_data): Added
8684         elf_backend_can_make_relative_eh_frame,
8685         elf_backend_can_make_lsda_relative_eh_frame and
8686         elf_backend_encode_eh_address.
8687         (_bfd_elf_encode_eh_address): Declare.
8688         (_bfd_elf_can_make_relative): Declare.
8689         * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
8690         hooks to decide whether to attempt to make_relative and
8691         make_lsda_relative.
8692         (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
8693         (_bfd_elf_can_make_relative): New.
8694         (_bfd_elf_encode_eh_address): New.
8695         * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
8696         (frv_elf_encode_eh_address): New.
8697         (elf_backend_can_make_relative_eh_frame): Define.
8698         (elf_backend_can_make_lsda_relative_eh_frame): Define.
8699         (elf_backend_encode_eh_address): Define.
8700         * elfxx-target.h
8701         (elf_backend_can_make_relative_eh_frame): Define.
8702         (elf_backend_can_make_lsda_relative_eh_frame): Define.
8703         (elf_backend_encode_eh_address): Define.
8704         (elfNN_bed): Add them.
8705
8706 2004-02-27  Alexandre Oliva  <aoliva@redhat.com>
8707
8708         * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
8709         complain_on_overflow to signed.
8710
8711 2004-02-27  H.J. Lu  <hongjiu.lu@intel.com>
8712
8713         * elflink.h (sort_symbol): New.
8714         (elf_link_add_object_symbols): Use a sorted symbol array for
8715         weakdef.
8716
8717 2004-02-27  Jakub Jelinek  <jakub@redhat.com>
8718
8719         * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8720         for pc relative relocs.
8721         (elf_s390_relocate_section): Likewise.
8722         * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8723         for pc relative relocs.
8724         (elf_s390_relocate_section): Likewise.
8725
8726 2004-02-26  H.J. Lu  <hongjiu.lu@intel.com>
8727
8728         * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
8729         count_dyn_reloc.
8730
8731 2004-02-25  H.J. Lu  <hongjiu.lu@intel.com>
8732
8733         * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
8734         field to track if a relocation is against readonly section.
8735         (count_dyn_reloc): Take a new argument for rent->reltext.
8736         (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
8737         (get_reloc_section): Don't set ia64_info->reltext here.
8738         (allocate_dynrel_entries): Set ia64_info->reltext here.
8739
8740 2004-02-24  Alexandre Oliva  <aoliva@redhat.com>
8741
8742         * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
8743         (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
8744         function's descriptor to symbol+offset, and map local undefweak
8745         symbol to NULL function descriptor.
8746         (elf32_frv_relocate_section): Likewise.
8747
8748 2004-02-23  Mark Kettenis  <kettenis@gnu.org>
8749
8750         * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
8751         M_X86_64_NETBSD.
8752         * netbsd-core.c (M_SPARC64_OPENBSD): Define.
8753         (netbsd_core_file_p): Set architecture from machine ID for
8754         selected machines.
8755
8756 2004-02-23  Jakub Jelinek  <jakub@redhat.com>
8757
8758         * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
8759         DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
8760
8761 2004-02-21  H.J. Lu  <hongjiu.lu@intel.com>
8762
8763         * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
8764         symbols with non-default visibility.
8765
8766 2004-02-21  Danny Smith  <daanysmith@users.sourceforge.net>
8767
8768         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
8769         IMAGE_SCN_MEM_WRITE on known sections only.
8770
8771 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
8772
8773         * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
8774         symbols used in PIE relocs.
8775
8776 2004-02-19  Jakub Jelinek  <jakub@redhat.com>
8777
8778         * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
8779         .plt sh_entsize.
8780
8781 2004-02-18  Daniel Jacobowitz  <drow@mvista.com>
8782
8783         * configure.in: Update version to 2.15.90.
8784         * configure: Regenerate.
8785
8786 2004-02-17  Daniel Jacobowitz  <drow@mvista.com>
8787             Richard Sandiford  <rsandifo@redhat.com>
8788
8789         * elfxx-mips.c (mips_elf_calculate_relocation): Use
8790         _bfd_elf_symbol_refs_local_p to decide whether to decay
8791         a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
8792         (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
8793         relocs if the symbol wasn't defined by a regular object file.
8794         Don't check the symbol's dynindx.
8795
8796 2004-02-16  Andrew Cagney  <cagney@redhat.com>
8797
8798         * bfd-in.h (file_ptr, ufile_ptr): Configure type using
8799         @bfd_file_ptr@.
8800         * bfd-in2.h: Re-generate.
8801
8802 2004-02-14  Andrew Cagney  <cagney@redhat.com>
8803
8804         * configure.host (HDEFINES): When hppa*-*-hpux*, define
8805         _LARGEFILE64_SOURCE.
8806
8807 2004-02-13  Andrew Cagney  <cagney@redhat.com>
8808
8809         * elf.c (vma_page_aligned_bias): New function.
8810         (assign_file_positions_except_relocs)
8811         (assign_file_positions_for_segments): Replace broken modulo
8812         arithmetic with call to vma_page_aligned_bias.
8813
8814 2004-02-11  Andrew Cagney  <cagney@redhat.com>
8815
8816         * bfd-in.h: Update copyright.
8817         (bfd_tell): Change return type to file_ptr.
8818         * bfd-in2.h: Re-generate.
8819         * cache.c: Update copyright.
8820         (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
8821         parameter.
8822         (close_one): Use real_ftell.
8823         * bfdio.c: Update copyright.
8824         (real_ftell, real_fseek): New functions.
8825         (bfd_tell): Use real_fseek and real_ftell, change return type to
8826         file_ptr.
8827         (bfd_seek): Use real_ftell and real_fseek, change type of
8828         file_position to a file_ptr.
8829         * libbfd-in.h: Update copyright.
8830         (real_ftell, real_fseek): Declare.
8831         * libbfd.h: Re-generate.
8832
8833         * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
8834         fseeko and fseeko64.  Determine bfd_file_ptr.
8835         * configure: Re-generate.
8836         * config.in: Re-generate.
8837
8838 2004-02-09  Anil Paranjpe  <anilp1@KPITCummins.com>
8839
8840         * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
8841         * elf32-h8300.c: Likewise.
8842
8843 2004-02-09  Christian Vogel <vogelchr@vogel.cx>
8844             Nick Clifton  <nickc@redhat.com>
8845
8846         * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
8847         GOT entries with no associated GOT subsection.
8848
8849 2004-02-09  Richard Sandiford  <rsandifo@redhat.com>
8850
8851         * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
8852         * elf.c (swap_out_syms): Use it to decide whether local section
8853         symbols should be named.
8854         * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
8855         * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
8856         (elf_backend_name_local_section_symbols): Define.
8857         * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
8858
8859 2004-01-30  H.J. Lu  <hongjiu.lu@intel.com>
8860
8861         * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
8862         (elfNN_ia64_relax_section): Optimize brl to br during the relax
8863         finalize pass.
8864
8865 2004-01-30  Alexandre Oliva  <aoliva@redhat.com>
8866
8867         * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
8868         to bfd_link_hash_entry passed by reference to
8869         _bfd_generic_link_add_one_symbol.
8870
8871 2004-01-25  H.J. Lu  <hongjiu.lu@intel.com>
8872
8873         * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
8874         relocations against dynamic symbols.
8875
8876 2004-01-23  Daniel Jacobowitz  <drow@mvista.com>
8877
8878         * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
8879         change.
8880
8881 2004-01-21  Tom Rix  <tcrix@worldnet.att.net>
8882
8883         * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
8884         * bfd-in2.h, libbfd.h: Rebuilt.
8885
8886 2004-01-20  Danny Smith  <dannysmith@users.sourceforge.net>
8887
8888         * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
8889         IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
8890         flag has been cleared.
8891
8892 2004-01-19  Kazu Hirata  <kazu@cs.umass.edu>
8893
8894         * coff-h8300.c: Add and adjust comments about relaxation.
8895         * elf32-h8300.c: Likewise.
8896
8897 2004-01-16  Kazu Hirata  <kazu@cs.umass.edu>
8898
8899         * coff-h8300.c: Fix comment typos.
8900         * elf32-h8300.c: Likewise.
8901
8902 2004-01-16  Kazu Hirata  <kazu@cs.umass.edu>
8903
8904         * coff-h8300.c: Add comments about relaxation.
8905         * elf32-h8300.c: Likewise.
8906
8907 2004-01-14  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
8908
8909         * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
8910         throughout.
8911         * aclocal.m4: Regenerate.
8912         * configure: Regenerate.
8913
8914 2004-01-13  Ian Lance Taylor  <ian@wasabisystems.com>
8915
8916         * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
8917         mips_elf64_rtype_to_howto instead of using howto_table.
8918
8919 2004-01-13  Daniel Jacobowitz  <drow@mvista.com>
8920
8921         * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
8922         the .plt section.
8923         (elf32_arm_check_relocs): Don't increment the PLT refcount for
8924         relocs which would not use the PLT.
8925
8926 2004-01-13  Alan Modra  <amodra@bigpond.net.au>
8927
8928         * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
8929         (ppc64_elf_gc_sweep_hook): Likewise.
8930         (ppc64_elf_size_dynamic_sections): Test for .plt directly.
8931
8932 2004-01-12  Anil Paranjpe  <anilp1@KPITCummins.com>
8933
8934         Adds linker relaxation support for bit manipulation insns like
8935         band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
8936         bst, btst, bxor.
8937         * elf32-h8300.c: Opcode for bit manipulation insn is checked in
8938         elf32_h8_relax_section function while relxation for aa:16 and aa:32.
8939         * coff-h8300.c: Opcode for bit manipulation insn is checked in
8940         h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
8941
8942 2004-01-12  Alan Modra  <amodra@bigpond.net.au>
8943
8944         * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
8945
8946 2004-01-11  Kazu Hirata  <kazu@cs.umass.edu>
8947
8948         * elf32-h8300.c: Fix formatting.
8949
8950 2004-01-11  Kazu Hirata  <kazu@cs.umass.edu>
8951
8952         * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
8953         dynamic object is present.  Declare r_symndx and h in an inner
8954         scope.
8955         * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
8956
8957 2004-01-09  Daniel Jacobowitz  <drow@mvista.com>
8958
8959         * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
8960         (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
8961         (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
8962         identically.  Do not emit PC24 relocations for shared libraries.
8963         (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
8964         identically.  Don't adjust pc_count.
8965         (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
8966         Set ELF_LINK_HASH_NEEDS_PLT for both.  Don't adjust pc_count; don't
8967         adjust count for branch relocations.
8968         (allocate_dynrelocs): Correct typo in call to
8969         WILL_CALL_FINISH_DYNAMIC_SYMBOL.  Never allocate space for
8970         PC24 or PLT32 relocs when linking.
8971
8972 2004-01-09  Dmitry Semyonov  <Dmitry.Semyonov@oktet.ru>
8973
8974         * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
8975         relocation howto with ARM_26 one for consistency.
8976         (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
8977         that will be converted to ARM_26D ones, since we always want 'done'
8978         relocations to be reflected in section's data.
8979         (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
8980         offset.
8981         (_bfd_final_link_relocate): Do not modify "inplace" data, if not
8982         requested.
8983
8984 2004-01-08  Dmitry Semyonov  <Dmitry.Semyonov@oktet.ru>
8985
8986         * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
8987         are not partial_inplace during a relocatable link.
8988
8989 2004-01-08  Kazu Hirata  <kazu@cs.umass.edu>
8990
8991         * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
8992         if no dynamic object is present.  Declare r_symndx and h in an
8993         inner scope.
8994
8995 2004-01-07  H.J. Lu  <hongjiu.lu@intel.com>
8996
8997         * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
8998         trampoline if it is known out of range.
8999
9000 2004-01-06  Alexandre Oliva  <aoliva@redhat.com>
9001
9002         2003-12-17  Alexandre Oliva  <aoliva@redhat.com>
9003         * elf32-frv.c (_frv_osec_readonly_p): New.
9004         (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
9005         undefweak symbol.
9006         (_frv_count_got_plt_entries): Adjust expected count accordingly.
9007         (elf32_frv_relocate_section): Likewise.  Error out if attempting
9008         to emit rofixups or dynamic relocs in read-only segments.  Use
9009         _bfd_elf_section_offset to adjust r_offsets in rofixups and
9010         dynamic relocations.
9011         2003-12-12  Alexandre Oliva  <aoliva@redhat.com>
9012         * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
9013         relocations or fixups involving merged sections correctly.  Avoid
9014         crash when undefined symbol is referenced by R_FRV_32 or
9015         R_FRV_FUNCDESC_VALUE.
9016         2003-12-02  Alexandre Oliva  <aoliva@redhat.com>
9017         * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
9018         input section holding local symbol to addend of R_FRV_32 or
9019         R_FRV_FUNCDESC_VALUE dynamic relocation.
9020         2003-11-27  Alexandre Oliva  <aoliva@redhat.com>
9021         * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
9022         (elf32_frv_always_size_sections): Don't store pointer to
9023         __stacksize symbol in sec_info.
9024         (elf32_frv_modify_segment_map): Look it up here.
9025         2003-11-26  Alexandre Oliva  <aoliva@redhat.com>
9026         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
9027         of the lazy PLT entry, not only its offset, as the low word of a
9028         function descriptor.
9029         2003-11-10  Alexandre Oliva  <aoliva@redhat.com>
9030         * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
9031         if a hash table entry already exists but is not a definition.
9032         2003-11-05  Alexandre Oliva  <aoliva@redhat.com>
9033         * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
9034         (_frv_add_rofixup): Don't inline.
9035         (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
9036         for undefweak symbols.
9037         (elf32_frv_relocate_section): Avoid crash while computing
9038         relocation when linking with shared library.  Only emit rofixups
9039         and dynamic relocations for alloc&load sections.  Mark binaries
9040         with inter-segment relocations for relocation as a unit.
9041         (_frv_create_got_section): Rename .rofixup.got to .rofixup.
9042         (DEFAULT_STACK_SIZE): New.
9043         (_frv_count_got_plt_entries): Fix thinko in deciding whether to
9044         emit rofixups or dynamic relocs when linking dynamic non-PIE
9045         executables.
9046         (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
9047         shared libs too.  Reserve the last entry for the GOT pointer.
9048         (elf32_frv_finish_dynamic_sections): Emit it.
9049         (elf32_frv_always_size_sections): New.
9050         (elf32_frv_modify_segment_map): New.
9051         (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
9052         sections.
9053         (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
9054         (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
9055         (elf_backend_always_size_sections): New.
9056         (elf_backend_modify_segment_map): New.
9057         2003-10-31  Alexandre Oliva  <aoliva@redhat.com>
9058         * config.bfd: Added frv-*-*linux*.
9059         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
9060         ABS section, instead of crashing.
9061         (elf32_frv_relocate_section): Don't crash before warning about
9062         different segments in non-PIC relocation.
9063         2003-10-17  Alexandre Oliva  <aoliva@redhat.com>
9064         * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
9065         relocs to undefweak symbols.
9066         (elf32_frv_relocate_section): Ditto for undefined symbols.
9067         2003-10-06  Alexandre Oliva  <aoliva@redhat.com>
9068         * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
9069         gotfixup section was created.
9070         2003-09-30  Alexandre Oliva  <aoliva@redhat.com>
9071         * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
9072         FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
9073         complain_overflow_signed.
9074         * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
9075         have not been allocated.
9076         (_frv_emit_got_relocs_plt_entries): Return non-void.  Assert
9077         privfd only if dynamic sections were created.
9078         (elf32_frv_relocate_section): Compute gprel_segment, and use it
9079         for GPREL relocs.  When linking relocatable FDPIC executables,
9080         emit warnings for relocations that would be illegal on PIE or
9081         shared libraries.  Emit rofixup for R_FRV_32 only if input object
9082         is not FDPIC.
9083         (_frv_create_got_section): Define _gp symbol in the rofixup
9084         section.
9085         (elf32_frv_finish_dynamic_sections): If rofixups needed but
9086         dynamic sections missing, error out requesting -melf32frvfd.
9087         2003-09-19  Alexandre Oliva  <aoliva@redhat.com>
9088         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
9089         computation of addends from section and global or local symbol
9090         value.  Change return type to bfd_boolean, and return a failure if
9091         a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
9092         nonzero addend is required.
9093         (elf32_frv_relocate_section): Likewise.  Print error for
9094         unsupported nonzero addends.
9095         2003-09-18  Alexandre Oliva  <aoliva@redhat.com>
9096         * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
9097         force everything local.
9098         (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
9099         * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
9100         (frv_gotfixup_section): New.
9101         (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
9102         (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
9103         and relocsfdv.
9104         (_frv_add_rofixup): New.
9105         (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
9106         fdpic executables.  Use FRV_SYM_LOCAL more widely to simplify and
9107         improve some ugly conditions.
9108         (elf32_frv_relocate_section): Likewise.  Reject inter-segment
9109         relocations in fdpic.
9110         (_frv_create_got_section): Create .rofixup.got section.
9111         (struct _frv_dynamic_got_info): Added fixups.
9112         (_frv_count_got_plt_entries): Account in-GOT relocations into
9113         relocs32, relocsfd and relocsfdv.  Account them into relocs or
9114         fixups, as appropriate.
9115         (elf32_frv_size_dynamic_sections): Size rofixup section.  Simplify
9116         sizing of gotrel.
9117         (elf32_frv_finish_dynamic_sections): Verify that the right number
9118         of relocations and fixups was generated.
9119         (elf32_frv_check_relocs): Compute relocs32, relocsfd and
9120         relocsfdv.
9121         * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
9122         SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
9123         (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
9124         descriptor of a (formerly-)global symbol is local.
9125         (struct frv_pic_relocs_info): Adjust comments.
9126         (_frv_emit_got_relocs_plt_entries): Adjust.
9127         (elf32_frv_relocate_section): Likewise.
9128         (_frv_count_got_plt_entries): Likewise.
9129         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
9130         symbol's value to addend in the common preamble.  Decay dynamic
9131         symbols to section+offset if they bind or call locally, for GOT
9132         and FUNCDESC_VALUE, respectively.
9133         (elf32_frv_relocate_section): Likewise.
9134         (elf32_frv_check_relocs): Don't register as dynamic symbols of
9135         internal or hidden visibility.
9136         2003-09-17  Alexandre Oliva  <aoliva@redhat.com>
9137         * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
9138         argument, so as to not call _bfd_elf_rel_local_sym to compute it.
9139         (elf32_frv_relocate_section): Pass relocation addend in.  Use
9140         original relocation addend to look up the got relocs/plt entries
9141         table.  Do not call _bfd_elf_rel_local_sym.  Don't error out when
9142         processing relocations that reference .scommon symbols.
9143         2003-09-15  Alexandre Oliva  <aoliva@redhat.com>
9144         Introduce support for dynamic linking.
9145         * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
9146         (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
9147         elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
9148         (frv_reloc_type_lookup): Return REL howtos for executables and
9149         dynamic libraries.
9150         (frv_info_to_howto_rel): New.
9151         (struct frv_elf_link_hash_table): New.
9152         (frv_hash_table, frv_got_section, frv_gotrel_section,
9153         frv_plt_section, frv_pltrel_section, frv_relocs_info,
9154         frv_got_initial_offset, frv_plt_initial_offset): New macros.
9155         (frv_elf_link_hash_table_create): New.
9156         (struct frv_pic_relocs_info): New.
9157         (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
9158         (frv_pic_relocs_info_find): New.
9159         (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
9160         New.
9161         (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
9162         (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
9163         (_frv_emit_got_relocs_plt_entries): New.
9164         (elf32_frv_relocate_section): Add support for dynamic linking.
9165         Handle new relocations.
9166         (_frv_create_got_section): New.
9167         (elf32_frv_create_dynamic_sections): New.
9168         (ELF_DYNAMIC_INTERPRETER): New.
9169         (struct _frv_dynamic_got_info): New.
9170         (_frv_count_got_plt_entries): New.
9171         (struct _frv_dynamic_got_plt_info): New.
9172         (_frv_compute_got_alloc_data): New.
9173         (_frv_get_got_entry, _frv_get_fd_entry): New.
9174         (_frv_assign_got_entries, _frv_assign_plt_entries): New.
9175         (_frv_resolve_final_relocs_info): New.
9176         (elf32_frv_size_dynamic_sections): New.
9177         (elf32_frv_finish_dynamic_sections): New.
9178         (elf32_frv_adjust_dynamic_symbol): New.
9179         (elf32_frv_finish_dynamic_symbol): New.
9180         (elf32_frv_check_relocs): Handle new relocs.  Explain how the
9181         whole thing works.
9182         (elf_info_to_howto_rel): Define.
9183         (bfd_elf32_bfd_link_hash_table_create): Define.
9184         (elf_backend_create_dynamic_sections): Define.
9185         (elf_backend_adjust_dynamic_symbol): Define.
9186         (elf_backend_size_dynamic_sections): Define.
9187         (elf_backend_finish_dynamic_symbol): Define.
9188         (elf_backend_finish_dynamic_sections): Define.
9189         (elf_backend_want_got_sym): Define.
9190         (elf_backend_got_header_size): Define.
9191         (elf_backend_want_got_plt): Define.
9192         (elf_backend_plt_readonly): Define.
9193         (elf_backend_want_plt_sym): Define.
9194         (elf_backend_plt_header_size): Define.
9195         (elf_backend_may_use_rel_p): Define.
9196         (elf_backend_may_use_rela_p): Define.
9197         (elf_backend_default_use_rela_p): Define.
9198         2003-08-08  Alexandre Oliva  <aoliva@redhat.com>
9199         * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
9200         R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
9201         R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
9202         (frv_reloc_map): Map the corresponding BFD relocs to them.
9203         (frv_reloc_type_lookup): ... and back to BFD relocs.
9204         * reloc.c: New relocs.
9205         * bfd-in2.h, libbfd.h: Rebuilt.
9206         2003-08-04  Alexandre Oliva  <aoliva@redhat.com>
9207         * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
9208         R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
9209         R_FRV_FUNCDESC_GOTLO): New.
9210         (frv_reloc_map): Map the corresponding BFD relocs to them.
9211         (frv_reloc_type_lookup): ... and back to BFD relocs.
9212         * reloc.c: New relocs.
9213         * bfd-in2.h, libbfd.h: Rebuilt.
9214
9215 2004-01-05  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
9216
9217         * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9218         targets to support pages of up to 64kB.
9219         (elf32_bed): Redefine to get a separate backend data structure for
9220         traditional targets.
9221         * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9222         targets to support pages of up to 64kB.
9223         (elf64_bed): Redefine to get a separate backend data structure for
9224         traditional targets.
9225         * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
9226         targets to support pages of up to 64kB.
9227         (elf32_bed): Redefine to get a separate backend data structure for
9228         traditional targets.
9229
9230 2004-01-04  Mark Kettenis  <kettenis@gnu.org>
9231
9232         * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
9233
9234 2004-01-02  Mark Kettenis  <kettenis@gnu.org>
9235
9236         * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
9237         (elf_i386_grok_psinfo): Likewise.
9238
9239 2004-01-02  Bernardo Innocenti  <bernie@develer.com>
9240
9241         * config.bfd: Add m68k-uClinux target.
9242
9243 2004-01-01  Grant Edwards <grante@visi.com>
9244
9245         * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
9246         * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
9247         (elf32_h8_gc_sweep_hook): New function.
9248         (elf_backend_gc_mark_hook): Define.
9249         (elf_backend_gc_sweep_hook): Define.
9250         (elf_backend_can_gc_sections): Define.
9251
9252 For older changes see ChangeLog-0203
9253 \f
9254 Local Variables:
9255 mode: change-log
9256 left-margin: 8
9257 fill-column: 74
9258 version-control: never
9259 End: