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