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