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