PR binutils/14481
[platform/upstream/binutils.git] / bfd / ChangeLog
1 2012-11-07  Hans-Peter Nilsson  <hp@axis.com>
2
3         PR binutils/14481
4         * aout-target.h (MY_close_and_cleanup): Make local function
5         instead of alias of MY_bfd_free_cached_info.  Also call
6         _bfd_generic_close_and_cleanup.
7
8 2012-11-06  H.J. Lu  <hongjiu.lu@intel.com>
9
10         PR binutils/14813
11         * bfdio.c (bfd_iovec): Change return type of bclose to
12         bfd_boolean.
13         (memory_bclose): Change return type to bfd_boolean.
14         * cache.c (cache_bclose): Likewise.
15         * opncls.c (opncls_bclose): Likewise.  Return TRUE on success.
16         * vms-lib.c (vms_lib_bclose): Likewise.  Return TRUE.
17         * libbfd.h: Regenerated.
18
19 2012-11-06  Tristan Gingold  <gingold@adacore.com>
20
21         * coff-x86_64.c (_bfd_generic_find_nearest_line_discriminator):
22         Define as coff_find_nearest_line_discriminator.
23
24 2012-11-06  Alan Modra  <amodra@gmail.com>
25
26         PR binutils/14567
27         * opncls.c (opncls_iovec): Forward declare.
28         (_bfd_new_bfd_contained_in): If using opncls_iovec, copy iostream
29         to new bfd.
30
31 2012-11-06  Alan Modra  <amodra@gmail.com>
32
33         * mach-o.c (bfd_mach_o_close_and_cleanup): Don't call
34         _bfd_generic_close_and_cleanup for mach_o_fat archives.
35
36 2012-11-06  Alan Modra  <amodra@gmail.com>
37
38         * coff-tic4x.c (tic4x_coff0_vec, tic4x_coff0_beh_vec,
39         tic4x_coff1_vec, tic4x_coff1_beh_vec, tic4x_coff2_vec,
40         tic4x_coff2_beh_vec): Allow SEC_CODE and SEC_READONLY in
41         section flags.
42         * coff-ppc.c (TARGET_LITTLE_SYM): Likewise.
43         (TARGET_BIG_SYM): Likewise.
44
45 2012-11-06  Alan Modra  <amodra@gmail.com>
46
47         * elf64-ppc.c (struct ppc_link_hash_table): Add dot_toc_dot.
48         (ppc64_elf_size_stubs): Lookup ".TOC.".
49         (ppc64_elf_relocate_section): Resolve special symbol ".TOC.".
50
51 2012-11-06  Alan Modra  <amodra@gmail.com>
52
53         * elf64-ppc.c (maybe_strip_output): Heed SEC_KEEP.
54
55 2012-11-05  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
56
57         PR target/14788
58         * elf32-s390.c (elf_s390_relocate_section): Set elf.dynobj for
59         local ifunc symbols.
60         * elf64-s390.c (elf_s390_relocate_section): Likewise.
61
62 2012-11-05  Alan Modra  <amodra@gmail.com>
63
64         * configure.in: Apply 2012-09-10 change to config.in here.
65
66 2012-11-05  Alan Modra  <amodra@gmail.com>
67
68         * elf64-ppc.c (ppc64_elf_edit_toc): Clear "repeat" inside
69         loop.  Really mark toc entry referring to another toc entry
70         only if the first is used.
71
72 2012-10-30  H.J. Lu  <hongjiu.lu@intel.com>
73
74         * configure.in: Also handle --enable-64-bit-bfd when setting
75         CORE_HEADER for 'i[3-7]86-*-linux-*'.
76
77 2012-10-30  Steve McIntyre  <steve.mcintyre@linaro.org>
78
79         * elf32-arm.c (elf32_arm_print_private_bfd_data): Recognise and
80         display the new ARM hard-float/soft-float ABI flags for EABI_VER5
81         (elf32_arm_post_process_headers): Add the hard-float/soft-float
82         ABI flag as appropriate for ET_DYN/ET_EXEC in EABI_VER5.
83
84 2012-10-30  Yao Qi  <yao@codesourcery.com>
85             H.J. Lu  <hongjiu.lu@intel.com>
86
87         * configure.in: Set CORE_HEADER to hosts/x86-64linux.h for
88         'i[3-7]86-*-linux-*' if x86_64-*linux is enabled.
89         * configure: Regenerated.
90
91         * elf64-x86-64.c (elf_x86_64_write_core_note): Replace type
92         'prpsinfo_t' and 'prstatus_t' with 'prpsinfo64_t' and
93         'prstatus64_t' respectively.
94
95         * hosts/x86-64linux.h (a8_uint64_t): New.
96         (user_regsx32_struct): Renamed to ...
97         (user_regs64_struct): This.  Replace uint64_t with a8_uint64_t.
98         (elf_gregx32_t): Renamed to ...
99         (elf_greg64_t): This.  Replace uint64_t with a8_uint64_t.
100         (ELF_NGREGX32): Removed.
101         (ELF_NGREG64): New.
102         (elf_gregx32_t): Removed.
103         (elf_greg64_t): New.
104         (struct prstatus64_timeval): New.
105         (elf_prstatusx32): Replace elf_gregsetx32_t with elf_gregset64_t.
106         (elf_prstatus64): New.
107         (elf_prpsinfo64): New.
108         (prstatus64_t, prpsinfo64_t): New typedef.
109
110 2012-10-29  Sean Keys <skeys@ipdatasys.com>
111
112         * elf32-xgate.c(elf_xgate_howto_table): Fix src and dest mask for
113         R_XGATE_16
114
115 2012-10-29  Alan Modra  <amodra@gmail.com>
116
117         * elf32-ppc.c (ppc_elf_howto_raw): Correct dst_mask in
118         R_PPC_VLE_LO16A, R_PPC_VLE_HI16A, R_PPC_VLE_HA16A,
119         R_PPC_VLE_SDAREL_LO16A, R_PPC_VLE_SDAREL_HI16A,
120         R_PPC_VLE_SDAREL_HA16A reloc howtos.
121
122 2012-10-26  Nick Clifton  <nickc@redhat.com>
123
124         * po/uk.po: Updated Ukranian translation.
125
126 2012-10-26  Alan Modra  <amodra@gmail.com>
127
128         PR target/14758
129         * elf32-ppc.c (ppc_elf_reloc_type_lookup): Decode ppc64 _DS
130         bfd_reloc values.  Map to corresponding D-form relocs.
131         (is_insn_ds_form, is_insn_qs_form): New functions.
132         (ppc_elf_relocate_section): Validate insn with DS-form or DQ-form
133         fields using D-form reloc.
134
135 2012-10-25  H.J. Lu  <hongjiu.lu@intel.com>
136
137         * elf32-i386.c (elf_i386_size_dynamic_sections): Replace
138         _GLOBAL_OFFSET_TABLE_ lookup with htab->elf.hgot.
139         * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
140
141 2012-10-24  H.J. Lu  <hongjiu.lu@intel.com>
142
143         * compress.c (bfd_is_section_compressed): Don't decompress the
144         section.
145
146 2012-10-23  Nathan Sidwell  <nathan@codesourcery.com>
147
148         * bfd-in.h (bfd_elf_stack_segment_size): Declare.
149         * bfd-in2.h: Rebuilt.
150         * elfxx-target.h (elf_backend_stack_align): New.
151         (elfNN_bed): Add it.
152         * elf-bfd.h (struct elf_backend_data): Add stack_align field.
153         * elf.c (bfd_elf_map_sections_to_segments): Pay attention to
154         stack_align and stacksize for PT_GNU_STACK segment.
155         (assign_file_positions_for_non_load_sections): Set p_memsz for
156         PT_GNU_STACK segment.
157         (copy_elf_program_header): Copy PT_GNU_STACK size.
158         * elflink.c (bfd_elf_stack_segment_size): New function, taken from
159         uclinux backends.
160         (bfd_elf_size_dynamic_sections): Determine
161         PT_GNU_STACK requirements after calling backend.  Pay attention to
162         stacksize.
163         * elf32-bfin.c (elf32_bfinfdpic_always_size_sections): Call
164         bfd_elf_stack_segment_size.
165         (elf32_bfinfdpic_modify_program_headers): Delete.
166         (elf32_bfingfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
167         here.
168         (elf_backend_stack_align): Override.
169         (elf_backend_modify_program_headers): Don't override.
170         * elf32-frv.c (frvfdpic_always_size_sections): Call
171         bfd_elf_stack_segment_size.
172         (elf32_frvfdpic_modify_program_headers): Delete.
173         (elf32_frvfdpic_copy_private_bfd_data): Don't copy PT_GNU_STACK
174         here.
175         (elf_backend_stack_align): Override.
176         (elf_backend_modify_program_headers): Don't override.
177         * elf32-lm32.c (lm32_elf_always_size_sections): Leave
178         PT_GNU_STACK creation to underlying elf support.  Check
179         __stacksize here for backwards compatibility, and set it if
180         needed.
181         (lm32_elf_modify_segment_map): Delete.
182         (lm32_elf_modify_program_headers): Delete.
183         (elf_backend_stack_align): Override.
184         (elf_backend_modify_segment_map): Don't override.
185         (elf_backend_modify_program_headers): Don't override.
186         * elf32-sh.c (sh_elf_always_size_sections): Call
187         bfd_elf_stack_segment_size.
188         (sh_elf_modify_program_headers): Delete.
189         (sh_elf_copy_private_data): Don't copy PT_GNU_STACK
190         here.
191         (elf_backend_stack_align): Override.
192         (elf_backend_modify_program_headers): Don't override.
193         * elf32-tic6x.c (elf32_tic6x_always_size_sections): Call
194         bfd_elf_stack_segment_size.
195         (elf32_tic6x_modify_program_headers): Delete.
196         (elf32_tic6x_copy_private_data): Delete.
197         (elf_backend_stack_align): Override.
198         (bfd_elf32_bfd_copy_private_bfd_data): Don't override.
199         (elf_backend_modify_program_headers): Don't override.
200
201 2012-10-22  Alan Modra  <amodra@gmail.com>
202
203         * cache.c (cache_bmmap): Don't use void* arithmetic.
204
205 2012-10-21  Alan Modra  <amodra@gmail.com>
206
207         * compress.c (bfd_cache_section_contents): New function.
208         * bfd-in2.h: Regenerate.
209
210 2012-10-21  Hans-Peter Nilsson  <hp@bitrange.com>
211
212         * linker.c (_bfd_generic_link_output_symbols): Handle a
213         no-longer-global symbol entered through a plugin.
214
215 2012-10-20  Alan Modra  <amodra@gmail.com>
216
217         * compress.c: Reinstate 2012-10-19 change.
218         (bfd_get_full_section_contents): Don't free unless we alloc.
219         Use proper decompress size.  Delete some vars, rename others.
220
221 2012-10-19  Tom Tromey  <tromey@redhat.com>
222
223         * compress.c: Revert previous patch.
224
225 2012-10-19  Tom Tromey  <tromey@redhat.com>
226
227         * compress.c (bfd_get_full_section_contents): Don't cache
228         decompressed contents.
229
230 2012-10-18  Kai Tietz  <ktietz@redhat.com>
231
232         PR binutils/14067
233         * coff-i386.c (bfd_target): Add section flag SEC_EXCLUDE.
234         Allow BFD_COMPRESS and BFD_DECOMPRESS flags.
235         * coff-x86_64.c: Likewise.
236         * coffcode.h (DOT_ZDEBUG): New define.
237         (sec_to_styp_flags): Check for .zdebug.
238         (styp_to_sec_flags): Likewise.
239         * coffgen.c (make_a_section): Handle .debug_* section
240         compression/decompression flags.
241         * cofflink.c (mark_relocs): Ignore relocations
242         for a section, which isn't marked as used.
243         (_bfd_coff_link_input_bfd): Add support of compressed
244         debug sections.
245         * compress.c (decompress_contents): Loop as long
246         as there is input available and there is room for
247         output.
248         * bfd/pe-arm.c: Add .zdebug_ partial match entry.
249         * pe-i386.c: Likewise.
250         * pe-x86_64.c: Likewise.
251         * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't clear all
252         data-directories as this might destroy content.
253
254         * coff-i386.c (_bfd_generic_find_nearest_line_discriminator):
255         define as coff_find_nearest_line_discriminator.
256         * libcoff-in.h (coff_find_nearest_line_discriminator): New
257         * libcoff.h: Regenerated.
258         * coff-x86_64.c: Likewise.
259         * coffgen.c (coff_find_nearest_line_discriminator): New function.
260         prototype.
261
262 2012-10-16  Joel Brobecker  <brobecker@adacore.com>
263
264         * coff64-rs6000.c (rs6000coff64_vec): Set _close_and_cleanup
265         field to _bfd_archive_close_and_cleanup.
266         (aix5coff64_vec): Likewise.
267
268 2012-10-16  Joel Brobecker  <brobecker@adacore.com>
269
270         * coff-rs6000.c (rs6000coff_vec): Set _close_and_cleanup
271         field to _bfd_archive_close_and_cleanup.
272         (pmac_xcoff_vec): Likewise.
273
274 2012-10-16  Sofiane Naci  <sofiane.naci@arm.com>
275
276         * elf64-aarch64.c (elf64_aarch64_tls_howto_table): Fix shift value for
277         R_AARCH64_TLSIE_LD_GOTTPREL_PREL19, R_AARCH64_TLSLE_MOVW_TPREL_G2,
278         R_AARCH64_TLSLE_MOVW_TPREL_G1, R_AARCH64_TLSLE_MOVW_TPREL_G1_NC,
279         R_AARCH64_TLSLE_ADD_TPREL_HI12.
280         (elf64_aarch64_tlsdesc_howto_table): Fix shift value for
281         R_AARCH64_TLSDESC_LD64_PREL19 and R_AARCH64_TLSDESC_OFF_G1.
282         (elf64_aarch64_final_link_relocate): Add signed_addend when resolving
283         AARCH64_TLSLE_*_TPREL_* relocations.
284
285 2012-10-16  Alan Modra  <amodra@gmail.com>
286
287         * elf32-xtensa.c (free_section_cache): Renamed from
288         clear_section_cache.  Don't zero cache.
289         (section_cache_section): Remove ineffectual zero of cache.
290         Call init_section_cache instead.
291
292 2012-10-15  Doug Evans  <dje@google.com>
293
294         * elf.c (special_sections_d): Add comment.
295
296 2012-10-13  H.J. Lu  <hongjiu.lu@intel.com>
297
298         * Makefile.am (LIBDL): Replace -ldl with @lt_cv_dlopen_libs@.
299         * configure.in (lt_cv_dlopen_libs): AC_SUBST.
300         * Makefile.in: Regenerated.
301         * configure: Likewise.
302
303 2012-10-08  Alan Modra  <amodra@gmail.com>
304
305         PR binutils/14662
306         * elf.c (_bfd_elf_make_section_from_shdr): Treat .gdb_index as
307         SEC_DEBUGGING.
308
309 2012-09-20  Walter Lee  <walt@tilera.com>
310
311         * elf32-tilepro.c (tilepro_elf_relocate_section): Adjust got
312         relocations with value of hgot.
313         * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
314
315 2012-09-19  Steve Ellcey  <sellcey@mips.com>
316
317         * config.bfd: Add mips*-mti-elf* target.
318
319 2012-09-18  H.J. Lu  <hongjiu.lu@intel.com>
320
321         PR ld/14591
322         * elf-bfd.h (_bfd_elf_merge_symbol): Add an argument to return
323         if the old symbol is weak.
324
325         * elf32-sh-symbian.c (sh_symbian_relocate_section): Update
326         _bfd_elf_merge_symbol call.
327
328         * elflink.c (_bfd_elf_merge_symbol): Add an argument to return
329         if the old symbol is weak.
330         (_bfd_elf_add_default_symbol): Update _bfd_elf_merge_symbol
331         call.
332         (elf_link_add_object_symbols): Don't update symbol type from a
333         weak definition.  Update symbol type from a common symbol when
334         overriding a weak symbol.
335
336 2012-09-17  H.J. Lu  <hongjiu.lu@intel.com>
337
338         * elf32-i386.c (elf_i386_convert_mov_to_lea): Ignore discarded
339         section.
340         * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
341
342 2012-09-17  H.J. Lu  <hongjiu.lu@intel.com>
343
344         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Replace return
345         FALSE with abort.
346         * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
347
348 2012-09-17  Walter Lee  <walt@tilera.com>
349
350         * elf32-tilepro.c (tilepro_elf_relocate_section): Remove unused
351         got_base variable.
352         * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
353
354 2012-09-17  Walter Lee  <walt@tilera.com>
355
356         * elf32-tilepro.c (tilepro_elf_relocate_section): Fix computation
357         of got relocations for when .got.plt section is merged with .got.
358         * elfxx-tilegx.c (tilegx_elf_relocate_section): Ditto.
359
360 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
361
362         * configure: Regenerate.
363
364 2012-09-13  Anthony Green  <green@moxielogic.com>
365
366         * targets.c (bfd_elf32_bigmoxie_vec, bfd_elf32_littlemoxie_vec):
367         Define.
368         (bfd_elf32_moxie_vec): Remove.
369         * config.bfd, configure.in: Add bi-endian support for moxie.
370         * configure: Rebuilt.
371         * elf32-moxie.c (TARGET_LITTLE_NAME, TARGET_LITTLE_SYM): Define.
372         (TARGET_BIG_NAME, TARGET_BIG_SYM): Update for bi-endian support.
373
374 2012-09-12  Doug Kwan  <dougkwan@google.com>
375
376         * elf64-ppc.c (ppc64_elf_relocate_section): Use pre-adjusted
377         relocation for stub lookup.
378
379 2012-09-12  Chris Schlumberger-Socha  <chris.schlumberger-socha@arm.com>
380
381         * bfd-in2.h: Regenerated.
382         * elf64-aarch64.c
383         (elf64_aarch64_howto_table): Add R_AARCH64_GOT_LD_PREL19 reloc to HOWTO.
384         (elf64_aarch64_reloc_map): Add reloc entry.
385         (aarch64_resolve_relocation): Likewise.
386         (bfd_elf_aarch64_put_addend): Likewise.
387         (aarch64_reloc_got_type): Likewise.
388         (elf64_aarch64_final_link_relocate): Likewise.
389         (lf64_aarch64_check_relocs): Likewise.
390         (elf64_aarch64_check_relocs): New case for R_AARCH64_ADR_PREL_LO21
391         reloc.
392         * libbfd.h: Regenerated.
393         * reloc.c (R_AARCH64_GOT_LD_PREL19): New reloc.
394
395 2012-09-10  Matthias Klose  <doko@ubuntu.com>
396
397         * config.in: Disable sanity check for kfreebsd.
398
399 2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>
400
401         * configure: Regenerated.
402
403 2012-09-04  Sergey A. Guriev <sergey.a.guriev@intel.com>
404
405         * cpu-ia64-opc.c (ins_cnt6a): New function.
406         (ext_cnt6a): Ditto.
407         (ins_strd5b): Ditto.
408         (ext_strd5b): Ditto.
409         (elf64_ia64_operands): Add new operand types.
410
411 2012-09-04  H.J. Lu  <hongjiu.lu@intel.com>
412
413         PR binutils/14493
414         * elf.c (ignore_section_sym): Also ignore section symbols without
415         a BFD section.
416
417 2012-09-03  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
418
419         * elf32-s390.c (elf_s390_relocate_section): Handle PLTOFF for
420         local and global ifunc symbols.
421         * elf64-s390.c (elf_s390_relocate_section): Likewise.
422
423 2012-09-02  H.J. Lu  <hongjiu.lu@intel.com>
424
425         * elf-bfd.h (elf_link_hash_table): Add hdynamic for the
426         _DYNAMIC symbol.
427
428         * elflink.c (_bfd_elf_link_create_dynamic_sections): Set
429         hdynamic.
430
431         * elf-m10300.c (_bfd_mn10300_elf_finish_dynamic_symbol): Check
432         hdynamic instead of "_DYNAMIC".
433         * elf32-arm.c (elf32_arm_finish_dynamic_symbol): Likewise.
434         * elf32-cr16.c (elf32_arm_finish_dynamic_symbol): Likewise.
435         * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
436         * elf32-hppa.c (elf32_hppa_finish_dynamic_symbol): Likewise.
437         * elf32-i386.c (elf_i386_convert_mov_to_lea): Likewise.
438         * elf32-lm32.c (lm32_elf_finish_dynamic_symbol): Likewise.
439         * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
440         * elf32-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
441         * elf32-sh.c (sh_elf_finish_dynamic_symbol): Likewise.
442         * elf32-tic6x.c (elf32_tic6x_finish_dynamic_symbol): Likewise.
443         * elf32-tilepro.c (tilepro_elf_finish_dynamic_symbol): Likewise.
444         * elf32-vax.c (elf_vax_finish_dynamic_symbol): Likewise.
445         * elf32-xtensa.c (elf_xtensa_finish_dynamic_symbol): Likewise.
446         * elf64-aarch64.c elf64_aarch64_finish_dynamic_symbol(): Likewise.
447         * elf64-alpha.c (elf64_alpha_finish_dynamic_symbol): Likewise.
448         * elf64-ia64-vms.c (elf64_ia64_finish_dynamic_symbol): Likewise.
449         * elf64-s390.c (elf_s390_finish_dynamic_symbol): Likewise.
450         * elf64-sh64.c (sh64_elf64_finish_dynamic_symbol): Likewise.
451         * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
452         * elfnn-ia64.c (elfNN_ia64_finish_dynamic_symbol): Likewise.
453         * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
454         * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
455         * elfxx-tilegx.c (tilegx_elf_finish_dynamic_symbol): Likewise.
456
457         * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Check
458         hdynamic, hgot, hplt instead of _DYNAMIC, _GLOBAL_OFFSET_TABLE_,
459         _PROCEDURE_LINKAGE_TABLE_.
460         * elf32-score.c (s3_bfd_score_elf_finish_dynamic_symbol): Likewise.
461         * elf32-score7.c (s7_bfd_score_elf_finish_dynamic_symbol): Likewise.
462
463 2012-08-31  H.J. Lu  <hongjiu.lu@intel.com>
464
465         * elf32-i386.c (elf_i386_convert_mov_to_lea): Don't optimize
466         _DYNAMIC.
467         * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): Likewise.
468
469 2012-08-31  H.J. Lu  <hongjiu.lu@intel.com>
470
471         * elf32-i386.c (elf_i386_convert_mov_to_lea): New.
472         (elf_i386_size_dynamic_sections): Use it on input sections.
473         (elf_i386_relocate_section): Don't convert
474         "mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
475         for local symbols here.
476
477         * elf64-x86-64.c (elf_x86_64_convert_mov_to_lea): New.
478         (elf_x86_64_size_dynamic_sections): Use it on input sections.
479         (elf_x86_64_relocate_section): Don't convert
480         "mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg"
481         for local symbols here.
482
483 2012-08-30  H.J. Lu  <hongjiu.lu@intel.com>
484
485         * elf32-i386.c (elf_i386_relocate_section): Convert
486         "mov foo@GOT(%reg), %reg" to "lea foo@GOTOFF(%reg), %reg"
487         for local symbols.
488
489         * elf64-x86-64.c (elf_x86_64_relocate_section): Convert
490         "mov foo@GOTPCREL(%rip), %reg" to "lea foo(%rip), %reg"
491         for local symbols.
492
493 2012-08-31  Alan Modra  <amodra@gmail.com>
494
495         PR ld/14464
496         * elf64-ppc.c (ppc64_elf_relocate_section): Map symbols defined
497         by a linker script in .opd to corresponding input .opd section.
498
499 2012-08-28  Maciej W. Rozycki  <macro@codesourcery.com>
500
501         * elf32-ppc.c (ppc_elf_relocate_section): Assert that dynindx is
502         not minus one.
503         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
504
505 2012-08-28  Maciej W. Rozycki  <macro@codesourcery.com>
506
507         * elflink.c (_bfd_elf_merge_symbol): Also override the version
508         a dynamic symbol defaulted to if preempted with a hidden or
509         internal definition.
510
511 2012-08-28  Walter Lee  <walt@tilera.com>
512
513         * elf32-tilepro.c (allocate_dynrelocs): Use PLT_ENTRY_SIZE as size
514         of header.
515         (tilepro_plt_entry_build): Account for new header size.
516         (tilepro_elf_finish_dynamic_sections): Ditto.
517         (tilepro_elf_plt_sym_val): Ditto.
518         * elfxx-tilegx.c (allocate_dynrelocs): Use PLT_ENTRY_SIZE as size
519         of header + tail.
520         (tilegx_elf_finish_dynamic_sections): Account for new padding.
521
522 2012-08-27  Walter Lee  <walt@tilera.com>
523
524         * reloc.c (Add BFD_RELOC_TILEGX_IMM16_X0_HW0_PLT_PCREL,
525         BFD_RELOC_TILEGX_IMM16_X1_HW0_PLT_PCREL,
526         BFD_RELOC_TILEGX_IMM16_X0_HW1_PLT_PCREL,
527         BFD_RELOC_TILEGX_IMM16_X1_HW1_PLT_PCREL,
528         BFD_RELOC_TILEGX_IMM16_X0_HW2_PLT_PCREL,
529         BFD_RELOC_TILEGX_IMM16_X1_HW2_PLT_PCREL,
530         BFD_RELOC_TILEGX_IMM16_X0_HW3_PLT_PCREL,
531         BFD_RELOC_TILEGX_IMM16_X1_HW3_PLT_PCREL,
532         BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PLT_PCREL,
533         BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PLT_PCREL,
534         BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PLT_PCREL,
535         BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PLT_PCREL,
536         BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PLT_PCREL,
537         BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL): new relocations.
538         * elfxx-tilegx.c (tilegx_elf_howto_table): Handle new relocations.
539         (tilegx_reloc_map): Ditto.
540         (reloc_to_create_func): Ditto.
541         (tilegx_elf_check_relocs): Ditto.
542         (tilegx_elf_gc_sweep_hook): Ditto.
543         (tilegx_elf_relocate_section): Ditto.
544         * libbfd.h: Regenerate.
545         * bfd-in2.h: Regenerate.
546
547 2012-08-24  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
548
549         * elf32-arm.c (v8): New array.
550         (tag_cpu_arch_combine): Add support for ARMv8 attributes.
551         (elf32_arm_merge_eabi_attributes): Likewise.
552         (VFP_VERSION_COUNT): New define.
553
554 2012-08-20  Tom Tromey  <tromey@redhat.com>
555
556         * vms-lib.c (_bfd_vms_lib_get_module): Use bfd_zmalloc for
557         areltdata.
558         * opncls.c (_bfd_delete_bfd): Free arelt_data.
559         * mach-o.c (bfd_mach_o_fat_member_init): Use bfd_zmalloc for
560         areltdata.
561         * ecoff.c (_bfd_ecoff_slurp_armap): Use free for mapdata.
562         * coff-rs6000.c (_bfd_xcoff_read_ar_hdr): Use bfd_zmalloc for
563         areltdata.
564         (xcoff_write_archive_contents_old): Likewise.
565         (xcoff_write_archive_contents_big): Likewise.
566         * archive64.c (bfd_elf64_archive_slurp_armap): Use free for
567         areltdata.
568         * archive.c (_bfd_generic_read_ar_hdr_mag): Use bfd_zmalloc and
569         free for areltdata.
570         (_bfd_get_elt_at_filepos): Likewise.  Clear n_nfd->arelt_data on
571         failure.
572         (do_slurp_bsd_armap): Use bfd_zmalloc and free for areltdata.
573         (do_slurp_coff_armap): Likewise.
574         (_bfd_slurp_extended_name_table): Likewise.
575         (bfd_slurp_bsd_armap_f2): Likewise.  Don't leak 'mapdata'.
576
577 2012-08-17  Nick Clifton  <nickc@redhat.com>
578
579         * po/vi.po: Updated Vietnamese translation.
580
581 2012-08-17  Yuri Chornoivan  <yurchor@ukr.net>
582
583         * elf-bfd.h, * elf32-ppc.c, * elf64-ia64-vms.c, * elfnn-ia64.c,
584         * elfxx-mips.c, * vms-alpha.c: Typo fixes.
585
586 2012-08-17  Alan Modra  <amodra@gmail.com>
587
588         PR binutils/14475:
589         * archive.c (bfd_ar_hdr_from_filesystem): Revert last change.
590         Instead malloc areltdata.
591
592 2012-08-16  Tom Tromey  <tromey@redhat.com>
593
594         PR binutils/14475:
595         * archive.c (bfd_ar_hdr_from_filesystem): Allocate areltdata on
596         'member' BFD.  Don't try to free 'ared'.
597
598 2012-08-14  Nick Clifton  <nickc@redhat.com>
599
600         * po/uk.po: Updated Ukranian translation.
601
602 2012-08-13  Maciej W. Rozycki  <macro@codesourcery.com>
603
604         * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Look up
605         the options section in the output rather than input BFD to
606         decide if to add a DT_MIPS_OPTIONS tag.
607
608 2012-08-13  Maciej W. Rozycki  <macro@codesourcery.com>
609
610         * config.bfd: Wrap mips*el-*-linux* and mips*-*-linux* into
611         #ifdef BFD64.
612
613 2012-08-13  Ian Bolton  <ian.bolton@arm.com>
614             Laurent Desnogues  <laurent.desnogues@arm.com>
615             Jim MacArthur  <jim.macarthur@arm.com>
616             Marcus Shawcroft  <marcus.shawcroft@arm.com>
617             Nigel Stephens  <nigel.stephens@arm.com>
618             Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
619             Richard Earnshaw  <rearnsha@arm.com>
620             Sofiane Naci  <sofiane.naci@arm.com>
621             Tejas Belagod  <tejas.belagod@arm.com>
622             Yufeng Zhang  <yufeng.zhang@arm.com>
623
624         * Makefile.am: Add AArch64 files.
625         * Makefile.in: Regenerate.
626         * archures.c (bfd_aarch64_arch): New declaration.
627         (bfd_archures_list): Use bfd_archures_list.
628         * bfd-in.h (bfd_elf64_aarch64_init_maps): New declaration.
629         (bfd_aarch64_process_before_allocation): New declaration.
630         (bfd_elf64_aarch64_process_before_allocation): New declaration.
631         (bfd_elf64_aarch64_set_options): New declaration.
632         (bfd_elf64_aarch64_add_glue_sections_to_bfd): New declaration.
633         (BFD_AARCH64_SPECIAL_SYM_TYPE_MAP): New definition.
634         (BFD_AARCH64_SPECIAL_SYM_TYPE_TAG): New definition.
635         (BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER): New definition.
636         (BFD_AARCH64_SPECIAL_SYM_TYPE_ANY): New definition.
637         (bfd_is_aarch64_special_symbol_name): New declaration.
638         (bfd_aarch64_merge_machines): New declaration.
639         (bfd_aarch64_update_notes): New declaration.
640         (int bfd_aarch64_get_mach_from_notes): New declaration.
641         (elf64_aarch64_setup_section_lists): New declaration.
642         (elf64_aarch64_next_input_section): New declaration.
643         (elf64_aarch64_size_stubs): New declaration.
644         (elf64_aarch64_build_stubs): New declaration.
645         * config.bfd: Add AArch64.
646         * configure.in: Add AArch64.
647         * configure: Regenerate.
648         * cpu-aarch64.c: New file.
649         * elf-bfd.h: Add AArch64.
650         * bfd-in2.h: Regenerate.
651         * libbfd.h: Regenerate.
652         * elf64-aarch64.c: New file.
653         * reloc.c: Add AArch64 relocations.
654         * targets.c: Add AArch64.
655         * po/SRC-POTFILES.in: Regenerate.
656
657 2012-08-13  Maciej W. Rozycki  <macro@codesourcery.com>
658
659         * elfxx-mips.c (mips_elf_calculate_relocation): Fix the handling
660         of protected symbols.
661
662 2012-08-10  Alan Modra  <amodra@gmail.com>
663
664         PR binutils/14444
665         * elf.c (IS_VALID_GROUP_SECTION_HEADER) Add minsize param.
666         (setup_group): Adjust uses.
667         (bfd_section_from_shdr): Allow SHT_GROUP sections with just a flag
668         word.
669
670 2012-08-09  Nick Clifton  <nickc@redhat.com>
671
672         * po/vi.po: Updated Vietnamese translation.
673
674 2012-08-09  Maciej W. Rozycki  <macro@codesourcery.com>
675
676         * elfxx-mips.c (LA25_LUI_MICROMIPS_1, LA25_LUI_MICROMIPS_2):
677         Remove macros, folding them into...
678         (LA25_LUI_MICROMIPS): ... this new macro.
679         (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise into...
680         (LA25_J_MICROMIPS): ... this new macro.
681         (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise
682         into...
683         (LA25_ADDIU_MICROMIPS): ... this new macro.
684         (bfd_put_micromips_32, bfd_get_micromips_32): New functions.
685         (mips_elf_create_la25_stub): Use them.
686         (check_br32_dslot, check_br32, check_relocated_bzc): Likewise.
687         (_bfd_mips_elf_relax_section): Likewise.
688
689 2012-08-09  Alan Modra  <amodra@gmail.com>
690             Tom Tromey  <tromey@redhat.com>
691
692         * archive.c (SECTION Archives): Update documentation.
693         (_bfd_delete_archive_data): Remove.
694         (_bfd_add_bfd_to_archive_cache): Set 'parent_cache' and 'key'.
695         (archive_close_worker, _bfd_archive_close_and_cleanup): New
696         functions.
697         * libbfd-in.h (struct areltdata <parent_cache, key>): New fields.
698         (_bfd_delete_archive_data): Don't declare.
699         (_bfd_archive_close_and_cleanup): Declare.
700         (_bfd_generic_close_and_cleanup): Redefine.
701         * libbfd.h: Rebuild.
702         * opncls.c (_bfd_delete_bfd): Don't call _bfd_delete_archive_data.
703         (bfd_close): Don't close nested thin archives here.
704
705 2012-08-07  Tom Tromey  <tromey@redhat.com>
706
707         * archive.c (_bfd_delete_archive_data): New function.
708         * libbfd-in.h (_bfd_delete_archive_data): Declare.
709         * libbfd.h: Rebuild.
710         * opncls.c (_bfd_delete_bfd): Call _bfd_delete_archive_data.
711
712 2012-08-07  Nick Clifton  <nickc@redhat.com>
713
714         * po/uk.po: Updated Ukranian translation.
715
716 2012-08-06  Maciej W. Rozycki  <macro@codesourcery.com>
717
718         * elflink.c (bfd_elf_record_link_assignment): Remove --defsym
719         symbols special case.
720
721 2012-08-05  Maciej W. Rozycki  <macro@linux-mips.org>
722
723         * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Don't allocate
724         PLT slots for local symbols.
725
726 2012-08-03  Maciej W. Rozycki  <macro@codesourcery.com>
727
728         * elf64-mips.c (mips16_elf64_howto_table_rela): Correct src_mask
729         field initializers throughout.
730         * elfn32-mips.c (elf_mips16_howto_table_rela): Likewise.
731
732 2012-08-03  Maciej W. Rozycki  <macro@codesourcery.com>
733
734         * elfxx-mips.c (mips_elf_perform_relocation): Update the
735         cross-mode jump message.
736
737 2012-08-03  Maciej W. Rozycki  <macro@codesourcery.com>
738
739         * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Update the
740         comment on DT_MIPS_RLD_MAP.
741
742 2012-08-03  Tom Tromey  <tromey@redhat.com>
743
744         * opncls.c (_bfd_delete_bfd): Now static.
745         * libbfd-in.h (_bfd_delete_bfd): Don't declare.
746         * libbfd.h: Rebuild.
747
748 2012-08-02  Sean Keys  <skeys@ipdatasys.com>
749
750         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Modified
751         conditional statment to allow suppression of mismatched bank
752         warning.
753
754 2012-08-01  Alan Modra  <amodra@gmail.com>
755
756         * dwarf2.c (struct dwarf2_debug): Add close_on_cleanup.
757         (_bfd_dwarf2_slurp_debug_info): Set close_on_cleanup if we open
758         gnu_debuglink bfd.
759         (_bfd_dwarf2_cleanup_debug_info): Act on close_on_cleanup.
760
761 2012-07-30  Nick Clifton  <nickc@redhat.com>
762
763         * po/bfd.pot: Updated template.
764         * po/es.po: Updated Spanish translation.
765         * po/fi.po: Updated Finnish translation.
766         * po/fr.po: Updated French translation.
767         * po/ru.po: Updated Russian translation.
768         * po/uk.po: Updated Ukranian translation.
769
770 2012-07-27  Mike Frysinger  <vapier@gentoo.org>
771
772         * configure.in (AC_INIT): Call with the args bfd and 2.22.52.
773         (AM_INIT_AUTOMAKE): Remove args.
774         * configure: Regenerate.
775
776 2012-07-27  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
777
778         * cpu-s390.c (bfd_s390_64_arch, bfd_s390_arch): Pick the default
779         arch depending on the target size.
780
781 2012-07-27  Tristan Gingold  <gingold@adacore.com>
782
783         * configure.in: Bump version to 2.23.51
784         * configure: Regenerate.
785
786 2012-07-26  Teresa Johnson  <tejohnson@google.com>
787
788         * bfd/dwarf2.c (find_line): Initialize discriminator_ptr
789         if it is non-NULL.
790
791 2012-07-26  Meador Inge  <meadori@codesourcery.com>
792             Nick Clifton  <nickc@redhat.com>
793
794         PR ld/14397
795         * elf32-arm.c (elf32_arm_finish_dynamic_sections): Report an error
796         if a required section is missing from the linker script.
797
798 2012-07-24  Jan Waclawek <konfera@efton.sk>
799         PR 13899
800         * elf32-avr.c (elf32_avr_relax_delete_bytes): Call
801         _bfd_elf_link_read_relocs with keep_memory as TRUE.
802
803 2012-07-24  Teresa Johnson  <tejohnson@google.com>
804
805         * bfd.c (bfd_find_nearest_line_discriminator): New macro.
806         * coff-rs6000.c: Init _bfd_find_nearest_line_discriminator.
807         * coff64-rs6000.c: Likewise.
808         * dwarf2.c (struct line_info): Add discriminator field.
809         (add_line_info): Fill in new discriminator field.
810         (decode_line_info): Record discriminator information instead
811         of ignoring it.
812         (lookup_address_in_line_info_table): Return discriminator field if
813         requested.
814         (comp_unit_find_nearest_line): Add discriminator argument.
815         (find_line): Likewise.
816         (_bfd_dwarf2_find_nearest_line): Likewise.
817         (_bfd_dwarf2_find_line): Likewise.
818         * elf-bfd.h (_bfd_elf_find_nearest_line_discriminator): New.
819         (_bfd_elf_find_line_discriminator): Likewise.
820         (_bfd_generic_find_nearest_line_discriminator): Likewise. Defined.
821         * elf.c (_bfd_elf_find_nearest_line): Change to a wrapper
822         that invokes _bfd_elf_find_nearest_line_discriminator with correct
823         arguments.
824         (_bfd_elf_find_nearest_line_discriminator): New.
825         (_bfd_elf_find_line): Change to a wrapper
826         that invokes _bfd_elf_find_line_discriminator with correct
827         arguments.
828         (_bfd_elf_find_line_discriminator): New.
829         * coffgen.c (coff_find_nearest_line_with_names): Handle
830         new discriminator argument.
831         * elf32-arm.c (elf32_arm_find_nearest_line): Likewise.
832         * elf64-alpha.c (elf64_alpha_find_nearest_line): Likewise.
833         * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Likewise.
834         * mach-o.c (bfd_mach_o_find_nearest_line): Likewise.
835         * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Add discriminator
836         argument.
837         (_bfd_dwarf2_find_line): Likewise.
838         (_bfd_generic_find_nearest_line_discriminator): New.
839         * libbfd.c (_bfd_generic_find_nearest_line_discriminator): New.
840         * bfd-in2.h: Regenerated.
841         * libbfd.h: Likewise.
842         * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize
843         _bfd_find_nearest_line_discriminator with
844         _bfd_generic_find_nearest_line_discriminator.
845         (bfd_target): Add _bfd_find_nearest_line_discriminator.
846
847 2012-07-24  Sean Keys  <skeys@ipdatasys.com>
848
849         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Added code
850         that enables the linker to offset addresses, when linking against
851         symbols from the XGATE processor and vice versa.
852
853 2012-07-23  Nick Clifton  <nickc@redhat.com>
854
855         * cisco-core.c (cisco_core_file_failing_command): Make static.
856         (cisco_core_file_failing_signal): Make static.
857
858 2012-07-18  H.J. Lu  <hongjiu.lu@intel.com>
859
860         * bfd-in2.h: Regenerated.
861
862 2012-07-18  Nicolàs Alejandro Di Risio <sheeva@tiscali.it>
863
864         PR binutils/14335
865         * section.c: Fix a typo in comments.
866
867 2012-07-13  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
868
869         * elf64-s390.c: Include elf-s390-common.c.
870         (R_390_IRELATIVE): New reloc.
871         (elf_s390_reloc_type_lookup): Support R_390_IRELATIVE.
872         (RELA_ENTRY_SIZE): New macro.
873         (elf_s390_link_hash_entry): New fields ifunc_resolver_address and
874         *ifunc_resolver_section.
875         (struct plt_entry): New struct.
876         (struct elf_s390_obj_tdata): New field local_plt.
877         (elf_s390_local_plt): New macro.
878         (struct elf_s390_link_hash_table): New field irelifunc.
879         (ELF64): New macro.
880         (link_hash_newfunc): Initialize new fields.
881         (elf_s390_check_relocs): Handle IFUNC symbols.
882         (elf_s390_adjust_dynamic_symbol): Don't do anything for IFUNC
883         symbols.
884         (allocate_dynrelocs): Call s390_elf_allocate_ifunc_dyn_relocs for
885         IFUNC symbols.
886         (elf_s390_size_dynamic_sections): Handle IFUNC symbols.
887         (elf_s390_relocate_section): Likewise.
888         (elf_s390_finish_dynamic_symbol): Likewise.
889         (elf_s390_finish_dynamic_sections): Handle local IFUNC symbols.
890         (elf_s390_finish_ifunc_symbol): New function.
891         (elf_s390_gc_sweep_hook): Handle local plt entries.
892         (elf_backend_add_symbol_hook): Define.
893         * elf32-s390.c: See elf64-s390.c changes.
894         * elf-s390-common.c: New file.
895         * bfd-in2.h (BFD_RELOC_390_IRELATIVE): New enum field.
896         * libbfd.h (BFD_RELOC_390_IRELATIVE): New entry for
897         BFD_RELOC_390_IRELATIVE.
898         * reloc.c (BFD_RELOC_390_IRELATIVE): Document new relocation.
899
900 2012-07-13  Nick Clifton  <nickc@redhat.com>
901
902         * aix386-core.c: Remove use of PTR and PARAMS macros.
903         * archive.c: Likewise.
904         * cache.c: Likewise.
905         * cisco-core.c: Likewise.
906         * coff-alpha.c: Likewise.
907         * coff-apollo.c: Likewise.
908         * coff-aux.c: Likewise.
909         * coff-h8300.c: Likewise.
910         * coff-h8500.c: Likewise.
911         * coff-i386.c: Likewise.
912         * coff-i960.c: Likewise.
913         * coff-ia64.c: Likewise.
914         * coff-m68k.c: Likewise.
915         * coff-m88k.c: Likewise.
916         * coff-mcore.c: Likewise.
917         * coff-mips.c: Likewise.
918         * coff-or32.c: Likewise.
919         * coff-ppc.c: Likewise.
920         * coff-rs6000.c: Likewise.
921         * coff-sh.c: Likewise.
922         * coff-sparc.c: Likewise.
923         * coff-stgo32.c: Likewise.
924         * coff-tic30.c: Likewise.
925         * coff-tic4x.c: Likewise.
926         * coff-tic54x.c: Likewise.
927         * coff-tic80.c: Likewise.
928         * coff-w65.c: Likewise.
929         * cofflink.c: Likewise.
930         * cpu-arc.c: Likewise.
931         * cpu-cris.c: Likewise.
932         * cpu-h8500.c: Likewise.
933         * cpu-i960.c: Likewise.
934         * cpu-msp430.c: Likewise.
935         * cpu-ns32k.c: Likewise.
936         * cpu-powerpc.c: Likewise.
937         * cpu-rs6000.c: Likewise.
938         * cpu-tic4x.c: Likewise.
939         * cpu-w65.c: Likewise.
940         * ecoff.c: Likewise.
941         * ecofflink.c: Likewise.
942         * elf-m10200.c: Likewise.
943         * elf32-bfin.c: Likewise.
944         * elf32-cris.c: Likewise.
945         * elf32-crx.c: Likewise.
946         * elf32-fr30.c: Likewise.
947         * elf32-frv.c: Likewise.
948         * elf32-h8300.c: Likewise.
949         * elf32-i960.c: Likewise.
950         * elf32-m32c.c: Likewise.
951         * elf32-m68hc11.c: Likewise.
952         * elf32-m68hc12.c: Likewise.
953         * elf32-m68hc1x.c: Likewise.
954         * elf32-m68k.c: Likewise.
955         * elf32-mcore.c: Likewise.
956         * elf32-rl78.c: Likewise.
957         * elf32-rx.c: Likewise.
958         * elf32-s390.c: Likewise.
959         * elf32-vax.c: Likewise.
960         * elf64-alpha.c: Likewise.
961         * elf64-mmix.c: Likewise.
962         * elf64-s390.c: Likewise.
963         * elf64-sparc.c: Likewise.
964         * elfnn-ia64.c: Likewise.
965         * elfxx-mips.c: Likewise.
966         * elfxx-sparc.c: Likewise.
967         * hash.c: Likewise.
968         * hp300hpux.c: Likewise.
969         * hppabsd-core.c: Likewise.
970         * hpux-core.c: Likewise.
971         * i386dynix.c: Likewise.
972         * i386linux.c: Likewise.
973         * i386lynx.c: Likewise.
974         * i386mach3.c: Likewise.
975         * i386msdos.c: Likewise.
976         * i386os9k.c: Likewise.
977         * irix-core.c: Likewise.
978         * lynx-core.c: Likewise.
979         * m68klinux.c: Likewise.
980         * mach-o.h: Likewise.
981         * mipsbsd.c: Likewise.
982         * netbsd-core.c: Likewise.
983         * nlm32-i386.c: Likewise.
984         * osf-core.c: Likewise.
985         * pc532-mach.c: Likewise.
986         * pef.c: Likewise.
987         * ppcboot.c: Likewise.
988         * ptrace-core.c: Likewise.
989         * reloc16.c: Likewise.
990         * sco5-core.c: Likewise.
991         * som.h: Likewise.
992         * sparclinux.c: Likewise.
993         * sparclynx.c: Likewise.
994         * ticoff.h: Likewise.
995         * trad-core.c: Likewise.
996         * vms-lib.c: Likewise.
997         * xsym.h: Likewise.
998
999 2012-07-09  Alan Modra  <amodra@gmail.com>
1000
1001         PR ld/14323
1002         * elflink.c (elf_sort_symbol): Sort by size too.
1003         (elf_link_add_object_symbols <weakdefs>): Simplify binary search.
1004         Do not depend on ordering of symbol aliases.  Match largest size.
1005
1006 2012-07-03  H.J. Lu  <hongjiu.lu@intel.com>
1007
1008         * elf.c (assign_section_numbers): Check if number of sections
1009         >= SHN_LORESERVE.
1010         * elfcode.h (elf_object_p): Likewise.
1011
1012 2012-07-03  Nick Clifton  <nickc@redhat.com>
1013
1014         * archive.c (bsd_write_armap): Catch attempts to create an archive
1015         with indicies bigger than 4Gb.
1016         (coff_write_armap): Likewise.
1017
1018 2012-07-03  H.J. Lu  <hongjiu.lu@intel.com>
1019
1020         PR binutils/14319
1021         * elf.c (_bfd_elf_make_section_from_shdr): Don't compress empty
1022         debug section.
1023
1024 2012-07-03  H.J. Lu  <hongjiu.lu@intel.com>
1025
1026         PR ld/3351
1027         * elflink.c (_bfd_elf_update_dynamic_flags): New.
1028         (_bfd_elf_merge_symbol): Update both real and indirect symbol
1029         dynamic flags.
1030         (_bfd_elf_add_default_symbol): Make the real symbol dynamic if
1031         the indirect symbol is defined in a shared library.
1032         (elf_link_add_object_symbols): Likewise.  If the indirect
1033         symbol has been forced local, don't make the real symbol
1034         dynamic.
1035         (elf_link_check_versioned_symbol): Check indirect symbol.
1036         (elf_link_output_extsym): Use real symbol definition when
1037         reporting indirect symbol error.  Check version info for
1038         dynamic versioned symbol.
1039
1040 2012-07-03  Alan Modra  <amodra@gmail.com>
1041
1042         PR ld/14207
1043         * elf.c (assign_file_positions_for_load_sections): Remove assertions
1044         that only PT_LOAD headers include file header and section headers.
1045         (assign_file_positions_for_non_load_sections): Similarly don't
1046         assert PT_GNU_RELRO header does not include file and section headers.
1047         Compare first section vma rather than PT_LOAD p_vaddr against
1048         relro_start when looking for PT_LOAD covering PT_GNU_RELRO.  Replace
1049         abort with assertion.
1050
1051 2012-07-02  Alan Modra  <amodra@gmail.com>
1052
1053         * elf32-m32c.c (m32c_elf_check_relocs): Use bfd_make_section
1054         "anyway" variant when creating .plt.
1055         (m32c_elf_relax_plt_section): Remove redundant test and unused param.
1056         (m32c_elf_relax_section): Test SEC_LINKER_CREATED before calling
1057         m32c_elf_relax_plt_section.
1058         * elfxx-mips.c (mips_elf_create_got_section): Use make anyway variant
1059         when creating .got and .got.plt.
1060         (_bfd_mips_elf_final_link): Likewise for .rtproc, and use
1061         bfd_get_linker_section.
1062         * sunos.c: Similarly throughout.
1063
1064 2012-07-01  Andreas Schwab  <schwab@linux-m68k.org>
1065
1066         * elf.c (_bfd_elf_make_section_from_shdr): Fix typo in error
1067         message.
1068
1069 2012-06-29  H.J. Lu  <hongjiu.lu@intel.com>
1070
1071         * elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE
1072         on unresolvable relocation.
1073
1074 2012-06-29  H.J. Lu  <hongjiu.lu@intel.com>
1075
1076         * archive.c (_bfd_compute_and_write_armap): Simplify global
1077         symbol handling.
1078
1079 2012-06-29  Nick Clifton  <nickc@redhat.com>
1080
1081         PR ld/14189
1082         * elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount
1083         for locally bound symbols.
1084
1085 2012-06-29  Alan Modra  <amodra@gmail.com>
1086
1087         * section.c (bfd_get_linker_section): New function.
1088         * elf32-arm.c: When retrieving SEC_LINKER_CREATED sections, use
1089         the above throughout rather than bfd_get_section_by_name.  Use
1090         bfd_make_section_anyway rather than bfd_make_section when creating
1091         them.
1092         * elf32-bfin.c: Likewise.
1093         * elf32-cr16.c: Likewise.
1094         * elf32-cris.c: Likewise.
1095         * elf32-frv.c: Likewise.
1096         * elf32-hppa.c: Likewise.
1097         * elf32-i370.c: Likewise.
1098         * elf32-i386.c: Likewise.
1099         * elf32-lm32.c: Likewise.
1100         * elf32-m32c.c: Likewise.
1101         * elf32-m32r.c: Likewise.
1102         * elf32-m68k.c: Likewise.
1103         * elf32-microblaze.c: Likewise.
1104         * elf32-ppc.c: Likewise.
1105         * elf32-rl78.c: Likewise.
1106         * elf32-s390.c: Likewise.
1107         * elf32-score.c: Likewise.
1108         * elf32-score7.c: Likewise.
1109         * elf32-sh.c: Likewise.
1110         * elf32-tic6x.c: Likewise.
1111         * elf32-tilepro.c: Likewise.
1112         * elf32-vax.c: Likewise.
1113         * elf32-xstormy16.c: Likewise.
1114         * elf32-xtensa.c: Likewise.
1115         * elf64-alpha.c: Likewise.
1116         * elf64-hppa.c: Likewise.
1117         * elf64-ia64-vms.c: Likewise.
1118         * elf64-ppc.c: Likewise.
1119         * elf64-s390.c: Likewise.
1120         * elf64-sh64.c: Likewise.
1121         * elf64-sparc.c: Likewise.
1122         * elf64-x86-64.c: Likewise.
1123         * elfnn-ia64.c: Likewise.
1124         * elfxx-mips.c: Likewise.
1125         * elfxx-sparc.c: Likewise.
1126         * elfxx-tilegx.c: Likewise.
1127         * elflink.c: Likewise.
1128         * elf-vxworks.c: Likewise.
1129         * elf-m10300.c: Likewise.  Also make use of htab plt, got and
1130         gotplt shortcuts.
1131         * bfd-in2.h: Regenerate.
1132         * elf32-lm32.c (lm32_elf_check_relocs): Use the correct bfd when
1133         calling create_rofixup_section.
1134         * elflink.c (bfd_elf_final_link): Simplify test for .dynstr.
1135
1136 2012-06-29  Alan Modra  <amodra@gmail.com>
1137
1138         * elf32-sh.c (sh_elf_create_dynamic_sections): Don't create .rela
1139         section for bss type sections, except for .rela.bss.
1140         * elf-m10300.c (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
1141         * elf32-cr16.c (_bfd_cr16_elf_create_dynamic_sections): Likewise.
1142         * elf32-lm32.c (lm32_elf_create_dynamic_sections): Likewise.
1143         * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
1144         * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
1145
1146 2012-06-28  Roland McGrath  <mcgrathr@google.com>
1147
1148         * elf32-arm.c (elf32_arm_populate_plt_entry): Use int32_t for
1149         displacement calculation in nacl_p case.
1150
1151 2012-06-28  Nick Clifton  <nickc@redhat.com>
1152
1153         * po/uk.po: New Ukranian translation.
1154         * configure.in (ALL_LINGUAS): Add uk.
1155         * configure: Regenerate.
1156
1157 2012-06-26  Alan Modra  <amodra@gmail.com>
1158
1159         * elf64-ppc.c (ppc64_elf_next_toc_section): Don't error if input
1160         file has multiple .got/.toc sections and all don't fit in
1161         current toc group.
1162
1163 2012-06-22  Roland McGrath  <mcgrathr@google.com>
1164
1165         * elf.c (assign_file_positions_for_non_load_sections): Define
1166         __ehdr_start symbol if it's referenced and there's a PT_LOAD
1167         segment that covers both the file and program headers.
1168
1169 2012-06-22  Andreas Schwab  <schwab@linux-m68k.org>
1170
1171         * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Don't make
1172         _GLOBAL_OFFSET_TABLE_ and _DYNAMIC absolute.
1173
1174 2012-06-22  Alan Modra  <amodra@gmail.com>
1175
1176         * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't emit out-of-line
1177         save/restore functions when relocatable.  Make "funcs" static.
1178
1179 2012-06-18  Hans-Peter Nilsson  <hp@axis.com>
1180
1181         * elf32-cris.c (cris_elf_plt_sym_val): Rewrite to work in presence
1182         of merged .got and .got.plt entries.
1183
1184 2012-06-18  John Szakmeister  <john@szakmeister.net>
1185
1186         * elf32-arm.c (elf32_arm_final_link_relocate): Correct return value.
1187
1188 2012-06-17  Hans-Peter Nilsson  <hp@axis.com>
1189
1190         * elf32-cris.c (cris_elf_relocate_section): <R_CRIS_32_IE>
1191         <R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>: Handle references to
1192         thread common symbols.
1193
1194 2012-06-13  Nick Clifton  <nickc@redhat.com>
1195
1196         * elf32-arm.c (bfd_arm_get_mach_from_attributes): New function.
1197         (elf32_arm_object_p): If the machine number could not be deduced
1198         from the notes, call bfd_arm_get_mach_from_attributes to get the
1199         number from the attributes.
1200
1201 2012-06-12  H.J. Lu  <hongjiu.lu@intel.com>
1202
1203         PR bfd/14207
1204         * elf.c (assign_file_positions_for_non_load_sections): Abort if
1205         PT_GNU_RELRO segment doesn't fit in PT_LOAD segment.
1206
1207 2012-06-12  Alan Modra  <amodra@gmail.com>
1208
1209         PR ld/14207
1210         * elf.c (_bfd_elf_map_sections_to_segments): Disregard bss type
1211         sections at end of PT_LOAD segment when searching for segment
1212         that contains end of relro extent.
1213
1214 2012-06-11  H.J. Lu  <hongjiu.lu@intel.com>
1215
1216         * elf.c (assign_file_positions_for_non_load_sections): Reindent.
1217
1218 2012-06-11  H.J. Lu  <hongjiu.lu@intel.com>
1219
1220         * elf.c (_bfd_elf_map_sections_to_segments): Reindent.
1221
1222 2012-06-06  Alan Modra  <amodra@gmail.com>
1223
1224         * elflink.c (elf_link_input_bfd): Provide a file symbol for
1225         each input file with local syms, if the input lacks such.
1226         (bfd_elf_final_link): Add a file symbol to mark end of locals
1227         for which we can associate with input files.
1228         (struct elf_final_link_info): Add filesym_count field.
1229         (struct elf_outext_info): Add need_second_pass and second_pass.
1230         (elf_link_output_extsym): Detect symbols defined in the output
1231         file, emit them on second pass over locals.
1232
1233 2012-06-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
1234
1235         * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
1236         of target_read_memory as bfd_size_type.
1237         * bfd-in2.h: Regenerate.
1238         * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
1239         argument of target_read_memory as bfd_size_type.
1240         (_bfd_elf32_bfd_from_remote_memory): Likewise.
1241         (_bfd_elf64_bfd_from_remote_memory): Likewise.
1242         * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
1243         * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
1244
1245 2012-06-03  Alan Modra  <amodra@gmail.com>
1246
1247         PR binutils/13897
1248         * elf.c (elf_find_function): Cache last function sym info.
1249         (_bfd_elf_maybe_function_sym): Return function size, pass in
1250         section of interest.
1251         * elf-bfd.h (struct elf_backend_data <maybe_function_sym>): Likewise.
1252         (_bfd_elf_maybe_function_sym): Likewise.
1253         * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
1254         (opd_entry_value): Add in_code_sec param.  Revert caching code.
1255         Return -1 if in_code_sec and function found in wrong section.
1256         Update all calls.
1257
1258 2012-06-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
1259
1260         * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
1261         of target_read_memory as size_t.
1262         * bfd-in2.h: Regenerate.
1263         * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
1264         argument of target_read_memory as size_t.
1265         (_bfd_elf32_bfd_from_remote_memory): Likewise.
1266         (_bfd_elf64_bfd_from_remote_memory): Likewise.
1267         * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
1268         * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
1269
1270 2012-06-01  Alan Modra  <amodra@gmail.com>
1271
1272         PR binutils/13897
1273         * elf64-ppc.c (opd_entry_value): Rewrite cache code.
1274
1275 2012-05-29  Tom Tromey  <tromey@redhat.com>
1276
1277         * opncls.c (bfd_fopen): Always close fd on failure.
1278         (bfd_fdopenr): Likewise.
1279
1280 2012-05-27  Alan Modra  <amodra@gmail.com>
1281
1282         PR ld/14170
1283         * elflink.c (_bfd_elf_merge_symbol): When a symbol defined in
1284         a dynamic library finds a new instance with non-default
1285         visibility in a regular object, correctly handle symbols
1286         already on the undefs list and undo dynamic symbol state when
1287         the new symbol is hidden or internal.
1288
1289 2012-05-25  H.J. Lu  <hongjiu.lu@intel.com>
1290
1291         * elf32-i386.c (elf_i386_create_dynamic_sections): Don't use
1292         dynamic_sec_flags to create PLT .eh_frame section.
1293         * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1294
1295 2012-05-25  Alan Modra  <amodra@gmail.com>
1296
1297         PR ld/13909
1298         * elf-eh-frame.c (_bfd_elf_eh_frame_present): New function.
1299         (_bfd_elf_maybe_strip_eh_frame_hdr): Use it here.
1300         * elf-bfd.h (_bfd_elf_eh_frame_present): Declare.
1301         * elflink.c (bfd_elf_size_dynamic_sections): Let the backend
1302         size dynamic sections before stripping eh_frame_hdr.
1303         (bfd_elf_gc_sections): Handle multiple .eh_frame sections.
1304         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Drop glink_eh_frame
1305         if no other .eh_frame sections exist.
1306         * elf64-ppc.c (ppc64_elf_size_stubs): Likewise.
1307         * elf32-i386.c (elf_i386_create_dynamic_sections): Don't size
1308         or alloc plt_eh_frame here..
1309         (elf_i386_size_dynamic_sections): ..do it here instead.  Don't
1310         specially keep sgotplt, iplt, tgotplt, sdynbss for symbols.
1311         (elf_i386_finish_dynamic_sections): Check plt_eh_frame->contents
1312         before writing plt offset.
1313         * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Don't size
1314         or alloc plt_eh_frame here..
1315         (elf_x86_64_size_dynamic_sections): ..do it here instead.
1316         (elf_x86_64_finish_dynamic_sections): Check plt_eh_frame->contents
1317         before writing plt offset.
1318
1319 2012-05-24  Alan Modra  <amodra@gmail.com>
1320
1321         PR ld/14158
1322         * elf64-ppc.c (ppc64_elf_size_stubs): Round up glink_eh_frame
1323         size to output section alignment.
1324         (ppc64_elf_build_stubs): Likewise, and extend last FDE to cover.
1325
1326 2012-05-23  Alan Modra  <amodra@gmail.com>
1327
1328         * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle
1329         BFDs with multiple .eh_frame sections.
1330
1331 2012-05-23  Alan Modra  <amodra@gmail.com>
1332
1333         PR ld/13909
1334         * elflink.c (bfd_elf_discard_info): Don't ignore dynamic BFDs.
1335
1336 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
1337
1338         PR ld/13909
1339         * elf32-i386.c (elf_i386_create_dynamic_sections): Revert the
1340         last change.
1341         * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1342
1343 2012-05-22  Alan Modra  <amodra@gmail.com>
1344
1345         * elflink.c (bfd_elf_discard_info): Look for next .eh_frame if
1346         first one is zero size or discarded.
1347         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set most of
1348         glink_eh_frame contents here..
1349         (ppc_elf_finish_dynamic_sections): ..rather than here.  Just set
1350         offset to .glink.
1351
1352 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
1353
1354         PR ld/13909
1355         * elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT
1356         eh_frame section if there is an input .eh_frame section.
1357         * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1358
1359 2012-05-22  H.J. Lu  <hongjiu.lu@intel.com>
1360
1361         PR ld/14105
1362         * elf32-i386.c (elf_i386_create_dynamic_sections): Always
1363         create PLT eh_frame section with SEC_LINKER_CREATED.
1364         * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
1365
1366 2012-05-22  Alan Modra  <amodra@gmail.com>
1367
1368         * elflink.c (bfd_elf_discard_info): Handle multiple .eh_frame
1369         sections attached to a BFD.
1370         * section.c (bfd_get_section_by_name): Rewrite description.
1371         (bfd_get_next_section_by_name): New function.
1372         * bfd-in2.h: Regenerate.
1373
1374 2012-05-21  Andreas Schwab  <schwab@linux-m68k.org>
1375
1376         * elf32-m68k.c (elf_m68k_grok_prstatus): New function.
1377         (elf_m68k_grok_psinfo): New function.
1378         (elf_backend_grok_prstatus): Define.
1379         (elf_backend_grok_psinfo): Define.
1380
1381 2012-05-19  Maciej W. Rozycki  <macro@linux-mips.org>
1382
1383         * elf64-mips.c (elf_backend_got_header_size): Correct definition.
1384         * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF
1385         backend's GOT header size instead of hardcoding it.
1386
1387 2012-05-19  Maciej W. Rozycki  <macro@linux-mips.org>
1388
1389         * elf32-vax.c (elf_vax_relocate_section)
1390         <R_VAX_8, R_VAX_16, R_VAX_32>: Don't check if info->shared again.
1391
1392 2012-05-19  Maciej W. Rozycki  <macro@linux-mips.org>
1393
1394         * elf32-vax.c (elf_vax_relocate_section)
1395         <R_VAX_8, R_VAX_16, R_VAX_32>: Use section flags rather than
1396         its name as the check for text sections.
1397
1398 2012-05-19  Maciej W. Rozycki  <macro@linux-mips.org>
1399
1400         * elf64-mips.c (mips_elf64_be_swap_reloc_out): Also make sure
1401         the third reloc offset is the same as the first.
1402
1403 2012-05-19  Alan Modra  <amodra@gmail.com>
1404
1405         * elf32-ppc.h (has_vle_insns, is_ppc_vle): Delete.
1406         (has_tls_reloc, has_tls_get_addr_call): Move back to..
1407         * elf32-ppc.c: ..here.
1408         (ppc_elf_section_flags, elf_backend_section_flags): Delete.
1409         (ppc_elf_modify_segment_map): Use ELF sh_flags to detect VLE sections.
1410
1411 2012-05-18  H.J. Lu  <hongjiu.lu@intel.com>
1412
1413         * elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make
1414         _DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute.
1415         * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1416
1417 2012-05-18  Roland McGrath  <mcgrathr@google.com>
1418
1419         * archive.c (_bfd_generic_read_ar_hdr_mag): Fix last change so as
1420         not to clobber the ar_fmag field stored in ARED->arch_header.
1421
1422 2012-05-18  Pedro Alves  <palves@redhat.com>
1423
1424         * mach-o.h: Don't include sysdep.h.
1425
1426 2012-05-18  Nick Clifton  <nickc@redhat.com>
1427
1428         PR 14072
1429         * bfd-in.h: Check for PACKAGE or PACKAGE_VERSION before
1430         complaining about config.h not having been included.
1431         * bfd-in2.h: Regenerate.
1432
1433 2012-05-18  Andreas Schwab  <schwab@linux-m68k.org>
1434
1435         * aclocal.m4: Regenerate.
1436         * Makefile.in: Regenerate.
1437
1438 2012-05-17  Daniel Richard G.  <skunk@iskunk.org>
1439             Nick Clifton  <nickc@redhat.com>
1440
1441         PR 14072
1442         * configure.in: Add check that sysdep.h has been included before
1443         any system header files.
1444         * configure: Regenerate.
1445         * config.in: Regenerate.
1446         * aclocal.m4: Regenerate.
1447         * bfd-in.h: Generate an error if included before config.h.
1448         * sysdep.h: Likewise.
1449         * bfd-in2.h: Regenerate.
1450         * compress.c: Remove #include "config.h".
1451         * plugin.c: Likewise.
1452         * elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h.
1453         * elf64-hppa.c: Likewise.
1454         * som.c: Likewise.
1455         * xsymc.c: Likewise.
1456
1457 2012-05-17  Maciej W. Rozycki  <macro@linux-mips.org>
1458             Alan Modra  <amodra@gmail.com>
1459
1460         * elf.c (ignore_section_sym): Correct comment.  Don't return
1461         true for absolute section.
1462         (elf_map_symbols): Move stray comment.  Adjust for above change.
1463         Don't discard global section symbols.
1464
1465 2012-05-17  Alan Modra  <amodra@gmail.com>
1466
1467         * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make _DYNAMIC,
1468         _GLOBAL_OFFSET_TABLE_ or _PROCEDURE_LINKAGE_TABLE_ absolute.
1469         * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Don't make _DYNAMIC
1470         absolute.
1471
1472 2012-05-17  Alan Modra  <amodra@gmail.com>
1473
1474         * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call, has_vle_insns,
1475         is_ppc_vle): Move to..
1476         * elf32-ppc.h: ..here, making is_ppc_vle a macro.
1477
1478 2012-05-16  Sergio Durigan Junior  <sergiodj@redhat.com>
1479
1480         * bfd-in.h (bfd_get_section_name, bfd_get_section_vma,
1481         bfd_get_section_lma, bfd_get_section_alignment,
1482         bfd_get_section_flags, bfd_get_section_userdata): Rewrite macros
1483         in order to use the `bfd' argument.
1484         * bfd-in2.h: Regenerate.
1485         * elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd'
1486         as the first argument for `bfd_get_section_alignment'.
1487         * elf32-arm.c (create_ifunc_sections): Likewise, for
1488         `bfd_set_section_alignment'.
1489         * elf32-m32r.c (m32r_elf_relocate_section): Likewise, for
1490         `bfd_get_section_name'.
1491         * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
1492         * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1493         (ppc_elf_relocate_section): Likewise.
1494         * elf64-mmix.c (mmix_final_link_relocate): Likewise, for
1495         `bfd_get_section_vma'.
1496         * elf64-ppc.c (create_linkage_sections): Likewise, for
1497         `bfd_set_section_alignment'.
1498
1499 2012-05-16  Georg-Johann Lay  <avr@gjlay.de>
1500
1501         PR target/13503
1502         * reloc.c: Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO.
1503         * bfd-in2.h: Regenerate.
1504         * libbfd.h: Regenerate.
1505         * elf32-avr.c (elf_avr_howto_table): Rename R_AVR_8_HHI8 to
1506         R_AVR_8_HLO8.
1507         (avr_reloc_map): Likewise.
1508
1509 2012-05-16  Daniel Richard G.  <skunk@iskunk.org>
1510
1511         PR binutils/13558
1512         * bfd/aout-cris.c: Include sysdep.h before bfd.h.
1513         * bfd/aout-ns32k.c: Likewise.
1514         * bfd/aout-sparcle.c: Likewise.
1515         * bfd/aout0.c: Likewise.
1516         * bfd/bfd-in2.h: Likewise.
1517         * bfd/coff-stgo32.c: Likewise.
1518         * bfd/cpu-lm32.c: Likewise.
1519         * bfd/cpu-microblaze.c: Likewise.
1520         * bfd/cpu-score.c: Likewise.
1521         * bfd/cpu-tilegx.c: Likewise.
1522         * bfd/cpu-tilepro.c: Likewise.
1523         * bfd/elf32-lm32.c: Likewise.
1524         * bfd/elf32-microblaze.c: Likewise.
1525         * bfd/elf32-score7.c: Likewise.
1526         * bfd/elf32-tilepro.c: Likewise.
1527         * bfd/elfxx-tilegx.c: Likewise.
1528         * bfd/mach-o.h: Likewise.
1529         * bfd/nlm32-ppc.c: Likewise.
1530         * bfd/ns32knetbsd.c: Likewise.
1531         * bfd/pef.h: Likewise.
1532         * bfd/plugin.c: Likewise.
1533         * bfd/stab-syms.c: Likewise.
1534         * bfd/sunos.c: Likewise.
1535         * bfd/syms.c: Likewise.
1536         * bfd/xsym.h: Likewise.
1537
1538 2012-05-16  Alan Modra  <amodra@gmail.com>
1539
1540         * elflink.c: Rename flaginfo to flinfo throughout, except..
1541         (bfd_elf_lookup_section_flags): ..here, rename finfo to flaginfo.
1542         Formatting, style.  Simplify flag match.
1543
1544 2012-05-16  Alan Modra  <amodra@gmail.com>
1545
1546         * dwarf2.c: Formatting.
1547         (arange_add): Pass in unit rather than bfd.  Update callers.
1548         Ignore empty ranges.  Don't ask for cleared memory.
1549         (parse_comp_unit): Only set unit->base_address if processing
1550         DW_TAG_compile_unit.
1551         (find_debug_info): Optimise section lookup.
1552         (place_sections): Use bfd_alloc for stash->adjusted_sections.
1553         (find_line): Match previously parsed comp unit addresses as we
1554         do for newly parsed comp units.
1555
1556 2012-05-16  Alan Modra  <amodra@gmail.com>
1557
1558         * archive.c (_bfd_generic_read_ar_hdr_mag):  Ensure sscanf
1559         stops at end of ar_size field.
1560
1561 2012-05-16  Alan Modra  <amodra@gmail.com>
1562
1563         PR ld/13962
1564         PR ld/7023
1565         * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is
1566         out of range.  As a special case, fix sh_info for zero sh_size.
1567         Do the same for .symtab.
1568
1569 2012-05-15  James Murray <jsm@jsm-net.demon.co.uk>
1570             Stephane Carrez <stcarrez@nerim.fr>
1571
1572         * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg.
1573         * config.bfd: Likewise.
1574         * cpu-m9s12x.c: New.
1575         * cpu-m9s12xg.c: New.
1576         * elf32-m68hc12.c: Add S12X and XGATE co-processor support.
1577         Add option to offset S12 addresses into XGATE memory space.
1578         Fix carry bug in IMM16 (IMM8 low/high) relocate.
1579         * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg.
1580         (ALL_MACHINES_CFILES): Likewise.
1581         * reloc.c: Add S12X relocs.
1582         * Makefile.in: Regenerate.
1583         * bfd-in2.h: Regenerate.
1584         * libbfd.h: Regenerate.
1585
1586 2012-05-14  James Lemke  <jwlemke@codesourcery.com>
1587             Catherine Moore  <clm@codesourcery.com>
1588
1589         * bfd.c (bfd_lookup_section_flags): Add section parm.
1590         * ecoff.c (bfd_debug_section): Remove flag_info initializer.
1591         * elf-bfd.h (bfd_elf_section_data): Move in section_flag_info.
1592         (bfd_elf_lookup_section_flags): Add section parm.
1593         * elf32-ppc.c (is_ppc_vle): New function.
1594         (ppc_elf_modify_segment_map): New function.
1595         (elf_backend_modify_segment_map): Define.
1596         (has_vle_insns): New define.
1597         * elf32-ppc.h (ppc_elf_modify_segment_map): Declare.
1598         * elflink.c (bfd_elf_lookup_section_flags): Add return value & parm.
1599         Move in logic to omit / include a section.
1600         * libbfd-in.h (bfd_link_info): Add section parm.
1601         (bfd_generic_lookup_section_flags): Likewise.
1602         * reloc.c (bfd_generic_lookup_section_flags): Likewise.
1603         * section.c (bfd_section): Move out section_flag_info.
1604         (BFD_FAKE_SECTION): Remove flag_info initializer.
1605         * targets.c (_bfd_lookup_section_flags): Add section parm.
1606
1607 2012-05-14  Catherine Moore  <clm@codesourcery.com>
1608
1609         * archures.c (bfd_mach_ppc_vle): New.
1610         * bfd-in2.h: Regenerated.
1611         * cpu-powerpc.c (bfd_powerpc_archs): New entry for vle.
1612         * elf32-ppc.c (split16_format_type): New enumeration.
1613         (ppc_elf_vle_split16): New function.
1614         (HOWTO): Add entries for R_PPC_VLE relocations.
1615         (ppc_elf_reloc_type_lookup): Handle PPC_VLE relocations.
1616         (ppc_elf_section_flags): New function.
1617         (ppc_elf_lookup_section_flags): New function.
1618         (ppc_elf_section_processing): New function.
1619         (ppc_elf_check_relocs): Handle PPC_VLE relocations.
1620         (ppc_elf_relocation_section): Likewise.
1621         (elf_backend_lookup_section_flags_hook): Define.
1622         (elf_backend_section_flags): Define.
1623         (elf_backend_section_processing): Define.
1624         * elf32-ppc.h (ppc_elf_section_processing): Declare.
1625         * libbfd.h: Regenerated.
1626         * reloc.c (BFD_RELOC_PPC_VLE_REL8, BFD_RELOC_PPC_VLE_REL15,
1627         BFD_RELOC_PPC_VLE_REL24, BFD_RELOC_PPC_VLE_LO16A,
1628         BFD_RELOC_PPC_VLE_LO16D, BFD_RELOC_PPC_VLE_HI16A,
1629         BFD_RELOC_PPC_VLE_HI16D, BFD_RELOC_PPC_VLE_HA16A,
1630         BFD_RELOC_PPC_VLE_HA16D, BFD_RELOC_PPC_VLE_SDA21,
1631         BFD_RELOC_PPC_VLE_SDA21_LO, BFD_RELOC_PPC_VLE_SDAREL_LO16A,
1632         BFD_RELOC_PPC_VLE_SDAREL_LO16D, BFD_RELOC_PPC_VLE_SDAREL_HI16A,
1633         BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A,
1634         BFD_RELOC_PPC_VLE_SDAREL_HA16D): New bfd relocations.
1635
1636 2012-05-11  Georg-Johann Lay  <avr@gjlay.de>
1637
1638         PR target/13503
1639         * reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
1640         BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
1641         * bfd-in2.h: Regenerate.
1642         * libbfd.h: Regenerate.
1643         * elf32-avr.c (elf_avr_howto_table): Add entries for
1644         R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
1645         (avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
1646         R_AVR_8_HHI8.
1647
1648 2012-05-10  H.J. Lu  <hongjiu.lu@intel.com>
1649
1650         * elf64-x86-64.c (elf_x86_64_relocate_section): Use int in x32
1651         addend overflow check.
1652
1653 2012-05-10  DJ Delorie  <dj@redhat.com>
1654
1655         * elf32-rx.c (rx_elf_object_p): Ignore empty segments.
1656
1657 2012-05-10  H.J. Lu  <hongjiu.lu@intel.com>
1658
1659         * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed
1660         hex number in x32 addend overflow check.
1661
1662 2012-05-10  H.J. Lu  <hongjiu.lu@intel.com>
1663
1664         * elf64-x86-64.c (elf_x86_64_reloc_type_class): Handle
1665         R_X86_64_RELATIVE64.
1666
1667 2012-05-09  H.J. Lu  <hongjiu.lu@intel.com>
1668
1669         * elf64-x86-64.c (elf_x86_64_relocate_section): Check addend
1670         overflow for R_X86_64_RELATIVE64.
1671
1672 2012-05-08  Ben Cheng  <bccheng@google.com>
1673
1674         * elf.c: Preserve the original p_align and p_flags if they are
1675         valid.
1676
1677 2012-05-07  Alan Modra  <amodra@gmail.com>
1678
1679         * elf64-ia64-vms.c (elf64_ia64_relocate_section): Update
1680         RELOC_AGAINST_DISCARDED_SECTION invocation.
1681
1682 2012-05-07  Hans-Peter Nilsson  <hp@axis.com>
1683
1684         * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Declare and use
1685         local variable i_ instead of assuming and using a variable i.
1686
1687 2012-05-07  Maciej W. Rozycki  <macro@linux-mips.org>
1688
1689         * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compound
1690         relocations.
1691         * elfxx-mips.c (mips_reloc_against_discarded_section): New
1692         function.
1693         (_bfd_mips_elf_relocate_section): Call it, in place of
1694         RELOC_AGAINST_DISCARDED_SECTION.
1695         * elf-m10200.c (mn10200_elf_relocate_section): Update arguments
1696         to RELOC_AGAINST_DISCARDED_SECTION.
1697         * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1698         * elf32-arm.c (elf32_arm_relocate_section): Likewise.
1699         * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1700         * elf32-bfin.c (bfin_relocate_section): Likewise.
1701         (bfinfdpic_relocate_section): Likewise.
1702         * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
1703         * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
1704         * elf32-cris.c (cris_elf_relocate_section): Likewise.
1705         * elf32-crx.c (elf32_crx_relocate_section): Likewise.
1706         * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
1707         * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
1708         * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1709         * elf32-frv.c (elf32_frv_relocate_section): Likewise.
1710         * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1711         * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1712         * elf32-i370.c (i370_elf_relocate_section): Likewise.
1713         * elf32-i386.c (elf_i386_relocate_section): Likewise.
1714         * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1715         * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1716         * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1717         * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
1718         * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
1719         * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1720         * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
1721         * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1722         * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1723         * elf32-mep.c (mep_elf_relocate_section): Likewise.
1724         * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
1725         * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
1726         * elf32-mt.c (mt_elf_relocate_section): Likewise.
1727         * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1728         * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1729         * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
1730         * elf32-rx.c (rx_elf_relocate_section): Likewise.
1731         * elf32-s390.c (elf_s390_relocate_section): Likewise.
1732         * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
1733         * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
1734         * elf32-sh.c (sh_elf_relocate_section): Likewise.
1735         * elf32-spu.c (spu_elf_relocate_section): Likewise.
1736         * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
1737         * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
1738         * elf32-v850.c (v850_elf_relocate_section): Likewise.
1739         * elf32-vax.c (elf_vax_relocate_section): Likewise.
1740         * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
1741         * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1742         * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1743         * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
1744         (elf64_alpha_relocate_section): Likewise.
1745         * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1746         * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
1747         * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1748         * elf64-s390.c (elf_s390_relocate_section): Likewise.
1749         * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1750         * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1751         * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
1752         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
1753         * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
1754
1755 2012-05-05  Alan Modra  <amodra@gmail.com>
1756
1757         PR ld/14052
1758         PR ld/13621
1759         * linker.c (_bfd_nearby_section): Revert 2012-02-13 change.
1760
1761 2012-05-05  Alan Modra  <amodra@gmail.com>
1762
1763         * aout-arm.c: Replace all uses of bfd_abs_section, bfd_com_section,
1764         bfd_und_section and bfd_ind_section with their _ptr variants, or
1765         use corresponding bfd_is_* macros.
1766         * aout-ns32k.c: Likewise.
1767         * aout-tic30.c: Likewise.
1768         * coff-arm.c: Likewise.
1769         * coff-tic54x.c: Likewise.
1770         * cpu-ns32k.c: Likewise.
1771         * elf-attrs.c: Likewise.
1772         * elfcode.h: Likewise.
1773         * peicode.h: Likewise.
1774         * reloc.c: Likewise.
1775         * riscix.c: Likewise.
1776         * versados.c: Likewise.
1777         * section.c: Likewise.
1778         (bfd_abs_section, bfd_ind_section, bfd_com_section,
1779         bfd_ind_section): Delete.
1780         (std_section): New array replacing above.
1781         (bfd_abs_section_ptr, bfd_ind_section_ptr, bfd_com_section_ptr,
1782         bfd_ind_section_ptr, STD_SECTION): Update.
1783         (BFD_FAKE_SECTION, GLOBAL_SYM_INIT): Remove unnecessary casts.
1784         * bfd-in2.h: Regenerate.
1785
1786 2012-05-03  Sean Keys  <skeys@ipdatasys.com>
1787
1788         * cpu-xgate.c: New file. Added XGATE support.
1789         * archures.c (bfd_architecture): Add XGATE architecture.
1790         (bfd_archures_list): Add reference to XGATE architecture info.
1791         * elf-bfd.h (prep_headers): Handle bfd_arch_xgate.
1792         * reloc.c: Add various XGATE relocation enums.
1793         * targets.c (bfd_elf32_xgate_vec): Declare and add to target vector
1794         list.
1795         * Makefile.am: Add support for XGATE elf.
1796         * configure.in: Ditto.
1797         * config.bfd: Ditto.
1798         * Makefile.in: Regenerate.
1799         * configure: Ditto.
1800         * bfd-in2.h: Ditto.
1801         * libbfd.h: Ditto.
1802         Added files for XGATE relocations.
1803         * elf32-xgate.c: Created minimal relocation file.
1804         * elf32-xgate.h: Created minimal header file for elf32-xgate.
1805
1806 2012-05-03  Tristan Gingold  <gingold@adacore.com>
1807
1808         * dwarf2.c (decode_line_info): Ignore
1809         DW_LNE_HP_source_file_correlation.
1810
1811 2012-05-01  Nick Clifton  <nickc@redhat.com>
1812
1813         PR binutils/13121
1814         * aoutx.h: Rename 'finfo' to 'flaginfo' to avoid conflicts with
1815         AIX system headers.
1816         * coff-ppc.c: Likewise.
1817         * cofflink.c: Likewise.
1818         * elf32-arm.c: Likewise.
1819         * elf64-sparc.c: Likewise.
1820         * elflink.c: Likewise.
1821         * pdp11.c: Likewise.
1822         * rescoff.c: Likewise.
1823
1824 2012-04-26  Mark Wielaard  <mjw@redhat.com>
1825
1826         * dwarf2.c (scan_unit_for_symbols): Account for DW_AT_high_pc
1827         possibly being relative to DW_AT_low_pc.
1828         (parse_comp_unit): Likewise.
1829
1830 2012-04-26  Andreas Schwab  <schwab@linux-m68k.org>
1831
1832         * elf32-m68k.c (elf_m68k_check_relocs): Mark non-GOT references
1833         also when generating PIE.
1834         (elf_m68k_discard_copies): Mark undefined weak symbols referenced
1835         by relocations as dynamic.
1836
1837 2012-04-26  Hans-Peter Nilsson  <hp@axis.com>
1838
1839         Provide a way for programs to recognize BFD_ASSERT calls.
1840         * bfd.c (bfd_assert_handler_type): New API type.
1841         (bfd_set_assert_handler, bfd_get_assert_handler): New API functions.
1842         (_bfd_assert_handler): New variable.
1843         (_bfd_default_assert_handler): New function.
1844         (bfd_assert): Call _bfd_assert_handler, not _bfd_error_handler.
1845         * libbfd-in.h (_bfd_assert_handler): Declare.
1846         * libbfd.h, bfd-in2.h: Regenerate.
1847
1848 2012-04-24  Hans-Peter Nilsson  <hp@axis.com>
1849
1850         PR ld/13990
1851         * elf32-arm.c (elf32_arm_gc_sweep_hook): Handle a forced-local
1852         symbol, where PLT refcount is set to -1.
1853
1854 2012-04-24  Alan Modra  <amodra@gmail.com>
1855
1856         PR ld/13991
1857         * elf-bfd.h (_bfd_elf_link_just_syms): Define as
1858         _bfd_generic_link_just_syms.
1859         * elflink.c (_bfd_elf_link_just_syms): Delete.
1860         * linker.c (_bfd_generic_link_just_syms): Set sec_info_type.
1861
1862         * bfd-in.h (discarded_section): Renamed from elf_discarded_section.
1863         * section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS,
1864         SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME,
1865         SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE.
1866         * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
1867         * elf.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
1868         * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c,
1869         * elf32-crx.c, * elf32-d10v.c, * elf32-epiphany.c,
1870         * elf32-fr30.c, * elf32-frv.c, * elf32-h8300.c,
1871         * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c,
1872         * elf32-i860.c, * elf32-ip2k.c, * elf32-iq2000.c,
1873         * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c,
1874         * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
1875         * elf32-mep.c, * elf32-moxie.c, * elf32-msp430.c,
1876         * elf32-mt.c, * elf32-openrisc.c, * elf32-ppc.c,
1877         * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c,
1878         * elf32-score.c, * elf32-score7.c, * elf32-sh.c,
1879         * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c,
1880         * elf32-v850.c, * elf32-vax.c, * elf32-xc16x.c,
1881         * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
1882         * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
1883         * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c,
1884         * elf64-x86-64.c, * elflink.c, * elfnn-ia64.c,
1885         * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c,
1886         * reloc.c: Update all references.
1887         * bfd-in2.h: Regenerate.
1888
1889 2012-04-20  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
1890
1891         * elf32-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
1892         * elf64-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
1893
1894 2012-04-19  Thomas Schwinge  <thomas@codesourcery.com>
1895
1896         * elf32-sh.c (elf_sh_link_hash_entry): Specify an enum identifier for
1897         got_type.
1898         (allocate_dynrelocs, sh_elf_relocate_section, sh_elf_check_relocs): Use
1899         it.
1900
1901 2012-04-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1902
1903         * elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic
1904         relocations when LE conversion happens on the IE tls symbol.
1905
1906 2012-04-17  Roland McGrath  <mcgrathr@google.com>
1907
1908         * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding
1909         so that 32-byte boundary is a proper instruction boundary.
1910
1911 2012-04-17  Tristan Gingold  <gingold@adacore.com>
1912
1913         * vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to
1914         member of an object archive.<
1915
1916 2012-04-17  Tristan Gingold  <gingold@adacore.com>
1917
1918         * vms-lib.c (MAX_EKEYLEN): Define.
1919         (MAX_KEYLEN): Fix value.
1920         (vms_write_index): Add comments and fix indentation.
1921         Adjust comparaison.  Add assertions.  Free kbn_blk.
1922         (_bfd_vms_lib_write_archive_contents): Use MAX_EKEYLEN.
1923         Compense MAX_KEYLEN adjustment.
1924
1925 2012-04-16  Maciej W. Rozycki  <macro@linux-mips.org>
1926
1927         * elfxx-mips.c (mips16_stub_symndx): Handle n64 compound relocs.
1928         (_bfd_mips_elf_check_relocs): Update accordingly.
1929
1930 2012-04-13  Alan Modra  <amodra@gmail.com>
1931
1932         PR ld/13947
1933         * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for
1934         reloc sections.
1935
1936 2012-04-12  David S. Miller  <davem@davemloft.net>
1937
1938         * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32,
1939         BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs.
1940         * libbfd.h: Regenerate.
1941         * bfd-in2.h: Likewise.
1942         * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function.
1943         (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34,
1944         R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10.
1945         (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs.
1946         (_bfd_sparc_elf_check_relocs): Likewise.
1947         (_bfd_sparc_elf_gc_sweep_hook): Likewise.
1948         (_bfd_sparc_elf_relocate_section): Likewise.
1949
1950 2012-04-12  Roland McGrath  <mcgrathr@google.com>
1951
1952         * elf32-arm.c (elf32_arm_nacl_plt0_entry, elf32_arm_nacl_plt_entry):
1953         New variables.
1954         (struct elf32_arm_link_hash_table): New member `nacl_p'.
1955         (elf32_arm_link_hash_table_create): Initialize it.
1956         (elf32_arm_nacl_link_hash_table_create): New function.
1957         (arm_movw_immediate, arm_movt_immediate): New functions.
1958         (elf32_arm_populate_plt_entry): Test HTAB->nacl_p.
1959         (elf32_arm_finish_dynamic_sections): Likewise.
1960         (elf32_arm_output_plt_map_1): Likewise.
1961         (bfd_elf32_littlearm_nacl_vec, bfd_elf32_bigarm_nacl_vec):
1962         New backend vector stanza.
1963         (elf32_arm_nacl_modify_segment_map): New function.
1964         * config.bfd: Handle arm-*-nacl*, armeb-*-nacl*.
1965         * targets.c: Support bfd_elf32_{big,little}_nacl_vec.
1966         * configure.in: Likewise.
1967         (bfd_elf32_bigarm_nacl_vec): Add elf-nacl.lo here.
1968         (bfd_elf32_littlearm_nacl_vec): Likewise.
1969         (bfd_elf32_bigarm_vec, bfd_elf32_littlearm_vec): Likewise.
1970         (bfd_elf32_bigarm_symbian_vec): Likewise.
1971         (bfd_elf32_littlearm_symbian_vec): Likewise.
1972         (bfd_elf32_bigarm_vxworks_vec): Likewise.
1973         (bfd_elf32_littlearm_vxworks_vec): Likewise.
1974         * configure: Regenerated.
1975
1976 2012-04-12  Tristan Gingold  <gingold@adacore.com>
1977
1978         * elflink.c (elf_link_output_extsym): Add a guard.
1979         (bfd_elf_final_link): Remove assertion.
1980         (bfd_elf_final_link): Add a guard.
1981         * elfnn-ia64.c (INCLUDE_IA64_VMS): Removed.
1982         (elfNN_vms_section_from_shdr, elfNN_vms_object_p)
1983         (elfNN_vms_post_process_headers, elfNN_vms_section_processing)
1984         (elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup):
1985         Remove.
1986         (elfNN-ia64-vms target): Move to ...
1987         * elf64-ia64-vms.c: New file.
1988         * configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo
1989         * Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo.
1990         (BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c.
1991         * configure: Regenerate.
1992         * Makefile.in: Regenerate.
1993
1994 2012-04-11  Nick Clifton  <nickc@redhat.com>
1995
1996         PR binutils/13897
1997         * elf64-ppc.c (opd_entry_value): When dealing with sections
1998         without relocs, keep the last section loaded in order to avoid
1999         unnecessary reloads.
2000
2001 2012-04-09  Roland McGrath  <mcgrathr@google.com>
2002
2003         * elf.c (_bfd_elf_map_sections_to_segments): Set INFO->user_phdrs.
2004         * elf-nacl.c (nacl_modify_segment_map): Do nothing if INFO->user_phdrs.
2005         (nacl_modify_program_headers): Likewise.
2006
2007 2012-04-03  Roland McGrath  <mcgrathr@google.com>
2008
2009         * elf-nacl.c: New file.
2010         * elf-nacl.h: New file.
2011         * elf32-i386.c (elf_backend_modify_segment_map): Define for
2012         bfd_elf32_i386_nacl_vec.
2013         (elf_backend_modify_program_headers): Likewise.
2014         * elf64-x86-64.c (elf_backend_modify_segment_map): Define for
2015         bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec.
2016         (elf_backend_modify_program_headers): Likewise.
2017         * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here.
2018         (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here.
2019         * Makefile.in: Regenerated.
2020         * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here.
2021         (bfd_elf32_x86_64_nacl_vec): Likewise.
2022         (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise.
2023         (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise.
2024         (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise.
2025         (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise.
2026         (bfd_elf32_i386_nacl_vec): Likewise.
2027         (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise.
2028         (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise.
2029         * configure: Regenerated.
2030
2031 2012-03-31  Andreas Schwab  <schwab@linux-m68k.org>
2032
2033         * elf32-m68k.c (elf_m68k_relocate_section): Allow
2034         R_68K_TLS_LE{8,16,32} for PIE.
2035
2036 2012-03-30  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2037
2038         * elf64-s390.c: Fix several comments regarding PLT entry
2039         description.
2040         * elf32-s390.c: Likewise.
2041
2042 2012-03-30  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2043
2044         * elf64-s390.c: Use the section pointer shortcuts in
2045         elf_link_hash_table and remove them from the target specific
2046         variant.
2047         * elf32-s390.c: Likewise.
2048
2049 2012-03-30  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2050
2051         * elf64-s390.c (elf_s390x_plt_entry, elf_s390x_first_plt_entry):
2052         New definitions.
2053         (PLT_PIC_ENTRY_WORD*, PLT_PIC12_ENTRY_WORD*): Remove.
2054         (elf_s390_finish_dynamic_symbol): Use memcpy instead of bfd_put_32.
2055         (elf_s390_finish_dynamic_sections): Likewise.
2056         * elf32-s390.c (elf_s390_plt_entry, elf_s390_plt_pic_entry)
2057         (elf_s390_plt_pic12_entry, elf_s390_plt_pic16_entry)
2058         (elf_s390_plt_first_entry, elf_s390_plt_pic_first_entry): New definitions.
2059         (PLT_PIC16_ENTRY_WORD*, PLT_ENTRY_WORD*)
2060         (PLT_PIC_FIRST_ENTRY_WORD*, PLT_FIRST_ENTRY_WORD*): Remove.
2061
2062 2012-03-30  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2063
2064         * elf32-s390.c (struct elf_s390_dyn_relocs): Remove.
2065         Rename all occurrences in the file to elf_dyn_relocs.
2066         * elf64-s390.c: Likewise.
2067
2068 2012-03-30  Alan Modra  <amodra@gmail.com>
2069
2070         * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic
2071         libraries.
2072
2073 2012-03-29  Alan Modra  <amodra@gmail.com>
2074
2075         * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete.
2076         * bfd-in2.h: Regenerate.
2077
2078 2012-03-23  Alan Modra  <amodra@gmail.com>
2079
2080         * elf.c (assign_file_positions_for_non_load_sections): Don't warn
2081         on empty alloc sections.
2082
2083 2012-03-23  Alan Modra  <amodra@gmail.com>
2084
2085         * linker.c (_bfd_nearby_section): New function, split out from..
2086         (fix_syms): ..here.
2087         * bfd-in.h (_bfd_nearby_section): Declare.
2088         * bfd-in2.h: Regenerate.
2089         * elflink.c (elf_link_input_bfd): Don't use text_index_section or
2090         data_index_section with ld -q or ld -r output relocs against
2091         stripped output sections.  Instead use _bfd_nearby_section.
2092
2093 2012-03-23  Alan Modra  <amodra@gmail.com>
2094
2095         PR binutils/13894
2096         * elf64-ppc.c (opd_entry_value): Read full symbol table when
2097         sym hashes unavailable.
2098
2099 2012-03-21  Eliot Dresselhaus  <eliot@sonic.net>
2100
2101         * elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE
2102         for non-C6X objects.
2103
2104 2012-03-20  Kai Tietz  <ktietz@redhat.com>
2105
2106         PR ld/12742
2107         * configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h.
2108         * plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined.
2109         Add windows.h header include if HAVE_WINDOWS_H is defined.
2110         (dlerror): New static function if windows variant is used instead
2111         of dlfcn.h.
2112         (dlclose): Likewise.
2113         (dlopen): Likewise.
2114         (dlsym): Likewise.
2115         * configure: Regenerated.
2116         * config.in: Regenerated.
2117
2118 2012-03-20  H.J. Lu  <hongjiu.lu@intel.com>
2119
2120         PR ld/13880
2121         * elf32-i386.c (elf_i386_relocate_section): Don't issue an error
2122         for R_386_GOTOFF relocation against protected function if
2123         SYMBOLIC_BIND is true.
2124
2125         * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an
2126         error for R_X86_64_GOTOFF64 relocation against protected function
2127         when building executable or SYMBOLIC_BIND is true.
2128
2129 2012-03-16  Roland McGrath  <mcgrathr@google.com>
2130
2131         * config.bfd: Handle x86_64-*-nacl*.
2132         * elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza.
2133         (bfd_elf32_x86_64_nacl_vec): Likewise.
2134         * targets.c: Support them.
2135         * configure.in: Likewise.
2136         * configure: Regenerated.
2137
2138 2012-03-16  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
2139
2140         * elf32-arm.c (elf32_arm_attributes_accept_div): New function.
2141         (elf32_arm_attributes_forbid_div): Likewise.
2142         (elf32_arm_merge_eabi_attributes): Correct handling of
2143         Tag_DIV_use.
2144
2145 2012-03-15  Roland McGrath  <mcgrathr@google.com>
2146
2147         * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use
2148         elf_x86_64_backend_data parameters for plt_eh_frame.
2149
2150         * elf64-x86-64.c (struct elf_x86_64_backend_data): New type.
2151         (get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros.
2152         (elf_x86_64_arch_bed): New variable.
2153         (elf_backend_arch_data): New macro.
2154         (elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE.
2155         (elf_x86_64_allocate_dynrelocs): Likewise.
2156         (elf_x86_64_relocate_section): Likewise.
2157         (elf_x86_64_plt_sym_val): Likewise.
2158         (elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data
2159         parameters for PLT details.
2160         (elf_x86_64_finish_dynamic_sections): Likewise.
2161
2162 2012-03-14  Roland McGrath  <mcgrathr@google.com>
2163
2164         * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up
2165         to the full size, padding out with nop instructions.
2166
2167 2012-03-12  Alan Modra  <amodra@gmail.com>
2168
2169         * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't warn
2170         on zero size dynbss symbol.
2171         * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
2172         * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
2173         * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
2174         * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
2175         * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
2176         * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
2177         * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
2178         * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
2179         * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
2180         * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
2181         * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
2182         * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
2183         * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
2184         * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise.
2185         * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
2186         * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
2187         * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
2188         * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
2189         * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
2190         * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
2191         * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise.
2192
2193 2012-03-10  Edmar Wienskoski  <edmar@freescale.com>
2194
2195         * archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
2196         * bfd-in2.h: Regenerate.
2197         * cpu-powerpc.c (bfd_powerpc_archs): Add entries for
2198         bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
2199
2200 2012-03-09  H.J. Lu  <hongjiu.lu@intel.com>
2201
2202         PR ld/13817
2203         * elf32-i386.c (elf_i386_relocate_section): Restore
2204         R_386_IRELATIVE.
2205
2206         * elf64-x86-64.c (elf_x86_64_relocate_section): Restore
2207         R_X86_64_IRELATIVE.
2208
2209 2012-03-08  Tristan Gingold  <gingold@adacore.com>
2210
2211         * vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum
2212         keylen according to archive kind.  Set nextvbn and nextrfa lhd
2213         fields.  Add comments.
2214
2215 2012-03-07  Nick Clifton  <nickc@redhat.com>
2216
2217         * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type
2218         field.
2219         (elf32_mn10300_link_hash_table): Add tls_ldm_got entry;
2220         (elf_mn10300_tdata): Define.
2221         (elf_mn10300_local_got_tls_type): Define.
2222         (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD,
2223         R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
2224         R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
2225         R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs.
2226         (mn10300_reloc_map): Likewise.
2227         (elf_mn10300_tls_transition): New function.
2228         (dtpoff, tpoff, mn10300_do_tls_transition): New functions.
2229         (mn10300_elf_check_relocs): Add TLS support.
2230         (mn10300_elf_final_link_relocate): Likewise.
2231         (mn10300_elf_relocate_section): Likewise.
2232         (mn10300_elf_relax_section): Likewise.
2233         (elf32_mn10300_link_hash_newfunc): Initialise new field.
2234         (_bfd_mn10300_copy_indirect_symbol): New function.
2235         (elf32_mn10300_link_hash_table_create): Initialise new fields.
2236         (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support.
2237         (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
2238         (_bfd_mn10300_elf_reloc_type_class): Allocate an
2239         elf_mn10300_obj_tdata structure.
2240         (elf_backend_copy_indirect_symbol): Define.
2241         * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD,
2242         BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE,
2243         BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD,
2244         BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations.
2245         (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to
2246         alongside other MN10300 relocations.
2247         * bfd-in2.h: Regenerate.
2248         * libbfd.h: Regenerate.
2249
2250 2012-03-06  Jakub Jelinek  <jakub@redhat.com>
2251
2252         * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE
2253         set relocate to TRUE.
2254
2255 2012-03-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2256
2257         PR ld/12152
2258         * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore
2259         overflows for R_SPARC_UA32 in .stab sections.
2260
2261 2012-03-01  Alan Modra  <amodra@gmail.com>
2262
2263         * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning.
2264
2265 2012-02-27  Alan Modra  <amodra@gmail.com>
2266
2267         * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd
2268         before calling elf specific function.
2269         (sh_elf_osec_readonly_p): Test for error return from above.
2270
2271 2012-02-27  Alan Modra  <amodra@gmail.com>
2272
2273         * elf32-spu.c (build_stub): Fix malloc under-allocation.
2274
2275 2012-02-25  Walter Lee  <walt@tilera.com>
2276         * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL,
2277         BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
2278         BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
2279         BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
2280         BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
2281         BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
2282         BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
2283         BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
2284         BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
2285         BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
2286         BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
2287         BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
2288         BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
2289         BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
2290         BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
2291         BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
2292         BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
2293         BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
2294         BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
2295         BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
2296         BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
2297         BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
2298         BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD,
2299         BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
2300         BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
2301         BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD.
2302         Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT,
2303         BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT,
2304         BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT,
2305         BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT,
2306         BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT,
2307         BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT,
2308         BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT,
2309         BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT,
2310         BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD,
2311         BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD,
2312         BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD,
2313         BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD,
2314         BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD,
2315         BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD,
2316         BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD,
2317         BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD,
2318         BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE,
2319         BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE,
2320         BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE,
2321         BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE,
2322         BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE,
2323         BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE,
2324         BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE,
2325         BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE.
2326         * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro
2327         relocations.
2328         (tilepro_reloc_map): Ditto.
2329         (tilepro_info_to_howto_rela): Ditto.
2330         (reloc_to_create_func): Ditto.
2331         (tilepro_tls_translate_to_le): New.
2332         (tilepro_tls_translate_to_ie): New.
2333         (tilepro_elf_tls_transition): New.
2334         (tilepro_elf_check_relocs): Handle new tls relocations.
2335         (tilepro_elf_gc_sweep_hook): Ditto.
2336         (allocate_dynrelocs): Ditto.
2337         (tilepro_elf_relocate_section): Ditto.
2338         (tilepro_replace_insn): New.
2339         (insn_mask_X1): New.
2340         (insn_mask_X0_no_dest_no_srca): New
2341         (insn_mask_X1_no_dest_no_srca): New
2342         (insn_mask_Y0_no_dest_no_srca): New
2343         (insn_mask_Y1_no_dest_no_srca): New
2344         (srca_mask_X0): New
2345         (srca_mask_X1): New
2346         (insn_tls_le_move_X1): New
2347         (insn_tls_le_move_zero_X0X1): New
2348         (insn_tls_ie_lw_X1): New
2349         (insn_tls_ie_add_X0X1): New
2350         (insn_tls_ie_add_Y0Y1): New
2351         (insn_tls_gd_add_X0X1): New
2352         (insn_tls_gd_add_Y0Y1): New
2353         * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx
2354         relocations.
2355         (tilegx_reloc_map): Ditto.
2356         (tilegx_info_to_howto_rela): Ditto.
2357         (reloc_to_create_func): Ditto.
2358         (tilegx_elf_link_hash_table): New field disable_le_transition.
2359         (tilegx_tls_translate_to_le): New.
2360         (tilegx_tls_translate_to_ie): New.
2361         (tilegx_elf_tls_transition): New.
2362         (tilegx_elf_check_relocs): Handle new tls relocations.
2363         (tilegx_elf_gc_sweep_hook): Ditto.
2364         (allocate_dynrelocs): Ditto.
2365         (tilegx_elf_relocate_section): Ditto.
2366         (tilegx_copy_bits): New.
2367         (tilegx_replace_insn): New.
2368         (insn_mask_X1): New.
2369         (insn_mask_X0_no_dest_no_srca): New.
2370         (insn_mask_X1_no_dest_no_srca): New.
2371         (insn_mask_Y0_no_dest_no_srca): New.
2372         (insn_mask_Y1_no_dest_no_srca): New.
2373         (insn_mask_X0_no_operand): New.
2374         (insn_mask_X1_no_operand): New.
2375         (insn_mask_Y0_no_operand): New.
2376         (insn_mask_Y1_no_operand): New.
2377         (insn_tls_ie_ld_X1): New.
2378         (insn_tls_ie_ld4s_X1): New.
2379         (insn_tls_ie_add_X0X1): New.
2380         (insn_tls_ie_add_Y0Y1): New.
2381         (insn_tls_ie_addx_X0X1): New.
2382         (insn_tls_ie_addx_Y0Y1): New.
2383         (insn_tls_gd_add_X0X1): New.
2384         (insn_tls_gd_add_Y0Y1): New.
2385         (insn_move_X0X1): New.
2386         (insn_move_Y0Y1): New.
2387         (insn_add_X0X1): New.
2388         (insn_add_Y0Y1): New.
2389         (insn_addx_X0X1): New.
2390         (insn_addx_Y0Y1): New.
2391         * libbfd.h: Regenerate.
2392         * bfd-in2.h: Regenerate.
2393
2394 2012-02-25  Walter Lee  <walt@tilera.com>
2395
2396         * config.bfd (tilegx-*-*): rename little endian vector; add big
2397         endian vector.
2398         (tilegxbe-*-*): New case.
2399         * configure.in (bfd_elf32_tilegx_vec): Rename...
2400         (bfd_elf32_tilegx_le_vec): ... to this.
2401         (bfd_elf32_tilegx_be_vec): New vector.
2402         (bfd_elf64_tilegx_vec): Rename...
2403         (bfd_elf64_tilegx_le_vec): ... to this.
2404         (bfd_elf64_tilegx_be_vec): New vector.
2405         * configure: Regenerate.
2406         * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename.
2407         (TARGET_LITTLE_NAME): Ditto.
2408         (TARGET_BIG_SYM): Define.
2409         (TARGET_BIG_NAME): Define.
2410         * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename.
2411         (TARGET_LITTLE_NAME): Ditto.
2412         (TARGET_BIG_SYM): Define.
2413         (TARGET_BIG_NAME): Define.
2414         * targets.c (bfd_elf32_tilegx_vec): Rename...
2415         (bfd_elf32_tilegx_le_vec): ... to this.
2416         (bfd_elf32_tilegx_be_vec): Declare.
2417         (bfd_elf64_tilegx_vec): Rename...
2418         (bfd_elf64_tilegx_le_vec): ... to this.
2419         (bfd_elf64_tilegx_be_vec): Declare.
2420         (_bfd_target_vector): Add / rename above vectors.
2421         * arctures.c (bfd_architecture): Define bfd_mach_tilegx32.
2422         * bfd-in2.h: Regenerate.
2423         * cpu-tilegx.c (bfd_tilegx32_arch): define.
2424         (bfd_tilegx_arch): link to bfd_tilegx32_arch.
2425
2426 2012-02-24  Nick Clifton  <nickc@redhat.com>
2427
2428         PR ld/13730
2429         * reloc.c (bfd_generic_get_relocated_section_contents): Issue an
2430         error message instead of aborting, when an outofrange reloc is
2431         encountered.
2432
2433 2012-02-23  Iain Sandoe  <idsandoe@googlemail.com>
2434
2435         * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New.
2436         (bfd_mach_o_canonicalize_one_reloc):  Swap non-scattered reloc
2437         bit-fields when target and host differ in endian-ness.  When
2438         PAIRs are non-scattered find the 'symbol' from the preceding
2439         reloc.  Add FIXME re. reloc symbols on section boundaries.
2440         (bfd_mach_o_swap_out_non_scattered_reloc): New.
2441         (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc.
2442
2443 2012-02-17  Iain Sandoe  <idsandoe@googlemail.com>
2444
2445         * mach-o-i386.c (i386_howto_table): Add support for 16 bit
2446         sect-diffs.
2447         (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs.
2448         (bfd_mach_o_i386_swap_reloc_out): Likewise.
2449
2450 2012-02-17  Tristan Gingold  <gingold@adacore.com>
2451
2452         * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF):
2453         * libbfd.h: Regenerated.
2454         * bfd-in2.h: Likewise.
2455         * mach-o-i386.c (i386_howto_table): Include local sectdiff.
2456         (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff.
2457         (bfd_mach_o_i386_swap_reloc_out): Likewise.
2458
2459 2012-02-17  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
2460
2461         * elf32-s390.c (elf_s390_relocate_section): Support basr in the
2462         GD->LE and LD->LE optimizations.
2463
2464 2012-02-16  Alan Modra  <amodra@gmail.com>
2465
2466         PR binutils/13355
2467         * elf32-rx.c (elf32_rx_relax_section): Correct width check.
2468
2469 2012-02-13  Richard Henderson  <rth@redhat.com>
2470
2471         PR ld/13621
2472         * linker.c (fix_syms): Force symbols outside any section into
2473         bfd_abs_section_ptr.
2474
2475 2012-02-13  Alan Modra  <amodra@gmail.com>
2476
2477         * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function.
2478         * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare.
2479         * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define.
2480         * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define.
2481
2482 2012-02-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
2483             Nick Clifton  <nickc@redhat.com>
2484
2485         * oasys.c (oasys_write_header): Fix compilation warning on zero-sized
2486         memset.
2487
2488 2012-02-10  Iain Sandoe  <idsandoe@googlemail.com>
2489
2490         * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section
2491         vma additions in their logical, rather than physical order.
2492
2493 2012-02-10  Iain Sandoe  <idsandoe@googlemail.com>
2494
2495         * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section
2496         parameters.
2497         * mach-o-x86-64.c (text_section_names_xlat): New.
2498         (mach_o_x86_64_segsec_names_xlat): New.
2499         (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat.
2500         * mach-o-i386.c (text_section_names_xlat): Correct section parameters.
2501
2502 2012-02-10  Tristan Gingold  <gingold@adacore.com>
2503
2504         * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator
2505         to avoid infinite loop.  Add comments.
2506
2507 2012-02-09  H.J. Lu  <hongjiu.lu@intel.com>
2508
2509         PR ld/13675
2510         * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte
2511         nop instructions.
2512         (bfd_arch_i386_short_nop_fill): New.
2513         (bfd_arch_i386_long_nop_fill): Likewise.
2514         Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info
2515         initializers.  Use bfd_arch_i386_long_nop_fill on 64bit
2516         bfd_arch_info initializers.
2517
2518         * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ...
2519         (bfd_arch_i386_short_nop_fill): This.
2520         Update bfd_arch_info initializers.
2521         * cpu-l1om.c: Likewise.
2522
2523 2012-02-08  Alan Modra  <amodra@gmail.com>
2524
2525         * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too.
2526         (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear
2527         the correct h->u.weakdef.
2528
2529 2012-02-07  Alan Modra  <amodra@gmail.com>
2530
2531         * elf.c (elf_find_function): Don't use internal_elf_sym.
2532         (_bfd_elf_maybe_function_sym): Likewise.  Replace elf_symbol_type
2533         parameter with asymbol.
2534         * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
2535         * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype.
2536         (struct elf_backend_data <maybe_function_sym>): Likewise.
2537
2538 2012-02-02  Vidya Praveen (vidya.praveen@atmel.com)
2539
2540         PR bfd/13410
2541         * elf32-avr.c (elf32_avr_relax_section): Correct the
2542         condition that qualifies the candidates for relaxation.
2543
2544 2012-02-02  Tristan Gingold  <gingold@adacore.com>
2545
2546         * bfdio.c (real_fopen): Remove unused vms_modes variable.
2547
2548 2012-02-02  Tristan Gingold  <gingold@adacore.com>
2549
2550         * mach-o.c (bfd_mach_o_read_header): Silent uninitialized
2551         variable warning.
2552
2553 2012-02-02  Tristan Gingold  <gingold@adacore.com>
2554
2555         * archive.c (bfd_slurp_armap): Fix thinko in cast.
2556
2557 2012-01-31  H.J. Lu  <hongjiu.lu@intel.com>
2558
2559         PR ld/13616
2560         * archures.c (bfd_arch_info): Add fill.
2561         (bfd_default_arch_struct): Add bfd_arch_default_fill.
2562         (bfd_arch_default_fill): New.
2563
2564         * configure.in: Set bfd version to 2.22.52.
2565         * configure: Regenerated.
2566
2567         * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info
2568         initializer.
2569         * cpu-arc.c: Likewise.
2570         * cpu-arm.c: Likewise.
2571         * cpu-avr.c: Likewise.
2572         * cpu-bfin.c: Likewise.
2573         * cpu-cr16.c: Likewise.
2574         * cpu-cr16c.c: Likewise.
2575         * cpu-cris.c: Likewise.
2576         * cpu-crx.c: Likewise.
2577         * cpu-d10v.c: Likewise.
2578         * cpu-d30v.c: Likewise.
2579         * cpu-dlx.c: Likewise.
2580         * cpu-epiphany.c: Likewise.
2581         * cpu-fr30.c: Likewise.
2582         * cpu-frv.c: Likewise.
2583         * cpu-h8300.c: Likewise.
2584         * cpu-h8500.c: Likewise.
2585         * cpu-hppa.c: Likewise.
2586         * cpu-i370.c: Likewise.
2587         * cpu-i860.c: Likewise.
2588         * cpu-i960.c: Likewise.
2589         * cpu-ia64.c: Likewise.
2590         * cpu-ip2k.c: Likewise.
2591         * cpu-iq2000.c: Likewise.
2592         * cpu-lm32.c: Likewise.
2593         * cpu-m10200.c: Likewise.
2594         * cpu-m10300.c: Likewise.
2595         * cpu-m32c.c: Likewise.
2596         * cpu-m32r.c: Likewise.
2597         * cpu-m68hc11.c: Likewise.
2598         * cpu-m68hc12.c: Likewise.
2599         * cpu-m68k.c: Likewise.
2600         * cpu-m88k.c: Likewise.
2601         * cpu-mcore.c: Likewise.
2602         * cpu-mep.c: Likewise.
2603         * cpu-microblaze.c: Likewise.
2604         * cpu-mips.c: Likewise.
2605         * cpu-mmix.c: Likewise.
2606         * cpu-moxie.c: Likewise.
2607         * cpu-msp430.c: Likewise.
2608         * cpu-mt.c: Likewise.
2609         * cpu-ns32k.c: Likewise.
2610         * cpu-openrisc.c: Likewise.
2611         * cpu-or32.c: Likewise.
2612         * cpu-pdp11.c: Likewise.
2613         * cpu-pj.c: Likewise.
2614         * cpu-plugin.c: Likewise.
2615         * cpu-powerpc.c: Likewise.
2616         * cpu-rl78.c: Likewise.
2617         * cpu-rs6000.c: Likewise.
2618         * cpu-rx.c: Likewise.
2619         * cpu-s390.c: Likewise.
2620         * cpu-score.c: Likewise.
2621         * cpu-sh.c: Likewise.
2622         * cpu-sparc.c: Likewise.
2623         * cpu-spu.c: Likewise.
2624         * cpu-tic30.c: Likewise.
2625         * cpu-tic4x.c: Likewise.
2626         * cpu-tic54x.c: Likewise.
2627         * cpu-tic6x.c: Likewise.
2628         * cpu-tic80.c: Likewise.
2629         * cpu-tilegx.c: Likewise.
2630         * cpu-tilepro.c: Likewise.
2631         * cpu-v850.c: Likewise.
2632         * cpu-vax.c: Likewise.
2633         * cpu-w65.c: Likewise.
2634         * cpu-we32k.c: Likewise.
2635         * cpu-xc16x.c: Likewise.
2636         * cpu-xstormy16.c: Likewise.
2637         * cpu-xtensa.c: Likewise.
2638         * cpu-z80.c: Likewise.
2639         * cpu-z8k.c: Likewise.
2640
2641         * cpu-i386.c: Include "libiberty.h".
2642         (bfd_arch_i386_fill): New.
2643         Add bfd_arch_i386_fill to  bfd_arch_info initializer.
2644
2645         * cpu-k1om.c: Add bfd_arch_i386_fill to  bfd_arch_info initializer.
2646         * cpu-l1om.c: Likewise.
2647
2648         * linker.c (default_data_link_order): Call abfd->arch_info->fill
2649         if fill size is 0.
2650
2651         * bfd-in2.h: Regenerated.
2652
2653 2012-01-27  Michael Eager  <eager@eagercon.com>
2654
2655         * elf32-microblaze.c (create_got_section):
2656         Reuse existing .rela.got section.
2657
2658 2012-01-23  Alan Modra  <amodra@gmail.com>
2659
2660         * elf-bfd.h: Formatting.
2661         (struct elf_backend_data): Add "maybe_function_sym".
2662         (_bfd_elf_maybe_function_sym): Declare.
2663         * elfxx-target.h (elf_backend_maybe_function_sym): Define.
2664         (elfNN_bed): Init new field.
2665         * elf.c (elf_find_function): Use maybe_function_sym.
2666         (_bfd_elf_maybe_function_sym): New function.
2667         * elf64-ppc.c (elf_backend_maybe_function_sym): Define.
2668         (ppc64_elf_maybe_function_sym): New function.
2669
2670 2012-01-20  Francois Gouget  <fgouget@codeweavers.com>
2671
2672         PR binutils/13534
2673         * archive.c (_bfd_ar_sizepad): New function. Correctly install and
2674         pad the size field in an archive header.
2675         (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan
2676         function for the archive size field.
2677         (bfd_generic_openr_next_archived_file): Likewise.
2678         (do_slurp_coff_armap): Likewise.
2679         (_bfd_write_archive_contents): Likewise.
2680         (_bfd_bsd44_write_ar_hdr): Use the new function.
2681         (bfd_ar_hdr_from_filesystem): Likewise.
2682         (_bfd_write_archive_contents): Likewise.
2683         (bsd_write_armap): Likewise.
2684         (coff_write_armap): Likewise.
2685         * archive64.c (bfd_elf64_archive_write_armap): Likewise.
2686         * bfdio.c (bfd_bread): Use correct type for archive element
2687         sizes.
2688         * ar.c (open_inarch): Likewise.
2689         (extract_file): Likewise.
2690         * libbfd-in.h (struct areltdata): Use correct types for
2691         parsed_size and extra_size fields.
2692         Prototype _bfd_ar_sizepad function.
2693         * libbfd.h: Regenerate.
2694
2695 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
2696
2697         * elf.c (elfcore_write_prpsinfo): Provide unconditionally.
2698         Return NULL if core file generation is unsupported.
2699         (elfcore_write_prstatus): Likewise.
2700         * elf32-arm.c (elf32_arm_nabi_write_core_note): New function.
2701         (elf_backend_write_core_note): Define.
2702
2703 2012-01-19  Tristan Gingold  <gingold@adacore.com>
2704
2705         * pef.c: Add a comment.
2706         * xsym.c: Likewise.
2707
2708 2012-01-17  Alan Modra  <amodra@gmail.com>
2709
2710         * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
2711         trailing garbage in the note.
2712         * elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
2713
2714 2012-01-16  Daniel Green  <venix1@gmail.com>
2715
2716         PR ld/13491
2717         * coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test
2718         h->root.type not h->type.
2719         * coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.
2720
2721 2012-01-13  Iain Sandoe  <idsandoe@googlemail.com>
2722
2723         * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
2724         indirect symbols.
2725
2726 2012-01-13  Iain Sandoe  <idsandoe@googlemail.com>
2727
2728         * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file
2729         position from here... to (bfd_mach_o_build_seg_command): Here.
2730
2731 2012-01-12  Iain Sandoe  <idsandoe@googlemail.com>
2732
2733         * mach-o.c (bfd_mach_o_count_indirect_symbols): New.
2734         (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
2735         * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
2736         file. (bfd_mach_o_section): Add indirect_syms field.
2737
2738 2012-01-11  Iain Sandoe  <idsandoe@googlemail.com>
2739
2740         * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of
2741         vmsize from filesize.  Don't compute offsets or file sizes for
2742         zerofill sections.
2743
2744 2012-01-11  Iain Sandoe  <idsandoe@googlemail.com>
2745
2746         * mach-o.c (bfd_mach_o_build_commands): Make the building of each
2747         command type independent.
2748
2749 2012-01-11  Alan Modra  <amodra@gmail.com>
2750
2751         * elf64-ppc.c: Define more insns used in plt call stubs.
2752         (ppc64_elf_brtaken_reloc): Assume isa version 2 or above.
2753         (ppc64_elf_relocate_section): Likewise.
2754         (enum ppc_stub_type): Add ppc_stub_plt_call_r2save.
2755         (struct ppc_link_hash_table): Increase size of stub_count array.
2756         Add plt_stub_align and plt_thread_safe.
2757         (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define.
2758         (plt_stub_size, plt_stub_pad): New functions.
2759         (build_plt_stub): Emit barriers for power7 thread safety.  Don't
2760         emit needless save of r2.
2761         (build_tls_get_addr_stub): Adjust params.
2762         (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning
2763         plt stubs.  Adjust build_*plt_stub calls.
2764         (ppc_size_one_stub): Similarly.
2765         (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align
2766         params.  Choose default for plt_thread_safe based on existence of
2767         calls to thread creation functions.  Modify plt_call to
2768         plt_call_r2save when no tocsave reloc found.  Align tail of stub
2769         sections.
2770         (ppc64_elf_build_stubs): Align tail of stub sections.  Adjust
2771         output of stub statistics.
2772         (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save.
2773         * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
2774
2775 2012-01-10  H.J. Lu  <hongjiu.lu@intel.com>
2776
2777         PR ld/13581
2778         * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P
2779         check on R_X86_64_PCXX.
2780
2781 2012-01-10  Tristan Gingold  <gingold@adacore.com>
2782
2783         * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false
2784         warning.
2785
2786 2012-01-10  Tristan Gingold  <gingold@adacore.com>
2787
2788         * bfdio.c (bfd_tell): Handle nested archives.
2789         (bfd_seek): Ditto.
2790         * cache.c (bfd_cache_lookup_worker): Ditto.
2791         * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with
2792         nested archives.
2793         (bfd_generic_openr_next_archived_file): Likewise.
2794
2795 2012-01-09  Iain Sandoe  <idsandoe@googlemail.com>
2796
2797         * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement.
2798         (bfd_mach_o_write_symtab): Remove handling for indirect syms.
2799         (bfd_mach_o_primary_symbol_sort_key): Likewise.
2800         (bfd_mach_o_cf_symbols): Likewise.
2801         (bfd_mach_o_sort_symbol_table): Remove.
2802         (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling
2803         for indirect and dysymtab counts.  Do the symbol sorting here.
2804         (bfd_mach_o_build_dysymtab_command): Count the symbol types here.
2805         Make the indirect symbols a TODO.
2806         (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols.
2807         (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with
2808         a non-zero value.
2809         (bfd_mach_o_read_symtab_symbol): Record the symbol index.
2810         (bfd_mach_o_read_symtab_symbol): Adjust recording of global status.
2811         * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries.
2812         (IS_MACHO_INDIRECT): Remove.
2813         (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New.
2814
2815 2012-01-06  Nick Clifton  <nickc@redhat.com>
2816
2817         PR binutils/13121
2818         * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to
2819         'flaginfo' to avoid conflicts with AIX system headers.
2820
2821 2012-01-06  Tristan Gingold  <gingold@adacore.com>
2822
2823         * bfdio.c (bfd_bread): Use arelt_size macro.
2824
2825 2012-01-06  Tristan Gingold  <gingold@adacore.com>
2826
2827         * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.
2828
2829 2012-01-05  Nick Clifton  <nickc@redhat.com>
2830
2831         PR ld/12161
2832         * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if
2833         necessary.
2834
2835 2012-01-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
2836
2837         Fix zero registers core files when built by gcc-4.7.
2838         * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and
2839         size.  Call elfcore_write_note for the local variables.  Remove the
2840         final elfcore_write_note call.  Add NOTREACHED comments.
2841
2842 2012-01-04  Tristan Gingold  <gingold@adacore.com>
2843
2844         * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function.
2845         (bfd_mach_o_generic_stat_arch_elt): Adjust.
2846
2847 2012-01-04  Tristan Gingold  <gingold@adacore.com>
2848
2849         * mach-o.c (bfd_mach_o_fat_member_init): New function.
2850         (bfd_mach_o_openr_next_archived_file): Reindent.
2851         Adjust to call bfd_mach_o_fat_member_init.
2852         (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init.
2853
2854 2012-01-04  Tristan Gingold  <gingold@adacore.com>
2855
2856         * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle
2857         BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1,
2858         BFD_RELOC_MACH_O_X86_64_PCREL32_2,
2859         BFD_RELOC_MACH_O_X86_64_PCREL32_4,
2860         BFD_RELOC_MACH_O_X86_64_BRANCH32,
2861         BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32,
2862         BFD_RELOC_MACH_O_X86_64_GOT.
2863
2864 2012-01-04  Tristan Gingold  <gingold@adacore.com>
2865
2866         * mach-o.h (bfd_mach_o_fvmlib_command): New structure.
2867         (bfd_mach_o_load_command): Add fvmlib field.
2868
2869         * mach-o.c (bfd_mach_o_read_fvmlib): New function.
2870         (bfd_mach_o_read_command): Handle fvmlib.
2871
2872 2012-01-04  Tristan Gingold  <gingold@adacore.com>
2873
2874         * mach-o.c (bfd_mach_o_convert_architecture): Reindent.
2875         Decode msubtype for ARM.
2876
2877 2012-01-04  Tristan Gingold  <gingold@adacore.com>
2878
2879         * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments.
2880
2881 2012-01-04  Tristan Gingold  <gingold@adacore.com>
2882
2883         * mach-o.h: Reindent header.
2884         (bfd_mach_o_encryption_info_command): New structure.
2885         (bfd_mach_o_load_command): Add encryption_info field.
2886
2887         * mach-o.c (bfd_mach_o_read_encryption_info): New function.
2888         (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
2889         (bfd_mach_o_read_command): Adjust error message.
2890
2891 2012-01-04  Shinichiro Hamaji  <shinichiro.hamaji@gmail.com>
2892
2893         * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part
2894         which reads DWARF2 and stores in stash from find_line.
2895         (find_line) Call _bfd_dwarf2_slurp_debug_info.
2896         * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration.
2897         * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate.
2898         * mach-o.c (dsym_subdir): The name of subdir where debug
2899         information may be stored.
2900         (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose
2901         type is UUID.
2902         (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is
2903         corresponding to the executable.
2904         (bfd_mach_o_find_dsym): New. Find a debug information BFD in the
2905         specified binary file.
2906         (bfd_mach_o_follow_dsym): New. Find a debug information BFD for
2907         the original BFD.
2908         (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O
2909         executables, dylibs, and bundles.
2910         (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file.
2911         * mach-o.h (dsym_bfd): The BFD of the dSYM file.
2912
2913 2012-01-03  Iain Sandoe  <idsandoe@googlemail.com>
2914
2915         * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index
2916         for stabd symbols.
2917         (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs.
2918         (bfd_mach_o_cf_symbols): Likewise.
2919
2920 2012-01-03  Iain Sandoe  <idsandoe@googlemail.com>
2921
2922         * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo.
2923
2924 2012-01-03  Iain Sandoe  <idsandoe@googlemail.com>
2925
2926         * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
2927         as the value of an indirect symbol.  Keep the string table index in
2928         non-indirect syms for reference.
2929         (bfd_mach_o_write_dysymtab): New.
2930         (bfd_mach_o_primary_symbol_sort_key): New.
2931         (bfd_mach_o_cf_symbols): New.
2932         (bfd_mach_o_sort_symbol_table): New.
2933         (bfd_mach_o_mangle_symbols): Return early if no symbols.  Sort symbols.
2934         If we are emitting a dysymtab, process indirect symbols and count the
2935         number of each other kind.
2936         (bfd_mach_o_mangle_sections): New.
2937         (bfd_mach_o_write_contents): Split out some pre-requisite code into
2938         the command builder. Write dysymtab if the command is present.
2939         (bfd_mach_o_count_sections_for_seg): New.
2940         (bfd_mach_o_build_seg_command): New.
2941         (bfd_mach_o_build_dysymtab_command): New.
2942         (bfd_mach_o_build_commands): Reorganize to support the fact that some
2943         commands are optional and should not be emitted if there are no
2944         sections or symbols.
2945         (bfd_mach_o_set_section_contents): Amend comment.
2946         * mach-o.h: Amend and add to comments.
2947         (mach_o_data_struct): Add fields for dysymtab symbols counts and a
2948         pointer to the indirects, when present.
2949         (bfd_mach_o_should_emit_dysymtab): New macro.
2950         (IS_MACHO_INDIRECT): Likewise.
2951
2952 For older changes see ChangeLog-2011
2953 \f
2954 Local Variables:
2955 mode: change-log
2956 left-margin: 8
2957 fill-column: 74
2958 version-control: never
2959 End: