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