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