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