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