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