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