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