PR ld/14207
[binutils-gdb.git] / bfd / ChangeLog
1 2012-07-03 Alan Modra <amodra@gmail.com>
2
3 PR ld/14207
4 * elf.c (assign_file_positions_for_load_sections): Remove assertions
5 that only PT_LOAD headers include file header and section headers.
6 (assign_file_positions_for_non_load_sections): Similarly don't
7 assert PT_GNU_RELRO header does not include file and section headers.
8 Compare first section vma rather than PT_LOAD p_vaddr against
9 relro_start when looking for PT_LOAD covering PT_GNU_RELRO. Replace
10 abort with assertion.
11
12 2012-07-02 Alan Modra <amodra@gmail.com>
13
14 * elf32-m32c.c (m32c_elf_check_relocs): Use bfd_make_section
15 "anyway" variant when creating .plt.
16 (m32c_elf_relax_plt_section): Remove redundant test and unused param.
17 (m32c_elf_relax_section): Test SEC_LINKER_CREATED before calling
18 m32c_elf_relax_plt_section.
19 * elfxx-mips.c (mips_elf_create_got_section): Use make anyway variant
20 when creating .got and .got.plt.
21 (_bfd_mips_elf_final_link): Likewise for .rtproc, and use
22 bfd_get_linker_section.
23 * sunos.c: Similarly throughout.
24
25 2012-07-01 Andreas Schwab <schwab@linux-m68k.org>
26
27 * elf.c (_bfd_elf_make_section_from_shdr): Fix typo in error
28 message.
29
30 2012-06-29 H.J. Lu <hongjiu.lu@intel.com>
31
32 * elf64-x86-64.c (elf_x86_64_relocate_section): Return FALSE
33 on unresolvable relocation.
34
35 2012-06-29 H.J. Lu <hongjiu.lu@intel.com>
36
37 * archive.c (_bfd_compute_and_write_armap): Simplify global
38 symbol handling.
39
40 2012-06-29 Nick Clifton <nickc@redhat.com>
41
42 PR ld/14189
43 * elf32-arm.c (elf32_arm_check_relocs): Do not increment refcount
44 for locally bound symbols.
45
46 2012-06-29 Alan Modra <amodra@gmail.com>
47
48 * section.c (bfd_get_linker_section): New function.
49 * elf32-arm.c: When retrieving SEC_LINKER_CREATED sections, use
50 the above throughout rather than bfd_get_section_by_name. Use
51 bfd_make_section_anyway rather than bfd_make_section when creating
52 them.
53 * elf32-bfin.c: Likewise.
54 * elf32-cr16.c: Likewise.
55 * elf32-cris.c: Likewise.
56 * elf32-frv.c: Likewise.
57 * elf32-hppa.c: Likewise.
58 * elf32-i370.c: Likewise.
59 * elf32-i386.c: Likewise.
60 * elf32-lm32.c: Likewise.
61 * elf32-m32c.c: Likewise.
62 * elf32-m32r.c: Likewise.
63 * elf32-m68k.c: Likewise.
64 * elf32-microblaze.c: Likewise.
65 * elf32-ppc.c: Likewise.
66 * elf32-rl78.c: Likewise.
67 * elf32-s390.c: Likewise.
68 * elf32-score.c: Likewise.
69 * elf32-score7.c: Likewise.
70 * elf32-sh.c: Likewise.
71 * elf32-tic6x.c: Likewise.
72 * elf32-tilepro.c: Likewise.
73 * elf32-vax.c: Likewise.
74 * elf32-xstormy16.c: Likewise.
75 * elf32-xtensa.c: Likewise.
76 * elf64-alpha.c: Likewise.
77 * elf64-hppa.c: Likewise.
78 * elf64-ia64-vms.c: Likewise.
79 * elf64-ppc.c: Likewise.
80 * elf64-s390.c: Likewise.
81 * elf64-sh64.c: Likewise.
82 * elf64-sparc.c: Likewise.
83 * elf64-x86-64.c: Likewise.
84 * elfnn-ia64.c: Likewise.
85 * elfxx-mips.c: Likewise.
86 * elfxx-sparc.c: Likewise.
87 * elfxx-tilegx.c: Likewise.
88 * elflink.c: Likewise.
89 * elf-vxworks.c: Likewise.
90 * elf-m10300.c: Likewise. Also make use of htab plt, got and
91 gotplt shortcuts.
92 * bfd-in2.h: Regenerate.
93 * elf32-lm32.c (lm32_elf_check_relocs): Use the correct bfd when
94 calling create_rofixup_section.
95 * elflink.c (bfd_elf_final_link): Simplify test for .dynstr.
96
97 2012-06-29 Alan Modra <amodra@gmail.com>
98
99 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't create .rela
100 section for bss type sections, except for .rela.bss.
101 * elf-m10300.c (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
102 * elf32-cr16.c (_bfd_cr16_elf_create_dynamic_sections): Likewise.
103 * elf32-lm32.c (lm32_elf_create_dynamic_sections): Likewise.
104 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Likewise.
105 * elf64-sh64.c (sh64_elf64_create_dynamic_sections): Likewise.
106
107 2012-06-28 Roland McGrath <mcgrathr@google.com>
108
109 * elf32-arm.c (elf32_arm_populate_plt_entry): Use int32_t for
110 displacement calculation in nacl_p case.
111
112 2012-06-28 Nick Clifton <nickc@redhat.com>
113
114 * po/uk.po: New Ukranian translation.
115 * configure.in (ALL_LINGUAS): Add uk.
116 * configure: Regenerate.
117
118 2012-06-26 Alan Modra <amodra@gmail.com>
119
120 * elf64-ppc.c (ppc64_elf_next_toc_section): Don't error if input
121 file has multiple .got/.toc sections and all don't fit in
122 current toc group.
123
124 2012-06-22 Roland McGrath <mcgrathr@google.com>
125
126 * elf.c (assign_file_positions_for_non_load_sections): Define
127 __ehdr_start symbol if it's referenced and there's a PT_LOAD
128 segment that covers both the file and program headers.
129
130 2012-06-22 Andreas Schwab <schwab@linux-m68k.org>
131
132 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): Don't make
133 _GLOBAL_OFFSET_TABLE_ and _DYNAMIC absolute.
134
135 2012-06-22 Alan Modra <amodra@gmail.com>
136
137 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't emit out-of-line
138 save/restore functions when relocatable. Make "funcs" static.
139
140 2012-06-18 Hans-Peter Nilsson <hp@axis.com>
141
142 * elf32-cris.c (cris_elf_plt_sym_val): Rewrite to work in presence
143 of merged .got and .got.plt entries.
144
145 2012-06-18 John Szakmeister <john@szakmeister.net>
146
147 * elf32-arm.c (elf32_arm_final_link_relocate): Correct return value.
148
149 2012-06-17 Hans-Peter Nilsson <hp@axis.com>
150
151 * elf32-cris.c (cris_elf_relocate_section): <R_CRIS_32_IE>
152 <R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>: Handle references to
153 thread common symbols.
154
155 2012-06-13 Nick Clifton <nickc@redhat.com>
156
157 * elf32-arm.c (bfd_arm_get_mach_from_attributes): New function.
158 (elf32_arm_object_p): If the machine number could not be deduced
159 from the notes, call bfd_arm_get_mach_from_attributes to get the
160 number from the attributes.
161
162 2012-06-12 H.J. Lu <hongjiu.lu@intel.com>
163
164 PR bfd/14207
165 * elf.c (assign_file_positions_for_non_load_sections): Abort if
166 PT_GNU_RELRO segment doesn't fit in PT_LOAD segment.
167
168 2012-06-12 Alan Modra <amodra@gmail.com>
169
170 PR ld/14207
171 * elf.c (_bfd_elf_map_sections_to_segments): Disregard bss type
172 sections at end of PT_LOAD segment when searching for segment
173 that contains end of relro extent.
174
175 2012-06-11 H.J. Lu <hongjiu.lu@intel.com>
176
177 * elf.c (assign_file_positions_for_non_load_sections): Reindent.
178
179 2012-06-11 H.J. Lu <hongjiu.lu@intel.com>
180
181 * elf.c (_bfd_elf_map_sections_to_segments): Reindent.
182
183 2012-06-06 Alan Modra <amodra@gmail.com>
184
185 * elflink.c (elf_link_input_bfd): Provide a file symbol for
186 each input file with local syms, if the input lacks such.
187 (bfd_elf_final_link): Add a file symbol to mark end of locals
188 for which we can associate with input files.
189 (struct elf_final_link_info): Add filesym_count field.
190 (struct elf_outext_info): Add need_second_pass and second_pass.
191 (elf_link_output_extsym): Detect symbols defined in the output
192 file, emit them on second pass over locals.
193
194 2012-06-04 Jan Kratochvil <jan.kratochvil@redhat.com>
195
196 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
197 of target_read_memory as bfd_size_type.
198 * bfd-in2.h: Regenerate.
199 * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
200 argument of target_read_memory as bfd_size_type.
201 (_bfd_elf32_bfd_from_remote_memory): Likewise.
202 (_bfd_elf64_bfd_from_remote_memory): Likewise.
203 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
204 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
205
206 2012-06-03 Alan Modra <amodra@gmail.com>
207
208 PR binutils/13897
209 * elf.c (elf_find_function): Cache last function sym info.
210 (_bfd_elf_maybe_function_sym): Return function size, pass in
211 section of interest.
212 * elf-bfd.h (struct elf_backend_data <maybe_function_sym>): Likewise.
213 (_bfd_elf_maybe_function_sym): Likewise.
214 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
215 (opd_entry_value): Add in_code_sec param. Revert caching code.
216 Return -1 if in_code_sec and function found in wrong section.
217 Update all calls.
218
219 2012-06-01 Siddhesh Poyarekar <siddhesh@redhat.com>
220
221 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Make LEN argument
222 of target_read_memory as size_t.
223 * bfd-in2.h: Regenerate.
224 * elf-bfd.h (elf_backend_bfd_from_remote_memory): Make LEN
225 argument of target_read_memory as size_t.
226 (_bfd_elf32_bfd_from_remote_memory): Likewise.
227 (_bfd_elf64_bfd_from_remote_memory): Likewise.
228 * elf.c (bfd_elf_bfd_from_remote_memory): Likewise.
229 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): Likewise.
230
231 2012-06-01 Alan Modra <amodra@gmail.com>
232
233 PR binutils/13897
234 * elf64-ppc.c (opd_entry_value): Rewrite cache code.
235
236 2012-05-29 Tom Tromey <tromey@redhat.com>
237
238 * opncls.c (bfd_fopen): Always close fd on failure.
239 (bfd_fdopenr): Likewise.
240
241 2012-05-27 Alan Modra <amodra@gmail.com>
242
243 PR ld/14170
244 * elflink.c (_bfd_elf_merge_symbol): When a symbol defined in
245 a dynamic library finds a new instance with non-default
246 visibility in a regular object, correctly handle symbols
247 already on the undefs list and undo dynamic symbol state when
248 the new symbol is hidden or internal.
249
250 2012-05-25 H.J. Lu <hongjiu.lu@intel.com>
251
252 * elf32-i386.c (elf_i386_create_dynamic_sections): Don't use
253 dynamic_sec_flags to create PLT .eh_frame section.
254 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
255
256 2012-05-25 Alan Modra <amodra@gmail.com>
257
258 PR ld/13909
259 * elf-eh-frame.c (_bfd_elf_eh_frame_present): New function.
260 (_bfd_elf_maybe_strip_eh_frame_hdr): Use it here.
261 * elf-bfd.h (_bfd_elf_eh_frame_present): Declare.
262 * elflink.c (bfd_elf_size_dynamic_sections): Let the backend
263 size dynamic sections before stripping eh_frame_hdr.
264 (bfd_elf_gc_sections): Handle multiple .eh_frame sections.
265 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Drop glink_eh_frame
266 if no other .eh_frame sections exist.
267 * elf64-ppc.c (ppc64_elf_size_stubs): Likewise.
268 * elf32-i386.c (elf_i386_create_dynamic_sections): Don't size
269 or alloc plt_eh_frame here..
270 (elf_i386_size_dynamic_sections): ..do it here instead. Don't
271 specially keep sgotplt, iplt, tgotplt, sdynbss for symbols.
272 (elf_i386_finish_dynamic_sections): Check plt_eh_frame->contents
273 before writing plt offset.
274 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Don't size
275 or alloc plt_eh_frame here..
276 (elf_x86_64_size_dynamic_sections): ..do it here instead.
277 (elf_x86_64_finish_dynamic_sections): Check plt_eh_frame->contents
278 before writing plt offset.
279
280 2012-05-24 Alan Modra <amodra@gmail.com>
281
282 PR ld/14158
283 * elf64-ppc.c (ppc64_elf_size_stubs): Round up glink_eh_frame
284 size to output section alignment.
285 (ppc64_elf_build_stubs): Likewise, and extend last FDE to cover.
286
287 2012-05-23 Alan Modra <amodra@gmail.com>
288
289 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Handle
290 BFDs with multiple .eh_frame sections.
291
292 2012-05-23 Alan Modra <amodra@gmail.com>
293
294 PR ld/13909
295 * elflink.c (bfd_elf_discard_info): Don't ignore dynamic BFDs.
296
297 2012-05-22 H.J. Lu <hongjiu.lu@intel.com>
298
299 PR ld/13909
300 * elf32-i386.c (elf_i386_create_dynamic_sections): Revert the
301 last change.
302 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
303
304 2012-05-22 Alan Modra <amodra@gmail.com>
305
306 * elflink.c (bfd_elf_discard_info): Look for next .eh_frame if
307 first one is zero size or discarded.
308 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set most of
309 glink_eh_frame contents here..
310 (ppc_elf_finish_dynamic_sections): ..rather than here. Just set
311 offset to .glink.
312
313 2012-05-22 H.J. Lu <hongjiu.lu@intel.com>
314
315 PR ld/13909
316 * elf32-i386.c (elf_i386_create_dynamic_sections): Create PLT
317 eh_frame section if there is an input .eh_frame section.
318 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
319
320 2012-05-22 H.J. Lu <hongjiu.lu@intel.com>
321
322 PR ld/14105
323 * elf32-i386.c (elf_i386_create_dynamic_sections): Always
324 create PLT eh_frame section with SEC_LINKER_CREATED.
325 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Likewise.
326
327 2012-05-22 Alan Modra <amodra@gmail.com>
328
329 * elflink.c (bfd_elf_discard_info): Handle multiple .eh_frame
330 sections attached to a BFD.
331 * section.c (bfd_get_section_by_name): Rewrite description.
332 (bfd_get_next_section_by_name): New function.
333 * bfd-in2.h: Regenerate.
334
335 2012-05-21 Andreas Schwab <schwab@linux-m68k.org>
336
337 * elf32-m68k.c (elf_m68k_grok_prstatus): New function.
338 (elf_m68k_grok_psinfo): New function.
339 (elf_backend_grok_prstatus): Define.
340 (elf_backend_grok_psinfo): Define.
341
342 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
343
344 * elf64-mips.c (elf_backend_got_header_size): Correct definition.
345 * elfxx-mips.c (_bfd_mips_elf_adjust_dynamic_symbol): Use the ELF
346 backend's GOT header size instead of hardcoding it.
347
348 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
349
350 * elf32-vax.c (elf_vax_relocate_section)
351 <R_VAX_8, R_VAX_16, R_VAX_32>: Don't check if info->shared again.
352
353 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
354
355 * elf32-vax.c (elf_vax_relocate_section)
356 <R_VAX_8, R_VAX_16, R_VAX_32>: Use section flags rather than
357 its name as the check for text sections.
358
359 2012-05-19 Maciej W. Rozycki <macro@linux-mips.org>
360
361 * elf64-mips.c (mips_elf64_be_swap_reloc_out): Also make sure
362 the third reloc offset is the same as the first.
363
364 2012-05-19 Alan Modra <amodra@gmail.com>
365
366 * elf32-ppc.h (has_vle_insns, is_ppc_vle): Delete.
367 (has_tls_reloc, has_tls_get_addr_call): Move back to..
368 * elf32-ppc.c: ..here.
369 (ppc_elf_section_flags, elf_backend_section_flags): Delete.
370 (ppc_elf_modify_segment_map): Use ELF sh_flags to detect VLE sections.
371
372 2012-05-18 H.J. Lu <hongjiu.lu@intel.com>
373
374 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Don't make
375 _DYNAMIC nor _GLOBAL_OFFSET_TABLE_ absolute.
376 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
377
378 2012-05-18 Roland McGrath <mcgrathr@google.com>
379
380 * archive.c (_bfd_generic_read_ar_hdr_mag): Fix last change so as
381 not to clobber the ar_fmag field stored in ARED->arch_header.
382
383 2012-05-18 Pedro Alves <palves@redhat.com>
384
385 * mach-o.h: Don't include sysdep.h.
386
387 2012-05-18 Nick Clifton <nickc@redhat.com>
388
389 PR 14072
390 * bfd-in.h: Check for PACKAGE or PACKAGE_VERSION before
391 complaining about config.h not having been included.
392 * bfd-in2.h: Regenerate.
393
394 2012-05-18 Andreas Schwab <schwab@linux-m68k.org>
395
396 * aclocal.m4: Regenerate.
397 * Makefile.in: Regenerate.
398
399 2012-05-17 Daniel Richard G. <skunk@iskunk.org>
400 Nick Clifton <nickc@redhat.com>
401
402 PR 14072
403 * configure.in: Add check that sysdep.h has been included before
404 any system header files.
405 * configure: Regenerate.
406 * config.in: Regenerate.
407 * aclocal.m4: Regenerate.
408 * bfd-in.h: Generate an error if included before config.h.
409 * sysdep.h: Likewise.
410 * bfd-in2.h: Regenerate.
411 * compress.c: Remove #include "config.h".
412 * plugin.c: Likewise.
413 * elf32-m68hc1x.c: Include sysdep.h before alloca-conf.h.
414 * elf64-hppa.c: Likewise.
415 * som.c: Likewise.
416 * xsymc.c: Likewise.
417
418 2012-05-17 Maciej W. Rozycki <macro@linux-mips.org>
419 Alan Modra <amodra@gmail.com>
420
421 * elf.c (ignore_section_sym): Correct comment. Don't return
422 true for absolute section.
423 (elf_map_symbols): Move stray comment. Adjust for above change.
424 Don't discard global section symbols.
425
426 2012-05-17 Alan Modra <amodra@gmail.com>
427
428 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make _DYNAMIC,
429 _GLOBAL_OFFSET_TABLE_ or _PROCEDURE_LINKAGE_TABLE_ absolute.
430 * elf64-ppc.c (ppc64_elf_finish_dynamic_symbol): Don't make _DYNAMIC
431 absolute.
432
433 2012-05-17 Alan Modra <amodra@gmail.com>
434
435 * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call, has_vle_insns,
436 is_ppc_vle): Move to..
437 * elf32-ppc.h: ..here, making is_ppc_vle a macro.
438
439 2012-05-16 Sergio Durigan Junior <sergiodj@redhat.com>
440
441 * bfd-in.h (bfd_get_section_name, bfd_get_section_vma,
442 bfd_get_section_lma, bfd_get_section_alignment,
443 bfd_get_section_flags, bfd_get_section_userdata): Rewrite macros
444 in order to use the `bfd' argument.
445 * bfd-in2.h: Regenerate.
446 * elf-vxworks.c (elf_vxworks_finish_dynamic_entry): Pass proper `bfd'
447 as the first argument for `bfd_get_section_alignment'.
448 * elf32-arm.c (create_ifunc_sections): Likewise, for
449 `bfd_set_section_alignment'.
450 * elf32-m32r.c (m32r_elf_relocate_section): Likewise, for
451 `bfd_get_section_name'.
452 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
453 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
454 (ppc_elf_relocate_section): Likewise.
455 * elf64-mmix.c (mmix_final_link_relocate): Likewise, for
456 `bfd_get_section_vma'.
457 * elf64-ppc.c (create_linkage_sections): Likewise, for
458 `bfd_set_section_alignment'.
459
460 2012-05-16 Georg-Johann Lay <avr@gjlay.de>
461
462 PR target/13503
463 * reloc.c: Rename BFD_RELOC_AVR_8_HHI to BFD_RELOC_AVR_8_HLO.
464 * bfd-in2.h: Regenerate.
465 * libbfd.h: Regenrate.
466 * elf32-avr.c (elf_avr_howto_table): Rename R_AVR_8_HHI8 to
467 R_AVR_8_HLO8.
468 (avr_reloc_map): Likewise.
469
470 2012-05-16 Daniel Richard G. <skunk@iskunk.org>
471
472 PR binutils/13558
473 * bfd/aout-cris.c: Include sysdep.h before bfd.h.
474 * bfd/aout-ns32k.c: Likewise.
475 * bfd/aout-sparcle.c: Likewise.
476 * bfd/aout0.c: Likewise.
477 * bfd/bfd-in2.h: Likewise.
478 * bfd/coff-stgo32.c: Likewise.
479 * bfd/cpu-lm32.c: Likewise.
480 * bfd/cpu-microblaze.c: Likewise.
481 * bfd/cpu-score.c: Likewise.
482 * bfd/cpu-tilegx.c: Likewise.
483 * bfd/cpu-tilepro.c: Likewise.
484 * bfd/elf32-lm32.c: Likewise.
485 * bfd/elf32-microblaze.c: Likewise.
486 * bfd/elf32-score7.c: Likewise.
487 * bfd/elf32-tilepro.c: Likewise.
488 * bfd/elfxx-tilegx.c: Likewise.
489 * bfd/mach-o.h: Likewise.
490 * bfd/nlm32-ppc.c: Likewise.
491 * bfd/ns32knetbsd.c: Likewise.
492 * bfd/pef.h: Likewise.
493 * bfd/plugin.c: Likewise.
494 * bfd/stab-syms.c: Likewise.
495 * bfd/sunos.c: Likewise.
496 * bfd/syms.c: Likewise.
497 * bfd/xsym.h: Likewise.
498
499 2012-05-16 Alan Modra <amodra@gmail.com>
500
501 * elflink.c: Rename flaginfo to flinfo throughout, except..
502 (bfd_elf_lookup_section_flags): ..here, rename finfo to flaginfo.
503 Formatting, style. Simplify flag match.
504
505 2012-05-16 Alan Modra <amodra@gmail.com>
506
507 * dwarf2.c: Formatting.
508 (arange_add): Pass in unit rather than bfd. Update callers.
509 Ignore empty ranges. Don't ask for cleared memory.
510 (parse_comp_unit): Only set unit->base_address if processing
511 DW_TAG_compile_unit.
512 (find_debug_info): Optimise section lookup.
513 (place_sections): Use bfd_alloc for stash->adjusted_sections.
514 (find_line): Match previously parsed comp unit addresses as we
515 do for newly parsed comp units.
516
517 2012-05-16 Alan Modra <amodra@gmail.com>
518
519 * archive.c (_bfd_generic_read_ar_hdr_mag): Ensure sscanf
520 stops at end of ar_size field.
521
522 2012-05-16 Alan Modra <amodra@gmail.com>
523
524 PR ld/13962
525 PR ld/7023
526 * elf.c (bfd_section_from_shdr): Fail when .dynsym sh_info is
527 out of range. As a special case, fix sh_info for zero sh_size.
528 Do the same for .symtab.
529
530 2012-05-15 James Murray <jsm@jsm-net.demon.co.uk>
531 Stephane Carrez <stcarrez@nerim.fr>
532
533 * archures.c: Add bfd_arch_m9s12x and bfd_arch_m9s12xg.
534 * config.bfd: Likewise.
535 * cpu-m9s12x.c: New.
536 * cpu-m9s12xg.c: New.
537 * elf32-m68hc12.c: Add S12X and XGATE co-processor support.
538 Add option to offset S12 addresses into XGATE memory space.
539 Fix carry bug in IMM16 (IMM8 low/high) relocate.
540 * Makefile.am (ALL_MACHINES): Add cpu-m9s12x and cpu-m9s12xg.
541 (ALL_MACHINES_CFILES): Likewise.
542 * reloc.c: Add S12X relocs.
543 * Makefile.in: Regenerate.
544 * bfd-in2.h: Regenerate.
545 * libbfd.h: Regenerate.
546
547 2012-05-14 James Lemke <jwlemke@codesourcery.com>
548 Catherine Moore <clm@codesourcery.com>
549
550 * bfd.c (bfd_lookup_section_flags): Add section parm.
551 * ecoff.c (bfd_debug_section): Remove flag_info initializer.
552 * elf-bfd.h (bfd_elf_section_data): Move in section_flag_info.
553 (bfd_elf_lookup_section_flags): Add section parm.
554 * elf32-ppc.c (is_ppc_vle): New function.
555 (ppc_elf_modify_segment_map): New function.
556 (elf_backend_modify_segment_map): Define.
557 (has_vle_insns): New define.
558 * elf32-ppc.h (ppc_elf_modify_segment_map): Declare.
559 * elflink.c (bfd_elf_lookup_section_flags): Add return value & parm.
560 Move in logic to omit / include a section.
561 * libbfd-in.h (bfd_link_info): Add section parm.
562 (bfd_generic_lookup_section_flags): Likewise.
563 * reloc.c (bfd_generic_lookup_section_flags): Likewise.
564 * section.c (bfd_section): Move out section_flag_info.
565 (BFD_FAKE_SECTION): Remove flag_info initializer.
566 * targets.c (_bfd_lookup_section_flags): Add section parm.
567
568 2012-05-14 Catherine Moore <clm@codesourcery.com>
569
570 * archures.c (bfd_mach_ppc_vle): New.
571 * bfd-in2.h: Regenerated.
572 * cpu-powerpc.c (bfd_powerpc_archs): New entry for vle.
573 * elf32-ppc.c (split16_format_type): New enumeration.
574 (ppc_elf_vle_split16): New function.
575 (HOWTO): Add entries for R_PPC_VLE relocations.
576 (ppc_elf_reloc_type_lookup): Handle PPC_VLE relocations.
577 (ppc_elf_section_flags): New function.
578 (ppc_elf_lookup_section_flags): New function.
579 (ppc_elf_section_processing): New function.
580 (ppc_elf_check_relocs): Handle PPC_VLE relocations.
581 (ppc_elf_relocation_section): Likewise.
582 (elf_backend_lookup_section_flags_hook): Define.
583 (elf_backend_section_flags): Define.
584 (elf_backend_section_processing): Define.
585 * elf32-ppc.h (ppc_elf_section_processing): Declare.
586 * libbfd.h: Regenerated.
587 * reloc.c (BFD_RELOC_PPC_VLE_REL8, BFD_RELOC_PPC_VLE_REL15,
588 BFD_RELOC_PPC_VLE_REL24, BFD_RELOC_PPC_VLE_LO16A,
589 BFD_RELOC_PPC_VLE_LO16D, BFD_RELOC_PPC_VLE_HI16A,
590 BFD_RELOC_PPC_VLE_HI16D, BFD_RELOC_PPC_VLE_HA16A,
591 BFD_RELOC_PPC_VLE_HA16D, BFD_RELOC_PPC_VLE_SDA21,
592 BFD_RELOC_PPC_VLE_SDA21_LO, BFD_RELOC_PPC_VLE_SDAREL_LO16A,
593 BFD_RELOC_PPC_VLE_SDAREL_LO16D, BFD_RELOC_PPC_VLE_SDAREL_HI16A,
594 BFD_RELOC_PPC_VLE_SDAREL_HI16D, BFD_RELOC_PPC_VLE_SDAREL_HA16A,
595 BFD_RELOC_PPC_VLE_SDAREL_HA16D): New bfd relocations.
596
597 2012-05-11 Georg-Johann Lay <avr@gjlay.de>
598
599 PR target/13503
600 * reloc.c: Add new ENUM for BFD_RELOC_AVR_8_LO,
601 BFD_RELOC_AVR_8_HI, BFD_RELOC_AVR_8_HHI.
602 * bfd-in2.h: Regenerate.
603 * libbfd.h: Regenrate.
604 * elf32-avr.c (elf_avr_howto_table): Add entries for
605 R_AVR_8_LO8, R_AVR_8_HI8, R_AVR_8_HHI8.
606 (avr_reloc_map): Add RELOC mappings for R_AVR_8_LO8, R_AVR_8_HI8,
607 R_AVR_8_HHI8.
608
609 2012-05-10 H.J. Lu <hongjiu.lu@intel.com>
610
611 * elf64-x86-64.c (elf_x86_64_relocate_section): Use int in x32
612 addend overflow check.
613
614 2012-05-10 DJ Delorie <dj@redhat.com>
615
616 * elf32-rx.c (rx_elf_object_p): Ignore empty segments.
617
618 2012-05-10 H.J. Lu <hongjiu.lu@intel.com>
619
620 * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed
621 hex number in x32 addend overflow check.
622
623 2012-05-10 H.J. Lu <hongjiu.lu@intel.com>
624
625 * elf64-x86-64.c (elf_x86_64_reloc_type_class): Handle
626 R_X86_64_RELATIVE64.
627
628 2012-05-09 H.J. Lu <hongjiu.lu@intel.com>
629
630 * elf64-x86-64.c (elf_x86_64_relocate_section): Check addend
631 overflow for R_X86_64_RELATIVE64.
632
633 2012-05-08 Ben Cheng <bccheng@google.com>
634
635 * elf.c: Preserve the original p_align and p_flags if they are
636 valid.
637
638 2012-05-07 Alan Modra <amodra@gmail.com>
639
640 * elf64-ia64-vms.c (elf64_ia64_relocate_section): Update
641 RELOC_AGAINST_DISCARDED_SECTION invocation.
642
643 2012-05-07 Hans-Peter Nilsson <hp@axis.com>
644
645 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Declare and use
646 local variable i_ instead of assuming and using a variable i.
647
648 2012-05-07 Maciej W. Rozycki <macro@linux-mips.org>
649
650 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Handle compound
651 relocations.
652 * elfxx-mips.c (mips_reloc_against_discarded_section): New
653 function.
654 (_bfd_mips_elf_relocate_section): Call it, in place of
655 RELOC_AGAINST_DISCARDED_SECTION.
656 * elf-m10200.c (mn10200_elf_relocate_section): Update arguments
657 to RELOC_AGAINST_DISCARDED_SECTION.
658 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
659 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
660 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
661 * elf32-bfin.c (bfin_relocate_section): Likewise.
662 (bfinfdpic_relocate_section): Likewise.
663 * elf32-cr16.c (elf32_cr16_relocate_section): Likewise.
664 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
665 * elf32-cris.c (cris_elf_relocate_section): Likewise.
666 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
667 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
668 * elf32-epiphany.c (epiphany_elf_relocate_section): Likewise.
669 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
670 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
671 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
672 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
673 * elf32-i370.c (i370_elf_relocate_section): Likewise.
674 * elf32-i386.c (elf_i386_relocate_section): Likewise.
675 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
676 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
677 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
678 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
679 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
680 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
681 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
682 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
683 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
684 * elf32-mep.c (mep_elf_relocate_section): Likewise.
685 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
686 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
687 * elf32-mt.c (mt_elf_relocate_section): Likewise.
688 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
689 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
690 * elf32-rl78.c (rl78_elf_relocate_section): Likewise.
691 * elf32-rx.c (rx_elf_relocate_section): Likewise.
692 * elf32-s390.c (elf_s390_relocate_section): Likewise.
693 * elf32-score.c (s3_bfd_score_elf_relocate_section): Likewise.
694 * elf32-score7.c (s7_bfd_score_elf_relocate_section): Likewise.
695 * elf32-sh.c (sh_elf_relocate_section): Likewise.
696 * elf32-spu.c (spu_elf_relocate_section): Likewise.
697 * elf32-tic6x.c (elf32_tic6x_relocate_section): Likewise.
698 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
699 * elf32-v850.c (v850_elf_relocate_section): Likewise.
700 * elf32-vax.c (elf_vax_relocate_section): Likewise.
701 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
702 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
703 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
704 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
705 (elf64_alpha_relocate_section): Likewise.
706 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
707 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
708 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
709 * elf64-s390.c (elf_s390_relocate_section): Likewise.
710 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
711 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
712 * elfnn-ia64.c (elfNN_ia64_relocate_section): Likewise.
713 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
714 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
715
716 2012-05-05 Alan Modra <amodra@gmail.com>
717
718 PR ld/14052
719 PR ld/13621
720 * linker.c (_bfd_nearby_section): Revert 2012-02-13 change.
721
722 2012-05-05 Alan Modra <amodra@gmail.com>
723
724 * aout-arm.c: Replace all uses of bfd_abs_section, bfd_com_section,
725 bfd_und_section and bfd_ind_section with their _ptr variants, or
726 use corresponding bfd_is_* macros.
727 * aout-ns32k.c: Likewise.
728 * aout-tic30.c: Likewise.
729 * coff-arm.c: Likewise.
730 * coff-tic54x.c: Likewise.
731 * cpu-ns32k.c: Likewise.
732 * elf-attrs.c: Likewise.
733 * elfcode.h: Likewise.
734 * peicode.h: Likewise.
735 * reloc.c: Likewise.
736 * riscix.c: Likewise.
737 * versados.c: Likewise.
738 * section.c: Likewise.
739 (bfd_abs_section, bfd_ind_section, bfd_com_section,
740 bfd_ind_section): Delete.
741 (std_section): New array replacing above.
742 (bfd_abs_section_ptr, bfd_ind_section_ptr, bfd_com_section_ptr,
743 bfd_ind_section_ptr, STD_SECTION): Update.
744 (BFD_FAKE_SECTION, GLOBAL_SYM_INIT): Remove unnecessary casts.
745 * bfd-in2.h: Regenerate.
746
747 2012-05-03 Sean Keys <skeys@ipdatasys.com>
748
749 * cpu-xgate.c: New file. Added XGATE support.
750 * archures.c (bfd_architecture): Add XGATE architecture.
751 (bfd_archures_list): Add reference to XGATE architecture info.
752 * elf-bfd.h (prep_headers): Handle bfd_arch_xgate.
753 * reloc.c: Add various XGATE relocation enums.
754 * targets.c (bfd_elf32_xgate_vec): Declare and add to target vector
755 list.
756 * Makefile.am: Add support for XGATE elf.
757 * configure.in: Ditto.
758 * config.bfd: Ditto.
759 * Makefile.in: Regenerate.
760 * configure: Ditto.
761 * bfd-in2.h: Ditto.
762 * libbfd.h: Ditto.
763 Added files for XGATE relocations.
764 * elf32-xgate.c: Created minimal relocation file.
765 * elf32-xgate.h: Created minimal header file for elf32-xgate.
766
767 2012-05-03 Tristan Gingold <gingold@adacore.com>
768
769 * dwarf2.c (decode_line_info): Ignore
770 DW_LNE_HP_source_file_correlation.
771
772 2012-05-01 Nick Clifton <nickc@redhat.com>
773
774 PR binutils/13121
775 * aoutx.h: Rename 'finfo' to 'flaginfo' to avoid conflicts with
776 AIX system headers.
777 * coff-ppc.c: Likewise.
778 * cofflink.c: Likewise.
779 * elf32-arm.c: Likewise.
780 * elf64-sparc.c: Likewise.
781 * elflink.c: Likewise.
782 * pdp11.c: Likewise.
783 * rescoff.c: Likewise.
784
785 2012-04-26 Mark Wielaard <mjw@redhat.com>
786
787 * dwarf2.c (scan_unit_for_symbols): Account for DW_AT_high_pc
788 possibly being relative to DW_AT_low_pc.
789 (parse_comp_unit): Likewise.
790
791 2012-04-26 Andreas Schwab <schwab@linux-m68k.org>
792
793 * elf32-m68k.c (elf_m68k_check_relocs): Mark non-GOT references
794 also when generating PIE.
795 (elf_m68k_discard_copies): Mark undefined weak symbols referenced
796 by relocations as dynamic.
797
798 2012-04-26 Hans-Peter Nilsson <hp@axis.com>
799
800 Provide a way for programs to recognize BFD_ASSERT calls.
801 * bfd.c (bfd_assert_handler_type): New API type.
802 (bfd_set_assert_handler, bfd_get_assert_handler): New API functions.
803 (_bfd_assert_handler): New variable.
804 (_bfd_default_assert_handler): New function.
805 (bfd_assert): Call _bfd_assert_handler, not _bfd_error_handler.
806 * libbfd-in.h (_bfd_assert_handler): Declare.
807 * libbfd.h, bfd-in2.h: Regenerate.
808
809 2012-04-24 Hans-Peter Nilsson <hp@axis.com>
810
811 PR ld/13990
812 * elf32-arm.c (elf32_arm_gc_sweep_hook): Handle a forced-local
813 symbol, where PLT refcount is set to -1.
814
815 2012-04-24 Alan Modra <amodra@gmail.com>
816
817 PR ld/13991
818 * elf-bfd.h (_bfd_elf_link_just_syms): Define as
819 _bfd_generic_link_just_syms.
820 * elflink.c (_bfd_elf_link_just_syms): Delete.
821 * linker.c (_bfd_generic_link_just_syms): Set sec_info_type.
822
823 * bfd-in.h (discarded_section): Renamed from elf_discarded_section.
824 * section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS,
825 SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME,
826 SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE.
827 * elf-eh-frame.c, * elf-m10200.c, * elf-m10300.c,
828 * elf.c, * elf32-arm.c, * elf32-avr.c, * elf32-bfin.c,
829 * elf32-cr16.c, * elf32-cr16c.c, * elf32-cris.c,
830 * elf32-crx.c, * elf32-d10v.c, * elf32-epiphany.c,
831 * elf32-fr30.c, * elf32-frv.c, * elf32-h8300.c,
832 * elf32-hppa.c, * elf32-i370.c, * elf32-i386.c,
833 * elf32-i860.c, * elf32-ip2k.c, * elf32-iq2000.c,
834 * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c,
835 * elf32-m68hc1x.c, * elf32-m68k.c, * elf32-mcore.c,
836 * elf32-mep.c, * elf32-moxie.c, * elf32-msp430.c,
837 * elf32-mt.c, * elf32-openrisc.c, * elf32-ppc.c,
838 * elf32-rl78.c, * elf32-rx.c, * elf32-s390.c,
839 * elf32-score.c, * elf32-score7.c, * elf32-sh.c,
840 * elf32-spu.c, * elf32-tic6x.c, * elf32-tilepro.c,
841 * elf32-v850.c, * elf32-vax.c, * elf32-xc16x.c,
842 * elf32-xstormy16.c, * elf32-xtensa.c, * elf64-alpha.c,
843 * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mmix.c,
844 * elf64-ppc.c, * elf64-s390.c, * elf64-sh64.c,
845 * elf64-x86-64.c, * elflink.c, * elfnn-ia64.c,
846 * elfxx-mips.c, * elfxx-sparc.c, * elfxx-tilegx.c,
847 * reloc.c: Update all references.
848 * bfd-in2.h: Regenerate.
849
850 2012-04-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
851
852 * elf32-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
853 * elf64-s390.c (ELF_DYNAMIC_INTERPRETER): Set to the GCC default.
854
855 2012-04-19 Thomas Schwinge <thomas@codesourcery.com>
856
857 * elf32-sh.c (elf_sh_link_hash_entry): Specify an enum identifier for
858 got_type.
859 (allocate_dynrelocs, sh_elf_relocate_section, sh_elf_check_relocs): Use
860 it.
861
862 2012-04-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
863
864 * elf32-sh.c (allocate_dynrelocs): Don't allocate dynamic
865 relocations when LE conversion happens on the IE tls symbol.
866
867 2012-04-17 Roland McGrath <mcgrathr@google.com>
868
869 * elf64-x86-64.c (elf_x86_64_nacl_plt0_entry): Fix nop padding
870 so that 32-byte boundary is a proper instruction boundary.
871
872 2012-04-17 Tristan Gingold <gingold@adacore.com>
873
874 * vms-lib.c (_bfd_vms_lib_get_module): Append .obj extension to
875 member of an object archive.<
876
877 2012-04-17 Tristan Gingold <gingold@adacore.com>
878
879 * vms-lib.c (MAX_EKEYLEN): Define.
880 (MAX_KEYLEN): Fix value.
881 (vms_write_index): Add comments and fix indentation.
882 Adjust comparaison. Add assertions. Free kbn_blk.
883 (_bfd_vms_lib_write_archive_contents): Use MAX_EKEYLEN.
884 Compense MAX_KEYLEN adjustment.
885
886 2012-04-16 Maciej W. Rozycki <macro@linux-mips.org>
887
888 * elfxx-mips.c (mips16_stub_symndx): Handle n64 compound relocs.
889 (_bfd_mips_elf_check_relocs): Update accordingly.
890
891 2012-04-13 Alan Modra <amodra@gmail.com>
892
893 PR ld/13947
894 * elflink.c (bfd_elf_final_link): Set reloc_count to 0 for
895 reloc sections.
896
897 2012-04-12 David S. Miller <davem@davemloft.net>
898
899 * reloc.c (BFD_RELOC_SPARC_H34, BFD_RELOC_SPARC_SIZE32,
900 BFD_RELOC_SPARC_SIZE64, BFD_RELOC_SPARC_WDISP10): New relocs.
901 * libbfd.h: Regenerate.
902 * bfd-in2.h: Likewise.
903 * elfxx-sparc.c (sparc_elf_wdisp10_reloc): New function.
904 (_bfd_sparc_elf_howto_table): Add entries for R_SPARC_H34,
905 R_SPARC_SIZE32, R_SPARC_64, and R_SPARC_WDISP10.
906 (_bfd_sparc_elf_reloc_type_lookup): Handle new relocs.
907 (_bfd_sparc_elf_check_relocs): Likewise.
908 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
909 (_bfd_sparc_elf_relocate_section): Likewise.
910
911 2012-04-12 Roland McGrath <mcgrathr@google.com>
912
913 * elf32-arm.c (elf32_arm_nacl_plt0_entry, elf32_arm_nacl_plt_entry):
914 New variables.
915 (struct elf32_arm_link_hash_table): New member `nacl_p'.
916 (elf32_arm_link_hash_table_create): Initialize it.
917 (elf32_arm_nacl_link_hash_table_create): New function.
918 (arm_movw_immediate, arm_movt_immediate): New functions.
919 (elf32_arm_populate_plt_entry): Test HTAB->nacl_p.
920 (elf32_arm_finish_dynamic_sections): Likewise.
921 (elf32_arm_output_plt_map_1): Likewise.
922 (bfd_elf32_littlearm_nacl_vec, bfd_elf32_bigarm_nacl_vec):
923 New backend vector stanza.
924 (elf32_arm_nacl_modify_segment_map): New function.
925 * config.bfd: Handle arm-*-nacl*, armeb-*-nacl*.
926 * targets.c: Support bfd_elf32_{big,little}_nacl_vec.
927 * configure.in: Likewise.
928 (bfd_elf32_bigarm_nacl_vec): Add elf-nacl.lo here.
929 (bfd_elf32_littlearm_nacl_vec): Likewise.
930 (bfd_elf32_bigarm_vec, bfd_elf32_littlearm_vec): Likewise.
931 (bfd_elf32_bigarm_symbian_vec): Likewise.
932 (bfd_elf32_littlearm_symbian_vec): Likewise.
933 (bfd_elf32_bigarm_vxworks_vec): Likewise.
934 (bfd_elf32_littlearm_vxworks_vec): Likewise.
935 * configure: Regenerated.
936
937 2012-04-12 Tristan Gingold <gingold@adacore.com>
938
939 * elflink.c (elf_link_output_extsym): Add a guard.
940 (bfd_elf_final_link): Remove assertion.
941 (bfd_elf_final_link): Add a guard.
942 * elfnn-ia64.c (INCLUDE_IA64_VMS): Removed.
943 (elfNN_vms_section_from_shdr, elfNN_vms_object_p)
944 (elfNN_vms_post_process_headers, elfNN_vms_section_processing)
945 (elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup):
946 Remove.
947 (elfNN-ia64-vms target): Move to ...
948 * elf64-ia64-vms.c: New file.
949 * configure.in (bfd_elf64_ia64_vms_vec): Add elf64-ia64-vms.lo
950 * Makefile.am (BFD64_BACKENDS): Add elf64-ia64-vms.lo.
951 (BFD64_BACKENDS_CFILES): Ad elf64-ia64-vms.c.
952 * configure: Regenerate.
953 * Makefile.in: Regenerate.
954
955 2012-04-11 Nick Clifton <nickc@redhat.com>
956
957 PR binutils/13897
958 * elf64-ppc.c (opd_entry_value): When dealing with sections
959 without relocs, keep the last section loaded in order to avoid
960 unnecessary reloads.
961
962 2012-04-09 Roland McGrath <mcgrathr@google.com>
963
964 * elf.c (_bfd_elf_map_sections_to_segments): Set INFO->user_phdrs.
965 * elf-nacl.c (nacl_modify_segment_map): Do nothing if INFO->user_phdrs.
966 (nacl_modify_program_headers): Likewise.
967
968 2012-04-03 Roland McGrath <mcgrathr@google.com>
969
970 * elf-nacl.c: New file.
971 * elf-nacl.h: New file.
972 * elf32-i386.c (elf_backend_modify_segment_map): Define for
973 bfd_elf32_i386_nacl_vec.
974 (elf_backend_modify_program_headers): Likewise.
975 * elf64-x86-64.c (elf_backend_modify_segment_map): Define for
976 bfd_elf64_x86_64_nacl_vec and bfd_elf32_x86_64_nacl_vec.
977 (elf_backend_modify_program_headers): Likewise.
978 * Makefile.am (BFD32_BACKENDS, BFD64_BACKENDS): Add elf-nacl.lo here.
979 (BFD32_BACKENDS_CFILES, BFD64_BACKENDS_CFILES): Add elf-nacl.c here.
980 * Makefile.in: Regenerated.
981 * configure.in (bfd_elf64_x86_64_nacl_vec): Add elf-nacl.o to tb here.
982 (bfd_elf32_x86_64_nacl_vec): Likewise.
983 (bfd_elf64_x86_64_vec, bfd_elf32_x86_64_vec): Likewise.
984 (bfd_elf64_x86_64_freebsd_vec, bfd_elf64_x86_64_sol2_vec): Likewise.
985 (bfd_elf64_l1om_vec, bfd_elf64_l1om_freebsd_vec): Likewise.
986 (bfd_elf64_k1om_vec, bfd_elf64_k1om_freebsd_vec): Likewise.
987 (bfd_elf32_i386_nacl_vec): Likewise.
988 (bfd_elf32_i386_sol2_vec, bfd_elf32_i386_freebsd_vec): Likewise.
989 (bfd_elf32_i386_vxworks_vec, bfd_elf32_i386_vec): Likewise.
990 * configure: Regenerated.
991
992 2012-03-31 Andreas Schwab <schwab@linux-m68k.org>
993
994 * elf32-m68k.c (elf_m68k_relocate_section): Allow
995 R_68K_TLS_LE{8,16,32} for PIE.
996
997 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
998
999 * elf64-s390.c: Fix several comments regarding PLT entry
1000 description.
1001 * elf32-s390.c: Likewise.
1002
1003 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1004
1005 * elf64-s390.c: Use the section pointer shortcuts in
1006 elf_link_hash_table and remove them from the target specific
1007 variant.
1008 * elf32-s390.c: Likewise.
1009
1010 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1011
1012 * elf64-s390.c (elf_s390x_plt_entry, elf_s390x_first_plt_entry):
1013 New definitions.
1014 (PLT_PIC_ENTRY_WORD*, PLT_PIC12_ENTRY_WORD*): Remove.
1015 (elf_s390_finish_dynamic_symbol): Use memcpy instead of bfd_put_32.
1016 (elf_s390_finish_dynamic_sections): Likewise.
1017 * elf32-s390.c (elf_s390_plt_entry, elf_s390_plt_pic_entry)
1018 (elf_s390_plt_pic12_entry, elf_s390_plt_pic16_entry)
1019 (elf_s390_plt_first_entry, elf_s390_plt_pic_first_entry): New definitions.
1020 (PLT_PIC16_ENTRY_WORD*, PLT_ENTRY_WORD*)
1021 (PLT_PIC_FIRST_ENTRY_WORD*, PLT_FIRST_ENTRY_WORD*): Remove.
1022
1023 2012-03-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1024
1025 * elf32-s390.c (struct elf_s390_dyn_relocs): Remove.
1026 Rename all occurrences in the file to elf_dyn_relocs.
1027 * elf64-s390.c: Likewise.
1028
1029 2012-03-30 Alan Modra <amodra@gmail.com>
1030
1031 * elflink.c (_bfd_elf_gc_mark_reloc): Don't delve into dynamic
1032 libraries.
1033
1034 2012-03-29 Alan Modra <amodra@gmail.com>
1035
1036 * bfd-in.h (bfd_get_arch_size, bfd_get_sign_extend_vma): Delete.
1037 * bfd-in2.h: Regenerate.
1038
1039 2012-03-23 Alan Modra <amodra@gmail.com>
1040
1041 * elf.c (assign_file_positions_for_non_load_sections): Don't warn
1042 on empty alloc sections.
1043
1044 2012-03-23 Alan Modra <amodra@gmail.com>
1045
1046 * linker.c (_bfd_nearby_section): New function, split out from..
1047 (fix_syms): ..here.
1048 * bfd-in.h (_bfd_nearby_section): Declare.
1049 * bfd-in2.h: Regenerate.
1050 * elflink.c (elf_link_input_bfd): Don't use text_index_section or
1051 data_index_section with ld -q or ld -r output relocs against
1052 stripped output sections. Instead use _bfd_nearby_section.
1053
1054 2012-03-23 Alan Modra <amodra@gmail.com>
1055
1056 PR binutils/13894
1057 * elf64-ppc.c (opd_entry_value): Read full symbol table when
1058 sym hashes unavailable.
1059
1060 2012-03-21 Eliot Dresselhaus <eliot@sonic.net>
1061
1062 * elf32-tic6x.c (elf32_tic6x_merge_private_bfd_data): Return TRUE
1063 for non-C6X objects.
1064
1065 2012-03-20 Kai Tietz <ktietz@redhat.com>
1066
1067 PR ld/12742
1068 * configure.in (AC_CHECK_HEADERS): Test for windows.h and dlfcn.h.
1069 * plugin.c: Guard include of dlfcn.h if HAVE_DLFCN_H is defined.
1070 Add windows.h header include if HAVE_WINDOWS_H is defined.
1071 (dlerror): New static function if windows variant is used instead
1072 of dlfcn.h.
1073 (dlclose): Likewise.
1074 (dlopen): Likewise.
1075 (dlsym): Likewise.
1076 * configure: Regenerated.
1077 * config.in: Regenerated.
1078
1079 2012-03-20 H.J. Lu <hongjiu.lu@intel.com>
1080
1081 PR ld/13880
1082 * elf32-i386.c (elf_i386_relocate_section): Don't issue an error
1083 for R_386_GOTOFF relocation against protected function if
1084 SYMBOLIC_BIND is true.
1085
1086 * elf64-x86-64.c (elf_x86_64_relocate_section): Don't issue an
1087 error for R_X86_64_GOTOFF64 relocation against protected function
1088 when building executable or SYMBOLIC_BIND is true.
1089
1090 2012-03-16 Roland McGrath <mcgrathr@google.com>
1091
1092 * config.bfd: Handle x86_64-*-nacl*.
1093 * elf64-x86-64.c (bfd_elf64_x86_64_nacl_vec): New backend vector stanza.
1094 (bfd_elf32_x86_64_nacl_vec): Likewise.
1095 * targets.c: Support them.
1096 * configure.in: Likewise.
1097 * configure: Regenerated.
1098
1099 2012-03-16 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1100
1101 * elf32-arm.c (elf32_arm_attributes_accept_div): New function.
1102 (elf32_arm_attributes_forbid_div): Likewise.
1103 (elf32_arm_merge_eabi_attributes): Correct handling of
1104 Tag_DIV_use.
1105
1106 2012-03-15 Roland McGrath <mcgrathr@google.com>
1107
1108 * elf64-x86-64.c (elf_x86_64_create_dynamic_sections): Use
1109 elf_x86_64_backend_data parameters for plt_eh_frame.
1110
1111 * elf64-x86-64.c (struct elf_x86_64_backend_data): New type.
1112 (get_elf_x86_64_backend_data, GET_PLT_ENTRY_SIZE): New macros.
1113 (elf_x86_64_arch_bed): New variable.
1114 (elf_backend_arch_data): New macro.
1115 (elf_x86_64_adjust_dynamic_symbol): Use GET_PLT_ENTRY_SIZE.
1116 (elf_x86_64_allocate_dynrelocs): Likewise.
1117 (elf_x86_64_relocate_section): Likewise.
1118 (elf_x86_64_plt_sym_val): Likewise.
1119 (elf_x86_64_finish_dynamic_symbol): Use elf_x86_64_backend_data
1120 parameters for PLT details.
1121 (elf_x86_64_finish_dynamic_sections): Likewise.
1122
1123 2012-03-14 Roland McGrath <mcgrathr@google.com>
1124
1125 * elf32-i386.c (elf_i386_nacl_pic_plt0_entry): Initialize up
1126 to the full size, padding out with nop instructions.
1127
1128 2012-03-12 Alan Modra <amodra@gmail.com>
1129
1130 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Don't warn
1131 on zero size dynbss symbol.
1132 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
1133 * elf32-cr16.c (_bfd_cr16_elf_adjust_dynamic_symbol): Likewise.
1134 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
1135 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1136 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
1137 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
1138 * elf32-lm32.c (lm32_elf_adjust_dynamic_symbol): Likewise.
1139 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
1140 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
1141 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1142 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1143 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
1144 * elf32-tic6x.c (elf32_tic6x_adjust_dynamic_symbol): Likewise.
1145 * elf32-tilepro.c (tilepro_elf_adjust_dynamic_symbol): Likewise.
1146 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
1147 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1148 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1149 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
1150 * elf64-x86-64.c (elf_x86_64_adjust_dynamic_symbol): Likewise.
1151 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
1152 * elfxx-tilegx.c (tilegx_elf_adjust_dynamic_symbol): Likewise.
1153
1154 2012-03-10 Edmar Wienskoski <edmar@freescale.com>
1155
1156 * archures.c: Add bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
1157 * bfd-in2.h: Regenerate.
1158 * cpu-powerpc.c (bfd_powerpc_archs): Add entries for
1159 bfd_mach_ppc_e5500 and bfd_mach_ppc_e6500.
1160
1161 2012-03-09 H.J. Lu <hongjiu.lu@intel.com>
1162
1163 PR ld/13817
1164 * elf32-i386.c (elf_i386_relocate_section): Restore
1165 R_386_IRELATIVE.
1166
1167 * elf64-x86-64.c (elf_x86_64_relocate_section): Restore
1168 R_X86_64_IRELATIVE.
1169
1170 2012-03-08 Tristan Gingold <gingold@adacore.com>
1171
1172 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Set maximum
1173 keylen according to archive kind. Set nextvbn and nextrfa lhd
1174 fields. Add comments.
1175
1176 2012-03-07 Nick Clifton <nickc@redhat.com>
1177
1178 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add tls_type
1179 field.
1180 (elf32_mn10300_link_hash_table): Add tls_ldm_got entry;
1181 (elf_mn10300_tdata): Define.
1182 (elf_mn10300_local_got_tls_type): Define.
1183 (elf_mn10300_howto_table): Add entries for R_MN10300_TLS_GD,
1184 R_MN10300_TLS_LD, R_MN10300_TLS_LDO, R_MN10300_TLS_GOTIE,
1185 R_MN10300_TLS_IE, R_MN10300_TLS_LE, R_MN10300_TLS_DPTMOD,
1186 R_MN10300_TLS_DTPOFF, R_MN10300_TLS_TPOFF relocs.
1187 (mn10300_reloc_map): Likewise.
1188 (elf_mn10300_tls_transition): New function.
1189 (dtpoff, tpoff, mn10300_do_tls_transition): New functions.
1190 (mn10300_elf_check_relocs): Add TLS support.
1191 (mn10300_elf_final_link_relocate): Likewise.
1192 (mn10300_elf_relocate_section): Likewise.
1193 (mn10300_elf_relax_section): Likewise.
1194 (elf32_mn10300_link_hash_newfunc): Initialise new field.
1195 (_bfd_mn10300_copy_indirect_symbol): New function.
1196 (elf32_mn10300_link_hash_table_create): Initialise new fields.
1197 (_bfd_mn10300_elf_size_dynamic_sections): Add TLS support.
1198 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1199 (_bfd_mn10300_elf_reloc_type_class): Allocate an
1200 elf_mn10300_obj_tdata structure.
1201 (elf_backend_copy_indirect_symbol): Define.
1202 * reloc.c (BFD_MN10300_TLS_GD, BFD_MN10300_TLS_LD,
1203 BFD_MN10300_TLS_LDO, BFD_MN10300_TLS_GOTIE, BFD_MN10300_TLS_IE,
1204 BFD_MN10300_TLS_LE, BFD_MN10300_TLS_DPTMOD,
1205 BFD_MN10300_TLS_DTPOFF, BFD_MN10300_TLS_TPOFF): New relocations.
1206 (BFD_RELOC_MN10300_32_PCREL, BFD_RELOC_MN10300_16_PCREL): Move to
1207 alongside other MN10300 relocations.
1208 * bfd-in2.h: Regenerate.
1209 * libbfd.h: Regenerate.
1210
1211 2012-03-06 Jakub Jelinek <jakub@redhat.com>
1212
1213 * elf64-x86-64.c (elf_x86_64_relocate_section): For R_X86_64_RELATIVE
1214 set relocate to TRUE.
1215
1216 2012-03-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1217
1218 PR ld/12152
1219 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Also ignore
1220 overflows for R_SPARC_UA32 in .stab sections.
1221
1222 2012-03-01 Alan Modra <amodra@gmail.com>
1223
1224 * elfxx-tilegx.c (tilegx_elf_relocate_section): Silence bogus warning.
1225
1226 2012-02-27 Alan Modra <amodra@gmail.com>
1227
1228 * elf32-sh.c (sh_elf_osec_to_segment): Check for elf flavour bfd
1229 before calling elf specific function.
1230 (sh_elf_osec_readonly_p): Test for error return from above.
1231
1232 2012-02-27 Alan Modra <amodra@gmail.com>
1233
1234 * elf32-spu.c (build_stub): Fix malloc under-allocation.
1235
1236 2012-02-25 Walter Lee <walt@tilera.com>
1237 * reloc.c: Add BFD_RELOC_TILEPRO_TLS_GD_CALL,
1238 BFD_RELOC_TILEPRO_IMM8_X0_TLS_GD_ADD,
1239 BFD_RELOC_TILEPRO_IMM8_X1_TLS_GD_ADD,
1240 BFD_RELOC_TILEPRO_IMM8_Y0_TLS_GD_ADD,
1241 BFD_RELOC_TILEPRO_IMM8_Y1_TLS_GD_ADD,
1242 BFD_RELOC_TILEPRO_TLS_IE_LOAD, BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE,
1243 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE,
1244 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_LO,
1245 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_LO,
1246 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HI,
1247 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HI,
1248 BFD_RELOC_TILEPRO_IMM16_X0_TLS_LE_HA,
1249 BFD_RELOC_TILEPRO_IMM16_X1_TLS_LE_HA,
1250 BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_LE,
1251 BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_LE,
1252 BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_LE,
1253 BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_LE,
1254 BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_LE,
1255 BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_LE,
1256 BFD_RELOC_TILEGX_TLS_GD_CALL, BFD_RELOC_TILEGX_IMM8_X0_TLS_GD_ADD,
1257 BFD_RELOC_TILEGX_IMM8_X1_TLS_GD_ADD,
1258 BFD_RELOC_TILEGX_IMM8_Y0_TLS_GD_ADD,
1259 BFD_RELOC_TILEGX_IMM8_Y1_TLS_GD_ADD, BFD_RELOC_TILEGX_TLS_IE_LOAD,
1260 BFD_RELOC_TILEGX_IMM8_X0_TLS_ADD,
1261 BFD_RELOC_TILEGX_IMM8_X1_TLS_ADD,
1262 BFD_RELOC_TILEGX_IMM8_Y0_TLS_ADD, BFD_RELOC_TILEGX_IMM8_Y1_TLS_ADD.
1263 Delete BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT,
1264 BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT,
1265 BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT,
1266 BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT,
1267 BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT,
1268 BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT,
1269 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT,
1270 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT,
1271 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD,
1272 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD,
1273 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD,
1274 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD,
1275 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD,
1276 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD,
1277 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD,
1278 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD,
1279 BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE,
1280 BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE,
1281 BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE,
1282 BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE,
1283 BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE,
1284 BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE,
1285 BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE,
1286 BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE.
1287 * elf32-tilepro.c (tilepro_elf_howto_table): Update tilepro
1288 relocations.
1289 (tilepro_reloc_map): Ditto.
1290 (tilepro_info_to_howto_rela): Ditto.
1291 (reloc_to_create_func): Ditto.
1292 (tilepro_tls_translate_to_le): New.
1293 (tilepro_tls_translate_to_ie): New.
1294 (tilepro_elf_tls_transition): New.
1295 (tilepro_elf_check_relocs): Handle new tls relocations.
1296 (tilepro_elf_gc_sweep_hook): Ditto.
1297 (allocate_dynrelocs): Ditto.
1298 (tilepro_elf_relocate_section): Ditto.
1299 (tilepro_replace_insn): New.
1300 (insn_mask_X1): New.
1301 (insn_mask_X0_no_dest_no_srca): New
1302 (insn_mask_X1_no_dest_no_srca): New
1303 (insn_mask_Y0_no_dest_no_srca): New
1304 (insn_mask_Y1_no_dest_no_srca): New
1305 (srca_mask_X0): New
1306 (srca_mask_X1): New
1307 (insn_tls_le_move_X1): New
1308 (insn_tls_le_move_zero_X0X1): New
1309 (insn_tls_ie_lw_X1): New
1310 (insn_tls_ie_add_X0X1): New
1311 (insn_tls_ie_add_Y0Y1): New
1312 (insn_tls_gd_add_X0X1): New
1313 (insn_tls_gd_add_Y0Y1): New
1314 * elfxx-tilegx.c (tilegx_elf_howto_table): Update tilegx
1315 relocations.
1316 (tilegx_reloc_map): Ditto.
1317 (tilegx_info_to_howto_rela): Ditto.
1318 (reloc_to_create_func): Ditto.
1319 (tilegx_elf_link_hash_table): New field disable_le_transition.
1320 (tilegx_tls_translate_to_le): New.
1321 (tilegx_tls_translate_to_ie): New.
1322 (tilegx_elf_tls_transition): New.
1323 (tilegx_elf_check_relocs): Handle new tls relocations.
1324 (tilegx_elf_gc_sweep_hook): Ditto.
1325 (allocate_dynrelocs): Ditto.
1326 (tilegx_elf_relocate_section): Ditto.
1327 (tilegx_copy_bits): New.
1328 (tilegx_replace_insn): New.
1329 (insn_mask_X1): New.
1330 (insn_mask_X0_no_dest_no_srca): New.
1331 (insn_mask_X1_no_dest_no_srca): New.
1332 (insn_mask_Y0_no_dest_no_srca): New.
1333 (insn_mask_Y1_no_dest_no_srca): New.
1334 (insn_mask_X0_no_operand): New.
1335 (insn_mask_X1_no_operand): New.
1336 (insn_mask_Y0_no_operand): New.
1337 (insn_mask_Y1_no_operand): New.
1338 (insn_tls_ie_ld_X1): New.
1339 (insn_tls_ie_ld4s_X1): New.
1340 (insn_tls_ie_add_X0X1): New.
1341 (insn_tls_ie_add_Y0Y1): New.
1342 (insn_tls_ie_addx_X0X1): New.
1343 (insn_tls_ie_addx_Y0Y1): New.
1344 (insn_tls_gd_add_X0X1): New.
1345 (insn_tls_gd_add_Y0Y1): New.
1346 (insn_move_X0X1): New.
1347 (insn_move_Y0Y1): New.
1348 (insn_add_X0X1): New.
1349 (insn_add_Y0Y1): New.
1350 (insn_addx_X0X1): New.
1351 (insn_addx_Y0Y1): New.
1352 * libbfd.h: Regenerate.
1353 * bfd-in2.h: Regenerate.
1354
1355 2012-02-25 Walter Lee <walt@tilera.com>
1356
1357 * config.bfd (tilegx-*-*): rename little endian vector; add big
1358 endian vector.
1359 (tilegxbe-*-*): New case.
1360 * configure.in (bfd_elf32_tilegx_vec): Rename...
1361 (bfd_elf32_tilegx_le_vec): ... to this.
1362 (bfd_elf32_tilegx_be_vec): New vector.
1363 (bfd_elf64_tilegx_vec): Rename...
1364 (bfd_elf64_tilegx_le_vec): ... to this.
1365 (bfd_elf64_tilegx_be_vec): New vector.
1366 * configure: Regenerate.
1367 * elf32-tilegx.c (TARGET_LITTLE_SYM): Rename.
1368 (TARGET_LITTLE_NAME): Ditto.
1369 (TARGET_BIG_SYM): Define.
1370 (TARGET_BIG_NAME): Define.
1371 * elf64-tilegx.c (TARGET_LITTLE_SYM): Rename.
1372 (TARGET_LITTLE_NAME): Ditto.
1373 (TARGET_BIG_SYM): Define.
1374 (TARGET_BIG_NAME): Define.
1375 * targets.c (bfd_elf32_tilegx_vec): Rename...
1376 (bfd_elf32_tilegx_le_vec): ... to this.
1377 (bfd_elf32_tilegx_be_vec): Declare.
1378 (bfd_elf64_tilegx_vec): Rename...
1379 (bfd_elf64_tilegx_le_vec): ... to this.
1380 (bfd_elf64_tilegx_be_vec): Declare.
1381 (_bfd_target_vector): Add / rename above vectors.
1382 * arctures.c (bfd_architecture): Define bfd_mach_tilegx32.
1383 * bfd-in2.h: Regenerate.
1384 * cpu-tilegx.c (bfd_tilegx32_arch): define.
1385 (bfd_tilegx_arch): link to bfd_tilegx32_arch.
1386
1387 2012-02-24 Nick Clifton <nickc@redhat.com>
1388
1389 PR ld/13730
1390 * reloc.c (bfd_generic_get_relocated_section_contents): Issue an
1391 error message instead of aborting, when an outofrange reloc is
1392 encountered.
1393
1394 2012-02-23 Iain Sandoe <idsandoe@googlemail.com>
1395
1396 * mach-o.c (bfd_mach_o_swap_in_non_scattered_reloc): New.
1397 (bfd_mach_o_canonicalize_one_reloc): Swap non-scattered reloc
1398 bit-fields when target and host differ in endian-ness. When
1399 PAIRs are non-scattered find the 'symbol' from the preceding
1400 reloc. Add FIXME re. reloc symbols on section boundaries.
1401 (bfd_mach_o_swap_out_non_scattered_reloc): New.
1402 (bfd_mach_o_write_relocs): Use bfd_mach_o_encode_non_scattered_reloc.
1403
1404 2012-02-17 Iain Sandoe <idsandoe@googlemail.com>
1405
1406 * mach-o-i386.c (i386_howto_table): Add support for 16 bit
1407 sect-diffs.
1408 (bfd_mach_o_i386_swap_reloc_in): Handle 16bit sect-diffs.
1409 (bfd_mach_o_i386_swap_reloc_out): Likewise.
1410
1411 2012-02-17 Tristan Gingold <gingold@adacore.com>
1412
1413 * reloc.c (BFD_RELOC_MACH_O_LOCAL_SECTDIFF):
1414 * libbfd.h: Regenerated.
1415 * bfd-in2.h: Likewise.
1416 * mach-o-i386.c (i386_howto_table): Include local sectdiff.
1417 (bfd_mach_o_i386_swap_reloc_in): Update for local sectdiff.
1418 (bfd_mach_o_i386_swap_reloc_out): Likewise.
1419
1420 2012-02-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1421
1422 * elf32-s390.c (elf_s390_relocate_section): Support basr in the
1423 GD->LE and LD->LE optimizations.
1424
1425 2012-02-16 Alan Modra <amodra@gmail.com>
1426
1427 PR binutils/13355
1428 * elf32-rx.c (elf32_rx_relax_section): Correct width check.
1429
1430 2012-02-13 Richard Henderson <rth@redhat.com>
1431
1432 PR ld/13621
1433 * linker.c (fix_syms): Force symbols outside any section into
1434 bfd_abs_section_ptr.
1435
1436 2012-02-13 Alan Modra <amodra@gmail.com>
1437
1438 * elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function.
1439 * elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare.
1440 * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define.
1441 * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define.
1442
1443 2012-02-11 Jan Kratochvil <jan.kratochvil@redhat.com>
1444 Nick Clifton <nickc@redhat.com>
1445
1446 * oasys.c (oasys_write_header): Fix compilation warning on zero-sized
1447 memset.
1448
1449 2012-02-10 Iain Sandoe <idsandoe@googlemail.com>
1450
1451 * mach-o.c (bfd_mach_o_build_seg_command): Count zerofill section
1452 vma additions in their logical, rather than physical order.
1453
1454 2012-02-10 Iain Sandoe <idsandoe@googlemail.com>
1455
1456 * mach-o.c (mach_o_section_name_xlat): Correct eh-frame section
1457 parameters.
1458 * mach-o-x86-64.c (text_section_names_xlat): New.
1459 (mach_o_x86_64_segsec_names_xlat): New.
1460 (bfd_mach_o_tgt_seg_table): Define to mach_o_x86_64_segsec_names_xlat.
1461 * mach-o-i386.c (text_section_names_xlat): Correct section parameters.
1462
1463 2012-02-10 Tristan Gingold <gingold@adacore.com>
1464
1465 * elfnn-ia64.c (elfNN_vms_object_p): Change comparison operator
1466 to avoid infinite loop. Add comments.
1467
1468 2012-02-09 H.J. Lu <hongjiu.lu@intel.com>
1469
1470 PR ld/13675
1471 * cpu-i386.c (bfd_arch_i386_fill): Updated to support multi byte
1472 nop instructions.
1473 (bfd_arch_i386_short_nop_fill): New.
1474 (bfd_arch_i386_long_nop_fill): Likewise.
1475 Use bfd_arch_i386_short_nop_fill in 32bit bfd_arch_info
1476 initializers. Use bfd_arch_i386_long_nop_fill on 64bit
1477 bfd_arch_info initializers.
1478
1479 * cpu-k1om.c (bfd_arch_i386_fill): Renamed to ...
1480 (bfd_arch_i386_short_nop_fill): This.
1481 Update bfd_arch_info initializers.
1482 * cpu-l1om.c: Likewise.
1483
1484 2012-02-08 Alan Modra <amodra@gmail.com>
1485
1486 * elflink.c (_bfd_elf_gc_mark_rsec): Mark weakdef syms too.
1487 (_bfd_elf_fix_symbol_flags): When a weakdef is def_regular, clear
1488 the correct h->u.weakdef.
1489
1490 2012-02-07 Alan Modra <amodra@gmail.com>
1491
1492 * elf.c (elf_find_function): Don't use internal_elf_sym.
1493 (_bfd_elf_maybe_function_sym): Likewise. Replace elf_symbol_type
1494 parameter with asymbol.
1495 * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise.
1496 * elf-bfd.h (_bfd_elf_maybe_function_sym): Update prototype.
1497 (struct elf_backend_data <maybe_function_sym>): Likewise.
1498
1499 2012-02-02 Vidya Praveen (vidya.praveen@atmel.com)
1500
1501 PR bfd/13410
1502 * elf32-avr.c (elf32_avr_relax_section): Correct the
1503 condition that qualifies the candidates for relaxation.
1504
1505 2012-02-02 Tristan Gingold <gingold@adacore.com>
1506
1507 * bfdio.c (real_fopen): Remove unused vms_modes variable.
1508
1509 2012-02-02 Tristan Gingold <gingold@adacore.com>
1510
1511 * mach-o.c (bfd_mach_o_read_header): Silent uninitialized
1512 variable warning.
1513
1514 2012-02-02 Tristan Gingold <gingold@adacore.com>
1515
1516 * archive.c (bfd_slurp_armap): Fix thinko in cast.
1517
1518 2012-01-31 H.J. Lu <hongjiu.lu@intel.com>
1519
1520 PR ld/13616
1521 * archures.c (bfd_arch_info): Add fill.
1522 (bfd_default_arch_struct): Add bfd_arch_default_fill.
1523 (bfd_arch_default_fill): New.
1524
1525 * configure.in: Set bfd version to 2.22.52.
1526 * configure: Regenerated.
1527
1528 * cpu-alpha.c: Add bfd_arch_default_fill to bfd_arch_info
1529 initializer.
1530 * cpu-arc.c: Likewise.
1531 * cpu-arm.c: Likewise.
1532 * cpu-avr.c: Likewise.
1533 * cpu-bfin.c: Likewise.
1534 * cpu-cr16.c: Likewise.
1535 * cpu-cr16c.c: Likewise.
1536 * cpu-cris.c: Likewise.
1537 * cpu-crx.c: Likewise.
1538 * cpu-d10v.c: Likewise.
1539 * cpu-d30v.c: Likewise.
1540 * cpu-dlx.c: Likewise.
1541 * cpu-epiphany.c: Likewise.
1542 * cpu-fr30.c: Likewise.
1543 * cpu-frv.c: Likewise.
1544 * cpu-h8300.c: Likewise.
1545 * cpu-h8500.c: Likewise.
1546 * cpu-hppa.c: Likewise.
1547 * cpu-i370.c: Likewise.
1548 * cpu-i860.c: Likewise.
1549 * cpu-i960.c: Likewise.
1550 * cpu-ia64.c: Likewise.
1551 * cpu-ip2k.c: Likewise.
1552 * cpu-iq2000.c: Likewise.
1553 * cpu-lm32.c: Likewise.
1554 * cpu-m10200.c: Likewise.
1555 * cpu-m10300.c: Likewise.
1556 * cpu-m32c.c: Likewise.
1557 * cpu-m32r.c: Likewise.
1558 * cpu-m68hc11.c: Likewise.
1559 * cpu-m68hc12.c: Likewise.
1560 * cpu-m68k.c: Likewise.
1561 * cpu-m88k.c: Likewise.
1562 * cpu-mcore.c: Likewise.
1563 * cpu-mep.c: Likewise.
1564 * cpu-microblaze.c: Likewise.
1565 * cpu-mips.c: Likewise.
1566 * cpu-mmix.c: Likewise.
1567 * cpu-moxie.c: Likewise.
1568 * cpu-msp430.c: Likewise.
1569 * cpu-mt.c: Likewise.
1570 * cpu-ns32k.c: Likewise.
1571 * cpu-openrisc.c: Likewise.
1572 * cpu-or32.c: Likewise.
1573 * cpu-pdp11.c: Likewise.
1574 * cpu-pj.c: Likewise.
1575 * cpu-plugin.c: Likewise.
1576 * cpu-powerpc.c: Likewise.
1577 * cpu-rl78.c: Likewise.
1578 * cpu-rs6000.c: Likewise.
1579 * cpu-rx.c: Likewise.
1580 * cpu-s390.c: Likewise.
1581 * cpu-score.c: Likewise.
1582 * cpu-sh.c: Likewise.
1583 * cpu-sparc.c: Likewise.
1584 * cpu-spu.c: Likewise.
1585 * cpu-tic30.c: Likewise.
1586 * cpu-tic4x.c: Likewise.
1587 * cpu-tic54x.c: Likewise.
1588 * cpu-tic6x.c: Likewise.
1589 * cpu-tic80.c: Likewise.
1590 * cpu-tilegx.c: Likewise.
1591 * cpu-tilepro.c: Likewise.
1592 * cpu-v850.c: Likewise.
1593 * cpu-vax.c: Likewise.
1594 * cpu-w65.c: Likewise.
1595 * cpu-we32k.c: Likewise.
1596 * cpu-xc16x.c: Likewise.
1597 * cpu-xstormy16.c: Likewise.
1598 * cpu-xtensa.c: Likewise.
1599 * cpu-z80.c: Likewise.
1600 * cpu-z8k.c: Likewise.
1601
1602 * cpu-i386.c: Include "libiberty.h".
1603 (bfd_arch_i386_fill): New.
1604 Add bfd_arch_i386_fill to bfd_arch_info initializer.
1605
1606 * cpu-k1om.c: Add bfd_arch_i386_fill to bfd_arch_info initializer.
1607 * cpu-l1om.c: Likewise.
1608
1609 * linker.c (default_data_link_order): Call abfd->arch_info->fill
1610 if fill size is 0.
1611
1612 * bfd-in2.h: Regenerated.
1613
1614 2012-01-27 Michael Eager <eager@eagercon.com>
1615
1616 * elf32-microblaze.c (create_got_section):
1617 Reuse existing .rela.got section.
1618
1619 2012-01-23 Alan Modra <amodra@gmail.com>
1620
1621 * elf-bfd.h: Formatting.
1622 (struct elf_backend_data): Add "maybe_function_sym".
1623 (_bfd_elf_maybe_function_sym): Declare.
1624 * elfxx-target.h (elf_backend_maybe_function_sym): Define.
1625 (elfNN_bed): Init new field.
1626 * elf.c (elf_find_function): Use maybe_function_sym.
1627 (_bfd_elf_maybe_function_sym): New function.
1628 * elf64-ppc.c (elf_backend_maybe_function_sym): Define.
1629 (ppc64_elf_maybe_function_sym): New function.
1630
1631 2012-01-20 Francois Gouget <fgouget@codeweavers.com>
1632
1633 PR binutils/13534
1634 * archive.c (_bfd_ar_sizepad): New function. Correctly install and
1635 pad the size field in an archive header.
1636 (_bfd_generic_read_ar_hdr_mag): Use the correct type and scan
1637 function for the archive size field.
1638 (bfd_generic_openr_next_archived_file): Likewise.
1639 (do_slurp_coff_armap): Likewise.
1640 (_bfd_write_archive_contents): Likewise.
1641 (_bfd_bsd44_write_ar_hdr): Use the new function.
1642 (bfd_ar_hdr_from_filesystem): Likewise.
1643 (_bfd_write_archive_contents): Likewise.
1644 (bsd_write_armap): Likewise.
1645 (coff_write_armap): Likewise.
1646 * archive64.c (bfd_elf64_archive_write_armap): Likewise.
1647 * bfdio.c (bfd_bread): Use correct type for archive element
1648 sizes.
1649 * ar.c (open_inarch): Likewise.
1650 (extract_file): Likewise.
1651 * libbfd-in.h (struct areltdata): Use correct types for
1652 parsed_size and extra_size fields.
1653 Prototype _bfd_ar_sizepad function.
1654 * libbfd.h: Regenerate.
1655
1656 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
1657
1658 * elf.c (elfcore_write_prpsinfo): Provide unconditionally.
1659 Return NULL if core file generation is unsupported.
1660 (elfcore_write_prstatus): Likewise.
1661 * elf32-arm.c (elf32_arm_nabi_write_core_note): New function.
1662 (elf_backend_write_core_note): Define.
1663
1664 2012-01-19 Tristan Gingold <gingold@adacore.com>
1665
1666 * pef.c: Add a comment.
1667 * xsym.c: Likewise.
1668
1669 2012-01-17 Alan Modra <amodra@gmail.com>
1670
1671 * elf32-ppc.c (ppc_elf_write_core_note <NT_PRPSINFO>): Don't leave
1672 trailing garbage in the note.
1673 * elf64-ppc.c (ppc64_elf_write_core_note <NT_PRPSINFO>): Likewise.
1674
1675 2012-01-16 Daniel Green <venix1@gmail.com>
1676
1677 PR ld/13491
1678 * coff-i386.c (coff_i386_rtype_to_howto <R_SECREL32>): Test
1679 h->root.type not h->type.
1680 * coff-x86_64.c (coff_amd64_rtype_to_howto <R_AMD64_SECREL>): Likewise.
1681
1682 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
1683
1684 * mach-o.c (bfd_mach_o_build_dysymtab_command): Handle absolute
1685 indirect symbols.
1686
1687 2012-01-13 Iain Sandoe <idsandoe@googlemail.com>
1688
1689 * mach-o.c (bfd_mach_o_write_relocs): Move computation of relocs file
1690 position from here... to (bfd_mach_o_build_seg_command): Here.
1691
1692 2012-01-12 Iain Sandoe <idsandoe@googlemail.com>
1693
1694 * mach-o.c (bfd_mach_o_count_indirect_symbols): New.
1695 (bfd_mach_o_build_dysymtab_command): Populate indirect symbol table.
1696 * mach-o.h (bfd_mach_o_asymbol): Move declaration to start of the
1697 file. (bfd_mach_o_section): Add indirect_syms field.
1698
1699 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
1700
1701 * mach-o.c (bfd_mach_o_build_seg_command): Separate computation of
1702 vmsize from filesize. Don't compute offsets or file sizes for
1703 zerofill sections.
1704
1705 2012-01-11 Iain Sandoe <idsandoe@googlemail.com>
1706
1707 * mach-o.c (bfd_mach_o_build_commands): Make the building of each
1708 command type independent.
1709
1710 2012-01-11 Alan Modra <amodra@gmail.com>
1711
1712 * elf64-ppc.c: Define more insns used in plt call stubs.
1713 (ppc64_elf_brtaken_reloc): Assume isa version 2 or above.
1714 (ppc64_elf_relocate_section): Likewise.
1715 (enum ppc_stub_type): Add ppc_stub_plt_call_r2save.
1716 (struct ppc_link_hash_table): Increase size of stub_count array.
1717 Add plt_stub_align and plt_thread_safe.
1718 (ALWAYS_USE_FAKE_DEP, ALWAYS_EMIT_R2SAVE): Define.
1719 (plt_stub_size, plt_stub_pad): New functions.
1720 (build_plt_stub): Emit barriers for power7 thread safety. Don't
1721 emit needless save of r2.
1722 (build_tls_get_addr_stub): Adjust params.
1723 (ppc_build_one_stub): Handle ppc_stub_plt_call_r2save and aligning
1724 plt stubs. Adjust build_*plt_stub calls.
1725 (ppc_size_one_stub): Similarly.
1726 (ppc64_elf_size_stubs): Accept plt_thread_safe and plt_stub_align
1727 params. Choose default for plt_thread_safe based on existence of
1728 calls to thread creation functions. Modify plt_call to
1729 plt_call_r2save when no tocsave reloc found. Align tail of stub
1730 sections.
1731 (ppc64_elf_build_stubs): Align tail of stub sections. Adjust
1732 output of stub statistics.
1733 (ppc64_elf_relocate_section): Handle ppc_stub_plt_call_r2save.
1734 * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
1735
1736 2012-01-10 H.J. Lu <hongjiu.lu@intel.com>
1737
1738 PR ld/13581
1739 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove ABI_64_P
1740 check on R_X86_64_PCXX.
1741
1742 2012-01-10 Tristan Gingold <gingold@adacore.com>
1743
1744 * mach-o.c (bfd_mach_o_build_commands): Avoid uninitialized false
1745 warning.
1746
1747 2012-01-10 Tristan Gingold <gingold@adacore.com>
1748
1749 * bfdio.c (bfd_tell): Handle nested archives.
1750 (bfd_seek): Ditto.
1751 * cache.c (bfd_cache_lookup_worker): Ditto.
1752 * archive.c (_bfd_get_elt_at_filepos): Remove code dealing with
1753 nested archives.
1754 (bfd_generic_openr_next_archived_file): Likewise.
1755
1756 2012-01-09 Iain Sandoe <idsandoe@googlemail.com>
1757
1758 * mach-o.c (bfd_mach_o_bfd_copy_private_symbol_data): Implement.
1759 (bfd_mach_o_write_symtab): Remove handling for indirect syms.
1760 (bfd_mach_o_primary_symbol_sort_key): Likewise.
1761 (bfd_mach_o_cf_symbols): Likewise.
1762 (bfd_mach_o_sort_symbol_table): Remove.
1763 (bfd_mach_o_mangle_symbols): Adjust arguments, remove handling
1764 for indirect and dysymtab counts. Do the symbol sorting here.
1765 (bfd_mach_o_build_dysymtab_command): Count the symbol types here.
1766 Make the indirect symbols a TODO.
1767 (bfd_mach_o_build_commands): Adjust call to bfd_mach_o_mangle_symbols.
1768 (bfd_mach_o_make_empty_symbol): Specifically flag unset symbols with
1769 a non-zero value.
1770 (bfd_mach_o_read_symtab_symbol): Record the symbol index.
1771 (bfd_mach_o_read_symtab_symbol): Adjust recording of global status.
1772 * mach-o.h (mach_o_data_struct): Remove indirect and dysymtab entries.
1773 (IS_MACHO_INDIRECT): Remove.
1774 (SYM_MACHO_FIELDS_UNSET, SYM_MACHO_FIELDS_NOT_VALIDATED): New.
1775
1776 2012-01-06 Nick Clifton <nickc@redhat.com>
1777
1778 PR binutils/13121
1779 * reloc.c (bfd_generic_lookup_section_flags): Rename 'finfo' to
1780 'flaginfo' to avoid conflicts with AIX system headers.
1781
1782 2012-01-06 Tristan Gingold <gingold@adacore.com>
1783
1784 * bfdio.c (bfd_bread): Use arelt_size macro.
1785
1786 2012-01-06 Tristan Gingold <gingold@adacore.com>
1787
1788 * config.bfd (i[3-7]86-*-darwin*): Define targ64_selvecs.
1789
1790 2012-01-05 Nick Clifton <nickc@redhat.com>
1791
1792 PR ld/12161
1793 * elf32-avr.c (elf32_avr_relax_delete_bytes): Read in relocs if
1794 necessary.
1795
1796 2012-01-05 Jan Kratochvil <jan.kratochvil@redhat.com>
1797
1798 Fix zero registers core files when built by gcc-4.7.
1799 * elf64-x86-64.c (elf_x86_64_write_core_note): Remove variables p and
1800 size. Call elfcore_write_note for the local variables. Remove the
1801 final elfcore_write_note call. Add NOTREACHED comments.
1802
1803 2012-01-04 Tristan Gingold <gingold@adacore.com>
1804
1805 * mach-o.c (bfd_mach_o_fat_stat_arch_elt): New function.
1806 (bfd_mach_o_generic_stat_arch_elt): Adjust.
1807
1808 2012-01-04 Tristan Gingold <gingold@adacore.com>
1809
1810 * mach-o.c (bfd_mach_o_fat_member_init): New function.
1811 (bfd_mach_o_openr_next_archived_file): Reindent.
1812 Adjust to call bfd_mach_o_fat_member_init.
1813 (bfd_mach_o_fat_extract): Adjust to call bfd_mach_o_fat_member_init.
1814
1815 2012-01-04 Tristan Gingold <gingold@adacore.com>
1816
1817 * mach-o-x86-64.c (bfd_mach_o_x86_64_swap_reloc_out): Handle
1818 BFD_RELOC_32, BFD_RELOC_MACH_O_X86_64_PCREL32_1,
1819 BFD_RELOC_MACH_O_X86_64_PCREL32_2,
1820 BFD_RELOC_MACH_O_X86_64_PCREL32_4,
1821 BFD_RELOC_MACH_O_X86_64_BRANCH32,
1822 BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32,
1823 BFD_RELOC_MACH_O_X86_64_GOT.
1824
1825 2012-01-04 Tristan Gingold <gingold@adacore.com>
1826
1827 * mach-o.h (bfd_mach_o_fvmlib_command): New structure.
1828 (bfd_mach_o_load_command): Add fvmlib field.
1829
1830 * mach-o.c (bfd_mach_o_read_fvmlib): New function.
1831 (bfd_mach_o_read_command): Handle fvmlib.
1832
1833 2012-01-04 Tristan Gingold <gingold@adacore.com>
1834
1835 * mach-o.c (bfd_mach_o_convert_architecture): Reindent.
1836 Decode msubtype for ARM.
1837
1838 2012-01-04 Tristan Gingold <gingold@adacore.com>
1839
1840 * mach-o.c (bfd_mach_o_get_synthetic_symtab): Add comments.
1841
1842 2012-01-04 Tristan Gingold <gingold@adacore.com>
1843
1844 * mach-o.h: Reindent header.
1845 (bfd_mach_o_encryption_info_command): New structure.
1846 (bfd_mach_o_load_command): Add encryption_info field.
1847
1848 * mach-o.c (bfd_mach_o_read_encryption_info): New function.
1849 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_ENCRYPTION_INFO.
1850 (bfd_mach_o_read_command): Adjust error message.
1851
1852 2012-01-04 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
1853
1854 * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Factor out the part
1855 which reads DWARF2 and stores in stash from find_line.
1856 (find_line) Call _bfd_dwarf2_slurp_debug_info.
1857 * libbfd-in.h (_bfd_dwarf2_slurp_debug_info): Add declaration.
1858 * libbfd.h (_bfd_dwarf2_slurp_debug_info): Regenerate.
1859 * mach-o.c (dsym_subdir): The name of subdir where debug
1860 information may be stored.
1861 (bfd_mach_o_lookup_uuid_command): New. Lookup a load command whose
1862 type is UUID.
1863 (bfd_mach_o_dsym_for_uuid_p): New. Check if the specified BFD is
1864 corresponding to the executable.
1865 (bfd_mach_o_find_dsym): New. Find a debug information BFD in the
1866 specified binary file.
1867 (bfd_mach_o_follow_dsym): New. Find a debug information BFD for
1868 the original BFD.
1869 (bfd_mach_o_find_nearest_line): Check dSYM files for Mach-O
1870 executables, dylibs, and bundles.
1871 (bfd_mach_o_close_and_cleanup): Clean up BFDs for the dSYM file.
1872 * mach-o.h (dsym_bfd): The BFD of the dSYM file.
1873
1874 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
1875
1876 * mach-o.c (bfd_mach_o_mangle_symbols): Put in the section index
1877 for stabd symbols.
1878 (bfd_mach_o_primary_symbol_sort_key): Adjust for stabs.
1879 (bfd_mach_o_cf_symbols): Likewise.
1880
1881 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
1882
1883 * mach-o.c (bfd_mach_o_mangle_symbols): Correct typo.
1884
1885 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
1886
1887 * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
1888 as the value of an indirect symbol. Keep the string table index in
1889 non-indirect syms for reference.
1890 (bfd_mach_o_write_dysymtab): New.
1891 (bfd_mach_o_primary_symbol_sort_key): New.
1892 (bfd_mach_o_cf_symbols): New.
1893 (bfd_mach_o_sort_symbol_table): New.
1894 (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols.
1895 If we are emitting a dysymtab, process indirect symbols and count the
1896 number of each other kind.
1897 (bfd_mach_o_mangle_sections): New.
1898 (bfd_mach_o_write_contents): Split out some pre-requisite code into
1899 the command builder. Write dysymtab if the command is present.
1900 (bfd_mach_o_count_sections_for_seg): New.
1901 (bfd_mach_o_build_seg_command): New.
1902 (bfd_mach_o_build_dysymtab_command): New.
1903 (bfd_mach_o_build_commands): Reorganize to support the fact that some
1904 commands are optional and should not be emitted if there are no
1905 sections or symbols.
1906 (bfd_mach_o_set_section_contents): Amend comment.
1907 * mach-o.h: Amend and add to comments.
1908 (mach_o_data_struct): Add fields for dysymtab symbols counts and a
1909 pointer to the indirects, when present.
1910 (bfd_mach_o_should_emit_dysymtab): New macro.
1911 (IS_MACHO_INDIRECT): Likewise.
1912
1913 For older changes see ChangeLog-2011
1914 \f
1915 Local Variables:
1916 mode: change-log
1917 left-margin: 8
1918 fill-column: 74
1919 version-control: never
1920 End: