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