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