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