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