PR ld/12760
[external/binutils.git] / bfd / ChangeLog
1 2011-05-17  Alan Modra  <amodra@gmail.com>
2
3         PR ld/12760
4         * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call.
5         * elflink.c (elf_link_add_object_symbols): Likewise.
6         * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7
8 2011-05-16  Alan Modra  <amodra@gmail.com>
9
10         * linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak.
11
12 2011-05-15  Richard Sandiford  <rdsandiford@googlemail.com>
13
14         * elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and
15         global GOT entries for GOT_PAGE relocations against global symbols.
16
17 2011-05-13  Bernd Schmidt  <bernds@codesourcery.com>
18
19         * config.bfd (tic6x-*-elf, tic6x-*-uclinux): New.
20         (tic6x-*-*): Replaced by these.
21         * elf32-tic6x.c (elf32_tic6x_set_osabi): New static function.
22         (elf32_tic6x_check_relocs): Create dynamic sections if -shared.
23         (elf_backend_relocs_compatible, elf_backend_post_process_headers):
24         Define.
25         (elf32_bed, TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM,
26         TARGET_BIG_NAME, ELF_OSABI): Redefine twice, and include
27         "elf32-target.h" two more times.
28         * configure.in: Handle bfd_elf32_tic6x_linux_be_vec,
29         bfd_elf32_tic6x_linux_le_vec, bfd_elf32_tic6x_elf_be_vec and
30         bfd_elf32_tic6x_elf_le_vec.
31         * configure: Regenerate.
32
33 2011-05-13  Jan Beulich  <jbeulich@novell.com>
34
35         * config.bfd: Add targets x86_64-*-pe and x86_64-*-pep.
36
37 2011-05-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
38
39         * config.in: Regenerated.
40         * configure: Regenerated.
41         * configure.in: New tests for HAVE_PRPSINFO_T_PR_PID,
42         HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and
43         HAVE_PSINFO32_T_PR_PID.
44         * elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by
45         HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID
46         and HAVE_PSINFO32_T_PR_PID.
47         * hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition.
48
49 2011-05-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
50
51         * elf.c (elfcore_grok_psinfo): Initialize CORE_PID for both native and
52         32bit psinfo.
53         * elf32-ppc.c (ppc_elf_grok_psinfo): Initialize core_pid.
54         * elf64-ppc.c (ppc64_elf_grok_psinfo): Likewise.
55
56 2011-05-09  Paul Brook  <paul@codesourcery.com>
57
58         * bfd-in.h (elf32_tic6x_fix_exidx_coverage): Add prototype.
59         * bfd-in2.h: Regenerate.
60         * elf32-tic6x.c: Include limits.h.
61         (tic6x_unwind_edit_type, tic6x_unwind_table_edit,
62         _tic6x_elf_section_data): New.
63         (elf32_tic6x_section_data): Define.
64         (elf32_tic6x_new_section_hook): Allocate target specific data.
65         (elf32_tic6x_add_unwind_table_edit): New function.
66         (get_tic6x_elf_section_data, elf32_tic6x_adjust_exidx_size,
67         elf32_tic6x_insert_cantunwind_after, elf32_tic6x_add_low31,
68         elf32_tic6x_copy_exidx_entry): New functions.
69         (elf_backend_write_section): Define.
70
71 2011-05-09  Paul Brook  <paul@codesourcery.com>
72
73         * elf32-tic6x.c (is_tic6x_elf_unwind_section_name,
74         elf32_tic6x_fake_sections): New functions.
75         (elf_backend_fake_sections): Define.
76
77 2011-05-09  Paul Brook  <paul@codesourcery.com>
78
79         * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): New function.
80         (elf_backend_gc_mark_extra_sections): Define.
81
82 2011-05-07  Dave Korn  <dave.korn.cygwin@gmail.com>
83
84         PR ld/12365
85         * cofflink.c (bfd_coff_link_input_bfd): Check for and warn about
86         references to symbols defined in discarded sections.
87
88 2011-05-07  Dave Korn  <dave.korn.cygwin@gmail.com>
89
90         PR ld/12365
91         * coffgen.c (coff_write_symbol): Assume input section is its own
92         output section if output_section member not set.
93         (coff_write_alien_symbol): Likewise.
94
95 2011-05-07  H.J. Lu  <hongjiu.lu@intel.com>
96
97         PR ld/12730
98         * elf.c (_bfd_elf_section_offset): Check SEC_ELF_REVERSE_COPY.
99
100         * elflink.c (elf_link_input_bfd): Reverse copy .ctors/.dtors
101         sections if needed.
102
103         * section.c (SEC_ELF_REVERSE_COPY): New.
104         * bfd-in2.h: Regenerated.
105
106 2011-05-07  Anders Kaseorg  <andersk@ksplice.com>
107
108         PR 12739
109         * libbfd.c (bfd_get_8, bfd_get_signed_8): Use const cast.
110         * bfd-in2.h: Regenerate.
111
112 2011-05-06  Tristan Gingold  <gingold@adacore.com>
113
114         * vms-alpha.c (evax_section_flags): Remove SEC_IN_MEMORY.
115         (_bfd_vms_slurp_egsd): Rename old_flags to vms_flags.  Handle
116         any code section.  Add comments.
117         (alpha_vms_object_p): Use void * instead of PTR.
118         (alpha_vms_create_eisd_for_section): Fix test for setting DZRO.
119         (build_module_list): Guard against no DST section.  Add comments.
120         (alpha_vms_link_output_symbol): Discard undefined symbols.
121         (alpha_vms_get_section_contents): Simply memcpy if the section was
122         already loaded.  Fix typo.
123         (vms_new_section_hook): Use void * instead of PTR.
124         (vms_alpha_vec): Ditto.
125
126 2011-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
127
128         * elf32-arm.c (cortex_a8_erratum_scan): If the stub is a Thumb
129         branch to a PLT entry, redirect it to the PLT's Thumb entry point.
130
131 2011-05-05  Bernd Schmidt  <bernds@codesourcery.com>
132
133         * elf32-tic6x.c (elf32_tic6x_final_link): New function.
134         (elf32_tic6x_merge_attributes): Do not warn for PID or PIC
135         mismatch.  Choose the lower of the two values.
136         (bfd_elf32_bfd_final_link): New macro.
137
138 2011-04-28  Tristan Gingold  <gingold@adacore.com>
139
140         * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
141         (bfd_xcoff_swap_aux_out): Ditto.
142         * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
143         (bfd_xcoff64_swap_aux_out): Ditto.
144
145 2011-05-04  Alan Modra  <amodra@gmail.com>
146
147         PR ld/12727
148         * elf64-ppc.c (ppc_build_one_stub <ppc_sub_plt_call>): Clear
149         was_undefined on dot-symbols.
150
151 2011-05-03  Paul Brook  <paul@codesourcery.com>
152
153
154         * elf32-tic6x.c (elf32_tic6x_howto_table,
155         elf32_tic6x_howto_table_rel, (elf32_tic6x_gc_sweep_hook,
156         elf32_tic6x_relocate_section, elf32_tic6x_check_relocs):
157         Add R_C6000_EHTYPE.
158
159 2011-05-01  Alan Modra  <amodra@gmail.com>
160
161         PR ld/12718
162         * elf32-i386.c (elf_i386_check_relocs): Ensure dynobj set before
163         creating ifunc sections.
164         * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
165
166 2011-04-30  H.J. Lu  <hongjiu.lu@intel.com>
167
168         * elf64-x86-64.c (elf_x86_64_merge_symbol): Correct parameter
169         names.
170
171 2011-04-28  Tom Tromey  <tromey@redhat.com>
172
173         * bfdio.c (memory_bstat): Pass correct size to memset.
174
175 2011-04-28  Mike Frysinger  <vapier@gentoo.org>
176
177         * dwarf2.c (dwarf_debug_sections): Mark const.
178         * elf.c (special_sections): Likewise.
179         * libbfd-in.h (dwarf_debug_sections): Likewise.
180         * libbfd.h: Regenerate.
181
182 2011-04-26  Kai Tietz  <ktietz@redhat.com>
183
184         * coffcode.h (sec_to_styp_flags): Allow linkonce for
185         debugging sections.
186
187 2011-04-26  Tristan Gingold  <gingold@adacore.com>
188
189         * coff64-rs6000.c: Convert to ISO-C.  Remove PARAMS and PTR macros.
190
191 2011-04-24  Alan Modra  <amodra@gmail.com>
192
193         PR ld/12365
194         PR ld/12696
195         * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call.
196         * linker.c (_bfd_link_hash_newfunc): Clear bitfields.
197         (_bfd_generic_link_add_one_symbol): Update "notice" call.
198         * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when
199         it is a redef of an IR symbol in a real BFD.
200
201 2011-04-22  H.J. Lu  <hongjiu.lu@intel.com>
202
203         * elf32-i386.c (elf_i386_readonly_dynrelocs): Warn relocation
204         in readonly section in a shared object.
205         (elf_i386_size_dynamic_sections): Likewise.
206         * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
207         (elf_x86_64_size_dynamic_sections): Likewise.
208
209 2011-04-21  H.J. Lu  <hongjiu.lu@intel.com>
210
211         PR ld/12694
212         * elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC
213         symbols.
214         * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
215
216 2011-04-21  H.J. Lu  <hongjiu.lu@intel.com>
217
218         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Return false
219         on dynamic symbol error.
220         * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
221
222 2011-04-20  Tristan Gingold  <gingold@adacore.com>
223
224         * config.bfd (alpha*-*-*vms*, ia64*-*-*vms*): Define targ_selvecs.
225
226 2011-04-20  Alan Modra  <amodra@gmail.com>
227
228         * hash.c (bfd_default_hash_table_size): Make it an unsigned long.
229         (bfd_hash_table_init_n): Overflow checking.
230         (bfd_hash_set_default_size): Return current size.  Take unsigned long
231         arg.  Add 65537 to hash_size primes.
232         * bfd-in.h (bfd_hash_set_default_size): Update prototype.
233         * bfd-in2.h: Regenerate.
234
235 2011-04-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
236
237         * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of
238         memmove elements.
239
240 2011-04-20  Alan Modra  <amodra@gmail.com>
241
242         * libbfd.c (bfd_log2): Do return rounded up value.
243         * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Replace bfd_log2
244         call with expanded old round down version of the function.
245
246         * archive.c (_bfd_get_elt_at_filepos): Don't release n_nfd.
247         * elflink.c (elf_link_add_object_symbols): Delete redundant code.
248
249 2011-04-20  Alan Modra  <amodra@gmail.com>
250
251         PR ld/12365
252         * elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols
253         in their own common section.
254         * elflink.c (elf_link_add_object_symbols): Likewise.
255         * linker.c (generic_link_check_archive_element): Don't lose flags
256         if common section is pre-existing.
257         (_bfd_generic_link_add_one_symbol): Likewise.
258
259 2011-04-20  Alan Modra  <amodra@gmail.com>
260
261         PR ld/12365
262         * elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls.
263         * linker.c (_bfd_generic_link_add_one_symbol): Likewise.  Call
264         multiple_definition regardless of allow_multiple_definition.
265         * simple.c (simple_dummy_multiple_definition): Update.
266         * xcofflink.c (xcoff_link_add_symbols): Update multiple_definition
267         calls.
268
269 2011-04-18  Tristan Gingold  <gingold@adacore.com>
270
271         * coff-rs6000.c: Convert to ISO-C.  Remove PARAMS macro.
272
273 2011-04-18  Alan Modra  <amodra@gmail.com>
274
275         PR ld/12365
276         PR ld/12672
277         * bfd.c (BFD_PLUGIN): Define.
278         (BFD_FLAGS_SAVED, BFD_FLAGS_FOR_BFD_USE_MASK): Add BFD_PLUGIN.
279         * bfd-in2.h: Regenerate.
280         * elflink.c (elf_link_output_extsym): Strip undefined plugin syms.
281         * opncls.c (bfd_make_readable): Don't lose original bfd flags.
282
283 2011-04-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
284
285         * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for
286         SEC_LOAD.
287
288 2011-04-15  Sergio Durigan Junior  <sergiodj@redhat.com>
289
290         * elf-bfd.h (struct sdt_note): New struct.
291         (struct elf_obj_tdata) <sdt_note_head>: New field.
292         * elf.c (elfobj_grok_stapsdt_note_1): New function.
293         (elfobj_grok_stapsdt_note): Likewise.
294         (elf_parse_notes): Added code to treat SystemTap note
295         sections.
296
297 2011-04-12  Richard Henderson  <rth@redhat.com>
298
299         * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not
300         exclude empty .got sections.
301
302 2011-04-11  H.J. Lu  <hongjiu.lu@intel.com>
303
304         * elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound
305         array access for BFD_RELOC_386_IRELATIVE.
306
307 2011-04-11  Bernd Schmidt  <bernds@codesourcery.com>
308
309         * elf32-tic6x.c (elf32_tic6x_check_relocs): Initialize pc_count field.
310
311 2011-04-11  Mark Wielaard  <mjw@redhat.com>
312
313         PR 10549
314         * elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols.
315         (has_gnu_symbols): Renamed from has_ifunc_symbols.
316         * elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name.
317         * elf32-arm.c (elf32_arm_add_symbol_hook): Set has_gnu_symbols
318         also if STB_GNU_UNIQUE symbol binding was seen.
319         * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
320         * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
321         * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
322         * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
323         * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
324         * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
325
326 2011-04-11  Alan Modra  <amodra@gmail.com>
327
328         * bfd-in.h (bfd_get_section_limit): Don't use rawsize with output
329         sections.
330         * libbfd.c (_bfd_generic_get_section_contents): Likewise.
331         (_bfd_generic_get_section_contents_in_window): Likewise.
332         * section.c (bfd_get_section_contents): Likewise.
333         * compress.c (bfd_get_full_section_contents): Likewise.
334         * elf32-rx.c (rx_final_link): Ignore rawsize.
335         * elf32-microblaze.c (microblaze_elf_relocate_section): Use correct
336         bfd with bfd_get_section_limit.
337         * elfxx-ia64.c (elfNN_ia64_choose_gp): Add "final" parameter.  Use
338         os->size during final link.  Update callers.
339         * bfd-in2.h: Regenerate.
340
341 2011-04-10  Richard Sandiford  <rdsandiford@googlemail.com>
342
343         PR ld/12637
344         * elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count
345         as the number of global entries when merging with the primary GOT.
346
347 2011-04-09  H.J. Lu  <hongjiu.lu@intel.com>
348
349         * elf32-i386.c: Update copyright year.
350         * elf64-x86-64.c: Likewise.
351
352 2011-04-09  Kai Tietz  <ktietz@redhat.com>
353
354         * peXXigen.c (_bfd_XXi_final_link_postscripte): Sort pdata in temporary
355         buffer and use rawsize for sorting.
356         * coffcode.h (coff_compute_section_file_positions): Set rawsize
357         before doing alignment.
358
359 2011-04-09  H.J. Lu  <hongjiu.lu@intel.com>
360
361         * elf32-i386.c (elf_i386_relocate_section): Return relocation
362         error on unsupported relocation.
363         * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
364
365 2011-04-09  H.J. Lu  <hongjiu.lu@intel.com>
366
367         PR binutils/12657
368         * hosts/x86-64linux.h (elf_prstatus32): Replace __pid_t with
369         pid_t.
370
371 2011-04-08  H.J. Lu  <hongjiu.lu@intel.com>
372
373         PR ld/12654
374         * elf32-i386.c (elf_i386_relocate_section): Check !executable
375         instead of shared for R_386_TLS_LDO_32.
376
377 2011-04-08  Tristan Gingold  <gingold@adacore.com>
378
379         * Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
380         * coff-pmac: Remove
381         * xcoff-target.h: Remove
382         * Makefile.in: Regenerate.
383
384 2011-04-07  Cary Coutant  <ccoutant@google.com>
385
386         * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification.
387
388 2011-04-07  Paul Brook  <paul@codesourcery.com>
389
390         * elf32-tic6x.c (elf32_tic6x_howto_table): R_C6000_PREL31 is
391         pc-relative.
392         (elf32_tic6x_howto_table_rel): Ditto.
393         (elf32_tic6x_relocate_section): Implement R_C6000_PREL31.
394         (elf32_tic6x_check_relocs): Ditto.
395
396 2011-04-06  Joseph Myers  <joseph@codesourcery.com>
397
398         * config.bfd (thumb-*-oabi): Don't handle in list of obsolete
399         targets.
400         (strongarm*, thumb*, xscale*): Remove architectures.
401         (strongarm-*-kaos*, thumb-*-coff, thumb-*-elf, thumb-epoc-pe*,
402         thumb-*-pe*, strongarm-*-elf, strongarm-*-coff, xscale-*-elf,
403         xscale-*-coff): Remove targets.
404
405 2011-04-01  Tristan Gingold  <gingold@adacore.com>
406
407         * elfxx-ia64.c: include bfd_stdint.h
408
409 2011-03-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
410
411         * elf32-tic6x.c (elf32_tic6x_relocate_section): Remove unused variable
412         dynobj and its initialization.
413
414 2011-03-31  Tristan Gingold  <gingold@adacore.com>
415
416         * makefile.vms (DEFS): Add HAVE_bfd_elf64_ia64_vms_vec.
417         * configure.com: Set BFD_HOST_64BIT_LONG_LONG and
418         BFD_HOST_LONG_LONG to 1.
419
420 2011-03-31  Tristan Gingold  <gingold@adacore.com>
421
422         * vms-alpha.c (vms_get_remaining_object_record): Fix dec-c warning.
423         (_bfd_vms_write_etir): Ditto.
424         (_bfd_vms_slurp_etir): Avoid to use intptr_t
425         * configure.com: Generate bfd_stdint.h
426
427 2011-03-31  Bernd Schmidt  <bernds@codesourcery.com>
428
429         * elf32-tic6x.h (struct elf32_tic6x_params): New.
430         (elf32_tic6x_setup): Declare.
431         * elf32-tic6x.c: Include <limits.h>.
432         (ELF_DYNAMIC_LINKER, DEFAULT_STACK_SIZE, PLT_ENTRY_SIZE): Define.
433         (struct elf32_tic6x_link_hash_table, struct elf32_link_hash_entry):
434         New structures.
435         (elf32_tic6x_link_hash_table, is_tic6x_elf): New macros.
436         (tic6x_elf_scom_section, tic6x_elf_scom_symbol,
437         tic6x_elf_scom_symbol_ptr): New static variables.
438         (elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel,
439         elf32_tic6x_reloc_map): Add R_C6000_JUMP_SLOT, R_C6000_EHTYPE,
440         R_C6000_PCR_H16 and R_C6000_PCR_L16.
441         (elf32_tic6x_link_hash_newfunc, elf32_tic6x_link_hash_table_create,
442         elf32_tic6x_link_hash_table_free, elf32_tic6x_setup,
443         elf32_tic6x_using_dsbt, elf32_tic6x_install_rela,
444         elf32_tic6x_create_dynamic_sections, elf32_tic6x_make_got_dynreloc,
445         elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_gc_sweep_hook,
446         elf32_tic6x_adjust_dynamic_symbol): New static functions.
447         (elf32_tic6x_relocate_section): For R_C6000_PCR_S21, convert branches
448         to weak symbols as required by the ABI.
449         Handle GOT and DSBT_INDEX relocs, and copy relocs to the output file
450         as needed when generating DSBT output.
451         (elf32_tic6x_check_relocs, elf32_tic6x_add_symbol_hook,
452         elf32_tic6x_symbol_processing, elf32_tic6x_section_from_bfd_section,
453         elf32_tic6x_allocate_dynrelocs, elf32_tic6x_size_dynamic_sections,
454         elf32_tic6x_always_size_sections, elf32_tic6x_modify_program_headers,
455         elf32_tic6x_finish_dynamic_sections, elf32_tic6x_plt_sym_val,
456         elf32_tic6x_copy_private_data, elf32_tic6x_link_omit_section_dynsym):
457         New static functions.
458         (ELF_MAXPAGESIZE): Define to 0x1000.
459         (bfd_elf32_bfd_copy_private_bfd_data,
460         bfd_elf32_bfd_link_hash_table_create,
461         bfd_elf32_bfd_link_hash_table_free, elf_backend_can_refcount,
462         elf_backend_want_got_plt, elf_backend_want_dynbss,
463         elf_backend_plt_readonly, elf_backend_got_header_size,
464         elf_backend_gc_sweep_hook, elf_backend_modify_program_headers,
465         elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
466         elf_backend_check_relocs, elf_backend_add_symbol_hook,
467         elf_backend_symbol_processing, elf_backend_link_output_symbol_hook,
468         elf_backend_section_from_bfd_section,
469         elf_backend_finish_dynamic_symbol, elf_backend_always_size_sections,
470         elf32_tic6x_size_dynamic_sections, elf_backend_finish_dynamic_sections,
471         elf_backend_omit_section_dynsym, elf_backend_plt_sym_val): Define.
472
473         * bfd/reloc.c (BFD_RELOC_C6000_JUMP_SLOT, BFD_RELOC_C6000_EHTYPE,
474         BFD_RELOC_C6000_PCR_H16, BFD_RELOC_C6000_PCR_S16): Add.
475         * bfd/bfd-in2.h: Regenerate.
476         * bfd/libbfd.h: Regenerate.
477         * config.bfd: Accept tic6x-*-* instead of tic6x-*-elf.
478
479 2011-03-31  Tristan Gingold  <gingold@adacore.com>
480
481         * coffcode.h (coff_slurp_symbol_table): Silently discard C_NULL
482         entry on xcoff when value is C_NULL_VALUE.
483
484 2011-03-31  Tristan Gingold  <gingold@adacore.com>
485
486         * libcoff-in.h (exec_hdr): Remove.
487         * libcoff.h: Regenerate.
488
489 2011-03-30  Nick Clifton  <nickc@redhat.com>
490
491         * po/da.po: Updated Danish translation.
492
493 2011-03-29  Richard Henderson  <rth@redhat.com>
494
495         * elf64-alpha.c (elf64_alpha_gc_mark_hook): New.
496         (elf64_alpha_gc_sweep_hook): New.
497         (elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): New.
498         (elf_backend_can_gc_sections): New.
499
500 2011-03-26  John Marino  <binutils@marino.st>
501
502         * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*.
503         * configure.in: Delete unused bfd_elf32_i386_dragonfly_vec.
504         * configure: Regenerate.
505
506 2011-03-25  Michael Snyder  <msnyder@vmware.com>
507
508         * coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
509
510 2011-03-25  Tristan Gingold  <gingold@adacore.com>
511
512         * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Allow the use
513         of find_nearest_line on object files.
514
515 2011-03-25  Tristan Gingold  <gingold@adacore.com>
516
517         * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only.
518         Minor reordering.
519         (alpha_vms_create_eisd_for_section): Make code sections read-only.
520
521 2011-03-24  Alan Modra  <amodra@gmail.com>
522
523         * elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where
524         old-style __tls_get_addr calls without marker relocs don't match
525         their arg setup insn one for one.  If such mismatches are found
526         report the reloc and don't do any tls optimization.
527         * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
528
529 2011-03-22  Eric B. Weddington  <eric.weddington@atmel.com>
530
531         * bfd-in2.h: Regenerate.
532
533 2011-03-22  Eric B. Weddington  <eric.weddington@atmel.com>
534
535         * archures.c: Add AVR XMEGA architecture information.
536         * cpu-avr.c (arch_info_struct): Likewise.
537         * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
538         (elf32_avr_object_p): Likewise.
539
540 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
541
542         * reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
543         * bfd-in2.h: Regenerate.
544         * elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
545         to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
546         entry.
547         (elf32_arm_howto_from_type): Update accordingly.
548         (elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
549         (elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
550         (arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
551         with an extra noncall_refcount field.
552         (arm_local_iplt_info): New structure.
553         (elf_arm_obj_tdata): Add local_iplt.
554         (elf32_arm_local_iplt): New accessor macro.
555         (elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
556         plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
557         Change tls_type to a bitfield and add is_iplt.
558         (elf32_arm_link_hash_newfunc): Update accordingly.
559         (elf32_arm_allocate_local_sym_info): New function.
560         (elf32_arm_create_local_iplt): Likewise.
561         (elf32_arm_get_plt_info): Likewise.
562         (elf32_arm_plt_needs_thumb_stub_p): Likewise.
563         (elf32_arm_get_local_dynreloc_list): Likewise.
564         (create_ifunc_sections): Likewise.
565         (elf32_arm_copy_indirect_symbol): Update after the changes to
566         elf32_arm_link_hash_entry.  Assert the is_iplt has not yet been set.
567         (arm_type_of_stub): Add an st_type argument.  Use elf32_arm_get_plt_info
568         to get PLT information.  Assert that all STT_GNU_IFUNC references
569         are turned into PLT references.
570         (arm_build_one_stub): Pass the symbol type to
571         elf32_arm_final_link_relocate.
572         (elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
573         (elf32_arm_allocate_irelocs): New function.
574         (elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
575         all R_ARM_IRELATIVE.
576         (elf32_arm_allocate_plt_entry): New function.
577         (elf32_arm_populate_plt_entry): Likewise.
578         (elf32_arm_final_link_relocate): Add an st_type parameter.
579         Set srelgot to null for static objects.  Use separate variables
580         to record which st_value and st_type should be used when generating
581         a dynamic relocation.  Use elf32_arm_get_plt_info to find the
582         symbol's PLT information, setting has_iplt_entry, splt,
583         plt_offset and gotplt_offset accordingly.  Check whether
584         STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
585         the relocation target accordingly.  Broaden assert to include
586         .iplts.  Don't set sreloc for static relocations.  Assert that
587         we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
588         and R_ARM_ABS32_NOI.  Generate R_ARM_IRELATIVE relocations instead
589         of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
590         symbol.  Pass the symbol type to arm_type_of_stub.  Conditionally
591         resolve GOT references to the .igot.plt entry.
592         (elf32_arm_relocate_section): Update the call to
593         elf32_arm_final_link_relocate.
594         (elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
595         information.  Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
596         relocations in shared libraries and relocatable executables.
597         Count non-call PLT references.  Use elf32_arm_get_local_dynreloc_list
598         to get the list of dynamic relocations for a local symbol.
599         (elf32_arm_check_relocs): Always create ifunc sections.  Set isym
600         at the same time as setting h.  Use elf32_arm_allocate_local_sym_info
601         to allocate local symbol information.  Treat R_ARM_REL32 and
602         R_ARM_REL32_NOI as call relocations in shared libraries and
603         relocatable executables.  Record PLT information for local
604         STT_GNU_IFUNC functions as well as global functions.   Count
605         non-call PLT references.  Use elf32_arm_get_local_dynreloc_list
606         to get the list of dynamic relocations for a local symbol.
607         (elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
608         Don't remove STT_GNU_IFUNC PLTs unless all references have been
609         removed.  Update after the changes to elf32_arm_link_hash_entry.
610         (allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
611         entries should live in .plt or .iplt.  Check whether the .igot.plt
612         and .got entries can be combined.  Use elf32_arm_allocate_plt_entry
613         to allocate .plt and .(i)got.plt entries.  Detect which .got
614         entries will need R_ARM_IRELATIVE relocations and use
615         elf32_arm_allocate_irelocs to allocate them.  Likewise other
616         non-.got dynamic relocations.
617         (elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
618         and dynamic relocations for local STT_GNU_IFUNC symbols.
619         Check whether the .igot.plt and .got entries can be combined.
620         Detect which .got entries will need R_ARM_IRELATIVE relocations
621         and use elf32_arm_allocate_irelocs to allocate them.  Use stashed
622         section pointers intead of strcmp checks.  Handle iplt and igotplt.
623         (elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
624         to fill in .plt, .got.plt and .rel(a).plt entries.  Point
625         STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
626         resolve to it.
627         (elf32_arm_output_plt_map_1): New function, split out from
628         elf32_arm_output_plt_map.  Handle .iplt entries.  Use
629         elf32_arm_plt_needs_thumb_stub_p.
630         (elf32_arm_output_plt_map): Call it.
631         (elf32_arm_output_arch_local_syms): Add mapping symbols for
632         local .iplt entries.
633         (elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
634         (elf32_arm_swap_symbol_out): Likewise.
635         (elf32_arm_add_symbol_hook): New function.
636         (elf_backend_add_symbol_hook): Define for all targets.
637
638 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
639
640         * elf-bfd.h (elf_link_hash_entry): Add target_internal.
641         * elf.c (swap_out_syms): Set st_target_internal for each
642         Elf_Internal_Sym.
643         * elfcode.h (elf_swap_symbol_in): Likewise.
644         * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
645         * elf32-sh-symbian.c (sh_symbian_relocate_section): Likewise.
646         * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
647         * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
648         * elflink.c (elf_link_output_extsym): Likewise.
649         (bfd_elf_final_link): Likewise.
650         (elf_link_add_object_symbols): Copy st_target_internal
651         to the hash table if we see a definition.
652         (_bfd_elf_copy_link_hash_symbol_type): Copy target_internal.
653         * elf32-arm.c (elf32_arm_stub_hash_entry): Replace st_type with
654         a branch_type field.
655         (a8_erratum_fix, a8_erratum_reloc): Likewise.
656         (arm_type_of_stub): Replace actual_st_type with an
657         actual_branch_type parameter.
658         (arm_build_one_stub): Use branch types rather than st_types to
659         determine the type of branch.
660         (cortex_a8_erratum_scan): Likewise.
661         (elf32_arm_size_stubs): Likewise.
662         (bfd_elf32_arm_process_before_allocation): Likewise.
663         (allocate_dynrelocs_for_symbol): Likewise.
664         (elf32_arm_finish_dynamic_sections): Likewise.
665         (elf32_arm_final_link_relocate): Replace sym_flags parameter with
666         a branch_type parameter.
667         (elf32_arm_relocate_section): Update call accordingly.
668         (elf32_arm_adjust_dynamic_symbol): Don't check STT_ARM_TFUNC.
669         (elf32_arm_output_map_sym): Initialize st_target_internal.
670         (elf32_arm_output_stub_sym): Likewise.
671         (elf32_arm_symbol_processing): Delete.
672         (elf32_arm_swap_symbol_in): Convert STT_ARM_TFUNCs into STT_FUNCs.
673         Use st_target_internal to record the branch type.
674         (elf32_arm_swap_symbol_out): Use st_target_internal to test for
675         Thumb functions.
676         (elf32_arm_is_function_type): Delete.
677         (elf_backend_symbol_processing): Likewise.
678         (elf_backend_is_function_type): Likewise.
679
680 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
681
682         * elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
683         (elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
684         into the PLT block.
685
686 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
687
688         * elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
689         may_need_local_target_p and may_become_dynamic_p to classify
690         the relocation type.  Don't check info->symbolic or h->def_regular
691         when deciding whether to record a potential dynamic reloc.
692         Don't treat potential dynamic relocs as PLT references.
693         (elf32_arm_gc_sweep_hook): Update to match.  Assert that we don't
694         try to make the PLT reference count go negative.
695
696 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
697
698         * elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
699         GOT entry here, rather than leaving it to finish_dynamic_symbol.
700         Only create a dynamic relocation for local references if
701         info->shared.
702         (allocate_dynrelocs_for_symbol): Update dynamic relocation
703         allocation accordingly.
704         (elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.
705
706 2011-03-14  Richard Sandiford  <richard.sandiford@linaro.org>
707
708         * elf32-arm.c (elf32_arm_allocate_dynrelocs): New function.
709         (elf32_arm_add_dynreloc): Likewise.
710         (elf32_arm_adjust_dynamic_symbol): Use elf32_arm_allocate_dynrelocs
711         to allocate dynamic relocations.
712         (elf32_arm_size_dynamic_sections): Likewise.
713         (allocate_dynrelocs): Likewise.  Rename to
714         allocate_dynrelocs_for_symbol.
715         (elf32_arm_final_link_relocate): Use elf32_arm_add_dynreloc to
716         create dynamic relocations.
717         (elf32_arm_finish_dynamic_symbol): Likewise.
718
719 2011-03-12  H.J. Lu  <hongjiu.lu@intel.com>
720
721         * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
722         x32 GD->IE and GD->LE transitions.
723         (elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
724         and LD->LE transitions.
725
726 2011-03-10  Alan Modra  <amodra@gmail.com>
727
728         * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset
729         for LO_DS error message and correct multiple.
730
731 2011-03-10  Alan Modra  <amodra@gmail.com>
732
733         * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define.
734         (ppc64_elf_link_just_syms): New function.
735         (opd_entry_value): Don't assume big-endian host.
736         (get_r2off): New function.
737         (ppc_build_one_stub, ppc_size_one_stub): Use it here.
738
739 2011-03-06  Michael Snyder  <msnyder@vmware.com>
740
741         * compress.c (bfd_compress_section_contents): Check for out of mem.
742
743         * elf64-x86-64.c (elf_x86_64_relocate_section): Document
744         that case statement falls through intentionally.
745
746         * elf32-i386.c (elf_i386_relocate_section): Document fall through.
747
748 2011-03-04  Alan Modra  <amodra@gmail.com>
749
750         * archive.c (bsd_write_armap): Don't call stat in deterministic
751         mode, and don't use st_mtime if stat returns error.
752
753 2011-03-03  Michael Snyder  <msnyder@vmware.com>
754
755         * elf64-x86-64.c (elf_x86_64_relocate_section): Remove dead code.
756
757         * coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
758
759         * aoutx.h (aout_final_link): Use sizeof int not sizeof int*.
760         (aout_link_write_other_symbol): Missing break statement.
761
762         * dwarf2.c (scan_unit_for_symbols): Stop memory leak.
763
764         * archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek fails.
765
766 2011-03-03  H.J. Lu  <hongjiu.lu@intel.com>
767
768         * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
769         x32 IE->LE transition.
770         (elf_x86_64_relocate_section): Likewise.
771
772 2011-03-02  Bernd Schmidt  <bernds@codesourcery.com>
773
774         * elflink.c (is_reloc_section): Remove function.
775         (get_dynamic_reloc_section_name): Construct string manually.
776
777 2011-02-28  Kai Tietz  <kai.tietz@onevision.com>
778
779         * archive.c (_bfd_find_nested_archive): Use filename_(n)cmp.
780         (adjust_relative_path): Likewise.
781         (_bfd_construct_extended_name_table): Likewise.
782         * corefile.c (generic_core_file_matches_executable_p): Likewise.
783         * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
784         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
785         * elf32-spu.c (sort_bfds): Likewise.
786         (spu_elf_auto_overlay): Likewise.
787         * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
788         * xcofflink.c (xcoff_set_import_path): Likewise.
789         * xtensa-isa.c (xtensa_regfile_lookup): Likewise.
790         (xtensa_regfile_lookup_shortname): Likewise.
791
792 2011-02-28  Alan Modra  <amodra@gmail.com>
793
794         PR 12513
795         * archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and
796         stringsize.  Properly sanity check symdef_count.  Remove redundant
797         bfd_release.
798
799 2011-02-25  Rafael Ávila de Espíndola <respindola@mozilla.com>
800
801         * plugin.c (bfd_plugin_object_p): Correctly set the filesize
802         and handle claim_file seeking. Only try to load the plugin once.
803
804 2011-02-22  Andreas Schwab  <schwab@redhat.com>
805
806         * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
807         relocation read the value from the second GOT slot.
808
809 2011-02-15  Tristan Gingold  <gingold@adacore.com>
810
811         * vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
812
813 2011-02-15  Alan Modra  <amodra@gmail.com>
814
815         * elf64-ppc.c (ppc64_elf_edit_toc): Reinstate second read of
816         toc relocs.  Fuss over free(NULL).
817
818 2011-02-14  Mike Frysinger  <vapier@gentoo.org>
819
820         * elflink.c (bfd_elf_size_dynamic_sections): Add
821         bfd_get_symbol_leading_char to the start of newname.
822
823 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
824
825         * configure: Regenerate.
826
827 2011-02-09  Alan Modra  <amodra@gmail.com>
828
829         * elf64-ppc.c (ppc64_elf_edit_toc): Don't free toc relocs until
830         we are done.  When optimising large toc, check that a global
831         symbol on a toc reloc is defined in a kept section.
832
833 2011-02-08  Nick Clifton  <nickc@redhat.com>
834
835         PR binutils/12467
836         * elf.c (assign_file_positions_for_load_sections): Set the program
837         header offset and entry size to zero if there are no program
838         headers.
839
840 2011-02-08  Alan Modra  <amodra@gmail.com>
841
842         * elf64-ppc.c (ppc64_elf_edit_toc): Don't segfault on NULL
843         local_syms when looking for local symbols in .toc.
844
845 2011-02-01  Alan Modra  <amodra@gmail.com>
846
847         * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value
848         for toc pointer on any section having makes_toc_func_call set.
849         (check_pasted_section): Ensure pasted .init/.fini fragments use
850         the same toc if any has makes_toc_func_call set.
851
852 2011-01-28  Joseph Myers  <joseph@codesourcery.com>
853
854         * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
855         field.
856
857 2011-01-22  Richard Sandiford  <rdsandiford@googlemail.com>
858
859         * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
860         common sections too.
861
862 2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>
863
864         * elf64-x86-64.c (elf_backend_want_plt_sym): Redefine to 0 after
865         Solaris target.
866
867 2011-01-18  Pierre Muller  <muller@ics.u-strasbg.fr>
868
869         Fix compilation for mingw64.
870         * coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate
871         typecast to avoid warning.
872         * elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type
873         usage.
874         * elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead
875         of long for pointer to avoid warning.
876         (elfNN_ia64_relax_brl): Idem.
877         (elfNN_ia64_install_value): Idem.
878         * vms-alpha.c (_bfd_vms_slurp_etir): Idem.
879
880 2011-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
881
882         * elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
883         h->needs_plt when deciding whether to record a possible dynamic reloc.
884
885 2011-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
886
887         * elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
888         dynamic relocs for the removed section.
889
890 2011-01-15  H.J. Lu  <hongjiu.lu@intel.com>
891
892         * elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32
893         relocations.
894
895 2011-01-14  H.J. Lu  <hongjiu.lu@intel.com>
896
897         * elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
898         (elf_x86_64_link_hash_table_create): Set pointer_r_type.
899         (elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
900         for ILP32.  Remove ABI_64_P PIC check for R_X86_64_8,
901         R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
902         (elf_x86_64_relocate_section):  Handle R_X86_64_32 like R_X86_64_64
903         for ILP32.
904
905 2011-01-14  Alan Modra  <amodra@gmail.com>
906
907         * bfd.c (bfd_perror): Flush stdout before and stderr after printing
908         error.
909         (_bfd_default_error_handler): Likewise.
910         * elf.c (print_segment_map): Likewise.
911         * libbfd.c (warn_deprecated): Likewise.
912         * som.c (som_sizeof_headers): No need to do so here.
913         * coff-i860.c: Replace use of printf for error messages with
914         _bfd_error_handler.
915         * coff-ppc.c: Likewise.
916         * coff-sh.c: Likewise.
917         * elf32-bfin.c: Likewise.
918         * elf32-dlx.c: Likewise.
919         * elf32-mep.c: Likewise.
920         * elf32-v850.c: Likewise.
921         * mach-o.c: Likewise.
922         * pef.c: Likewise.
923
924 2011-01-13  H.J. Lu  <hongjiu.lu@intel.com>
925
926         * elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
927         swap_reloca_out.
928         (elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
929         (elf_x86_64_check_relocs): Align relocation section to 4 byte
930         for 32bit.
931         (elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
932         ELF_ST_TYPE.
933         (elf_x86_64_finish_dynamic_symbol): Updated.
934         (elf_x86_64_finish_dynamic_sections): Don't use
935         Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
936         bfd_elf64_swap_dyn_out.
937
938 2011-01-14  J. Park  <grassman@gmail.com>
939
940         PR ld/12339
941         * elf32-arm.c (allocate_dynrelocs): Don't set up eh before
942         following bfd_link_hash_warning symbol link.
943
944 2011-01-10  Nathan Sidwell  <nathan@codesourcery.com>
945             Glauber de Oliveira Costa  <glommer@gmail.com>
946
947         * reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
948         BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
949         BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
950         relocations.
951         * libbfd.h: Rebuilt.
952         * bfd-in2.h: Rebuilt.
953         * elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
954         (elf32_arm_reloc_map): Likewise.
955         (tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
956         (elf32_arm_stub_long_branch_any_tls_pic,
957         elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
958         (DEF_STUBS): Add new stubs.
959         (struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
960         (elf32_arm_local_tlsdesc_gotent): New.
961         (GOT_TLS_GDESC): New mask.
962         (GOT_TLS_GD_ANY): Define.
963         (struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
964         (elf32_arm_compute_jump_table_size): New.
965         (struct elf32_arm_link_hash_table): Add next_tls_desc_index,
966         num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
967         sgotplt_jump_table_size fields.
968         (elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
969         (elf32_arm_link_hash_table_create): Initialize new fields.
970         (arm_type_of_stub): Check TLS desc relocs too.
971         (elf32_arm_stub_name): TLS desc relocs can be shared.
972         (elf32_arm_tls_transition): Determine relaxation.
973         (arm_stub_required_alignment): Add tls stubs.
974         (elf32_arm_size_stubs): Likewise.
975         (elf32_arm_tls_relax): Perform TLS relaxing.
976         (elf32_arm_final_link_relocate): Process TLS DESC relocations.
977         (IS_ARM_TLS_GNU_RELOC): New.
978         (IS_ARM_TLS_RELOC): Use it.
979         (elf32_arm_relocate_section): Perform TLS relaxing.
980         (elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
981         desc relocations.
982         (allocate_dynrelocs): Allocate tls desc relcoations.
983         (elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
984         symbols.
985         (elf32_arm_size_dynamic_sections): Allocate tls trampolines and
986         got slots.
987         (elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
988         symbol.
989         (elf32_arm_finish_dynamic_symbol): Adjust.
990         (arm_put_trampoline): New.
991         (elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
992         trampolines.
993         (elf_backend_always_size_sections): Define.
994
995 2011-01-06  H.J. Lu  <hongjiu.lu@intel.com>
996
997         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Optimized.
998
999 2011-01-06  H.J. Lu  <hongjiu.lu@intel.com>
1000
1001         PR ld/12366
1002         PR ld/12371
1003         * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
1004         handle symbols marked with regular reference, but not non-GOT
1005         reference when building shared library.
1006
1007         * elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
1008         local and global STT_GNU_IFUNC symols when building shared
1009         library.
1010         * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
1011
1012 2011-01-05  DJ Delorie  <dj@redhat.com>
1013
1014         * reloc.c: Add BFD_RELOC_RX_OP_NEG.
1015         * libbfd.h: Regenerate.
1016         * bfd-in2.h: Regenerate.
1017         * elf32-rx.c: Add it to the list, corresponding to R_RX_OPneg.
1018
1019 2011-01-03  H.J. Lu  <hongjiu.lu@intel.com>
1020
1021         * cpu-i386.c (bfd_i386_compatible): New.
1022         (bfd_x64_32_arch_intel_syntax): Replace bfd_default_compatible
1023         with bfd_i386_compatible.
1024         (bfd_x86_64_arch_intel_syntax): Likewise.
1025         (bfd_i386_arch_intel_syntax): Likewise.
1026         (i8086_arch): Likewise.
1027         (bfd_x64_32_arch): Likewise.
1028         (bfd_x86_64_arch): Likewise.
1029         (bfd_i386_arch): Likewise.
1030
1031 For older changes see ChangeLog-2010
1032 \f
1033 Local Variables:
1034 mode: change-log
1035 left-margin: 8
1036 fill-column: 74
1037 version-control: never
1038 End: