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