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