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