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