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