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