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