Properly copy BFD_COMPRESS and BFD_DECOMPRESS to archive element.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2010-11-12 H.J. Lu <hongjiu.lu@intel.com>
2
3 * archive.c (_bfd_get_elt_at_filepos): Copy BFD_COMPRESS and
4 BFD_DECOMPRESS.
5 (bfd_openr_next_archived_file): Revert the last change.
6
7 2010-11-11 Mingming Sun <mingm.sun@gmail.com>
8
9 * archures.c (bfd_mach_mips_loongson_3a): Defined.
10 * bfd-in2.h (bfd_mach_mips_loongson_3a): Defined.
11 * cpu-mips.c (I_loongson_3a): New add.
12 (arch_info_struct): Add loongson_3a.
13 * elfxx-mips.c (_bfd_elf_mips_mach): Add loongson_3a.
14 (mips_set_isa_flags): Add loongson_3a.
15 (mips_mach_extensions): Add loongson_3a in MIPS64 extensions.
16
17 2010-11-10 Richard Sandiford <richard.sandiford@linaro.org>
18
19 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Remove unused
20 variables.
21
22 2010-11-10 Nick Clifton <nickc@redhat.com>
23
24 * po/ja.po: Updated Japanese translation.
25 * po/ru.po: Updated Russian translation.
26
27 2010-11-08 Nick Clifton <nickc@redhat.com>
28
29 * po/ja.po: Updated Japanese translation.
30
31 2010-11-08 Alan Modra <amodra@gmail.com>
32
33 * hash.c (bfd_hash_hash): Extract from..
34 (bfd_hash_lookup): ..here.
35 (bfd_hash_rename): New function.
36 * section.c (bfd_rename_section): New function.
37 * bfd-in.h (bfd_hash_rename): Declare.
38 * bfd-in2.h: Regenerate.
39 * elf.c (_bfd_elf_make_section_from_shdr): Rename input sections
40 when compressing or decompressing. Don't assert name match.
41 * elf64-hppa.c (get_reloc_section): Don't assert name match.
42 * elfxx-ia64.c (get_reloc_section): Likewise.
43
44 2010-11-05 Joseph Myers <joseph@codesourcery.com>
45
46 * elf32-tic6x.c (elf32_tic6x_obj_attrs_handle_unknown): New.
47 (elf32_tic6x_merge_attributes): Use
48 _bfd_elf_merge_unknown_attribute_low and
49 _bfd_elf_merge_unknown_attribute_list.
50 (elf_backend_obj_attrs_handle_unknown): Define.
51
52 2010-11-05 Joseph Myers <joseph@codesourcery.com>
53
54 * elf-attrs.c (_bfd_elf_merge_unknown_attribute_low,
55 _bfd_elf_merge_unknown_attribute_list): Correct test for matching
56 string attributes.
57
58 2010-11-05 Tristan Gingold <gingold@adacore.com>
59
60 * po/bfd.pot: Regenerate
61
62 2010-11-05 Tristan Gingold <gingold@adacore.com>
63
64 * configure.in: Bump version to 2.21.51
65 * configure: Regenerate.
66
67 2010-11-04 Maciej W. Rozycki <macro@codesourcery.com>
68
69 PR ld/10144
70 * elfxx-mips.c (_bfd_mips_elf_check_relocs)
71 [R_MIPS_32, R_MIPS_REL32, R_MIPS_64]: Ignore relocs from
72 SEC_DEBUGGING sections.
73
74 2010-11-04 Tristan Gingold <gingold@adacore.com>
75
76 * vms-lib.c (vms_write_index): Fix thinko: reverse the loop.
77 Use bfd_zmalloc instead of bfd_malloc. Fix comment.
78
79 2010-11-04 Kai Tietz <kai.tietz@onevision.com>
80
81 * coffcode.h (GNU_LINKONCE_WT): New.
82 (sec_to_styp_flags): Add handling of new debug
83 section.
84 (styp_to_sec_flags): Likewise.
85
86 2010-11-04 Tristan Gingold <gingold@adacore.com>
87
88 * makefile.vms (CFLAGS): Make badalias warnings informational.
89 * vms-lib.c (vms_lib_bread): Avoid arithmetic on void pointer.
90
91 2010-11-04 Joseph Myers <joseph@codesourcery.com>
92
93 * elf-attrs.c (_bfd_elf_merge_unknown_attribute_low,
94 _bfd_elf_merge_unknown_attribute_list): New.
95 * elf-bfd.h (struct elf_backend_data): Add
96 obj_attrs_handle_unknown.
97 (_bfd_elf_merge_unknown_attribute_low,
98 _bfd_elf_merge_unknown_attribute_list): Declare.
99 * elf32-arm.c (elf32_arm_obj_attrs_handle_unknown): New. Split
100 out from elf32_arm_merge_eabi_attributes.
101 (elf32_arm_merge_eabi_attributes): Use
102 _bfd_elf_merge_unknown_attribute_low and
103 _bfd_elf_merge_unknown_attribute_list.
104 (elf_backend_obj_attrs_handle_unknown): Define.
105 * elfxx-target.h (elf_backend_obj_attrs_handle_unknown): Define.
106 (elfNN_bed): Update initializer.
107
108 2010-11-02 H.J. Lu <hongjiu.lu@intel.com>
109
110 * bfd.c (BFD_FLAGS_FOR_BFD_USE_MASK): New.
111 * bfd-in2.h: Regenerated.
112
113 2010-11-02 Joseph Myers <joseph@codesourcery.com>
114
115 * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type): Except for
116 Tag_ABI_compatibility, treat odd tags as strings and even ones as
117 integers.
118 (elf32_tic6x_obj_attrs_order, elf32_tic6x_tag_to_array_alignment,
119 elf32_tic6x_array_alignment_to_tag): New.
120 (elf32_tic6x_merge_attributes): Handle more attributes. Set type
121 for merged attributes.
122 (elf_backend_obj_attrs_order): Define.
123
124 2010-10-29 Maciej W. Rozycki <macro@codesourcery.com>
125
126 * elfxx-mips.c (mips_elf_calculate_relocation): Fix a typo.
127
128 2010-10-29 Pawel Sikora <pluto@pld-linux.org>
129
130 PR binutils/12075
131 * compress.c (bfd_compress_section_contents): Use uLong on
132 compressed_size.
133
134 2010-10-29 Joseph Myers <joseph@codesourcery.com>
135
136 * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type): Check
137 Tag_ABI_compatibility not Tag_compatibility.
138 (elf32_tic6x_merge_attributes): Update compatibility attribute
139 name in comment. Return FALSE if merging common attributes fails.
140
141 2010-10-29 Nick Clifton <nickc@redhat.com>
142
143 PR bintils/6962
144 * coffcode.h (handle_COMDAT): Only check the base type when
145 looking for a section symbol.
146
147 2010-10-29 H.J. Lu <hongjiu.lu@intel.com>
148 Cary Coutant <ccoutant@google.com>
149
150 * archive.c (bfd_openr_next_archived_file): Copy BFD_COMPRESS
151 and BFD_DECOMPRESS.
152
153 * bfd.c (BFD_COMPRESS): New.
154 (BFD_DECOMPRESS): Likewise.
155 (BFD_FLAGS_SAVED): Likewise.
156 (bfd_preserve_save): Replace BFD_IN_MEMORY with BFD_FLAGS_SAVED.
157
158 * compress.c (bfd_uncompress_section_contents): Removed.
159 (get_uncompressed_size): New.
160 (decompress_contents): Likewise.
161 (bfd_compress_section_contents): Likewise.
162 (bfd_get_full_section_contents): Likewise.
163 (bfd_is_section_compressed): Likewise.
164 (bfd_init_section_decompress_status): Likewise.
165 (bfd_init_section_compress_status): Likewise.
166
167 * dwarf2.c (dwarf_debug_sections): New.
168 (dwarf_debug_section_enum): Likewise.
169 (read_section): Remove section_name and compressed_section_name.
170 Add dwarf_debug_section_enum. Try compressed debug section.
171 (read_indirect_string): Updated.
172 (read_abbrevs): Likewise.
173 (decode_line_info): Likewise.
174 (read_debug_ranges): Likewise.
175 (find_line): Updated.
176
177 * ecoff.c (bfd_debug_section): Add compress_status and
178 compressed_size.
179
180 * elf.c (_bfd_elf_make_section_from_shdr): Call
181 bfd_is_section_compressed to check if a DWARF debug section is
182 compressed. Call bfd_init_section_compress_status or
183 bfd_init_section_decompress_status if needed.
184
185 * elflink.c (elf_link_input_bfd): Replace bfd_get_section_contents
186 with bfd_get_full_section_contents.
187 * merge.c (_bfd_add_merge_section): Likewise.
188 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
189 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
190
191 * elfxx-target.h (TARGET_BIG_SYM): Allow BFD_COMPRESS and
192 BFD_DECOMPRESS.
193 (TARGET_LITTLE_SYM): Likewise.
194
195 * libbfd-in.h (dwarf_debug_section): New.
196 (dwarf_debug_sections): Likewise.
197
198 * libbfd.c (_bfd_generic_get_section_contents): Issue an error
199 when getting contents on compressed/decompressed section.
200
201 * section.c (COMPRESS_SECTION_NONE): New.
202 (COMPRESS_SECTION_DONE): Likewise.
203 (DECOMPRESS_SECTION_SIZED): Likewise.
204 (BFD_FAKE_SECTION): Add compress_status and compressed_size.
205 (bfd_malloc_and_get_section): Replace bfd_get_section_contents
206 with bfd_get_full_section_contents.
207
208 * bfd-in2.h: Regenerated.
209 * libbfd.h: Likewise.
210
211 2010-10-29 Bernd Schmidt <bernds@codesourcery.com>
212 Joseph Myers <joseph@codesourcery.com>
213
214 * elf32-tic6x.c (elf32_tic6x_merge_attributes): Check for mismatch
215 of DSBT attributes.
216
217 2010-10-25 Daniel Jacobowitz <dan@codesourcery.com>
218
219 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Always call
220 _bfd_clear_contents. Pass it the input section.
221 * libbfd-in.h (_bfd_clear_contents): Add input_section argument.
222 * libbfd.h: Regenerate.
223 * reloc.c (_bfd_clear_contents): Take input_section argument.
224 Use non-zero for .debug_ranges.
225 (bfd_generic_get_relocated_section_conten): Update _bfd_clear_contents
226 call.
227
228 * elf32-arm.c (elf32_arm_relocate_section): Use
229 RELOC_AGAINST_DISCARDED_SECTION.
230 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
231 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
232 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
233 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
234 * elf32-bfin.c (bfin_relocate_section): Likewise.
235 (bfinfdpic_relocate_section): Likewise.
236 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
237 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
238 * elf32-cris.c (cris_elf_relocate_section): Likewise.
239 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
240 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
241 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
242 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
243 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
244 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
245 * elf32-i370.c (i370_elf_relocate_section): Likewise.
246 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
247 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
248 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
249 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
250 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
251 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
252 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
253 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
254 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
255 * elf32-mep.c (mep_elf_relocate_section): Likewise.
256 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
257 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
258 * elf32-mt.c (mt_elf_relocate_section): Likewise.
259 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
260 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
261 * elf32-rx.c (rx_elf_relocate_section): Likewise.
262 * elf32-s390.c (elf_s390_relocate_section): Likewise.
263 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
264 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
265 * elf32-sh.c (sh_elf_relocate_section): Likewise.
266 * elf32-spu.c (spu_elf_relocate_section): Likewise.
267 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
268 * elf32-v850.c (v850_elf_relocate_section): Likewise.
269 * elf32-vax.c (elf_vax_relocate_section): Likewise.
270 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
271 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
272 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
273 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
274 (elf64_alpha_relocate_section): Likewise.
275 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
276 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
277 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
278 * elf64-s390.c (elf_s390_relocate_section): Likewise.
279 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
280 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
281 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
282 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
283
284 2010-10-25 Nathan Sidwell <nathan@codesourcery.com>
285
286 * elf32-tic6x.c: Add attribution.
287
288 2010-10-25 Alan Modra <amodra@gmail.com>
289
290 * elf32-arm.c (find_stub_size_and_template): Avoid uninitialized
291 var warning at -O3.
292
293 2010-10-25 Alan Modra <amodra@gmail.com>
294
295 * opncls.c (bfd_alloc, bfd_zalloc): Don't mark internal.
296 * libbfd-in.h (bfd_alloc, bfd_zalloc): Don't declare here.
297 * libbfd.h: Regenerate
298 * bfd-in2.h: Regenerate.
299
300 2010-10-25 Alan Modra <amodra@gmail.com>
301
302 * opncls.c (_bfd_id_counter): Rename to bfd_id_counter.
303 (bfd_reserved_id_counter, bfd_use_reserved_id): New vars.
304 (_bfd_new_bfd): Use negative id when bfd_use_reserved_id.
305 (bfd_create): Doc fix.
306 * bfd-in2.h: Regenerate.
307
308 2010-10-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
309
310 * elfxx-sparc.c (tpoff): Define bed, static_tls_size.
311 Consider static_tls_alignment.
312
313 * elf32-sparc.c (TARGET_BIG_SYM): Redefine to
314 bfd_elf32_sparc_sol2_vec.
315 (TARGET_BIG_NAME): Redefine to elf32-sparc-sol2.
316 (elf32_bed): Redefine to elf32_sparc_sol2_bed.
317 (elf_backend_static_tls_alignment): Redefine to 8.
318 Include elf32-target.h.
319 (elf_backend_static_tls_alignment): Undef again for VxWorks.
320
321 * elf64-sparc.c (TARGET_BIG_SYM): Redefine to
322 bfd_elf64_sparc_sol2_vec.
323 (TARGET_BIG_NAME): Redefine to elf64-sparc-sol2.
324 (ELF_OSABI): Undef.
325 (elf64_bed): Redefine to elf64_sparc_sol2_bed.
326 (elf_backend_static_tls_alignment): Redefine to 16.
327 Include elf64-target.h.
328
329 * config.bfd (sparc-*-solaris2.[0-6]): Split from sparc-*-elf*.
330 Set targ_defvec to bfd_elf32_sparc_sol2_vec.
331 [BFD64] (sparc-*-solaris2*): Set targ_defvec to
332 bfd_elf32_sparc_sol2_vec.
333 Replace bfd_elf64_sparc_vec by bfd_elf64_sparc_sol2_vec in
334 targ_selvecs.
335
336 * configure.in: Handle bfd_elf32_sparc_sol2_vec,
337 bfd_elf64_sparc_sol2_vec.
338 * configure: Regenerate.
339
340 * targets.c (bfd_elf32_sparc_sol2_vec): Declare.
341 (bfd_elf64_sparc_sol2_vec): Declare.
342 (_bfd_target_vector): Add bfd_elf32_sparc_sol2_vec,
343 bfd_elf64_sparc_sol2_vec.
344
345 2010-10-21 Joseph Myers <joseph@codesourcery.com>
346
347 * elf32-tic6x.c (elf32_tic6x_merge_arch_attributes): Update for
348 attribute renaming.
349 (elf_backend_obj_attrs_section): Change to ".c6xabi.attributes".
350
351 2010-10-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
352
353 * elf-bfd.h (struct elf_backend_data): New member
354 static_tls_alignment.
355 * elfxx-target.h (elf_backend_static_tls_alignment): Provide
356 default.
357 (elfNN_bed): Initialize static_tls_alignment.
358 * elflink.c (bfd_elf_final_link): Don't round end of TLS section
359 if static TLS has special alignment requirements.
360 * elf32-i386.c (elf_i386_tpoff): Define bed, static_tls_size.
361 Consider static_tls_alignment.
362 (elf_backend_static_tls_alignment): Redefine for Solaris 2.
363 Undef again for VxWorks.
364 * elf64-x86-64.c (elf64_x86_64_tpoff): Define bed,
365 static_tls_size.
366 Consider static_tls_alignment.
367 (elf_backend_static_tls_alignment): Redefine for Solaris 2.
368 Undef again for Intel L1OM.
369
370 2010-10-14 Dave Korn <dave.korn.cygwin@gmail.com>
371
372 Apply LD plugin patch series (part 6/6).
373 * aoutx.h (aout_link_check_ar_symbols): Take new "subsbfd" reference
374 parameter and pass it when invoking add_archive_element callback.
375 (aout_link_check_archive_element): Handle substitute bfd if it
376 was set during add_archive_element callback in the above.
377 * cofflink.c (coff_link_check_ar_symbols): Take new "subsbfd" reference
378 parameter and pass it when invoking add_archive_element callback.
379 (coff_link_check_archive_element): Handle substitute bfd if it
380 was set during add_archive_element callback in the above.
381 * ecoff.c (read_ext_syms_and_strs): New function holds symbol-reading
382 code factored-out from ecoff_link_check_archive_element.
383 (reread_ext_syms_and_strs): Clear old symbols and call it.
384 (ecoff_link_check_archive_element): Use the above. Handle substitute
385 BFD if one is set by add_archive_element callback.
386 (ecoff_link_add_archive_symbols): Likewise allow bfd substitution.
387 * elflink.c (elf_link_add_archive_symbols): Likewise.
388 * linker.c (generic_link_check_archive_element): Likewise.
389 * pdp11.c (aout_link_check_ar_symbols): Take new "subsbfd" reference
390 parameter and pass it when invoking add_archive_element callback.
391 (aout_link_check_archive_element): Handle substitute bfd if it was
392 set during add_archive_element callback in the above.
393 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Handle substitute
394 BFD if one is set by add_archive_element callback.
395 * xcofflink.c (xcoff_link_check_dynamic_ar_symbols): Take new "subsbfd"
396 reference parameter and pass it when invoking add_archive_element
397 callback.
398 (xcoff_link_check_ar_symbols): Likewise.
399 (xcoff_link_check_archive_element): Handle bfd substitution if it was
400 set by callback in the above.
401
402 2010-10-11 Alan Modra <amodra@gmail.com>
403
404 * elf32-frv.c (elf32_frv_relocate_section): Set "name" for global syms.
405 (elf32_frvfdpic_finish_dynamic_sections): Don't crash on
406 __ROFIXUP_END__ defined in shared lib.
407
408 2010-10-11 Thomas Schwinge <thomas@codesourcery.com>
409
410 * elf32-arm.c (elf32_arm_final_link_relocate)
411 (elf32_arm_relocate_section): Handle relocations against STN_UNDEF.
412
413 2010-10-11 Dave Korn <dave.korn.cygwin@gmail.com>
414
415 * elflink.c (_bfd_elf_link_output_relocs): Delete unused variable
416 "output_rel_hdr".
417
418 2010-10-09 John Tytgat <john@bass-software.com>
419
420 * reloc.c (BFD_RELOC_ARM_HVC): Add.
421 * libbfd.h: Regenerate.
422
423 2010-10-08 Kai Tietz <kai.tietz@onevision.com>
424
425 * pei-x86_64.c (find_next_xdata_or_end): Removed.
426 (pex64_dump_xdata): Remove arguments stop, onaline,
427 and pdata. New argument endx. Print term "none"
428 instead of misleading "CFA".
429 (sort_xdata_arr): New function.
430 (pex64_bfd_print_pdata): Use binary search/sort for unwind-RVAs
431 instead of searching quadratic.
432
433 2010-10-08 Pierre Muller <muller@ics.u-strasbg.fr>
434 Alan Modra <amodra@gmail.com>
435
436 Fix build with -DDEBUG=7
437 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Remove call
438 to deleted function elf_symbol_flags. Add typecast to avoid warning.
439 * elf32-rx.c (dump_symbol) : Rename to..
440 (rx_dump_symbol): ..this to avoid link errors.
441 * elflink.c (elf_link_input_bfd): Add typecast to avoid warnings.
442 (bfd_elf_perform_complex_relocation): Likewise.
443 * elf32-xtensa.c (print_action_list): Likewise.
444
445 2010-10-06 Nathan Sidwell <nathan@codesourcery.com>
446
447 * elf32-arm.c (elf32_arm_stub_long_branch_any_arm_pic,
448 elf32_arm_stub_long_branch_any_arm_pic): Use a consistent name for
449 ip/r12.
450 (arm_type_of_stub): Remove superfluous braces.
451
452 2010-10-04 Bernd Schmidt <bernds@codesourcery.com>
453
454 * elf-bfd.h (struct bfd_elf_section_reloc_data): New structure.
455 (struct bfd_elf_section_data): New members REL and RELA; delete
456 members REL_HDR, REL_HDR2, REL_COUNT, REL_COUNT2, REL_IDX,
457 REL_IDX2, REL_HASHES.
458 (_bfd_elf_init_reloc_shdr): Adjust declaration.
459 (_bfd_elf_single_rel_hdr): Declare.
460 (RELOC_AGAINST_DISCARDED_SECTION): Use it.
461 * elf.c (bfd_section_from_shdr): Adjusted to match changes in
462 data structures.
463 (_bfd_elf_init_reloc_shdr): New arg RELDATA. Remove arg REL_HDR.
464 All callers changed. Allocate memory for the Elf_Internal_Shdr
465 structure.
466 (_bfd_elf_single_rel_hdr): New function.
467 (struct fake_section_arg): New structure.
468 (elf_fake_section): Expect to see a pointer to it in the third
469 argument. If doing a relocatable link, allocate both REL and RELA
470 sections as needed.
471 (assign_section_numbers): Adjusted to match changes in
472 data structures.
473 (_bfd_elf_compute_section_file_positions): Call elf_fake_sections
474 with a struct fake_section_args argument.
475 * elfcode.h (elf_write_relocs): Adjusted to match changes in
476 data structures.
477 (elf_slurp_reloc_table): Likewise.
478 * elflink.c (_bfd_elf_link_read_relocs): Likewise.
479 (_bfd_elf_link_size_reloc_section): Remove arg REL_HDR, replace with
480 RELDATA. Remove argument O. All callers changed. Remove code to
481 discover the right rel_hdr and count.
482 (_bfd_elf_link_output_relocs): Adjusted to match changes in
483 data structures.
484 (elf_link_adjust_relocs): Remove args REL_HDR, COUNT and REL_HASH;
485 replace with RELDATA. All callers changed.
486 (elf_link_input_bfd): Correctly generate rel_hash data when both
487 REL and RELA sections are present.
488 (elf_reloc_link_order): Adjusted to match changes in
489 data structures.
490 (bfd_elf_final_link): Simplify code to count relocs. Free the
491 hashes array for both REL and RELA.
492 (get_dynamic_reloc_section_name): Use _bfd_elf_single_reloc_hdr
493 * elf32-m32r.c (m32r_elf_fake_sections, elf_backend_fake_sections):
494 Delete.
495 * elf32-tic6x.c (elf32_tic6x_fake_sections, elf_backend_fake_sections):
496 Delete.
497 (elf32_tic6x_rel_relocation_p): Adjusted to match changes in
498 data structures.
499 * elf32-microblaze.c (microblaze_elf_check_relocs): Use
500 _bfd_elf_single_rel_hdr.
501 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
502 * elf32-spu.c (spu_elf_relocate_section): Likewise.
503 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
504 * elf64-hppa.c (get_reloc_section): Likewise.
505 * elf64-mips.c (mips_elf64_slurp_reloc_table): Adjusted to match
506 changes in data structures.
507 (mips_elf64_write_relocs): Use _bfd_elf_single_rel_hdr.
508 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
509 (ppc64_elf_edit_toc): Likewise.
510 (get_relocs): Adjusted to match changes in data structures.
511 Allocate an Elf_Internal_Shdr structure if necessary.
512 (ppc64_elf_finish_dynamic_sections): Use _bfd_elf_single_rel_hdr.
513 * elf64-sparc.c (elf64_sparc_slurp_reloc_table): Adjusted to match
514 changes in data structures.
515 * elfxx-ia64.c (get_reloc_section): Use _bfd_elf_single_rel_hdr.
516 * elfxx-mips.c (MIPS_RELOC_RELA_P): Remove macro.
517 (mips_elf_rel_relocation_p): Adjusted to match changes in data
518 structures.
519 (_bfd_mips_elf_relocate_section): Use mips_elf_rel_relocation_p rather
520 than MIPS_RELOC_RELOCA_P.
521 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use
522 _bfd_elf_single_rel_hdr.
523 (_bfd_sparc_elf_relocate_section): Likewise.
524
525 2010-10-01 Thomas Schwinge <thomas@codesourcery.com>
526
527 * elf32-arm.c (elf32_arm_size_stubs): Don't choke on local symbols in
528 SHN_UNDEF, SHN_ABS, SHN_COMMON.
529
530 2010-09-30 H.J. Lu <hongjiu.lu@intel.com>
531
532 PR ld/11812
533 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't
534 allocate .got.plt section if there are no GOT nor PLT
535 entries and there is no refeence to _GLOBAL_OFFSET_TABLE_.
536 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Li.kewise.
537
538 * elflink.c (_bfd_elf_define_linkage_sym): Clear non_elf.
539
540 2010-09-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
541
542 * configure: Regenerate.
543
544 2010-09-24 Thomas Schwinge <thomas@codesourcery.com>
545
546 * elf32-arm.c, elf32-cris.c, elf32-hppa.c, elf32-i370.c, elf32-m32r.c,
547 elf32-m68k.c, elf32-microblaze.c, elf32-ppc.c, elf32-score.c,
548 elf32-score7.c, elf32-sh.c, elf32-vax.c, elf32-xtensa.c, elf64-alpha.c,
549 elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-sparc.c, elfcode.h,
550 elflink.c, elfxx-ia64.c, elfxx-mips.c: Use STN_UNDEF when referring to
551 the zero symbol index.
552
553 * elflink.c (bfd_elf_reloc_symbol_deleted_p): Compare the symbol index
554 to STN_UNDEF, not SHN_UNDEF.
555
556 2010-09-23 Bernd Schmidt <bernds@codesourcery.com>
557
558 * elf32-tic6x.c (elf32_tic6x_fake_sections): New function.
559 (elf_backend_fake_sections): Define.
560
561 2010-09-23 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
562
563 * bfd-in2.h (BFD_RELOC_ARM_HVC): New enum value.
564
565 2010-09-23 Alan Modra <amodra@gmail.com>
566
567 * cpu-d10v.c: Make bits_per_address 18 for all arch_info entries.
568
569 2010-09-23 Alan Modra <amodra@gmail.com>
570
571 * elf.c (_bfd_elf_init_private_section_data): Allow for SEC_RELOC
572 difference between input and output section.
573
574 2010-09-22 Kai Tietz <kai.tietz@onevision.com>
575
576 * coffcode.h (sec_to_styp_flags): Adjust debug
577 sections to be conform to pe-coff specification
578 and avoid marking them as excluded.
579 (styp_to_sec_flags): Doing reverse mapping.
580
581 * peXXigen.c (_bfd_XXi_final_link_postscript): Add handling for
582 setting IAT directory entry.
583
584 2010-09-20 Richard Henderson <rth@redhat.com>
585
586 * elf64-alpha.c (elf64_alpha_howto_table): Use bfd_elf_generic_reloc.
587
588 2010-09-19 Richard Sandiford <rdsandiford@googlemail.com>
589
590 * elfxx-mips.c (mips_elf_link_hash_entry): Add got_only_for_calls.
591 (mips_elf_link_hash_newfunc): Initialize it.
592 (mips_elf_record_global_got_symbol): Add a for_call parameter.
593 (mips_elf_count_got_symbols): Check SYMBOL_CALLS_LOCAL rather
594 than SYMBOL_REFERENCES_LOCAL if the GOT entry is only used for calls.
595 Try to remove .got entries in favour of .got.plt entries on VxWorks.
596 (_bfd_mips_elf_check_relocs): Do not try to avoid allocating
597 a global GOT entry for VxWorks calls. Update uses of
598 mips_elf_record_global_got_symbol.
599 (allocate_dynrelocs): Set got_only_for_calls to false if the GOT
600 entry is used for dynamic relocations.
601
602 2010-09-19 Richard Sandiford <rdsandiford@googlemail.com>
603
604 * elfxx-mips.c (mips_got_entry): Adjust commentary.
605 (mips_elf_create_local_got_entry): If given a symbol, check that it
606 has been assigned to the local part of the GOT.
607 (mips_elf_count_got_symbols): Take the bfd_link_info as argument
608 instead of the master GOT. Put all locally-binding symbols in
609 the local area.
610 (mips_elf_make_got_per_bfd): Use global_got_area to decide whether
611 a symbol lives in the local or global area.
612 (mips_elf_local_relocation_p): Remove check_forced argument and
613 retain only the !check_forced behavior.
614 (mips_elf_calculate_relocation): Adjust call accordingly.
615 Use global_got_area to decide whether an output relocation
616 should be local or global. Explicitly decay R_MIPS_GOT_PAGE
617 into R_MIPS_GOT_DISP where appropriate. Fix selection of
618 local vs. global semantics for R_MIPS*_26. Remove redundant
619 reevaluation of what is stored in was_local_p.
620 (mips_elf_create_dynamic_relocation): Use global_got_area to decide
621 whether the relocation should be against a global or local symbol.
622 (mips_elf_lay_out_got): Update the GOT traversal after the above
623 change to mips_elf_count_got_symbols.
624 (mips_elf_adjust_addend): Adjust call to mips_elf_local_relocation_p.
625 (_bfd_mips_elf_relocate_section): Likewise.
626 (_bfd_mips_elf_finish_dynamic_symbol): Use global_got_area to decide
627 whether the symbol has a global got entry.
628 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
629
630 2010-09-19 Richard Sandiford <rdsandiford@googlemail.com>
631
632 * elfxx-mips.c (allocate_dynrelocs): Don't add relocation symbols
633 to the global GOT on VxWorks.
634
635 2010-09-19 Richard Sandiford <rdsandiford@googlemail.com>
636
637 * elfxx-mips.c (_bfd_mips_elf_check_relocs): On VxWorks,
638 exclude __GOTT_BASE__ and __GOTT_INDEX__ from the warning
639 about HI/LO relocations in shared objects.
640
641 2010-09-16 Alan Modra <amodra@gmail.com>
642
643 * elf32-spu.c (spu_elf_size_sections): Omit fixups for non-alloc
644 sections.
645 (spu_elf_create_sections): Mark .fixup with SEC_LINKER_CREATED and
646 set dynobj.
647 (spu_elf_finish_dynamic_sections): New function.
648 (elf_backend_finish_dynamic_sections): Define.
649
650 2010-09-16 Alan Modra <amodra@gmail.com>
651
652 * elf.c (bfd_elf_get_default_section_type): Don't test SEC_NEVER_LOAD.
653 * elflink.c (elf_link_input_bfd): Likewise.
654
655 2010-09-15 Kai Tietz <kai.tietz@onevision.com>
656
657 * pei-x86_64.c (pex64_get_unwind_info): Reorgnized.
658 (pex64_get_scope_entry): Removed.
659 (find_next_xdata_or_end): New helper.
660 (pex64_dump_xdata): Reworked.
661 (pex64_bfd_print_pdata): Add checking for
662 valid pdata sorting and values. Reworked
663 output.
664
665 2010-09-15 H.J. Lu <hongjiu.lu@intel.com>
666
667 PR binutils/12004
668 * plugin.c (bfd_plugin_object_p): Handle NULL iostream.
669
670 2010-09-14 Kai Tietz <kai.tietz@onevision.com>
671
672 * pe-x86_64.c (COFF_SECTION_ALIGNMENT_ENTRIES): Make
673 .rdata, .data, and .text partial matched section names.
674 * pei-x86_64.c: Likewise.
675
676 * peXXigen.c (sort_x64_pdata): New helper.
677 (_bfd_XXi_final_link_postscript): Do pdata sorting.
678
679 2010-09-09 H.J. Lu <hongjiu.lu@intel.com>
680
681 PR ld/11998
682 * elf.c (assign_file_positions_for_load_sections): Don't warn
683 zero LMA adjustment.
684
685 2010-09-09 Bernd Schmidt <bernds@codesourcery.com>
686
687 * elflink.c (bfd_elf_final_link): Correct calculation of
688 max_external_reloc_size.
689
690 2010-09-07 Alan Modra <amodra@gmail.com>
691 Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de>
692
693 * peXXigen.c: Whitespace.
694 (pe_print_idata): Correct section limit calculations. Tidy array
695 indexing.
696 (_bfd_XX_print_ce_compressed_pdata): Don't leak memory.
697
698 2010-09-02 Richard Henderson <rth@redhat.com>
699
700 * config.bfd (x86_64-*-mingw*): Select 32-bit pei vectors too.
701
702 2010-09-01 Pedro Alves <pedro@codesourcery.com>
703
704 * netbsd-core.c (netbsd_core_core_file_pid): Renamed to ...
705 (netbsd_core_file_pid): ... this.
706
707 2010-09-01 Tristan Gingold <gingold@adacore.com>
708
709 * coffcode.h (coff_slurp_line_table): Add a cast.
710 (coff_slurp_reloc_table): Ditto.
711
712 2010-08-30 Gunther Nikl <gnikl@users.sourceforge.net>
713
714 * cisco-core.c (cisco_core_file_pid): Define.
715
716 2010-08-30 Alan Modra <amodra@gmail.com>
717
718 PR binutils/11953
719 * elf.c (copy_elf_program_header): Calculate map->header_size
720 from lowest_section, not first_section. Validate program
721 header p_paddr against section lma. Find lowest_section in
722 second loop over headers.
723
724 2010-08-28 Alan Modra <amodra@gmail.com>
725
726 * elflink.c (_bfd_elf_dynamic_symbol_p): Rename param. Make
727 common syms local.
728 (_bfd_elf_symbol_refs_local_p): Expand comment.
729 (elf_link_output_extsym): Fix style nit.
730
731 2010-08-26 Nathan Sidwell <nathan@codesourcery.com>
732
733 * elf32-arm.c (elf32_arm_final_link): Process stub sections
734 exactly once.
735
736 2010-08-25 H.J. Lu <hongjiu.lu@intel.com>
737
738 PR ld/11939
739 * elflink.c (elf_link_add_object_symbols): Don't set
740 unique_global for non-ELF hash link table.
741
742 2010-08-25 H.J. Lu <hongjiu.lu@intel.com>
743
744 PR ld/11944
745 * elf-bfd.h (elf_backend_data): Add target_id.
746 (bfd_elf_make_generic_object): Renamed to ...
747 (bfd_elf_make_object): This.
748
749 * elf.c (bfd_elf_make_generic_object): Removed.
750 (bfd_elf_make_object): New.
751 (bfd_elf_mkcorefile): Really treat it as an object file.
752
753 * elf-m10300.c (ELF_TARGET_ID): New.
754 * elf32-arm.c (ELF_TARGET_ID): Likewise.
755 * elf32-bfin.c (ELF_TARGET_ID): Likewise.
756 * elf32-cris.c (ELF_TARGET_ID): Likewise.
757 * elf32-frv.c (ELF_TARGET_ID): Likewise.
758 * elf32-i386.c (ELF_TARGET_ID): Likewise.
759 * elf32-lm32.c (ELF_TARGET_ID): Likewise.
760 * elf32-m32r.c (ELF_TARGET_ID): Likewise.
761 * elf32-m68hc11.c (ELF_TARGET_ID): Likewise.
762 * elf32-m68hc12.c (ELF_TARGET_ID): Likewise.
763 * elf32-m68k.c (ELF_TARGET_ID): Likewise.
764 * elf32-microblaze.c (ELF_TARGET_ID): Likewise.
765 * elf32-ppc.c (ELF_TARGET_ID): Likewise.
766 * elf32-s390.c (ELF_TARGET_ID): Likewise.
767 * elf32-sh.c (ELF_TARGET_ID): Likewise.
768 * elf32-sparc.c (ELF_TARGET_ID): Likewise.
769 * elf32-spu.c (ELF_TARGET_ID): Likewise.
770 * elf32-tic6x.c (ELF_TARGET_ID): Likewise.
771 * elf32-xtensa.c (ELF_TARGET_ID): Likewise.
772 * elf64-alpha.c (ELF_TARGET_ID): Likewise.
773 * elf64-hppa.c (ELF_TARGET_ID): Likewise.
774 * elf64-ppc.c (ELF_TARGET_ID): Likewise.
775 * elf64-s390.c (ELF_TARGET_ID): Likewise.
776 * elf64-x86-64.c (ELF_TARGET_ID): Likewise.
777 * elfxx-ia64.c (ELF_TARGET_ID): Likewise.
778
779 * elf32-hppa.c (elf32_hppa_mkobject): Removed.
780 (bfd_elf32_mkobject): Likewise.
781 (ELF_TARGET_ID): New.
782
783 * elf32-mips.c (ELF_TARGET_ID): New.
784 (bfd_elf32_mkobject): Removed.
785
786 * elf64-mips.c (ELF_TARGET_ID): New.
787 (bfd_elf64_mkobject): Removed.
788
789 * elfn32-mips.c (ELF_TARGET_ID): New.
790 (bfd_elf32_mkobject): Removed.
791
792 * elfxx-mips.c (_bfd_mips_elf_mkobject): Removed.
793 * elfxx-mips.h (_bfd_mips_elf_mkobject): Likewise.
794
795 * elfxx-target.h (bfd_elfNN_mkobject): Default to
796 bfd_elf_make_object.
797 (ELF_TARGET_ID): New. Default to GENERIC_ELF_DATA.
798 (elfNN_bed): Initialize target_id.
799
800 2010-08-25 Julian Brown <julian@codesourcery.com>
801
802 * elf32-arm.c (arm_stub_required_alignment): New.
803 (arm_build_one_stub): Use above to partition stubs.
804 (make_branch_to_a8_stub): Use arm_stub_a8_veneer_lwm not
805 arm_stub_a8_veneer_b_cond.
806
807 2010-08-25 Alan Modra <amodra@gmail.com>
808
809 * aout-arm.c (MY(bfd_reloc_type_lookup)): Use bfd_arch_bits_per_address.
810 * aout-ns32k.c (MY(bfd_reloc_type_lookup)): Likewise.
811 * aoutx.h (NAME(aout,reloc_type_lookup)): Likewise.
812 * coff-arm.c (coff_arm_reloc_type_lookup): Likewise.
813 * elf-hppa.h (elf_hppa_reloc_final_type): Likewise.
814 * reloc.c (bfd_default_reloc_type_lookup): Likewise.
815 * riscix.c (riscix_reloc_type_lookup): Likewise.
816
817 2010-08-25 Alan Modra <amodra@gmail.com>
818
819 * elf.c (_bfd_elf_map_sections_to_segments): Don't load program
820 headers if any loaded section wraps the address space. Simplify
821 ~(m-1) to -m. Use lma rather than vma when determining whether
822 note sections are adjacent.
823
824 2010-08-22 H.J. Lu <hongjiu.lu@intel.com>
825
826 PR ld/11933
827 * elflink.c (elf_link_add_object_symbols): Don't check relocation
828 if input ELF object ID doesn't match output.
829
830 2010-08-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
831
832 * configure: Regenerate.
833
834 2010-08-20 H.J. Lu <hongjiu.lu@intel.com>
835
836 * merge.c (sec_merge_emit): Revert the last checkin.
837
838 2010-08-20 Maciej W. Rozycki <macro@codesourcery.com>
839
840 * elf32-sh.c (sh_elf_relocate_section): Handle non-ELF output
841 BFD.
842
843 2010-08-20 Maciej W. Rozycki <macro@codesourcery.com>
844
845 * elf32-m68k.c (bfd_elf_m68k_set_target_options): Don't set GOT
846 options unless an m68k hash table has been found.
847
848 2010-08-20 Nick Clifton <nickc@redhat.com>
849
850 * merge.c (sec_merge_emit): Do not zero pad sections that do not
851 have an alignment.
852
853 2010-08-18 Pedro Alves <pedro@codesourcery.com>
854
855 PR corefile/8210
856
857 * bfd-in2.h: Regenerate.
858 * corefile.c (bfd_core_file_pid): New.
859
860 * targets.c (BFD_JUMP_TABLE_CORE): Add NAME##_core_file_pid.
861 (struct bfd_target) <_core_file_pid>: New.
862
863 * libbfd-in.h (_bfd_nocore_core_file_pid): Declare.
864 * libbfd.c (_bfd_nocore_core_file_pid): New.
865
866 * elf-bfd.h (bfd_elf32_core_file_pid, bfd_elf64_core_file_pid):
867 Declare.
868 * elfcode.h (elf_core_file_pid): New define.
869 * elfcore.h (elf_core_file_pid): New function.
870
871 * elf.c (elfcore_make_pid): Rewrite.
872 (elfcore_grok_prstatus): Only set core_pid if not set yet.
873 (elfcore_grok_prstatus) [!HAVE_PRSTATUS_T_PR_WHO]: Fallback to
874 getting the lwpid from prstat.pr_pid.
875
876 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Write the LWPID to
877 elf_tdata's core_lwpid instead of to core_pid.
878 (elf64_x86_64_grok_psinfo): Extract the the main process's PID,
879 and store it in elf_tdata's core_pid field.
880 * elf32-i386.c (elf_i386_grok_prstatus): Write the LWPID to
881 elf_tdata's core_lwpid instead of to core_pid.
882 (elf_i386_grok_psinfo): Extract the the main process's PID, and
883 store it in elf_tdata's core_pid field.
884
885 * elf32-am33lin.c (elf32_am33lin_grok_prstatus): Write the LWPID
886 to elf_tdata's core_lwpid instead of to core_pid.
887 * elf32-arm.c (elf32_arm_nabi_grok_prstatus): Write the LWPID to
888 elf_tdata's core_lwpid instead of to core_pid.
889 * elf32-cris.c (cris_elf_grok_prstatus): Write the LWPID to
890 elf_tdata's core_lwpid instead of to core_pid.
891 * elf32-frv.c (elf32_frv_grok_prstatus): Write the LWPID to
892 elf_tdata's core_lwpid instead of to core_pid.
893 * elf32-hppa.c (elf32_hppa_grok_prstatus): Write the LWPID to
894 elf_tdata's core_lwpid instead of to core_pid.
895 * elf32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to
896 elf_tdata's core_lwpid instead of to core_pid.
897 * elf32-ppc.c (ppc_elf_grok_prstatus): Write the LWPID to
898 elf_tdata's core_lwpid instead of to core_pid.
899 * elf32-s390.c (elf_s390_grok_prstatus): Write the LWPID to
900 elf_tdata's core_lwpid instead of to core_pid.
901 * elf32-score.c (s3_bfd_score_elf_grok_prstatus): Write the LWPID
902 to elf_tdata's core_lwpid instead of to core_pid.
903 * elf32-score7.c (s7_bfd_score_elf_grok_prstatus): Write the LWPID
904 to elf_tdata's core_lwpid instead of to core_pid.
905 * elf32-sh.c (elf32_shlin_grok_prstatus): Write the LWPID to
906 elf_tdata's core_lwpid instead of to core_pid.
907 * elf32-xtensa.c (elf_xtensa_grok_prstatus): Write the LWPID to
908 elf_tdata's core_lwpid instead of to core_pid.
909 * elf64-hppa.c (elf64_hppa_grok_prstatus): Write the LWPID to
910 elf_tdata's core_lwpid instead of to core_pid.
911 * elf64-mips.c (elf64_mips_grok_prstatus): Write the LWPID to
912 elf_tdata's core_lwpid instead of to core_pid.
913 * elf64-ppc.c (ppc64_elf_grok_prstatus): Write the LWPID to
914 elf_tdata's core_lwpid instead of to core_pid.
915 * elfn32-mips.c (elf32_mips_grok_prstatus): Write the LWPID to
916 elf_tdata's core_lwpid instead of to core_pid.
917
918 * plugin.c (bfd_plugin_core_file_pid): New function.
919 * aout-target.h (MY_core_file_pid): Define.
920 * aout-tic30.c (MY_core_file_pid, MY_core_file_p): New defines.
921 * coff-rs6000.c (coff_core_file_pid): New define.
922 (rs6000coff_vec, pmac_xcoff_vec): Use BFD_JUMP_TABLE_CORE.
923 * coff64-rs6000.c (coff_core_file_pid): New define.
924 (rs6000coff64_vec): Use BFD_JUMP_TABLE_CORE.
925 (xcoff64_core_file_pid): New define.
926 (aix5coff64_vec): Use BFD_JUMP_TABLE_CORE.
927 * mach-o-target.c (bfd_mach_o_core_file_pid): New define.
928 * aix386-core.c (aix386_core_file_pid): New define.
929 * hppabsd-core.c (hppabsd_core_core_file_pid): New define.
930 * hpux-core.c (hpux_core_core_file_pid): New define.
931 * irix-core.c (irix_core_core_file_pid): New define.
932 * lynx-core.c (lynx_core_file_pid): New define.
933 * osf-core.c (osf_core_core_file_pid): New define.
934 * ptrace-core.c (ptrace_unix_core_file_pid): New define.
935 * sco5-core.c (sco5_core_file_pid): New define.
936 * xcoff-target.h (coff_core_file_pid): New define.
937 * netbsd-core.c (netbsd_core_core_file_pid): New define.
938
939 2010-08-13 H.J. Lu <hongjiu.lu@intel.com>
940
941 PR ld/11913
942 * elf32-i386.c (elf_i386_finish_dynamic_sections): Check if
943 .got.plt section is discarded.
944 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Likewise.
945
946 2010-08-13 Nathan Sidwell <nathan@codesourcery.com>
947
948 * elf32-m69k.c (elf32_m68k_print_private_bfd_data): Detect EMAC_B
949 variant.
950
951 2010-08-12 H.J. Lu <hongjiu.lu@intel.com>
952
953 PR binutils/11909
954 * Makefile.am (coff-tic4x.lo): New. Disable -Werror.
955 (coff-tic54x.lo): Likewise.
956 * Makefile.in: Regenerated.
957
958 2010-08-12 Todd Veldhuizen <todd.veldhuizen@logicblox.com>
959
960 PR ld/11843
961 * elflink.c (compute_bucket_count): Avoid futile long searches for
962 the best bucket size.
963
964 2010-08-09 Richard Henderson <rth@redhat.com>
965
966 PR ld/11891
967 * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Disallow relaxing
968 to tlshi/lo until pos0 and pos1 are adjacent. Use the destination
969 register from the tldgd insn.
970
971 2010-08-09 Catherine Moore <clm@codesourcery.com>
972
973 * elfxx-mips.c (mips_elf_perform_relocation): Improve
974 interlinking error message.
975
976 2010-08-06 Alan Modra <amodra@gmail.com>
977
978 * elf64-ppc.c (ha_reloc_match): Allow matches to other than r2.
979 (ppc64_elf_relocate_section): Nop out high part insn of large toc
980 code sequence when the high part of offset is zero.
981
982 2010-08-04 Tristan Gingold <gingold@adacore.com>
983
984 * vms-alpha.c (alpha_vms_build_fixups): Write the EICP.
985 (alpha_vms_bfd_final_link): Explicitly forbid relocatable links.
986 Clear the SEC_RELOC flag.
987
988 2010-08-04 Tristan Gingold <gingold@adacore.com>
989
990 * vms-alpha.c (alpha_vms_create_eisd_for_section): Make writable
991 sections with relocs.
992 (alpha_vms_add_fixup_lp): Set SEC_RELOC flag.
993 (alpha_vms_add_fixup_ca): Ditto.
994 (alpha_vms_add_fixup_qr): Ditto.
995 Add comments.
996
997 2010-08-04 Tristan Gingold <gingold@adacore.com>
998
999 * vms-alpha.c (alpha_vms_create_eisd_for_section): Do not make
1000 CODE sections writable.
1001
1002 2010-08-04 Tristan Gingold <gingold@adacore.com>
1003
1004 * vms-alpha.c (alpha_vms_add_lw_fixup): Renamed to ...
1005 (alpha_vms_add_fixup_lr): ... this for consistency.
1006 (alpha_vms_add_qw_fixup): Removed.
1007 Fix some comments.
1008 (vms_get_symbol_info): Adjust type for unknown sections.
1009
1010 2010-08-04 Tristan Gingold <gingold@adacore.com>
1011
1012 * vms-alpha.c (_bfd_vms_slurp_egsd): Use the canonical absolute
1013 section for any absolute section. Remove some debugging code.
1014
1015 2010-08-03 DJ Delorie <dj@redhat.com>
1016
1017 * elf32-m32c.c (ELF_MAXPAGESIZE): Change page size to 256 bytes.
1018
1019 2010-08-03 Tristan Gingold <gingold@adacore.com>
1020
1021 * vms-misc.c (vms_convert_to_var): Make it static.
1022 (_bfd_vms_convert_to_var_unix_filename): Make it public.
1023
1024 2010-08-03 Tristan Gingold <gingold@adacore.com>
1025
1026 * makefile.vms (OBJS): Update list.
1027
1028 2010-08-03 Tristan Gingold <gingold@adacore.com>
1029
1030 * vms-alpha.c (_bfd_vms_slurp_egsd): Do not set SEC_HAS_CONTENTS
1031 nor SEC_RELOC for empty sections.
1032
1033 2010-08-03 Tristan Gingold <gingold@adacore.com>
1034
1035 * vms-alpha.c (evax_section_flags): Fix flags for absolute
1036 section. Remove useless parenthesis.
1037
1038 2010-08-03 Tristan Gingold <gingold@adacore.com>
1039
1040 * vms-lib.c (vms_lib_bread_raw): Change type of BUF argument.
1041 (vms_lib_bread, vms_lib_bopen): Adjust.
1042
1043 2010-08-02 Alan Modra <amodra@gmail.com>
1044
1045 PR 11866
1046 * elf.c (assign_file_positions_for_load_sections): Use p_vaddr to
1047 calculate off_adjust rather than first section vma.
1048
1049 2010-07-30 H.J. Lu <hongjiu.lu@intel.com>
1050
1051 * elflink.c (compute_bucket_count): Add ATTRIBUTE_UNUSED to info.
1052
1053 2010-07-30 Anthony Green <green@moxielogic.com>
1054
1055 * config.bfd (targ_cpu): Add moxie-*-rtems support.
1056
1057 2010-07-29 Alan Modra <amodra@gmail.com>
1058
1059 * elf64-ppc.c (ppc64_elf_edit_toc): Always adjust local syms in
1060 .toc section, even when none are used in relocs.
1061
1062 2010-07-27 Maciej W. Rozycki <macro@codesourcery.com>
1063
1064 * elfxx-mips.h: Include "elf/mips.h".
1065 (gprel16_reloc_p): New static inline function.
1066 * elfxx-mips.c (_bfd_mips_elf_check_relocs)
1067 [R_MIPS16_GOT16, R_MIPS_GOT16, R_MIPS_GOT_HI16, R_MIPS_GOT_LO16]:
1068 Use got16_reloc_p.
1069 (_bfd_mips_elf_relocate_section)[bfd_reloc_overflow]: Use
1070 gprel16_reloc_p.
1071 * elf32-mips.c (mips_info_to_howto_rel): Likewise.
1072 * elfn32-mips.c (mips_info_to_howto_rel): Likewise.
1073
1074 2010-07-27 Maciej W. Rozycki <macro@codesourcery.com>
1075
1076 * elf64-mips.c (mips_elf64_howto_table_rela)
1077 [R_MIPS_TLS_DTPMOD64]: Clear partial_inplace.
1078 [R_MIPS_TLS_DTPREL64, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise.
1079 [R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise.
1080 [R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL64]: Likewise.
1081 [R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise.
1082 * elfn32-mips.c (elf_mips_howto_table_rela)
1083 [R_MIPS_TLS_DTPMOD32]: Likewise.
1084 [R_MIPS_TLS_DTPREL32, R_MIPS_TLS_GD, R_MIPS_TLS_LDM]: Likewise.
1085 [R_MIPS_TLS_DTPREL_HI16, R_MIPS_TLS_DTPREL_LO16]: Likewise.
1086 [R_MIPS_TLS_GOTTPREL, R_MIPS_TLS_TPREL32]: Likewise.
1087 [R_MIPS_TLS_TPREL_HI16, R_MIPS_TLS_TPREL_LO16]: Likewise.
1088
1089 2010-07-23 Naveen.H.S <naveen.S@kpitcummins.com>
1090 Ina Pandit <ina.pandit@kpitcummins.com>
1091
1092 * archures.c (DESCRIPTION): Define bfd_mach_v850e2 and
1093 bfd_mach_v850e2v3.
1094 * reloc.c (bfd_architecture): Define bfd_mach_v850e2 and
1095 bfd_mach_v850e2v3.
1096 (BFD_RELOC_V850_16_PCREL, BFD_RELOC_V850_17_PCREL,
1097 BFD_RELOC_V850_22_PCREL, BFD_RELOC_V850_23,
1098 BFD_RELOC_V850_32_PCREL, BFD_RELOC_V850_32_ABS,
1099 BFD_RELOC_V850_16_SPLIT_OFFSET, BFD_RELOC_V850_16_S1,
1100 BFD_RELOC_V850_LO16_SPLIT_OFFSET, BFD_RELOC_V850_SDA_15_16_OFFSET,
1101 BFD_RELOC_V850_ZDA_16_16_OFFSET, BFD_RELOC_V850_CALLT_15_16_OFFSET,
1102 BFD_RELOC_V850_32_GOTPCREL, BFD_RELOC_V850_16_GOT,
1103 BFD_RELOC_V850_32_GOT, BFD_RELOC_V850_22_PLT_PCREL,
1104 BFD_RELOC_V850_32_PLT_PCREL, BFD_RELOC_V850_COPY,
1105 BFD_RELOC_V850_GLOB_DAT, BFD_RELOC_V850_JMP_SLOT,
1106 BFD_RELOC_V850_RELATIVE, BFD_RELOC_V850_16_GOTOFF,
1107 BFD_RELOC_V850_32_GOTOFF, BFD_RELOC_V850_CODE,
1108 BFD_RELOC_V850_DATA): New relocations for V850 target.
1109 * config.bfd: Match all v850 targets.
1110 * cpu-v850.c (arch_info_struct): Define V850e2 and V850e2v3.
1111 * elf32-v850.c (v850_elf_check_relocs): Check the newly added
1112 relocations.
1113 (v850_elf_perform_relocation ): Update the newly added
1114 relocations.
1115 (v850_elf_howto_t): Update the specifications of added
1116 relocations.
1117 (v850_elf_reloc_map): Update the relocation mappings.
1118 (v850_elf_final_link_relocate): Maps added relocation into the
1119 appropriate howto structure.
1120 (v850_elf_object_p): Add support for V850E2 and V850E2V3.
1121 (v850_elf_final_write_processing): Likewise.
1122 (v850_elf_merge_private_bfd_data): Likewise.
1123 (v850_elf_print_private_bfd_data): Likewise.
1124 * libbfd.h: Regenerate.
1125 * bfd-in2.h: Regenerate.
1126
1127 2010-07-23 Alan Modra <amodra@gmail.com>
1128
1129 * archive.c (_bfd_archive_bsd44_construct_extended_name_table):
1130 Correct format specifier.
1131
1132 2010-07-22 Alan Modra <amodra@gmail.com>
1133
1134 * ecoff.c: Don't include aout/ranlib.h.
1135 (_bfd_ecoff_slurp_armap): Use correct struct for ardata->symdefs.
1136 (_bfd_ecoff_write_armap): Output ar_date and ar_size using
1137 _bfd_ar_spacepad.
1138
1139 2010-07-22 Alan Modra <amodra@gmail.com>
1140
1141 * aoutx.h (some_aout_object_p): Don't set EXEC_P for files with
1142 relocs.
1143
1144 2010-07-20 Alan Modra <amodra@gmail.com>
1145
1146 * elf.c (assign_file_positions_for_load_sections): Check that
1147 zero size sections are allocated in segments too.
1148 (assign_file_positions_for_non_load_sections): Warn if zero
1149 size alloc sections are found here.
1150 (copy_elf_program_header): Don't drop zero size sections from
1151 segment map.
1152 (copy_private_bfd_data): Check for changes in zero size sections.
1153
1154 2010-07-17 Alan Modra <amodra@gmail.com>
1155
1156 * elf.c (_bfd_elf_map_sections_to_segments): Force new segment
1157 for sections with overlapping LMAs.
1158 (assign_file_positions_for_load_sections): Catch overlap for
1159 sections that wrap around the address space. Replace a
1160 warning that duplicates ld's --check-sections error with a
1161 warning that lma has been adjusted for overlapping sections.
1162
1163 2010-07-14 Cary Coutant <ccoutant@google.com>
1164
1165 PR ld/11817
1166 * dwarf2.c (read_section): Revert patch for compressed debug sections.
1167 (find_line): Likewise.
1168 (read_and_uncompress_section): Remove.
1169
1170 2010-07-13 H.J. Lu <hongjiu.lu@intel.com>
1171
1172 PR ld/11812
1173 * elf32-i386.c (elf_i386_size_dynamic_sections): Don't
1174 allocate .got.plt section if there are no GOT nor PLT
1175 entries.
1176 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
1177
1178 2010-07-13 H.J. Lu <hongjiu.lu@intel.com>
1179
1180 PR ld/11791
1181 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Support
1182 garbage collection against STT_GNU_IFUNC symbols.
1183
1184 * elf32-i386.c (elf_i386_get_local_sym_hash): Don't set
1185 elf.plt.offset/elf.got.offset to -1.
1186 (elf_i386_tls_transition): Skip TLS transition for functions.
1187 (elf_i386_gc_sweep_hook): Support STT_GNU_IFUNC symbols.
1188
1189 * elf64-x86-64.c (elf64_x86_64_get_local_sym_hash): Don't set
1190 elf.plt.offset/elf.got.offset to -1.
1191 (elf64_x86_64_tls_transition): Skip TLS transition for functions.
1192 (elf64_x86_64_gc_sweep_hook): Support STT_GNU_IFUNC symbols.
1193
1194 2010-07-12 H.J. Lu <hongjiu.lu@intel.com>
1195
1196 * elf32-i386.c (elf_i386_check_relocs): Re-indent.
1197 (elf_i386_relocate_section): Likewise.
1198
1199 2010-07-06 H.J. Lu <hongjiu.lu@intel.com>
1200
1201 * dwarf2.c (add_line_info): Initialize prev_line.
1202
1203 2010-07-06 Alan Modra <amodra@gmail.com>
1204
1205 * elf32-ppc.c (ppc_elf_relax_section): Insert branch around
1206 trampolines only for .init and .fini sections.
1207
1208 2010-07-05 Alan Modra <amodra@gmail.com>
1209
1210 * elf32-ppc.c: Formatting.
1211 (ppc_elf_finish_dynamic_sections): Don't make plt_entry var static.
1212
1213 2010-07-03 Cary Coutant <ccoutant@google.com>
1214
1215 * compress.c (bfd_uncompress_section_contents): Add ATTRIBUTE_UNUSED.
1216 * dwarf2.c (read_and_uncompress_section): New function.
1217 (read_section): Call it.
1218 (find_line): Likewise.
1219
1220 2010-07-01 Alan Modra <amodra@gmail.com>
1221
1222 * elf64-ppc.c (ppc64_elf_edit_toc): Use SYMBOL_CALLS_LOCAL rather
1223 than SYMBOL_REFERENCES_LOCAL.
1224 (ppc64_elf_relocate_section): Likewise.
1225
1226 2010-07-01 Alan Modra <amodra@gmail.com>
1227
1228 * elf64-ppc.c (ppc64_elf_edit_toc): Keep toc entries for ifuncs.
1229
1230 2010-06-29 Alan Modra <amodra@gmail.com>
1231
1232 * cpu-maxq.c: Delete file.
1233 * coff-maxq.c: Delete file.
1234 * Makefile.am: Remove references to maxq.
1235 * archures.c: Likewise.
1236 * coffcode.h: Likewise.
1237 * configure.in: Likewise.
1238 * targets.c: Likewise.
1239 * config.bfd: Move maxq from obsolete to removed.
1240 * Makefile.in: Regenerate.
1241 * bfd-in2.h: Regenerate.
1242 * configure: Regenerate.
1243 * libbfd.h: Regenerate.
1244 * po/SRC-POTFILES.in: Regenerate.
1245
1246 2010-06-28 Alan Modra <amodra@gmail.com>
1247
1248 * compress.c (bfd_uncompress_section_contents): Use ATTRIBUTE_UNUSED
1249 to silence gcc warning.
1250
1251 2010-06-27 Alan Modra <amodra@gmail.com>
1252
1253 * elf64-ppc.c (get_tls_mask): Don't segfault on NULL elf_section_data.
1254 (group_sections): Likewise.
1255
1256 2010-06-27 Alan Modra <amodra@gmail.com>
1257
1258 * bout.c (aligncode): Delete set but unused variables.
1259 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
1260 * coff-ppc.c (ppc_record_toc_entry): Likewise.
1261 (coff_ppc_relocate_section): Likewise.
1262 * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Likewise.
1263 * elf-m10200.c (mn10200_elf_relax_delete_bytes): Likewise.
1264 * elf-m10300.c (mn10300_elf_final_link_relocate): Likewise.
1265 (mn10300_elf_relax_section): Likewise.
1266 * elf32-arm.c (arm_build_one_stub, arm_size_one_stub): Likewise.
1267 (record_vfp11_erratum_veneer): Likewise.
1268 (bfd_elf32_arm_vfp11_erratum_scan): Likewise.
1269 (elf32_arm_final_link_relocate): Likewise.
1270 (elf32_arm_check_relocs, arm_map_one_stub): Likewise.
1271 * elf32-avr.c (elf32_avr_relax_delete_bytes): Likewise.
1272 (elf32_avr_relax_section): Likewise.
1273 (avr_mark_stub_not_to_be_necessary): Likewise.
1274 * elf32-bfin.c (_bfin_create_got_section): Likewise.
1275 * elf32-cr16.c (cr16_elf_final_link_relocate): Likewise.
1276 (elf32_cr16_relax_delete_bytes): Likewise.
1277 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Likewise.
1278 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
1279 * elf32-crx.c (elf32_crx_relax_delete_bytes): Likewise.
1280 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1281 (elf32_h8_relax_delete_bytes): Likewise.
1282 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
1283 * elf32-i370.c (i370_elf_check_relocs): Likewise.
1284 (elf_relocate_section): Likewise.
1285 * elf32-ip2k.c (adjust_all_relocations): Likewise.
1286 (ip2k_elf_relax_section): Likewise.
1287 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1288 (lm32_elf_check_relocs): Likewise.
1289 (lm32_elf_finish_dynamic_sections): Likewise.
1290 (lm32_elf_finish_dynamic_symbol): Likewise.
1291 * elf32-m32c.c (m32c_offset_for_reloc): Likewise.
1292 (m32c_elf_relax_delete_bytes): Likewise.
1293 * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
1294 (m32r_elf_finish_dynamic_sections): Likewise.
1295 (m32r_elf_check_relocs, m32r_elf_fake_sections): Likewise.
1296 * elf32-m68hc11.c (m68hc11_elf_relax_section): Likewise.
1297 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1298 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
1299 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
1300 (microblaze_elf_check_relocs): Likewise.
1301 (microblaze_elf_finish_dynamic_symbol): Likewise.
1302 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
1303 * elf32-ppc.c (ppc_elf_tls_optimize): Likewise.
1304 * elf32-rx.c (rx_elf_relocate_section): Likewise.
1305 (elf32_rx_relax_delete_bytes, rx_offset_for_reloc): Likewise.
1306 (elf32_rx_relax_section): Likewise.
1307 * elf32-score.c (score_elf_got_offset_from_index): Likewise.
1308 (score_elf_final_link_relocate): Likewise.
1309 (s3_bfd_score_elf_relocate_section): Likewise.
1310 * elf32-score7.c (score_elf_got_offset_from_index): Likewise.
1311 (s7_bfd_score_elf_relocate_section): Likewise.
1312 * elf32-sh.c (sh_elf_check_relocs): Likewise.
1313 * elf32-spu.c (spu_elf_relocate_section): Likewise.
1314 * elf32-v850.c (v850_elf_check_relocs): Likewise.
1315 (find_remembered_hi16s_reloc): Likewise.
1316 * elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise.
1317 (elf_vax_relocate_section): Likewise.
1318 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
1319 * elf32-xtensa.c (xlate_offset_with_removed_text): Likewise.
1320 (move_literal): Likewise.
1321 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1322 (elf64_hppa_check_relocs): Likewise.
1323 (elf64_hppa_finish_dynamic_symbol): Likewise.
1324 (elf64_hppa_relocate_section): Likewise.
1325 * elf64-mmix.c (mmix_elf_reloc, mmix_elf_relax_section): Likewise.
1326 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
1327 (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Likewise.
1328 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1329 (elfNN_vms_section_from_shdr): Likewise.
1330 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
1331 (_bfd_sparc_elf_relocate_section): Likewise.
1332 * hp300hpux.c (slurp_symbol_table): Likewise.
1333 * i386lynx.c (swap_std_reloc_out, swap_std_reloc_in): Likewise.
1334 * mach-o.c (bfd_mach_o_write_thread): Likewise.
1335 * mmo.c (mmo_scan, mmo_write_symbols_and_terminator): Likewise.
1336 * nlm32-sparc.c (nlm_sparc_read_reloc): Likewise.
1337 * pdp11.c (pdp11_aout_link_input_section): Likewise.
1338 (aout_link_input_section, aout_link_input_bfd): Likewise.
1339 * pe-mips.c (mips_swap_reloc_out): Likewise.
1340 (coff_pe_mips_relocate_section): Likewise.
1341 * som.c (som_bfd_ar_write_symbol_stuff): Likewise.
1342 * vms-alpha.c (_bfd_vms_slurp_egsd): Likewise.
1343 * xsym.c (bfd_sym_fetch_type_information_table_ent): Likewise.
1344
1345 * coff-i860.c (i860_reloc_processing): Avoid set but unused warning.
1346 * coffcode.h (coff_compute_section_file_positions): Likewise.
1347 (coff_slurp_reloc_table): Likewise.
1348 * cpu-arm.c (arm_check_note): Likewise.
1349 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Likewise.
1350 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1351 * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise.
1352 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1353 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
1354 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
1355 * elf32-sh64.c (_bfd_sh_align_load_span): Likewise.
1356 * ieee.c (parse_expression): Likewise.
1357 (ieee_slurp_external_symbols, drop_int): Likewise.
1358 * peXXigen.c (pe_print_pdata): Likewise.
1359 * versados.c (process_esd): Likewise.
1360
1361 2010-06-25 Tristan Gingold <gingold@adacore.com>
1362
1363 * vms-alpha.c (_bfd_vms_write_egsd): Check absolute section with
1364 its flags. Create an absolute section if needed.
1365
1366 2010-06-25 Tristan Gingold <gingold@adacore.com>
1367
1368 * vms-alpha.c (_bfd_vms_write_egsd): Set target_index field of
1369 sections. Mark .vmsdebug section as SEC_DEBUGGING. Do not create
1370 dummy psect anymore. Adjust.
1371 (_bfd_vms_write_eeom): Adjust (use target_index instead of index)
1372 (_bfd_vms_write_etir): Ditto.
1373 (start_etir_or_etbt_record): Test for SEC_DEBUGGING instead of
1374 section name. Adjust.
1375
1376 2010-06-25 Tristan Gingold <gingold@adacore.com>
1377
1378 * vms-alpha.c (alpha_vms_write_exec): Set linktime field.
1379
1380 2010-06-25 Alan Modra <amodra@gmail.com>
1381
1382 * elf64-ppc.c (toc_skip_enum): Define.
1383 (ppc64_elf_edit_toc): Use two low bits of skip array as markers.
1384 Optimize largetoc sequences.
1385 (adjust_toc_syms): Update for skip array change.
1386 (ppc64_elf_relocate_section): Handle R_PPC64_LO_DS_OPT.
1387
1388 2010-06-25 Alan Modra <amodra@gmail.com>
1389
1390 * elf64-ppc.c (is_static_defined): New function.
1391 (get_tls_mask, ppc_type_of_stub): Use it here.
1392 (ppc64_elf_edit_opd): Ensure we only attempt to edit ppc64 input.
1393 (ppc64_elf_tls_setup): Typo fix.
1394 (adjust_toc_syms): Correctly handle symbols defined past the end
1395 of the toc. Move syms on removed entries to next entry rather
1396 than to start of toc.
1397 (ppc64_elf_edit_toc): Likewise. Ensure we only attempt to
1398 edit ppc64 input. Allocate one extra word in skip array.
1399 Honour info->keep_memory when reading relocs if we can.
1400 Adjust toc relocs after adjusting symbols.
1401
1402 2010-06-23 Nathan Sidwell <nathan@codesourcery.com>
1403
1404 * archive64.c (bfd_elf64_archive_write_armap): Fix buffer overrun
1405 when scaning map.
1406
1407 2010-06-17 Tristan Gingold <gingold@adacore.com>
1408
1409 * Makefile.am (BFD32_BACKENDS_CFILES): Move vms-alpha.c to ...
1410 (BFD64_BACKENDS_CFILES): ... here.
1411 (BFD32_BACKENDS): Move vms-alpha.lo to ...
1412 (BFD64_BACKENDS): ... here.
1413 * Makefile.in: Regenerate.
1414
1415 2010-06-15 Joseph Myers <joseph@codesourcery.com>
1416
1417 * elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Decrease to 2.
1418 * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type,
1419 elf32_tic6x_merge_arch_attributes, elf32_tic6x_merge_attributes,
1420 elf32_tic6x_merge_private_bfd_data): New.
1421 (bfd_elf32_bfd_merge_private_bfd_data,
1422 elf_backend_obj_attrs_arg_type, elf_backend_obj_attrs_section,
1423 elf_backend_obj_attrs_section_type, elf_backend_obj_attrs_vendor):
1424 Define.
1425 * elf32-tic6x.h (elf32_tic6x_merge_arch_attributes): Declare.
1426
1427 2010-06-15 Joseph Myers <joseph@codesourcery.com>
1428
1429 * elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Define.
1430 (struct elf_backend_data): Update comment on obj_attrs_order.
1431 * elf-attrs.c (vendor_obj_attr_size, vendor_set_obj_attr_contents,
1432 _bfd_elf_copy_obj_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
1433 instead of hardcoded 4.
1434 * elf32-arm.c (elf32_arm_obj_attrs_order): Use
1435 LEAST_KNOWN_OBJ_ATTRIBUTE and LEAST_KNOWN_OBJ_ATTRIBUTE + 1
1436 instead of hardcoded 4 and 5.
1437 (elf32_arm_merge_eabi_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
1438 instead of hardcoded 4.
1439
1440 2010-06-14 Kevin Buettner <kevinb@redhat.com>
1441
1442 * elf32-h8300.c (elf_symbol_leading_char): Define.
1443
1444 2010-06-11 Jan Kratochvil <jan.kratochvil@redhat.com>
1445
1446 * vms-alpha.c (_bfd_vms_write_egsd): Make sname const.
1447
1448 2010-06-11 Tristan Gingold <gingold@adacore.com>
1449
1450 * vms-alpha.c (_bfd_vms_slurp_egsd): Always set vma of absolute
1451 sections to 0.
1452
1453 2010-06-11 Tristan Gingold <gingold@adacore.com>
1454
1455 * vms-alpha.c (evax_bfd_print_etir): Handle ETIR__C_STO_GBL_LW.
1456
1457 2010-06-11 Tristan Gingold <gingold@adacore.com>
1458
1459 * vms-misc.c (_bfd_vms_output_counted): Make VALUE argument const.
1460 Adjust cast.
1461 (_bfd_vms_output_dump): Make DATA argument const, adjust cast.
1462 * vms.h (_bfd_vms_output_counted, _bfd_vms_output_dump): Adjust.
1463 * vms-alpha.c (evax_section_flags): Make it const.
1464 (vms_secflag_by_name): Remove unused ABFD argument.
1465 Make SECTION_FLAGS and NAME arguments const. Clarify comment.
1466 (vms_esecflag_by_name): Make SECTION_FLAGS and NAME arguments const.
1467 (_bfd_vms_slurp_egsd): Adjust call to vms_secflag_by_name.
1468 (_bfd_vms_write_egsd): Remove useless cast.
1469
1470 2010-06-10 Tristan Gingold <gingold@adacore.com>
1471
1472 * config.bfd: Remove #if/#endif so that som can be compiled on any
1473 host.
1474 * targets.c (_bfd_target_vector): Remove #if/#endif so that som
1475 can be used on any host.
1476
1477 2010-06-10 Tristan Gingold <gingold@adacore.com>
1478
1479 * som.c: Can now be compiled on any host.
1480 Include bfd headers instead of system one.
1481 (som_compute_checksum): Parameter is now a pointer to a
1482 som_external_header structure. Adjust.
1483 (struct section_to_type): Field section is now const.
1484 (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Removed conditional
1485 definition.
1486 (R_LONG_PCREL_MODE, R_N0SEL, R_N1SEL, R_LINETAB): Ditto.
1487 (R_LINETAB_ESC, R_LTP_OVERRIDE, R_COMMENT): Ditto.
1488 (som_swap_clock_in, som_swap_clock_out): New functions.
1489 (som_swap_header_in, som_swap_header_out): Likewise.
1490 (som_swap_space_dictionary_in): Likewise.
1491 (som_swap_space_dictionary_out): Likewise.
1492 (som_swap_subspace_dictionary_in): Likewise.
1493 (som_swap_subspace_dictionary_record_out): Likewise.
1494 (som_swap_aux_id_in, som_swap_aux_id_out): Likewise.
1495 (som_swap_string_auxhdr_out): Likewise.
1496 (som_swap_compilation_unit_out): Likewise.
1497 (som_swap_exec_auxhdr_in): Likewise.
1498 (som_swap_exec_auxhdr_out): Likewise.
1499 (som_swap_lst_header_in): Likewise.
1500 (som_object_setup): Adjust parameter type using bfd types.
1501 (setup_sections): Likewise. Ditto for object file types.
1502 Use intermediate variables for external representation and use the
1503 swap functions to convert.
1504 (som_object_p): Ditto. Remove #ifdef/#endif on always defined
1505 macros.
1506 (som_prep_headers): Likewise.
1507 (som_write_symbol_strings): Likewise.
1508 (som_begin_writing): Likewise.
1509 (som_finish_writing): Likewise.
1510 (som_build_and_write_symbol_table): Likewise.
1511 (bfd_section_from_som_symbol): Likewise.
1512 (som_slurp_symbol_table): Likewise.
1513 (som_bfd_print_private_bfd_data): Likewise.
1514 (bfd_som_attach_aux_hdr): Likewise. Clear the padding.
1515 (bfd_som_attach_compilation_unit): Likewise.
1516 (som_bfd_count_ar_symbols): Likewise.
1517 (som_bfd_fill_in_ar_symbols): Likewise.
1518 (som_slurp_armap): Likewise.
1519 (som_bfd_ar_write_symbol_stuff): Likewise.
1520 (som_write_armap): Likewise. Use _bfd_ar_spacepad instead of
1521 sprintf to write header fields.
1522 * som.h: Include bfd headers instead of system one.
1523 (FILE_HDR_SIZE, AUX_HDR_SIZE): Removed.
1524 (struct somdata): Use bfd structures instead of system ones.
1525 (struct som_section_data_struct): Likewise.
1526 (struct som_subspace_dictionary_record): Removed (now in
1527 include/som/internal.h)
1528
1529 2010-06-10 Tristan Gingold <gingold@adacore.com>
1530
1531 * targets.c (bfd_target_list): Remove hp/ux compiler work-around
1532 as bfd requires an ANSI-C compiler.
1533
1534 2010-06-09 Tristan Gingold <gingold@adacore.com>
1535
1536 * bfdio.c (bfd_bread): Fix the code to prevent reading past the
1537 end of archive members.
1538
1539 2010-06-08 Tristan Gingold <gingold@adacore.com>
1540
1541 * som.c (som_bfd_free_cached_info): Do not free relocations as
1542 they were allocated with bfd_zalloc.
1543
1544 2010-06-08 Tristan Gingold <gingold@adacore.com>
1545
1546 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Increment
1547 for the first block.
1548
1549 2010-06-08 Tristan Gingold <gingold@adacore.com>
1550
1551 * vms-lib.c (_bfd_vms_lib_ia64_mkarchive): New function.
1552 * libbfd-in.h (_bfd_vms_lib_ia64_mkarchive): Declare.
1553 * libbfd.h: Regenerate.
1554 * elfxx-ia64.c (bfd_elfNN_write_archive_contents): Redefine for VMS.
1555 (bfd_elfNN_mkarchive): Ditto.
1556
1557 2010-06-02 Tristan Gingold <gingold@adacore.com>
1558
1559 * vms-alpha.c (alpha_vms_bfd_final_link): Fix 64bit constant.
1560
1561 2010-06-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1562
1563 * configure: Regenerate.
1564
1565 2010-06-01 Tristan Gingold <gingold@adacore.com>
1566
1567 * vms-alpha.c (struct vms_private_data_struct): Add
1568 transfer_address field. Remove unused dst_info field.
1569 (alpha_vms_write_exec): Use transfer_address.
1570 (_bfd_vms_write_egsd): Add a comment about LIB$INITIALIZE.
1571 (alpha_vms_bfd_final_link): Set transfer_address.
1572
1573 2010-05-31 Tristan Gingold <gingold@adacore.com>
1574
1575 * vms-lib.c (credat_lo, credat_hi): New fields.
1576 (vms_read_block): Adjust comments.
1577 (vms_write_block): New function.
1578 (_bfd_vms_lib_archive_p): Decode majorid once. Replace some
1579 hard-coded values with constants. Set credat_lo and credat_hi.
1580 (_bfd_vms_lib_mkarchive): Add argument kind.
1581 Set ver, mhd_size and type according to kind.
1582 (_bfd_vms_lib_alpha_mkarchive): New function.
1583 (struct lib_index): Renamed from struct vms_index
1584 (lib_index_cmp): Renamed from vms_index_cmp. Adjusted.
1585 (get_idxlen): Type of idx argument adjusted. Add is_elfidx
1586 argument and handle it.
1587 (vms_write_index): Adjust argument idx. Handle elf indexes.
1588 (_bfd_vms_lib_build_map): Adjust type of arguments modules and res.
1589 (_bfd_vms_lib_write_archive_contents): Add is_elfidx variable and
1590 use it. Handle elf indexes. Set credat.
1591 * libbfd-in.h (_bfd_vms_lib_mkarchive): Renamed to ...
1592 (_bfd_vms_lib_alpha_mkarchive): ... this.
1593 * libbfd.h: Regenerated.
1594 * vms-alpha.c (vms_alpha_vec): Adjust after previous renaming.
1595
1596 2010-05-28 Sterling Augustine <sterling@tensilica.com>
1597
1598 * elf32-xtensa.c (elf_xtensa_relocate_section): Add a large amount
1599 of code to change the bits in the instructions to match the changes
1600 in the relocations. Declare dest_addr and sym_sec to help.
1601
1602 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
1603
1604 Workaround GCC PR middle-end/4210.
1605 * vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2]
1606 and val[3].
1607
1608 2010-05-27 Tristan Gingold <gingold@adacore.com>
1609
1610 * vms-misc.c: Define __NEW_STARLET. Remove trailing spaces.
1611 (VMS_TIME_FACTOR, VMS_TIME_OFFSET): New macros.
1612 (vms_time_to_time_t): Use them instead of local const.
1613 (vms_time_t_to_vms_time): New function.
1614 (vms_get_time): Likewise.
1615 (vms_raw_get_time): Likewise.
1616 * vms.h (vms_time_t_to_vms_time): New declaration.
1617 (vms_get_time): Likewise.
1618 (vms_raw_get_time): Likewise.
1619
1620 2010-05-26 Tristan Gingold <gingold@adacore.com>
1621
1622 * vms-alpha.c: Update comments.
1623 (alpha_vms_write_exec): Set lnkflags. Write the GST.
1624 (alpha_vms_link_output_symbol): New function.
1625 (alpha_vms_bfd_final_link): Generate the VMS symbol table.
1626 Set dst_section private field.
1627 (alpha_vms_bfd_final_link): Remove code that set dst_section.
1628
1629 2010-05-26 Tristan Gingold <gingold@adacore.com>
1630
1631 * bfdio.c: Declare and define _bfd_memory_iovec.
1632 (bfd_bread): Move code for BFD_IN_MEMORY...
1633 (bfd_bwrite): ... Ditto ...
1634 (bfd_tell): ... Ditto ...
1635 (bfd_flush): ... Ditto ...
1636 (bfd_stat): ... Ditto ...
1637 (bfd_seek): ... Ditto ...
1638 (bfd_get_size): ... Ditto ...
1639 (bfd_mmap): ... Ditto ...
1640 (memory_bread): ... to these new functions.
1641 (memory_bwrite): Ditto.
1642 (memory_btell): Ditto.
1643 (memory_bseek): Ditto.
1644 (memory_bflush): Ditto.
1645 (memory_bstat): Ditto.
1646 (memory_bmmap): Ditto.
1647 (memory_bclose): New function.
1648 * peicode.h (pe_ILF_build_a_bfd): Use BFD_IN_MEMORY.
1649 * xcofflink.c (bfd_xcoff_link_generate_rtinit): Ditto.
1650 * opncls.c (bfd_close): Do not handle BFD_IN_MEMORY case.
1651 (bfd_make_writable): Use _bfd_memory_iovec.
1652 * elfcode.h (bfd_from_remote_memory): Use _bfd_memory_iovec.
1653 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Use
1654 _bfd_memory_iovec.
1655 (alpha_ecoff_openr_next_archived_file): Use proxy_origin
1656 instead of origin.
1657 * libbfd.h: Regenerate.
1658
1659 2010-05-25 Daniel Jacobowitz <dan@codesourcery.com>
1660 Joseph Myers <joseph@codesourcery.com>
1661 Andrew Stubbs <ams@codesourcery.com>
1662
1663 * config.bfd (sh-*-uclinux* | sh[12]-*-uclinux*): Add
1664 bfd_elf32_shl_vec, and FDPIC vectors to targ_selvecs.
1665 * configure.in: Handle FDPIC vectors.
1666 * elf32-sh-relocs.h: Add FDPIC and movi20 relocations.
1667 * elf32-sh.c (DEFAULT_STACK_SIZE): Define.
1668 (SYMBOL_FUNCDESC_LOCAL): Define. Use it instead of
1669 SYMBOL_REFERENCES_LOCAL for function descriptors.
1670 (fdpic_object_p): New.
1671 (sh_reloc_map): Add FDPIC and movi20 relocations.
1672 (sh_elf_info_to_howto, sh_elf_relocate_section): Handle new invalid
1673 range.
1674 (struct elf_sh_plt_info): Add got20 and short_plt. Update all
1675 definitions.
1676 (FDPIC_PLT_ENTRY_SIZE, FDPIC_PLT_LAZY_OFFSET): Define.
1677 (fdpic_sh_plt_entry_be, fdpic_sh_plt_entry_le, fdpic_sh_plts): New.
1678 (FDPIC_SH2A_PLT_ENTRY_SIZE, FDPIC_SH2A_PLT_LAZY_OFFSET): Define.
1679 (fdpic_sh2a_plt_entry_be, fdpic_sh2a_plt_entry_le)
1680 (fdpic_sh2a_short_plt_be, fdpic_sh2a_short_plt_le, fdpic_sh2a_plts):
1681 New.
1682 (get_plt_info): Handle FDPIC.
1683 (MAX_SHORT_PLT): Define.
1684 (get_plt_index, get_plt_offset): Handle short_plt.
1685 (union gotref): New.
1686 (struct elf_sh_link_hash_entry): Add funcdesc, rename tls_type to
1687 got_type and adjust all uses. Add GOT_FUNCDESC.
1688 (struct sh_elf_obj_tdata): Add local_funcdesc. Rename
1689 local_got_tls_type to local_got_type.
1690 (sh_elf_local_got_type): Renamed from sh_elf_local_got_tls_type. All
1691 users changed.
1692 (sh_elf_local_funcdesc): Define.
1693 (struct elf_sh_link_hash_table): Add sfuncdesc, srelfuncdesc, fdpic_p,
1694 and srofixup.
1695 (sh_elf_link_hash_newfunc): Initialize new fields.
1696 (sh_elf_link_hash_table_create): Set fdpic_p.
1697 (sh_elf_omit_section_dynsym): New.
1698 (create_got_section): Create .got.funcdesc, .rela.got.funcdesc
1699 and .rofixup.
1700 (allocate_dynrelocs): Allocate local function descriptors and space
1701 for R_SH_FUNCDESC-related relocations, and for rofixups.
1702 Handle GOT_FUNCDESC. Create fixups. Handle GOT entries which
1703 require function descriptors.
1704 (sh_elf_always_size_sections): Handle PT_GNU_STACK and __stacksize.
1705 (sh_elf_modify_program_headers): New.
1706 (sh_elf_size_dynamic_sections): Allocate function descriptors for
1707 local symbols. Allocate .got.funcdesc contents. Allocate rofixups.
1708 Handle local GOT entries of type GOT_FUNCDESC. Create fixups for
1709 local GOT entries. Ensure that FDPIC libraries always have a PLTGOT
1710 entry in the .dynamic section.
1711 (sh_elf_add_dyn_reloc, sh_elf_got_offset, sh_elf_initialize_funcdesc)
1712 (sh_elf_add_rofixup, sh_elf_osec_to_segment)
1713 (sh_elf_osec_readonly_p, install_movi20_field): New functions.
1714 (sh_elf_relocate_section): Handle new relocations, R_SH_FUNCDESC,
1715 R_SH_GOTFUNCDESC and R_SH_GOTOFFFUNCDESC. Use sh_elf_got_offset
1716 and .got.plt throughout to find _GLOBAL_OFFSET_TABLE_. Add rofixup
1717 read-only section warnings. Handle undefined weak symbols. Generate
1718 fixups for R_SH_DIR32 and GOT entries. Check for cross-segment
1719 relocations and clear EF_SH_PIC. Handle 20-bit relocations.
1720 Always generate R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
1721 (sh_elf_gc_sweep_hook): Handle R_SH_FUNCDESC, R_SH_GOTOFF20,
1722 R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20, and R_SH_GOTOFFFUNCDESC.
1723 Handle 20-bit relocations.
1724 (sh_elf_copy_indirect_symbol): Copy function descriptor reference
1725 counts.
1726 (sh_elf_check_relocs): Handle new relocations. Make symbols
1727 dynamic for FDPIC relocs. Account for rofixups. Error for FDPIC
1728 symbol mismatches. Allocate a GOT for R_SH_DIR32. Allocate fixups
1729 for R_SH_DIR32.
1730 (sh_elf_copy_private_data): Copy PT_GNU_STACK size.
1731 (sh_elf_merge_private_data): Copy initial flags. Do not clobber
1732 non-mach flags. Set EF_SH_PIC for FDPIC. Reject FDPIC mismatches.
1733 (sh_elf_finish_dynamic_symbol): Do not handle got_funcdesc entries
1734 here. Rename sgot to sgotplt and srel to srelplt. Handle short_plt,
1735 FDPIC descriptors, and got20. Create R_SH_FUNCDESC_VALUE for FDPIC.
1736 Use install_movi20_field. Rename srel to srelgot. Always generate
1737 R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
1738 (sh_elf_finish_dynamic_sections): Fill in the GOT pointer in rofixup.
1739 Do not fill in reserved GOT entries for FDPIC. Correct DT_PLTGOT.
1740 Rename sgot to sgotplt. Assert that the right number of rofixups
1741 and dynamic relocations were allocated.
1742 (sh_elf_use_relative_eh_frame, sh_elf_encode_eh_address): New.
1743 (elf_backend_omit_section_dynsym): Use sh_elf_omit_section_dynsym.
1744 (elf_backend_can_make_relative_eh_frame)
1745 (elf_backend_can_make_lsda_relative_eh_frame)
1746 (elf_backend_encode_eh_address): Define.
1747 (TARGET_BIG_SYM, TARGET_BIG_NAME, TARGET_LITTLE_SYM)
1748 (TARGET_LITTLE_NAME, elf_backend_modify_program_headers, elf32_bed):
1749 Redefine for FDPIC vector.
1750 * reloc.c: Add SH FDPIC and movi20 relocations.
1751 * targets.c (_bfd_target_vector): Add FDPIC vectors.
1752 * configure, bfd-in2.h, libbfd.h: Regenerated.
1753
1754 2010-05-25 Jay Krell <jay.krell@cornell.edu>
1755
1756 PR ld/11624
1757 * archive.c (_bfd_calloc_wrapper): New function.
1758 (_bfd_add_bfd_to_archive_cache): Use it.
1759
1760 * configure.in: Add alpha*-*-*vms* to list of natives.
1761 * configure: Regenerate.
1762
1763 * vms-misc.c: Define globalref if necessary.
1764 (vms_convert_to_var_unix_filename): Rename to
1765 _bfd_vms_convert_to_var_unix_filename and export.
1766 * vms.h: Add prototype for _bfd_vms_convert_to_var_unix_filename.
1767 * vms-alpha.c (vms_close_and_cleanup): Update invocation of
1768 vms_convert_to_var_unix_filename.
1769
1770 2010-05-24 Tristan Gingold <gingold@adacore.com>
1771
1772 * vms-alpha.c (add_symbol_entry): New function extrated from ...
1773 (add_symbol): ... adjusted.
1774
1775 2010-05-24 Tristan Gingold <gingold@adacore.com>
1776
1777 * vms-alpha.c (_bfd_vms_slurp_egsd): Fix indentation.
1778 (alpha_vms_write_exec): Add a comment.
1779 (_bfd_vms_write_egsd): Ditto.
1780 (alpha_vms_convert_symbol): Remove a blank line.
1781
1782 2010-05-21 Tristan Gingold <gingold@adacore.com>
1783
1784 * vms-alpha.c (_bfd_vms_slurp_eihs): Do not create a bfd section
1785 for the GST.
1786
1787 2010-05-21 Tristan Gingold <gingold@adacore.com>
1788
1789 * vms-alpha.c (_bfd_vms_slurp_eisd): Set SEC_HAS_CONTENTS and
1790 SEC_LOAD if isect has data.
1791 (vms_get_symbol_info): Refine the condition for 'T' type.
1792
1793 2010-05-18 Tristan Gingold <gingold@adacore.com>
1794
1795 * vms-alpha.c (_bfd_vms_write_emh): New function.
1796 (_bfd_vms_write_lmn): New function.
1797 (_bfd_vms_write_eeom): Moved.
1798 (hash_string): Likewise.
1799 (_bfd_vms_length_hash_symbol): Likewise.
1800 (_bfd_vms_write_ehdr): Code moved to _bfd_vms_write_emh
1801 and _bfd_vms_write_lmn, and call these functions.
1802
1803 2010-05-18 Tristan Gingold <gingold@adacore.com>
1804
1805 * vms-alpha.c (evax_bfd_print_dst): Handle INCR_LINUM_L.
1806 Add details in the messages.
1807 (evax_bfd_print_image): Change message.
1808
1809 2010-05-18 H.J. Lu <hongjiu.lu@intel.com>
1810
1811 PR gas/11600
1812 * elf.c (_bfd_elf_make_section_from_shdr): Handle SHF_EXCLUDE
1813 (elf_fake_sections): Likewise.
1814
1815 * elf32-i370.c (i370_elf_section_from_shdr): Don't handle
1816 SHF_EXCLUDE here.
1817 * elf32-ppc.c (ppc_elf_fake_sections): Likewise.
1818
1819 2010-05-17 Tristan Gingold <gingold@adacore.com>
1820
1821 * vms-alpha.c: Include esgps.h and eidc.h.
1822 (_bfd_vms_slurp_egsd): Ignore SPSC and IDC sub-records.
1823 (evax_bfd_print_egsd_flags): New function, extracted from ...
1824 (evax_bfd_print_egsd): ..., calls evax_bfd_print_egsd_flags. Handles
1825 EGSD__C_SPSC and EGSD__C_IDC.
1826
1827 2010-05-14 Tristan Gingold <gingold@adacore.com>
1828
1829 * vms-alpha.c (alpha_vms_object_p): Accept header size of 0.
1830 (_bfd_vms_get_object_record): Handle align byte only in the
1831 foreign case.
1832
1833 2010-05-14 Tristan Gingold <gingold@adacore.com>
1834
1835 * vms-lib.c (_bfd_vms_lib_ia64_archive_p): New function.
1836 * libbfd-in.h (_bfd_vms_lib_ia64_archive_p): Add prototype.
1837 * libbfd.h: Regenerate.
1838 * configure.in (havevecs): Define HAVE_all_vecs when
1839 --enable-targets=all is set. Use AC_SUBST on it.
1840 (tdefaults): Do not add havevecs.
1841 (bfd_elf64_ia64_vms_vec): Add vms-lib.lo and vms-misc.lo
1842 * configure: Regenerate.
1843 * Makefile.am (HAVEVECS): New variable.
1844 (INCLUDES): Add HAVEVECS.
1845 * Makefile.in: Regenerate.
1846 * elfxx-ia64.c (INCLUDE_IA64_VMS): New macro, defined if vms
1847 target is selected. Add #ifdef/#endif around vms specific code.
1848 (bfd_elfNN_archive_p, bfd_elfNN_archive_slurp_armap,
1849 bfd_elfNN_archive_slurp_extended_name_table,
1850 bfd_elfNN_archive_construct_extended_name_table,
1851 bfd_elfNN_archive_truncate_arname,
1852 bfd_elfNN_archive_write_armap,
1853 bfd_elfNN_archive_read_ar_hdr,
1854 bfd_elfNN_archive_write_ar_hdr,
1855 bfd_elfNN_archive_openr_next_archived_file,
1856 bfd_elfNN_archive_get_elt_at_index,
1857 bfd_elfNN_archive_generic_stat_arch_elt,
1858 bfd_elfNN_archive_update_armap_timestamp): Define to use vms archives.
1859
1860 2010-05-11 Jie Zhang <jie@codesourcery.com>
1861
1862 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Merge
1863 Tag_ABI_HardFP_use correctly.
1864
1865 2010-05-11 Alan Modra <amodra@gmail.com>
1866
1867 * coffcode.h (coff_write_object_contents): Enclose all occurrences
1868 of hasdebug and is_reloc_section in #ifdef COFF_IMAGE_WITH_PE.
1869
1870 2010-05-07 Daniel Jacobowitz <dan@codesourcery.com>
1871
1872 * elf32-arm.c (struct a8_erratum_reloc): Add hash member. Move
1873 sym_name to improve packing.
1874 (cortex_a8_erratum_scan): Check for PLT entries.
1875 (elf32_arm_size_stubs): Save the target symbol for a8 relocs.
1876
1877 2010-05-07 Tristan Gingold <gingold@adacore.com>
1878
1879 * Makefile.in: Regenerate with automake 1.11.1.
1880 * aclocal.m4: Ditto.
1881
1882 2010-05-05 Nick Clifton <nickc@redhat.com>
1883
1884 * po/es.po: Updated Spanish translation.
1885
1886 2010-05-03 Tristan Gingold <gingold@adacore.com>
1887
1888 * vms-lib.c (vms_lib_bopen): Fix the size threshold to read
1889 selective_search flag.
1890 Add comments.
1891 * vms-alpha.c (alpha_vms_bfd_final_link): Create the DMT section
1892 before output_has_begun is set.
1893
1894 2010-05-03 Tristan Gingold <gingold@adacore.com>
1895
1896 * vms-alpha.c: Add comments.
1897 (struct vms_private_data_struct): Remove image_autoextend field.
1898 (dst_check_allocation): Removed.
1899 (image_write): Remove call to dst_check_allocation.
1900 (vms_slurp_debug): Do not set image_autoextend. Adjust section
1901 size.
1902 (_bfd_vms_slurp_object_records): Remove useless new_type variable.
1903 (alpha_vms_write_exec): Use dst_section to get the dst section.
1904 Write the dmt section.
1905 (evax_bfd_print_image): Also print the dst size in hexa. Fix typo.
1906 (alpha_vms_read_sections_content): Do not set image_autoextend.
1907 (alpha_vms_bfd_final_link): Generate the dst.
1908
1909 2010-05-03 Tristan Gingold <gingold@adacore.com>
1910
1911 * vms-lib.c (_bfd_vms_lib_archive_p): Adjust for a possible empty
1912 next array.
1913 (vms_lib_dcx): Adjust for the above change.
1914
1915 2010-04-30 H.J. Lu <hongjiu.lu@intel.com>
1916
1917 PR ld/11542
1918 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): New.
1919
1920 * elf32-i386.c (elf_i386_relocate_section): Use it.
1921 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1922
1923 2010-04-30 Tristan Gingold <gingold@adacore.com>
1924
1925 * vms-lib.c (vms_read_block): New function.
1926 (vms_traverse_index): Use vms_read_block. Handle long key names.
1927
1928 2010-04-30 Tristan Gingold <gingold@adacore.com>
1929
1930 * vms-lib.c (struct lib_tdata): Field artdata added, fields nbr_syms
1931 and syms removed.
1932 (struct carsym_mem): New structure.
1933 (vms_add_index): New function.
1934 (vms_add_indexes_from_list): New function.
1935 (vms_traverse_index): Parameter carsym changed to carsym_mem.
1936 Code adjusted to handle elfidx.
1937 (vms_lib_read_index): Adjusted for vms_traverse_index changes.
1938 Parameter NBREL is now a pointer.
1939 (_bfd_vms_lib_archive_p): Adjust for above change. Handle ia64
1940 archives.
1941 (_bfd_vms_lib_mkarchive): Adjusted for changes in struct lib_tdata.
1942 (_bfd_vms_lib_find_symbol): Ditto.
1943 (vms_lib_bopen): Fix two typos: return FALSE in case of error,
1944 check MHD id.
1945 (_bfd_vms_lib_get_module): New function.
1946 (_bfd_vms_lib_get_elt_at_index): Rewritten using the above
1947 function.
1948 (_bfd_vms_lib_openr_next_archived_file): Use _bfd_vms_lib_get_module.
1949 (_bfd_vms_lib_generic_stat_arch_elt): Handle ia64 archives.
1950 (vms_write_index): Adjust for structure renamed.
1951 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Adjust for
1952 changes of _bfd_vms_lib_find_symbol.
1953
1954 2010-04-28 Kai Tietz <kai.tietz@onevision.com>
1955
1956 * config.bfd: Correct accidential reverted patch
1957 about vax*-*-*vms*.
1958
1959 2010-04-27 Kai Tietz <kai.tietz@onevision.com>
1960
1961 * pe-x86_64.c (TARGET_UNDERSCORE): Set value dependent
1962 to USE_MINGW64_LEADING_UNDERSCORES.
1963 * pei-x86_64.c (TARGET_UNDERSCORE): Likewise.
1964 * config.bfd: Change underscoring default for x64 mingw
1965 to false.
1966 * coffcode.h (coff_write_relocs): Add check that dereferenced
1967 sym_ptr_ptr isn't NULL.
1968 * config.in (USE_MINGW64_LEADING_UNDERSCORES): New.
1969 * configure: Regenerated.
1970 * configure.in: Add option '--enable-leading-mingw64-underscores'
1971 and define config.in variable USE_MINGW64_LEADING_UNDERSCORES.
1972
1973 2010-04-27 Nick Clifton <nickc@redhat.com>
1974
1975 PR binutils/11512
1976 * coffgen.c (coff_find_nearest_line): Incldue the section address
1977 of function name symbols in address comparisons.
1978
1979 2010-04-27 Nick Clifton <nickc@redhat.com>
1980
1981 * po/fr.po: Updated French translation.
1982
1983 2010-04-23 Alan Modra <amodra@gmail.com>
1984
1985 * elf.c: Replace use of ELF_IS_SECTION_IN_SEGMENT and
1986 ELF_IS_SECTION_IN_SEGMENT_FILE with ELF_SECTION_IN_SEGMENT
1987 throughout file.
1988 (assign_file_positions_for_load_sections): Modify section in
1989 segment warning to ignore overlay vmas.
1990 * elf32-spu.c (spu_elf_object_p): Replace use of
1991 ELF_IS_SECTION_IN_SEGMENT_MEMORY with ELF_SECTION_IN_SEGMENT.
1992
1993 2010-04-22 Nick Clifton <nickc@redhat.com>
1994
1995 * po/bfd.pot: Updated by the Translation project.
1996 * po/vi.po: Updated Vietnamese translation.
1997
1998 2010-04-22 Alan Modra <amodra@gmail.com>
1999
2000 * elf.c (assign_file_positions_for_load_sections): Revert 2008-05-29
2001 change. Tidy. Don't error on sections not allocated in segment.
2002
2003 2010-04-15 Andrew Haley <aph@redhat.com>
2004
2005 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add new flag:
2006 merge_exidx_entries.
2007 * bfd-in2.h: Likewise.
2008 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Likewise. Use it to
2009 control merging of exidx entries.
2010
2011 2010-04-20 Joseph Myers <joseph@codesourcery.com>
2012
2013 * elf32-tic6x.h: New.
2014 * elf-bfd.h (enum elf_target_id): Define TIC6X_ELF_DATA.
2015 * elf32-tic6x.c (struct elf32_tic6x_obj_tdata, elf32_tic6x_tdata,
2016 elf32_tic6x_howto_table_rel, elf32_tic6x_info_to_howto_rel,
2017 elf32_tic6x_set_use_rela_p, elf32_tic6x_mkobject,
2018 elf32_tic6x_new_section_hook, elf32_tic6x_rel_relocation_p,
2019 bfd_elf32_mkobject, bfd_elf32_new_section_hook): New.
2020 (elf32_tic6x_reloc_type_lookup, elf32_tic6x_reloc_name_lookup,
2021 elf32_tic6x_relocate_section): Handle REL relocations.
2022 (elf_info_to_howto_rel): Define to elf32_tic6x_info_to_howto_rel.
2023
2024 2010-04-20 Jakub Jelinek <jakub@redhat.com>
2025
2026 * dwarf2.c (find_abstract_instance_name, scan_unit_for_symbols): Treat
2027 DW_AT_linkage_name the same as DW_AT_MIPS_linkage_name.
2028
2029 2010-04-19 Nick Clifton <nickc@redhat.com>
2030
2031 * archive64.c (bfd_elf64_archive_slurp_armap): Remove unused
2032 arhdrpos variable.
2033 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add unused
2034 attribute to warned variable. Remove unused val, type and type2
2035 variables.
2036
2037 2010-04-16 Andreas Schwab <schwab@redhat.com>
2038
2039 * vms-alpha.c (alpha_vms_link_add_object_symbols): Avoid breaking
2040 strict-aliasing rules.
2041
2042 2010-04-16 Tristan Gingold <gingold@adacore.com>
2043
2044 * vms-alpha.c (_bfd_vms_slurp_eihd): Fix typo.
2045 (_bfd_vms_get_object_record): Always assume there is a pad byte
2046 for alignment.
2047
2048 * vms-lib.c: Add a few comments.
2049
2050 2010-04-15 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
2051
2052 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Support additions to
2053 attributes in v2.08 of the ABI.
2054
2055 2010-04-15 Alan Modra <amodra@gmail.com>
2056
2057 * config.bfd (vax*-*-*vms*): Delete.
2058
2059 2010-04-14 Tristan Gingold <gingold@adacore.com>
2060
2061 * Makefile.am (BFD32_BACKENDS): Remove vms-gsd.lo, vms-hdr.lo,
2062 vms-tir.lo, vms.lo and add vms-alpha.lo
2063 (BFD32_BACKENDS_CFILES): Remove vms-gsd.c, vms-hdr.c,
2064 vms-tir.c, vms.c and add vms-alpha.c
2065 * Makefile.in: Regenerate.
2066 * configure.in (TDEFINES): Adjust file list for vms_alpha_vec.
2067 Remove vms_vax_vec.
2068 * configure: Regenerate.
2069 * targets.c (vms_vax_vec): Remove the declaration.
2070 (_bfd_target_vector): Remove vms_vax_vec.
2071 * vms-alpha.c: New file.
2072 * vms-gsd.c: Removed, rewritten in vms-alpha.c
2073 * vms-hdr.c: Ditto.
2074 * vms-tir.c: Ditto.
2075 * vms.c: Ditto.
2076 * vms-misc.c: Fix indentation and comments. Replace most of
2077 #if VMS_DEBUG/vms_debug with vms_debug2.
2078 (_bfd_vms_hash_newfunc): Moved to vms-alpha.c
2079 (hash_string): Ditto.
2080 (_bfd_vms_length_hash_symbol): Ditto.
2081 (maybe_adjust_record_pointer_for_object): Ditto.
2082 (_bfd_vms_get_object_record): Ditto.
2083 (vms_get_remaining_object_record): Ditto.
2084 (_bfd_vms_push): Ditto.
2085 (_bfd_vms_pop): Ditto.
2086 (_bfd_vms_get_header_values): Removed.
2087 (_bfd_vms_get_first_record): Removed.
2088 (vms_get_remaining_image_record): Removed.
2089 (new_symbol): Removed.
2090 (_bfd_vms_enter_symbol): Removed.
2091 (_bfd_vms_save_sized_string): Use memcpy instead of strncpy.
2092 (_bfd_vms_output_begin): Remove rechead parameter. Replace bfd
2093 parameter with struct vms_rec_wr.
2094 (_bfd_vms_output_push): Removed and replaced by ...
2095 (_bfd_vms_output_begin_subrec): ... new function.
2096 (_bfd_vms_output_alignment): Replace bfd parameter with
2097 struct vms_rec_wr, and adjust.
2098 (_bfd_vms_output_check): Ditto
2099 (_bfd_vms_output_byte): Ditto.
2100 (_bfd_vms_output_short): Ditto.
2101 (_bfd_vms_output_long): Ditto.
2102 (_bfd_vms_output_quad): Ditto.
2103 (_bfd_vms_output_counted): Ditto.
2104 (_bfd_vms_output_dump): Ditto.
2105 (_bfd_vms_output_fill): Ditto.
2106 (_bfd_vms_output_pop): Removed and replaced by ...
2107 (_bfd_vms_output_end_subrec): ... new function.
2108 (_bfd_vms_output_flush): Removed.
2109 (_bfd_vms_output_align): New function.
2110 (_bfd_vms_output_end): Add recwr parameter. Adjust for this new
2111 parameter.
2112 (vms_convert_to_var): New function imported from vms.c
2113 (vms_convert_to_var_1): Ditto.
2114 (vms_convert_to_var_unix_filename): Ditto.
2115 (vms_get_module_name): Ditto.
2116 (get_vms_time_string): Ditto.
2117 (vms_time_to_time_t): Ditto.
2118 (vms_rawtime_to_time_t): Ditto.
2119 * vms.h: All macros for the VMS file format are now in include/vms.
2120 Prototypes for vms.c, vms-gsd.c, vms-misc.c, vms-hdr.c, vms-tir.c
2121 have been removed.
2122 (struct vms_symbol_struct, struct stack_struct): Moved to vms-alpha.c
2123 (struct fileinfo, struct srecinfo, struct lineinfo): Ditto.
2124 (struct funcinfo, struct vms_private_data_struct): Ditto.
2125 (struct vms_section_data_struct): Ditto.
2126 (struct vms_rec_rd, stryct vms_rec_wr): New declarations.
2127 (vms_get_module_name, get_vms_time_string): New declarations.
2128 (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
2129 (_bfd_vms_output_begin_subrec, _bfd_vms_output_end_subrec): Ditto.
2130 (_bfd_vms_save_sized_string, _bfd_vms_save_counted_string): Adjusted.
2131 (_bfd_vms_output_begin, _bfd_vms_output_alignment): Ditto.
2132 (_bfd_vms_output_end,_bfd_vms_output_check): Ditto.
2133 (_bfd_vms_output_byte, _bfd_vms_output_short): Ditto.
2134 (_bfd_vms_output_long, _bfd_vms_output_quad): Ditto.
2135 (_bfd_vms_output_counted, _bfd_vms_output_dump): Ditto.
2136 (_bfd_vms_output_fill): Ditto.
2137 (bfd_vms_set_section_flags): Ditto.
2138
2139 2010-04-14 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
2140
2141 * elflink.c (_bfd_elf_merge_symbol): Tighten up the test for early
2142 exit due to merging the same weak symbol to test that the symbols are
2143 actually weak.
2144
2145 2010-04-13 Alan Modra <amodra@gmail.com>
2146
2147 * elf64-ppc.c (ppc64_elf_relocate_section): Correct NOP location
2148 when optimizing high got_tlsgd/ld insns.
2149
2150 2010-04-10 H.J. Lu <hongjiu.lu@intel.com>
2151
2152 * hosts/x86-64linux.h (HAVE_PRPSINFO32_T): Undefine before
2153 define.
2154 (HAVE_PRSTATUS32_T): Likewise.
2155
2156 2010-04-10 H.J. Lu <hongjiu.lu@intel.com>
2157
2158 PR corefiles/11467
2159 * configure.in (CORE_HEADER): New. Set to hosts/x86-64linux.h
2160 for x86_64-*-linux*.
2161 * config.in: Regenerated.
2162 * configure: Likewise.
2163
2164 * elf.c: Include CORE_HEADER if it is defined.
2165
2166 2010-04-10 H.J. Lu <hongjiu.lu@intel.com>
2167 Jan Kratochvil <jan.kratochvil@redhat.com>
2168
2169 * hosts/x86-64linux.h: New.
2170
2171 2010-04-09 Nick Clifton <nickc@redhat.com>
2172
2173 * aoutx.h (aout_link_input_bfd): Remove unused variable sym_count.
2174 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Remove unused
2175 variables htab and hdr_info and mark info parameter as unused.
2176 * elf.c (prep_headers): Remove unused variable i_phdrp.
2177 (_bfd_elf_write_object_contents): Remove unused variable i_ehdrp.
2178 * elf32-i386.c (elf_i386_relocate_section): Mark variabled warned
2179 as unused.
2180 * peXXigen.c (pe_print_reloc): Remove unused variable datasize.
2181 * verilog.c (verilog_write_section): Remove unused variable
2182 address.
2183
2184 2010-04-07 Alan Modra <amodra@gmail.com>
2185
2186 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wshadow for gcc-4 and above.
2187 * configure: Regenerate.
2188
2189 2010-04-06 H.J. Lu <hongjiu.lu@intel.com>
2190
2191 PR ld/11434
2192 * elf-bfd.h (SYMBOLIC_BIND): Don't bind unique symbol locally.
2193
2194 2010-04-06 Tristan Gingold <gingold@adacore.com>
2195
2196 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Fix idd flags.
2197
2198 2010-04-05 Jakub Jelinek <jakub@redhat.com>
2199
2200 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Handle CIE version 4
2201 provided that it has the expected address size and zero segment
2202 length.
2203
2204 * dwarf2.c (struct line_head): Add maximum_ops_per_insn field.
2205 (struct line_info): Add op_index field, change end_sequence type to
2206 unsigned char.
2207 (new_line_sorts_after): For the same address compare op_index.
2208 (add_line_info): Add op_index argument, store it into the structure.
2209 (decode_line_info): Complain about unknown versions of .debug_line.
2210 Initialize maximum_ops_per_insn. Add op_index state register and
2211 track it.
2212
2213 2010-04-01 Nathan Sidwell <nathan@codesourcery.com>
2214
2215 * elf32-ppc.c (apuinfo_set): New static var.
2216 (ppc_elf_begin_write_processing): Set it here, always create an
2217 APUinfo section if there were any in the inputs.
2218 (ppc_elf_write_section): Check apuinfo_set.
2219 (ppc_elf_final_write_processing): Likewise.
2220
2221 2010-04-01 Tristan Gingold <gingold@adacore.com>
2222
2223 * vms.h: Include time.h. Add prototypes for vms_get_module_name,
2224 vms_time_to_time_t and vms_rawtime_to_time_t.
2225 * vms.c (vms_alpha_vec): Add archives support.
2226 * vms-misc.c: Include safe-ctype.h
2227 (vms_get_module_name): New function.
2228 (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
2229 * vms-hdr.c (_bfd_vms_write_hdr): Put module name creation to the
2230 vms_get_module_name function. Use this function.
2231 * targets.c: Declare vms_lib_txt_vec. Add it to _bfd_target_vector.
2232 * libbfd-in.h: Add prototype for _bfd_append_relative_path.
2233 Add prototypes for vms-lib.c
2234 * libbfd.h: Regenerate.
2235 * configure.in (TDEFINES): Add an entry for vms_lib_txt_vec. Add
2236 vms-lib.lo to vms_alpha_vec.
2237 * config.bfd (targ_cpu): Add targ_selvecs for alpha*-*-*vms*.
2238 * configure: Regenerate.
2239 * bfd.c: Add selective_search field.
2240 * bfd-in2.h: Regenerate.
2241 * archive.c (append_relative_path): Rename to
2242 _bfd_append_relative_path and make it public.
2243 (_bfd_get_elt_at_filepos): Adjust for above renaming.
2244 * Makefile.am (BFD32_BACKENDS): Add vms-lib.lo
2245 (BFD32_BACKENDS_CFILES): Add vms-lib.c
2246 * Makefile.in: Regenerate.
2247
2248 2010-04-01 Jakub Jelinek <jakub@redhat.com>
2249
2250 * dwarf2.c (read_attribute_value): Handle CU version 4
2251 for DW_FORM_ref_addr, handle DW_FORM_sec_offset, DW_FORM_exprloc
2252 and DW_FORM_flag_present. For unknown form value return NULL.
2253 (scan_unit_for_symbols): For DW_AT_location handle DW_FORM_exprloc
2254 like DW_FORM_block.
2255 (parse_comp_unit): Allow CU version 4.
2256
2257 2010-04-01 Hans-Peter Nilsson <hp@axis.com>
2258
2259 * elf32-cris.c (cris_elf_relocate_section): Correct first argument
2260 to _bfd_elf_get_dynamic_reloc_section.
2261 (elf_cris_discard_excess_dso_dynamics): Ditto.
2262
2263 2010-03-31 Kai Tietz <kai.tietz@onevision.com>
2264
2265 * coff-i386.c (in_reloc_p): Check also for R_SECREL32.
2266 * coff-x86_64.c (in_reloc_p): Check also for R_AMD64_SECREL.
2267
2268 2010-03-31 Alan Modra <amodra@gmail.com>
2269
2270 * elf64-ppc.c (ppc64_elf_relocate_section): Nop out optimized
2271 TPREL16_HI and TPREL16_HA insns.
2272
2273 2010-03-31 Hans-Peter Nilsson <hp@axis.com>
2274
2275 PR ld/11458
2276 * elf32-cris.c (elf_cris_copy_indirect_symbol): Remove invalid
2277 assert of empty pcrel_relocs_copied on the direct symbol. Instead
2278 of moving the list from the indirect symbol to the direct symbol,
2279 merge into any existing list.
2280 (cris_elf_check_relocs): Store the original section in the
2281 pcrel_relocs_copied list, not the relocation section.
2282 (elf_cris_discard_excess_dso_dynamics): Adjust accordingly to find
2283 the relocation section, for reducing its size. Change the
2284 BFD_ASSERT into a check for the section being read-only, and only
2285 emit warnings and TEXTREL marker when there's an entry for a
2286 read-only section.
2287
2288 2010-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2289
2290 * elf32-arm.c (using_thumb_only): Handle v6-M.
2291
2292 2010-03-26 Alan Modra <amodra@gmail.com>
2293
2294 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_EMB_RELSDA>): Not pc-relative.
2295 * bfd-in.h (elf_discarded_section): Clarify comment.
2296 * reloc.c (struct reloc_howto_struct <pc_relative>): Likewise.
2297 * bfd-in2.h: Regenerate.
2298
2299 2010-03-26 Matt Rice <ratmice@gmail.com>
2300
2301 * archive.c (_bfd_compute_and_write_armap): Allow symbols flagged
2302 as unique in the armap.
2303
2304 2010-03-26 Alan Modra <amodra@gmail.com>
2305
2306 PR ld/11375
2307 * elf64-ppc.c (ppc64_elf_relocate_section): Always look up a
2308 possible stub on branches.
2309
2310 2010-03-25 Joseph Myers <joseph@codesourcery.com>
2311
2312 * Makefile.am (ALL_MACHINES): Add cpu-tic6x.lo.
2313 (ALL_MACHINES_CFILES): Add cpu-tic6x.c.
2314 (BFD32_BACKENDS): Add elf32-tic6x.lo.
2315 (BFD32_BACKENDS_CFILES): Add elf32-tic6x.c.
2316 * Makefile.in: Regenerate.
2317 * archures.c (bfd_arch_tic6x, bfd_tic6x_arch): New.
2318 (bfd_archures_list): Update.
2319 * config.bfd (tic6x-*-elf): New.
2320 * configure.in (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec):
2321 New.
2322 * configure: Regenerate.
2323 * cpu-tic6x.c, elf32-tic6x.c: New.
2324 * reloc.c (BFD_RELOC_C6000_PCR_S21, BFD_RELOC_C6000_PCR_S12,
2325 BFD_RELOC_C6000_PCR_S10, BFD_RELOC_C6000_PCR_S7,
2326 BFD_RELOC_C6000_ABS_S16, BFD_RELOC_C6000_ABS_L16,
2327 BFD_RELOC_C6000_ABS_H16, BFD_RELOC_C6000_SBR_U15_B,
2328 BFD_RELOC_C6000_SBR_U15_H, BFD_RELOC_C6000_SBR_U15_W,
2329 BFD_RELOC_C6000_SBR_S16, BFD_RELOC_C6000_SBR_L16_B,
2330 BFD_RELOC_C6000_SBR_L16_H, BFD_RELOC_C6000_SBR_L16_W,
2331 BFD_RELOC_C6000_SBR_H16_B, BFD_RELOC_C6000_SBR_H16_H,
2332 BFD_RELOC_C6000_SBR_H16_W, BFD_RELOC_C6000_SBR_GOT_U15_W,
2333 BFD_RELOC_C6000_SBR_GOT_L16_W, BFD_RELOC_C6000_SBR_GOT_H16_W,
2334 BFD_RELOC_C6000_DSBT_INDEX, BFD_RELOC_C6000_PREL31,
2335 BFD_RELOC_C6000_COPY, BFD_RELOC_C6000_ALIGN,
2336 BFD_RELOC_C6000_FPHEAD, BFD_RELOC_C6000_NOCMP): New.
2337 * targets.c (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New.
2338 (_bfd_target_vector): Update.
2339 * bfd-in2.h, libbfd.h: Regenerate.
2340
2341 2010-03-24 H.J. Lu <hongjiu.lu@intel.com>
2342
2343 * aout-target.h: Update copyright year.
2344 * aout-tic30.c: Likewise.
2345 * coff-alpha.c: Likewise.
2346 * coff-rs6000.c: Likewise.
2347 * coff64-rs6000.c: Likewise.
2348 * elf64-mips.c: Likewise.
2349 * ieee.c: Likewise.
2350 * libecoff.h: Likewise.
2351 * mach-o-target.c: Likewise.
2352 * mach-o.c: Likewise.
2353 * oasys.c: Likewise.
2354 * targets.c: Likewise.
2355
2356 2010-03-24 H.J. Lu <hongjiu.lu@intel.com>
2357
2358 * libbfd-in.h: Update copyright year.
2359
2360 2010-03-21 H.J. Lu <hongjiu.lu@intel.com>
2361
2362 PR ld/11413
2363 * elflink.c (_bfd_elf_add_default_symbol): Check !executable
2364 instead of shared.
2365
2366 2010-03-19 Jie Zhang <jie@codesourcery.com>
2367
2368 * elf32-arm.c (struct section_list): Remove.
2369 (section_list): Remove typedef.
2370 (record_section_with_arm_elf_section_data): Remove.
2371 (find_arm_elf_section_entry): Remove.
2372 (get_arm_elf_section_data): Use is_arm_elf.
2373 (unrecord_section_with_arm_elf_section_data): Remove.
2374 (elf32_arm_new_section_hook): Don't call
2375 record_section_with_arm_elf_section_data.
2376 (elf32_arm_write_section): Set mapcount to -1 when
2377 the map has been used. Don't call
2378 unrecord_section_with_arm_elf_section_data.
2379 (unrecord_section_via_map_over_sections): Remove.
2380 (elf32_arm_close_and_cleanup): Remove.
2381 (elf32_arm_bfd_free_cached_info): Remove.
2382 (bfd_elf32_close_and_cleanup): Don't define.
2383 (bfd_elf32_bfd_free_cached_info): Don't define.
2384
2385 2010-03-18 H.J. Lu <hongjiu.lu@intel.com>
2386
2387 PR binutils/11396
2388 * libcoff-in.h (pe_tdata): Add dont_strip_reloc.
2389 * libcoff.h: Regenerated.
2390
2391 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Clear F_RELFLG
2392 if dont_strip_reloc is set.
2393 (_bfd_XX_bfd_copy_private_bfd_data_common): Set
2394 dont_strip_reloc on output if there is no .reloc and
2395 IMAGE_FILE_RELOCS_STRIPPED isn't set in input.
2396
2397 2010-03-18 Wei Guozhi <carrot@google.com>
2398
2399 PR gas/11323
2400 * elf32-arm.c (elf32_arm_reloc_map): Map BFD_RELOC_ARM_GOT_PREL to
2401 R_ARM_GOT_PREL.
2402 * reloc.c (BFD_RELOC_ARM_GOT_PREL): New ARM relocation.
2403 * bfd-in2.h: Regenerate.
2404 * libbfd.h: Regenerate.
2405
2406 2010-03-17 H.J. Lu <hongjiu.lu@intel.com>
2407
2408 * reloc.c (BFD_RELOC_SPU_PIC18): Removed.
2409 (BFD_RELOC_SPU_STUB): Likewise.
2410
2411 2010-03-17 Jie Zhang <jie@codesourcery.com>
2412
2413 * elf.c (assign_file_positions_for_load_sections): Avoid
2414 overflow.
2415
2416 2010-03-17 Alan Modra <amodra@gmail.com>
2417
2418 PR binutils/11382
2419 * plugin.c (bfd_plugin_object_p): Pass iostream to fileno using
2420 proper type.
2421
2422 2010-03-17 Alan Modra <amodra@gmail.com>
2423
2424 * elf32-arm.c (cortex_a8_erratum_scan): Warning fix.
2425
2426 2010-03-16 Alan Modra <amodra@gmail.com>
2427
2428 * elf64-ppc.c (struct ppc_link_hash_table): Add do_toc_opt.
2429 (ppc64_elf_edit_toc): Set it here.
2430 (ha_reloc_match): New function.
2431 (ppc64_elf_relocate_section): Optimize bigtoc insn sequences.
2432
2433 2010-03-15 Alan Modra <amodra@gmail.com>
2434
2435 * elf64-ppc.c (ppc64_elf_has_small_toc_reloc): New function.
2436 * elf64-ppc.h (ppc64_elf_has_small_toc_reloc): Declare.
2437
2438 2010-03-14 Alan Modra <amodra@gmail.com>
2439
2440 PR ld/11378
2441 * elf64-ppc.h (ppc64_elf_check_init_fini): Declare.
2442 * elf64-ppc.c (call_check_done): Define.
2443 (ppc64_elf_add_symbol_hook): Substitute bfd_get_section_name macro.
2444 (ppc64_elf_check_relocs, ppc64_elf_size_dynamic_sections): Likewise.
2445 (ppc64_elf_finish_multitoc_partition): Remove unnecessary check.
2446 (toc_adjusting_stub_needed): Use call_check_done rather than toc_off.
2447 Simplify return logic. Iterate over all .init and .fini fragments
2448 by recursion. Set makes_toc_func_call here..
2449 (ppc64_elf_next_input_section): ..rather than here.
2450 (check_pasted_section, ppc64_elf_check_init_fini): New functions.
2451
2452 2010-03-13 Alan Modra <amodra@gmail.com>
2453
2454 PR ld/11375
2455 * elf64-ppc.c (ppc_type_of_stub): Always set *hash to the
2456 function descriptor symbol if there is one, not just for plt stubs.
2457 (ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls.
2458
2459 2010-03-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2460
2461 * elflink.c (bfd_elf_size_dynamic_sections): Don't emit base
2462 version twice.
2463 Skip it when constructing def.vd_next.
2464
2465 * elf32-i386.c (TARGET_LITTLE_SYM): Redefine to
2466 bfd_elf32_i386_sol2_vec.
2467 (TARGET_LITTLE_NAME): Redefine to elf32-i386-sol2.
2468 (elf32_bed): Redefine to elf32_i386_sol2_bed.
2469 (elf_backend_want_plt_sym): Redefine to 1.
2470
2471 * elf64-x86-64.c (TARGET_LITTLE_SYM): Redefine to
2472 bfd_elf64_x86_64_sol2_vec.
2473 (TARGET_LITTLE_NAME): Redefine to elf64-x86-64-sol2.
2474 (elf64_bed): Redefine to elf64_x86_64_sol2_bed.
2475 (elf_backend_want_plt_sym): Redefine to 1.
2476
2477 * config.bfd (i[3-7]86-*-solaris2*): Set targ_defvec to
2478 bfd_elf32_i386_sol2_vec.
2479 Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
2480 targ64_selvecs.
2481 (x86_64-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec.
2482 Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
2483 targ_selvecs.
2484
2485 * configure.in: Handle bfd_elf32_i386_sol2_vec,
2486 bfd_elf64_x86_64_sol2_vec.
2487 * configure: Regenerate.
2488
2489 * targets.c (bfd_elf32_i386_sol2_vec): Declare.
2490 (bfd_elf64_x86_64_sol2_vec): Declare.
2491 (_bfd_target_vector): Add bfd_elf32_i386_sol2_vec,
2492 bfd_elf64_x86_64_sol2_vec.
2493
2494 2010-03-04 Daniel Jacobowitz <dan@codesourcery.com>
2495
2496 * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip non-program
2497 sections.
2498
2499 2010-03-04 Alan Modra <amodra@gmail.com>
2500
2501 PR 11302
2502 * dwarf2.c (read_abbrevs): Return NULL on alloc failures.
2503 (read_attribute_value, decode_line_info): Likewise.
2504 (add_line_info, read_rangelist): Return FALSE on alloc failures.
2505 (arange_add, sort_line_sequences): Likewise.
2506 (find_abstract_instance_name): Handle failures from called funcs.
2507 (scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise.
2508 (find_line): Realloc to a temp, and handle alloc fail.
2509
2510 2010-03-03 Daniel Jacobowitz <dan@codesourcery.com>
2511
2512 * elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add
2513 a mapping symbol to an empty section.
2514
2515 2010-03-02 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
2516
2517 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
2518 return value from the call to _bfd_elf_merge_object_attributes.
2519
2520 2010-03-02 Christophe Lyon <christophe.lyon@st.com>
2521 Alan Modra <amodra@gmail.com>
2522
2523 * elf32-arm.c (a8_erratum_fix): Add st_type field to record the
2524 destination mode of the a8 stub.
2525 (elf32_arm_link_hash_table): Add top_id field.
2526 (elf32_arm_link_hash_table_create): Initialize top_id.
2527 (arm_type_of_stub): Update prototype, st_type can now be updated
2528 by this function. Actual destination address in case of PLT is
2529 computed here, to help factorizing code.
2530 (elf32_arm_stub_name): Update prototype, use stub_type additional
2531 parameter to build stub name.
2532 (elf32_arm_get_stub_entry): Update prototype, use stub_type
2533 additional parameter to build stub entry.
2534 (arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of
2535 put_thumb_insn/put_arm_insn as BE8 encoding is now handled later.
2536 Call elf32_arm_final_link_relocate to process all in-stub
2537 relocations.
2538 (elf32_arm_setup_section_lists): Update top_id.
2539 (cortex_a8_erratum_scan): Record stub destination mode.
2540 (elf32_arm_size_stubs): Update call to arm_type_of_stub according
2541 to new prototype.
2542 (elf32_arm_final_link_relocate): Enable processing of in-stub
2543 REL32 relocations. Rely on arm_type_of_stub to detect if a stub is
2544 needed, enabling code factorization.
2545 (elf32_arm_final_link): Process stub sections.
2546 (elf32_arm_output_map_sym): Add entry to code/data map.
2547
2548 2010-03-01 David S. Miller <davem@davemloft.net>
2549
2550 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and
2551 h->def_regular, set h->ref_regular.
2552 (allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries
2553 and dynamic relocations if h->ref_regular.
2554
2555 * elfxx-sparc.c (struct elf_reloc_map): Delete.
2556 (sparc_reloc_map): Delete.
2557 (_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each
2558 relocation type in switch statements.
2559
2560 2010-02-25 Alan Modra <amodra@gmail.com>
2561
2562 PR ld/11304
2563 * elf.c (_bfd_elf_init_private_section_data): Rename need_group
2564 to final_link and invert. For final link allow some flags to
2565 differ. Don't specially allow flags to be all zero.
2566
2567 2010-02-24 Alan Modra <amodra@gmail.com>
2568
2569 PR binutils/10858
2570 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise
2571 SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol
2572 table.
2573
2574 2010-02-23 Andrew Zabolotny <anpaza@mail.ru>
2575
2576 PR binutils/11297
2577 * elf32-avr.c (elf_avr_howto_table): Add R_AVR_8.
2578 (avr_reloc_map): Map BFD_RELOC_8 to R_AVR_8.
2579
2580 2010-02-22 Alan Modra <amodra@gmail.com>
2581
2582 * reloc.c (bfd_check_overflow): When forming addrmask, shift
2583 fieldmask left by rightshift.
2584 (_bfd_relocate_contents): Likewise. Use rightshift addrmask in all
2585 overflow checks.
2586
2587 2010-02-20 H.J. Lu <hongjiu.lu@intel.com>
2588
2589 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check
2590 STT_GNU_IFUNC on large common symbol.
2591
2592 2010-02-18 H.J. Lu <hongjiu.lu@intel.com>
2593
2594 * elf32-i386.c (elf_i386_add_symbol_hook): Don't set
2595 has_ifunc_symbols if the symbol comes from a shared library.
2596 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
2597 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
2598 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
2599 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
2600 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise.
2601
2602 2010-02-19 Alan Modra <amodra@gmail.com>
2603
2604 * elf.c (_bfd_elf_fixup_group_sections): New function, split out from..
2605 (_bfd_elf_copy_private_header_data): ..here.
2606 * elflink.c (_bfd_elf_size_group_sections): New function.
2607 (bfd_elf_size_dynamic_sections): Call it.
2608 * elf-bfd.h (_bfd_elf_size_group_sections): Declare.
2609 (_bfd_elf_fixup_group_sections): Declare.
2610
2611 2010-02-18 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
2612
2613 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for
2614 merging Tag_DIV_use, Tag_MPextension_use, and
2615 Tag_MPextension_use_legacy tags.
2616
2617 2010-02-18 Alan Modra <amodra@gmail.com>
2618
2619 * elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15
2620 commit. Don't write zeros for removed group members.
2621 (_bfd_elf_copy_private_header_data): Adjust size of group section
2622 when group members are removed by objcopy.
2623
2624 2010-02-15 Dave Korn <dave.korn.cygwin@gmail.com>
2625
2626 PR binutils/11280
2627 * configure.host (*-*-solaris2.11): Add host define to select
2628 valid default code page for windres/windmc on solaris.
2629
2630 2010-02-15 Nick Clifton <nickc@redhat.com>
2631
2632 * po/vi.po: Updated Vietnamese translation.
2633
2634 2010-02-12 Daniel Gutson <dgutson@codesourcery.com>
2635
2636 * elf32-arm.c (elf32_arm_output_arch_local_syms): add
2637 missing mapping symbol to data only sections.
2638
2639 2010-02-11 David S. Miller <davem@davemloft.net>
2640
2641 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22
2642 and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global
2643 symbols.
2644 (_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for
2645 these relocs on global symbols.
2646 (gdopoff): New.
2647 (_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on
2648 local symbol references which are not STT_GNU_IFUNC. Handle
2649 relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively,
2650 and deal with negative vs. non-negative values properly.
2651
2652 2010-02-09 Tristan Gingold <gingold@adacore.com>
2653
2654 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for
2655 non-external relocation.
2656
2657 2010-02-09 Alan Modra <amodra@gmail.com>
2658
2659 * elf64-ppc.c (merge_got_entries): Move earlier in file.
2660 (allocate_dynrelocs): Merge got entries here if not doing multi-toc.
2661 (ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got.
2662 (ppc64_elf_layout_multitoc): Don't resize if we have already
2663 merged got entries.
2664
2665 2010-02-09 Michael Holzheu <holzheu@de.ibm.com>
2666
2667 * elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
2668 elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
2669 elfcore_write_s390_prefix): New.
2670 * elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
2671 elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
2672 elfcore_write_s390_prefix): New.
2673 (elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
2674 NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
2675 (elfcore_write_register_note): Handle .reg-s390-timer,
2676 .reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
2677 .reg-s390-prefix section.
2678
2679 2010-02-09 Alan Modra <amodra@gmail.com>
2680
2681 * elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
2682 unsigned char. Update variables and code using them throughout file.
2683 (struct ppc_link_hash_entry): Likewise for tls_mask.
2684
2685 * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents.
2686
2687 * elf64-ppc.c (has_small_toc_reloc): Don't define.
2688 (makes_toc_func_call, call_check_in_progress): Shuffle flags.
2689 (struct ppc64_elf_obj_tdata): Add has_small_toc_reloc. Update
2690 code setting the flag.
2691 (ppc64_elf_next_toc_section): Group big-toc sections in
2692 0x80008000 chunks.
2693
2694 2010-02-08 David S. Miller <davem@davemloft.net>
2695
2696 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot,
2697 srelgot, splt, srelplt, and sgotplt members in favor of generic copies.
2698
2699 * elfxx-sparc.c (create_got_section): Delete.
2700 (_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic
2701 section creator does that work for us. Use ->elf.foo instead of
2702 ->foo where applicable.
2703 (_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo
2704 where applicable.
2705 (allocate_dynrelocs): Likewise.
2706 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
2707 (_bfd_sparc_elf_relocate_section): Likewise.
2708 (sparc_vxworks_build_plt_entry): Likewise.
2709 (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
2710 (sparc_finish_dyn): Likewise.
2711 (sparc_vxworks_finish_exec_plt): Likewise.
2712 (sparc_vxworks_finish_shared_plt): Likewise.
2713 (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
2714
2715 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_*
2716 macros for visibilty and locality checks.
2717 (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
2718 (allocate_dynrelocs): Likewise.
2719 (_bfd_sparc_elf_relocate_section): Likewise.
2720 (_bfd_sparc_elf_finish_dynamic_symbol):Likewise.
2721
2722 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set
2723 but never used local var 'dynobj'.
2724
2725 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle
2726 nocopyreloc.
2727
2728 * reloc.c (BFD_RELOC_SPARC_JMP_IREL): New.
2729 (BFD_RELOC_SPARC_IRELATIVE): Likewise.
2730 * bfd-in2.h: Regenerate.
2731 * libbfd.h: Regenerate.
2732
2733 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table
2734 and loc_hash_memory.
2735 (_bfd_sparc_elf_link_hash_table_free): Declare.
2736 * elf32-sparc.c (elf32_sparc_add_symbol_hook): New.
2737 (elf_backend_add_symbol_hook, elf_backend_post_process_headers,
2738 bfd_elf32_bfd_link_hash_table_free): Define.
2739 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Set
2740 has_ifunc_symbols if STT_GNU_IFUNC.
2741 (bfd_elf64_bfd_link_hash_table_free): Define.
2742 (elf_backend_post_process_headers): Define always.
2743 * elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New.
2744 (sparc_reloc_map): Add entries for new IFUNC relocs.
2745 (_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs.
2746 (_bfd_sparc_elf_info_to_howto_ptr): Likewise.
2747 (elf_sparc_local_htab_hash, elf_sparc_local_htab_eq,
2748 elf_sparc_get_local_sym_hash): New.
2749 (_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization
2750 from here...
2751 (_bfd_sparc_elf_link_hash_table_create): ... to here. Allocate
2752 local hash table.
2753 (_bfd_sparc_elf_link_hash_table_free): New.
2754 (create_ifunc_sections): New.
2755 (_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj
2756 and call create_ifunc_sections(). For local STT_GNU_IFUNC symbols
2757 cons up a fake local hash table entry for it. Unconditionally add
2758 a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular. Count
2759 dyn relocs for ifunc.
2760 (_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc.
2761 (allocate_dynrelocs): Unconditionally emit a PLT entry when
2762 STT_GNU_IFUNC and h->def_regular. Count GOT dyn relocs for ifunc.
2763 (allocate_local_dynrelocs): New function.
2764 (_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash
2765 table. Emit dynamic relocs to irelplt when not shared. Treat iplt
2766 like splt.
2767 (_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand.
2768 (_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc
2769 plt in iplt/irelplt.
2770
2771 2010-02-08 Richard Sandiford <r.sandiford@uk.ibm.com>
2772
2773 * xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating
2774 max_contents_size, only consider sections whose contents must
2775 be swapped in.
2776
2777 2010-02-09 Alan Modra <amodra@gmail.com>
2778
2779 * elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here..
2780 (ppc64_elf_size_dynamic_sections): ..and here..
2781 (merge_got_entries): ..rather than here.
2782
2783 2010-02-09 Alan Modra <amodra@gmail.com>
2784
2785 * elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc.
2786 (has_small_toc_reloc): Define.
2787 (ppc64_elf_check_relocs): Set the above flags.
2788 (ppc64_elf_edit_opd): Delete obfd param.
2789 (ppc64_elf_tls_optimize): Likewise.
2790 (ppc64_elf_edit_toc): Likewise.
2791 (ppc64_elf_tls_setup): Likewise. Add no_multi_toc param.
2792 * elf64-ppc.h: Update prototypes.
2793
2794 2010-02-08 Alan Modra <amodra@gmail.com>
2795
2796 * section.c (struct bfd_section): Delete has_tls_reloc,
2797 has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done.
2798 Add sec_flg0 thru sec_flg5.
2799 (BFD_FAKE_SECTION): Update for changed flags.
2800 * ecoff.c (bfd_debug_section): Likewise.
2801 * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
2802 * elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
2803 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update.
2804 * elf32-xtensa.c (reloc_done): Define.
2805 * elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update.
2806 * bfd-in2.h: Regenerate.
2807
2808 2010-02-08 Tristan Gingold <gingold@adacore.com>
2809
2810 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern
2811 for non-scattered relocations.
2812
2813 2010-02-08 Nathan Sidwell <nathan@codesourcery.com>
2814
2815 * elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty
2816 apuinfo sections, only scan input sections once and reuse the
2817 buffer.
2818
2819 2010-02-08 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2820
2821 * archures.c (bfd_mach_ppc_titan): Define.
2822 * bfd-in2.h: Regenerate.
2823 * cpu-powerpc.c (bfd_powerpc_archs): Add titan entry.
2824
2825 2010-02-08 Alan Modra <amodra@gmail.com>
2826
2827 * elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code.
2828
2829 2010-02-05 Sterling Augustine <sterling@tensilica.com>
2830
2831 * elf.c (assign_file_positions_for_load_sections) Update lma of
2832 section if necessary. Fixes Bugzilla 11219.
2833
2834 2010-02-05 H.J. Lu <hongjiu.lu@intel.com>
2835
2836 * elf32-i386.c: Remove trailing white spaces.
2837 * elf64-x86-64.c: Likewise.
2838
2839 2010-02-03 Nick Clifton <nickc@redhat.com>
2840
2841 * elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add
2842 entries for other architectures.
2843 (struct elf_link_hash_table): Add hash_table_id field.
2844 (elf_hash_table_id): New accessor macro.
2845 * elflink.c (_bfd_elf_link_hash_table_init): Add target_id
2846 parameter.
2847 * elf-m10300.c (elf32_mn10300_hash_table): Check table id before
2848 returning cast pointer.
2849 (elf32_mn10300_link_hash_table_create): Identify new table as
2850 containing MN10300 extensions.
2851 (mn10300_elf_relax_section): Check pointer returned by
2852 elf32_mn10300_hash_table.
2853 * elf32-arm.c: Likewise, except using ARM extensions.
2854 * elf32-avr.c: Likewise, except using AVR extensions.
2855 * elf32-bfin.c: Likewise, except using BFIN extensions.
2856 * elf32-cris.c: Likewise, except using CRIS extensions.
2857 * elf32-frv.c: Likewise, except using FRV extensions.
2858 * elf32-hppa.c: Likewise, except using HPPA32 extensions.
2859 * elf32-i386.c: Likewise, except using I386 extensions.
2860 * elf32-lm32.c: Likewise, except using LM32 extensions.
2861 * elf32-m32r.c: Likewise, except using M32RM extensions.
2862 * elf32-m68hc11.c: Likewise, except using M68HC11 extensions.
2863 * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions.
2864 * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions.
2865 * elf32-m68k.c: Likewise, except using M68K extensions.
2866 * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions.
2867 * elf32-ppc.c: Likewise, except using PPC32 extensions.
2868 * elf32-s390.c: Likewise, except using S390 extensions.
2869 * elf32-sh.c: Likewise, except using SH extensions.
2870 * elf32-spu.c: Likewise, except using SPU extensions.
2871 * elf32-xtensa.c: Likewise, except using XTENSA extensions.
2872 * elf64-alpha.c: Likewise, except using ALPHA extensions.
2873 * elf64-hppa.c: Likewise, except using HPPA64 extensions.
2874 * elf64-ppc.c: Likewise, except using PPC64 extensions.
2875 * elf64-s390.c: Likewise, except using S390 extensions.
2876 * elf64-x86-64.c: Likewise, except using X86_64 extensions.
2877 * elfxx-ia64.c: Likewise, except using IA64 extensions.
2878 * elfxx-mips.c: Likewise, except using MIPS extensions.
2879 * elfxx-sparc.c: Likewise, except using SPARC extensions.
2880 * elfxx-sparc.h: Likewise, except using SPARC extensions.
2881 * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete
2882 redundant structure.
2883 (elf32_cr16_hash_table): Delete unused macro.
2884 (elf32_cr16_link_hash_traverse): Delete unused macro.
2885 * elf32-score.c: Likewise.
2886 * elf32-score7.c: Likewise.
2887 * elf32-vax.c: Likewise.
2888 * elf64-sh64.c: Likewise.
2889
2890 2010-02-03 Alan Modra <amodra@gmail.com>
2891
2892 * elf64-ppc.c (struct plt_entry): Move earlier in file.
2893 (struct got_entry): Likewise. Add is_indirect and got.ent fields.
2894 (struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry.
2895 Update all uses.
2896 (struct ppc_link_hash_table): Add got_reli_size and second_toc_pass.
2897 Remove no_multi_toc.
2898 (update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect
2899 when allocating a new struct got_entry.
2900 (allocate_got): New function, extracted from..
2901 (allocate_dynrelocs): ..here. Abort on got entry in non-ppc64 bfd.
2902 (ppc64_elf_size_dynamic_sections): Track got relocs allocated in
2903 .reliplt by got_reli_size. Set owner on ppc64_tlsld_got entries.
2904 (ppc64_elf_setup_section_lists): Remove output_bfd param and
2905 no_multi_toc, add add_stub_section and layout_sections_again. Stash
2906 new params in htab. Extract some code to..
2907 (ppc64_elf_start_multitoc_partition): ..here. New function.
2908 (ppc64_elf_next_toc_section): Check for linker script errors. Handle
2909 second pass toc scan.
2910 (merge_got_entries, merge_global_got, reallocate_got): New functions.
2911 (ppc64_elf_reinit_toc): Rename to..
2912 (ppc64_elf_finish_multitoc_partition): ..this.
2913 (ppc64_elf_layout_multitoc): New function.
2914 (ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and
2915 layout_sections_again params.
2916 (ppc64_elf_relocate_section): Handle indirect got entries.
2917 * elf64-ppc.h: Update prototypes. Declare new functions.
2918
2919 2010-02-02 H.J. Lu <hongjiu.lu@intel.com>
2920
2921 * elf-bfd.h (elfcore_write_xstatereg): New.
2922
2923 * elf.c (elfcore_grok_xstatereg): New.
2924 (elfcore_write_xstatereg): Likewise.
2925 (elfcore_grok_note): Handle NT_X86_XSTATE.
2926 (elfcore_write_register_note): Handle .reg-xstate section.
2927
2928 2010-02-01 Tristan Gingold <gingold@adacore.com>
2929
2930 * som.c (som_write_ar_hdr): Define this macro.
2931
2932 2010-01-30 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2933
2934 * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
2935 R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the
2936 linkage table pointer to use the global table pointer if not doing
2937 a shared link.
2938
2939 2010-01-29 Joel Brobecker <brobecker@adacore.com>
2940
2941 * elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal
2942 if it has already been set.
2943
2944 2010-01-27 Tristan Gingold <gingold@adacore.com>
2945
2946 * vms.h: Remove trailing spaces.
2947 (struct hdr_struct): Remove unused hdr_c_cpr field.
2948 (enum file_format_enum): Add comments.
2949 * vms.c (vms_bfd_print_private_bfd_data): New function that
2950 replaces the macro.
2951 Remove trailing spaces.
2952 * vms-misc.c: Improve comments.
2953 (_bfd_vms_get_object_record): Also handle files without pads.
2954 * vms-hdr.c (_bfd_vms_write_dbg): Fix format string.
2955 * vms-gsd.c (struct flagdescstruct): Make name field const.
2956 (gsyflagdesc): Fix typo.
2957
2958 2010-01-27 Alan Modra <amodra@gmail.com>
2959
2960 PR ld/11217
2961 * elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec.
2962 (ppc64_elf_setup_section_lists): Init them.
2963 (ppc64_elf_next_toc_section): Don't partition multi-toc between .got
2964 and .toc on the same input file.
2965 (ppc64_elf_relocate_section): Correct GOT entry offset.
2966
2967 2010-01-26 Tristan Gingold <gingold@adacore.com>
2968
2969 * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr.
2970 (bfd_target): Add _bfd_write_ar_hdr_fn field.
2971 * archive.c (is_bsd44_extended_name): New macro.
2972 (_bfd_generic_read_ar_hdr_mag): Use it. Add extra_size.
2973 (bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended
2974 name.
2975 (_bfd_archive_bsd44_construct_extended_name_table): New function.
2976 (_bfd_generic_write_ar_hdr): Ditto.
2977 (_bfd_bsd44_write_ar_hdr): Ditto.
2978 (_bfd_write_archive_contents): Call _bfd_write_ar_hdr.
2979 (bsd_write_armap): Adjust firstreal computation.
2980 * libbfd-in.h (struct areltdata): Add extra_size field.
2981 (_bfd_generic_write_ar_hdr): Add prototype.
2982 (_bfd_bsd44_write_ar_hdr): Ditto.
2983 (_bfd_write_ar_hdr): Define.
2984 (_bfd_noarchive_write_ar_hdr): Ditto.
2985 (_bfd_archive_bsd_write_ar_hdr): Ditto.
2986 (_bfd_archive_coff_write_ar_hdr): Ditto.
2987 (_bfd_archive_bsd44_slurp_armap): Ditto.
2988 (_bfd_archive_bsd44_slurp_extended_name_table): Ditto.
2989 (_bfd_archive_bsd44_construct_extended_name_table): New prototype.
2990 (_bfd_archive_bsd44_truncate_arname): Ditto.
2991 (_bfd_archive_bsd44_write_armap): Ditto.
2992 (_bfd_archive_bsd44_read_ar_hdr): Ditto.
2993 (_bfd_archive_bsd44_write_ar_hdr): Ditto.
2994 (_bfd_archive_bsd44_openr_next_archived_file): Ditto.
2995 (_bfd_archive_bsd44_get_elt_at_index): Ditto.
2996 (_bfd_archive_bsd44_generic_stat_arch_elt): Ditto.
2997 (_bfd_archive_bsd44_update_armap_timestamp): Ditto.
2998 * libbfd.h: Regenerate.
2999 * oasys.c (oasys_write_ar_hdr): Define.
3000 * libecoff.h (_bfd_ecoff_write_ar_hdr): Define.
3001 * ieee.c (ieee_write_ar_hdr): Define.
3002 * elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define.
3003 * coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field.
3004 (bfd_pmac_xcoff_backend_data): Ditto.
3005 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
3006 (bfd_xcoff_aix5_backend_data): Ditto.
3007 * coff-alpha.c (alpha_ecoff_write_ar_hdr): Define.
3008 * aout-target.h (MY_write_ar_hdr): Define it if not defined.
3009 * aout-tic30.c (MY_write_ar_hdr): Ditto.
3010 * mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive.
3011 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
3012 (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
3013 (bfd_mach_o_construct_extended_name_table)
3014 (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
3015 (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
3016 (bfd_mach_o_update_armap_timestamp): Moved to mach-o.c
3017 * mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
3018 (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
3019 (bfd_mach_o_construct_extended_name_table)
3020 (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
3021 (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
3022 (bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c
3023 * bfd-in2.h: Regenerate.
3024
3025 2010-01-26 Alan Modra <amodra@gmail.com>
3026 H.J. Lu <hongjiu.lu@intel.com>
3027
3028 PR ld/11218
3029 * elflink.c (elf_link_output_extsym): Do not ignore undefined
3030 symbols with ref_regular set when gc_sections is active.
3031
3032 2010-01-25 Alan Modra <amodra@gmail.com>
3033
3034 PR ld/11217
3035 * elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences
3036 with relocations against undefined weak symbols.
3037 (ppc64_elf_relocate_section): Don't optimize calls to undefined
3038 weak functions if the symbol is dynamic.
3039 (ppc64_elf_relocate_section): Edit tprel tls sequences.
3040 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3041 (_bfd_elf_ppc_at_tprel_transform): New function.
3042 * bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare.
3043 * bfd-in2.h: Regenerate.
3044
3045 2010-01-23 Richard Sandiford <r.sandiford@uk.ibm.com>
3046
3047 * coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1.
3048 (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE.
3049 * coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and
3050 bitsize to 1.
3051 (xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE.
3052
3053 2010-01-21 Nick Clifton <nickc@redhat.com>
3054
3055 * elflink.c (elf_link_add_object_symbols): Look up name of
3056 undefined symbol both before and after versioning has been
3057 applied. Do not bother with symbols that are weakly undefined.
3058
3059 2010-01-21 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
3060
3061 * elf32-s390.c (elf32_s390_merge_private_bfd_data): New function.
3062 (bfd_elf32_bfd_merge_private_bfd_data): New macro definition.
3063
3064 2010-01-19 Cary Coutant <ccoutant@google.com>
3065
3066 * dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8.
3067
3068 2010-01-19 Daisuke Hatayama <d.hatayama@jp.fujitsu.com>
3069 Alan Modra <amodra@gmail.com>
3070
3071 * elfcode.h (elf_swap_ehdr_out): Handle e_phnum > 0xffff.
3072 (elf_object_p): Read e_phnum extension.
3073 (elf_write_shdrs_and_ehdr): Write e_phnum extension.
3074 * elfcore.h (elf_core_file_p): Read e_phnum extension. Sanity check
3075 that we can read last program header.
3076
3077 2010-01-19 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
3078
3079 * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
3080 R_ARM_THM_CALL entry.
3081 (elf32_arm_final_link_relocate): Correct calculation of
3082 reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22,
3083 or R_ARM_THM_JUMP24 relocation.
3084
3085 2010-01-18 Alan Modra <amodra@gmail.com>
3086
3087 PR 11168
3088 * coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C
3089 block past vars in COFF_IMAGE_WITH_PE block. Report error on more
3090 than 32k sections.
3091
3092 2010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
3093
3094 Fix compilation warning on gcc-3.4.
3095 * vms-tir.c (start_etir_record, sto_imm): Rename the prototype
3096 parameter index to sec_index according to the function definition.
3097
3098 2010-01-13 Chao-ying Fu <fu@mips.com>
3099
3100 * elfxx-mips.c (JR_TO_B_P): New define to transform JR to B.
3101 It is true for all CPUs.
3102 (jal_reloc_p): New function.
3103 (mips_elf_calculate_relocation): Rename require_jalxp to
3104 cross_mode_jump_p.
3105 Update comment for CROSS_MODE_JUMP_P.
3106 Set up cross_mode_jump_p based on the mode change.
3107 (mips_elf_perform_relocation): Rename require_jalx to cross_mode_jump_p.
3108 Update comment for CROSS_MODE_JUMP_P.
3109 Test cross_mode_jump_p and jal_reloc_p to turn jal to jalx.
3110 Use !cross_mode_jump_p to guard conversion.
3111 Convert "jr t9" to "b", if possible.
3112 (_bfd_mips_elf_relocate_section): Rename require_jalx to
3113 cross_mode_jump_p.
3114 Pass &cross_mode_jump_p to call mips_elf_calculate_relocation.
3115 Pass cross_mode_jump_p to call mips_elf_perform_relocation.
3116
3117 2010-01-13 Nick Clifton <nickc@redhat.com>
3118
3119 * cpu-m32c.c (m32c_scan): New function. Ensures that a scan for
3120 "m32c" returns the m32c arch_info_struct and not the m16c
3121 arch_info_struct.
3122 (arch_info_struct): Use the new scan function.
3123 (bfd_m32c_arch): Likewise.
3124
3125 2010-01-13 Tristan Gingold <gingold@adacore.com>
3126
3127 * config.bfd: Remove duplicated target vector for i386-*-darwin.
3128 Appends new arch instead of overriding.
3129 Use mach_o_x86_64_vec for x86_64-*-darwin.
3130 * configure.in: Add mach_o_x86_64_vec.
3131 * configure: Regenerate.
3132 * targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector.
3133 * Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo
3134 (BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c
3135 * Makefile.in: Regenerate.
3136 * mach-o-x86-64.c: New file.
3137
3138 2010-01-13 Tristan Gingold <gingold@adacore.com>
3139
3140 * reloc.c: Add MACH_O_X86_64 relocations.
3141 * bfd-in2.h: Regenerate.
3142 * libbfd.h: Regenerate.
3143
3144 2010-01-13 Tristan Gingold <gingold@adacore.com>
3145
3146 * archive.c (normalize): Use lbasename.
3147 (bfd_bsd_truncate_arname): Ditto.
3148 (bfd_gnu_truncate_arname): Ditto.
3149
3150 2010-01-12 Tristan Gingold <gingold@adacore.com>
3151
3152 * makefile.vms (CFLAGS): Turns warnings into informational messages.
3153
3154 2010-01-11 Tristan Gingold <gingold@adacore.com>
3155
3156 * mach-o.h: Add x86-64 relocation types.
3157
3158 2010-01-11 Tristan Gingold <gingold@adacore.com>
3159
3160 * mach-o.h (bfd_mach_o_backend_data): Add arch field.
3161 (bfd_mach_o_set_arch_mach): New prototype.
3162 * mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject.
3163 (bfd_mach_o_set_arch_mach): New function.
3164 (bfd_mach_o_gen_mkobject): New function.
3165 Set TARGET_ARCHITECTURE for the generic back-ends.
3166 * mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define.
3167 Check that TARGET_ARCHITECTURE is defined.
3168 Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure.
3169 * mach-o-i386.c (TARGET_ARCHITECTURE): Define.
3170
3171 2010-01-11 Tristan Gingold <gingold@adacore.com>
3172
3173 * archive.c (bfd_slurp_armap): Also check for Mach-O sorted armap.
3174
3175 2010-01-11 Nick Clifton <nickc@redhat.com>
3176
3177 * elf32-v850.c (v850_elf_perform_relocation): Fix overflow
3178 handling of R_V850_HI16_S relocation.
3179
3180 2010-01-11 Alan Modra <amodra@gmail.com>
3181
3182 PR 11103
3183 * dwarf1.c (parse_die): Correct FORM_STRING data pointer increment.
3184
3185 2010-01-11 Alan Modra <amodra@gmail.com>
3186
3187 PR 6832
3188 * dwarf2.c (struct comp_unit): Add sec_info_ptr.
3189 (find_abstract_instance_name): Use it.
3190 (parse_comp_unit): Set it.
3191
3192 2010-01-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3193
3194 * Makefile.in: Regenerate.
3195 * configure: Regenerate.
3196
3197 2010-01-08 Tristan Gingold <gingold@adacore.com>
3198
3199 * archive.c: Remove bfd_special_undocumented_glue.
3200
3201 2010-01-08 Alan Modra <amodra@gmail.com>
3202
3203 PR ld/11133
3204 * elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook.
3205 * elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise.
3206 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
3207
3208 2010-01-07 H.J. Lu <hongjiu.lu@intel.com>
3209
3210 PR ld/11138
3211 * elflink.c (elf_link_check_versioned_symbol): Don't abort if
3212 a symbol referenced by DSO is is defined in a non-shared object
3213 and forced local.
3214
3215 2010-01-07 H.J. Lu <hongjiu.lu@intel.com>
3216
3217 PR ld/11133
3218 * elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
3219 undefined __start_XXX/__stop_XXX in all input files and set
3220 SEC_KEEP.
3221
3222 2010-01-07 H.J. Lu <hongjiu.lu@intel.com>
3223
3224 PR ld/11143
3225 * elflink.c (elf_gc_sweep): Keep SHT_NOTE section.
3226
3227 2010-01-04 Daniel Gutson <dgutson@codesourcery.com>
3228
3229 * bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC
3230 before including procfs.h.
3231 (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
3232 * configure.in: Added autoconf probe for the pr_fpreg member.
3233 * configure: Regenerated.
3234 * config.in: Regenerated.
3235 * elf.c: Define _STRUCTURE_PROC before including procfs.h.
3236
3237 2010-01-04 Joel Brobecker <brobecker@adacore.com>
3238
3239 Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64).
3240 * dwarf2.c (concat_filename): Rename dirname with dir_name
3241 to void shadowing the dirname function.
3242 Rename subdirname with subdir_name to stay consistent with
3243 the new dir_name variable name.
3244
3245 2010-01-04 Edmar Wienskoski <edmar@freescale.com>
3246
3247 * archures.c: Add bfd_mach_ppc_e500mc64.
3248 * bfd-in2.h: Regenerate.
3249 * cpu-powerpc.c (bfd_powerpc_archs): Add entry for
3250 bfd_mach_ppc_e500mc64.
3251
3252 2010-01-01 Joel Brobecker <brobecker@adacore.com>
3253
3254 Fix -Wshadow warnings (seen on ppc-aix)
3255 * xcofflink.c: Replace finfo by flinfo throughout.
3256
3257 For older changes see ChangeLog-2009
3258 \f
3259 Local Variables:
3260 mode: change-log
3261 left-margin: 8
3262 fill-column: 74
3263 version-control: never
3264 End:
This page took 0.09794 seconds and 4 git commands to generate.