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