PR binutils/13292
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2011-10-24 Pau Garcia i Quiles <pgquiles@elpauer.org>
2
3 PR binutils/13292
4 * bfd-in.h: Include <sys/stat.h> rather than forward defining
5 struct stat.
6 * bfd-in2.h: Regenerate.
7
8 2011-10-21 H.J. Lu <hongjiu.lu@intel.com>
9
10 PR ld/13302
11 * elf32-i386.c (elf_i386_relocate_section): Replace
12 R_386_IRELATIVE with R_386_RELATIVE.
13
14 * elf64-x86-64.c (elf_x86_64_relocate_section): Replace
15 R_X86_64_IRELATIVE with R_X86_64_RELATIVE.
16
17 2011-10-21 H.J. Lu <hongjiu.lu@intel.com>.
18
19 * elf32-i386.c (elf_i386_relocate_section): Fix a typo in
20 comments.
21 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
22
23 2011-10-21 H.J. Lu <hongjiu.lu@intel.com>
24
25 PR ld/13302
26 * elf32-i386.c (elf_i386_link_hash_table): Add next_jump_slot_index
27 and next_irelative_index.
28 (elf_i386_link_hash_table_create): Initialize next_jump_slot_index
29 and next_irelative_index.
30 (elf_i386_allocate_dynrelocs): Increment reloc_count instead of
31 next_tls_desc_index.
32 (elf_i386_size_dynamic_sections): Set next_tls_desc_index and
33 next_irelative_index from reloc_count.
34 (elf_i386_finish_dynamic_symbol): Put R_386_IRELATIVE after
35 R_386_JUMP_SLOT.
36
37 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
38 next_jump_slot_index and next_irelative_index.
39 (elf_x86_64_link_hash_table_create): Initialize
40 next_jump_slot_index and next_irelative_index.
41 (elf_x86_64_size_dynamic_sections): Set next_irelative_index
42 from reloc_count.
43 (elf_x86_64_finish_dynamic_symbol): Put R_X86_64_IRELATIVE after
44 R_X86_64_JUMP_SLOT.
45
46 2011-10-20 Nick Clifton <nickc@redhat.com>
47
48 PR ld/13049
49 * elf32-arm.c (STUB_SUFFIX): Avoid collision with user namespace
50 symbol names.
51 * elf64-ppc.c (STUB_SUFFIX): Likewise.
52 * elf32-hppa.c (STUB_SUFFIX): Likewise.
53
54 2011-10-20 Alan Modra <amodra@gmail.com>
55
56 * elf32-i386.c (i386_opcode16): Delete.
57 (elf_i386_check_tls_transition): Use memcmp to compare contents.
58 * elf64-x86-64.c (x86_64_opcode16, x86_64_opcode32): Delete.
59 (elf_x86_64_check_tls_transition): Use memcmp to compare contents.
60
61 2011-10-19 Alan Modra <amodra@gmail.com>
62
63 PR ld/13177
64 * elflink.c (_bfd_elf_gc_mark_rsec): Set symbol "mark".
65 (elf_gc_sweep_symbol): Don't test plt/got refcounts, instead test
66 "mark". Hide undefweak too. Clear def_regular and ref_regular.
67 * elf-m10300.c (mn10300_elf_relocate_section): Ignore unresolved
68 reloc errors from garbage-collected code.
69 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
70 * elf32-bfin.c (bfin_relocate_section): Likewise.
71 (bfinfdpic_relocate_section): Likewise.
72 * elf32-cris.c (cris_elf_relocate_section): Likewise.
73 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
74 * elf32-i386.c (elf_i386_relocate_section): Likewise.
75 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
76 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
77 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
78 * elf32-s390.c (elf_s390_relocate_section): Likewise.
79 * elf32-sh.c (sh_elf_relocate_section): Likewise.
80 * elf32-spu.c (spu_elf_relocate_section): Likewise.
81 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
82 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
83 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
84 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
85 * elf64-s390.c (elf_s390_relocate_section): Likewise.
86 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
87 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
88 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
89 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
90
91 2011-10-19 Alan Modra <amodra@gmail.com>
92
93 PR ld/13311
94 * elflink.c (elf_link_output_extsym): Correct test for warning when
95 forced local executable syms are referenced from shared libraries.
96
97 2011-10-19 Alan Modra <amodra@gmail.com>
98
99 PR ld/13254
100 * elflink.c (bfd_elf_final_link): Emit error_textrel error.
101
102 2011-10-18 David S. Miller <davem@davemloft.net>
103
104 PR binutils/13301
105 * elfxx-sparc.c (sparc_elf_find_reloc_at_ofs): New function.
106 (_bfd_sparc_elf_relocate_section): Always move the __tls_get_addr
107 call delay slot instruction forward 4 bytes when performing
108 relaxation.
109
110 2011-10-17 Alan Modra <amodra@gmail.com>
111
112 PR ld/12975
113 PR ld/13195
114 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Apply 2011-09-15
115 and 2011-09-29 bfd_elf_gc_mark_dynamic_ref_symbol changes here too.
116
117 2011-10-14 Hans-Peter Nilsson <hp@axis.com>
118
119 * elf32-cris.c (cris_elf_gc_sweep_hook) <R_CRIS_16_GOTPLT>
120 <R_CRIS_32_GOTPLT>: Fix missing update of gotplt refcount for
121 global symbols.
122 <R_CRIS_8, R_CRIS_16, R_CRIS_32>: New cases for similar missing
123 updates of the plt refcount.
124 (elf_cris_adjust_gotplt_to_got): Assert integrity of the gotplt
125 refcount in relation to the plt refcount.
126
127 2011-10-13 Richard Sandiford <richard.sandiford@linaro.org>
128
129 * elf32-arm.c (elf32_arm_final_link_relocate): Mark PLT calls via
130 stubs as resolved.
131
132 2011-10-11 Alan Modra <amodra@gmail.com>
133
134 PR binutils/13278
135 * archive.c (bfd_generic_archive_p): Only check first element
136 when target_defaulted.
137 (_bfd_construct_extended_name_table): Use ar_maxnamelen.
138 (_bfd_archive_bsd44_construct_extended_name_table): Likewise.
139
140 2011-10-11 Alan Modra <amodra@gmail.com>
141
142 PR binutils/13257
143 * archive.c (_bfd_find_nested_archive, _bfd_get_elt_at_filepos): Open
144 thin archive element using container target if not defaulted.
145
146 2011-10-10 Nick Clifton <nickc@redhat.com>
147
148 * po/es.po: Updated Spanish translation.
149 * po/fi.po: Updated Finnish translation.
150 * po/fr.po: Updated French translation.
151 * po/ru.po: Updated Russian translation.
152
153 2011-10-10 Alan Modra <amodra@gmail.com>
154
155 * elf64-ppc.c (ppc64_elf_howto_table): Add R_PPC64_TOCSAVE entry.
156 (struct ppc_link_hash_table): Add tocsave_htab.
157 (struct tocsave_entry): New.
158 (tocsave_htab_hash, tocsave_htab_eq, tocsave_find): New functions.
159 (ppc64_elf_link_hash_table_create): Create tocsave_htab..
160 (ppc64_elf_link_hash_table_free): ..and delete it.
161 (build_plt_stub): Always put STD_R2_40R1 first.
162 (ppc64_elf_size_stubs): Check for R_PPC64_TOCSAVE following reloc
163 on plt call. If present add prologue nop location to tocsave_htab.
164 (ppc64_elf_relocate_section): Convert prologue nop to std. Skip
165 first insn of plt call stub when R_PPC64_TOCSAVE present.
166
167 2011-10-08 H.J. Lu <hongjiu.lu@intel.com>
168
169 PR ld/13250
170 * elflink.c (elf_link_add_object_symbols): Preserve the maximum
171 alignment and size for common symbols.
172
173 2011-10-08 Alan Modra <amodra@gmail.com>
174
175 PR ld/13229
176 PR ld/13244
177 * elflink.c (elf_link_add_object_symbols): Don't make IR symbols
178 dynamic.
179
180 2011-10-08 Alan Modra <amodra@gmail.com>
181
182 PR ld/13229
183 * elflink.c (elf_link_output_extsym): Strip defined plugin symbols
184 even when strip_discarded is false.
185
186 2011-10-05 Kai Tietz <ktietz@redhat.com>
187
188 * coffgen.c (coff_write_alien_symbol): Don't write
189 symbol for discarded sections, if strip_discarded isn't
190 explicit set to false.
191 (coff_write_native_symbol): Likewise.
192
193 2011-10-05 DJ Delorie <dj@redhat.com>
194 Nick Clifton <nickc@redhat.com>
195
196 * elf32-rx.c: Add support for PID mode.
197 (rx_elf_relocate_section): Add checks for unsafe PID relocations.
198 Include addend in R_RX_SYM relocations.
199
200 2011-09-30 Tristan Gingold <gingold@adacore.com>
201
202 * dwarf2.c (struct dwarf2_debug): Add field debug_sections.
203 (read_section): Add sec argument. Adjust the code to get section
204 names from it.
205 (read_indirect_string): Adjust call to read_section.
206 (read_abbrevs): Ditto.
207 (decode_line_info): Ditto.
208 (read_debug_ranges): Ditto.
209 (DWARF2_DEBUG_INFO, DWARF2_COMPRESSED_DEBUG_INFO): Remove.
210 (find_debug_info): Add debug_sections parameter. Use it instead
211 the above macros.
212 (place_sections): Get section names from stash.
213 (find_line): Add debug_sections argument. Initialize
214 debug_sections field of stash from it.
215 Adjust calls to find_debug_info.
216 (_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
217 Adjust call to find_line.
218 (_bfd_dwarf2_find_line): Adjust call to find_line.
219 * libcoff-in.h (struct dwarf_debug_section): New declaration.
220 (coff_find_nearest_line_with_names): Likewise.
221 * libcoff.h: Regenerate.
222 * libbfd-in.h (struct dwarf_debug_section): Move declaration.
223 (dwarf_debug_sections): Likewise.
224 (_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
225 * libbfd.h: Regenerate.
226 * elf.c (_bfd_elf_find_nearest_line): Adjust call to
227 _bfd_dwarf2_find_nearest_line.
228 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Ditto.
229 * elf64-alpha.c (elf64_alpha_find_nearest_line): Ditto.
230 * elf32-arm.c (elf32_arm_find_nearest_line): Ditto.
231 * coffgen.c (coff_find_nearest_line_with_names): New function.
232 (coff_find_nearest_line): Calls coff_find_nearest_line_with_names.
233 * coff-rs6000.c (xcoff_debug_sections): New constant.
234 (xcoff_find_nearest_line): New function.
235 (rs6000coff_vec): Use xcoff_find_nearest_line.
236 (pmac_xcoff_vec): Ditto.
237
238 2011-09-30 Alan Modra <amodra@gmail.com>
239
240 PR ld/13235
241 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add ha_relocs_not_using_r2.
242 (ppc64_elf_edit_toc): Check HA relocs.
243 (ha_reloc_match): Delete function.
244 (ppc64_elf_relocate_section): Remove delayed HA nop optimization.
245 Instead do it and low part optimization based on
246 ha_relocs_not_using_r2.
247
248 2011-09-29 Alan Modra <amodra@gmail.com>
249
250 PR ld/13233
251 * elflink.c (_bfd_elf_gc_mark_extra_sections): Mark single member
252 debug and special section groups.
253
254 2011-09-29 H.J. Lu <hongjiu.lu@intel.com>
255
256 PR ld/13195
257 * elflink.c (_bfd_elf_merge_symbol): Don't set dynamic_def when
258 clearing def_dynamic.
259 (elf_link_add_object_symbols): Likewise. Set dynamic_def when
260 setting def_dynamic.
261 (bfd_elf_gc_mark_dynamic_ref_symbol): Check if a symbol is
262 versioned.
263
264 2011-09-27 Kai Tietz <ktietz@redhat.com>
265
266 * coffcode.h (sec_to_styp_flags): Handle
267 SEC_LINK_DUPLICATES_SAME_CONTENTS, and
268 SEC_LINK_DUPLICATES_SAME_SIZE.
269
270 2011-09-22 Tristan Gingold <gingold@adacore.com>
271
272 * configure.in: Bump version to 2.22.51
273 * configure: Regenerate.
274
275 2011-09-21 David S. Miller <davem@davemloft.net>
276
277 * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): New.
278 * elfxx-sparc.h: Declare it.
279 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Call it.
280 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
281
282 2011-09-21 Tristan Gingold <gingold@adacore.com>
283
284 * mach-o.c (bfd_mach_o_convert_section_name_to_bfd): Add comment.
285 Deals with size limited strings.
286 (bfd_mach_o_build_commands): Initialize more fields.
287
288 2011-09-15 H.J. Lu <hongjiu.lu@intel.com>
289
290 PR ld/13177
291 * elflink.c (elf_gc_sweep_symbol): Also hide symbols without PLT
292 nor GOT references.
293
294 2011-09-15 H.J. Lu <hongjiu.lu@intel.com>
295
296 PR ld/12975
297 * bfd-in.h (bfd_elf_size_dynamic_sections): Remove pointer
298 to struct bfd_elf_version_tree.
299
300 * elflink.c (elf_info_failed): Remove verdefs.
301 (_bfd_elf_export_symbol): Updated.
302 _bfd_elf_link_assign_sym_version): Likewise.
303 (bfd_elf_size_dynamic_sections): Remove pointer to struct
304 bfd_elf_version_tree. Updated.
305 (bfd_elf_gc_mark_dynamic_ref_symbol): Check if a symbol is hidden
306 by linker script.
307
308 * linker.c (bfd_hide_sym_by_version): New.
309
310 * bfd-in2.h: Regenerated.
311
312 2011-09-12 H.J. Lu <hongjiu.lu@intel.com>
313
314 PR ld/13178
315 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Use .got.plt
316 if there are no GOT relocations.
317
318 2011-09-09 Kai Tietz <ktietz@redhat.com>
319
320 * peicode.h (pe_ILF_build_a_bfd): Don't remove leading underscore
321 for targets without symbol_leading_char.
322
323 2011-09-08 Bernd Jendrissek <bernd.jendrissek@gmail.com>
324
325 * bfdwin.c (bfd_get_file_window): Fix memory leak.
326
327 2011-09-07 Alan Modra <amodra@gmail.com>
328
329 PR ld/13131
330 * bfd/elf64-ppc.c (adjust_toc_syms): Ensure ppc64_elf_howto_table
331 is initialized.
332
333 2011-09-06 Alan Modra <amodra@gmail.com>
334
335 PR ld/13131
336 * elf64-ppc.c (adjust_toc_syms): Delete redundant code.
337 (ppc64_elf_edit_toc): Fix style nit. Report some details
338 on linker failure due to reference in debug or non-alloc
339 sections to optimized away toc entry, and don't abort.
340
341 2011-09-01 Christophe Lyon <christophe.lyon@st.com>
342
343 * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip excluded
344 sections.
345
346 2011-08-26 Nick Clifton <nickc@redhat.com>
347
348 * po/es.po: Updated Spanish translation.
349
350 2011-08-19 Alan Modra <amodra@gmail.com>
351
352 * elf64-ppc.c (ppc64_elf_edit_toc): Ignore can_optimize bit if
353 we haven't seen expected -mcmodel=medium/large code relocs.
354
355 2011-08-18 Tristan Gingold <gingold@adacore.com>
356
357 * mach-o.c (bfd_mach_o_read_segment): Initialize list.
358
359 2011-08-17 Tristan Gingold <gingold@adacore.com>
360
361 * mach-o.c (bfd_mach_o_write_section_32): Fix typo.
362
363 2011-08-17 Alan Modra <amodra@gmail.com>
364
365 PR ld/12762
366 * bfd-in.h (struct bfd_section_already_linked): Forward declare.
367 (_bfd_handle_already_linked): Declare.
368 * coff-alpha.c (_bfd_ecoff_section_already_linked): Define as
369 _bfd_coff_section_already_linked.
370 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
371 * coffcode.h (coff_section_already_linked): Likewise.
372 * cofflink.c (coff_link_add_symbols): Revert 2011-07-09 changes.
373 * elf-bfd.h: Likewise.
374 * libbfd-in.h: Likewise.
375 * targets.c: Likewise.
376 * linker.c (bfd_section_already_linked): Likewise.
377 (bfd_section_already_linked_table_lookup): Likewise.
378 (bfd_section_already_linked_table_insert): Likewise.
379 (_bfd_generic_section_already_linked): Likewise. Call
380 _bfd_handle_already_linked.
381 (_bfd_handle_already_linked): New function, split out from..
382 * elflink.c (_bfd_elf_section_already_linked): ..here. Revert
383 2011-07-09 changes. Avoid unnecessary strcmp when matching
384 already_linked_list entries. Match plugin linkonce section.
385 (section_signature): Delete.
386 * coffgen.c (_bfd_coff_section_already_linked): New function.
387 * libcoff-in.h (_bfd_coff_section_already_linked): Declare.
388 * libbfd.h: Regenerate.
389 * libcoff.h: Regenerate.
390 * bfd-in2.h: Regenerate.
391
392 2011-08-14 Alan Modra <amodra@gmail.com>
393
394 * elf32-ppc.c (ppc_elf_select_plt_layout): Force bss-plt when
395 shared and call to _mcount will go via plt.
396
397 2011-08-14 Alan Modra <amodra@gmail.com>
398
399 * elf64-ppc.c: Prefix all einfo error strings with "%P: ".
400 * elf32-ppc.c: Likewise.
401 (ppc_elf_select_plt_layout): Use einfo rather than info to report
402 forced bss-plt.
403
404 2011-08-12 H.J. Lu <hongjiu.lu@intel.com>
405
406 PR ld/13082
407 * elf64-x86-64.c (x86_64_elf_howto_table): Add R_X86_64_RELATIVE64.
408 (elf_x86_64_relocate_section): Treat R_X86_64_64 like R_X86_64_32
409 and zero-extend it to 64bit if addend is zero for x32. Generate
410 R_X86_64_RELATIVE64 for x32.
411
412 2011-08-09 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
413
414 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
415 * bfd-in2.h (bfd_elf32_arm_set_target_relocs): Likewise.
416 * elf32-arm.c (elf32_arm_link_hash_table): New field.
417 (elf232_arm_link_hash_table_create): Initialise new field.
418 (check_use_blx): Change test depending on fix_arm1176.
419 (bfd_elf32_arm_set_target_relocs): Set fix_arm1176 from
420 command line options.
421
422 2011-08-08 Tristan Gingold <gingold@adacore.com>
423
424 * mach-o.c (struct mach_o_segment_name_xlat): Add comments.
425 (segsec_names_xlat): Reorder elements.
426 (bfd_mach_o_read_section_32): Fix typo.
427 (bfd_mach_o_read_section_64): Fix typo.
428
429 2011-08-08 Tristan Gingold <gingold@adacore.com>
430
431 * mach-o.h (BFD_MACH_O_SEGNAME_SIZE): New macro.
432 (BFD_MACH_O_SECTNAME_SIZE): Ditto.
433 (bfd_mach_o_section): Use them. Add next field.
434 (bfd_mach_o_segment_command): Replace sections array by
435 sect_head and sect_tail.
436 (bfd_mach_o_get_mach_o_section): New macro.
437 (bfd_mach_o_lookup_section): Remove.
438 (bfd_mach_o_new_section_hook): New function.
439 * mach-o.c (bfd_mach_o_normalize_section_name): Use strncmp
440 instead of strcmp.
441 (bfd_mach_o_convert_section_name_to_bfd): Replaces section
442 parameter with segname and sectname parameters. Adjust.
443 (bfd_mach_o_append_section_to_segment): New function. Use a
444 linked list for Mach-O sections.
445 (bfd_mach_o_write_segment_32): Adjust.
446 (bfd_mach_o_write_segment_64): Ditto.
447 (bfd_mach_o_build_commands): Fix comment. Adjust.
448 (bfd_mach_o_flatten_sections): Adjust.
449 (bfd_mach_o_print_section_map): Adjust.
450 (bfd_mach_o_set_section_flags_from_bfd): Ditto.
451 (bfd_mach_o_new_section_hook): New function.
452 (bfd_mach_o_init_section_from_mach_o): Ditto.
453 (bfd_mach_o_read_section_32): Remove section parameter.
454 Return a section instead.
455 (bfd_mach_o_read_section_64): Ditto.
456 (bfd_mach_o_read_section): Ditto.
457 (bfd_mach_o_make_bfd_section): Adjust.
458 (bfd_mach_o_read_segment): Adjust for new profile of
459 bfd_mach_o_read_section.
460 (bfd_mach_o_lookup_section): Remove.
461 * mach-o-target.c (bfd_mach_o_new_section_hook): Remove.
462
463 2011-08-08 Tristan Gingold <gingold@adacore.com>
464
465 * mach-o.h (bfd_mach_o_version_min_command): New structure.
466 (bfd_mach_o_load_command): Add version_min.
467 (mach_o_data_struct): Fix comment.
468 * mach-o.c (bfd_mach_o_read_version_min): New function.
469 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_FUNCTION_STARTS,
470 BFD_MACH_O_LC_VERSION_MIN_MACOSX and
471 BFD_MACH_O_LC_VERSION_MIN_IPHONEOS.
472 (bfd_mach_o_get_name_or_null): New function.
473 (bfd_mach_o_get_name): Use the above new one.
474 (bfd_mach_o_load_command_name): Add the above new commands.
475 (bfd_mach_o_bfd_print_private_bfd_data): Display numerically
476 unknown commands. Handle BFD_MACH_O_LC_FUNCTION_STARTS,
477 BFD_MACH_O_LC_VERSION_MIN_MACOSX and
478 BFD_MACH_O_LC_VERSION_MIN_IPHONEOS.
479
480 2011-08-08 Tristan Gingold <gingold@adacore.com>
481
482 * mach-o.h: Move size macros to external.h
483 Move reloc macros to reloc.h and x86-64.h.
484 * mach-o-i386.c: Includes mach-o/reloc.h
485 * mach-o-x86-64.c: Ditto and includes mach-o/x86-64.h
486 * mach-o.c: Add includes.
487 (bfd_mach_o_write_header): Use structure from external.h to convert.
488 (bfd_mach_o_write_thread): Ditto.
489 (bfd_mach_o_write_relocs): Ditto.
490 (bfd_mach_o_write_section_32): Ditto.
491 (bfd_mach_o_write_section_64): Ditto.
492 (bfd_mach_o_write_segment_32): Ditto.
493 (bfd_mach_o_write_segment_64): Ditto.
494 (bfd_mach_o_write_symtab): Ditto.
495 (bfd_mach_o_write_contents): Ditto.
496 (bfd_mach_o_read_header): Ditto.
497 (bfd_mach_o_read_section_32): Ditto.
498 (bfd_mach_o_read_section_64): Ditto.
499 (bfd_mach_o_read_symtab_symbol): Ditto.
500 (bfd_mach_o_read_dylinker): Ditto.
501 (bfd_mach_o_read_dylib): Ditto.
502 (bfd_mach_o_read_dysymtab): Ditto.
503 (bfd_mach_o_read_symtab): Ditto.
504 (bfd_mach_o_read_linkedit): Ditto.
505 (bfd_mach_o_read_str): Ditto.
506 (bfd_mach_o_read_dyld_info): Ditto.
507 (bfd_mach_o_read_segment): Ditto.
508 (bfd_mach_o_read_command): Ditto.
509 (bfd_mach_o_archive_p): Ditto.
510 (bfd_mach_o_canonicalize_one_reloc): Ditto. Change the BUF parameter.
511 (bfd_mach_o_canonicalize_relocs): Adjust to call the above function.
512 (bfd_mach_o_read_dysymtab_symbol): Rename BUF variable.
513 (bfd_mach_o_read_uuid): Remove useless cast. Use a macro instead
514 of an hard-coded value.
515
516 2011-08-08 Tristan Gingold <gingold@adacore.com>
517
518 * mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Fix cut-and-past typos.
519 (bfd_mach_o_x86_64_swap_reloc_out): Handle BFD_RELOC_32_PCREL,
520 BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64 and
521 BFD_RELOC_MACH_O_X86_64_GOT_LOAD. Share common code.
522
523 2011-08-08 Tristan Gingold <gingold@adacore.com>
524
525 * mach-o.c (bfd_mach_o_normalize_section_name): New function.
526 (bfd_mach_o_convert_section_name_to_bfd): Use it.
527 (bfd_mach_o_get_section_type_from_name): New function.
528 (bfd_mach_o_get_section_attribute_from_name): Ditto.
529 * mach-o.h (bfd_mach_o_section): Move bfdsection field at the end.
530 Add comments. Add prototypes for the above new functions.
531
532 2011-08-05 Mark Kettenis <kettenis@gnu.org>
533
534 * netbsd-core.c (netbsd_core_vec): Init match_priority field.
535
536 2011-08-05 Alan Modra <amodra@gmail.com>
537
538 * elf64-ppc.c (maybe_strip_output): New function.
539 (ppc64_elf_size_stubs): Use it to strip .branch_lt and .eh_frame.
540
541 2011-08-05 Alan Modra <amodra@gmail.com>
542
543 PR ld/12762
544 * elflink.c (_bfd_elf_section_already_linked): Return matched
545 status. Remove COFF comdat section handling.
546 * linker.c (_bfd_generic_section_already_linked): Return matched
547 status. Don't set SEC_GROUP in l_flags for plugin entries.
548 (bfd_section_already_linked): Update prototype.
549 * targets.c (_section_already_linked): Likewise.
550 * elf-bfd.h (_bfd_elf_section_already_linked): Likewise.
551 * libbfd-in.h (_bfd_generic_section_already_linked): Likewise.
552 (_bfd_nolink_section_already_linked): Update.
553 * libbfd.h: Regenerate.
554 * bfd-in2.h: Regenerate.
555
556 2011-08-05 Alan Modra <amodra@gmail.com>
557
558 * elf32-ppc.c: Include dwarf2.h.
559 (struct ppc_elf_link_hash_table): Add glink_eh_frame.
560 (ppc_elf_create_glink): Create .eh_frame section.
561 (glink_eh_frame_cie): New array.
562 (ppc_elf_size_dynamic_sections): Size glink_eh_frame.
563 (ppc_elf_finish_dynamic_sections): Write glink_eh_frame.
564
565 2011-08-04 Tristan Gingold <gingold@adacore.com>
566
567 * vms-alpha.c (_bfd_vms_write_eeom): Round vms_linkage_index.
568 (_bfd_vms_write_etir): Initialize vms_linkage_index to 0.
569
570 2011-08-03 Tristan Gingold <gingold@adacore.com>
571
572 * mach-o.c (bfd_mach_o_canonicalize_symtab): Handle no symbols case.
573 (bfd_mach_o_read_symtab_symbols): Return if no symbols.
574
575 2011-08-02 Maciej W. Rozycki <macro@codesourcery.com>
576
577 * elfxx-mips.c (check_4byte_branch): Remove function.
578 (check_relocated_bzc): New function.
579 (_bfd_mips_elf_relax_section): Permit the relaxation of LUI
580 instructions that immediately follow a compact branch
581 instruction.
582
583 2011-08-02 Alan Modra <amodra@gmail.com>
584
585 * elf64-ppc.c (build_plt_stub): Correct emitted relocs when no
586 plt_static_chain.
587 (ppc_build_one_stub): Adjust get_relocs call to suit..
588 (ppc_size_one_stub): ..and reloc sizing. Correct plt size corner case.
589
590 2011-08-01 H.J. Lu <hongjiu.lu@intel.com>
591
592 PR ld/13048
593 * archures.c (bfd_mach_i386_intel_syntax): New.
594 (bfd_mach_i386_i8086): Updated.
595 (bfd_mach_i386_i386): Likewise.
596 (bfd_mach_x86_64): Likewise.
597 (bfd_mach_x64_32): Likewise.
598 (bfd_mach_i386_i386_intel_syntax): Likewise.
599 (bfd_mach_x86_64_intel_syntax): Likewise.
600 (bfd_mach_x64_32_intel_syntax): Likewise.
601 (bfd_mach_l1om): Likewise.
602 (bfd_mach_l1om_intel_syntax): Likewise.
603 (bfd_mach_k1om): Likewise.
604 (bfd_mach_k1om_intel_syntax): Likewise.
605
606 * bfd-in2.h: Regenerated.
607
608 * cpu-i386.c (bfd_i386_compatible): Check mach instead of
609 bits_per_address.
610 (bfd_x64_32_arch_intel_syntax): Set bits_per_address to 64.
611 (bfd_x64_32_arch): Likewise.
612
613 * elf64-x86-64.c: Include "libiberty.h".
614 (x86_64_elf_howto_table): Append x32 R_X86_64_32.
615 (elf_x86_64_rtype_to_howto): Support x32 R_X86_64_32.
616 (elf_x86_64_reloc_type_lookup): Likewise.
617 (elf_x86_64_reloc_name_lookup): Likewise.
618 (elf_x86_64_relocate_section): Likewise.
619 (elf_x86_64_check_relocs): Allow R_X86_64_64 relocations for x32.
620
621 2011-07-29 Maciej W. Rozycki <macro@codesourcery.com>
622
623 * elfxx-mips.c (check_br32): Fix return type.
624
625 2011-07-29 Maciej W. Rozycki <macro@codesourcery.com>
626
627 * elfxx-mips.c (bz_insn_16): Correct opcode mask.
628
629 2011-07-29 Maciej W. Rozycki <macro@codesourcery.com>
630
631 * elfxx-mips.c: Adjust comments throughout.
632 (mips_elf_relax_delete_bytes): Reshape code.
633 (_bfd_mips_elf_relax_section): Remove check for
634 R_MICROMIPS_GPREL16 relocations. Reshape code.
635
636 2011-07-28 Roland McGrath <mcgrathr@google.com>
637
638 * elf32-i386.c (NACL_PLT_ENTRY_SIZE, NACLMASK): New macros.
639 (elf_i386_nacl_plt0_entry): New variable.
640 (elf_i386_plt_entry): New variable.
641 (elf_i386_nacl_pic_plt0_entry): New variable.
642 (elf_i386_nacl_pic_plt_entry): New variable.
643 (elf_i386_nacl_plt, elf_i386_nacl_arch_bed): New variables.
644 (elf_backend_arch_data): New macro setting for elf_i386_nacl_vec stanza.
645 (elf_backend_plt_alignment): Likewise.
646
647 * config.bfd: Handle i[3-7]86-*-nacl*.
648 * elf32-i386.c (bfd_elf32_i386_nacl_vec): New backend vector stanza.
649 * targets.c: Support bfd_elf32_i386_nacl_vec.
650 * configure.in: Likewise.
651 * configure: Regenerated.
652
653 * elf32-i386.c (struct elf_i386_plt_layout): New type.
654 (GET_PLT_ENTRY_SIZE): New macro.
655 (elf_i386_plt): New variable.
656 (struct elf_i386_backend_data): New member `plt'.
657 (elf_i386_arch_bed): Add initializer for it.
658 (elf_i386_vxworks_arch_bed): Likewise.
659 (elf_i386_allocate_dynrelocs): Use GET_PLT_ENTRY_SIZE.
660 (elf_i386_plt_sym_val): Likewise.
661 (elf_i386_relocate_section): Likewise.
662 (elf_i386_finish_dynamic_symbol): Likewise.
663 Also use other elf_i386_plt_layout members for PLT details.
664 (elf_i386_finish_dynamic_sections): Likewise.
665
666 * elf32-i386.c (struct elf_i386_backend_data): New type.
667 (get_elf_i386_backend_data): New macro.
668 (elf_i386_arch_bed): New variable.
669 (elf_backend_arch_data): New macro.
670 (struct elf_i386_link_hash_table): Remove plt0_pad_byte and is_vxworks.
671 (elf_i386_link_hash_table_create): Don't initialize them.
672 (elf_i386_create_dynamic_sections): Find is_vxworks flags in
673 elf_i386_backend_data, not elf_i386_link_hash_table.
674 (elf_i386_adjust_dynamic_symbol): Likewise.
675 (elf_i386_allocate_dynrelocs): Likewise.
676 (elf_i386_readonly_dynrelocs): Likewise.
677 (elf_i386_size_dynamic_sections): Likewise.
678 (elf_i386_relocate_section): Likewise.
679 (elf_i386_finish_dynamic_symbol): Likewise.
680 (elf_i386_finish_dynamic_sections): Likewise. Same for plt0_pad_byte.
681 (elf_i386_vxworks_link_hash_table_create): Function removed.
682 (elf_i386_vxworks_arch_bed): New variable.
683 (elf_backend_arch_data): New macro in elf32-i386-vxworks stanza.
684
685 * elf-bfd.h (elf_backend_data): New member arch_backend_data.
686 * elfxx-target.h (elf_backend_arch_data): New macro.
687 (elfNN_bed): Use it as initializer for the new member.
688
689 2011-07-28 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
690
691 * elf64-hppa.c (elf_hppa_final_link_relocate): Fix handling of out
692 of range branches.
693
694 2011-07-26 Jakub Jelinek <jakub@redhat.com>
695
696 * dwarf2.c (dwarf_debug_sections): Add .debug_macro
697 and .zdebug_macro entry.
698 (dwarf_debug_section_enum): Add debug_macro.
699
700 2011-07-26 Alan Modra <amodra@gmail.com>
701
702 * elf64-ppc.c: Include dwarf2.h.
703 (struct ppc_link_hash_table): Add glink_eh_frame.
704 (create_linkage_sections): Create .eh_frame section.
705 (ppc64_elf_size_dynamic_sections): Arrange to drop unneeded
706 glink_eh_frame.
707 (glink_eh_frame_cie): New array.
708 (ppc64_elf_size_stubs): Size glink_eh_frame.
709 (ppc64_elf_build_stubs): Init glink_eh_frame contents.
710 (ppc64_elf_finish_dynamic_sections): Write glink_eh_frame.
711
712 2011-07-25 Hans-Peter Nilsson <hp@bitrange.com>
713
714 PR ld/12815
715 * elf64-mmix.c (struct _mmix_elf_section_data): New members
716 has_warned_bpo and has_warned_pushj.
717 (mmix_final_link_relocate): Remove PARAMS and PTR macros,
718 converting to ISO C. Add new parameter error_message. All
719 callers changed.
720 (mmix_elf_perform_relocation): Ditto.
721 <case R_MMIX_PUSHJ_STUBBABLE, case R_MMIX_BASE_PLUS_OFFSET>:
722 Handle the case where mmix_elf_check_common_relocs has not been
723 called, missing preparations for relocs of the respective type.
724
725 2011-07-24 Chao-ying Fu <fu@mips.com>
726 Ilie Garbacea <ilie@mips.com>
727 Maciej W. Rozycki <macro@codesourcery.com>
728 Joseph Myers <joseph@codesourcery.com>
729 Catherine Moore <clm@codesourcery.com>
730 Richard Sandiford <rdsandiford@googlemail.com>
731
732 * archures.c (bfd_mach_mips_micromips): New macro.
733 * cpu-mips.c (I_micromips): New enum value.
734 (arch_info_struct): Add bfd_mach_mips_micromips.
735 * elfxx-mips.h (_bfd_mips_elf_is_target_special_symbol): New
736 prototype.
737 (_bfd_mips_elf_relax_section): Likewise.
738 (_bfd_mips16_elf_reloc_unshuffle): Rename to...
739 (_bfd_mips_elf_reloc_unshuffle): ... this. Handle microMIPS
740 ASE.
741 (_bfd_mips16_elf_reloc_shuffle): Rename to...
742 (_bfd_mips_elf_reloc_shuffle): ... this. Handle microMIPS ASE.
743 (gprel16_reloc_p): Handle microMIPS ASE.
744 (literal_reloc_p): New function.
745 * elf32-mips.c (elf_micromips_howto_table_rel): New variable.
746 (_bfd_mips_elf32_gprel16_reloc): Handle microMIPS ASE.
747 (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
748 and _bfd_mips_elf_reloc_shuffle changes.
749 (mips_elf_gprel32_reloc): Update comment.
750 (micromips_reloc_map): New variable.
751 (bfd_elf32_bfd_reloc_type_lookup): Handle microMIPS ASE.
752 (mips_elf32_rtype_to_howto): Likewise.
753 (mips_info_to_howto_rel): Likewise.
754 (bfd_elf32_bfd_is_target_special_symbol): Define.
755 (bfd_elf32_bfd_relax_section): Likewise.
756 * elf64-mips.c (micromips_elf64_howto_table_rel): New variable.
757 (micromips_elf64_howto_table_rela): Likewise.
758 (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
759 and _bfd_mips_elf_reloc_shuffle changes.
760 (micromips_reloc_map): Likewise.
761 (bfd_elf64_bfd_reloc_type_lookup): Handle microMIPS ASE.
762 (bfd_elf64_bfd_reloc_name_lookup): Likewise.
763 (mips_elf64_rtype_to_howto): Likewise.
764 (bfd_elf64_bfd_is_target_special_symbol): Define.
765 * elfn32-mips.c (elf_micromips_howto_table_rel): New variable.
766 (elf_micromips_howto_table_rela): Likewise.
767 (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
768 and _bfd_mips_elf_reloc_shuffle changes.
769 (micromips_reloc_map): Likewise.
770 (bfd_elf32_bfd_reloc_type_lookup): Handle microMIPS ASE.
771 (bfd_elf32_bfd_reloc_name_lookup): Likewise.
772 (mips_elf_n32_rtype_to_howto): Likewise.
773 (bfd_elf32_bfd_is_target_special_symbol): Define.
774 * elfxx-mips.c (LA25_LUI_MICROMIPS_1): New macro.
775 (LA25_LUI_MICROMIPS_2): Likewise.
776 (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise.
777 (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise.
778 (TLS_RELOC_P): Handle microMIPS ASE.
779 (mips_elf_create_stub_symbol): Adjust value of stub symbol if
780 target is a microMIPS function.
781 (micromips_reloc_p): New function.
782 (micromips_reloc_shuffle_p): Likewise.
783 (got16_reloc_p, call16_reloc_p): Handle microMIPS ASE.
784 (got_disp_reloc_p, got_page_reloc_p): New functions.
785 (got_ofst_reloc_p): Likewise.
786 (got_hi16_reloc_p, got_lo16_reloc_p): Likewise.
787 (call_hi16_reloc_p, call_lo16_reloc_p): Likewise.
788 (hi16_reloc_p, lo16_reloc_p, jal_reloc_p): Handle microMIPS ASE.
789 (micromips_branch_reloc_p): New function.
790 (tls_gd_reloc_p, tls_ldm_reloc_p): Likewise.
791 (tls_gottprel_reloc_p): Likewise.
792 (_bfd_mips16_elf_reloc_unshuffle): Rename to...
793 (_bfd_mips_elf_reloc_unshuffle): ... this. Handle microMIPS
794 ASE.
795 (_bfd_mips16_elf_reloc_shuffle): Rename to...
796 (_bfd_mips_elf_reloc_shuffle): ... this. Handle microMIPS ASE.
797 (_bfd_mips_elf_lo16_reloc): Handle microMIPS ASE.
798 (mips_tls_got_index, mips_elf_got_page): Likewise.
799 (mips_elf_create_local_got_entry): Likewise.
800 (mips_elf_relocation_needs_la25_stub): Likewise.
801 (mips_elf_calculate_relocation): Likewise.
802 (mips_elf_perform_relocation): Likewise.
803 (_bfd_mips_elf_symbol_processing): Likewise.
804 (_bfd_mips_elf_add_symbol_hook): Likewise.
805 (_bfd_mips_elf_link_output_symbol_hook): Likewise.
806 (mips_elf_add_lo16_rel_addend): Likewise.
807 (_bfd_mips_elf_check_relocs): Likewise.
808 (mips_elf_adjust_addend): Likewise.
809 (_bfd_mips_elf_relocate_section): Likewise.
810 (mips_elf_create_la25_stub): Likewise.
811 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
812 (_bfd_mips_elf_gc_sweep_hook): Likewise.
813 (_bfd_mips_elf_is_target_special_symbol): New function.
814 (mips_elf_relax_delete_bytes): Likewise.
815 (opcode_descriptor): New structure.
816 (RA): New macro.
817 (OP32_SREG, OP32_TREG, OP16_VALID_REG): Likewise.
818 (b_insns_32, bc_insn_32, bz_insn_32, bzal_insn_32): New variables.
819 (beq_insn_32): Likewise.
820 (b_insn_16, bz_insn_16): New variables.
821 (BZC32_REG_FIELD): New macro.
822 (bz_rs_insns_32, bz_rt_insns_32): New variables.
823 (bzc_insns_32, bz_insns_16):Likewise.
824 (BZ16_REG, BZ16_REG_FIELD): New macros.
825 (jal_insn_32_bd16, jal_insn_32_bd32): New variables.
826 (jal_x_insn_32_bd32): Likewise.
827 (j_insn_32, jalr_insn_32): Likewise.
828 (ds_insns_32_bd16, ds_insns_32_bd32): Likewise.
829 (jalr_insn_16_bd16, jalr_insn_16_bd32, jr_insn_16): Likewise.
830 (JR16_REG): New macro.
831 (ds_insns_16_bd16): New variable.
832 (lui_insn): Likewise.
833 (addiu_insn, addiupc_insn): Likewise.
834 (ADDIUPC_REG_FIELD): New macro.
835 (MOVE32_RD, MOVE32_RS): Likewise.
836 (MOVE16_RD_FIELD, MOVE16_RS_FIELD): Likewise.
837 (move_insns_32, move_insns_16): New variables.
838 (nop_insn_32, nop_insn_16): Likewise.
839 (MATCH): New macro.
840 (find_match): New function.
841 (check_br16_dslot, check_br32_dslot): Likewise.
842 (check_br16, check_br32): Likewise.
843 (IS_BITSIZE): New macro.
844 (check_4byte_branch): New function.
845 (_bfd_mips_elf_relax_section): Likewise.
846 (_bfd_mips_elf_merge_private_bfd_data): Disallow linking MIPS16
847 and microMIPS modules together.
848 (_bfd_mips_elf_print_private_bfd_data): Handle microMIPS ASE.
849 * reloc.c (BFD_RELOC_MICROMIPS_7_PCREL_S1): New relocation.
850 (BFD_RELOC_MICROMIPS_10_PCREL_S1): Likewise.
851 (BFD_RELOC_MICROMIPS_16_PCREL_S1): Likewise.
852 (BFD_RELOC_MICROMIPS_GPREL16): Likewise.
853 (BFD_RELOC_MICROMIPS_JMP, BFD_RELOC_MICROMIPS_HI16): Likewise.
854 (BFD_RELOC_MICROMIPS_HI16_S): Likewise.
855 (BFD_RELOC_MICROMIPS_LO16): Likewise.
856 (BFD_RELOC_MICROMIPS_LITERAL): Likewise.
857 (BFD_RELOC_MICROMIPS_GOT16): Likewise.
858 (BFD_RELOC_MICROMIPS_CALL16): Likewise.
859 (BFD_RELOC_MICROMIPS_GOT_HI16): Likewise.
860 (BFD_RELOC_MICROMIPS_GOT_LO16): Likewise.
861 (BFD_RELOC_MICROMIPS_CALL_HI16): Likewise.
862 (BFD_RELOC_MICROMIPS_CALL_LO16): Likewise.
863 (BFD_RELOC_MICROMIPS_SUB): Likewise.
864 (BFD_RELOC_MICROMIPS_GOT_PAGE): Likewise.
865 (BFD_RELOC_MICROMIPS_GOT_OFST): Likewise.
866 (BFD_RELOC_MICROMIPS_GOT_DISP): Likewise.
867 (BFD_RELOC_MICROMIPS_HIGHEST): Likewise.
868 (BFD_RELOC_MICROMIPS_HIGHER): Likewise.
869 (BFD_RELOC_MICROMIPS_SCN_DISP): Likewise.
870 (BFD_RELOC_MICROMIPS_JALR): Likewise.
871 (BFD_RELOC_MICROMIPS_TLS_GD): Likewise.
872 (BFD_RELOC_MICROMIPS_TLS_LDM): Likewise.
873 (BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16): Likewise.
874 (BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16): Likewise.
875 (BFD_RELOC_MICROMIPS_TLS_GOTTPREL): Likewise.
876 (BFD_RELOC_MICROMIPS_TLS_TPREL_HI16): Likewise.
877 (BFD_RELOC_MICROMIPS_TLS_TPREL_LO16): Likewise.
878 * bfd-in2.h: Regenerate.
879 * libbfd.h: Regenerate.
880
881 2011-07-22 H.J. Lu <hongjiu.lu@intel.com>
882
883 * Makefile.am (ALL_MACHINES): Add cpu-k1om.lo.
884 (ALL_MACHINES_CFILES): Add cpu-k1om.c.
885 * Makefile.in: Regenerated.
886
887 * archures.c (bfd_architecture): Add bfd_arch_k1om.
888 (bfd_k1om_arch): New.
889 (bfd_archures_list): Add &bfd_k1om_arch.
890 * bfd-in2.h: Regenerated.
891
892 * config.bfd (targ64_selvecs): Add bfd_elf64_k1om_vec if
893 bfd_elf64_x86_64_vec is supported. Add bfd_elf64_k1om_freebsd_vec
894 if bfd_elf64_x86_64_freebsd_vec is supported.
895 (targ_selvecs): Likewise.
896
897 * configure.in: Support bfd_elf64_k1om_vec and
898 bfd_elf64_k1om_freebsd_vec.
899 * configure: Regenerated.
900
901 * cpu-k1om.c: New.
902
903 * elf64-x86-64.c (elf64_k1om_elf_object_p): New.
904 (bfd_elf64_k1om_vec): Likewise.
905 (bfd_elf64_k1om_freebsd_vec): Likewise.
906
907 * targets.c (bfd_elf64_k1om_vec): New.
908 (bfd_elf64_k1om_freebsd_vec): Likewise.
909 (_bfd_target_vector): Add bfd_elf64_k1om_vec and
910 bfd_elf64_k1om_freebsd_vec.
911
912 2011-07-20 Jan Kratochvil <jan.kratochvil@redhat.com>
913
914 Fix false coff-go32-exe matches.
915 * coff-i386.c (TARGET_SYM) <_bfd_check_format>: Conditionally use
916 COFF_CHECK_FORMAT.
917 * coff-stgo32.c (go32_check_format): New forward declaration.
918 (COFF_CHECK_FORMAT): New defintion.
919 (go32_check_format): New function.
920
921 2011-07-15 Alan Modra <amodra@gmail.com>
922
923 * configure.in: Bump version.
924 * configure: Regenerate.
925
926 2011-07-14 Alan Modra <amodra@gmail.com>
927
928 * linker.c (_bfd_generic_section_already_linked): Set l_flags.
929 * elf-bfd.h (struct already_linked): Forward declare.
930
931 2011-07-14 Alan Modra <amodra@gmail.com>
932
933 * elflink.c (_bfd_elf_fix_symbol_flags): Loop on indirect syms.
934 (_bfd_elf_adjust_dynamic_symbol): Remove FIXME.
935
936 2011-07-14 Alan Modra <amodra@gmail.com>
937
938 * elf64-ppc.c (struct ppc_link_hash_table): Add plt_static_chain.
939 (build_plt_stub): Add plt_static_chain param, don't load r11 if false.
940 (build_tls_get_addr_stub): Likewise.
941 (ppc_build_one_stub): Update calls to above.
942 (ppc_size_one_stub): Adjust stub size.
943 (ppc64_elf_size_stubs): Add plt_static_chain param, save to htab.
944 * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
945
946 2011-07-12 Nick Clifton <nickc@redhat.com>
947
948 * elf32-arm.c (elf32_arm_section_flags): Delete.
949 (elf_backend_section_flags): Remove.
950
951 2011-07-11 H.J. Lu <hongjiu.lu@intel.com>
952
953 PR ld/12982
954 * elflink.c (bfd_elf_size_dynamic_sections): Also skip BFD_PLUGIN
955 when setting stack_flags.
956
957 2011-07-11 Catherine Moore <clm@codesourcery.com>
958
959 * aout-adobe.c (aout_32_bfd_lookup_section_flags): New definition.
960 * aout-target.h (MY_bfd_lookup_section_flags): New definition.
961 * aout-tic30.c (MY_bfd_lookup_section_flags): New definition.
962 * bfd-in2.h: Regenerated.
963 * bfd.c (bfd_lookup_section_flags): New definition.
964 * binary.c (binary_bfd_lookup_section_flags): New definition.
965 * bout.c (b_out_bfd_lookup_section_flags): New definition.
966 * coff-alpha.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
967 * coff-mips.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
968 * coff-rs6000.c (rs6000coff_vec): Include
969 bfd_generic_lookup_section_flags.
970 (pmac_xcoff_vec): Likewise.
971 * coffcode.h (coff_bfd_lookup_section_flags): New definition.
972 * coff64-rs6000.c (rs6000coff64_vec): Include
973 bfd_generic_lookup_section_flags.
974 (aix5coff64_vec): Likewise.
975 * ecoff.c (bfd_debug_section): Initialize flag_info field.
976 * elf-bfd.h (elf_backend_lookup_section_flags_hook): Declare.
977 (bfd_elf_lookup_section_flags): Declare.
978 * elflink.c (bfd_elf_lookup_section_flags): New function.
979 * elfxx-target.h (bfd_elfNN_bfd_lookup_section_flags): Define.
980 (elf_backend_lookup_section_flags_hook): Define.
981 (elf_backend_data): Add elf_backend_lookup_section_flags_hook.
982 * i386msdos.c (msdos_bfd_lookup_section_flags): New define.
983 * i386os9k.c (os9k_bfd_lookup_section_flags): New define.
984 * ieee.c (ieee_bfd_lookup_section_flags): New define.
985 * ihex.c (ihex_bfd_lookup_section_flags): New define.
986 * libbfd-in.h (_bfd_nolink_bfd_lookup_section_flags): Declare.
987 (bfd_generic_lookup_section_flags): Declare.
988 * libbfd.h: Regenerated.
989 * mach-o-target.c (bfd_mach_o_bfd_lookup_section_flags): New.
990 * mmo.c (mmo_bfd_lookup_section_flags): New definition.
991 * nlm-target.h (nlm_bfd_lookup_section_flags): New definition.
992 * oasys.c (oasys_bfd_lookup_section_flags): New definition.
993 * pef.c (bfd_pef_bfd_lookup_section_flags): New definition.
994 * plugin.c (bfd_plugin_bfd_lookup_section_flags): New definition.
995 * ppcboot.c (ppcboot_bfd_lookup_section_flags): New definition.
996 * reloc.c (bfd_generic_lookup_section_flags): New function.
997 * som.c (som_bfd_lookup_section_flags): New definition.
998 * srec.c (srec_bfd_lookup_section_flags): New definition.
999 * targets.c (flag_info): Declare.
1000 (NAME##_bfd_lookup_section_flags): Add to LINK jump table.
1001 (_bfd_lookup_section_flags): New.
1002 * tekhex.c (tekhex_bfd_lookup_section_flags): New definition.
1003 * versados.c (versados_bfd_lookup_section_flags): New definition.
1004 * vms-alpha.c (alpha_vms_bfd_lookup_section_flag): New definition.
1005 * xsym.c (bfd_sym_bfd_lookup_section_flags): New definition.
1006
1007 2011-07-11 H.J. Lu <hongjiu.lu@intel.com>
1008
1009 PR ld/12978
1010 * elfnn-ia64.c (count_dyn_reloc): Fix a typo.
1011
1012 2011-07-09 Alan Modra <amodra@gmail.com>
1013
1014 PR ld/12942
1015 * elflink.c (elf_link_add_object_symbols): Use elf_discarded_section
1016 rather than kept_section to determine whether a symbol is from
1017 a discarded section.
1018 * cofflink.c (coff_link_add_symbols): Make symbols from discarded
1019 sections appear undefined.
1020
1021 2011-07-09 H.J. Lu <hongjiu.lu@intel.com>
1022
1023 PR ld/12942
1024 * elf-bfd.h (_bfd_elf_section_already_linked): Replace
1025 "asection *" with "struct already_linked *".
1026 * libbfd-in.h (_bfd_nolink_section_already_linked): Likewise.
1027 (_bfd_generic_section_already_linked): Likewise.
1028 (bfd_section_already_linked_table_insert): Likewise.
1029 (struct already_linked): New.
1030 (struct bfd_section_already_linked): Use it.
1031 * elflink.c (_bfd_elf_section_already_linked): Replace.
1032 "asection *" with "struct already_linked *". Replace the plugin
1033 dummy with the LTO output.
1034 * linker.c (_bfd_generic_section_already_linked): Likewise.
1035 * targets.c (struct already_linked): Add forward declaration.
1036 (bfd_target): Replace "struct bfd_section *" with
1037 "struct already_linked *" in _section_already_linked.
1038 * bfd-in2.h: Regenerate.
1039 * libbfd.h: Regenerate.
1040
1041 2011-07-06 Tristan Gingold <gingold@adacore.com>
1042
1043 * mach-o.h: Move loader related definitions to
1044 include/mach-o/loader.h. Include it.
1045
1046 2011-07-05 H.J. Lu <hongjiu.lu@intel.com>
1047
1048 * elf64-x86-64.c (elf_backend_post_process_headers): Always
1049 define to _bfd_elf_set_osabi.
1050
1051 2011-07-03 Samuel Thibault <samuel.thibault@gnu.org>
1052 Thomas Schwinge <thomas@schwinge.name>
1053
1054 PR binutils/12913
1055 * elf.c (_bfd_elf_set_osabi): Use ELFOSABI_GNU name instead of
1056 ELFOSABI_LINUX alias.
1057 * elf32-hppa.c: Likewise.
1058 * elf32-i370.c: Likewise.
1059 * elf64-hppa.c: Likewise.
1060
1061 2011-07-01 Ian Lance Taylor <iant@google.com>
1062
1063 * elf32-i386.c (elf_i386_eh_frame_plt): Correct expression: change
1064 DW_OP_lit3 to DW_OP_lit2.
1065
1066 2011-07-01 Alan Modra <amodra@gmail.com>
1067
1068 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't look at
1069 dyn relocs when called to copy flags for a weak sym.
1070 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1071 (ppc64_elf_merge_private_bfd_data): Delete.
1072 (bfd_elf64_bfd_merge_private_bfd_data): Define as
1073 _bfd_generic_verify_endian_match.
1074
1075 2011-06-30 Bernd Schmidt <bernds@codesourcery.com>
1076
1077 * bfd/elf32-tic6x.c (elf32_tic6x_set_osabi): Also set it if
1078 link_info is NULL.
1079
1080 2011-06-28 Tristan Gingold <gingold@adacore.com>
1081
1082 * vms-alpha.c (vms_private_data_struct): Make vms_linkage_index
1083 unsigned int.
1084 (_bfd_vms_write_etir): Write linkage index from reloc.
1085
1086 2011-06-28 Fawzi Mohamed <fawzi.mohamed@nokia.com>
1087
1088 * mach-o.c (bfd_mach_o_read_command): Also ignore
1089 BFD_MACH_O_LC_ROUTINES_64.
1090
1091 2011-06-27 Tristan Gingold <gingold@adacore.com>
1092
1093 * vms-alpha.c (_bfd_vms_write_etir): Use 'section' to get current
1094 section target index.
1095
1096 2011-06-27 Nick Clifton <nickc@redhat.com>
1097
1098 * cisco-core.c (cisco_core_little_vec): Add initialization of
1099 match_priority field.
1100
1101 2011-06-27 Tristan Gingold <gingold@adacore.com>
1102
1103 * cache.c: Include bfd_stdint.h.
1104 (cache_bmmap): Change profile. Return region start and size.
1105 * bfdio.c (struct bfd_iovec): Change bmmap profile.
1106 (bfd_mmap): Change profile and adjust. Update comment.
1107 (memory_bmmap): Change profile.
1108 * opncls.c (opncls_bmmap): Change profile.
1109 * vms-lib.c (vms_lib_bmmap): Likewise.
1110 * libbfd.h: Regenerate.
1111 * bfd-in2.h: Regenerate.
1112
1113 2011-06-27 Tristan Gingold <gingold@adacore.com>
1114
1115 * vms-misc.c (vms_time_to_time_t): Adjust overflow detection.
1116 Add comment.
1117
1118 2011-06-25 H.J. Lu <hongjiu.lu@intel.com>
1119
1120 * elf64-x86-64.c (elf_backend_post_process_headers): Don't
1121 define for FreeBSD/x86-64 nor FreeBSD/L1OM. Define for L1OM.
1122
1123 2011-06-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1124
1125 * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Initialize
1126 PLT_EH_FRAME.
1127 * elf32-i386.c (elf_i386_link_hash_table): Likewise.
1128
1129 2011-06-24 Richard Henderson <rth@redhat.com>
1130
1131 PR ld/12928
1132 * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Recover the
1133 tlsgd insn before swapping adjacent insns.
1134
1135 2011-06-24 Tristan Gingold <gingold@adacore.com>
1136
1137 * vms-alpha.c (alpha_vms_slurp_relocs): Add a guard for relocs in the
1138 absolute section.
1139
1140 2011-06-24 Alan Modra <amodra@gmail.com>
1141
1142 PR ld/12921
1143 * elf.c (assign_file_positions_for_load_sections): Don't align
1144 sh_offset for all SHT_NOBITS sections here, just .tbss sections
1145 that don't get a PT_LOAD.
1146
1147 2011-06-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1148
1149 * elf32-sh.c (sh_elf_relocate_section): Allow R_SH_TLS_LE_32 for PIE.
1150 (sh_elf_check_relocs): Likewise.
1151
1152 2011-06-22 Richard Henderson <rth@redhat.com>
1153
1154 * elf64-alpha.c (elf64_alpha_check_relocs): No dynamic reloc for
1155 TPREL in a PIE image.
1156 (alpha_dynamic_entries_for_reloc): Likewise.
1157 (elf64_alpha_relocate_section): Allow TPREL in PIE images.
1158 (elf64_alpha_relax_got_load): Likewise.
1159
1160 2011-06-22 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
1161
1162 * elf32-arm.c (elf32_arm_final_link_relocate): Allow R_ARM_TLS_LE32
1163 for PIE.
1164
1165 2011-06-22 Alan Modra <amodra@gmail.com>
1166
1167 * elflink.c (_bfd_elf_merge_symbol): Allow type changes for
1168 plugin symbols. Fix segfault on linker scrip defined syms.
1169
1170 2011-06-20 Jakub Jelinek <jakub@redhat.com>
1171
1172 PR ld/12570
1173 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Allow no relocations
1174 at all for linker created .eh_frame sections.
1175 (_bfd_elf_discard_section_eh_frame): Handle linker created
1176 .eh_frame sections with no relocations.
1177 * elf64-x86-64.c: Include dwarf2.h.
1178 (elf_x86_64_eh_frame_plt): New variable.
1179 (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
1180 PLT_FDE_LEN_OFFSET): Define.
1181 (struct elf_x86_64_link_hash_table): Add plt_eh_frame field.
1182 (elf_x86_64_create_dynamic_sections): Create and fill in
1183 .eh_frame section for .plt section.
1184 (elf_x86_64_size_dynamic_sections): Write .plt section size
1185 into .eh_frame FDE covering .plt section.
1186 (elf_x86_64_finish_dynamic_sections): Write .plt section
1187 start into .eh_frame FDE covering .plt section. Call
1188 _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
1189 (elf_backend_plt_alignment): Define to 4.
1190 * elf32-i386.c: Include dwarf2.h.
1191 (elf_i386_eh_frame_plt): New variable.
1192 (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
1193 PLT_FDE_LEN_OFFSET): Define.
1194 (struct elf_i386_link_hash_table): Add plt_eh_frame field.
1195 (elf_i386_create_dynamic_sections): Create and fill in
1196 .eh_frame section for .plt section.
1197 (elf_i386_size_dynamic_sections): Write .plt section size
1198 into .eh_frame FDE covering .plt section.
1199 (elf_i386_finish_dynamic_sections): Write .plt section
1200 start into .eh_frame FDE covering .plt section. Call
1201 _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
1202 (elf_backend_plt_alignment): Define to 4.
1203
1204 2011-06-19 H.J. Lu <hongjiu.lu@intel.com>
1205
1206 * elf64-x86-64.c (elf_backend_post_process_headers): Defined
1207 for x32.
1208
1209 2011-06-16 H.J. Lu <hongjiu.lu@intel.com>
1210
1211 * elf64-x86-64.c: Include <stdarg.h> and CORE_HEADER if
1212 CORE_HEADER is defined.
1213 (elf_x86_64_write_core_note): New.
1214 (elf_backend_write_core_note): Likewise.
1215
1216 * hosts/x86-64linux.h (uint64_t): New.
1217 (user_regsx32_struct): Likewise.
1218 (elf_gregx32_t): Likewise.
1219 (ELF_NGREGX32): Likewise.
1220 (elf_gregsetx32_t): Likewise.
1221 (elf_prstatusx32): Likewise.
1222 (prstatusx32_t): Likewise.
1223 (user_fpregs32_struct): Removed.
1224 (user_fpxregs32_struct): Likewise.
1225 (user32): Likewise.
1226 (elf_fpregset32_t): Likewise.
1227 (elf_fpxregset32_t): Likewise.
1228 (prgregset32_t): Likewise.
1229 (prfpregset32_t): Likewise.
1230
1231 2011-06-16 H.J. Lu <hongjiu.lu@intel.com>
1232
1233 * elf64-x86-64.c (elf_x86_64_grok_prstatus): Support x32.
1234 (elf_x86_64_grok_psinfo): Likewise.
1235
1236 2011-06-16 Nick Clifton <nickc@redhat.com>
1237
1238 * elf.c (elf_find_function): Fail if not provided with a symbol
1239 table.
1240
1241 2011-06-15 Ulrich Weigand <ulrich.weigand@linaro.org>
1242
1243 * elf-bfd.h (elfcore_write_arm_vfp): Add prototype.
1244 * elf.c (elfcore_grok_arm_vfp): New function.
1245 (elfcore_grok_note): Call it to handle NT_ARM_VFP notes.
1246 (elfcore_write_arm_vfp): New function.
1247 (elfcore_write_register_note): Call it to handle .reg-arm-vfp.
1248
1249 2011-06-14 Richard Henderson <rth@redhat.com>
1250
1251 * elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Rename from
1252 elf64_alpha_merge_ind_symbols; adjust for the generic interface.
1253 (elf64_alpha_always_size_sections): Don't call
1254 elf64_alpha_merge_ind_symbols.
1255 (elf_backend_copy_indirect_symbol): New.
1256
1257 2011-06-14 Alan Modra <amodra@gmail.com>
1258
1259 PR ld/12887
1260 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Check sec_info_type
1261 before doing anything.
1262 (_bfd_elf_discard_section_eh_frame): Likewise.
1263
1264 2011-06-14 Alan Modra <amodra@gmail.com>
1265
1266 * Makefile.am: Formatting.
1267 * Makefile.in: Regenerate.
1268 * configure.in (bfd_elf64_tilegx_vec): Add elfxx-tilegx.lo.
1269 * po/SRC-POTFILES.in: Regnerate.
1270
1271 2011-06-14 Alan Modra <amodra@gmail.com>
1272
1273 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Don't use PTR.
1274 (allocate_dynrelocs, readonly_dynrelocs): Replace PTR with void *.
1275 Don't handle warning symbols here.
1276 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): As above.
1277 (allocate_dynrelocs, readonly_dynrelocs): As above.
1278
1279 2011-06-14 Alan Modra <amodra@gmail.com>
1280
1281 PR ld/12851
1282 * elflink.c (_bfd_elf_gc_mark_extra_sections): New function.
1283 (elf_gc_sweep): Don't treat debug and sections like .comment
1284 specially here.
1285 (bfd_elf_gc_sections): Treat note sections as gc roots only when
1286 not part of a group. Always call gc_mark_extra_sections.
1287 * elf-bfd.h (_bfd_elf_gc_mark_extra_sections): Declare.
1288 * elfxx-target.h (elf_backend_gc_mark_extra_sections): Default to
1289 _bfd_elf_gc_mark_extra_sections.
1290 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Call
1291 _bfd_elf_gc_mark_extra_sections.
1292 * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): Likewise.
1293
1294 2011-06-13 Nick Clifton <nickc@redhat.com>
1295
1296 * elf32-tilepro.c (tilepro_elf_check_relocs): Delete unused local
1297 variable 'local_got_offsets'.
1298 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1299 (tilegx_finish_dyn): Delete unused local variable 'abi_64_p'.
1300
1301 2011-06-13 Walter Lee <walt@tilera.com>
1302
1303 * Makefile.am (ALL_MACHINES): Add cpu-tilegx.lo and cpu-tilepro.lo.
1304 (ALL_MACHINE_CFILES): Add cpu-tilegx.c and cpu-tilepro.c.
1305 (BFD32_BACKENDS): Add elf32-tilegx.lo, elf32-tilepro.lo,
1306 and elfxx-tilegx.lo.
1307 (BFD32_BACKENDS_CFILES): Add elf32-tilegx.c elf32-tilepro.c, and
1308 elfxx-tilegx.c.
1309 (BFD64_BACKENDS): Add elf64-tilegx.lo.
1310 (BFD64_BACKENDS_CFILES): Add elf64-tilegx.c.
1311 * Makefile.in: Regenerate.
1312 * arctures.c (bfd_architecture): Define bfd_arch_tilepro,
1313 bfd_arch_tilegx, bfd_mach_tilepro, bfd_mach_tilegx.
1314 (bfd_arch_info): Add bfd_tilegx_arch, bfd_tilepro_arch.
1315 (bfd_archures_list): Add bfd_tilegx_arch, bfd_tilepro_arch.
1316 bfd-in2.h: Regenerate.
1317 * config.bfd: Handle tilegx-*-* and tilepro-*-*.
1318 * configure.in: Handle bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
1319 and bfd_elf64_tilegx_vec.
1320 * configure: Regenerate.
1321 * elf-bfd.h (enum elf_target_id): Define TILEGX_ELF_DATA and
1322 TILEPRO_ELF_DATA.
1323 * libbfd.h: Regenerate.
1324 * reloc.c: Add BFD_RELOC_TILEPRO_{COPY, GLOB_DAT, JMP_SLOT,
1325 RELATIVE, BROFF_X1, JOFFLONG_X1, JOFFLONG_X1_PLT, IMM8_X0,
1326 IMM8_Y0, IMM8_X1, IMM8_Y1, DEST_IMM8_X1, MT_IMM15_X1, MF_IMM15_X1,
1327 IMM16_X0, IMM16_X1, IMM16_X0_LO, IMM16_X1_LO, IMM16_X0_HI,
1328 IMM16_X1_HI, IMM16_X0_HA, IMM16_X1_HA, IMM16_X0_PCREL,
1329 IMM16_X1_PCREL, IMM16_X0_LO_PCREL, IMM16_X1_LO_PCREL,
1330 IMM16_X0_HI_PCREL, IMM16_X1_HI_PCREL, IMM16_X0_HA_PCREL,
1331 IMM16_X1_HA_PCREL, IMM16_X0_GOT, IMM16_X1_GOT, IMM16_X0_GOT_LO,
1332 IMM16_X1_GOT_LO, IMM16_X0_GOT_HI, IMM16_X1_GOT_HI,
1333 IMM16_X0_GOT_HA, IMM16_X1_GOT_HA, MMSTART_X0, MMEND_X0,
1334 MMSTART_X1, MMEND_X1, SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1,
1335 IMM16_X0_TLS_GD, IMM16_X1_TLS_GD, IMM16_X0_TLS_GD_LO,
1336 IMM16_X1_TLS_GD_LO, IMM16_X0_TLS_GD_HI, IMM16_X1_TLS_GD_HI,
1337 IMM16_X0_TLS_GD_HA, IMM16_X1_TLS_GD_HA, IMM16_X0_TLS_IE,
1338 IMM16_X1_TLS_IE, IMM16_X0_TLS_IE_LO, IMM16_X1_TLS_IE_LO,
1339 IMM16_X0_TLS_IE_HI, IMM16_X1_TLS_IE_HI, IMM16_X0_TLS_IE_HA,
1340 IMM16_X1_TLS_IE_HA, TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
1341 Add BFD_RELOC_TILEGX_{HW0, HW1, HW2, HW3, HW0_LAST, HW1_LAST,
1342 HW2_LAST, COPY, GLOB_DAT, JMP_SLOT, RELATIVE, BROFF_X1,
1343 JUMPOFF_X1, JUMPOFF_X1_PLT, IMM8_X0, IMM8_Y0, IMM8_X1, IMM8_Y1,
1344 DEST_IMM8_X1, MT_IMM14_X1, MF_IMM14_X1, MMSTART_X0, MMEND_X0,
1345 SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1, IMM16_X0_HW0,
1346 IMM16_X1_HW0, IMM16_X0_HW1, IMM16_X1_HW1, IMM16_X0_HW2,
1347 IMM16_X1_HW2, IMM16_X0_HW3, IMM16_X1_HW3, IMM16_X0_HW0_LAST,
1348 IMM16_X1_HW0_LAST, IMM16_X0_HW1_LAST, IMM16_X1_HW1_LAST,
1349 IMM16_X0_HW2_LAST, IMM16_X1_HW2_LAST, IMM16_X0_HW0_PCREL,
1350 IMM16_X1_HW0_PCREL, IMM16_X0_HW1_PCREL, IMM16_X1_HW1_PCREL,
1351 IMM16_X0_HW2_PCREL, IMM16_X1_HW2_PCREL, IMM16_X0_HW3_PCREL,
1352 IMM16_X1_HW3_PCREL, IMM16_X0_HW0_LAST_PCREL,
1353 IMM16_X1_HW0_LAST_PCREL, IMM16_X0_HW1_LAST_PCREL,
1354 IMM16_X1_HW1_LAST_PCREL, IMM16_X0_HW2_LAST_PCREL,
1355 IMM16_X1_HW2_LAST_PCREL, IMM16_X0_HW0_GOT, IMM16_X1_HW0_GOT,
1356 IMM16_X0_HW1_GOT, IMM16_X1_HW1_GOT, IMM16_X0_HW2_GOT,
1357 IMM16_X1_HW2_GOT, IMM16_X0_HW3_GOT, IMM16_X1_HW3_GOT,
1358 IMM16_X0_HW0_LAST_GOT, IMM16_X1_HW0_LAST_GOT,
1359 IMM16_X0_HW1_LAST_GOT, IMM16_X1_HW1_LAST_GOT,
1360 IMM16_X0_HW2_LAST_GOT, IMM16_X1_HW2_LAST_GOT, IMM16_X0_HW0_TLS_GD,
1361 IMM16_X1_HW0_TLS_GD, IMM16_X0_HW1_TLS_GD, IMM16_X1_HW1_TLS_GD,
1362 IMM16_X0_HW2_TLS_GD, IMM16_X1_HW2_TLS_GD, IMM16_X0_HW3_TLS_GD,
1363 IMM16_X1_HW3_TLS_GD, IMM16_X0_HW0_LAST_TLS_GD,
1364 IMM16_X1_HW0_LAST_TLS_GD, IMM16_X0_HW1_LAST_TLS_GD,
1365 IMM16_X1_HW1_LAST_TLS_GD, IMM16_X0_HW2_LAST_TLS_GD,
1366 IMM16_X1_HW2_LAST_TLS_GD, IMM16_X0_HW0_TLS_IE,
1367 IMM16_X1_HW0_TLS_IE, IMM16_X0_HW1_TLS_IE, IMM16_X1_HW1_TLS_IE,
1368 IMM16_X0_HW2_TLS_IE, IMM16_X1_HW2_TLS_IE, IMM16_X0_HW3_TLS_IE,
1369 IMM16_X1_HW3_TLS_IE, IMM16_X0_HW0_LAST_TLS_IE,
1370 IMM16_X1_HW0_LAST_TLS_IE, IMM16_X0_HW1_LAST_TLS_IE,
1371 IMM16_X1_HW1_LAST_TLS_IE, IMM16_X0_HW2_LAST_TLS_IE,
1372 IMM16_X1_HW2_LAST_TLS_IE, TLS_DTPMOD64, TLS_DTPOFF64, TLS_TPOFF64,
1373 TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
1374 * targets.c (bfd_elf32_tilegx_vec): Declare.
1375 (bfd_elf32_tilepro_vec): Declare.
1376 (bfd_elf64_tilegx_vec): Declare.
1377 (bfd_target_vector): Add bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
1378 and bfd_elf64_tilegx_vec.
1379 * cpu-tilegx.c: New file.
1380 * cpu-tilepro.c: New file.
1381 * elf32-tilepro.h: New file.
1382 * elf32-tilepro.c: New file.
1383 * elf32-tilegx.c: New file.
1384 * elf32-tilegx.h: New file.
1385 * elf64-tilegx.c: New file.
1386 * elf64-tilegx.h: New file.
1387 * elfxx-tilegx.c: New file.
1388 * elfxx-tilegx.h: New file.
1389
1390 2011-06-13 Alan Modra <amodra@gmail.com>
1391
1392 * linker.c (bfd_link_hash_traverse): Follow warning symbol link.
1393 (_bfd_generic_link_write_global_symbol, fix_syms): Don't handle
1394 warning symbols here.
1395 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
1396 * elf32-arm.c (allocate_dynrelocs_for_symbol,
1397 elf32_arm_readonly_dynrelocs): Likewise.
1398 * elf32-bfin.c (bfin_discard_copies): Likewise.
1399 * elf32-cris.c (elf_cris_adjust_gotplt_to_got,
1400 elf_cris_discard_excess_dso_dynamics,
1401 elf_cris_discard_excess_program_dynamics): Likewise.
1402 * elf32-hppa.c (allocate_plt_static, allocate_dynrelocs,
1403 clobber_millicode_symbols, readonly_dynrelocs): Likewise.
1404 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
1405 * elf32-i386.c (elf_i386_allocate_dynrelocs,
1406 elf_i386_readonly_dynrelocs): Likewise.
1407 * elf32-lm32.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1408 * elf32-m32c.c (m32c_relax_plt_check, m32c_relax_plt_realloc): Likewise.
1409 * elf32-m32r.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1410 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
1411 * elf32-microblaze.c (allocate_dynrelocs): Likewise.
1412 * elf32-ppc.c (allocate_dynrelocs, maybe_set_textrel): Likewise.
1413 * elf32-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1414 * elf32-score.c (score_elf_sort_hash_table_f): Likewise.
1415 * elf32-score7.c (score_elf_sort_hash_table_f): Likewise.
1416 * elf32-sh.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1417 * elf32-tic6x.c (elf32_tic6x_allocate_dynrelocs,
1418 elf32_tic6x_readonly_dynrelocs): Likewise.
1419 * elf32-vax.c (elf_vax_discard_copies): Likewise.
1420 * elf32-xstormy16.c (xstormy16_relax_plt_check,
1421 xstormy16_relax_plt_realloc): Likewise.
1422 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Likewise.
1423 * elf64-alpha.c (elf64_alpha_output_extsym,
1424 elf64_alpha_calc_got_offsets_for_symbol,
1425 elf64_alpha_calc_dynrel_sizes, elf64_alpha_size_rela_got_1): Likewise.
1426 * elf64-hppa.c (elf64_hppa_mark_exported_functions,
1427 allocate_global_data_opd, elf64_hppa_mark_milli_and_exported_functions,
1428 elf_hppa_unmark_useless_dynamic_symbols,
1429 elf_hppa_remark_useless_dynamic_symbols): Likewise.
1430 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref, func_desc_adjust,
1431 adjust_opd_syms, adjust_toc_syms, allocate_dynrelocs,
1432 readonly_dynrelocs, merge_global_got, reallocate_got,
1433 undo_symbol_twiddle): Likewise.
1434 * elf64-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1435 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
1436 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs,
1437 elf_x86_64_readonly_dynrelocs): Likewise.
1438 * elflink.c (elf_link_renumber_hash_table_dynsyms,
1439 elf_link_renumber_local_hash_table_dynsyms, _bfd_elf_export_symbol,
1440 _bfd_elf_link_find_version_dependencies,
1441 _bfd_elf_link_assign_sym_version, _bfd_elf_adjust_dynamic_symbol,
1442 _bfd_elf_link_sec_merge_syms, elf_adjust_dynstr_offsets,
1443 elf_collect_hash_codes, elf_collect_gnu_hash_codes,
1444 elf_renumber_gnu_hash_syms, elf_gc_sweep_symbol,
1445 elf_gc_propagate_vtable_entries_used,
1446 elf_gc_smash_unused_vtentry_relocs, bfd_elf_gc_mark_dynamic_ref_symbol,
1447 elf_gc_allocate_got_offsets): Likewise.
1448 * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free,
1449 elfNN_ia64_global_dyn_sym_thunk): Likewise.
1450 * elfxx-mips.c (mips_elf_check_symbols, mips_elf_output_extsym,
1451 mips_elf_sort_hash_table_f, allocate_dynrelocs): Likewise.
1452 * elfxx-sparc.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1453 * i386linux.c (linux_tally_symbols): Likewise.
1454 * m68klinux.c (linux_tally_symbols): Likewise.
1455 * sparclinux.c (linux_tally_symbols): Likewise.
1456 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
1457 * xcofflink.c (xcoff_post_gc_symbol): Likewise.
1458
1459 * elflink.c (elf_link_output_extsym): Make it a bfd_hash_traverse
1460 function. Update all callers.
1461 * aoutx.h (aout_link_write_other_symbol): Likewise.
1462 * pdp11.c (aout_link_write_other_symbol): Likewise.
1463 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1464 * ecoff.c (ecoff_link_write_external): Likewise.
1465 * xcofflink.c (xcoff_write_global_symbol): Likewise.
1466 * vms-alpha.c (alpha_vms_link_output_symbol): Likewise. Handle
1467 warning symbols.
1468 * ecoff.c (ecoff_link_hash_traverse): Delete.
1469 * coff-ppc.c (ppc_bfd_coff_final_link): Use bfd_hash_traverse for
1470 _bfd_coff_write_global_sym.
1471 * libcoff-in.h (_bfd_coff_write_global_sym): Update prototype.
1472 * libcoff.h: Regenerate.
1473
1474 2011-06-10 Nick Clifton <nickc@redhat.com>
1475
1476 * elflink.c (_bfd_elf_link_create_dynamic_sections): If the
1477 backend does not provide a function for creating dynamic sections
1478 then fail.
1479 (bfd_elf_final_link): Issue a warning message if a dynamic section
1480 has the SHT_NOTE type.
1481 (bfd_elf_final_link): Do not look for dynamic strings in a section
1482 that does not have the SHT_STRTAB type or the name .dynstr.
1483 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Fail if the got
1484 section is not in the output binary.
1485 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Likewise.
1486
1487 2011-06-09 Tristan Gingold <gingold@adacore.com>
1488
1489 * elfnn-ia64.c (elfNN_ia64_relax_section, elfNN_ia64_choose_gp)
1490 (elfNN_ia64_relocate_section, elfNN_vms_object_p): Remove trailing
1491 spaces.
1492
1493 2011-06-09 Tristan Gingold <gingold@adacore.com>
1494
1495 * bfd.c (bfd_get_sign_extend_vma): Handle aixcoff.
1496
1497 2011-06-09 Nick Clifton <nickc@redhat.com>
1498
1499 PR ld/12845
1500 * elf.c (_bfd_elf_init_private_section_data): Add an assertion
1501 that the output section has an allocated bfd_elf_section_data
1502 structure.
1503 * elfxx-mips.c (mips_elf_check_symbols): Do not create a stub for
1504 symbols in sections that have been removed by garbage collection.
1505
1506 2011-06-08 H.J. Lu <hongjiu.lu@intel.com>
1507
1508 * elf64-x86-64.c (elf_x86_64_check_relocs): Allow R_X86_64_64
1509 relocations in SEC_DEBUGGING sections when building shared
1510 libraries.
1511
1512 2011-06-08 H.J. Lu <hongjiu.lu@intel.com>
1513
1514 PR ld/12851
1515 * elflink.c (elf_gc_sweep): Don't check SHT_NOTE sections here.
1516 (bfd_elf_gc_sections): Also check SHT_NOTE sections.
1517
1518 2011-06-08 Tristan Gingold <gingold@adacore.com>
1519
1520 * makefile.vms (OBJS): Add elfxx-ia64.obj
1521 Remove vax case.
1522
1523 2011-06-08 Alan Modra <amodra@gmail.com>
1524
1525 * aix386-core.c, * cisco-core.c, * hpux-core.c, * osf-core.c,
1526 * sco5-core.c: Init match_priority field.
1527
1528 2011-06-08 Alan Modra <amodra@gmail.com>
1529
1530 * elflink.c (_bfd_elf_archive_symbol_lookup): Follow warning and
1531 indirect links here.
1532
1533 2011-06-07 Joel Brobecker <brobecker@adacore.com>
1534
1535 * irix-core.c (irix_core_vec): Add match_priority field.
1536
1537 2011-06-06 Alan Modra <amodra@gmail.com>
1538
1539 * targets.c (bfd_target): Make ar_max_namelen an unsigned char.
1540 Add match_priority.
1541 * configure.in: Bump bfd version.
1542 * elfcode.h (elf_object_p): Delete hacks preventing match of
1543 EM_NONE and ELFOSABI_NONE targets when a better match exists.
1544 * elfxx-target.h (elf_match_priority): Define and use.
1545 * format.c (bfd_check_format_matches): Use target match_priority
1546 to choose best of multiple matching targets. In cases with multiple
1547 matches rerun _bfd_check_format if we don't choose the last match.
1548 * aout-adobe.c, * aout-arm.c, * aout-target.h, * aout-tic30.c,
1549 * binary.c, * bout.c, * coff-alpha.c, * coff-i386.c, * coff-i860.c,
1550 * coff-i960.c, * coff-ia64.c, * coff-mips.c, * coff-or32.c,
1551 * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic30.c,
1552 * coff-tic54x.c, * coff-x86_64.c, * coff64-rs6000.c, * coffcode.h,
1553 * i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c, * mach-o-target.c,
1554 * mipsbsd.c, * mmo.c, * nlm-target.h, * oasys.c, * pdp11.c,
1555 * pe-mips.c, * pef.c, * plugin.c, * ppcboot.c, * som.c, * srec.c,
1556 * tekhex.c, * trad-core.c, * verilog.c, * versados.c, * vms-alpha.c,
1557 * vms-lib.c, * xsym.c: Init match_priority field.
1558 * configure: Regenerate.
1559 * bfd-in2.h: Regenerate.
1560
1561 2011-06-04 H.J. Lu <hongjiu.lu@intel.com>
1562
1563 PR ld/12842
1564 * elfcode.h (elf_object_p): Revert the last change.
1565
1566 2011-06-04 Alan Modra <amodra@gmail.com>
1567
1568 * archures.c (bfd_arch_get_compatible): If one arch is unknown,
1569 return the other arch.
1570 * elfcode.h (elf_object_p): Allow explicit match to generic ELF
1571 target.
1572
1573 2011-06-03 Bertram Felgenhauer <bertram.felgenhauer@gmail.com>
1574
1575 PR ld/12682
1576 * hash.c (higher_primer_number): Add more, small, prime numbers.
1577 (bfd_hash_set_default_size): Likewise.
1578
1579 2011-06-02 Nick Clifton <nickc@redhat.com>
1580
1581 * coff-mcore.c: Fix spelling typo.
1582 * coff-stgo32.c: Likewise.
1583 * elf32-arm.c: Likewise.
1584 * elf32-avr.c: Likewise.
1585 * elf-m68hc1x.c: Likewise.
1586 * elf32-mcore.c: Likewise.
1587 * elf32-mep.c: Likewise.
1588 * elf32-mt.c: Likewise.
1589 * elf32-ppc.c: Likewise.
1590 * elf32-xtensa.c: Likewise.
1591 * elf64-ppc.c: Likewise.
1592 * elfxx-mips.c: Likewise.
1593 * netbsd.h: Likewise.
1594 * nlmcode.h: Likewise.
1595 * vms-alpha.c: Likewise.
1596 * po/bfd.pot: Regenerate.
1597 * po/SRC-POTFILES.in: Regenerate.
1598
1599 2011-06-01 DJ Delorie <dj@redhat.com>
1600
1601 * config.bfd: Add bfd_elf32_rx_be_ns_vec.
1602 * target.c: Likewise.
1603 * configure.in: Likewise.
1604 * configure.in: Regenerate.
1605 * elf32-rx.c: Add elf32-rx-be-ns target.
1606 (rx_elf_object_p): Never allow the be-ns target by default,
1607 only allow it if the user requests it.
1608
1609 2011-06-01 H.J. Lu <hongjiu.lu@intel.com>
1610
1611 * elf32-i386.c (elf_i386_size_dynamic_sections): Properly warn
1612 relocation in readonly section in a shared object.
1613 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
1614
1615 2011-05-31 Nick Clifton <nickc@redhat.com>
1616
1617 * archive.c (adjust_relative_path): Fix comment to prevent it
1618 corrupting the auto-generated bfd.h.
1619
1620 2011-05-31 Paul Brook <paul@codesourcery.com>
1621
1622 * elf32-arm.c (elf32_arm_final_link_relocate): Only do bl conversion
1623 for known functions.
1624 (elf32_arm_swap_symbol_in): Only set ST_BRANCH_TO_ARM for function
1625 symbols.
1626
1627 2011-05-31 Paul Brook <paul@codesourcery.com>
1628
1629 * elf32-arm.c (arm_stub_is_thumb): Add
1630 arm_stub_long_branch_v4t_thumb_tls_pic.
1631 (elf32_arm_final_link_relocate): TLS stubs are always ARM.
1632 Handle Thumb stubs.
1633
1634 2011-05-27 Nick Clifton <nickc@redhat.com>
1635
1636 PR binutils/12710
1637 * archive.c (_bfd_get_elt_at_filepos): Set correct error value if
1638 unable to read a file pointed to by an entry in a thin archive.
1639 (adjust_relative_path): Use lrealpath to canonicalize paths.
1640 Handle the case where the reference path is above the current
1641 path in the directory tree.
1642
1643 2011-05-26 H.J. Lu <hongjiu.lu@intel.com>
1644
1645 PR ld/12809
1646 * elf64-x86-64.c (elf_x86_64_relocate_section): Handle
1647 R_X86_64_TPOFF64 in executable.
1648
1649 2011-05-26 Alan Modra <amodra@gmail.com>
1650
1651 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment.
1652 * elflink.c (_bfd_elf_symbol_refs_local_p): Expand
1653 local_protected comment.
1654
1655 2011-05-25 Tristan Gingold <gingold@adacore.com>
1656
1657 * configure.in (bfd_elf32_ia64_big_vec, bfd_elf32_ia64_hpux_big_vec)
1658 (bfd_elf64_ia64_big_vec, bfd_elf64_ia64_hpux_big_vec)
1659 (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_vms_vec): Add elfxx-ia64.lo
1660 * Makefile.am (BFD64_BACKENDS): Add elfxx-ia64.lo
1661 (BFD64_BACKENDS_CFILES): Add elfxx-ia64.c
1662 (elf32-ia64.c): Created from elfnn-ia64.c
1663 (elf64-ia64.c): Likewise.
1664 * elfxx-ia64.h: New file.
1665 * elfxx-ia64.c: Split with elfnn-ia64.c. Keep only the following
1666 functions.Includes elfxx-ia64.h.
1667 (elfNN_ia64_reloc): Renames to ia64_elf_reloc. Adjust error message.
1668 (IA64_HOWTO): Adjust.
1669 (lookup_howto): Renames to ia64_elf_lookup_howto. Make it public.
1670 (elfNN_ia64_reloc_type_lookup): Renames to
1671 ia64_elf_reloc_type_lookup. Make it public. Adjust calls.
1672 (elfNN_ia64_reloc_name_lookup): Renames to
1673 ia64_elf_reloc_name_lookup. Make it public.
1674 (elfNN_ia64_relax_br): Renames to ia64_elf_relax_br. Make it public.
1675 (elfNN_ia64_relax_brl): Renames to ia64_elf_relax_brl. Make it
1676 public.
1677 (elfNN_ia64_relax_ldxmov): Renames to ia64_elf_relax_ldxmov.
1678 Move it and make it public. Move prototype to elfxx-ia64.h
1679 (elfNN_ia64_install_value): Renames to ia64_elf_install_value.
1680 Move prototype to elfxx-ia64.h
1681 * elfnn-ia64.c: New file, split from elfxx-ia64.c.
1682 (elfNN_ia64_info_to_howto): Adjust calls.
1683 (elfNN_ia64_relax_section): Adjust calls.
1684 (count_dyn_reloc): Fix typo.
1685 (elfNN_ia64_relocate_section): Adjust calls.
1686 (elfNN_ia64_finish_dynamic_symbol): Likewise.
1687 (bfd_elfNN_bfd_reloc_type_lookup)
1688 (bfd_elfNN_bfd_reloc_name_lookup): Adjust macros.
1689 * configure: Regenerate.
1690 * Makefile.in: Regenerate.
1691
1692 2011-05-23 DJ Delorie <dj@redhat.com>
1693
1694 * elf32-rx.c (rx_elf_object_p): When reading an RX object in, undo
1695 the vma/lma swapping done in elf32_rx_modify_program_headers.
1696
1697 2011-05-23 Nick Clifton <nickc@redhat.com>
1698
1699 * elf-m10300.c (mn10300_elf_mkobject): New function.
1700 (bfd_elf32_mkobject): Define.
1701
1702 2011-05-23 Alan Modra <amodra@gmail.com>
1703
1704 * elf-bfd.h: Comment typo fix.
1705 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Delete. Replace with
1706 struct elf_dyn_relocs throughout.
1707 * elf64-ppc.c (struct ppc_dyn_relocs): Likewise.
1708
1709 2011-05-23 Alan Modra <amodra@gmail.com>
1710
1711 * elf32-frv.c: Use info->callbacks->einfo throughout file in linker
1712 functions rather than warning callback or _bfd_error_handler.
1713 * elf32-ppc.c: Likewise.
1714 * elf64-ppc.c: Likewise.
1715 * elf32-ppc.c (ppc_elf_tls_optimize): Use %H in __tls_get_addr lost
1716 arg error.
1717 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
1718
1719 2011-05-23 Alan Modra <amodra@gmail.com>
1720
1721 PR 12763
1722 * elf.c (assign_file_positions_for_load_sections): Set sh_offset for
1723 .tbss, and page align same for all SHT_NOBITS sections.
1724
1725 2011-05-21 Alan Modra <amodra@gmail.com>
1726
1727 PR 12763
1728 * elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs
1729 from PT_TLS header.
1730 (_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD
1731 segment if just for .tbss.
1732 (assign_file_positions_for_load_sections): Don't report "can't
1733 allocate in segment" errors for .tbss.
1734 (assign_file_positions_for_non_load_sections): Don't set p_filesz
1735 from SHT_NOBITS section filepos.
1736
1737 2011-05-20 Bernd Schmidt <bernds@codesourcery.com>
1738
1739 * elf32-tic6x.c (elf32_tic6x_howto_table): Add entries for
1740 R_C6000_PCR_H16 and R_C6000_PCR_L16.
1741 (elf32_tic6x_relocate_section): Handle them.
1742
1743 2011-05-18 Nick Clifton <nickc@redhat.com>
1744
1745 PR ld/12761
1746 * elflink.c (elf_link_add_object_symbols): Process .gnu.warning
1747 sections when building shared libraries.
1748
1749 2011-05-18 Rafał Krypa <r.krypa@samsung.com>
1750
1751 PR ld/12778
1752 * elf32-arm.c (elf32_arm_gc_sweep_hook): Use the computed dynamic
1753 reloc pointer.
1754
1755 2011-05-18 Tristan Gingold <gingold@adacore.com>
1756
1757 * xcofflink.c (xcoff_link_add_symbols): Handle C_DWARF symbols.
1758 (xcoff_sweep): Always keep dwarf sections.
1759 (xcoff_link_input_bfd): Handle dwarf symbols and sections.
1760
1761 2011-05-18 Tristan Gingold <gingold@adacore.com>
1762
1763 * libxcoff.h (struct xcoff_dwsect_name): New type.
1764 (XCOFF_DWSECT_NBR_NAMES): New macro.
1765 (xcoff_dwsect_names): Declare.
1766 * coffcode.h (sec_to_styp_flags): Handle xcoff dwarf sections.
1767 (styp_to_sec_flags): Ditto.
1768 (coff_new_section_hook): Ditto.
1769 (coff_slurp_symbol_table): Handle C_DWARF and C_INFO.
1770 * coff-rs6000.c (xcoff_dwsect_name): New variable.
1771
1772 2011-05-17 Tomohiro Kashiwada <kikairoya@gmail.com>
1773
1774 PR ld/12759
1775 * elf32-rx.c (ignore_lma): New variable.
1776 (bfd_elf32_rx_set_target_flags): Add ignore_lma parameter.
1777 (rx_modify_program_headers): Only copy the LMA into the VMA if
1778 ignore_lma is true.
1779
1780 2011-05-17 Alan Modra <amodra@gmail.com>
1781
1782 PR ld/12760
1783 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call.
1784 * elflink.c (elf_link_add_object_symbols): Likewise.
1785 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1786
1787 2011-05-16 Alan Modra <amodra@gmail.com>
1788
1789 * linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak.
1790
1791 2011-05-15 Richard Sandiford <rdsandiford@googlemail.com>
1792
1793 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and
1794 global GOT entries for GOT_PAGE relocations against global symbols.
1795
1796 2011-05-13 Bernd Schmidt <bernds@codesourcery.com>
1797
1798 * config.bfd (tic6x-*-elf, tic6x-*-uclinux): New.
1799 (tic6x-*-*): Replaced by these.
1800 * elf32-tic6x.c (elf32_tic6x_set_osabi): New static function.
1801 (elf32_tic6x_check_relocs): Create dynamic sections if -shared.
1802 (elf_backend_relocs_compatible, elf_backend_post_process_headers):
1803 Define.
1804 (elf32_bed, TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM,
1805 TARGET_BIG_NAME, ELF_OSABI): Redefine twice, and include
1806 "elf32-target.h" two more times.
1807 * configure.in: Handle bfd_elf32_tic6x_linux_be_vec,
1808 bfd_elf32_tic6x_linux_le_vec, bfd_elf32_tic6x_elf_be_vec and
1809 bfd_elf32_tic6x_elf_le_vec.
1810 * configure: Regenerate.
1811
1812 2011-05-13 Jan Beulich <jbeulich@novell.com>
1813
1814 * config.bfd: Add targets x86_64-*-pe and x86_64-*-pep.
1815
1816 2011-05-12 Jan Kratochvil <jan.kratochvil@redhat.com>
1817
1818 * config.in: Regenerated.
1819 * configure: Regenerated.
1820 * configure.in: New tests for HAVE_PRPSINFO_T_PR_PID,
1821 HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and
1822 HAVE_PSINFO32_T_PR_PID.
1823 * elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by
1824 HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID
1825 and HAVE_PSINFO32_T_PR_PID.
1826 * hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition.
1827
1828 2011-05-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1829
1830 * elf.c (elfcore_grok_psinfo): Initialize CORE_PID for both native and
1831 32bit psinfo.
1832 * elf32-ppc.c (ppc_elf_grok_psinfo): Initialize core_pid.
1833 * elf64-ppc.c (ppc64_elf_grok_psinfo): Likewise.
1834
1835 2011-05-09 Paul Brook <paul@codesourcery.com>
1836
1837 * bfd-in.h (elf32_tic6x_fix_exidx_coverage): Add prototype.
1838 * bfd-in2.h: Regenerate.
1839 * elf32-tic6x.c: Include limits.h.
1840 (tic6x_unwind_edit_type, tic6x_unwind_table_edit,
1841 _tic6x_elf_section_data): New.
1842 (elf32_tic6x_section_data): Define.
1843 (elf32_tic6x_new_section_hook): Allocate target specific data.
1844 (elf32_tic6x_add_unwind_table_edit): New function.
1845 (get_tic6x_elf_section_data, elf32_tic6x_adjust_exidx_size,
1846 elf32_tic6x_insert_cantunwind_after, elf32_tic6x_add_low31,
1847 elf32_tic6x_copy_exidx_entry): New functions.
1848 (elf_backend_write_section): Define.
1849
1850 2011-05-09 Paul Brook <paul@codesourcery.com>
1851
1852 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name,
1853 elf32_tic6x_fake_sections): New functions.
1854 (elf_backend_fake_sections): Define.
1855
1856 2011-05-09 Paul Brook <paul@codesourcery.com>
1857
1858 * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): New function.
1859 (elf_backend_gc_mark_extra_sections): Define.
1860
1861 2011-05-07 Dave Korn <dave.korn.cygwin@gmail.com>
1862
1863 PR ld/12365
1864 * cofflink.c (bfd_coff_link_input_bfd): Check for and warn about
1865 references to symbols defined in discarded sections.
1866
1867 2011-05-07 Dave Korn <dave.korn.cygwin@gmail.com>
1868
1869 PR ld/12365
1870 * coffgen.c (coff_write_symbol): Assume input section is its own
1871 output section if output_section member not set.
1872 (coff_write_alien_symbol): Likewise.
1873
1874 2011-05-07 H.J. Lu <hongjiu.lu@intel.com>
1875
1876 PR ld/12730
1877 * elf.c (_bfd_elf_section_offset): Check SEC_ELF_REVERSE_COPY.
1878
1879 * elflink.c (elf_link_input_bfd): Reverse copy .ctors/.dtors
1880 sections if needed.
1881
1882 * section.c (SEC_ELF_REVERSE_COPY): New.
1883 * bfd-in2.h: Regenerated.
1884
1885 2011-05-07 Anders Kaseorg <andersk@ksplice.com>
1886
1887 PR 12739
1888 * libbfd.c (bfd_get_8, bfd_get_signed_8): Use const cast.
1889 * bfd-in2.h: Regenerate.
1890
1891 2011-05-06 Tristan Gingold <gingold@adacore.com>
1892
1893 * vms-alpha.c (evax_section_flags): Remove SEC_IN_MEMORY.
1894 (_bfd_vms_slurp_egsd): Rename old_flags to vms_flags. Handle
1895 any code section. Add comments.
1896 (alpha_vms_object_p): Use void * instead of PTR.
1897 (alpha_vms_create_eisd_for_section): Fix test for setting DZRO.
1898 (build_module_list): Guard against no DST section. Add comments.
1899 (alpha_vms_link_output_symbol): Discard undefined symbols.
1900 (alpha_vms_get_section_contents): Simply memcpy if the section was
1901 already loaded. Fix typo.
1902 (vms_new_section_hook): Use void * instead of PTR.
1903 (vms_alpha_vec): Ditto.
1904
1905 2011-05-06 Richard Sandiford <richard.sandiford@linaro.org>
1906
1907 * elf32-arm.c (cortex_a8_erratum_scan): If the stub is a Thumb
1908 branch to a PLT entry, redirect it to the PLT's Thumb entry point.
1909
1910 2011-05-05 Bernd Schmidt <bernds@codesourcery.com>
1911
1912 * elf32-tic6x.c (elf32_tic6x_final_link): New function.
1913 (elf32_tic6x_merge_attributes): Do not warn for PID or PIC
1914 mismatch. Choose the lower of the two values.
1915 (bfd_elf32_bfd_final_link): New macro.
1916
1917 2011-04-28 Tristan Gingold <gingold@adacore.com>
1918
1919 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
1920 (bfd_xcoff_swap_aux_out): Ditto.
1921 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
1922 (bfd_xcoff64_swap_aux_out): Ditto.
1923
1924 2011-05-04 Alan Modra <amodra@gmail.com>
1925
1926 PR ld/12727
1927 * elf64-ppc.c (ppc_build_one_stub <ppc_sub_plt_call>): Clear
1928 was_undefined on dot-symbols.
1929
1930 2011-05-03 Paul Brook <paul@codesourcery.com>
1931
1932
1933 * elf32-tic6x.c (elf32_tic6x_howto_table,
1934 elf32_tic6x_howto_table_rel, (elf32_tic6x_gc_sweep_hook,
1935 elf32_tic6x_relocate_section, elf32_tic6x_check_relocs):
1936 Add R_C6000_EHTYPE.
1937
1938 2011-05-01 Alan Modra <amodra@gmail.com>
1939
1940 PR ld/12718
1941 * elf32-i386.c (elf_i386_check_relocs): Ensure dynobj set before
1942 creating ifunc sections.
1943 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1944
1945 2011-04-30 H.J. Lu <hongjiu.lu@intel.com>
1946
1947 * elf64-x86-64.c (elf_x86_64_merge_symbol): Correct parameter
1948 names.
1949
1950 2011-04-28 Tom Tromey <tromey@redhat.com>
1951
1952 * bfdio.c (memory_bstat): Pass correct size to memset.
1953
1954 2011-04-28 Mike Frysinger <vapier@gentoo.org>
1955
1956 * dwarf2.c (dwarf_debug_sections): Mark const.
1957 * elf.c (special_sections): Likewise.
1958 * libbfd-in.h (dwarf_debug_sections): Likewise.
1959 * libbfd.h: Regenerate.
1960
1961 2011-04-26 Kai Tietz <ktietz@redhat.com>
1962
1963 * coffcode.h (sec_to_styp_flags): Allow linkonce for
1964 debugging sections.
1965
1966 2011-04-26 Tristan Gingold <gingold@adacore.com>
1967
1968 * coff64-rs6000.c: Convert to ISO-C. Remove PARAMS and PTR macros.
1969
1970 2011-04-24 Alan Modra <amodra@gmail.com>
1971
1972 PR ld/12365
1973 PR ld/12696
1974 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call.
1975 * linker.c (_bfd_link_hash_newfunc): Clear bitfields.
1976 (_bfd_generic_link_add_one_symbol): Update "notice" call.
1977 * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when
1978 it is a redef of an IR symbol in a real BFD.
1979
1980 2011-04-22 H.J. Lu <hongjiu.lu@intel.com>
1981
1982 * elf32-i386.c (elf_i386_readonly_dynrelocs): Warn relocation
1983 in readonly section in a shared object.
1984 (elf_i386_size_dynamic_sections): Likewise.
1985 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
1986 (elf_x86_64_size_dynamic_sections): Likewise.
1987
1988 2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
1989
1990 PR ld/12694
1991 * elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC
1992 symbols.
1993 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
1994
1995 2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
1996
1997 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Return false
1998 on dynamic symbol error.
1999 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2000
2001 2011-04-20 Tristan Gingold <gingold@adacore.com>
2002
2003 * config.bfd (alpha*-*-*vms*, ia64*-*-*vms*): Define targ_selvecs.
2004
2005 2011-04-20 Alan Modra <amodra@gmail.com>
2006
2007 * hash.c (bfd_default_hash_table_size): Make it an unsigned long.
2008 (bfd_hash_table_init_n): Overflow checking.
2009 (bfd_hash_set_default_size): Return current size. Take unsigned long
2010 arg. Add 65537 to hash_size primes.
2011 * bfd-in.h (bfd_hash_set_default_size): Update prototype.
2012 * bfd-in2.h: Regenerate.
2013
2014 2011-04-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2015
2016 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of
2017 memmove elements.
2018
2019 2011-04-20 Alan Modra <amodra@gmail.com>
2020
2021 * libbfd.c (bfd_log2): Do return rounded up value.
2022 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Replace bfd_log2
2023 call with expanded old round down version of the function.
2024
2025 * archive.c (_bfd_get_elt_at_filepos): Don't release n_nfd.
2026 * elflink.c (elf_link_add_object_symbols): Delete redundant code.
2027
2028 2011-04-20 Alan Modra <amodra@gmail.com>
2029
2030 PR ld/12365
2031 * elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols
2032 in their own common section.
2033 * elflink.c (elf_link_add_object_symbols): Likewise.
2034 * linker.c (generic_link_check_archive_element): Don't lose flags
2035 if common section is pre-existing.
2036 (_bfd_generic_link_add_one_symbol): Likewise.
2037
2038 2011-04-20 Alan Modra <amodra@gmail.com>
2039
2040 PR ld/12365
2041 * elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls.
2042 * linker.c (_bfd_generic_link_add_one_symbol): Likewise. Call
2043 multiple_definition regardless of allow_multiple_definition.
2044 * simple.c (simple_dummy_multiple_definition): Update.
2045 * xcofflink.c (xcoff_link_add_symbols): Update multiple_definition
2046 calls.
2047
2048 2011-04-18 Tristan Gingold <gingold@adacore.com>
2049
2050 * coff-rs6000.c: Convert to ISO-C. Remove PARAMS macro.
2051
2052 2011-04-18 Alan Modra <amodra@gmail.com>
2053
2054 PR ld/12365
2055 PR ld/12672
2056 * bfd.c (BFD_PLUGIN): Define.
2057 (BFD_FLAGS_SAVED, BFD_FLAGS_FOR_BFD_USE_MASK): Add BFD_PLUGIN.
2058 * bfd-in2.h: Regenerate.
2059 * elflink.c (elf_link_output_extsym): Strip undefined plugin syms.
2060 * opncls.c (bfd_make_readable): Don't lose original bfd flags.
2061
2062 2011-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
2063
2064 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for
2065 SEC_LOAD.
2066
2067 2011-04-15 Sergio Durigan Junior <sergiodj@redhat.com>
2068
2069 * elf-bfd.h (struct sdt_note): New struct.
2070 (struct elf_obj_tdata) <sdt_note_head>: New field.
2071 * elf.c (elfobj_grok_stapsdt_note_1): New function.
2072 (elfobj_grok_stapsdt_note): Likewise.
2073 (elf_parse_notes): Added code to treat SystemTap note
2074 sections.
2075
2076 2011-04-12 Richard Henderson <rth@redhat.com>
2077
2078 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not
2079 exclude empty .got sections.
2080
2081 2011-04-11 H.J. Lu <hongjiu.lu@intel.com>
2082
2083 * elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound
2084 array access for BFD_RELOC_386_IRELATIVE.
2085
2086 2011-04-11 Bernd Schmidt <bernds@codesourcery.com>
2087
2088 * elf32-tic6x.c (elf32_tic6x_check_relocs): Initialize pc_count field.
2089
2090 2011-04-11 Mark Wielaard <mjw@redhat.com>
2091
2092 PR 10549
2093 * elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols.
2094 (has_gnu_symbols): Renamed from has_ifunc_symbols.
2095 * elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name.
2096 * elf32-arm.c (elf32_arm_add_symbol_hook): Set has_gnu_symbols
2097 also if STB_GNU_UNIQUE symbol binding was seen.
2098 * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
2099 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
2100 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
2101 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
2102 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
2103 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
2104
2105 2011-04-11 Alan Modra <amodra@gmail.com>
2106
2107 * bfd-in.h (bfd_get_section_limit): Don't use rawsize with output
2108 sections.
2109 * libbfd.c (_bfd_generic_get_section_contents): Likewise.
2110 (_bfd_generic_get_section_contents_in_window): Likewise.
2111 * section.c (bfd_get_section_contents): Likewise.
2112 * compress.c (bfd_get_full_section_contents): Likewise.
2113 * elf32-rx.c (rx_final_link): Ignore rawsize.
2114 * elf32-microblaze.c (microblaze_elf_relocate_section): Use correct
2115 bfd with bfd_get_section_limit.
2116 * elfxx-ia64.c (elfNN_ia64_choose_gp): Add "final" parameter. Use
2117 os->size during final link. Update callers.
2118 * bfd-in2.h: Regenerate.
2119
2120 2011-04-10 Richard Sandiford <rdsandiford@googlemail.com>
2121
2122 PR ld/12637
2123 * elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count
2124 as the number of global entries when merging with the primary GOT.
2125
2126 2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
2127
2128 * elf32-i386.c: Update copyright year.
2129 * elf64-x86-64.c: Likewise.
2130
2131 2011-04-09 Kai Tietz <ktietz@redhat.com>
2132
2133 * peXXigen.c (_bfd_XXi_final_link_postscripte): Sort pdata in temporary
2134 buffer and use rawsize for sorting.
2135 * coffcode.h (coff_compute_section_file_positions): Set rawsize
2136 before doing alignment.
2137
2138 2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
2139
2140 * elf32-i386.c (elf_i386_relocate_section): Return relocation
2141 error on unsupported relocation.
2142 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2143
2144 2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
2145
2146 PR binutils/12657
2147 * hosts/x86-64linux.h (elf_prstatus32): Replace __pid_t with
2148 pid_t.
2149
2150 2011-04-08 H.J. Lu <hongjiu.lu@intel.com>
2151
2152 PR ld/12654
2153 * elf32-i386.c (elf_i386_relocate_section): Check !executable
2154 instead of shared for R_386_TLS_LDO_32.
2155
2156 2011-04-08 Tristan Gingold <gingold@adacore.com>
2157
2158 * Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
2159 * coff-pmac: Remove
2160 * xcoff-target.h: Remove
2161 * Makefile.in: Regenerate.
2162
2163 2011-04-07 Cary Coutant <ccoutant@google.com>
2164
2165 * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification.
2166
2167 2011-04-07 Paul Brook <paul@codesourcery.com>
2168
2169 * elf32-tic6x.c (elf32_tic6x_howto_table): R_C6000_PREL31 is
2170 pc-relative.
2171 (elf32_tic6x_howto_table_rel): Ditto.
2172 (elf32_tic6x_relocate_section): Implement R_C6000_PREL31.
2173 (elf32_tic6x_check_relocs): Ditto.
2174
2175 2011-04-06 Joseph Myers <joseph@codesourcery.com>
2176
2177 * config.bfd (thumb-*-oabi): Don't handle in list of obsolete
2178 targets.
2179 (strongarm*, thumb*, xscale*): Remove architectures.
2180 (strongarm-*-kaos*, thumb-*-coff, thumb-*-elf, thumb-epoc-pe*,
2181 thumb-*-pe*, strongarm-*-elf, strongarm-*-coff, xscale-*-elf,
2182 xscale-*-coff): Remove targets.
2183
2184 2011-04-01 Tristan Gingold <gingold@adacore.com>
2185
2186 * elfxx-ia64.c: include bfd_stdint.h
2187
2188 2011-03-31 Jan Kratochvil <jan.kratochvil@redhat.com>
2189
2190 * elf32-tic6x.c (elf32_tic6x_relocate_section): Remove unused variable
2191 dynobj and its initialization.
2192
2193 2011-03-31 Tristan Gingold <gingold@adacore.com>
2194
2195 * makefile.vms (DEFS): Add HAVE_bfd_elf64_ia64_vms_vec.
2196 * configure.com: Set BFD_HOST_64BIT_LONG_LONG and
2197 BFD_HOST_LONG_LONG to 1.
2198
2199 2011-03-31 Tristan Gingold <gingold@adacore.com>
2200
2201 * vms-alpha.c (vms_get_remaining_object_record): Fix dec-c warning.
2202 (_bfd_vms_write_etir): Ditto.
2203 (_bfd_vms_slurp_etir): Avoid to use intptr_t
2204 * configure.com: Generate bfd_stdint.h
2205
2206 2011-03-31 Bernd Schmidt <bernds@codesourcery.com>
2207
2208 * elf32-tic6x.h (struct elf32_tic6x_params): New.
2209 (elf32_tic6x_setup): Declare.
2210 * elf32-tic6x.c: Include <limits.h>.
2211 (ELF_DYNAMIC_LINKER, DEFAULT_STACK_SIZE, PLT_ENTRY_SIZE): Define.
2212 (struct elf32_tic6x_link_hash_table, struct elf32_link_hash_entry):
2213 New structures.
2214 (elf32_tic6x_link_hash_table, is_tic6x_elf): New macros.
2215 (tic6x_elf_scom_section, tic6x_elf_scom_symbol,
2216 tic6x_elf_scom_symbol_ptr): New static variables.
2217 (elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel,
2218 elf32_tic6x_reloc_map): Add R_C6000_JUMP_SLOT, R_C6000_EHTYPE,
2219 R_C6000_PCR_H16 and R_C6000_PCR_L16.
2220 (elf32_tic6x_link_hash_newfunc, elf32_tic6x_link_hash_table_create,
2221 elf32_tic6x_link_hash_table_free, elf32_tic6x_setup,
2222 elf32_tic6x_using_dsbt, elf32_tic6x_install_rela,
2223 elf32_tic6x_create_dynamic_sections, elf32_tic6x_make_got_dynreloc,
2224 elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_gc_sweep_hook,
2225 elf32_tic6x_adjust_dynamic_symbol): New static functions.
2226 (elf32_tic6x_relocate_section): For R_C6000_PCR_S21, convert branches
2227 to weak symbols as required by the ABI.
2228 Handle GOT and DSBT_INDEX relocs, and copy relocs to the output file
2229 as needed when generating DSBT output.
2230 (elf32_tic6x_check_relocs, elf32_tic6x_add_symbol_hook,
2231 elf32_tic6x_symbol_processing, elf32_tic6x_section_from_bfd_section,
2232 elf32_tic6x_allocate_dynrelocs, elf32_tic6x_size_dynamic_sections,
2233 elf32_tic6x_always_size_sections, elf32_tic6x_modify_program_headers,
2234 elf32_tic6x_finish_dynamic_sections, elf32_tic6x_plt_sym_val,
2235 elf32_tic6x_copy_private_data, elf32_tic6x_link_omit_section_dynsym):
2236 New static functions.
2237 (ELF_MAXPAGESIZE): Define to 0x1000.
2238 (bfd_elf32_bfd_copy_private_bfd_data,
2239 bfd_elf32_bfd_link_hash_table_create,
2240 bfd_elf32_bfd_link_hash_table_free, elf_backend_can_refcount,
2241 elf_backend_want_got_plt, elf_backend_want_dynbss,
2242 elf_backend_plt_readonly, elf_backend_got_header_size,
2243 elf_backend_gc_sweep_hook, elf_backend_modify_program_headers,
2244 elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
2245 elf_backend_check_relocs, elf_backend_add_symbol_hook,
2246 elf_backend_symbol_processing, elf_backend_link_output_symbol_hook,
2247 elf_backend_section_from_bfd_section,
2248 elf_backend_finish_dynamic_symbol, elf_backend_always_size_sections,
2249 elf32_tic6x_size_dynamic_sections, elf_backend_finish_dynamic_sections,
2250 elf_backend_omit_section_dynsym, elf_backend_plt_sym_val): Define.
2251
2252 * bfd/reloc.c (BFD_RELOC_C6000_JUMP_SLOT, BFD_RELOC_C6000_EHTYPE,
2253 BFD_RELOC_C6000_PCR_H16, BFD_RELOC_C6000_PCR_S16): Add.
2254 * bfd/bfd-in2.h: Regenerate.
2255 * bfd/libbfd.h: Regenerate.
2256 * config.bfd: Accept tic6x-*-* instead of tic6x-*-elf.
2257
2258 2011-03-31 Tristan Gingold <gingold@adacore.com>
2259
2260 * coffcode.h (coff_slurp_symbol_table): Silently discard C_NULL
2261 entry on xcoff when value is C_NULL_VALUE.
2262
2263 2011-03-31 Tristan Gingold <gingold@adacore.com>
2264
2265 * libcoff-in.h (exec_hdr): Remove.
2266 * libcoff.h: Regenerate.
2267
2268 2011-03-30 Nick Clifton <nickc@redhat.com>
2269
2270 * po/da.po: Updated Danish translation.
2271
2272 2011-03-29 Richard Henderson <rth@redhat.com>
2273
2274 * elf64-alpha.c (elf64_alpha_gc_mark_hook): New.
2275 (elf64_alpha_gc_sweep_hook): New.
2276 (elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): New.
2277 (elf_backend_can_gc_sections): New.
2278
2279 2011-03-26 John Marino <binutils@marino.st>
2280
2281 * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*.
2282 * configure.in: Delete unused bfd_elf32_i386_dragonfly_vec.
2283 * configure: Regenerate.
2284
2285 2011-03-25 Michael Snyder <msnyder@vmware.com>
2286
2287 * coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
2288
2289 2011-03-25 Tristan Gingold <gingold@adacore.com>
2290
2291 * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Allow the use
2292 of find_nearest_line on object files.
2293
2294 2011-03-25 Tristan Gingold <gingold@adacore.com>
2295
2296 * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only.
2297 Minor reordering.
2298 (alpha_vms_create_eisd_for_section): Make code sections read-only.
2299
2300 2011-03-24 Alan Modra <amodra@gmail.com>
2301
2302 * elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where
2303 old-style __tls_get_addr calls without marker relocs don't match
2304 their arg setup insn one for one. If such mismatches are found
2305 report the reloc and don't do any tls optimization.
2306 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
2307
2308 2011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
2309
2310 * bfd-in2.h: Regenerate.
2311
2312 2011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
2313
2314 * archures.c: Add AVR XMEGA architecture information.
2315 * cpu-avr.c (arch_info_struct): Likewise.
2316 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
2317 (elf32_avr_object_p): Likewise.
2318
2319 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2320
2321 * reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
2322 * bfd-in2.h: Regenerate.
2323 * elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
2324 to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
2325 entry.
2326 (elf32_arm_howto_from_type): Update accordingly.
2327 (elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
2328 (elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
2329 (arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
2330 with an extra noncall_refcount field.
2331 (arm_local_iplt_info): New structure.
2332 (elf_arm_obj_tdata): Add local_iplt.
2333 (elf32_arm_local_iplt): New accessor macro.
2334 (elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
2335 plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
2336 Change tls_type to a bitfield and add is_iplt.
2337 (elf32_arm_link_hash_newfunc): Update accordingly.
2338 (elf32_arm_allocate_local_sym_info): New function.
2339 (elf32_arm_create_local_iplt): Likewise.
2340 (elf32_arm_get_plt_info): Likewise.
2341 (elf32_arm_plt_needs_thumb_stub_p): Likewise.
2342 (elf32_arm_get_local_dynreloc_list): Likewise.
2343 (create_ifunc_sections): Likewise.
2344 (elf32_arm_copy_indirect_symbol): Update after the changes to
2345 elf32_arm_link_hash_entry. Assert the is_iplt has not yet been set.
2346 (arm_type_of_stub): Add an st_type argument. Use elf32_arm_get_plt_info
2347 to get PLT information. Assert that all STT_GNU_IFUNC references
2348 are turned into PLT references.
2349 (arm_build_one_stub): Pass the symbol type to
2350 elf32_arm_final_link_relocate.
2351 (elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
2352 (elf32_arm_allocate_irelocs): New function.
2353 (elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
2354 all R_ARM_IRELATIVE.
2355 (elf32_arm_allocate_plt_entry): New function.
2356 (elf32_arm_populate_plt_entry): Likewise.
2357 (elf32_arm_final_link_relocate): Add an st_type parameter.
2358 Set srelgot to null for static objects. Use separate variables
2359 to record which st_value and st_type should be used when generating
2360 a dynamic relocation. Use elf32_arm_get_plt_info to find the
2361 symbol's PLT information, setting has_iplt_entry, splt,
2362 plt_offset and gotplt_offset accordingly. Check whether
2363 STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
2364 the relocation target accordingly. Broaden assert to include
2365 .iplts. Don't set sreloc for static relocations. Assert that
2366 we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
2367 and R_ARM_ABS32_NOI. Generate R_ARM_IRELATIVE relocations instead
2368 of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
2369 symbol. Pass the symbol type to arm_type_of_stub. Conditionally
2370 resolve GOT references to the .igot.plt entry.
2371 (elf32_arm_relocate_section): Update the call to
2372 elf32_arm_final_link_relocate.
2373 (elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
2374 information. Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
2375 relocations in shared libraries and relocatable executables.
2376 Count non-call PLT references. Use elf32_arm_get_local_dynreloc_list
2377 to get the list of dynamic relocations for a local symbol.
2378 (elf32_arm_check_relocs): Always create ifunc sections. Set isym
2379 at the same time as setting h. Use elf32_arm_allocate_local_sym_info
2380 to allocate local symbol information. Treat R_ARM_REL32 and
2381 R_ARM_REL32_NOI as call relocations in shared libraries and
2382 relocatable executables. Record PLT information for local
2383 STT_GNU_IFUNC functions as well as global functions. Count
2384 non-call PLT references. Use elf32_arm_get_local_dynreloc_list
2385 to get the list of dynamic relocations for a local symbol.
2386 (elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
2387 Don't remove STT_GNU_IFUNC PLTs unless all references have been
2388 removed. Update after the changes to elf32_arm_link_hash_entry.
2389 (allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
2390 entries should live in .plt or .iplt. Check whether the .igot.plt
2391 and .got entries can be combined. Use elf32_arm_allocate_plt_entry
2392 to allocate .plt and .(i)got.plt entries. Detect which .got
2393 entries will need R_ARM_IRELATIVE relocations and use
2394 elf32_arm_allocate_irelocs to allocate them. Likewise other
2395 non-.got dynamic relocations.
2396 (elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
2397 and dynamic relocations for local STT_GNU_IFUNC symbols.
2398 Check whether the .igot.plt and .got entries can be combined.
2399 Detect which .got entries will need R_ARM_IRELATIVE relocations
2400 and use elf32_arm_allocate_irelocs to allocate them. Use stashed
2401 section pointers intead of strcmp checks. Handle iplt and igotplt.
2402 (elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
2403 to fill in .plt, .got.plt and .rel(a).plt entries. Point
2404 STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
2405 resolve to it.
2406 (elf32_arm_output_plt_map_1): New function, split out from
2407 elf32_arm_output_plt_map. Handle .iplt entries. Use
2408 elf32_arm_plt_needs_thumb_stub_p.
2409 (elf32_arm_output_plt_map): Call it.
2410 (elf32_arm_output_arch_local_syms): Add mapping symbols for
2411 local .iplt entries.
2412 (elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
2413 (elf32_arm_swap_symbol_out): Likewise.
2414 (elf32_arm_add_symbol_hook): New function.
2415 (elf_backend_add_symbol_hook): Define for all targets.
2416
2417 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2418
2419 * elf-bfd.h (elf_link_hash_entry): Add target_internal.
2420 * elf.c (swap_out_syms): Set st_target_internal for each
2421 Elf_Internal_Sym.
2422 * elfcode.h (elf_swap_symbol_in): Likewise.
2423 * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
2424 * elf32-sh-symbian.c (sh_symbian_relocate_section): Likewise.
2425 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
2426 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
2427 * elflink.c (elf_link_output_extsym): Likewise.
2428 (bfd_elf_final_link): Likewise.
2429 (elf_link_add_object_symbols): Copy st_target_internal
2430 to the hash table if we see a definition.
2431 (_bfd_elf_copy_link_hash_symbol_type): Copy target_internal.
2432 * elf32-arm.c (elf32_arm_stub_hash_entry): Replace st_type with
2433 a branch_type field.
2434 (a8_erratum_fix, a8_erratum_reloc): Likewise.
2435 (arm_type_of_stub): Replace actual_st_type with an
2436 actual_branch_type parameter.
2437 (arm_build_one_stub): Use branch types rather than st_types to
2438 determine the type of branch.
2439 (cortex_a8_erratum_scan): Likewise.
2440 (elf32_arm_size_stubs): Likewise.
2441 (bfd_elf32_arm_process_before_allocation): Likewise.
2442 (allocate_dynrelocs_for_symbol): Likewise.
2443 (elf32_arm_finish_dynamic_sections): Likewise.
2444 (elf32_arm_final_link_relocate): Replace sym_flags parameter with
2445 a branch_type parameter.
2446 (elf32_arm_relocate_section): Update call accordingly.
2447 (elf32_arm_adjust_dynamic_symbol): Don't check STT_ARM_TFUNC.
2448 (elf32_arm_output_map_sym): Initialize st_target_internal.
2449 (elf32_arm_output_stub_sym): Likewise.
2450 (elf32_arm_symbol_processing): Delete.
2451 (elf32_arm_swap_symbol_in): Convert STT_ARM_TFUNCs into STT_FUNCs.
2452 Use st_target_internal to record the branch type.
2453 (elf32_arm_swap_symbol_out): Use st_target_internal to test for
2454 Thumb functions.
2455 (elf32_arm_is_function_type): Delete.
2456 (elf_backend_symbol_processing): Likewise.
2457 (elf_backend_is_function_type): Likewise.
2458
2459 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2460
2461 * elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
2462 (elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
2463 into the PLT block.
2464
2465 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2466
2467 * elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
2468 may_need_local_target_p and may_become_dynamic_p to classify
2469 the relocation type. Don't check info->symbolic or h->def_regular
2470 when deciding whether to record a potential dynamic reloc.
2471 Don't treat potential dynamic relocs as PLT references.
2472 (elf32_arm_gc_sweep_hook): Update to match. Assert that we don't
2473 try to make the PLT reference count go negative.
2474
2475 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2476
2477 * elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
2478 GOT entry here, rather than leaving it to finish_dynamic_symbol.
2479 Only create a dynamic relocation for local references if
2480 info->shared.
2481 (allocate_dynrelocs_for_symbol): Update dynamic relocation
2482 allocation accordingly.
2483 (elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.
2484
2485 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2486
2487 * elf32-arm.c (elf32_arm_allocate_dynrelocs): New function.
2488 (elf32_arm_add_dynreloc): Likewise.
2489 (elf32_arm_adjust_dynamic_symbol): Use elf32_arm_allocate_dynrelocs
2490 to allocate dynamic relocations.
2491 (elf32_arm_size_dynamic_sections): Likewise.
2492 (allocate_dynrelocs): Likewise. Rename to
2493 allocate_dynrelocs_for_symbol.
2494 (elf32_arm_final_link_relocate): Use elf32_arm_add_dynreloc to
2495 create dynamic relocations.
2496 (elf32_arm_finish_dynamic_symbol): Likewise.
2497
2498 2011-03-12 H.J. Lu <hongjiu.lu@intel.com>
2499
2500 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
2501 x32 GD->IE and GD->LE transitions.
2502 (elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
2503 and LD->LE transitions.
2504
2505 2011-03-10 Alan Modra <amodra@gmail.com>
2506
2507 * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset
2508 for LO_DS error message and correct multiple.
2509
2510 2011-03-10 Alan Modra <amodra@gmail.com>
2511
2512 * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define.
2513 (ppc64_elf_link_just_syms): New function.
2514 (opd_entry_value): Don't assume big-endian host.
2515 (get_r2off): New function.
2516 (ppc_build_one_stub, ppc_size_one_stub): Use it here.
2517
2518 2011-03-06 Michael Snyder <msnyder@vmware.com>
2519
2520 * compress.c (bfd_compress_section_contents): Check for out of mem.
2521
2522 * elf64-x86-64.c (elf_x86_64_relocate_section): Document
2523 that case statement falls through intentionally.
2524
2525 * elf32-i386.c (elf_i386_relocate_section): Document fall through.
2526
2527 2011-03-04 Alan Modra <amodra@gmail.com>
2528
2529 * archive.c (bsd_write_armap): Don't call stat in deterministic
2530 mode, and don't use st_mtime if stat returns error.
2531
2532 2011-03-03 Michael Snyder <msnyder@vmware.com>
2533
2534 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove dead code.
2535
2536 * coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
2537
2538 * aoutx.h (aout_final_link): Use sizeof int not sizeof int*.
2539 (aout_link_write_other_symbol): Missing break statement.
2540
2541 * dwarf2.c (scan_unit_for_symbols): Stop memory leak.
2542
2543 * archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek fails.
2544
2545 2011-03-03 H.J. Lu <hongjiu.lu@intel.com>
2546
2547 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
2548 x32 IE->LE transition.
2549 (elf_x86_64_relocate_section): Likewise.
2550
2551 2011-03-02 Bernd Schmidt <bernds@codesourcery.com>
2552
2553 * elflink.c (is_reloc_section): Remove function.
2554 (get_dynamic_reloc_section_name): Construct string manually.
2555
2556 2011-02-28 Kai Tietz <kai.tietz@onevision.com>
2557
2558 * archive.c (_bfd_find_nested_archive): Use filename_(n)cmp.
2559 (adjust_relative_path): Likewise.
2560 (_bfd_construct_extended_name_table): Likewise.
2561 * corefile.c (generic_core_file_matches_executable_p): Likewise.
2562 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
2563 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2564 * elf32-spu.c (sort_bfds): Likewise.
2565 (spu_elf_auto_overlay): Likewise.
2566 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
2567 * xcofflink.c (xcoff_set_import_path): Likewise.
2568 * xtensa-isa.c (xtensa_regfile_lookup): Likewise.
2569 (xtensa_regfile_lookup_shortname): Likewise.
2570
2571 2011-02-28 Alan Modra <amodra@gmail.com>
2572
2573 PR 12513
2574 * archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and
2575 stringsize. Properly sanity check symdef_count. Remove redundant
2576 bfd_release.
2577
2578 2011-02-25 Rafael Ávila de Espíndola <respindola@mozilla.com>
2579
2580 * plugin.c (bfd_plugin_object_p): Correctly set the filesize
2581 and handle claim_file seeking. Only try to load the plugin once.
2582
2583 2011-02-22 Andreas Schwab <schwab@redhat.com>
2584
2585 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
2586 relocation read the value from the second GOT slot.
2587
2588 2011-02-15 Tristan Gingold <gingold@adacore.com>
2589
2590 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
2591
2592 2011-02-15 Alan Modra <amodra@gmail.com>
2593
2594 * elf64-ppc.c (ppc64_elf_edit_toc): Reinstate second read of
2595 toc relocs. Fuss over free(NULL).
2596
2597 2011-02-14 Mike Frysinger <vapier@gentoo.org>
2598
2599 * elflink.c (bfd_elf_size_dynamic_sections): Add
2600 bfd_get_symbol_leading_char to the start of newname.
2601
2602 2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2603
2604 * configure: Regenerate.
2605
2606 2011-02-09 Alan Modra <amodra@gmail.com>
2607
2608 * elf64-ppc.c (ppc64_elf_edit_toc): Don't free toc relocs until
2609 we are done. When optimising large toc, check that a global
2610 symbol on a toc reloc is defined in a kept section.
2611
2612 2011-02-08 Nick Clifton <nickc@redhat.com>
2613
2614 PR binutils/12467
2615 * elf.c (assign_file_positions_for_load_sections): Set the program
2616 header offset and entry size to zero if there are no program
2617 headers.
2618
2619 2011-02-08 Alan Modra <amodra@gmail.com>
2620
2621 * elf64-ppc.c (ppc64_elf_edit_toc): Don't segfault on NULL
2622 local_syms when looking for local symbols in .toc.
2623
2624 2011-02-01 Alan Modra <amodra@gmail.com>
2625
2626 * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value
2627 for toc pointer on any section having makes_toc_func_call set.
2628 (check_pasted_section): Ensure pasted .init/.fini fragments use
2629 the same toc if any has makes_toc_func_call set.
2630
2631 2011-01-28 Joseph Myers <joseph@codesourcery.com>
2632
2633 * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
2634 field.
2635
2636 2011-01-22 Richard Sandiford <rdsandiford@googlemail.com>
2637
2638 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
2639 common sections too.
2640
2641 2011-01-18 H.J. Lu <hongjiu.lu@intel.com>
2642
2643 * elf64-x86-64.c (elf_backend_want_plt_sym): Redefine to 0 after
2644 Solaris target.
2645
2646 2011-01-18 Pierre Muller <muller@ics.u-strasbg.fr>
2647
2648 Fix compilation for mingw64.
2649 * coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate
2650 typecast to avoid warning.
2651 * elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type
2652 usage.
2653 * elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead
2654 of long for pointer to avoid warning.
2655 (elfNN_ia64_relax_brl): Idem.
2656 (elfNN_ia64_install_value): Idem.
2657 * vms-alpha.c (_bfd_vms_slurp_etir): Idem.
2658
2659 2011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
2660
2661 * elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
2662 h->needs_plt when deciding whether to record a possible dynamic reloc.
2663
2664 2011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
2665
2666 * elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
2667 dynamic relocs for the removed section.
2668
2669 2011-01-15 H.J. Lu <hongjiu.lu@intel.com>
2670
2671 * elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32
2672 relocations.
2673
2674 2011-01-14 H.J. Lu <hongjiu.lu@intel.com>
2675
2676 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
2677 (elf_x86_64_link_hash_table_create): Set pointer_r_type.
2678 (elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
2679 for ILP32. Remove ABI_64_P PIC check for R_X86_64_8,
2680 R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
2681 (elf_x86_64_relocate_section): Handle R_X86_64_32 like R_X86_64_64
2682 for ILP32.
2683
2684 2011-01-14 Alan Modra <amodra@gmail.com>
2685
2686 * bfd.c (bfd_perror): Flush stdout before and stderr after printing
2687 error.
2688 (_bfd_default_error_handler): Likewise.
2689 * elf.c (print_segment_map): Likewise.
2690 * libbfd.c (warn_deprecated): Likewise.
2691 * som.c (som_sizeof_headers): No need to do so here.
2692 * coff-i860.c: Replace use of printf for error messages with
2693 _bfd_error_handler.
2694 * coff-ppc.c: Likewise.
2695 * coff-sh.c: Likewise.
2696 * elf32-bfin.c: Likewise.
2697 * elf32-dlx.c: Likewise.
2698 * elf32-mep.c: Likewise.
2699 * elf32-v850.c: Likewise.
2700 * mach-o.c: Likewise.
2701 * pef.c: Likewise.
2702
2703 2011-01-13 H.J. Lu <hongjiu.lu@intel.com>
2704
2705 * elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
2706 swap_reloca_out.
2707 (elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
2708 (elf_x86_64_check_relocs): Align relocation section to 4 byte
2709 for 32bit.
2710 (elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
2711 ELF_ST_TYPE.
2712 (elf_x86_64_finish_dynamic_symbol): Updated.
2713 (elf_x86_64_finish_dynamic_sections): Don't use
2714 Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
2715 bfd_elf64_swap_dyn_out.
2716
2717 2011-01-14 J. Park <grassman@gmail.com>
2718
2719 PR ld/12339
2720 * elf32-arm.c (allocate_dynrelocs): Don't set up eh before
2721 following bfd_link_hash_warning symbol link.
2722
2723 2011-01-10 Nathan Sidwell <nathan@codesourcery.com>
2724 Glauber de Oliveira Costa <glommer@gmail.com>
2725
2726 * reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
2727 BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
2728 BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
2729 relocations.
2730 * libbfd.h: Rebuilt.
2731 * bfd-in2.h: Rebuilt.
2732 * elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
2733 (elf32_arm_reloc_map): Likewise.
2734 (tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
2735 (elf32_arm_stub_long_branch_any_tls_pic,
2736 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
2737 (DEF_STUBS): Add new stubs.
2738 (struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
2739 (elf32_arm_local_tlsdesc_gotent): New.
2740 (GOT_TLS_GDESC): New mask.
2741 (GOT_TLS_GD_ANY): Define.
2742 (struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
2743 (elf32_arm_compute_jump_table_size): New.
2744 (struct elf32_arm_link_hash_table): Add next_tls_desc_index,
2745 num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
2746 sgotplt_jump_table_size fields.
2747 (elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
2748 (elf32_arm_link_hash_table_create): Initialize new fields.
2749 (arm_type_of_stub): Check TLS desc relocs too.
2750 (elf32_arm_stub_name): TLS desc relocs can be shared.
2751 (elf32_arm_tls_transition): Determine relaxation.
2752 (arm_stub_required_alignment): Add tls stubs.
2753 (elf32_arm_size_stubs): Likewise.
2754 (elf32_arm_tls_relax): Perform TLS relaxing.
2755 (elf32_arm_final_link_relocate): Process TLS DESC relocations.
2756 (IS_ARM_TLS_GNU_RELOC): New.
2757 (IS_ARM_TLS_RELOC): Use it.
2758 (elf32_arm_relocate_section): Perform TLS relaxing.
2759 (elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
2760 desc relocations.
2761 (allocate_dynrelocs): Allocate tls desc relcoations.
2762 (elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
2763 symbols.
2764 (elf32_arm_size_dynamic_sections): Allocate tls trampolines and
2765 got slots.
2766 (elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
2767 symbol.
2768 (elf32_arm_finish_dynamic_symbol): Adjust.
2769 (arm_put_trampoline): New.
2770 (elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
2771 trampolines.
2772 (elf_backend_always_size_sections): Define.
2773
2774 2011-01-06 H.J. Lu <hongjiu.lu@intel.com>
2775
2776 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Optimized.
2777
2778 2011-01-06 H.J. Lu <hongjiu.lu@intel.com>
2779
2780 PR ld/12366
2781 PR ld/12371
2782 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
2783 handle symbols marked with regular reference, but not non-GOT
2784 reference when building shared library.
2785
2786 * elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
2787 local and global STT_GNU_IFUNC symols when building shared
2788 library.
2789 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
2790
2791 2011-01-05 DJ Delorie <dj@redhat.com>
2792
2793 * reloc.c: Add BFD_RELOC_RX_OP_NEG.
2794 * libbfd.h: Regenerate.
2795 * bfd-in2.h: Regenerate.
2796 * elf32-rx.c: Add it to the list, corresponding to R_RX_OPneg.
2797
2798 2011-01-03 H.J. Lu <hongjiu.lu@intel.com>
2799
2800 * cpu-i386.c (bfd_i386_compatible): New.
2801 (bfd_x64_32_arch_intel_syntax): Replace bfd_default_compatible
2802 with bfd_i386_compatible.
2803 (bfd_x86_64_arch_intel_syntax): Likewise.
2804 (bfd_i386_arch_intel_syntax): Likewise.
2805 (i8086_arch): Likewise.
2806 (bfd_x64_32_arch): Likewise.
2807 (bfd_x86_64_arch): Likewise.
2808 (bfd_i386_arch): Likewise.
2809
2810 For older changes see ChangeLog-2010
2811 \f
2812 Local Variables:
2813 mode: change-log
2814 left-margin: 8
2815 fill-column: 74
2816 version-control: never
2817 End:
This page took 0.088308 seconds and 5 git commands to generate.