* elf-bfd.h (bfd_elf_perform_complex_relocation): Update prototype.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2007-11-19 Alan Modra <amodra@bigpond.net.au>
2
3 * elf-bfd.h (bfd_elf_perform_complex_relocation): Update prototype.
4 * elflink.c (bfd_elf_perform_complex_relocation): Return status.
5 Don't print reloc overflow message.
6 * elf32-mep.c (mep_elf_relocate_section): Handle status from
7 bfd_elf_perform_complex_relocation.
8
9 2007-11-17 Thiemo Seufer <ths@mips.com>
10
11 * elfxx-mips.c (mips_elf_merge_obj_attributes): Handle -mips32r2
12 -mfp64 attribute.
13
14 2007-11-16 Nick Clifton <nickc@redhat.com>
15
16 * elf-m10300.c (mn10300_elf_check_relocs): Fix memory leak and
17 check that bfd_elf_get_elf_syms is only called once.
18
19 2007-11-16 Ulrich Weigand <uweigand@de.ibm.com>
20
21 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Set udata.p of
22 synthetic symbol to point to the ELF symbol it was derived from.
23
24 2007-11-15 Alan Modra <amodra@bigpond.net.au>
25
26 PR 5328
27 * opncls.c (separate_debug_file_exists): Use fopen/fread
28 rather than open/read and open in binary mode.
29
30 2007-11-14 Richard Sandiford <richard@codesourcery.com>
31
32 * elfxx-mips.c (mips_got_page_range): New structure.
33 (mips_got_page_entry): Likewise.
34 (mips_got_info): Add page_gotno and got_page_entries fields.
35 (mips_elf_got_per_bfd_arg): Add max_pages field. Delete
36 primary_count and current_count fields.
37 (mips_got_page_entry_hash, mips_got_page_entry_eq): New functions.
38 (mips_elf_pages_for_range, mips_elf_record_got_page_entry): Likewise.
39 (mips_elf_get_got_for_bfd): New function, split out from
40 mips_elf_make_got_per_bfd. Initialize the page_gotno and
41 got_page_entries fields when creating a new GOT structure.
42 (mips_elf_make_got_pages_per_bfd): New function.
43 (mips_elf_merge_got_with): New function, split out from
44 mips_elf_make_got_per_bfd. Merge page entries as well as
45 non-page entries. Use the minimum of max_pages and the sum
46 of the page_gotnos to estimate the number of page entries.
47 (mips_elf_merge_gots): Use the minimum of max_pages and the
48 bfd's page_gotno to estimate the number of page entries.
49 Use the above functions.
50 (mips_elf_multi_got): Add page entries as well as non-page entries
51 to the individual per-bfd GOTs. Initialize got_per_bfd_arg.max_pages.
52 Initialize the page_gotno and got_page_entries fields when creating
53 a new primary GOT. Use the minimum of pages and page_gotno when
54 adding the number of pages entries to local_gotno.
55 (mips_elf_create_got_section): Initialize the page_gotno and
56 got_page_entries fields of the GOT structure.
57 (mips_elf_rel_relocation_p, mips_elf_read_rel_addend)
58 (mips_elf_add_lo16_rel_addend, mips_elf_get_section_contents): New
59 functions, split out from...
60 (_bfd_mips_elf_relocate_section): ...here.
61 (_bfd_mips_elf_check_relocs): Record GOT page entries too.
62 (_bfd_mips_relax_section): Use mips_elf_get_section_contents.
63 (_bfd_mips_elf_always_size_sections): Use the smaller of the
64 loadable_size- and page_gotno-derived estimates.
65
66 2007-11-14 Thiemo Seufer <ths@mips.com>
67
68 * elfxx-mips.c (mips_elf_merge_obj_attributes): Prevent
69 unwanted fallthroughs in case statement.
70
71 2007-11-13 H.J. Lu <hongjiu.lu@intel.com>
72
73 PR binutils/5307
74 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
75 copy input subsystem if output is different from input.
76
77 2007-11-13 Nick Clifton <nickc@redhat.com>
78
79 * elf-m10300.c (mn10300_elf_final_link_relocate): Prevent the
80 accidental termination of DWARF location list entries.
81 (mn10300_elf_relax_delete_bytes): Stop deletion if an align reloc
82 is encountered that is larger than or not a mutliple of the number
83 of bytes being deleted.
84 When adjusting symbols, any symbols inside the region being
85 deleted must be moved to the end of the region.
86 Move align relocs forward if there is room for them after the
87 deletion of the region.
88
89 2007-11-13 Alan Modra <amodra@bigpond.net.au>
90
91 PR 5233
92 * elf.c (rewrite_elf_program_header): Formatting. Add
93 first_matching_lma and first_suggested_lma booleans and use
94 instead of testing matching_lma and suggested_lma for zero.
95
96 2007-11-12 H.J. Lu <hongjiu.lu@intel.com>
97
98 PR binutils/5299
99 * peicode.h (pe_bfd_object_p): Save and restore previous bfd
100 state when calling coff_object_p.
101
102 2007-11-12 Alan Modra <amodra@bigpond.net.au>
103
104 * elf.c (_bfd_elf_get_synthetic_symtab): Only bump the symbol
105 pointer when we have a valid symbol. Init udata.p to NULL.
106
107 2007-11-09 Nathan Sidwell <nathan@codesourcery.com>
108
109 * elf-vxworks.c (elf_vxworks_emit_relocs): Don't clobber
110 rel_hash. Move loop inside if test.
111
112 2007-11-08 Nathan Sidwell <nathan@codesourcery.com>
113
114 * elf-vxworks.h (elf_vxworks_add_dynamic_entries): Declare.
115 (elf_vxworks_finish_dynamic_entry): Declare.
116 * elf-vxworks.c: Include elf/vxworks.h.
117 (elf_vxworks_add_dynamic_entries): New.
118 (elf_vxworks_finish_dynamic_entry): New.
119 * Makefile.am (elf-vxworks.lo): Add dependency.
120 * Makefile.in (elf-vxworks.lo): Add dependency.
121 * elf32-i386.c (elf_i386_size_dynamic_sections,
122 elf_i386_finish_dynamic_sections): Call
123 elf_vxworks_add_dynamic_entries and
124 elf_vxworks_finish_dynamic_entry.
125 * elf32-ppc.c (ppc_elf_size_dynamic_sections,
126 ppc_elf_finish_dynamic_sections): Likewise.
127 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections,
128 sparc_finish_dyn): Likewise.
129 * elf32-sh.c (sh_elf_size_dynamic_sections,
130 sh_elf_finish_dynamic_sections): Likewise.
131 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections,
132 _bfd_mips_elf_finish_dynamic_sections): Likewise.
133 * elf32-arm.c (elf32_arm_size_dynamic_sections,
134 elf32_arm_finish_dynamic_sections): Likewise.
135
136 2007-11-07 Olivier Hainque <hainque@adacore.com>
137
138 * bfd/elfxx-mips.c (_bfd_mips_elf_fake_sections): Force
139 SHF_MIPS_NOSTRIP on .debug_frame for Irix.
140
141 2007-11-06 Alan Modra <amodra@bigpond.net.au>
142
143 * elf64-ppc.c (ppc64_elf_check_relocs): Don't refcount tlsld_got here..
144 (ppc64_elf_gc_sweep_hook): ..or here..
145 (ppc64_elf_tls_optimize): ..or here. Make two passes through the
146 relocs, ensuring that tls_get_addr calls follow gd and ld relocs.
147 (allocate_dynrelocs): Refcount tlsld_got here.
148 (ppc64_elf_size_dynamic_sections): Allocate local got and call
149 allocate_dynrelocs before allocating tlsld_got.
150 (ppc64_elf_relocate_section): Remove check that a tls_get_addr
151 call follows gd and ld relocs.
152
153 * elf32-ppc.c (ppc_elf_check_relocs): Don't refcount tlsld_got here..
154 (ppc_elf_gc_sweep_hook): ..or here..
155 (ppc_elf_tls_optimize): ..or here. Make two passes through the
156 relocs, ensuring that tls_get_addr calls follow gd and ld relocs.
157 (allocate_dynrelocs): Refcount tlsld_got here.
158 (ppc_elf_size_dynamic_sections): Call allocate_dynrelocs before
159 allocating tlsld_got.
160 (ppc_elf_relocate_section): Remove check that a tls_get_addr
161 call follows gd and ld relocs.
162
163 2007-11-05 Alan Modra <amodra@bigpond.net.au>
164
165 * merge.c (sec_merge_hash_lookup): Revert last change.
166 (record_section): Likewise.
167 (_bfd_merge_sections): Likewise.
168 (_bfd_merged_section_offset): Properly handle NULL secinfo.
169 (_bfd_add_merge_section): Allocate extra space for a zero
170 terminator on SEC_STRINGS sections.
171
172 2007-11-05 Danny Smith <dannysmith@users.sourceforge.net>
173
174 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Let .data, .text
175 and .bss section use the default.
176 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
177
178 2007-11-01 Joseph Myers <joseph@codesourcery.com>
179
180 * merge.c (sec_merge_hash_lookup): Add parameter sec_end. Check
181 for unterminated strings. All callers changed.
182 (record_section): Add parameter abfd. Give error message for
183 unterminated strings.
184 (_bfd_merge_sections): Update call to record_section.
185 (_bfd_write_merged_section, _bfd_merged_section_offset): Handle
186 NULL secinfo from merge failures.
187
188 2007-10-31 Nick Clifton <nickc@redhat.com>
189
190 * elf-m10300.c (mn10300_elf_relax_delete_bytes): Do not look for
191 align relocs when there are no relocs attached to the section.
192
193 2007-10-31 Alan Modra <amodra@bigpond.net.au>
194
195 * elf-bfd.h (bfd_elf_match_symbols_in_sections): Don't declare.
196 * elflink.c (bfd_elf_match_symbols_in_sections): Make static.
197 Remove section name comparisons.
198
199 2007-10-30 Nick Clifton <nickc@redhat.com>
200
201 * reloc.c (BFD_RELOC_MN10300_ALIGN): Add.
202 * bfd-in2.h: Regenerate.
203 * libbfd.h: Regnerate.
204 * elf-m10300.h: Handle R_MN10300_ALIGN relocs.
205 (mn10300_elf_relax_delete_bytes): Honour R_MN10300_ALIGN relocs.
206 Re-fix off by one error in comparisons.
207
208 2007-10-25 Pedro Alves <pedro_alves@portugalmail.pt>
209
210 * bfd-in.h (STRING_COMMA_LEN): Don't handle NULL STR case.
211 * bfd-in2.h: Regenerate.
212
213 2007-10-25 Daniel Jacobowitz <dan@codesourcery.com>
214
215 * elf32-ppc.c (ppc_elf_merge_obj_attributes): Add support for
216 Tag_GNU_Power_ABI_Vector.
217
218 2007-10-25 Joseph Myers <joseph@codesourcery.com>
219
220 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Do not add
221 PT_NULL header when not linking.
222
223 2007-10-25 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
224
225 * elf.c (elfcore_grok_ppc_vmx): New function.
226 (elfcore_grok_note): Handle NT_PPC_VMX.
227 (elfcore_write_ppc_vmx): New function.
228 * elf-bfd.h (elfcore_write_ppc_vmx): Declare.
229
230 2007-10-24 Alan Modra <amodra@bigpond.net.au>
231
232 * Makefile.am: Run "make dep-am".
233 * Makefile.in: Regenerate.
234 * po/SRC-POTFILES.in: Regenerate.
235
236 2007-10-23 Alan Modra <amodra@bigpond.net.au>
237
238 * elf64-ppc.c (ppc_build_one_stub): Don't duplicate relocs
239 emitted for ".brlt" entries.
240 (toc_adjusting_stub_needed): Don't treat ".fixup" specially here..
241 (ppc64_elf_next_input_section): ..instead do so here.
242
243 2007-10-19 Nick Clifton <nickc@redhat.com>
244
245 * config.bfd: Recognise am34-linux-gnu target.
246 * reloc.c: Add BFD_RELOC_MN10300_SYM_DIFF relocation.
247 * bfd-in2.h: Regenerate.
248 * libbfd.h: Regenerate.
249 * elf-m10300.c (elf_mn10300_howto): Add R_MN10300_SYM_DIFF.
250 (mn10300_reloc_map): Likewise.
251 (mn10300_elf_check_relocs): Do not create dynamic relocs for
252 symbol differences or relocations against absolute symbols.
253 (mn10300_elf_final_link_relocate): Likewise.
254 Handle R_MN10300_SYM_DIFF relocs.
255 (mn10300_elf_relocate_section): Fix for creating local copys of
256 dynamic relocs.
257 (mn10300_elf_relax_delete_bytes): Adjust symbols at the end of the
258 region. Adjust the size of function symbols.
259 (mn10300_elf_relax_section): Ignore symbols that are in discarded
260 sections.
261
262 2007-10-19 Nick Clifton <nickc@redhat.com>
263
264 * elf-m10300.c: Convert to ISO C.
265
266 2007-10-18 H.J. Lu <hongjiu.lu@intel.com>
267 Alan Modra <amodra@bigpond.net.au>
268
269 PR ld/4424
270 * config.bfd (targ_selvecs): Add bfd_elf64_alpha_vec for
271 alpha/FreeBSD. Add bfd_elf64_sparc_vec for sparc64/FreeBSD.
272 Add bfd_elf32_i386_vec and bfd_efi_app_ia32_vec for i386/FreeBSD.
273 (targ64_selvecs): Set for i386/FreeBSD.
274 * elf-bfd.h (elf_backend_data): Add relocs_compatible.
275 (_bfd_elf_default_relocs_compatible): Declare.
276 (_bfd_elf_relocs_compatible): Declare.
277 * elfxx-target.h (elf_backend_relocs_compatible): Define.
278 (elfNN_bed): Init new relocs_compatible field.
279 * elflink.c (_bfd_elf_default_relocs_compatible): New function.
280 (_bfd_elf_relocs_compatible): New function.
281 (elf_link_add_object_symbols): Call bed->relocs_compatible.
282 * elf32-i386.c (elf_backend_relocs_compatible): Define.
283 * elf64-alpha.c: Likewise.
284 * elf64-sparc.c: Likewise.
285 * elf64-x86-64.c: Likewise.
286
287 2007-10-16 Bob Wilson <bob.wilson@acm.org>
288
289 * elf32-xtensa.c (relax_section): Check for a reference to a discarded
290 DWARF section and anticipate its replacement with the kept section.
291
292 2007-10-16 Bob Wilson <bob.wilson@acm.org>
293
294 * elf32-xtensa.c (elf_xtensa_discard_info_for_section): Remove
295 unnecessary size variables. Set sec->rawsize.
296 (relax_section, relax_property_section): Likewise.
297
298 2007-10-16 Bob Wilson <bob.wilson@acm.org>
299
300 * section.c (struct bfd_section): Clarify comment for rawsize field.
301 * bfd-in2.h: Regenerate.
302
303 2007-10-16 Bob Wilson <bob.wilson@acm.org>
304
305 * elflink.c (_bfd_elf_check_kept_section): Use the section rawsize
306 values if they are set.
307
308 2007-10-16 Nick Clifton <nickc@redhat.com>
309
310 PR 5146
311 * configure.in (AC_CHECK_HEADERS): Add alloca.h
312 * configure: Regenerate.
313 * config.in: Regenerate.
314 * som.c: Replace alloca-conf.h inclusion with code recommended in
315 autoconf documentation.
316 * elf64-hppa.c: Likewise.
317
318 2007-10-16 Nick Clifton <nickc@redhat.com>
319
320 * configure.in (--enable-elf-stt-common): New configure
321 option. If enabled then the tools can generate symbols with
322 the ELF STT_COMMON type.
323 * config.in: Regenerate.
324 * configure: Regenerate.
325 * elf.c (swap_out_syms): If USE_STT_COMMON is defined then set
326 the type of emitted common symbols to STT_COMMON.
327 * elfcode.h (elf_slurp_symbol_table): Accept STT_COMMON symbol
328 types.
329
330 2007-10-15 Alan Modra <amodra@bigpond.net.au>
331
332 * coff-arm.c (arm_emit_base_file_entry): Check fwrite return value.
333 Return status. Adjust callers.
334 * coff-mcore.c (mcore_emit_base_file_entry): Likewise.
335 * coff-ppc.c (write_base_file_entry): New function.
336 (coff_ppc_relocate_section): Use it.
337 * elf32-arm.c (find_thumb_glue): Check asprintf return status.
338 (find_arm_glue): Likewise.
339 * vms-misc.c (_bfd_vms_output_flush): Check fwrite return value.
340
341 2007-10-12 Nick Clifton <nickc@redhat.com>
342
343 PR 5160
344 * elflink.c (eval_symbol): Remove bufsz variable and use
345 sizeof(symbuf) where necessary.
346
347 2007-10-12 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
348
349 * elf32-cr16.c (elf32_cr16_relax_section): Fix condition check typo.
350
351 2007-10-12 Daniel Jacobowitz <dan@codesourcery.com>
352
353 * elfxx-mips.c (mips_elf_sort_hash_table_f): Handle forced
354 local symbols specially.
355 (mips_elf_set_global_got_offset): Skip forced local symbols.
356
357 2007-10-12 Alan Modra <amodra@bigpond.net.au>
358
359 * elf.c (elfcore_grok_prxfpreg): Fix comment typo.
360
361 2007-10-10 H.J. Lu <hongjiu.lu@intel.com>
362
363 * elf.c (get_program_header_size): Always add a PT_GNU_RELRO
364 segment for -z relro.
365 (_bfd_elf_map_sections_to_segments): Make a PT_GNU_RELRO
366 segment only when needed.
367
368 2007-10-05 Bob Wilson <bob.wilson@acm.org>
369
370 * elf32-xtensa.c (relax_section): Call pin_internal_relocs when
371 changing a relocation's offset. Adjust call to translate_reloc. Do
372 not add a fix record for a DIFF reloc. For other relocs, only add a
373 fix record if the translated target is in a different object file;
374 otherwise, just update the relocation. Call pin_internal_relocs when
375 updating a reloc but not when adding a fix record.
376 (translate_reloc): Get the target section from a new argument, not
377 from the relocation. Change check for relaxable sections to an
378 assertion. Compute separate offset adjustments for the base symbol
379 and the addend, and set the new relocation's addend correctly. Return
380 the new target section.
381
382 2007-10-05 Bob Wilson <bob.wilson@acm.org>
383
384 * elf32-xtensa.c (elf_xtensa_relocate_section): Remove updates of
385 r_type and howto after calling do_fix_for_relocateable_link and
386 do_fix_for_final_link.
387
388 2007-10-05 Bob Wilson <bob.wilson@acm.org>
389
390 * elf32-xtensa.c (removed_by_actions): New.
391 (offset_with_removed_text): Reimplement using removed_by_actions.
392 (offset_with_removed_text_before_fill): Delete.
393 (relax_property_section): Use removed_by_actions. Rearrange logic.
394 (relax_section_symbols): Likewise.
395
396 2007-10-04 Bob Wilson <bob.wilson@acm.org>
397
398 * elf32-xtensa.c (reloc_bfd_fix_struct): Delete target_abfd field.
399 (reloc_bfd_fix_init): Remove target_abfd argument.
400 (relax_section, move_literal): Adjust calls to reloc_bfd_fix_init.
401
402 2007-10-04 Nick Clifton <nickc@redhat.com>
403
404 PR linker/5099
405 * elf64-x86-64.c (elf64_x86_64_check_relocs): Add missing
406 apostrophe to error message.
407
408 2007-10-01 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
409
410 * elf32-cr16.c: Fixed DISP8, DISP20 and IMM20 relocations at
411 final relocation phase.
412 Added the below relaxations: IMM32 -> IMM20/IM16 -> IMM4.
413 * reloc.c: Added 3 new relocations: R_CR16_SWITCH8,
414 R_CR16_SWITCH16, R_CR16_SWITCH32.
415 * libbfd.h: Regenerate.
416 * bfd-in2.h: Regenerate.
417
418 2007-09-30 Alan Modra <amodra@bigpond.net.au>
419
420 * elflink.c: Formatting.
421
422 2007-09-29 Alan Modra <amodra@bigpond.net.au>
423
424 * elflink.c (resolve_symbol): Handle symbols in SEC_MERGE
425 sections. Don't test symbol st_shndx. Don't bother with
426 bfd_link_hash_common symbols. Print longs rather than ints
427 in debug messages.
428 (eval_symbol): Replace "sym" and "advanced" params with "symp".
429 Replace "addr" and "section_offset" params with "dot". Don't
430 cast bfd_vma values to signed, cast them to bfd_signed_vma.
431 (bfd_elf_perform_complex_relocation): Delete "output_bfd", "info",
432 "local_syms" and "local_sections" params. Add "relocation".
433 Delete code calculating relocation value.
434 (evaluate_complex_relocation_symbols): Delete function. Fold into..
435 (elf_link_input_bfd): ..existing code examining relocs.
436 * elf-bfd.h (bfd_elf_perform_complex_relocation): Update prototype.
437 * elf32-mep.c (mep_elf_check_relocs): Delete function.
438 (mep_elf_gc_sweep_hook, mep_elf_gc_mark_hook): Likewise.
439 (mep_elf_object_p): Don't set elf_bad_symtab.
440 (elf_backend_check_relocs): Don't define.
441 (elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): Likewise.
442 (elf_backend_can_gc_sections, USE_RELA): Likwise.
443 (mep_elf_relocate_section): Move bfd_elf_perform_complex_relocation
444 call after we have calculated reloc value. Delete local sym
445 debug code. Use RELOC_FOR_GLOBAL_SYMBOL. Delete addend
446 adjusting code..
447 (elf_backend_rela_normal): ..instead define this.
448
449 2007-09-28 Alan Modra <amodra@bigpond.net.au>
450
451 * elf-m10300.c (mn10300_elf_check_relocs): Delete dead code.
452 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
453 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
454 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
455 * elf32-cris.c (cris_elf_check_relocs): Likewise.
456 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
457 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
458 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
459 * elf32-frv.c (_frvfdpic_check_discarded_relocs): Likewise.
460 (elf32_frv_check_relocs): Likewise.
461 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
462 * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
463 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
464 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
465 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
466 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
467 * elf32-mt.c (mt_elf_check_relocs): Likewise.
468 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
469 * elf32-sh.c (sh_elf_check_relocs): Likewise.
470 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
471 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
472 * elf32-score.c (_bfd_score_elf_check_relocs): Likewise.
473 (score_elf_local_relocation_p): Likewise.
474 (_bfd_score_elf_relocate_section): Likewise.
475 (score_elf_final_link_relocate): Likewise.
476
477 2007-09-26 Jan Beulich <jbeulich@novell.com>
478
479 * elf32-i386.c (elf_i386_check_relocs): Revert NULL pointer
480 check for R_386_GNU_VTINHERIT.
481 * elf-m10300.c (mn10300_elf_check_relocs): Check for NULL
482 pointer for R_xxx_GNU_VTENTRY.
483 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
484 * elf32-bfin.c (bfin_check_relocs): Likewise.
485 (bfinfdpic_check_relocs): Likewise.
486 * elf32-cris.c (cris_elf_check_relocs): Likewise.
487 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
488 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
489 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
490 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
491 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
492 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
493 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
494 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
495 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
496 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
497 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
498 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
499 * elf32-s390.c (elf_s390_check_relocs): Likewise.
500 * elf32-score.c (_bfd_score_elf_check_relocs): Likewise.
501 * elf32-sh.c (sh_elf_check_relocs): Likewise.
502 * elf32-v850.c (v850_elf_check_relocs): Likewise.
503 * elf32-vax.c (elf_vax_check_relocs): Likewise.
504 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
505 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
506 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
507 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
508 * elf64-s390.c (elf_s390_check_relocs): Likewise.
509 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
510 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
511 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
512 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
513
514 2007-09-26 Alan Modra <amodra@bigpond.net.au>
515
516 * elflink.c (set_symbol_value): Add isymbuf and locsymcount
517 params. Change symidx to a size_t. Don't access past end
518 of symbol buffer.
519 (resolve_symbol): Add isymbuf param and use instead of
520 finfo->internal_syms.
521 (eval_symbol, evaluate_complex_relocation_symbols): Likewise.
522 (elf_link_input_bfd): Don't read symbols specially for
523 evaluate_complex_relocation_symbols.
524
525 2007-09-26 Tristan Gingold <gingold@adacore.com>
526
527 * som.c (som_get_reloc_upper_bound): If there are no relocs return
528 enough space to hold a NULL pointer.
529
530 2007-09-26 Alan Modra <amodra@bigpond.net.au>
531
532 * elf64-ppc.c (ppc_build_one_stub): Correct rel_hdr.sh_size.
533
534 2007-09-25 Alan Modra <amodra@bigpond.net.au>
535
536 * elf32-spu.c (struct spu_link_hash_table): Add ovly_load_r_symndx.
537 (spu_elf_size_stubs): Count stub relocs.
538 (write_one_stub): Emit relocs on overlay call stubs.
539
540 * elf32-spu.c (struct spu_link_hash_table): Add "stubs".
541 (spu_elf_link_hash_table_create): Init new field.
542 (spu_elf_size_stubs): Store sorted stub syms in new htab field
543 rather than local var.
544 (spu_elf_build_stubs): Iterate over htab stubs rather than
545 hash traversal.
546 (struct stubarr): Delete.
547 (allocate_spuear_stubs, populate_stubs, write_one_stub): Adjust.
548
549 2007-09-24 Daniel Jacobowitz <dan@codesourcery.com>
550
551 * elf.c (assign_file_positions_for_load_sections): Trust
552 p_align_valid.
553 (copy_elf_program_header): Copy PT_NULL segments.
554
555 2007-09-24 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
556
557 * elf32-spu.c (is_indirect_branch): New function.
558 (find_function_stack_adjust): End scan on hitting indirect branch.
559 (sum_stack): Cast %v arg to correct type.
560
561 2007-09-21 H.J. Lu <hongjiu.lu@intel.com>
562
563 * Makefile.am: Run "make dep-am".
564 * Makefile.in: Regenerated.
565
566 2007-09-21 Doug Kwan <dougkwan@google.com>
567
568 * Makefile.am (BFD32_LIBS): Add arange-set.lo.
569 (BFD32_LIBS_CFILES): Add arange-set.c.
570 (SOURCE_HFILES): Add arange-set.h
571 (dwarf2.lo): Add dependency upon arange-set.h.
572 (arange-set.lo): New target.
573 * Makefile.in: Regenerate.
574 * arange-set.c: New file.
575 * arange-set.h: New file.
576 * dwarf2.c: Include arange-set.h.
577 (struct dwarf2_debug) Add new fields comp_unit_count and
578 comp_unit_arange_set.
579 (struct comp_unit) Replace field arange with a new field arange_set.
580 (dwarf2_arange_set_allocate, dwarf2_arange_set_deallocate,
581 dwarf2_combine_arange_value, dwarf2_arange_set_new,
582 dwarf2_arange_set_with_value_new, dwarf2_comp_unit_arange_add): New
583 functions to utilize arange set in dwarf2.c.
584 (arange_add): Formatting change for a line longer than 80 characters.
585 (decode_line_info): Replace call target arange_add with
586 dwarf2_comp_unit_arange_add.
587 (read_rangelist_insert_arange_list,
588 read_rangelist_comp_unit_arange_add): New functions used as callbacks
589 for read_rangelist.
590 (read_rangelist): Change interface to accept a callback and data to
591 allow caller to select the action peformed on a new range list read.
592 (scan_unit_for_symbols): Use new interface of read_rangelist.
593 (parse_comp_unit): Create an arange set for each new comp unit.
594 Use new interface of read_rangelist. Replace call to arange_add
595 with that to dwarf2_comp_unit_arange_add.
596 (comp_unit_contains_address): Replace sequential search with a call to
597 arange_set_lookup_address, which can handles large set efficiently.
598 (stash_copy_local_aranges, stash_maybe_enable_arange_set,
599 stash_find_nearest_line_fast): New functions maintaining and using a
600 valued global arange set for all compilation units to speed up
601 bfd_dwarf2_find_nearest_line.
602 (find_line): Use global arange set. Replace sequential search over all
603 compilation units with a call to stash_find_nearest_line_fast. Add
604 book keeping to count number of compilation units. Replace empty
605 arange list test with a call to arange_set_empty_p.
606
607 2007-09-21 Olivier Hainque <hainque@adacore.com>
608 Tristan Gingold <gingold@adacore.com>
609
610 * syms.c (_bfd_stab_section_find_nearest_line): Look at the
611 specific SOM sections for stabs if the regular ones are not found.
612 * som.h (struct somdata): Add a line_info field, to be used by
613 som_find_nearest_line.
614 * som.c (som_find_nearest_line): Implement using the bfd stabs
615 function above.
616
617 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
618
619 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Make sure .got
620 will be output.
621
622 2007-09-19 Alan Modra <amodra@bigpond.net.au>
623 Doug Kwan <dougkwan@google.com>
624
625 * bfd-in.h (bfd_hash_insert): Declare.
626 * bfd-in2.h: Regenerate.
627 * hash.c (bfd_hash_insert): New function. Split out from..
628 (bfd_hash_lookup): ..here.
629 * merge.c (sec_merge_hash_lookup): Use bfd_hash_insert.
630
631 2007-09-18 Alan Modra <amodra@bigpond.net.au>
632
633 * elf.c (bfd_section_from_shdr): Check bfd_alloc return.
634 (elfcore_write_note): Check realloc return.
635 * elflink.c (_bfd_elf_link_find_version_dependencies): Check
636 bfd_zalloc return.
637 (_bfd_elf_link_assign_sym_version): Check bfd_malloc return.
638 (elf_link_add_object_symbols): Likewise.
639 (struct hash_codes_info): New.
640 (elf_collect_hash_codes): Return bfd_malloc error.
641 (struct collect_gnu_hash_codes): Add "error".
642 (elf_collect_gnu_hash_codes): Return bfd_malloc error.
643 (bfd_elf_size_dynamic_sections): Check return status of
644 _bfd_elf_link_find_version_dependencies.
645 (bfd_elf_size_dynsym_hash_dynstr): Adjust for elf_collect_hash_codes
646 and elf_collect_gnu_hash_codes changes.
647 (elf_sym_name_compare): Formatting.
648 (elf_fixup_link_order): Use bfd_malloc, not xmalloc.
649
650 2007-09-17 H.J. Lu <hongjiu.lu@intel.com>
651
652 PR binutils/3281
653 PR binutils/5037
654 * elf-bfd.h (elf_obj_tdata): Remove relro.
655
656 * elf.c (get_program_header_size): Check info->relro instead
657 of elf_tdata (abfd)->relro.
658 (_bfd_elf_map_sections_to_segments): Likewise.
659 (assign_file_positions_for_load_sections): Don't set
660 PT_GNU_RELRO segment alignment here.
661 (assign_file_positions_for_non_load_sections): Properly set up
662 PT_GNU_RELRO segment for copying executable/shared library.
663 (rewrite_elf_program_header): Remove PT_GNU_RELRO segment.
664 (copy_elf_program_header): Set p_size and p_size_valid fields for
665 PT_GNU_RELRO segment.
666
667 2007-09-17 Nick Clifton <nickc@redhat.com>
668
669 * po/fi.po: New Finnish translation.
670 * po/es.po: Updated Spanish translation.
671 * configure.in (ALL_LINGUAS): Add fi.
672 * configure: Regenerate.
673 * po/bfd.pot: Regenerate.
674
675 2007-09-15 Nick Clifton <nickc@redhat.com>
676
677 * bfd.c (_bfd_default_error_handler): fflush stdout.
678
679 2007-09-14 Alan Modra <amodra@bigpond.net.au>
680
681 * opncls.c (find_separate_debug_file): Ensure bfd_set_error has
682 been called on all error return paths.
683 (bfd_fill_in_gnu_debuglink_section): Use bfd_malloc, not malloc.
684 Clear padding after filename
685
686 2007-09-14 Alan Modra <amodra@bigpond.net.au>
687
688 * format.c (bfd_check_format_matches): Record matching targets even
689 when "matching" is NULL to allow bfd_associated_vector matches.
690 Consolidate error return code. Consolidate ok return code. Always
691 restore original target and format on error.
692
693 2007-09-14 Alan Modra <amodra@bigpond.net.au>
694
695 * configure.in: Delete BFD_HOST_LONG_LONG and bfd checks for
696 long long. Partly revert 2007-07-12 change, so that
697 BFD_HOST_64BIT_LONG and BFD_HOST_64BIT_LONG_LONG are set
698 independent of "void *" size.
699 * configure: Regenerate.
700 * config.in: Regenerate.
701 * Makefile.in: Regenerate.
702
703 2007-09-12 Alan Modra <amodra@bigpond.net.au>
704
705 * elf-bfd.h (struct elf_backend_data): Delete elf_backend_sprintf_vma
706 and elf_backend_fprintf_vma.
707 (_bfd_elf_sprintf_vma, _bfd_elf_fprintf_vma): Delete.
708 * elf.c (_bfd_elf_sprintf_vma, _bfd_elf_fprintf_vma): Delete.
709 * elfxx-target.h (elf_backend_sprintf_vma): Don't define.
710 (elf_backend_fprintf_vma): Likewise.
711 (elfNN_bed): Don't init removed fields.
712 * bfd.c (is32bit): New function.
713 (bfd_sprintf_vma, bfd_fprintf_vma): Use the above.
714
715 2007-09-11 Nathan Sidwell <nathan@codesourcery.com>
716
717 * archures.c: Add bfd_mach_mcf_isa_c_nodiv,
718 bfd_mach_mcf_isa_c_nodiv_mac & bfd_mach_mcf_isa_c_nodiv_emac.
719 * ieee.c (ieee_write_processor): Update coldfire architecture
720 list.
721 * bfd-in2.h: Rebuilt.
722 * cpu-m68k.c (arch_info_struct): Add isa_c nodiv architectures.
723 (m68k_arch_features): Likewise.
724 * elf32-m68k.c (elf32_m68k_object_p): Add EF_M68K_CF_ISA_C_NODIV.
725 (elf32_m68k_print_private_bfd_data): Likewise.
726
727 2007-09-11 Jan Beulich <jbeulich@novell.com>
728
729 * elf64-i386.c (elf64_i386_tls_transition): Remove redundant 'const'.
730 * elf64-x86_64.c (elf64_x86_64_tls_transition): Likewise.
731
732 2007-09-08 Alan Modra <amodra@bigpond.net.au>
733
734 * elf64-ppc.c (func_desc_adjust): When resolving undefined
735 references to dot-symbols, transfer def_regular and
736 def_dynamic from the descriptor symbol.
737
738 2007-09-08 Alan Modra <amodra@bigpond.net.au>
739
740 * config.bfd: Set want64 for spu-*-elf.
741
742 2007-09-08 Alan Modra <amodra@bigpond.net.au>
743
744 PR ld/2864, ld/5006
745 * elf.c (special_sections): Comment typo.
746 (elf_fake_sections): Force SHT_PROGBITS for sections that are
747 SHT_NOBITS if BFD section flags say they have contents.
748
749 2007-09-04 Michael Snyder <msnyder@access-company.com>
750
751 * elf32-bfin.c (howto_table): Cut and paste error?
752 Name field of reloc is wrong.
753
754 2007-09-04 Alan Modra <amodra@bigpond.net.au>
755
756 * elf32-spu.c (elf_howto_table): Formatting.
757
758 2007-09-02 H.J. Lu <hongjiu.lu@intel.com>
759
760 PR ld/4986
761 * dwarf2.c (new_line_sorts_after): Undo the last change.
762 (add_line_info): Only keep the last entry with the same address
763 and end sequence.
764
765 2007-08-31 H.J. Lu <hongjiu.lu@intel.com>
766
767 PR ld/4986
768 * dwarf2.c (new_line_sorts_after): Also compare line number.
769
770 2007-08-31 Jesse Michael <jmichael@suse.de>
771
772 * mach-o.c (bfd_mach_o_make_bfd_section): Fix test for non
773 zerofill sections.
774
775 2007-08-28 David Heine <dlheine@tensilica.com>
776
777 * elf32-xtensa.c (compute_ebb_actions): Update removed_bytes when
778 narrowing instructions.
779
780 2007-08-28 Mark Shinwell <shinwell@codesourcery.com>
781 Joseph Myers <joseph@codesourcery.com>
782
783 * elf32-arm.c (elf32_arm_compare_mapping): Compare first on vma,
784 then on type.
785
786 2007-08-28 Robert Sebastian Gerus <arachnist@gmail.com>
787
788 * config.bfd: Add support for i[3-7]86-*-dragonfly*.
789 * configure.in: Likewise.
790 * configure: Regenerate.
791
792 2007-08-25 Ulrich Weigand <uweigand@de.ibm.com>
793 Alan Modra <amodra@bigpond.net.au>
794
795 * elf.c (elfcore_grok_spu_note): New function.
796 (elf_parse_notes): Call it.
797
798 2007-08-24 H.J. Lu <hongjiu.lu@intel.com>
799
800 * elf64-x86-64.c (elf64_x86_64_relocate_section): Adjust
801 indentation.
802
803 2007-08-24 Pedro Alves <pedro_alves@portugalmail.pt>
804
805 * elf.c (elfcore_grok_win32pstatus): Remove HAVE_WIN32_PSTATUS_T
806 guard. Make it host independent.
807 (elfcore_grok_note): Remove HAVE_WIN32_PSTATUS_T guard around
808 NT_WIN32PSTATUS.
809
810 2007-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
811
812 * elf-bfd.h (struct elf_obj_tdata): New BUILD_ID_SIZE, BUILD_ID.
813 * elf.c (elfcore_read_notes): Split to ...
814 (elf_read_notes) ... here ...
815 (elf_parse_notes): ... and here. Check `bfd_get_format (abfd)' with
816 the former subfunctions called only for BFD_CORE.
817 Call ELFOBJ_GROK_GNU_NOTE for BFD_OBJECT files with the owner "GNU".
818 (_bfd_elf_make_section_from_shdr): Call ELF_PARSE_NOTES for SHT_NOTEs.
819 (bfd_section_from_phdr): Update the call for renamed ELFCORE_READ_NOTES.
820 (elfobj_grok_gnu_build_id, elfobj_grok_gnu_note): New functions.
821 Code advisory: Roland McGrath
822
823 2007-08-24 Daniel Jacobowitz <dan@codesourcery.com>
824
825 * elf64-mips.c (elf_backend_sign_extend_vma): Define.
826
827 2007-08-24 Alan Modra <amodra@bigpond.net.au>
828
829 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Warning fix.
830
831 2007-08-23 H.J. Lu <hongjiu.lu@intel.com>
832
833 * Makefile.am: Run "make dep-am".
834 * Makefile.in: Regenerated.
835
836 2007-08-23 H.J. Lu <hongjiu.lu@intel.com>
837
838 * elf32-i386.c: Include "bfd_stdint.h".
839 (elf_i386_rtype_to_howto): New function.
840 (elf_i386_info_to_howto_rel): Use it.
841 (x86_64_opcode16): New union type.
842 (elf_i386_check_tls_transition): New function.
843 (elf_i386_tls_transition): Updated to check transition and
844 issue an error if a transition isn't supported.
845 (elf_i386_check_relocs): Return FALSE if
846 elf_i386_tls_transition returns FALSE.
847 (elf_i386_gc_sweep_hook): Likewise.
848 (elf_i386_relocate_section): Likewise. Remove BFD_ASSERT
849 on TLS transitions.
850
851 * elf64-x86-64.c: Include "bfd_stdint.h".
852 (x86_64_opcode16): New union type.
853 (x86_64_opcode32): Likewise.
854 (elf64_x86_64_check_tls_transition): New function.
855 (elf64_x86_64_tls_transition): Updated to check transition and
856 issue an error if a transition isn't supported.
857 (elf64_x86_64_check_relocs): Return FALSE if
858 elf64_x86_64_tls_transition returns FALSE.
859 (elf64_x86_64_gc_sweep_hook): Likewise.
860 (elf64_x86_64_relocate_section): Likewise. Remove BFD_ASSERT
861 on TLS transitions.
862
863 2007-08-22 H.J. Lu <hongjiu.lu@intel.com>
864
865 * elfxx-ia64.c: Convert to ISO C90 prototypes.
866 (elfNN_hpux_backend_section_from_bfd_section): Make it static.
867
868 2007-08-22 H.J. Lu <hongjiu.lu@intel.com>
869
870 * elf64-x86-64.c: Remove trailing whitespace.
871 * elfxx-ia64.c: Likewise.
872
873 2007-08-21 H.J. Lu <hongjiu.lu@intel.com>
874
875 * elf32-i386.c (elf_i386_tls_transition): Accept a pointer
876 to ELF hash entry instead of an integer for local test.
877 (elf_i386_check_relocs): Updated.
878 (elf_i386_gc_sweep_hook): Likewise.
879 (elf_i386_relocate_section): Likewise.
880
881 * elf64-x86-64.c (elf64_x86_64_tls_transition): Accept a
882 pointer to ELF hash entry instead of an integer for local
883 test.
884 (elf64_x86_64_check_relocs): Updated.
885 (elf64_x86_64_gc_sweep_hook): Likewise.
886 (elf64_x86_64_relocate_section): Likewise.
887
888 2007-08-20 H.J. Lu <hongjiu.lu@intel.com>
889
890 * elf32-i386.c (elf_i386_tls_transition): Break long line.
891 * elf64-x86-64.c (elf64_x86_64_tls_transition): Likewise.
892
893 2007-08-20 Jan Kratochvil <jan.kratochvil@redhat.com>
894
895 * elfxx-target.h [ELF_COMMONPAGESIZE && ELF_MAXPAGESIZE]
896 (ELF_MINPAGESIZE): Fixed its size guess. Sanity checked its size.
897 (ELF_COMMONPAGESIZE, ELF_MAXPAGESIZE): Sanity checked their size.
898
899 2007-08-20 Nick Clifton <nickc@redhat.com>
900
901 * elflink.c (elf_fixup_link_order): Rewrite conversion of
902 s->alignment_power into an offset mask in order to avoid a gcc
903 error message.
904
905 2007-08-17 Jakub Jelinek <jakub@redhat.com>
906
907 * config.bfd: Handle sparcv*-*-linux-* the same as sparc-*-linux-*.
908 Change sparc64-*-linux-* to sparc64*-*-linux-*.
909
910 2007-08-17 Alan Modra <amodra@bigpond.net.au>
911
912 * po/Make-in: Add --msgid-bugs-address to xgettext invocation.
913
914 2007-08-16 H.J. Lu <hongjiu.lu@intel.com>
915
916 * elf.c: Revert last change.
917
918 2007-08-16 H.J. Lu <hongjiu.lu@intel.com>
919
920 * elf.c (get_segment_type): Change PT_GNU_STACK to PT_GNU_ATTR.
921 (bfd_section_from_phdr): Likewise.
922 (get_program_header_size): Likewise. Add a PT_GNU_ATTR segment
923 if there is an attribute section.
924 (_bfd_elf_map_sections_to_segments): Likewise.
925 (IS_SECTION_IN_INPUT_SEGMENT): Likewise.
926
927 2007-08-14 H.J. Lu <hongjiu.lu@intel.com>
928
929 PR ld/4918
930 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_PC32
931 on ___tls_get_addr for GD->LE/LD->LE transitions when not
932 building shared library.
933
934 * elf64-x86-64.c (elf64_x86_64_relocate_section): Allow
935 R_X86_64_PC32 on __tls_get_addr for GD->LE/LD->LE transitions
936 when not building shared library.
937
938 2007-08-14 Jan Kratochvil <jan.kratochvil@redhat.com>
939
940 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): LOADBASE is now
941 initialized only on the first PT_LOAD. New variable LOADBASE_SET.
942 Removed PF_R checking for IA-64 vDSOs as redundant now.
943 Code advisory: Roland McGrath
944
945 2007-08-13 Richard Sandiford <richard@codesourcery.com>
946
947 * elfxx-mips.c (mips_elf_link_hash_table): Add computed_got_sizes.
948 (mips_elf_record_global_got_symbol): Increment local_gotno for
949 each forced-local symbol.
950 (_bfd_mips_elf_check_relocs): Pass forced-local call symbols to
951 mips_elf_record_global_got_symbol for VxWorks too.
952 (_bfd_mips_elf_always_size_sections): Set computed_got_sizes
953 to true after computing the GOT size.
954 (_bfd_mips_elf_hide_symbol): Increase local_gotno whenever
955 got.offset == 1. Only adjust global_gotno if computed_got_sizes.
956 For VxWorks, add a local entry when hiding a symbol that needs a
957 plt but has not been marked as needing a global got entry.
958 (_bfd_mips_elf_link_hash_table_create): Set computed_got_sizes to
959 false.
960
961 2007-08-12 Daniel Jacobowitz <dan@codesourcery.com>
962
963 * coffgen.c (coff_get_normalized_symtab): Correct cast.
964
965 2007-08-13 Alan Modra <amodra@bigpond.net.au>
966
967 * elf.c (elf_modify_segment_map): Add remove_empty_load param.
968 Don't remove empty PT_LOAD header if false.
969 (_bfd_elf_map_sections_to_segments): If user phdrs, pass false
970 to elf_modify_segment_map.
971 (assign_file_positions_for_load_sections): Pass false to
972 elf_modify_segment_map.
973
974 2007-08-13 Alan Modra <amodra@bigpond.net.au>
975
976 * elf64-ppc.c (ADDI_R12_R12, LD_R11_0R2, LD_R2_0R2): Define.
977 Update stub comments.
978 (build_plt_stub): Build two variants, one without "addis".
979 (ppc_build_one_stub): Build stubs without "addis" if possible.
980 (ppc_size_one_stub): Size new stubs.
981
982 2007-08-11 Richard Sandiford <richard@codesourcery.com>
983
984 * config.bfd (sh-*-vxworks): Define targ_underscore to "yes".
985
986 2007-08-09 Michael Snyder <msnyder@access-company.com>
987
988 * aoutx.h (aout_get_external_symbols): Return if count is zero.
989
990 2007-08-09 H.J. Lu <hongjiu.lu@intel.com>
991
992 PR ld/4909
993 * elf.c (print_segment_map): New function.
994 (assign_file_positions_for_load_sections): Call print_segment_map
995 when a section can't be allocated in segment.
996
997 2007-08-09 Jan Kratochvil <jan.kratochvil@redhat.com>
998
999 * opncls.c (bfd_openr_iovec): Fix the OPEN parameter macro expansion.
1000
1001 2007-08-07 Nick Clifton <nickc@redhat.com>
1002
1003 * po/bfd.pot: Updated template.
1004 * po/BLD-POTFILES.in: Regenerate.
1005
1006 2007-08-07 Alan Modra <amodra@bigpond.net.au>
1007
1008 * elf.c: (_bfd_elf_make_section_from_phdr): Properly handle
1009 bss segments.
1010
1011 2007-08-06 Daniel Jacobowitz <dan@codesourcery.com>
1012
1013 * Makefile.am (BUILD_HFILES): Clean bfd_stdint.h.
1014 * Makefile.in: Regenerated.
1015
1016 2007-08-06 Daniel Jacobowitz <dan@codesourcery.com>
1017
1018 * configure.in: Update version to 2.18.50.
1019 * configure: Regenerated.
1020
1021 2007-08-06 Paul Brook <paul@codesourcery.com>
1022
1023 * elf32-arm.c (elf32_arm_link_hash_entry): Add
1024 plt_maybe_thumb_refcount.
1025 (elf32_arm_link_hash_newfunc): Set plt_maybe_thumb_refcount.
1026 (elf32_arm_copy_indirect_symbol): Ditto.
1027 (elf32_arm_adjust_dynamic_symbol): Ditto.
1028 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_THM_JUMP24.
1029 (arm_add_to_rel): Ditto.
1030 (elf32_arm_final_link_relocate): Merge R_ARM_THM_JUMP24 with
1031 R_ARM_THM_CALL. Handle R_ARM_THM_JUMP19 against a PLT stub.
1032 (elf32_arm_gc_sweep_hook): Call check_use_blx. Update plt counts
1033 for R_ARM_THM_JUMP24 and R_ARM_THM_JUMP19.
1034 (elf32_arm_check_relocs): Update plt counts for R_ARM_THM_JUMP24
1035 and R_ARM_THM_JUMP19.
1036 (allocate_dynrelocs): Use plt_maybe_thumb_refcount.
1037 (elf32_arm_finish_dynamic_symbol): Ditto.
1038 (elf32_arm_output_plt_map): Ditto.
1039
1040 2007-08-06 Daniel Jacobowitz <dan@codesourcery.com>
1041
1042 * elf.c (rewrite_elf_program_header): Handle sections not sorted
1043 by address.
1044 (copy_elf_program_header): Likewise.
1045
1046 2007-08-04 H.J. Lu <hongjiu.lu@intel.com>
1047
1048 * elf-bfd.h (xvec_get_elf_backend_data): Add const.
1049
1050 * elfcode.h (elf_object_p): Use xvec_get_elf_backend_data.
1051 * elfcore.h (elf_core_file_p): Likewise.
1052
1053 2007-08-02 H.J. Lu <hongjiu.lu@intel.com>
1054
1055 * coffcode.h (ALIGN_SET): Removed.
1056 (ELIFALIGN_SET): Likewise.
1057 (coff_set_alignment_hook): Handle IMAGE_SCN_ALIGN_128BYTES,
1058 IMAGE_SCN_ALIGN_256BYTES, IMAGE_SCN_ALIGN_512BYTES,
1059 IMAGE_SCN_ALIGN_1024BYTES, IMAGE_SCN_ALIGN_2048BYTES,
1060 IMAGE_SCN_ALIGN_4096BYTES and IMAGE_SCN_ALIGN_8192BYTES.
1061
1062 2007-08-01 Michael Snyder <msnyder@access-company.com>
1063
1064 * vms-tir.c (new_section): Fix cut and paste error.
1065
1066 * aoutx.h (aout_link_add_symbols): Return if count is zero.
1067
1068 * elf.c (bfd_elf_print_symbol): Macro dereferences pointer, so
1069 pointer must be non-null.
1070
1071 2007-08-01 Tristan Gingold <gingold@adacore.com>
1072
1073 * coffcode.h (coff_sort_func_alent): New function.
1074 (coff_slurp_line_table): Sort line table if not already sorted.
1075
1076 2007-08-01 Jakub Jelinek <jakub@redhat.com>
1077
1078 * elf.c (_bfd_elf_map_sections_to_segments): Work around buggy
1079 GCC 3.4.x warning.
1080
1081 2007-08-01 Alan Modra <amodra@bigpond.net.au>
1082
1083 * aoutx.h (swap_ext_reloc_in): Set howto to NULL for unknown
1084 r_type.
1085 (swap_std_reloc_in): Likewise.
1086 (aout_link_input_section_std): Likewise. Return with an error
1087 on unexpected relocation type.
1088 (aout_link_input_section_ext): Likewise.
1089
1090 2007-08-01 Alan Modra <amodra@bigpond.net.au>
1091
1092 PR4694
1093 * aoutx.h (final_link): Write a zero in first word of
1094 stringtab if no symbols rather than corrupting last byte
1095 of text/data.
1096
1097 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1098
1099 * elf.c (get_program_header_size): Adjacent loadable .note*
1100 sections need just one PT_NOTE segment.
1101 (_bfd_elf_map_sections_to_segments): Likewise.
1102
1103 2007-07-30 Michael Snyder <msnyder@access-company.com>
1104
1105 * coffgen.c (_bfd_coff_read_internal_relocs): Revert change of
1106 2007-07-26. Buffer still in use, can't be freed.
1107
1108 2007-07-27 Michael Snyder <msnyder@access-company.com>
1109
1110 * cofflink.c (coff_link_add_symbols): Return if count is zero.
1111
1112 * coff-i386.c (coff_i386_rtype_to_howto): Off by one error.
1113
1114 * aoutx.h (slurp_symbol_table): Return if count == 0.
1115
1116 * coffgen.c (_bfd_coff_read_internal_relocs): Return if count is zero.
1117
1118 * elf32-i386.c (elf_i386_check_relocs): Check for null pointer.
1119
1120 2007-07-27 H.J. Lu <hongjiu.lu@intel.com>
1121
1122 * config.bfd (x86_64-*-mingw*): Don't include x86_64coff_vec.
1123
1124 2007-07-26 Michael Snyder <msnyder@access-company.com>
1125
1126 * coff-i386.c (coff_i386_rtype_to_howto): Guard against null.
1127
1128 * linker.c (bfd_section_already_linked_table_insert): Change
1129 return type from void to boolean. Return FALSE on failure.
1130 (_bfd_generic_section_already_linked): Test return value of
1131 bfd_section_already_linked_table_insert, call fatal on error.
1132
1133 * elflink.c (_bfd_elf_section_already_linked): Test return value
1134 of bfd_section_already_linked_table_insert, call fatal on error.
1135
1136 * libbfd-in.h (bfd_section_already_linked_table_insert): Update
1137 return type to bfd_boolean.
1138
1139 * libbfd.h: Regenerate.
1140
1141 2007-07-26 Adam Nemet <anemet@caviumnetworks.com>
1142
1143 * archive.c (do_slurp_bsd_armap, do_slurp_coff_armap,
1144 bfd_slurp_armap): Improve function comment.
1145
1146 2007-07-26 Michael Snyder <msnyder@access-company.com>
1147
1148 * linker.c (already_linked_newfunc): Check for NULL return from
1149 bfd_hash_allocate.
1150
1151 * coffgen.c (fixup_symbol_value): Guard against null;
1152 bfd_is_com_section will dereference the section pointer.
1153
1154 * syms.c (bfd_decode_symclass): Guard against NULL, since
1155 bfd_is_com_section dereferences the pointer.
1156
1157 * srec.c (srec_scan): Check for EOF (critical because return value
1158 will be used as array index).
1159
1160 * coffgen.c (_bfd_coff_read_internal_relocs): If internal_relocs
1161 are not to be cached, free the temporary buffer.
1162
1163 * aoutx.h (slurp_reloc_table): Return TRUE if reloc_size == zero
1164 or count == zero.
1165
1166 * tekhex.c (first_phase): Check return value for null.
1167
1168 * elf.c (_bfd_elf_get_synthetic_symtab): Remove meaningless
1169 pointer increment.
1170
1171 2007-07-26 Alan Modra <amodra@bigpond.net.au>
1172
1173 * elflink.c (_bfd_elf_fix_symbol_flags): Remove unnecessary
1174 check on dynobj. Remove bed shadow.
1175
1176 * srec.c (srec_get_section_contents): Return immediately on
1177 count zero. Check that offset and count are within section.
1178 * libbfd.c (_bfd_generic_get_section_contents): Check that
1179 offset + count does not overflow.
1180
1181 * srec.c (srec_canonicalize_symtab): Don't alloc when symcount
1182 is zero. Correct return value on error.
1183 * mmo.c (mmo_canonicalize_symtab): Likewise.
1184 * binary.c (binary_canonicalize_symtab) Correct return on error.
1185
1186 2007-07-26 Thiemo Seufer <ths@mips.com>
1187
1188 * bfd.c (_bfd_set_gp_value): Use abort instead of BFD_FAIL.
1189
1190 2007-07-26 Alan Modra <amodra@bigpond.net.au>
1191
1192 * reloc.c (bfd_generic_get_relocated_section_contents): Avoid
1193 bfd_canonicalize_reloc call when bfd_get_reloc_upper_bound
1194 says there are no relocs.
1195
1196 2007-07-26 Doug Kwan <dougkwan@google.com>
1197
1198 Speed up bfd_dwarf2_find_line.
1199 * dwarf2.c (struct dwarf2_debug): Add new fields to support function
1200 and variable info hash tables. Add last_comp_unit, info_hash_count,
1201 funcinfo_hash_table, varinfo_hash_table, hash_units_head.
1202 (struct comp_unit): Add prev_unit, cached.
1203 (struct info_list_node, struct info_hash_entry,
1204 struct info_hash_table): New.
1205 (info_hash_table_newfunc, create_info_hash_table,
1206 insert_info_hash_table, lookup_info_hash_table): New functions
1207 implementing function and variable info hash tables.
1208 (scan_unit_for_symbols): Add checks to make sure hash tables are
1209 consistent with compilation units.
1210 (comp_unit_maybe_decode_line_info): New function.
1211 (comp_unit_find_line): Use comp_unit_maybe_decode_line_info.
1212 (reverse_funcinfo_list, reverse_varinfo_list, comp_unit_hash_info,
1213 info_hash_lookup_funcinfo, info_hash_lookup_varinfo,
1214 stash_maybe_update_info_hash_table, stash_verify_info_hash_table,
1215 stash_maybe_enable_info_hash_tables, stash_find_line_fast): New
1216 functions. Make use of info hash tables to speed up
1217 bfd_dwarf2_find_line.
1218 (find_line): Use hash table for faster lookup if it is turned on.
1219 Also add code to maintain bi-directional link in comp units.
1220
1221 2007-07-25 Michael Snyder <msnyder@access-company.com>
1222
1223 * coffgen.c (_bfd_coff_get_external_symbols): Nothing to be done
1224 if size == 0; return and avoid possible null pointer issues.
1225
1226 2007-07-25 Alan Modra <amodra@bigpond.net.au>
1227
1228 * linker.c (generic_link_add_symbol_list): Warning fix.
1229
1230 2007-07-24 Michael Snyder <msnyder@access-company.com>
1231
1232 * opncls.c (bfd_make_writable): Check return from bfd_malloc.
1233
1234 * elflink.c (bfd_elf_final_link): Avoid redundant frees -- return
1235 on bfd_malloc error rather than goto error_return.
1236
1237 2007-07-24 Alan Modra <amodra@bigpond.net.au>
1238
1239 * elflink.c (_bfd_elf_link_just_syms, merge_sections_remove_hook,
1240 _bfd_elf_merge_sections, _bfd_elf_link_hash_newfunc,
1241 _bfd_elf_link_hash_copy_indirect, _bfd_elf_link_hash_hide_symbol,
1242 _bfd_elf_link_hash_table_init, _bfd_elf_link_hash_table_create,
1243 bfd_elf_set_dt_needed_name, bfd_elf_get_dyn_lib_class,
1244 bfd_elf_set_dyn_lib_class, bfd_elf_get_needed_list,
1245 bfd_elf_get_runpath_list, bfd_elf_get_dt_soname,
1246 bfd_elf_get_bfd_needed_list, struct elf_symbuf_symbol,
1247 struct elf_symbuf_head, struct elf_symbol, elf_sort_elf_symbol,
1248 elf_sym_name_compare, elf_create_symbuf,
1249 bfd_elf_match_symbols_in_sections,
1250 _bfd_elf_match_sections_by_type): Move to here..
1251 * elf.c: ..from here.
1252
1253 2007-07-23 Richard Sandiford <richard@codesourcery.com>
1254
1255 * elflink.c (_bfd_elf_fix_symbol_flags): Only assert the type
1256 of weakdef->root.type if weakdef has no regular definition.
1257
1258 2007-07-22 Adam Nemet <anemet@caviumnetworks.com>
1259
1260 * elfxx-mips.c (struct mips_elf_link_hash_table): Add new field
1261 small_data_overflow_reported.
1262 (_bfd_mips_elf_link_hash_table_create): Initialize it.
1263 (_bfd_mips_elf_relocate_section) <bfd_reloc_overflow>: Report
1264 small-data section overflow.
1265
1266 2007-07-19 Doug Kwan <dougkwan@google.com>
1267
1268 PR binutils/4797
1269 * dwarf2.c: (find_line) Do not dereference functionname_ptr if
1270 do_line is true.
1271
1272 2007-07-18 Bob Wilson <bob.wilson@acm.org>
1273
1274 * elf32-xtensa.c (xtensa_callback_required_dependence): Ignore
1275 non-ELF sections.
1276
1277 2007-07-18 Bob Wilson <bob.wilson@acm.org>
1278
1279 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Get section
1280 vma and size for dynamic tags from the output sections.
1281
1282 2007-07-18 Alan Modra <amodra@bigpond.net.au>
1283
1284 * elf-bfd.h (struct sym_sec_cache): Delete "sec". Add "shndx".
1285 * elf.c (bfd_section_from_r_symndx): Don't cache bfd section of
1286 symbol. Instead cache ELF section index. Remove redundant
1287 checks of st_shndx.
1288
1289 2007-07-15 Mike Frysinger <vapier@gentoo.org>
1290
1291 * trad-core.c (NBPG): If not defined, set to getpagesize().
1292
1293 2007-07-13 Roland McGrath <roland@redhat.com>
1294
1295 * elf-bfd.h (struct elf_obj_tdata): Revert last change.
1296 Add after_write_object_contents, after_write_object_contents_info.
1297 * elf.c (_bfd_elf_write_object_contents): Revert last change.
1298 Instead, call after_write_object_contents if set.
1299
1300 2007-07-12 Kai Tietz <kai.tietz@onevision.com>
1301
1302 * bfd-in.h: (BFD_HOST_64BIT_LONG_LONG): New.
1303 (BFD_HOSTPTR_T): Host pointer type for casting a
1304 pointer to an integer type.
1305 (bfd_hostptr_t): The typedef of BFD_HOSTPTR_T.
1306 (sprintf_vma, fprintf_vma): Add support for long long prints.
1307 * bfd-in2.h: Regenerate.
1308 * configure.in: (BFD_HOST_64BIT_LONG_LONG): New.
1309 (BFD_HOSTPTR_T): Host pointer type for casting a
1310 pointer to an integer type. Default is "unsigned long".
1311 (AC_CHECK_SIZEOF(void *)): New.
1312 (host64): Set it if the pointer size is 8.
1313 * configure: Regenerate.
1314 * config.in: Add macro SIZEOF_VOID_P.
1315 * coffcode.h: Replace host ptr type assuming "long" with
1316 bfd_hostptr_t type.
1317 * coffgen.c: Likewise.
1318 * elf-eh-frame.c: Likewise.
1319 * peicode.h: Likewise.
1320
1321 2007-07-10 H.J. Lu <hongjiu.lu@intel.com>
1322
1323 * Makefile.in: Regenerated.
1324
1325 2007-07-10 H.J. Lu <hongjiu.lu@intel.com>
1326
1327 PR binutils/4756
1328 * simple.c (bfd_simple_get_relocated_section_content): Don't
1329 apply relocation on executable and shared library.
1330
1331 2007-07-10 Nathan Sidwell <nathan@codesourcery.com>
1332
1333 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't eliminate
1334 copy relocs on vxworks.
1335
1336 2007-07-10 Alan Modra <amodra@bigpond.net.au>
1337
1338 * elf32-arm.c (elf32_arm_size_info): Init checksum_contents field.
1339 * elf64-alpha.c (alpha_elf_size_info): Likewise.
1340 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1341 * elf64-mips.c (mips_elf64_size_info): Likewise.
1342 * elf64-s390.c (s390_elf64_size_info): Likewise.
1343 * elf64-sparc.c (elf64_sparc_size_info): Likewise.
1344
1345 2007-07-09 H.J. Lu <hongjiu.lu@intel.com>
1346
1347 * elflink.c (bfd_elf_record_link_assignment): Handle indirect
1348 symbol.
1349 (_bfd_elf_merge_symbol): Properly update normal symbol when
1350 overriding the versioned symbol from a dynamic library.
1351
1352 2007-07-09 Roland McGrath <roland@redhat.com>
1353
1354 * elf-bfd.h (struct elf_obj_tdata): Add members
1355 emit_note_gnu_build_id and note_gnu_build_id_sec.
1356 * elf.c (_bfd_id_note_section_size): New global function.
1357 (read_hex, _bfd_elf_write_build_id_section): New static functions.
1358 (_bfd_elf_write_object_contents): Call _bfd_elf_write_build_id_section
1359 if emit_note_gnu_build_id is set.
1360 * Makefile.am (elf.lo): Update dependencies.
1361
1362 * elf-bfd.h (struct elf_size_info): Add checksum_contents hook.
1363 (bfd_elf32_checksum_contents, bfd_elf64_checksum_contents): Declare.
1364 * elfcode.h (elf_checksum_contents): New macro and function.
1365 (NAME(_bfd_elf,size_info)): Initialize checksum_contents hook.
1366
1367 2007-07-06 Michael Snyder <msnyder@access-company.com>
1368
1369 * elflink.c (elf_link_add_object_symbols): Return via
1370 error_free_vers on "notice" failure.
1371
1372 2007-07-04 H.J. Lu <hongjiu.lu@intel.com>
1373
1374 * peicode.h (pe_bfd_object_p): Don't check PE vs. EFI target
1375 if arch is unknown.
1376
1377 2007-07-04 Nick Clifton <nickc@redhat.com>
1378
1379 Import this patch from an internal tree:
1380
1381 2001-07-17 Richard Henderson <rth@redhat.com>
1382
1383 * elf32-mep.c (mep_final_link_relocate) [R_MEP_HI16S]: Correctly
1384 compensate for high bit set in R_MEP_LOW16.
1385
1386 2007-07-03 Joseph Myers <joseph@codesourcery.com>
1387
1388 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Copy type from
1389 input attributes if value has been copied.
1390
1391 2007-07-03 Nick Clifton <nickc@redhat.com>
1392
1393 * COPYING: Replace with GPLv3 text.
1394 * aix386-core.c: Update copyright notice to refer to GPLv3.
1395 * aix5ppc-core.c, aout0.c, aout32.c, aout64.c, aout-adobe.c,
1396 aout-arm.c, aout-cris.c, aoutf1.h, aout-ns32k.c, aout-sparcle.c,
1397 aout-target.h, aout-tic30.c, aoutx.h, archive64.c, archive.c,
1398 archures.c, armnetbsd.c, bfd.c, bfd-in.h, bfdio.c, bfdwin.c,
1399 binary.c, bout.c, cache.c, cf-i386lynx.c, cf-sparclynx.c,
1400 cisco-core.c, coff64-rs6000.c, coff-alpha.c, coff-apollo.c,
1401 coff-arm.c, coff-aux.c, coffcode.h, coffgen.c, coff-go32.c,
1402 coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c, coff-i960.c,
1403 coff-ia64.c, cofflink.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
1404 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
1405 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
1406 coff-svm68k.c, coffswap.h, coff-tic30.c, coff-tic4x.c,
1407 coff-tic54x.c, coff-tic80.c, coff-u68k.c, coff-w65.c,
1408 coff-we32k.c, coff-x86_64.c, coff-z80.c, coff-z8k.c, corefile.c,
1409 cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c, cpu-bfin.c,
1410 cpu-cr16.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
1411 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
1412 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
1413 cpu-i960.c, cpu-ia64.c, cpu-ia64-opc.c, cpu-ip2k.c, cpu-iq2000.c,
1414 cpu-m10200.c, cpu-m10300.c, cpu-m32c.c, cpu-m32r.c, cpu-m68hc11.c,
1415 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
1416 cpu-mep.c, cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-mt.c,
1417 cpu-ns32k.c, cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c,
1418 cpu-powerpc.c, cpu-rs6000.c, cpu-s390.c, cpu-score.c, cpu-sh.c,
1419 cpu-sparc.c, cpu-spu.c, cpu-tic30.c, cpu-tic4x.c, cpu-tic54x.c,
1420 cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c, cpu-we32k.c,
1421 cpu-xc16x.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z80.c, cpu-z8k.c,
1422 demo64.c, doc/chew.c, dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c,
1423 ecoffswap.h, efi-app-ia32.c, efi-app-ia64.c, efi-app-x86_64.c,
1424 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
1425 elf32-avr.h, elf32-bfin.c, elf32.c, elf32-cr16.c, elf32-cr16c.c,
1426 elf32-cris.c, elf32-crx.c, elf32-d10v.c, elf32-d30v.c,
1427 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
1428 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
1429 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1430 elf32-iq2000.c, elf32-m32c.c, elf32-m32r.c, elf32-m68hc11.c,
1431 elf32-m68hc12.c, elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c,
1432 elf32-m88k.c, elf32-mcore.c, elf32-mep.c, elf32-mips.c,
1433 elf32-msp430.c, elf32-mt.c, elf32-openrisc.c, elf32-or32.c,
1434 elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c, elf32-score.c,
1435 elf32-sh64.c, elf32-sh64-com.c, elf32-sh64.h, elf32-sh.c,
1436 elf32-sh-symbian.c, elf32-sparc.c, elf32-spu.c, elf32-spu.h,
1437 elf32-v850.c, elf32-vax.c, elf32-xc16x.c, elf32-xstormy16.c,
1438 elf32-xtensa.c, elf64-alpha.c, elf64.c, elf64-gen.c, elf64-hppa.c,
1439 elf64-hppa.h, elf64-mips.c, elf64-mmix.c, elf64-ppc.c,
1440 elf64-ppc.h, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
1441 elf64-x86-64.c, elf-attrs.c, elf-bfd.h, elf.c, elfcode.h,
1442 elfcore.h, elf-eh-frame.c, elf-hppa.h, elflink.c, elf-m10200.c,
1443 elf-m10300.c, elfn32-mips.c, elf-strtab.c, elf-vxworks.c,
1444 elf-vxworks.h, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
1445 elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h, epoc-pe-arm.c,
1446 epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c, genlink.h,
1447 hash.c, host-aout.c, hosts/alphavms.h, hp300bsd.c, hp300hpux.c,
1448 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
1449 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
1450 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
1451 libaout.h, libbfd.c, libbfd-in.h, libcoff-in.h, libecoff.h,
1452 libhppa.h, libieee.h, libnlm.h, liboasys.h, libpei.h, libxcoff.h,
1453 linker.c, lynx-core.c, m68k4knetbsd.c, m68klinux.c, m68knetbsd.c,
1454 m88kmach3.c, m88kopenbsd.c, mach-o.c, mach-o.h, mach-o-target.c,
1455 mep-relocs.pl, merge.c, mipsbsd.c, mmo.c, netbsd-core.c, netbsd.h,
1456 newsos3.c, nlm32-alpha.c, nlm32.c, nlm32-i386.c, nlm32-ppc.c,
1457 nlm32-sparc.c, nlm64.c, nlm.c, nlmcode.h, nlmswap.h, nlm-target.h,
1458 ns32k.h, ns32knetbsd.c, oasys.c, opncls.c, osf-core.c,
1459 pc532-mach.c, pdp11.c, pe-arm.c, pe-arm-wince.c, pef.c, pef.h,
1460 pef-traceback.h, pe-i386.c, pei-arm.c, pei-arm-wince.c, peicode.h,
1461 pei-i386.c, pei-mcore.c, pei-mips.c, pei-ppc.c, pei-sh.c,
1462 pei-x86_64.c, pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c,
1463 pe-x86_64.c, peXXigen.c, ppcboot.c, ptrace-core.c, reloc16.c,
1464 reloc.c, riscix.c, rs6000-core.c, sco5-core.c, section.c,
1465 simple.c, som.c, som.h, sparclinux.c, sparclynx.c, sparcnetbsd.c,
1466 srec.c, stabs.c, stab-syms.c, stamp-h.in, sunos.c, syms.c,
1467 sysdep.h, targets.c, targmatch.sed, tekhex.c, ticoff.h,
1468 trad-core.c, vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c,
1469 vms.c, vms-gsd.c, vms.h, vms-hdr.c, vms-misc.c, vms-tir.c,
1470 xcofflink.c, xcoff-target.h, xsym.c, xsym.h, xtensa-isa.c,
1471 xtensa-modules.c: Likewise.
1472 * elf32-sh-relocs.h: Add copyright notice.
1473 * hosts/alphalinux.h, hosts/decstation.h, hosts/delta68.h,
1474 hosts/dpx2.h, hosts/hp300bsd.h, hosts/i386bsd.h,
1475 hosts/i386linux.h, hosts/i386mach3.h, hosts/i386sco.h,
1476 hosts/i860mach3.h, hosts/m68kaux.h, hosts/m68klinux.h,
1477 hosts/m88kmach3.h, hosts/mipsbsd.h, hosts/mipsmach3.h,
1478 hosts/news.h, hosts/news-mips.h, hosts/pc532mach.h,
1479 hosts/riscos.h, hosts/symmetry.h, hosts/tahoe.h, hosts/vaxbsd.h,
1480 hosts/vaxlinux.h, hosts/vaxult2.h, hosts/vaxult.h: Likewise.
1481 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate.
1482
1483 2007-07-02 Joseph Myers <joseph@codesourcery.com>
1484
1485 * elfxx-mips.c (mips_elf_calculate_relocation): Handle
1486 R_MIPS_TLS_DTPREL32 and R_MIPS_TLS_DTPREL64.
1487 * elf64-mips.c (mips_elf64_howto_table_rela): Support
1488 R_MIPS_TLS_DTPREL64.
1489
1490 2007-07-02 Alan Modra <amodra@bigpond.net.au>
1491
1492 * Makefile.am: Run "make dep-am".
1493 * Makefile.in: Regenerate.
1494 * aclocal.m4: Regenerate.
1495 * config.in: Regenerate.
1496 * po/SRC-POTFILES.in: Regenerate.
1497 * po/bfd.pot: Regenerate.
1498
1499 2007-07-02 Alan Modra <amodra@bigpond.net.au>
1500
1501 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Tidy
1502 symsec != NULL tests.
1503
1504 2007-07-02 Alan Modra <amodra@bigpond.net.au>
1505
1506 PR 4712
1507 * elf.c (assign_file_positions_for_load_sections): Adjust lma
1508 by p_vaddr_offset.
1509
1510 2007-06-30 H.J. Lu <hongjiu.lu@intel.com>
1511
1512 * aclocal.m4: Regenerated.
1513 * Makefile.in: Likewise.
1514
1515 2007-06-29 Joseph Myers <joseph@codesourcery.com>
1516
1517 * elf32-ppc.c (ppc_elf_merge_obj_attributes): New.
1518 (ppc_elf_merge_private_bfd_data): Call it.
1519
1520 2007-06-29 Joseph Myers <joseph@codesourcery.com>
1521
1522 * elfxx-mips.c (mips_elf_merge_obj_attributes): New.
1523 (_bfd_mips_elf_merge_private_bfd_data): Call it.
1524
1525 2007-06-29 Joseph Myers <joseph@codesourcery.com>
1526
1527 * elf-attrs.c: New.
1528 * Makefile.am (BFD32_BACKENDS): Add elf-attrs.lo.
1529 (BFD32_BACKENDS_CFILES): Add elf-attrs.c.
1530 (elf-attrs.lo): Generate dependencies.
1531 * Makefile.in: Regenerate.
1532 * configure.in (elf): Add elf-attrs.lo.
1533 * configure: Regenerate.
1534 * elf-bfd.h (struct elf_backend_data): Add entries for object
1535 attributes.
1536 (NUM_KNOWN_OBJ_ATTRIBUTES, obj_attribute, obj_attribute_list,
1537 OBJ_ATTR_PROC, OBJ_ATTR_GNU, OBJ_ATTR_FIRST, OBJ_ATTR_LAST,
1538 Tag_NULL, Tag_File, Tag_Section, Tag_Symbol, Tag_compatibility):
1539 New.
1540 (struct elf_obj_tdata): Add entries for object attributes.
1541 (elf_known_obj_attributes, elf_other_obj_attributes,
1542 elf_known_obj_attributes_proc, elf_other_obj_attributes_proc):
1543 New.
1544 (bfd_elf_obj_attr_size, bfd_elf_set_obj_attr_contents,
1545 bfd_elf_get_obj_attr_int, bfd_elf_add_obj_attr_int,
1546 bfd_elf_add_proc_attr_int, bfd_elf_add_obj_attr_string,
1547 bfd_elf_add_proc_attr_string, bfd_elf_add_obj_attr_compat,
1548 bfd_elf_add_proc_attr_compat, _bfd_elf_attr_strdup,
1549 _bfd_elf_copy_obj_attributes, _bfd_elf_obj_attrs_arg_type,
1550 _bfd_elf_parse_attributes, _bfd_elf_merge_object_attributes): New.
1551 * elf.c (_bfd_elf_copy_private_bfd_data): Copy object attributes.
1552 (bfd_section_from_shdr): Handle attributes sections.
1553 * elflink.c (bfd_elf_final_link): Handle attributes sections.
1554 * elfxx-target.h (elf_backend_obj_attrs_vendor,
1555 elf_backend_obj_attrs_section, elf_backend_obj_attrs_arg_type,
1556 elf_backend_obj_attrs_section_type): New.
1557 (elfNN_bed): Update.
1558 * elf32-arm.c (NUM_KNOWN_ATTRIBUTES, aeabi_attribute,
1559 aeabi_attribute_list): Remove.
1560 (struct elf32_arm_obj_tdata): Remove object attributes fields.
1561 (check_use_blx, bfd_elf32_arm_set_vfp11_fix, using_thumb2,
1562 elf32_arm_copy_private_bfd_data, elf32_arm_merge_eabi_attributes):
1563 Update for new object attributes interfaces.
1564 (uleb128_size, is_default_attr, eabi_attr_size,
1565 elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
1566 elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
1567 elf32_arm_new_eabi_attr, elf32_arm_get_eabi_attr_int,
1568 elf32_arm_add_eabi_attr_int, attr_strdup,
1569 elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat,
1570 copy_eabi_attributes, elf32_arm_parse_attributes): Remove. Moved
1571 to generic code in elf-attrs.c.
1572 (elf32_arm_obj_attrs_arg_type): New.
1573 (elf32_arm_fake_sections): Do not handle .ARM.attributes.
1574 (elf32_arm_section_from_shdr): Do not handle SHT_ARM_ATTRIBUTES.
1575 (bfd_elf32_bfd_final_link): Remove.
1576 (elf_backend_obj_attrs_vendor, elf_backend_obj_attrs_section,
1577 elf_backend_obj_attrs_arg_type,
1578 elf_backend_obj_attrs_section_type): New.
1579 * elf32-bfin.c (bfin_elf_copy_private_bfd_data): Copy object
1580 attributes.
1581 * elf32-frv.c (frv_elf_copy_private_bfd_data): Likewise.
1582 * elf32-iq2000.c (iq2000_elf_copy_private_bfd_data): Likewise.
1583 * elf32-mep.c (mep_elf_copy_private_bfd_data): Likewise.
1584 * elf32-mt.c (mt_elf_copy_private_bfd_data): Likewise.
1585 * elf32-sh.c (sh_elf_copy_private_data): Likewise.
1586 * elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.
1587
1588 2007-06-29 Paul Brook <paul@codesourcery.com>
1589
1590 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Suppress
1591 call veneers for call relocations against undefined symbols.
1592 (elf32_arm_final_link_relocate): Turn call to undefined symbol
1593 into a jump to the next instruction.
1594
1595 2007-06-29 Michael Snyder <msnyder@access-company.com>
1596
1597 * bfd.c (bfd_demangle): Plug memory leak (Coverity).
1598
1599 2007-06-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
1600
1601 * Makefile.am: Add cr16 related entry
1602 * Makefile.in: Regenerate
1603 * archures.c: Add bfd_cr16_arch
1604 * bfd-in2.h: Regenerate
1605 * config.bfd: Add cr16-elf
1606 * configure.in: Add bfd_elf32_cr16_vec
1607 * configure: Regenerate.
1608 * targets.c: Added cr16 related information
1609 * cpu-cr16.c: New file.
1610 * elf32-cr16.c: New file.
1611 * reloc.c: Added cr16 relocs.
1612
1613 2007-06-29 Alan Modra <amodra@bigpond.net.au>
1614
1615 * elflink.c (_bfd_elf_link_assign_sym_version): Improve error
1616 message for undefined version nodes.
1617 (elf_gc_sweep): Don't warn when zero size sections are
1618 removed.
1619
1620 2007-06-29 Nathan Froyd <froydnj@codesourcery.com>
1621
1622 * elf32-ppc.c (ppc_elf_info_to_howto): Check for invalid relocation
1623 types.
1624
1625 2007-06-29 Alan Modra <amodra@bigpond.net.au>
1626
1627 * elf32-spu.c (spu_elf_fake_sections): New function.
1628 (elf_backend_fake_sections): Define.
1629
1630 2007-06-29 Alan Modra <amodra@bigpond.net.au>
1631
1632 * elf.c (assign_file_positions_for_load_sections): Use elf
1633 section header sh_size rather than bfd section size, simplifying
1634 .tbss handling.
1635
1636 2007-06-29 Alan Modra <amodra@bigpond.net.au>
1637
1638 PR ld/4701
1639 * elf.c (assign_file_positions_for_load_sections): Ensure bss
1640 segments meet gABI alignment requirements. Don't allocate
1641 file space for bss sections in a segment also containing file
1642 or program headers.
1643
1644 2007-06-27 Alan Modra <amodra@bigpond.net.au>
1645
1646 * bfd.c (struct bfd): Rename "next" to "archive_next".
1647 * archive.c: Rename uses throughout file.
1648 * archive64.c: Likewise.
1649 * coff-rs6000.c: Likewise.
1650 * ecoff.c: Likewise.
1651 * som.c: Likewise.
1652 * bfd-in2.h: Regenerate.
1653
1654 * elf32-ppc.c (ppc_elf_select_plt_layout): Properly iterate over
1655 input bfds.
1656 * elf32-spu.c (spu_elf_create_sections): Likewise.
1657
1658 2007-06-26 H.J. Lu <hongjiu.lu@intel.com>
1659
1660 * dwarf2.c (find_line): New. Contains the duplicated code from:
1661 (_bfd_dwarf2_find_nearest_line): Use it.
1662 (_bfd_dwarf2_find_line): Use it.
1663
1664 2007-06-26 Joseph Myers <joseph@codesourcery.com>
1665
1666 * elf32-arm.c (copy_eabi_attributes): Copy type of attributes.
1667
1668 2007-06-25 Richard Sandiford <richard@codesourcery.com>
1669
1670 * elfxx-mips.c (mips_elf_calculate_relocation): Allow local stubs
1671 to be used for calls from MIPS16 code.
1672
1673 2007-06-23 Andreas Schwab <schwab@suse.de>
1674
1675 * configure.in (--with-separate-debug-dir): New option.
1676 * configure: Regenerate.
1677 * Makefile.am (dwarf2.lo): Add rule to pass DEBUGDIR.
1678 * Makefile.in: Regenerate.
1679 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Pass DEBUGDIR to
1680 bfd_follow_gnu_debuglink.
1681 (_bfd_dwarf2_find_line): Likewise.
1682
1683 2007-06-22 Nick Clifton <nickc@redhat.com>
1684
1685 * dwarf2.c: Add support for reading in debug information via a
1686 .gnu_debuglink section:
1687 (struct dwarf2_debug): Add bfd field to record the bfd containing
1688 the debug info.
1689 (parse_comp_unit): Remove ABFD parameter. Instead use the bfd
1690 field in the dwarf2_debug structure.
1691 (_bfd_dwarf2_find_nearest_line): If a debug info section could not
1692 be found in the current bfd call bfd_follow_gnu_debuglink to see
1693 if another file contains the debug information. If it does, open
1694 it and continue.
1695 (_bfd_dwarf2_find_line): Likewise.
1696
1697 2007-06-19 H.J. Lu <hongjiu.lu@intel.com>
1698
1699 PR ld/4590
1700 * elfxx-ia64.c (sort_dyn_sym_info): Keep the valid got_offset
1701 when removing duplicated entries.
1702 (get_dyn_sym_info): Initialize the got_offset field to -1.
1703 Update call to sort_dyn_sym_info.
1704 (elfNN_ia64_relocate_section): Call sort_dyn_sym_info to sort
1705 array of addend and remove duplicates.
1706
1707 2007-06-18 H.J. Lu <hongjiu.lu@intel.com>
1708
1709 * libpei.h (_bfd_XXi_final_link_postscript): Remove
1710 duplication.
1711 (bfd_target_pei_p): New.
1712 (bfd_target_pei_arch): New
1713 (bfd_target_efi_p): Likewise.
1714 (bfd_target_efi_arch): New
1715 (bfd_pe_executable_p): Use bfd_target_pei_p and
1716 bfd_target_efi_p.
1717
1718 * peicode.h (arch_type): New enum.
1719 (pe_arch): New function.
1720 (pe_bfd_object_p): Don't match PE/EFI target with EFI/PE file
1721 if there is an EFI/PE target.
1722
1723 2007-06-14 H.J. Lu <hongjiu.lu@intel.com>
1724
1725 * Makefile.am (ACLOCAL_AMFLAGS): Add -I . -I ../config.
1726
1727 * acinclude.m4: Don't include m4 files. Remove libtool
1728 kludge.
1729
1730 * Makefile.in: Regenerated.
1731 * aclocal.m4: Likewise.
1732 * configure: Likewise.
1733
1734 2007-06-11 Sterling Augustine <sterling@tensilica.com>
1735 Bob Wilson <bob.wilson@acm.org>
1736
1737 * elf32-xtensa.c (extend_ebb_bounds_forward): Use renamed
1738 XTENSA_PROP_NO_TRANSFORM flag instead of XTENSA_PROP_INSN_NO_TRANSFORM.
1739 (extend_ebb_bounds_backward, compute_text_actions): Likewise.
1740 (compute_ebb_proposed_actions, coalesce_shared_literal): Likewise.
1741 (xtensa_get_property_predef_flags): Likewise.
1742 (compute_removed_literals): Pass new arguments to is_removable_literal.
1743 (is_removable_literal): Add sec, prop_table and ptblsize arguments.
1744 Do not remove literal if the NO_TRANSFORM property flag is set.
1745
1746 2007-05-31 Richard Sandiford <rsandifo@nildram.co.uk>
1747
1748 * elfxx-mips.c (mips_elf_initialize_tls_index): When processing a
1749 type (3) single-GOT entry, read tls_type from the hash table entry
1750 rather than the GOT entry.
1751
1752 2007-06-01 Alan Modra <amodra@bigpond.net.au>
1753
1754 * simple.c (bfd_simple_get_relocated_section_contents): Init
1755 input_bfds_tail.
1756
1757 2007-05-30 Alan Modra <amodra@bigpond.net.au>
1758
1759 * elf.c (elf_fake_sections): Adjust test for SHT_NOBITS sections
1760 created by objcopy --only-keep-debug.
1761 (_bfd_elf_init_private_section_data): Only change elf_section_type
1762 if it is SHT_NULL.
1763
1764 * elf.c (assign_file_positions_for_load_sections): Correct sh_type
1765 to SHT_NOBITS earlier. Base actions in rest of function on sh_type
1766 and sh_flags instead of bfd section flags. Delete voff and code
1767 keeping nobits segments aligned.
1768
1769 2007-05-25 Eric Christopher <echristo@apple.com>
1770
1771 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame):
1772 Check that sym_sec isn't NULL before accessing.
1773
1774 2007-05-24 Steve Ellcey <sje@cup.hp.com>
1775
1776 * Makefile.in: Regnerate.
1777 * configure: Regenerate.
1778 * aclocal.m4: Regenerate.
1779 * doc/Makefile.in: Regenerate.
1780
1781 2007-05-22 Paul Brook <paul@codesourcery.com>
1782
1783 * elf32-arm.c (output_arch_syminfo): Replace plt_shndx and plt_offset
1784 with sec and sec_shndx.
1785 (elf32_arm_ouput_plt_map_sym): Use them.
1786 (elf32_arm_output_arch_local_syms): Output mapping symbols for
1787 interworking glue.
1788
1789 2007-05-18 Paul Brook <paul@codesourcery.com>
1790
1791 * elf32-arm.c (ARM2THUMB_V5_STATIC_GLUE_SIZE): Define.
1792 (a2t1v5_ldr_insn, a2t1v5_ldr_insn): New.
1793 (record_arm_to_thumb_glue): Add v5t non-pic glue.
1794 (elf32_arm_create_thumb_stub): Ditto.
1795
1796 2007-05-16 H.J. Lu <hongjiu.lu@intel.com>
1797 Alan Modra <amodra@bigpond.net.au>
1798
1799 * elflink.c (_bfd_elf_adjust_dynamic_copy): Align dynamic bss
1800 section to the minimum alignment.
1801
1802 2007-05-15 H.J. Lu <hongjiu.lu@intel.com>
1803 Alan Modra <amodra@bigpond.net.au>
1804
1805 PR ld/4504
1806 * elf-bfd.h (_bfd_elf_adjust_dynamic_copy): New.
1807 * elflink.c (_bfd_elf_adjust_dynamic_copy): New.
1808
1809 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Call
1810 _bfd_elf_adjust_dynamic_copy to adjust for the copy in dynamic
1811 bss section.
1812 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
1813 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
1814 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1815 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
1816 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
1817 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
1818 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
1819 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1820 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1821 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
1822 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
1823 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1824 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1825 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
1826 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1827 * elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Likewise.
1828 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
1829
1830 2007-05-15 Richard Sandiford <richard@codesourcery.com>
1831
1832 * elfxx-mips.c (mips_elf_create_local_got_entry): Remove
1833 input_section argument. Create .rela.dyn relocations against
1834 symbol 0 rather than the section symbol.
1835 (mips_elf_local_got_index): Remove input_section argument.
1836 Update call to mips_elf_create_local_got_entry.
1837 (mips_elf_got_page, mips_elf_got16_entry): Likewise.
1838 (mips_elf_calculate_relocation): Update calls to
1839 mips_elf_local_got_index, mips_elf_got16_entry and mips_elf_got_page.
1840
1841 2007-05-15 Mark Shinwell <shinwell@codesourcery.com>
1842
1843 * elf32-arm.c (elf32_arm_final_link_relocate): Correctly
1844 handle the Thumb-2 JUMP19 relocation.
1845
1846 2007-05-15 Alan Modra <amodra@bigpond.net.au>
1847
1848 PR 4479
1849 * elf.c (elf_fake_sections): Don't allow backend to change
1850 SHT_NOBITS if called for strip/objcopy --only-keep-debug.
1851 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove similar
1852 fix from here.
1853
1854 2007-05-14 Alan Modra <amodra@bigpond.net.au>
1855
1856 * elf.c (bfd_elf_string_from_elf_section): Return NULL on
1857 invalid shstrndx.
1858 (bfd_elf_get_str_section): Likewise.
1859
1860 2007-05-12 Alan Modra <amodra@bigpond.net.au>
1861
1862 PR 4497
1863 * elf-eh-frame.c (struct cie): Add "local_personality". Make
1864 "personality" a union.
1865 (cie_eq): Compare local_personality too. Adjust personality
1866 comparison.
1867 (_bfd_elf_discard_section_eh_frame): Check binding on personality
1868 reloc sym to allow for bad symtab. Use stashed local syms rather
1869 than reading personality local sym. Handle discarded sections.
1870
1871 2007-05-12 Alan Modra <amodra@bigpond.net.au>
1872
1873 * elf32-spu.c (elf_howto_table): Add howto for R_SPU_ADDR16X.
1874
1875 2007-05-11 Alan Modra <amodra@bigpond.net.au>
1876
1877 * elf32-ppc.h (ppc_elf_select_plt_layout): Update prototype.
1878 (enum ppc_elf_plt_type): Move from..
1879 * elf32-ppc.c: ..here.
1880 (struct ppc_elf_obj_tdata): Add makes_plt_call and has_rel16.
1881 (struct ppc_elf_link_hash_table): Reorder. Add old_bfd. Delete
1882 can_use_new_plt. Make is_vxworks a bitfield.
1883 (ppc_elf_link_hash_table_create): Don't clear is_vxworks (again).
1884 (ppc_elf_check_relocs): Update setting of reloc flags. Set old_bfd.
1885 (ppc_elf_select_plt_layout): Modify parameters. Use bfd reloc
1886 flags to better detect object files needing old bss-style plt.
1887 Allow secure plt to be used without rel16 relocs being detected.
1888 Warn if secure plt request cannot be allowed.
1889
1890 2007-05-11 Alan Modra <amodra@bigpond.net.au>
1891
1892 * reloc.c (BFD_RELOC_SPU_PPU32, BFD_RELOC_SPU_PPU64): Define.
1893 * elf-bfd.h (struct elf_backend_data): Change return type of
1894 elf_backend_relocate_section to int.
1895 * elf32-spu.c (elf_howto_table): Add howtos for R_SPU_PPU32 and
1896 R_SPU_PPU64.
1897 (spu_elf_bfd_to_reloc_type): Convert new relocs.
1898 (spu_elf_count_relocs): New function.
1899 (elf_backend_count_relocs): Define.
1900 (spu_elf_relocate_section): Arrange to emit R_SPU_PPU32 and
1901 R_SPU_PPU64 relocs.
1902 * elflink.c (elf_link_input_bfd): Emit relocs if relocate_section
1903 returns 2.
1904 * bfd-in2.h: Regenerate.
1905 * libbfd.h: Regenerate.
1906
1907 2007-05-10 Richard Sandiford <richard@codesourcery.com>
1908
1909 * elf32-arm.c (elf32_arm_check_relocs): Don't create PLT entries
1910 for R_ARM_ABS12 relocs.
1911 (elf32_arm_finish_dynamic_symbol): Fix the loop that creates
1912 non-shared VxWorks PLT entries.
1913
1914 2007-05-11 Alan Modra <amodra@bigpond.net.au>
1915
1916 PR 4454
1917 * elf-eh-frame.c (struct cie): Make "personality" a bfd_vma.
1918 (_bfd_elf_discard_section_eh_frame): Handle local syms on
1919 personality relocation.
1920
1921 2007-05-10 Richard Sandiford <richard@codesourcery.com>
1922
1923 * elf.c (assign_file_positions_for_load_sections): Use p_memsz
1924 rather than p_filesz to calculate the LMA of the end of a segment.
1925
1926 2007-05-10 Jakub Jelinek <jakub@redhat.com>
1927
1928 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't do copyreloc
1929 processing if symbol is defined in the executable.
1930
1931 2007-05-10 Alexandre Oliva <aoliva@redhat.com>
1932
1933 * elf32-frv.c (_frvfdpic_check_discarded_relocs): New.
1934 (frvfdpic_elf_discard_info): New.
1935 (elf_backend_discard_info): Define for FDPIC.
1936
1937 2007-05-09 Mark Shinwell <shinwell@codesourcery.com>
1938
1939 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Don't
1940 attempt to scan if the bfd doesn't correspond to an ELF image.
1941 (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
1942
1943 2007-05-08 Alexandre Oliva <aoliva@redhat.com>
1944
1945 * elf32-frv.c (elf32_frv_relocate_section): Discard dynamic relocs
1946 for which _bfd_elf_section_offset returns -1.
1947
1948 2007-05-08 Alan Modra <amodra@bigpond.net.au>
1949
1950 * elf32-spu.c (spu_elf_size_stubs): Use "void *" for psyms.
1951 (mark_functions_via_relocs): Likewise.
1952
1953 2007-05-07 Alan Modra <amodra@bigpond.net.au>
1954
1955 * elflink.c (bfd_elf_final_link): Correct reloc handling for
1956 elf_backend_count_relocs.
1957 (bfd_elf_discard_info): Print an error if we can't read syms.
1958
1959 2007-05-07 Alan Modra <amodra@bigpond.net.au>
1960
1961 * elf32-spu.c (spu_elf_reloc_type_lookup): Return NULL on
1962 invalid reloc code.
1963 (spu_elf_gc_mark_hook, spu_elf_section_processing): Delete functions.
1964 (elf_backend_gc_mark_hook, elf_backend_section_processing): Don't
1965 define.
1966
1967 2007-05-07 Alan Modra <amodra@bigpond.net.au>
1968
1969 * elf.c (assign_file_positions_for_load_sections): Don't check
1970 core segment.
1971
1972 2007-05-04 H.J. Lu <hongjiu.lu@intel.com>
1973
1974 * elflink.c (elf_link_sort_relocs): Return if both .rela.dyn
1975 and .rel.dyn aren't present.
1976
1977 2007-05-04 Nick Clifton <nickc@redhat.com>
1978
1979 * elflink.c (elf_link_sort_relocs): If both .rela.dyn and .rel.dyn
1980 sections are present examine the indirect sections in an attempt
1981 to compute the correct relocation size. If there is any
1982 ambiguity, produce an error and refuse to sort.
1983
1984 2007-05-03 Sandra Loosemore <sandra@codesourcery.com>
1985
1986 * elf32-arm.c (allocate_dynrelocs): Fix typo in comment.
1987
1988 2007-05-03 Vincent Riviere <vincent.riviere@freesbee.fr>
1989 Nick Clifton <nickc@redhat.com>
1990
1991 PR gas/3041
1992 * aoutx.h (swap_std_reloc_out): Treat relocs against weak symbols
1993 in the same way as relocs against external symbols.
1994
1995 2007-05-02 Alan Modra <amodra@bigpond.net.au>
1996
1997 * elf.c (assign_file_positions_for_load_sections): Set sh_offset
1998 here. Set sh_type to SHT_NOBITS if we won't be allocating
1999 file space. Don't bump p_memsz for non-alloc sections. Adjust
2000 section-in-segment check.
2001 (assign_file_positions_for_non_load_sections): Don't set sh_offset
2002 here for sections that have already been handled above.
2003
2004 2007-04-30 Alan Modra <amodra@bigpond.net.au>
2005
2006 * elf32-spu.c (struct spu_link_hash_table): Add stack_analysis
2007 and emit_stack_syms bitfields.
2008 (get_sym_h): Read all symbols if stack analysis will be done.
2009 (spu_elf_create_sections): Add stack_analysis and emit_stack_syms
2010 params, and stash in hash table.
2011 (is_hint): Split off from..
2012 (is_branch): ..here. Adjust callers.
2013 (spu_elf_size_stubs): Add stack_analysis param. Arrange to read
2014 and keep all syms.
2015 (write_one_stub): Fix mem leak.
2016 (find_function_stack_adjust): New function.
2017 (sort_syms_syms, sort_syms_psecs): New vars.
2018 (sort_syms): New function.
2019 (struct call_info, struct function_info): New.
2020 (struct spu_elf_stack_info): New.
2021 (alloc_stack_info, maybe_insert_function, func_name): New functions.
2022 (is_nop, insns_at_end, check_function_ranges): Likewise.
2023 (find_function, insert_callee, mark_functions_via_relocs): Likewise.
2024 (pasted_function, interesting_section, discover_functions): Likewise.
2025 (mark_non_root, call_graph_traverse, build_call_tree): Likewise.
2026 (sum_stack, spu_elf_stack_analysis, spu_elf_final_link): Likewise.
2027 (bfd_elf32_bfd_final_link): Define.
2028 * elf32-spu.h (struct _spu_elf_section_data): Add stack_info field.
2029 (spu_elf_create_sections, spu_elf_size_stubs): Update prototypes.
2030
2031 2007-04-28 Sergey Rogozhkin <rogozhkin@niisi.msk.ru>
2032
2033 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Don't access
2034 memory which we might not own.
2035
2036 2007-04-27 Bob Wilson <bob.wilson@acm.org>
2037
2038 * elf32-xtensa.c (elf_xtensa_make_sym_local): Restore deleted function.
2039 (elf_xtensa_hide_symbol, elf_backend_hide_symbol): Likewise.
2040 (elf_xtensa_allocate_dynrelocs): Use elf_xtensa_make_sym_local.
2041
2042 2007-04-27 Bob Wilson <bob.wilson@acm.org>
2043
2044 * elf32-xtensa.c (xtensa_read_table_entries): Step through table
2045 contents and relocs in parallel.
2046
2047 2007-04-27 Bob Wilson <bob.wilson@acm.org>
2048
2049 * elf32-xtensa.c (relax_property_section): Remove extra irel increment.
2050
2051 2007-04-27 Alan Modra <amodra@bigpond.net.au>
2052
2053 * cpu-rs6000.c: Write Mimi's name in ASCII.
2054 * coff-rs6000.c: Likewise.
2055 * rs6000-core.c: Likewise.
2056
2057 2007-04-27 Alan Modra <amodra@bigpond.net.au>
2058
2059 * sysdep.h: Include config.h first.
2060 Many files: Include sysdep.h before bfd.h.
2061 * Makefile.am: Run "make dep-am".
2062 * Makefile.in: Regenerate.
2063
2064 2007-04-25 Alan Modra <amodra@bigpond.net.au>
2065
2066 * sysdep.h: Revert last change.
2067
2068 2007-04-24 Nick Clifton <nickc@redhat.com>
2069
2070 * coffcode.h (coff_slurp_reloc_table): Initialise dst.r_offset.
2071 * coff-m68k.c (m68kcoff_rtype_to_howto): Initialize relent.howto.
2072
2073 2007-04-24 Alan Modra <amodra@bigpond.net.au>
2074
2075 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Warn if
2076 eh_frame_hdr table won't be created.
2077
2078 2007-04-24 Alan Modra <amodra@bigpond.net.au>
2079
2080 * acinclude.m4: Include config/stdint.m4.
2081 * configure.in: Invoke GCC_HEADER_STDINT.
2082 * sysdep.h: Don't include ansidecl.h here.
2083 * configure: Regenerate.
2084 * config.in: Regenerate.
2085 * Makefile.in: Regenerate.
2086
2087 2007-04-23 Nathan Sidwell <nathan@codesourcery.com>
2088
2089 * archures.c (bfd_mach_mcf_isa_c, bfd_mach_mcf_isa_c_mac,
2090 bfd_mach_mcf_isa_c_emac): New.
2091 * elf32-m68k.c (ISAC_PLT_ENTRY_SIZE, elf_isac_plt0_entry,
2092 elf_isac_plt_entry, elf_isac_plt_info): New.
2093 (elf32_m68k_object_p): Add ISA_C.
2094 (elf32_m68k_print_private_bfd_data): Print ISA_C.
2095 (elf32_m68k_get_plt_info): Detect ISA_C.
2096 * cpu-m68k.c (arch_info): Add ISAC.
2097 (m68k_arch_features): Likewise,
2098 (bfd_m68k_compatible): ISAs B & C are not compatible.
2099
2100 2007-04-21 Nick Clifton <nickc@redhat.com>
2101
2102 * ecoff.c (_bfd_ecoff_write_armap): Initialise rehash.
2103 (ecoff_link_add_archive_symbols): Likewise.
2104 * coff-m68k.c (m68kcoff_common_addend_rtype_to_howto): Initialise
2105 relent.howto.
2106 * ieee.c (parse_int): Initialise x.
2107 (must_parse_int): Initialise result.
2108 (ieee_slurp_external_symbols): Initialise value.
2109
2110 2007-04-21 Alan Modra <amodra@bigpond.net.au>
2111
2112 * config.bfd (spu-*-elf): Delete targ_selvecs.
2113
2114 2007-04-19 Nick Clifton <nickc@redhat.com>
2115
2116 * coffcode.h (coff_rtype_to_howto): Initialise genrel.howto.
2117
2118 2007-04-19 Alan Modra <amodra@bigpond.net.au>
2119
2120 * bfd.c (bfd_demangle): New function.
2121 * Makefile.am: Run "make dep-am".
2122 * Makefile.in: Regenerate.
2123 * bfd-in2.h: Regenerate.
2124
2125 2007-04-18 Matthias Klose <doko@ubuntu.com>
2126
2127 * Makefile.am (libbfd_la_LDFLAGS): Use bfd soversion.
2128 (bfdver.h): Use the date in non-release builds for the soversion.
2129 * Makefile.in: Regenerate.
2130
2131 2007-04-17 Paul Brook <paul@codesourcery.com>
2132
2133 * elf.c (_bfd_elf_is_function_type): New function.
2134 * elflink.c (_bfd_elf_merge_symbol): Use bed->is_function_type.
2135 (_bfd_elf_dynamic_symbol_p, _bfd_elf_symbol_refs_local_p,
2136 is_global_data_symbol_definition, elf_link_add_object_symbols): Ditto.
2137 * elf-bfd.h (elf_backend_data): Add is_function_type.
2138 (_bfd_elf_is_function_type): Add prototype.
2139 * elfxx-target.h (elf_backend_is_function_type): Add default
2140 definition.
2141 (elfNN_bed): Add elf_backend_is_function_type.
2142 * elf32-arm.c (elf32_arm_is_function_type): New function.
2143 (elf_backend_is_function_type): Define.
2144
2145 2007-04-17 Daniel Jacobowitz <dan@codesourcery.com>
2146
2147 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Put
2148 DT_MIPS_RLD_MAP before DT_DEBUG again.
2149
2150 2007-04-14 Steve Ellcey <sje@cup.hp.com>
2151
2152 * Makefile.am: Add ACLOCAL_AMFLAGS.
2153 * configure.in: Change macro call order.
2154 * Makefile.in: Regnerate.
2155 * doc/Makefile.in: Regenerate.
2156 * configure: Regenerate.
2157
2158 2007-04-14 Jakub Jelinek <jakub@redhat.com>
2159
2160 * elflink.c (bfd_elf_final_link): Don't free symbuf for
2161 non-elf input bfds.
2162 (bfd_elf_size_dynamic_sections): Don't access elf_section_data
2163 for non-elf input bfds.
2164
2165 2007-04-12 Richard Sandiford <richard@codesourcery.com>
2166
2167 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
2168 DT_MIPS_RTLD_MAP for PIEs.
2169
2170 2007-04-12 Richard Sandiford <richard@codesourcery.com>
2171
2172 * elfxx-mips.c (mips_elf_calculate_relocation): Set DT_TEXTREL
2173 when creating a __GOTT_BASE__ or __GOTT_INDEX__ relocation
2174 in a read-only section.
2175 (_bfd_mips_elf_check_relocs): Likewise.
2176
2177 2007-04-12 Bob Wilson <bob.wilson@acm.org>
2178
2179 * elf32-xtensa.c (xtensa_is_insntable_section): New.
2180 (xtensa_is_proptable_section): New.
2181 (elf_xtensa_discard_info_for_section): Handle "full" .xt.prop property
2182 tables with 12-byte entries, as well as tables with 8-byte entries.
2183 Sort the relocations before examining them.
2184 (relax_property_section): Use xtensa_is_proptable_section and
2185 xtensa_is_littable_section. Rewrite code for combining table entries
2186 to be more robust in case of unexpected relocations. Do not set offset
2187 of unused relocations to less than zero.
2188 (xtensa_is_property_section): Use other functions instead of
2189 duplicating section name comparisons.
2190 (xtensa_is_littable_section): Use CONST_STRNEQ for ".gnu.linkonce.p.".
2191 (xtensa_get_property_predef_flags): Use xtensa_is_insntable_section.
2192
2193 2007-04-12 Bob Wilson <bob.wilson@acm.org>
2194
2195 * elf32-xtensa.c (elf_xtensa_gc_mark_hook): Don't follow references
2196 from Xtensa property sections.
2197
2198 2007-04-12 Alan Modra <amodra@bigpond.net.au>
2199
2200 * elf32-spu.c (needs_ovl_stub): Test that spu_elf_section_data
2201 is non-NULL before dereferencing.
2202
2203 2007-04-11 Nathan Sidwell <nathan@codesourcery.com>
2204
2205 * elf-vxworks.c (elf_vxworks_emit_relocs): Remap weakdef PLT slot
2206 relocs too.
2207
2208 2007-04-10 Richard Henderson <rth@redhat.com>
2209
2210 * elf64-alpha.c (struct alpha_elf_link_hash_table): Add relax_trip.
2211 (elf64_alpha_size_got_sections): Remove unused something_changed local.
2212 (elf64_alpha_size_plt_section): Return void.
2213 (elf64_alpha_size_rela_got_section): Likewise.
2214 (elf64_alpha_relax_section): Only regenerate got+plt if the
2215 relax_trip counter has changed.
2216
2217 2007-04-09 Daniel Jacobowitz <dan@codesourcery.com>
2218
2219 * Makefile.am (bfdver.h): Do not generate doc/bfdver.texi.
2220 * doc/Makefile.am (DOCFILES): Add bfdver.texi.
2221 (bfdver.texi): New rule.
2222 * Makefile.in, doc/Makefile.in: Regenerated.
2223
2224 2007-04-03 Matt Thomas <matt@netbsd.org>
2225
2226 * elf32-vax.c (elf_vax_relocate_section): Do not emit a PCREL reloc
2227 in a shared object if it is not in a CODE section or if it is against
2228 a section symbol. This allows DWARF2 to use pcrel format.
2229
2230 2007-04-05 H.J. Lu <hongjiu.lu@intel.com>
2231
2232 PR ld/4304
2233 * elflink.c (bfd_elf_final_link): Call einfo callback in
2234 bfd_link_info instead of _bfd_error_handler for DT_TEXTREL
2235 warning.
2236
2237 2007-04-05 Alan Modra <amodra@bigpond.net.au>
2238
2239 * elf32-spu.c (spu_elf_output_symbol_hook): New function.
2240 (elf_backend_link_output_symbol_hook): Define.
2241
2242 2007-04-02 Nick Clifton <nickc@redhat.com>
2243
2244 PR binutils/4292
2245 * bfd.c (bfd_fprintf_vma): Do not print addresses of 32-bit
2246 targets as 64-bit values, even if running on a 64-bit host.
2247 * coffgen.c (coff_print_symbol): Likewise.
2248
2249 2007-03-29 Nick Clifton <nickc@redhat.com>
2250
2251 PR binutils/4110
2252 * elf.c (IS_VALID_GROUP_SECTION_HEADER): New macro.
2253 (setup_group): Use it. Report corrupt group section headers.
2254 (bfd_section_from_shdr): Use new macro. Replace constant 4 with
2255 GRP_ENTRY_SIZE. Cope with NULLs in the group section table.
2256 (elf_fake_section): Replace constant 4 with GRP_ENTRY_SIZE.
2257
2258 2007-03-29 Alan Modra <amodra@bigpond.net.au>
2259
2260 PR ld/4267
2261 * elflink.c (evaluate_complex_relocation_symbols): Use bfd_vma
2262 for rel->r_info values.
2263 (bfd_elf_perform_complex_relocation): Likewise.
2264 * elf32-ppc.c (allocate_dynrelocs): Set plt.offset to -1 for
2265 unused entries. Don't clear plt.plist in loop.
2266
2267 2007-03-28 Richard Sandiford <richard@codesourcery.com>
2268
2269 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove append_rela.
2270 * elfxx-sparc.c (sparc_elf_append_rela_64, sparc_elf_append_rela_32):
2271 Merge into...
2272 (sparc_elf_append_rela): ...this new function.
2273 (SPARC_ELF_APPEND_RELA): Delete.
2274 (_bfd_sparc_elf_link_hash_table_create): Don't initialize
2275 the deleted append_rela field.
2276 (_bfd_sparc_elf_relocate_section): Use sparc_elf_append_rela
2277 instead of SPARC_ELF_APPEND_RELA.
2278 (_bfd_sparc_elf_finish_dynamic_symbol): Likewise. Use the
2279 elf_size_info structure to find the size of a RELA entry and
2280 the associated swap-out function.
2281 (sparc64_finish_dyn, sparc64_finish_dyn): Merge into...
2282 (sparc_finish_dyn): ...this new function.
2283 (_bfd_sparc_elf_finish_dynamic_sections): Update calls accordingly.
2284
2285 2007-03-28 Richard Sandiford <richard@codesourcery.com>
2286 Phil Edwards <phil@codesourcery.com>
2287
2288 * doc/bfd.texinfo: Put the contents after the title page rather
2289 than at the end of the document.
2290
2291 2007-03-27 Andreas Schwab <schwab@suse.de>
2292
2293 * elfxx-ia64.c (elf_backend_default_execstack): Define to 0.
2294
2295 2007-03-26 H.J. Lu <hongjiu.lu@intel.com>
2296
2297 * configure: Regenerated.
2298
2299 2007-03-26 Alan Modra <amodra@bigpond.net.au>
2300
2301 * elf32-spu.c (struct stubarr): Add stub_hash_table and err fields.
2302 (allocate_spuear_stubs): New function.
2303 (spu_elf_size_stubs): Call allocate_spuear_stubs.
2304
2305 2007-03-26 Alan Modra <amodra@bigpond.net.au>
2306
2307 * aout-adobe.c (aout_32_bfd_reloc_name_lookup): Define.
2308 * aout-arm.c (MY_bfd_reloc_name_lookup): Define.
2309 (MY (bfd_reloc_name_lookup)): New function.
2310 * aout-ns32k.c (MY (bfd_reloc_name_lookup)): New function.
2311 * aout-target.h (NAME (aout, reloc_name_lookup)): Declare.
2312 (MY_bfd_reloc_name_lookup): Define.
2313 * aout-tic30.c (tic30_aout_reloc_name_lookup): New function.
2314 (MY_bfd_reloc_name_lookup): Define.
2315 * aoutx.h (NAME (aout, reloc_type_lookup)): Don't declare.
2316 (NAME (aout, reloc_name_lookup)): New function.
2317 * bout.c (b_out_bfd_reloc_name_lookup): New function.
2318 * coff-alpha.c (alpha_bfd_reloc_name_lookup): New function.
2319 (_bfd_ecoff_bfd_reloc_name_lookup): Define.
2320 * coff-arm.c (coff_arm_reloc_name_lookup): New function.
2321 (coff_bfd_reloc_name_lookup): Define.
2322 * coff-i386.c (coff_bfd_reloc_name_lookup): Define.
2323 (coff_i386_reloc_name_lookup): New function.
2324 * coff-i860.c (coff_i860_reloc_name_lookup): New function.
2325 (coff_bfd_reloc_name_lookup): Define.
2326 * coff-i960.c (coff_i960_reloc_name_lookup): New function.
2327 (coff_bfd_reloc_name_lookup): Define.
2328 * coff-m68k.c (m68k_reloc_name_lookup): New function.
2329 (coff_bfd_reloc_name_lookup): Define.
2330 * coff-maxq.c (maxq_reloc_name_lookup): New function.
2331 (coff_bfd_reloc_name_lookup): Define.
2332 * coff-mcore.c (mcore_coff_reloc_name_lookup): New function.
2333 (coff_bfd_reloc_name_lookup): Define.
2334 * coff-mips.c (mips_bfd_reloc_name_lookup): New function.
2335 (_bfd_ecoff_bfd_reloc_name_lookup): Define.
2336 * coff-ppc.c (ppc_coff_reloc_name_lookup): New function.
2337 (coff_bfd_reloc_name_lookup): Define.
2338 * coff-rs6000.c (coff_bfd_reloc_name_lookup): Define.
2339 (_bfd_xcoff_reloc_name_lookup): New function.
2340 (rs6000coff_vec, pmac_xcoff_vec): Init new field.
2341 * coff-sh.c (coff_bfd_reloc_name_lookup): Define.
2342 (sh_coff_reloc_name_lookup): New function.
2343 * coff-sparc.c (coff_sparc_reloc_name_lookup): New function.
2344 (coff_bfd_reloc_name_lookup): Define.
2345 * coff-tic30.c (coff_bfd_reloc_name_lookup): Define.
2346 (tic30_coff_reloc_name_lookup): New function.
2347 * coff-tic4x.c (coff_bfd_reloc_name_lookup): Define.
2348 (tic4x_coff_reloc_name_lookup): New function.
2349 * coff-tic54x.c (coff_bfd_reloc_name_lookup): Define.
2350 (tic54x_coff_reloc_name_lookup): New function.
2351 * coff-x86_64.c (coff_bfd_reloc_name_lookup): Define.
2352 (coff_amd64_reloc_name_lookup): New function.
2353 * coff-z80.c (coff_z80_reloc_name_lookup): New function.
2354 (coff_bfd_reloc_name_lookup): Define.
2355 * coff-z8k.c (coff_z8k_reloc_name_lookup): New function.
2356 (coff_bfd_reloc_name_lookup): Define.
2357 * coff64-rs6000.c (coff_bfd_reloc_name_lookup): Define.
2358 (xcoff64_reloc_name_lookup): New function.
2359 (rs6000coff64_vec, aix5coff64_vec): Init new field.
2360 * coffcode.h (coff_bfd_reloc_name_lookup): Define.
2361 * elf-hppa.h (elf_hppa_reloc_name_lookup): New function.
2362 * elf-m10200.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2363 * elf-m10300.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2364 * elf32-arc.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2365 * elf32-arm.c (elf32_arm_reloc_name_lookup): New function.
2366 (bfd_elf32_bfd_reloc_name_lookup): Define.
2367 * elf32-avr.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2368 * elf32-bfin.c (bfin_bfd_reloc_name_lookup): New function.
2369 (bfd_elf32_bfd_reloc_name_lookup): Define.
2370 * elf32-cr16c.c (elf_cr16c_reloc_name_lookup): New function.
2371 (bfd_elf32_bfd_reloc_name_lookup): Define.
2372 * elf32-cris.c (cris_reloc_name_lookup): New function.
2373 (bfd_elf32_bfd_reloc_name_lookup): Define.
2374 * elf32-crx.c (elf_crx_reloc_name_lookup): New function.
2375 (bfd_elf32_bfd_reloc_name_lookup): Define.
2376 * elf32-d10v.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2377 * elf32-d30v.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2378 * elf32-dlx.c (elf32_dlx_reloc_name_lookup): New function.
2379 (bfd_elf32_bfd_reloc_name_lookup): Define.
2380 * elf32-fr30.c (fr30_reloc_name_lookup): New function.
2381 (bfd_elf32_bfd_reloc_name_lookup): Define.
2382 * elf32-frv.c (frv_reloc_name_lookup): New function.
2383 (bfd_elf32_bfd_reloc_name_lookup): Define.
2384 * elf32-gen.c (bfd_elf32_bfd_reloc_name_lookup): Define.
2385 * elf32-h8300.c (elf32_h8_reloc_name_lookup): New function.
2386 (bfd_elf32_bfd_reloc_name_lookup): Define.
2387 * elf32-hppa.c (bfd_elf32_bfd_reloc_name_lookup): Define.
2388 * elf32-i370.c (i370_elf_reloc_name_lookup): New function.
2389 (bfd_elf32_bfd_reloc_name_lookup): Define.
2390 * elf32-i386.c (elf_i386_reloc_name_lookup): New function.
2391 (bfd_elf32_bfd_reloc_name_lookup): Define.
2392 * elf32-i860.c (elf32_i860_reloc_name_lookup): New function.
2393 (bfd_elf32_bfd_reloc_name_lookup): Define.
2394 * elf32-i960.c (elf32_i960_reloc_name_lookup): New function.
2395 (bfd_elf32_bfd_reloc_name_lookup): Define.
2396 * elf32-ip2k.c (ip2k_reloc_name_lookup): New function.
2397 (bfd_elf32_bfd_reloc_name_lookup): Define.
2398 * elf32-iq2000.c (iq2000_reloc_name_lookup): New function.
2399 (bfd_elf32_bfd_reloc_name_lookup): Define.
2400 * elf32-m32c.c (m32c_reloc_name_lookup): New function.
2401 (bfd_elf32_bfd_reloc_name_lookup): Define.
2402 * elf32-m32r.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2403 * elf32-m68hc11.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2404 * elf32-m68hc12.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2405 * elf32-m68k.c (reloc_name_lookup): New function.
2406 (bfd_elf32_bfd_reloc_name_lookup): Define.
2407 * elf32-m88k.c (bfd_elf32_bfd_reloc_name_lookup): Define.
2408 * elf32-mcore.c (mcore_elf_reloc_name_lookup): New function.
2409 (bfd_elf32_bfd_reloc_name_lookup): Define.
2410 * elf32-mep.c (mep_reloc_name_lookup): New function.
2411 (bfd_elf32_bfd_reloc_name_lookup): Define.
2412 * elf32-mips.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2413 (mips_vxworks_bfd_reloc_name_lookup): Likewise.
2414 (bfd_elf32_bfd_reloc_name_lookup): Define.
2415 * elf32-msp430.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2416 * elf32-mt.c (mt_reloc_name_lookup): New function.
2417 (bfd_elf32_bfd_reloc_name_lookup): Define.
2418 * elf32-openrisc.c (openrisc_reloc_name_lookup): New function.
2419 (bfd_elf32_bfd_reloc_name_lookup): Define.
2420 * elf32-or32.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2421 * elf32-pj.c (pj_elf_reloc_name_lookup): New function.
2422 (bfd_elf32_bfd_reloc_name_lookup): Define.
2423 * elf32-ppc.c (ppc_elf_reloc_name_lookup): New function.
2424 (bfd_elf32_bfd_reloc_name_lookup): Define.
2425 * elf32-s390.c (elf_s390_reloc_name_lookup): New function.
2426 (bfd_elf32_bfd_reloc_name_lookup): Define.
2427 * elf32-score.c (elf32_score_reloc_name_lookup): New function.
2428 (bfd_elf32_bfd_reloc_name_lookup): Define.
2429 * elf32-sh.c (sh_elf_reloc_name_lookup): New function.
2430 (bfd_elf32_bfd_reloc_name_lookup): Define.
2431 * elf32-sparc.c (bfd_elf32_bfd_reloc_name_lookup): Define.
2432 * elf32-spu.c (spu_elf_reloc_name_lookup): New function.
2433 (bfd_elf32_bfd_reloc_name_lookup): Define.
2434 * elf32-v850.c (v850_elf_reloc_name_lookup): New function.
2435 (bfd_elf32_bfd_reloc_name_lookup): Define.
2436 * elf32-vax.c (reloc_name_lookup): New function.
2437 (bfd_elf32_bfd_reloc_name_lookup): Define.
2438 * elf32-xc16x.c (xc16x_reloc_name_lookup): New function.
2439 (bfd_elf32_bfd_reloc_name_lookup): Define.
2440 * elf32-xstormy16.c (xstormy16_reloc_name_lookup): New function.
2441 (bfd_elf32_bfd_reloc_name_lookup): Define.
2442 * elf32-xtensa.c (elf_xtensa_reloc_name_lookup): New function.
2443 (bfd_elf32_bfd_reloc_name_lookup): Define.
2444 * elf64-alpha.c (elf64_alpha_bfd_reloc_name_lookup): New function.
2445 (bfd_elf64_bfd_reloc_name_lookup): Define.
2446 * elf64-gen.c (bfd_elf64_bfd_reloc_name_lookup): Define.
2447 * elf64-hppa.c (bfd_elf64_bfd_reloc_name_lookup): Define.
2448 * elf64-mips.c (bfd_elf64_bfd_reloc_name_lookup): New function.
2449 * elf64-mmix.c (bfd_elf64_bfd_reloc_name_lookup): New function.
2450 * elf64-ppc.c (ppc64_elf_reloc_name_lookup): New function.
2451 (bfd_elf64_bfd_reloc_name_lookup): Define.
2452 * elf64-s390.c (elf_s390_reloc_name_lookup): New function.
2453 (bfd_elf64_bfd_reloc_name_lookup): Define.
2454 * elf64-sh64.c (sh_elf64_reloc_name_lookup): New function.
2455 (bfd_elf64_bfd_reloc_name_lookup): Define.
2456 * elf64-sparc.c (bfd_elf64_bfd_reloc_name_lookup): Define.
2457 * elf64-x86-64.c (elf64_x86_64_reloc_name_lookup): New function.
2458 (bfd_elf64_bfd_reloc_name_lookup): Define.
2459 * elfn32-mips.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2460 * elfxx-ia64.c (elfNN_ia64_reloc_name_lookup): New function.
2461 (bfd_elfNN_bfd_reloc_name_lookup): Define.
2462 * elfxx-sparc.c (_bfd_sparc_elf_reloc_name_lookup): New function.
2463 * elfxx-sparc.h (_bfd_sparc_elf_reloc_name_lookup): Declare.
2464 * i386msdos.c (msdos_bfd_reloc_name_lookup): Define.
2465 * i386os9k.c (aout_32_bfd_reloc_name_lookup): Define.
2466 * ieee.c (ieee_bfd_reloc_name_lookup): Define.
2467 * libaout.h (NAME (aout, reloc_name_lookup)): Declare.
2468 * libbfd-in.h (_bfd_norelocs_bfd_reloc_name_lookup): Declare.
2469 * mipsbsd.c (MY_bfd_reloc_name_lookup): Define.
2470 (MY(reloc_type_lookup)): Rename from MY(reloc_howto_type_lookup).
2471 (MY(reloc_name_lookup)): New function.
2472 * nlm-target.h (nlm_bfd_reloc_name_lookup): Define.
2473 * oasys.c (oasys_bfd_reloc_name_lookup): Define.
2474 * pdp11.c (NAME (aout, reloc_name_lookup)): New function.
2475 * pe-mips.c (coff_mips_reloc_name_lookup): New function.
2476 (coff_bfd_reloc_name_lookup): Define.
2477 * reloc.c (bfd_reloc_name_lookup): New function.
2478 * riscix.c (riscix_reloc_name_lookup): New function.
2479 (MY_bfd_reloc_name_lookup): Define.
2480 * som.c (som_bfd_reloc_name_lookup): New function.
2481 * targets.c (struct bfd_target): Add reloc_name_lookup.
2482 (BFD_JUMP_TABLE_RELOCS): Add NAME##_bfd_reloc_name_lookup.
2483 * versados.c (versados_bfd_reloc_name_lookup): Define.
2484 * vms.c (vms_bfd_reloc_name_lookup): New function.
2485 * bfd-in2.h: Regenerate.
2486 * libbfd.h: Regenerate.
2487
2488 2007-03-26 Thiemo Seufer <ths@mips.com>
2489
2490 PR ld/4208
2491 * elfxx-mips.c (mips_elf_next_relocation): Don't signal an error if no
2492 matching relocation is found.
2493 (_bfd_mips_elf_relocate_section): Only warn about missing relocations.
2494
2495 2007-03-23 H.J. Lu <hongjiu.lu@intel.com>
2496
2497 * configure: Regenerated.
2498
2499 2007-03-23 Joseph Myers <joseph@codesourcery.com>
2500
2501 * configure.in: Use ACX_PKGVERSION and ACX_BUGURL.
2502 * configure: Regenerate.
2503
2504 2007-03-23 Alan Modra <amodra@bigpond.net.au>
2505
2506 * elf32-spu.c (spu_stub_name): Don't put input section in stub name.
2507 Remove input_sec param. Adjust all calls.
2508 (write_one_stub): Adjust stub symbol.
2509 (needs_ovl_stub): New function, extracted from..
2510 (spu_elf_size_stubs): ..here.
2511 (spu_elf_relocate_section): Use needs_ovl_stub.
2512
2513 2007-03-22 Joseph Myers <joseph@codesourcery.com>
2514
2515 * Makefile.am (bfdver.h): Only set VERSION_PACKAGE in bfdver.texi
2516 if nonempty.
2517 * configure.in (REPORT_BUGS_TO): Do not use "URL:" prefix.
2518 * Makefile.in, configure, doc/Makefile.in: Regenerate.
2519
2520 2007-03-22 H.J. Lu <hongjiu.lu@intel.com>
2521
2522 PR ld/4210
2523 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the virtual
2524 address and virtual size of the last section for the image
2525 size.
2526
2527 2007-03-22 H.J. Lu <hongjiu.lu@intel.com>
2528
2529 PR ld/4007
2530 * elf.c (assign_file_positions_for_load_sections): Check if
2531 all sections are in the segment.
2532
2533 2007-03-20 H.J. Lu <hongjiu.lu@intel.com>
2534
2535 PR ld/4208
2536 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Report missing
2537 matching LO16 relocation for HI16 relocation.
2538
2539 2007-03-20 Paul Brook <paul@codesourcery.com>
2540
2541 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2542 * bfd-in2.h: Regenerate.
2543 * elf32-arm.c (elf32_arm_link_hash_table): Add pic_veneer.
2544 (record_arm_to_thumb_glue): Use globals->pic_veneer.
2545 (elf32_arm_create_thumb_stub): Ditto.
2546 (bfd_elf32_arm_set_target_relocs): Set globals->pic_veneer.
2547
2548 2007-03-18 Mark Shinwell <shinwell@codesourcery.com>
2549
2550 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add "bfd *"
2551 argument and extra last argument.
2552 * bfd-in2.h: Regenerate.
2553 * elf32-arm.c (elf32_arm_obj_tdata): Add no_enum_size_warning
2554 member.
2555 (bfd_elf32_arm_set_target_relocs): Add "bfd *" argument and
2556 extra last argument. Set no_enum_size_warning appropriately.
2557 (elf32_arm_merge_eabi_attributes): Improve enum sizes
2558 diagnostic, suppressing it when no_enum_size_warning dictates.
2559
2560 2007-03-20 Nick Clifton <nickc@redhat.com>
2561
2562 PR binutils/3535
2563 * elf.c (copy_private_bfd_data): Widen the scope of Solaris
2564 specific conditions that need the program headers to be
2565 rewritten.
2566
2567 2007-03-19 H.J. Lu <hongjiu.lu@intel.com>
2568
2569 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Store Magic,
2570 MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
2571 SizeOfInitializedData, SizeOfUninitializedData,
2572 AddressOfEntryPoint, BaseOfCode and BaseOfData in internal
2573 extra PE a.out header.
2574 (IMAGE_NT_OPTIONAL_HDR_MAGIC): Defined as 0x10b if not defined.
2575 (IMAGE_NT_OPTIONAL_HDR64_MAGIC): Defined as 0x20b if not
2576 defined.
2577 (IMAGE_NT_OPTIONAL_HDRROM_MAGIC): Defined as 0x107 if not
2578 defined.
2579 (_bfd_XX_print_private_bfd_data_common): Also print Magic,
2580 MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
2581 SizeOfInitializedData, SizeOfUninitializedData,
2582 AddressOfEntryPoint, BaseOfCode and BaseOfData from internal
2583 extra PE a.out header.
2584
2585 2007-03-18 H.J. Lu <hongjiu.lu@intel.com>
2586
2587 * targets.c (_bfd_target_vector): Add bfd_efi_app_x86_64_vec
2588 only if BFD64 is defined.
2589
2590 2007-03-17 Alan Modra <amodra@bigpond.net.au>
2591
2592 * elf32-spu.c (spu_elf_size_stubs): Always use an overlay stub
2593 on setjmp calls.
2594
2595 2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
2596
2597 * doc/Makefile.in: Regenerated.
2598
2599 2007-03-15 H.J. Lu <hongjiu.lu@intel.com>
2600
2601 * Makefile.am (bfdver.h): Substitute report_bugs_to. Also
2602 create doc/bfdver.texi.
2603 * Makefile.in: Regenerated.
2604
2605 * configure.in (--with-bugurl): New option.
2606 * configure: Regenerated.
2607
2608 * version.h (REPORT_BUGS_TO): New.
2609
2610 2007-03-13 H.J. Lu <hongjiu.lu@intel.com>
2611
2612 PR binutils/3826
2613 * elf-bfd.h (elf_backend_data): Add elf_osabi.
2614 (_bfd_elf_set_osabi): New.
2615
2616 * elf.c (_bfd_elf_set_osabi): New.
2617
2618 * elf32-hppa.c (elf32_hppa_post_process_headers): Removed.
2619 (elf_backend_post_process_headers): Defined with
2620 _bfd_elf_set_osabi.
2621 (ELF_OSABI): Properly defined for each target.
2622
2623 * elf32-i370.c (i370_elf_post_process_headers): Removed.
2624 (ELF_OSABI): Defined.
2625 (elf_backend_post_process_headers): Defined with
2626 _bfd_elf_set_osabi.
2627
2628 * elf32-i386.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
2629 freebsd.
2630 (elf_i386_post_process_headers): Set EI_OSABI with elf_osabi.
2631
2632 * elf32-msp430.c (elf32_msp430_post_process_headers): Removed.
2633 (ELF_OSABI): Defined.
2634 (elf_backend_post_process_headers): Defined with
2635 _bfd_elf_set_osabi.
2636
2637 * elf64-alpha.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
2638 freebsd.
2639 (elf64_alpha_fbsd_post_process_headers): Set EI_OSABI with
2640 elf_osabi.
2641
2642 * elf64-hppa.c (elf64_hppa_post_process_headers): Set EI_OSABI
2643 with elf_osabi.
2644 (ELF_OSABI): Properly defined for each target.
2645 (elf_backend_post_process_headers): Defined with
2646 _bfd_elf_set_osabi for Linux.
2647
2648 * elf64-sparc.c (elf64_sparc_fbsd_post_process_headers): Removed.
2649 (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
2650 (elf_backend_post_process_headers): Defined with
2651 _bfd_elf_set_osabi.
2652
2653 * elf64-x86-64.c (elf64_x86_64_fbsd_post_process_headers): Removed.
2654 (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
2655 (elf_backend_post_process_headers): Defined with
2656 _bfd_elf_set_osabi.
2657
2658 * elfcode.h (elf_object_p): Match the ELFOSABI_NONE ELF target
2659 with any ELF target of the compatible machine for which we do not
2660 have a specific backend.
2661
2662 * elfxx-ia64.c (elfNN_hpux_post_process_headers): Set EI_OSABI
2663 with elf_osabi.
2664
2665 * elfxx-target.h (ELF_OSABI): Default to ELFOSABI_NONE.
2666 (elfNN_bed): Initialize elf_osabi with ELF_OSABI.
2667
2668 2007-03-08 Alan Modra <amodra@bigpond.net.au>
2669
2670 * elf32-v850.c (v850_elf_link_output_symbol_hook): Clean out
2671 V850_OTHER_* bits.
2672
2673 2007-03-08 Alan Modra <amodra@bigpond.net.au>
2674
2675 * Makefile.am (BFD64_BACKENDS): Add efi-app-x86_64.lo.
2676 (BFD64_BACKENDS_CFILES): Add efi-app-x86_64.c.
2677 Run "make dep-am".
2678 * Makefile.in: Regenerate.
2679 * po/SRC-POTFILES.in: Regenerate.
2680
2681 2007-03-07 H.J. Lu <hongjiu.lu@intel.com>
2682
2683 * config.bfd (x86_64-*-freebsd*): Add bfd_efi_app_x86_64_vec.
2684 (x86_64-*-kfreebsd*-gnu): Likewise.
2685 (x86_64-*-netbsd*): Likewise.
2686 (x86_64-*-openbsd*): Likewise.
2687 (x86_64-*-linux-*): Likewise.
2688
2689 * configure.in: Support bfd_efi_app_x86_64_vec.
2690 * configure: Regenerated.
2691
2692 * efi-app-x86_64.c: New file.
2693
2694 * targets.c (bfd_efi_app_x86_64_vec): New.
2695 (_bfd_target_vector): Add bfd_efi_app_x86_64_vec.
2696
2697 2007-03-07 Kai Tietz <kai.tietz@onevision.com>
2698
2699 * reloc.c (bfd_generic_get_relocated_section_contents): Remove
2700 const for type reloc_howto_type.
2701
2702 2007-03-07 Alan Modra <amodra@bigpond.net.au>
2703
2704 PR 3958
2705 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link.
2706 (elf_discarded_section): Move..
2707 * bfd-in.h: ..to here.
2708 * bfd-in2.h: Regenerate.
2709 * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols
2710 from discarded sections before relocate_section has done its job.
2711 * reloc.c (bfd_generic_get_relocated_section_contents): Handle
2712 relocs against symbols from discarded sections.
2713 * elf-hppa.h (elf_hppa_howto_table): Set size. Set dst_mask on
2714 SECREL32.
2715 (elf_hppa_relocate_section): Handle relocatable link after setting
2716 sec, sym, h etc. for final link. Squash error messages for
2717 relocatable link. Clear section contents for relocs against
2718 symbols in discarded sections, and zero reloc. Remove existing
2719 zero r_symndx code.
2720 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
2721 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2722 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
2723 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
2724 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
2725 (bfin_relocate_section): Likewise.
2726 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
2727 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2728 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
2729 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
2730 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2731 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2732 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
2733 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2734 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2735 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2736 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2737 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2738 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
2739 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
2740 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2741 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
2742 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2743 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2744 * elf32-mep.c (mep_elf_relocate_section): Likewise.
2745 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
2746 * elf32-mt.c (mt_elf_relocate_section): Likewise.
2747 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2748 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2749 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2750 * elf32-score.c (_bfd_score_elf_relocate_section): Likewise.
2751 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2752 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2753 * elf32-v850.c (v850_elf_relocate_section): Likewise.
2754 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2755 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
2756 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2757 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2758 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
2759 (elf64_alpha_relocate_section): Likewise.
2760 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
2761 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2762 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2763 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2764 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2765 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2766 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2767 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2768
2769 * elf32-arm.c (elf32_arm_relocate_section): Always adjust section
2770 symbols for relocatable link. Don't use always-zero st_value.
2771 (elf_backend_rela_normal): Don't define.
2772 * elf32-bfin.c (bfinfdpic_relocate_section): Use
2773 RELOC_FOR_GLOBAL_SYMBOL.
2774 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2775 * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE
2776 section symbol adjustments with same for relocatable link.
2777 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2778 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move..
2779 (elf32_m68hc11_check_relocs): ..to here.
2780 * elf32-score.c (score_elf_final_link_relocate): Remove zero
2781 r_symndx code.
2782 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
2783
2784 2007-03-07 Alan Modra <amodra@bigpond.net.au>
2785
2786 PR 4144
2787 * elf.c (assign_file_positions_for_load_sections): Don't
2788 adjust p_memsz for !SEC_LOAD section vma modulo page size.
2789 Instead, use the same lma based adjustment for SEC_LOAD
2790 sections.
2791
2792 2007-03-01 Bob Wilson <bob.wilson@acm.org>
2793
2794 * elf32-xtensa.c (analyze_relocations): Zero src_count if not relaxing.
2795 (find_relaxable_sections): Do not increment src_count for unknown
2796 opcodes. Decode only once instead of calling is_l32r_relocation.
2797 (compute_text_actions): Remove unused no_insn_move flag. Assert that
2798 src_next matches src_count in relax_info.
2799
2800 2007-03-01 Joseph Myers <joseph@codesourcery.com>
2801
2802 * Makefile.am (bfdver.h): Use "." not " " between version number
2803 and date.
2804 * Makefile.in: Regenerate.
2805 * configure.in (PKGVERSION): Default to "(GNU Binutils) ".
2806 * configure: Regenerate.
2807
2808 2007-02-28 Nathan Sidwell <nathan@codesourcery.com>
2809
2810 * config.bfd (sh-*-uclinux, sh[12]-*-uclinux): New stanza.
2811
2812 2007-02-27 Alan Modra <amodra@bigpond.net.au>
2813
2814 * elf32-spu.h (struct _ovl_stream): Make "start" and "end" const.
2815 * elf32-spu.c (ovl_mgr_pread): Add const to casts.
2816
2817 2007-02-23 Carlos O'Donell <carlos@codesourcery.com>
2818
2819 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Assume 32-bit
2820 DWARF even with 64-bit addresses.
2821 (_bfd_dwarf2_find_nearest_line): Likewise.
2822
2823 2007-02-23 Nick Clifton <nickc@redhat.com>
2824
2825 PR binutils/3535
2826 * elf.c (copy_private_bfd_data): Always rewrite the program
2827 headers when a Solaris interpreter segment is involved.
2828
2829 2007-02-22 Paul Brook <paul@codesourcery.com>
2830
2831 * elflink.c (gc_mark_hook_fn): Remove.
2832 (_bfd_elf_gc_mark): Rename gc_mark_hook_fn to elf_gc_mark_hook_fn.
2833 (bfd_elf_gc_sections): Ditto. Call gc_mark_extra_sections.
2834 * elf-bfd.h (elf_gc_mark_hook_fn): Define.
2835 (elf_backend_data): Add gc_mark_extra_sections.
2836 * elfxx-target.h (elf_backend_gc_mark_extra_sections): Provide default
2837 definition.
2838 (elfNN_bed): Add elf_backend_gc_mark_extra_sections.
2839 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): New function.
2840 (elf_backend_gc_mark_extra_sections): Define.
2841
2842 2007-02-21 Nick Clifton <nickc@redhat.com>
2843
2844 * elf.c (_bfd_elf_map_sections_to_segments): If the
2845 override_segment_assignment callback is defined then call it.
2846
2847 2007-02-21 Alan Modra <amodra@bigpond.net.au>
2848
2849 * elf32-spu.c (spu_elf_size_stubs): Correct order of warning args.
2850
2851 2007-02-19 Thiemo Seufer <ths@mips.com>
2852
2853 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): Remove
2854 translation marker from untranslatable strings.
2855
2856 2007-02-19 Alan Modra <amodra@bigpond.net.au>
2857
2858 * elf-bfd.h (struct elf_backend_data): Add default_execstack.
2859 * elflink.c (bfd_elf_size_dynamic_sections): Heed default_execstack.
2860 * elfxx-target.h (elf_backend_default_execstack): Define to 1.
2861 (elfNN_bed): Init new field.
2862 * elf64-ppc.c (elf_backend_default_execstack): Define to 0.
2863
2864 2007-02-17 Mark Mitchell <mark@codesourcery.com>
2865 Nathan Sidwell <nathan@codesourcery.com>
2866 Vladimir Prus <vladimir@codesourcery.com
2867 Joseph Myers <joseph@codesourcery.com>
2868
2869 * configure.in (--with-pkgversion): New option.
2870 * configure: Regenerate.
2871 * Makefile.am (bfdver.h): Substitute for @bfd_version_package@.
2872 * Makefile.in: Regenerate.
2873 * version.h (BFD_VERSION_STRING): Define using
2874 @bfd_version_package@.
2875
2876 2007-02-16 Carlos O'Donell <carlos@codesourcery.com>
2877
2878 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data):
2879 Print EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_XGOT
2880 and EF_MIPS_UCODE.
2881
2882 2007-02-15 Alan Modra <amodra@bigpond.net.au>
2883
2884 * libbfd-in.h (_bfd_norelocs_get_reloc_upper_bound): Don't define,
2885 declare.
2886 (_bfd_norelocs_canonicalize_reloc): Likewise.
2887 * libbfd.h: Regenerate.
2888 * libbfd.c (_bfd_norelocs_get_reloc_upper_bound): New function.
2889 (_bfd_norelocs_canonicalize_reloc): Likewise.
2890 * binary.c (binary_bfd_reloc_type_lookup): Don't define.
2891 (binary_get_reloc_upper_bound, binary_canonicalize_reloc): Likewise.
2892 (binary_vec): Use _bfd_norelocs in BFD_JUMP_TABLE_RELOCS.
2893 * ihex.c: Similarly.
2894 * mach-o-target.c: Similarly.
2895 * mach-o.c: Similarly.
2896 * mmo.c: Similarly.
2897 * pef.c: Similarly.
2898 * ppcboot.c: Similarly.
2899 * srec.c: Similarly.
2900 * xsym.c: Similarly.
2901
2902 2007-02-14 H.J. Lu <hongjiu.lu@intel.com>
2903
2904 PR ld/3953
2905 * elflink.c (_bfd_elf_add_default_symbol): Check warning symbol
2906 when adding default symbol.
2907
2908 2007-02-13 Alan Modra <amodra@bigpond.net.au>
2909
2910 * elf64-ppc.c (create_linkage_sections): Use section ".branch_lt"
2911 for branch lookup table.
2912
2913 2007-02-12 Alan Modra <amodra@bigpond.net.au>
2914
2915 * elf64-ppc.c (create_linkage_sections): Don't create
2916 .rela.rodata.brlt for --emit-relocs.
2917 (ppc_build_one_stub): Create relocs for brlt --emit-relocs here.
2918 (ppc_size_one_stub): Count them. Simplify test of stub type
2919 when counting stub relocs. Set SEC_RELOC too.
2920 (ppc64_elf_size_stubs): Clear reloc_count and SEC_RELOC.
2921 (ppc64_elf_finish_dynamic_sections): Output brlt relocs.
2922
2923 2007-02-12 Alan Modra <amodra@bigpond.net.au>
2924
2925 * elflink.c (evaluate_complex_relocation_symbols): Ignore relocs
2926 with a zero symbol index.
2927
2928 2007-02-12 Alan Modra <amodra@bigpond.net.au>
2929
2930 * elflink.c (bfd_elf_discard_info): Tidy setting of "eh".
2931
2932 2007-02-05 Dave Brolley <brolley@redhat.com>
2933 Stan Cox <scox@redhat.com>
2934
2935 PR ld/3972
2936 * elflink.c (elf_link_input_bfd): Always setup finfo->internal_syms.
2937
2938 2007-02-05 Dave Brolley <brolley@redhat.com>
2939 Richard Sandiford <rsandifo@redhat.com>
2940 Stan Cox <scox@redhat.com>
2941 Nick Clifton <nickc@redhat.com>
2942 DJ Delorie <dj@redhat.com>
2943 Frank Ch. Eigler <fche@redhat.com>
2944 Ben Elliston <bje@redhat.com>
2945 Richard Henderson <rth@redhat.com>
2946
2947 * Makefile.am (ALL_MACHINES): Add cpu-mep.lo.
2948 (ALL_MACHINES_CFILES): Add CPU_MEP.c.
2949 (BFD32_BACKENDS): Add elf32-mep.lo.
2950 (BFD32_BACKENDS_CFILES): Add elf32-mep.c.
2951 (cpu-mep.lo,elf32-mep.lo): New targets.
2952 * archures.c (bfd_arch_mep): New enumerator.
2953 (bfd_mach_mep, bfd_mach_mep_h1): New macros.
2954 (bfd_mep_arch): New external variable.
2955 (bfd_archures_list): Add bfd_mep_arch.
2956 * config.bfd: Support mep-*-elf.
2957 * configure.in: Support bfd_elf32_mep_vec and bfd_elf32_mep_little_vec.
2958 * reloc.c (BFD_RELOC_MEP_*): New relocation numbers.
2959 * targets.c (bfd_elf32_mep_vec,bfd_elf32_mep_little_vec): New extern
2960 declarations.
2961 (_bfd_target_vector): Add bfd_elf32_mep_vec and
2962 bfd_elf32_mep_little_vec.
2963 * mep-relocs.pl: New file.
2964 * cpu-mep.c: New file.
2965 * elf32-mep.c: New file.
2966 * bfd-in2.h: Regenerate.
2967 * po/POTFILES.in: Regenerate.
2968 * libbfd.h: Regenerate.
2969 * Makefile.in: Regenerate.
2970 * configure: Regenerate.
2971
2972 2007-02-05 Dave Brolley <brolley@redhat.com>
2973
2974 * elflink.c (evaluate_complex_relocation_symbols): Check for
2975 STT_SRELC for global symbols.
2976 (perform_complex_relocations): Renamed to
2977 perform_complex_relocation and now examines only one relocation.
2978 (elf_link_input_bfd): Don't call perform_complex_relocations.
2979 * elf-bfd.h (bfd_elf_perform_complex_relocation_: New prototype.
2980 * elf32-mep.c (mep_elf_howto_table): Add R_RELC.
2981 (OD,OS,OU): #undefs corrected to N, S and U repectively.
2982 (mep_reloc_type_lookup): Handle BFD_RELOC_RELC.
2983 (complex_reloc_installation_howto): Removed.
2984 (mep_info_to_howto_rela): Remove special case for r_type==0xff.
2985 (mep_elf_relocate_section): Call bfd_elf_perform_complex_relocation.
2986
2987 2007-02-05 Dave Brolley <brolley@redhat.com>
2988 Richard Sandiford <rsandifo@redhat.com>
2989 DJ Delorie <dj@redhat.com>
2990 Graydon Hoare <graydon@redhat.com>
2991 Nick Clifton <nickc@cambridge.redhat.com>
2992 Jeff Holcomb <jeffh@redhat.com>
2993 Frank Ch. Eigler <fche@redhat.com>
2994
2995 * elf-bfd.h (bfd_elf_perform_complex_relocations): New prototype.
2996 * elf.c (swap_out_syms): Handle BSF_RELC and BSF_SRELC.
2997 * elfcode.h (elf_slurp_symbol_table): Handle STT_RELC and STT_SRELC.
2998 * elflink.c (set_symbolValue): New static function.
2999 (resolve_symbol): Likewise.
3000 (resolve_section): Likewise.
3001 (undefined_reference): Likewise.
3002 (eval_symbol): Likewise.
3003 (evaluate_complex_relocation_symbols): Likewise.
3004 (put_value): Likewise.
3005 (get_value): Likewise.
3006 (decode_complex_addend):
3007 (bfd_elf_perform_complex_relocation): New function.
3008 (elf_link_input_bfd): Call evaluate_complex_relocation_symbols.
3009 * reloc.c (BFD_RELOC_RELC): New relocation number.
3010 * syms.c (BSF_RELC,BSF_SRELC): New macros.
3011
3012 2007-02-05 Bob Wilson <bob.wilson@acm.org>
3013
3014 * elf32-xtensa.c (elf_xtensa_make_sym_local): Delete.
3015 (elf_xtensa_hide_symbol, elf_backend_hide_symbol): Delete.
3016 (elf_xtensa_fix_refcounts, elf_xtensa_allocate_plt_size)
3017 (elf_xtensa_allocate_got_size): Replace these with...
3018 (elf_xtensa_allocate_dynrelocs): ...this new function.
3019 (elf_xtensa_size_dynamic_sections): Use it.
3020
3021 2007-02-05 Bob Wilson <bob.wilson@acm.org>
3022
3023 * elf32-xtensa.c (elf_howto_table) <R_XTENSA_GLOB_DAT>
3024 <R_XTENSA_JMP_SLOT, R_XTENSA_RELATIVE, R_XTENSA_PLT, R_XTENSA_DIFF32>:
3025 Set src_mask to zero.
3026 <R_XTENSA_DIFF8, R_XTENSA_DIFF16>: Likewise. Also fix dst_mask.
3027 <R_XTENSA_ASM_EXPAND>: Set pcrel_offset to TRUE.
3028
3029 2007-02-02 Bob Wilson <bob.wilson@acm.org>
3030
3031 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Renamed to...
3032 (elf_xtensa_dynamic_symbol_p): ...this.
3033
3034 2007-02-02 Bob Wilson <bob.wilson@acm.org>
3035
3036 * elf32-xtensa.c (plt_reloc_count): Move into link hash table.
3037 (struct elf_xtensa_link_hash_table): New.
3038 (elf_xtensa_hash_table): New.
3039 (elf_xtensa_link_hash_table_create): New.
3040 (elf_xtensa_check_relocs): Update plt_reloc_count references.
3041 Update arguments to add_extra_plt_sections.
3042 (elf_xtensa_create_dynamic_sections): Record new sections in the hash
3043 table. Update for plt_reloc_count and add_extra_plt_sections.
3044 (add_extra_plt_sections, elf_xtensa_create_plt_entry): Replace dynobj
3045 argument with link info. Update calls to elf_xtensa_get_plt_section
3046 and elf_xtensa_get_gotplt_section.
3047 (elf_xtensa_allocate_local_got_size, elf_xtensa_size_dynamic_sections)
3048 (elf_xtensa_relocate_section, elf_xtensa_finish_dynamic_sections)
3049 (elf_xtensa_discard_info_for_section, shrink_dynamic_reloc_sections)
3050 (relax_property_section): Get sections from the hash table and update
3051 function calls.
3052 (elf_xtensa_get_plt_section, elf_xtensa_get_gotplt_section): Replace
3053 dynobj argument with link info. Get sections for first plt chunk from
3054 the hash table.
3055 (bfd_elf32_bfd_link_hash_table_create): Define.
3056
3057 2007-02-02 Jakub Jelinek <jakub@redhat.com>
3058
3059 * elf-bfd.h (struct elf_obj_tdata): Change symbuf type to void *.
3060 * elf.c (struct elf_symbuf_symbol, struct elf_symbuf_head): New types.
3061 (struct elf_symbol): Change first member into union.
3062 (elf_sort_elf_symbol): Compare pointers to internal syms rather than
3063 internal syms. Only compare st_shndx fields.
3064 (elf_create_symbuf): New function.
3065 (bfd_elf_match_symbols_in_sections): Use it. If symbufs are available
3066 for bfds, use a binary search, otherwise don't qsort symbols
3067 unnecessarily only to select which symbols are for the particular
3068 shndx.
3069
3070 2007-02-01 Nick Clifton <nickc@redhat.com>
3071
3072 PR ld/3852
3073 * elf.c (_bfd_elf_link_hash_table_init): Initialize all the fields
3074 in the elf_link_hash_table structure.
3075
3076 2007-02-01 Alan Modra <amodra@bigpond.net.au>
3077
3078 * elf-bfd.h (struct elf_backend_data): Add elf_backend_write_core_note.
3079 * elfxx-target.h (elf_backend_write_core_note): Define and use.
3080 * elf.c (elfcore_write_prpsinfo): Call the above. Add support for
3081 32-bit core note on 64-bit target.
3082 (elfcore_write_prstatus): Likewise.
3083 (elfcore_write_lwpstatus): Make note_name const.
3084 (elfcore_write_prfpreg): Likewise.
3085 (elfcore_write_pstatus): Add support for 32-bit core note on 64-bit
3086 target.
3087 * elf32-ppc.c (ppc_elf_write_core_note): New function.
3088 (elf_backend_write_core_note): Define.
3089 * elf64-ppc.c (ppc64_elf_write_core_note): New function.
3090 (elf_backend_write_core_note): Define.
3091
3092 2007-01-31 H.J. Lu <hongjiu.lu@intel.com>
3093
3094 * elf32-cris.c (INCLUDED_TARGET_FILE): Removed.
3095 (elf32_bed): Defined for elf32-us-cris.
3096
3097 * elf64-sh64.c (elf64_bed): Defined for Linux.
3098 (INCLUDED_TARGET_FILE): Removed.
3099
3100 * elfxx-target.h (elfNN_bed): Always define. Don't check
3101 INCLUDED_TARGET_FILE.
3102
3103 2007-01-31 DJ Delorie <dj@redhat.com>
3104
3105 * elf-m10300.c (mn10300_elf_relocate_section): Clarify the warning
3106 message for dangerous relocs, special case the common user error.
3107
3108 2007-01-30 H.J. Lu <hongjiu.lu@intel.com>
3109
3110 * elf.c (copy_elf_program_header): Start from the first section
3111 in a segment and stop when all sections in a segment are
3112 accounted for.
3113
3114 2007-01-29 Julian Brown <julian@codesourcery.com>
3115
3116 * bfd-in2.h: Regenerate.
3117 * bfd-in.h (bfd_arm_vfp11_fix): New enum. Specify how VFP11
3118 instruction scanning should be done.
3119 (bfd_elf32_arm_init_maps, bfd_elf32_arm_vfp11_erratum_scan)
3120 (bfd_elf32_arm_vfp11_fix_veneer_locations): Add prototypes.
3121 (bfd_elf32_arm_set_target_relocs): Add vfp11 fix type argument to
3122 prototype.
3123 * elf-bfd.h (elf_backend_write_section): Add struct bfd_link_info
3124 argument.
3125 * elf32-arm.c (VFP11_ERRATUM_VENEER_SECTION_NAME)
3126 (VFP11_ERRATUM_VENEER_ENTRY_NAME): Define macros.
3127 (elf32_vfp11_erratum_type): New enum.
3128 (elf32_vfp11_erratum_list): New struct. List of veneers or jumps to
3129 veneers.
3130 (_arm_elf_section_data): Add mapsize, erratumcount, erratumlist.
3131 (elf32_arm_link_hash_table): Add vfp11_erratum_glue_size,
3132 vfp11_fix and num_vfp11_fixes fields.
3133 (elf32_arm_link_hash_table_create): Initialise vfp11_fix,
3134 vfp11_erratum_glue_size, num_vfp11_fixes fields.
3135 (VFP11_ERRATUM_VENEER_SIZE): Define. Size of an (ARM) veneer.
3136 (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
3137 glue section.
3138 (elf32_arm_section_map_add): Add an code/data mapping symbol entry
3139 to a section's map.
3140 (record_vfp11_erratum_veneer): Create a single veneer, and its
3141 associated symbols.
3142 (bfd_elf32_arm_add_glue_sections_to_bfd): Add vfp11 erratum glue.
3143 (bfd_elf32_arm_init_maps): Initialise mapping symbol table for input
3144 BFDs.
3145 (bfd_elf32_arm_set_vfp11_fix): Set the type of erratum workaround
3146 required.
3147 (bfd_arm_vfp11_pipe): Define VFP11 instruction pipes.
3148 (bfd_arm_vfp11_regno): Recode a register number from a VFP11 insn.
3149 (bfd_arm_vfp11_write_mask): Update write mask according to coded
3150 register number.
3151 (bfd_arm_vfp11_antidependency): New function.
3152 (bfd_arm_vfp11_insn_decode): Decode a VFP11 insn.
3153 (elf32_arm_compare_mapping): Declare.
3154 (bfd_elf32_arm_vfp11_erratum_scan): Scan the sections of an input
3155 BFD for potential erratum-triggering insns. Record results.
3156 (bfd_elf32_arm_vfp11_fix_veneer_locations): Find out where veneers
3157 and branches to veneers have been placed in virtual memory after
3158 layout.
3159 (bfd_elf32_arm_set_target_relocs): Set vfp11_fix field in global
3160 hash table.
3161 (elf32_arm_output_symbol_hook): Remove.
3162 (elf32_arm_write_section): Output veneers, and branches to veneers.
3163 Use maps from input sections, not output sections, for code
3164 byte-swapping.
3165 * elf32-ppc.c (ppc_elf_write_section): Add dummy link_info argument.
3166 * elf32-score.c (_bfd_score_elf_write_section): Likewise.
3167 * elfxx-mips.c (_bfd_mips_elf_write_section): Likewise.
3168 * elfxx-mips.h (_bfd_mips_elf_write_section): Likewise.
3169
3170 2007-01-27 H.J. Lu <hongjiu.lu@intel.com>
3171
3172 * elf64-hppa.c (elf64_bed): Defined for HPUX and Linux.
3173 (INCLUDED_TARGET_FILE): Removed.
3174
3175 2007-01-27 Mike Frysinger <vapier@gentoo.org>
3176
3177 * elf32-hppa.c (elf32_bed): Define for hpux, linux and netbsd.
3178 (INCLUDED_TARGET_FILE): Remove.
3179
3180 2007-01-25 DJ Delorie <dj@redhat.com>
3181
3182 * elf32-m32c.c (m32c_elf_howto_table): Don't complain about
3183 R_M32C_16 or R_M32C_24 relocs.
3184
3185 2007-01-25 Nick Clifton <nickc@redhat.com>
3186
3187 PR binutils/3874
3188 * elf32-avr.c (avr_link_hash_table): Check to make sure that the
3189 hash table was created by elf32_avr_link_hash_table_create before
3190 using it.
3191 (elf32_avr_link_hash_newfunc): New function. Just pass the call
3192 through to _bfd_elf_link_hash_newfunc.
3193 (elf32_avr_link_hash_table_create): Use
3194 elf32_avr_link_hash_newfunc instead of
3195 _bfd_elf_link_hash_newfunc.
3196 (elf32_avr_relocate_section): Check for the hash table pointer
3197 being NULL.
3198 (elf32_avr_relax_section, avr_build_one_stub,
3199 elf32_avr_setup_params, get_local_syms, elf32_avr_size_stubs,
3200 elf32_avr_build_stubs): Likewise.
3201
3202 2007-01-16 H.J. Lu <hongjiu.lu@intel.com>
3203
3204 PR ld/3831
3205 * elf-bfd.h (bfd_elf_link_mark_dynamic_symbol): Add an
3206 argument, Elf_Internal_Sym *.
3207
3208 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Mark a data
3209 symbol dynamic if info->dynamic_data is TRUE.
3210 (bfd_elf_record_link_assignment): Updated call to
3211 bfd_elf_record_link_assignment.
3212 (_bfd_elf_merge_symbol): Likewise. Always call
3213 bfd_elf_link_mark_dynamic_symbol.
3214
3215 2007-01-12 H.J. Lu <hongjiu.lu@intel.com>
3216
3217 * Makefile.am (BFD_LIBS): Removed.
3218 * Makefile.in: Regenerated.
3219
3220 2007-01-11 H.J. Lu <hongjiu.lu@intel.com>
3221
3222 PR binutils/3631
3223 * Makefile.am (OFILES): Add @bfd64_libs@.
3224 (libbfd_la_SOURCES): Remove $(BFD64_LIBS_CFILES).
3225 * Makefile.in: Regenerated.
3226
3227 * configure.in (bfd_libs): Replaced by ...
3228 (bfd64_libs): This.
3229 * configure: Regenerated.
3230
3231 2007-01-11 Nathan Sidwell <nathan@codesourcery.com>
3232
3233 * elf.c (assign_file_positions_for_load_sections): We can
3234 require fewer phdrs than expected.
3235
3236 2007-01-08 Kazu Hirata <kazu@codesourcery.com>
3237
3238 * archures.c (bfd_mach_cpu32_fido): Rename to bfd_mach_fido.
3239 * bfd-in2.h: Regenerate.
3240 * cpu-m68k.c (arch_info_struct): Use bfd_mach_fido instead of
3241 bfd_mach_cpu32_fido.
3242 (m68k_arch_features): Use fido_a instead of cpu32.
3243 (bfd_m68k_compatible): Reject the combination of Fido and
3244 ColdFire. Accept the combination of CPU32 and Fido with a
3245 warning.
3246 * elf32-m68k.c (elf32_m68k_object_p,
3247 elf32_m68k_merge_private_bfd_data,
3248 elf32_m68k_print_private_bfd_data): Treat Fido as an
3249 architecture by itself.
3250
3251 2007-01-08 Kai Tietz <kai.tietz@onevision.com>
3252
3253 * config.bfd: Renamed target x86_64-*-mingw64 to x86_64-*-mingw*.
3254
3255 2007-01-05 Jakub Jelinek <jakub@redhat.com>
3256
3257 * texhex.c (first_phase): Don't fall through into the default
3258 case.
3259 (pass_over): Replace abort () calls with return FALSE. Fix
3260 buffer overflow.
3261
3262 2007-01-04 Jie Zhang <jie.zhang@analog.com>
3263
3264 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't set
3265 SEC_EXCLUDE on zero size .eh_frame.
3266
3267 For older changes see ChangeLog-2006
3268 \f
3269 Local Variables:
3270 mode: change-log
3271 left-margin: 8
3272 fill-column: 74
3273 version-control: never
3274 End:
This page took 0.091216 seconds and 5 git commands to generate.