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