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