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