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