1 2012-01-03 Iain Sandoe <idsandoe@googlemail.com>
3 * mach-o.c (bfd_mach_o_write_symtab): Fill in the string table index
4 as the value of an indirect symbol. Keep the string table index in
5 non-indirect syms for reference.
6 (bfd_mach_o_write_dysymtab): New.
7 (bfd_mach_o_primary_symbol_sort_key): New.
8 (bfd_mach_o_cf_symbols): New.
9 (bfd_mach_o_sort_symbol_table): New.
10 (bfd_mach_o_mangle_symbols): Return early if no symbols. Sort symbols.
11 If we are emitting a dysymtab, process indirect symbols and count the
12 number of each other kind.
13 (bfd_mach_o_mangle_sections): New.
14 (bfd_mach_o_write_contents): Split out some pre-requisite code into
15 the command builder. Write dysymtab if the command is present.
16 (bfd_mach_o_count_sections_for_seg): New.
17 (bfd_mach_o_build_seg_command): New.
18 (bfd_mach_o_build_dysymtab_command): New.
19 (bfd_mach_o_build_commands): Reorganize to support the fact that some
20 commands are optional and should not be emitted if there are no
22 (bfd_mach_o_set_section_contents): Amend comment.
23 * mach-o.h: Amend and add to comments.
24 (mach_o_data_struct): Add fields for dysymtab symbols counts and a
25 pointer to the indirects, when present.
26 (bfd_mach_o_should_emit_dysymtab): New macro.
27 (IS_MACHO_INDIRECT): Likewise.
29 2011-12-24 Jan Kratochvil <jan.kratochvil@redhat.com>
31 * elf32-rl78.c (rl78_elf_relocate_section, rl78_dump_symtab)
32 (rl78_elf_relax_section): Remove debug prints.
34 2011-12-23 Jan Kratochvil <jan.kratochvil@redhat.com>
36 * elf32-rl78.c (rl78_elf_relocate_section, rl78_elf_relax_section): Use
39 2011-12-23 Jan Kratochvil <jan.kratochvil@redhat.com>
41 * elf32-rl78.c (prev_alignment, sec_start): Remove unused variables.
43 2011-12-23 Tristan Gingold <gingold@adacore.com>
45 * vms-lib.c (vms_traverse_index): Move pointer update code.
47 2011-12-22 DJ Delorie <dj@redhat.com>
49 * elf32-rl78.c (rl78_elf_howto_table): Add R_RL78_RH_RELAX.
50 (rl78_reloc_map): Add BFD_RELOC_RL78_RELAX.
51 (rl78_elf_relocate_section): Add R_RL78_RH_RELAX, R_RL78_RH_SFR,
53 (rl78_elf_finish_dynamic_sections): Only validate PLT section if
54 we didn't relax anything, as relaxing might remove a PLT reference
55 after we've set up the table.
56 (elf32_rl78_relax_delete_bytes): New.
57 (reloc_bubblesort): New.
58 (rl78_offset_for_reloc): New.
60 (rl78_elf_relax_section): Add support for relaxing long
61 instructions into short ones.
63 2011-12-22 Martin Schwidefsky <schwidefsky@de.ibm.com>
65 * elf32-s390.c (elf_s390_relocate_section): Add check for debugging
66 section in LD to LE linker relaxation for R_390_TLS_LDO32.
67 * elf64-s390.c (elf_s390_relocate_section): Likewise for
70 2011-12-21 Ulrich Weigand <ulrich.weigand@linaro.org>
72 * elf32-arm.c (elf32_arm_nabi_grok_psinfo): Fill in core_pid.
74 2011-12-19 Iain Sandoe <idsandoe@googlemail.com>
76 * mach-o-i386.c (bfd_mach_o_section_type_valid_for_tgt): Define NULL.
77 * mach-o-target.c (bfd_mach_o_backend_data): Initialize
78 bfd_mach_o_section_type_valid_for_tgt
79 * mach-o-x86-64.c (bfd_mach_o_section_type_valid_for_x86_64): New.
80 (bfd_mach_o_section_type_valid_for_tgt): Set to
81 bfd_mach_o_section_type_valid_for_x86_64.
82 * mach-o.c (bfd_mach_o_section_type_name): Reorder and eliminate dup.
83 (bfd_mach_o_section_attribute_name): Reorder.
84 (bfd_mach_o_get_section_type_from_name): If the target has defined a
85 validator for section types, then use it.
86 * mach-o.h (bfd_mach_o_get_section_type_from_name): Alter declaration
89 2011-12-19 Chung-Lin Tang <cltang@codesourcery.com>
91 * reloc.c (BFD_RELOC_MIPS16_TLS_GD,BFD_RELOC_MIPS16_TLS_LDM,
92 BFD_RELOC_MIPS16_TLS_DTPREL_HI16,BFD_RELOC_MIPS16_TLS_DTPREL_LO16,
93 BFD_RELOC_MIPS16_TLS_GOTTPREL,BFD_RELOC_MIPS16_TLS_TPREL_HI16,
94 BFD_RELOC_MIPS16_TLS_TPREL_LO16): New relocations for MIPS16 TLS.
95 * bfd-in2.h (bfd_reloc_code_real): Regenerate.
96 * libbfd.h (bfd_reloc_code_real_names): Regenerate.
97 * elf32-mips.c (elf_mips16_howto_table_rel): Add R_MIPS16_TLS_*
99 (mips16_reloc_map): Add BFD_RELOC_MIPS16_TLS_* to R_MIPS16_TLS_*
101 * elfn32-mips.c (elf_mips16_howto_table_rel,
102 elf_mips16_howto_table_rela): Add R_MIPS16_TLS_* entries.
103 (mips16_reloc_map): Add BFD_RELOC_MIPS16_TLS_* to R_MIPS16_TLS_*
105 * elf64-mips.c (mips16_elf64_howto_table_rel,
106 mips16_elf64_howto_table_rela): Add R_MIPS16_TLS_* entries.
107 (mips16_reloc_map): Add BFD_RELOC_MIPS16_TLS_* to R_MIPS16_TLS_*
109 * elfxx-mips.c (TLS_RELOC_P,mips16_reloc_p,
110 _bfd_mips_elf_check_relocs): Add cases for R_MIPS16_TLS_* relocations.
111 (tls_gd_reloc_p): Add R_MIPS16_TLS_GD case.
112 (tls_ldm_reloc_p): Add R_MIPS16_TLS_LDM case.
113 (tls_gottprel_reloc_p): Add R_MIPS16_TLS_GOTTPREL case.
114 (mips_elf_calculate_relocation): Add cases for R_MIPS16_TLS_*,
115 R_MIPS_TLS_DTPREL32/64, and R_MIPS_TLS_TPREL32/64 relocations.
117 2011-12-19 Chung-Lin Tang <cltang@codesourcery.com>
118 Catherine Moore <clm@codesourcery.com>
119 Sandra Loosemore <sandra@codesourcery.com>
120 Richard Sandiford <rdsandiford@googlemail.com>
122 * elfxx-mips.c (mips_elf_local_pic_function_p): Return true when
123 H is a MIPS16 function with a kept 32-bit stub. Update comments.
124 (mips_elf_get_la25_target): New function.
125 (mips_elf_add_la25_intro): Change to use mips_elf_get_la25_target().
126 (mips_elf_add_la25_stub): Move compute of use_trampoline_p down,
127 change to use mips_elf_get_la25_target().
128 (mips_elf_relocation_needs_la25_stub): Add target_is_16_bit_code_p
129 parameter, add switch case for R_MIPS16_26.
130 (mips_elf_calculate_relocation): Redirect relocation to point to the
131 LA25 stub if it exists, instead of the MIPS16 stub. Update arguments
132 of call to mips_elf_relocation_needs_la25_stub(), don't use la25 stub
133 for mips16->mips16 calls.
134 (_bfd_mips_elf_check_relocs): Update arguments of call to
135 mips_elf_relocation_needs_la25_stub().
136 (mips_elf_create_la25_stub): Change to use mips_elf_get_la25_target().
138 2011-12-16 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
140 * mach-o-i386.c (TARGET_PRIORITY): Define as 0 (top priority)
141 * mach-o-target.c (TARGET_NAME): Use TARGET_PRIORITY
142 * mach-o-x86-64.c (TARGET_PRIORITY): Define as 0 (top priority)
143 * mach-o.c (bfd_mach_o_header_p): Remove special handling for
145 (TARGET_PRIORITY) Set 1 for mach-o-be and mach-o-le, and set 0 for
148 2011-12-15 Kevin Buettner <kevinb@redhat.com>
150 * elf32-am33lin.c (elf32_am33lin_grok_prstatus): Add case
151 to correspond to a smaller ELF_NGREG defined by the kernel.
153 2011-12-15 H.J. Lu <hongjiu.lu@intel.com>
155 * elf64-x86-64.c (ELF32_DYNAMIC_INTERPRETER): Set to
158 2011-12-15 Iain Sandoe <iains@gcc.gnu.org>
160 * mach-o.c (bfd_mach_o_mkobject_init): Initialize dyn_reloc_cache.
161 (bfd_mach_o_close_and_cleanup): Only cleanup Mach-O private data
164 2011-12-15 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
166 * mach-o.c (bfd_mach_o_canonicalize_reloc): Update relocation
167 table only when there isn't the cahce.
168 (bfd_mach_o_get_dynamic_reloc_upper_bound): Need one more space
169 for a pointer for the watchdog.
170 (bfd_mach_o_canonicalize_dynamic_reloc): Utilize cache like
171 bfd_mach_o_canonicalize_reloc.
172 (bfd_mach_o_close_and_cleanup): Call bfd_mach_o_free_cached_info.
173 (bfd_mach_o_free_cached_info): Free up cache data.
174 * mach-o.h (reloc_cache): A place to store cache of dynamic relocs.
175 (bfd_mach_o_free_cached_info): Add declaration.
177 2011-12-15 Iain Sandoe <iains@gcc.gnu.org>
179 * mach-o-target.c (bfd_mach_o_bfd_set_private_flags): Use
180 bfd_mach_o_bfd_set_private_flags.
181 * mach-o.c (bfd_mach_o_bfd_set_private_flags): New.
182 * mach-o.h (bfd_mach_o_bfd_set_private_flags): Declare.
184 2011-12-14 Nick Clifton <nickc@redhat.com>
187 * elfcode.h (elf_checksum_contents): Read in the section's
188 contents if they are not already available, and the section
189 actually has some contents.
191 * compress.c (bfd_get_full_section_contents): Use zmalloc to
192 allocate the buffers so that excess bytes are guaranteed to be
195 2011-12-14 Iain Sandoe <iains@gcc.gnu.org>
197 * mach-o-i386.c (text_section_names_xlat): New table.
198 (data_section_names_xlat): Likewise.
199 (import_section_names_xlat): Likewise.
200 (mach_o_i386_segsec_names_xlat): Likewise.
201 (bfd_mach_o_tgt_seg_table): Use new tables.
202 * mach-o-x86-64.c (bfd_mach_o_tgt_seg_table): Set NULL.
203 * mach-o.c (mach_o_section_name_xlat, mach_o_segment_name_xlat):
204 Move to mach-o.h as typedefs.
205 (text_section_names_xlat): Update for current GCC usage.
206 (data_section_names_xlat): Likewise.
207 (dwarf_section_names_xlat): Likewise.
208 (objc_section_names_xlat): New table.
209 (segsec_names_xlat): Add objc table.
210 (bfd_mach_o_normalize_section_name): Replace with...
211 (bfd_mach_o_section_data_for_mach_sect): New.
212 (bfd_mach_o_section_data_for_bfd_name): New.
213 (bfd_mach_o_section_data_for_bfd_name): Update to use additional data.
214 (bfd_mach_o_convert_section_name_to_mach_o): Likewise.
215 (bfd_mach_o_bfd_copy_private_section_data): Implement.
216 (bfd_mach_o_write_symtab): Write a zero-length string as the first entry
217 for compatibility with system tools.
218 (bfd_mach_o_build_commands): Update section alignment info.
219 (bfd_mach_o_new_section_hook): Use translation table data to define
220 default section flags, type, attributes and alignment, when available.
221 (bfd_mach_o_init_section_from_mach_o): Add TODO comment.
222 (bfd_mach_o_section_type_name): Add 'symbol_stubs'.
223 (bfd_mach_o_section_attribute_name): Add 'self_modifying_code'.
224 (bfd_mach_o_get_section_type_from_name): Change "not-found" return
226 (bfd_mach_o_tgt_seg_table): Set default NULL.
227 * mach-o.h (bfd_mach_o_segment_command): Use define for name length.
228 (bfd_mach_o_backend_data): Move until after contents are defined.
229 (bfd_mach_o_normalize_section_name): Remove.
230 (bfd_mach_o_convert_section_name_to_bfd): Declare.
231 (mach_o_section_name_xlat): Declare.
232 (mach_o_segment_name_xlat): Declare.
233 (bfd_mach_o_section_data_for_mach_sect): Declare.
234 (bfd_mach_o_section_data_for_bfd_name): Declare.
236 2011-12-13 Shinichiro Hamaji <shinichiro.hamaji@gmail.com>
238 * dwarf2.c (bfd_dwarf2_cleanup_debug_info): Accept stash as an
239 argument like other functions to support formats other than ELF.
240 * elf-bfd.h (bfd_dwarf2_cleanup_debug_info): Move to bfd-in.h.
241 * elf.c (_bfd_elf_close_and_cleanup): Pass dwarf2_find_line_info
242 in tdata as a parameter.
243 * libbfd-in.h (bfd_dwarf2_cleanup_debug_info): Move from
245 * libbfd.h (bfd_dwarf2_cleanup_debug_info): Regenerate.
246 * mach-o-target.c (bfd_mach_o_close_and_cleanup): Remove the
248 (bfd_mach_o_find_nearest_line): Likewise.
249 * mach-o.c (bfd_mach_o_find_nearest_line): Add the definition
250 which calls _bfd_dwarf2_find_nearest_line.
251 (bfd_mach_o_close_and_cleanup): Likewise.
252 * mach-o.h (mach_o_data_struct): Add dwarf2_find_line_info.
253 (bfd_mach_o_find_nearest_line): Add declaration.
254 (bfd_mach_o_close_and_cleanup): Add declaration.
256 2011-12-13 Tristan Gingold <gingold@adacore.com>
258 * mach-o.c (bfd_mach_o_read_symtab_symbols): Make global. Remove
260 (bfd_mach_o_section_get_entry_size): Make global.
261 (bfd_mach_o_section_get_nbr_indirect): Likewise.
262 (bfd_mach_o_read_symtab_strtab): Likewise.
263 (struct bfd_mach_o_xlat_name): Move to mach-o.h
264 (bfd_mach_o_print_flags): Move to binutils/od-macho.c
265 (bfd_mach_o_get_name_of_null, bfd_mach_o_get_name): Likewise.
266 (bfd_mach_o_cpu_name, bfd_mach_o_filetype_name): Likewise.
267 (bfd_mach_o_header_flags_name): Likewise.
268 (bfd_mach_o_load_command_name): Likewise.
269 (bfd_mach_o_print_private_header): Likewise.
270 (bfd_mach_o_print_section_map, bfd_mach_o_print_section): Likwise.
271 (bfd_mach_o_print_segment, bfd_mach_o_print_dysymtab): Likewise.
272 (bfd_mach_o_print_dyld_info): Likewise.
273 (bfd_mach_o_print_private_bfd_data): Remove.
274 (bfd_mach_o_type_name): Make global.
275 (bfd_mach_o_section_attribute_name): Likewise.
276 * mach-o.h (bfd_mach_o_xlat_name): Added.
277 (bfd_mach_o_section_get_nbr_indirect)
278 (bfd_mach_o_section_get_entry_size)
279 (bfd_mach_o_read_symtab_symbols)
280 (bfd_mach_o_read_symtab_strtab)
281 (bfd_mach_o_section_attribute_name)
282 (bfd_mach_o_section_type_name): Likewise.
283 * mach-o-target.c (bfd_mach_o_bfd_print_private_bfd_data): Define.
285 2011-12-13 Chung-Lin Tang <cltang@codesourcery.com>
287 * elfxx-mips.c (mips_elf_calculate_relocation): Correct
288 R_MIPS16_HI16/R_MIPS16_LO16 handling of two cleared lower bits,
291 2011-12-12 Iain Sandoe <iains@gcc.gnu.org>
293 * mach-o.c (bfd_mach_o_read_section_32): Null-terminate sectname.
294 (bfd_mach_o_read_section_64): Likewise.
296 2011-12-11 John Davis Anglin <dave.anglin@nrc-cnrc.gc.ca>
299 * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
300 R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations to
301 R_PARISC_DPREL21L when not doing a shared link. Likewise convert
302 R_PARISC_TLS_GD14R, R_PARISC_TLS_LDM14R and R_PARISC_TLS_IE14R to
303 R_PARISC_DPREL14R. Handle R_PARISC_TLS_GD21L, R_PARISC_TLS_LDM21L
304 and R_PARISC_TLS_IE21L with R_PARISC_DLTIND21L.
306 2011-12-10 David Daney <david.daney@cavium.com>
308 * elfxx-mips.c (mips_elf_link_hash_table.rld_value): Remove.
309 (mips_elf_link_hash_table.rld_symbol): New field;
310 (MIPS_ELF_RLD_MAP_SIZE): New macro.
311 (_bfd_mips_elf_add_symbol_hook): Remember __rld_obj_head symbol
313 (_bfd_mips_elf_create_dynamic_sections): Remember __rld_map symbol
315 (_bfd_mips_elf_size_dynamic_sections): Set correct size for .rld_map.
316 (_bfd_mips_elf_finish_dynamic_symbol): Remove .rld_map handling.
317 (_bfd_mips_elf_finish_dynamic_sections): Use rld_symbol to
318 calculate DT_MIPS_RLD_MAP value.
319 (_bfd_mips_elf_link_hash_table_create): Initialize rld_symbol,
320 quit initializing rld_value.
322 2011-12-08 Andrew Pinski <apinski@cavium.com>
323 Adam Nemet <anemet@caviumnetworks.com>
325 * archures.c (bfd_mach_mips_octeon2): New macro
326 * bfd-in2.h: Regenerate.
327 * cpu-mips.c (I_mipsocteon2): New enum value.
328 (arch_info_struct): Add bfd_mach_mips_octeon2.
329 * elfxx-mips.c (_bfd_elf_mips_mach): Support E_MIPS_MACH_OCTEON2.
330 (mips_set_isa_flags): Add bfd_mach_mips_octeon2.
331 (mips_mach_extensions): Add bfd_mach_mips_octeon2.
333 2011-12-07 Alan Modra <amodra@gmail.com>
336 * elflink.c (elf_gc_sweep_symbol): Discard unmarked symbols
337 defined in shared libraries.
339 2011-12-07 Tristan Gingold <gingold@adacore.com>
341 * mach-o.c (bfd_mach_o_canonicalize_symtab): Fix indentation.
342 Adjust the condition.
343 (bfd_mach_o_read_symtab_symbol): Now returns a bfd_boolean.
344 Adjust return statements.
345 (bfd_mach_o_read_symtab_strtab): Likewise.
346 (bfd_mach_o_read_symtab_symbols): Likewise.
347 (bfd_mach_o_scan_start_address): Likewise. Make it static.
348 (bfd_mach_o_scan): Likewise.
349 (bfd_mach_o_read_dysymtab_symbol): Remove unused function.
350 (bfd_mach_o_header_p): Adjust call.
351 (bfd_mach_o_cpu_name): Make it const.
352 (bfd_mach_o_filetype_name): Likewise.
353 (bfd_mach_o_header_flags_name): Likewise.
354 (bfd_mach_o_section_type_name): Likewise.
355 (bfd_mach_o_section_attribute_name): Likewise.
356 (bfd_mach_o_load_command_name): Likewise.
357 (bfd_mach_o_get_section_type_from_name): Add a const qualifier
359 (bfd_mach_o_get_section_attribute_from_name): Likewise.
360 * mach-o.h (bfd_mach_o_read_dysymtab_symbol)
361 (bfd_mach_o_scan_start_address, bfd_mach_o_scan): Remove.
363 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
365 * elf-bfd.h (elfcore_write_s390_last_break): Add prototype.
366 (elfcore_write_s390_system_call): Likewise.
367 * elf.c (elfcore_write_s390_last_break): New function.
368 (elfcore_write_s390_system_call): Likewise.
369 (elfcore_write_register_note): Call them.
370 (elfcore_grok_s390_last_break): New function.
371 (elfcore_grok_s390_system_call): Likewise.
372 (elfcore_grok_note): Call them.
374 2011-12-05 Tristan Gingold <gingold@adacore.com>
376 * mach-o.c (bfd_mach_o_read_symtab_symbol): Accept indirect symbols.
378 2011-12-05 Tristan Gingold <gingold@adacore.com>
380 * mach-o.c (bfd_mach_o_write_contents): Handle LC_LOAD_UPWARD_DYLIB.
381 (bfd_mach_o_read_dylib): Likewise.
382 (bfd_mach_o_read_command): Likewise.
383 (bfd_mach_o_bfd_print_private_bfd_data): Likewise.
385 2011-12-05 Tristan Gingold <gingold@adacore.com>
387 * mach-o.c (bfd_mach_o_read_command): Add the bfd in the error
389 (bfd_mach_o_openr_next_archived_file): Use arch name as member name.
390 (bfd_mach_o_fat_extract): Ditto.
392 2011-12-03 Alan Modra <amodra@gmail.com>
395 * elflink.c (bfd_elf_final_link): Don't segfault when checking
396 for DT_TEXTREL and .dynamic does not exist.
398 2011-12-03 Alan Modra <amodra@gmail.com>
401 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Revert substantive
402 change in 2011-07-01 commit. Comment.
403 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
405 2011-12-01 Mikael Pettersson <mikpe@it.uu.se>
407 * elf32-m68k.c (elf_m68k_check_relocs) <R_68K_8, R68K_16, R_68K_32>: For
408 non-SEC_ALLOC sections break before GOT and PLT accounting.
410 2011-12-01 Hans-Peter Nilsson <hp@axis.com>
412 * elf32-cris.c (cris_elf_check_relocs) <plt accounting for
413 R_CRIS_8, R_CRIS_16, and R_CRIS_32>: Move early break for
414 non-SEC_ALLOC sections before GOT and PLT accounting.
416 2011-11-29 Andrew Pinski <apinski@cavium.com>
418 * archures.c (bfd_mach_mips_octeonp): New macro.
419 * bfd-in2.h: Regenerate.
420 * bfd/cpu-mips.c (I_mipsocteonp): New enum value.
421 (arch_info_struct): Add bfd_mach_mips_octeonp.
422 * elfxx-mips.c (mips_set_isa_flags): Add bfd_mach_mips_octeonp.
423 (mips_mach_extensions): Add bfd_mach_mips_octeonp.
425 2011-11-23 Tristan Gingold <gingold@adacore.com>
427 * vms-lib.c (get_idxlen): Add comments. Fix type in sizeof.
428 (vms_write_index): Add comments.
430 2011-11-22 DJ Delorie <dj@redhat.com>
432 * elf32-rx.c (rx_elf_object_p): Add more checks for "scanning" to
433 avoid using the special non-swapping target when not explicitly
436 2011-11-22 Daniel Calcoen <Daniel.Calcoen@cern.ch>
438 * elf32-rx.c (rx_elf_object_p): Correct typo: lma->vma.
440 2011-11-22 Tristan Gingold <gingold@adacore.com>
442 * mach-o.c (bfd_mach_o_print_symbol): Display COM for common
443 symbols. Print section name in brackets.
445 2011-11-21 Andreas Tobler <andreast@fgznet.ch>
447 * config.bfd: Add vectors for powerpc and powerpc64-freebsd.
448 * configure.in (TDEFINES): Add rules for powerpc*-freebsd.
449 * configure: Regenerate.
450 * elf32-ppc.c: Add powerpc-freebsd definitions.
451 * elf64-ppc.c: Add powerpc64-freebsd definitions.
452 * targets.c: Add bits for powerpc and powerpc64-freebsd.
454 2011-11-17 Philipp Thomas <philipp@thogro.org>
456 * elf32-arm.c (elf32_thumb_to_arm_stub): Sync message so that it
457 needs to be translated only once.
459 2011-11-16 Maciej W. Rozycki <macro@codesourcery.com>
461 * elf64-mips.c (mips_elf64_howto_table_rela): Set src_mask to
463 (mips16_elf64_howto_table_rela): Likewise.
464 (micromips_elf64_howto_table_rela): Likewise.
465 * elfn32-mips.c (elf_mips_howto_table_rela): Likewise.
466 (elf_mips16_howto_table_rela): Likewise.
467 (elf_micromips_howto_table_rela): Likewise.
469 2011-11-15 Alan Modra <amodra@gmail.com>
470 Andreas Tobler <andreast@fgznet.ch>
472 * elflink.c (_bfd_elf_create_got_section): Replace
473 bfd_make_section_with_flags with bfd_make_section_anyway_with_flags.
474 (_bfd_elf_link_create_dynamic_sections): Likewise.
475 * elf32-ppc.c (ppc_elf_create_glink): Likewise.
476 (ppc_elf_create_dynamic_sections): Likewise.
478 2011-11-14 Maxim Kuvyrkov <maxim@codesourcery.com>
480 * elfxx-mips.c (mips_n64_exec_plt0_entry): Use 64-bit move.
482 2011-11-08 Nick Clifton <nickc@redhat.com>
484 * elf-m10300.c (mn10300_elf_relax_section): Fix check for an
485 immediate move into an address register.
487 2011-11-09 Alan Modra <amodra@gmail.com>
489 * elflink.c (bfd_elf_gc_mark_dynamic_ref_symbol): Mark syms in
490 executables when export_dynamic.
492 2011-11-08 Alan Modra <amodra@gmail.com>
494 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Rename
495 ha_relocs_not_using_r2 to unexpected_toc_insn.
496 (ok_lo_toc_insn): New function.
497 (ppc64_elf_edit_toc): Check insn on lo toc reloc. Emit warning.
498 (ppc64_elf_relocate_section): Don't check insn on lo toc reloc here.
499 Handle addic on lo toc reloc.
501 2011-11-06 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
504 * elf32-hppa.c (elf32_hppa_hide_symbol): Make STT_GNU_IFUNC symbol
505 go through PLT. Reset plt field with init_plt_offset.
506 (elf32_hppa_adjust_dynamic_symbol): Ensure that a PLT slot is
507 allocated for symbols referenced by a plabel.
509 2011-11-02 DJ Delorie <dj@redhat.com>
511 * elf32-rl78.c (rl78_elf_merge_private_bfd_data): Delete unused
514 2011-11-02 Jan Beulich <jbeulich@suse.com>
516 * coffgen.c (coff_write_alien_symbol): Make public. Add 'struct
517 internal_syment *' parameter. Extend 'dummy' to an array with two
518 elements. Set n_numaux early. Handle BSF_FILE.
519 (coff_write_symbols): Pass NULL as new third argument to
520 coff_write_alien_symbol().
521 * cofflink.c (_bfd_coff_final_link): Don't use COFF-specific
522 obj_raw_syment_count() on non-COFF input BFD. Insert local symbols
523 from non-COFF input BFDs.
524 * libcoff-in.h (coff_write_alien_symbol): Declare.
525 * libcoff.h (coff_write_alien_symbol): Re-generate.
527 2011-11-01 DJ Delorie <dj@redhat.com>
529 * Makefile.am (ALL_MACHINES): Add cpu-rl78.lo.
530 (ALL_MACHINES_CFILES): Add cpu-rl78.c.
531 (BFD32_BACKENDS): Add elf32-rl78.lo.
532 (BFD32_BACKENDS_CFILES): Add elf32-rl78.c.
533 (Makefile.in): Regenerate.
534 * archures.c (bfd_architecture): Define bfd_arch_rl78.
535 (bfd_archures_list): Add bfd_rl78_arch.
536 * config.bfd: Add rl78-*-elf.
537 * configure.in: Add bfd_elf32_rl78_vec.
538 * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_RL78_* relocations.
539 * targets.c (bfd_target_vector): Add bfd_elf32_rl78_vec.
540 * Makefile.in: Regenerate.
541 * bfd-in2.h: Regenerate.
542 * configure: Regenerate.
543 * libbfd.h: Regenerate.
544 * cpu-rl78.c: New file.
545 * elf32-rl78.c: New file.
547 2011-10-26 Nick Clifton <nickc@redhat.com>
550 * elf64-ppc.c (STUB_SUFFIX): Revert previous delta.
551 * elf32-hppa.c (STUB_SUFFIX): Likewise.
553 2011-10-25 Joern Rennecke <joern.rennecke@embecosm.com>
555 * Makefile.am (ALL_MACHINES): Add cpu-epiphany.lo.
556 (ALL_MACHINES_CFILES): Add cpu-epiphany.c.
557 (BFD32_BACKENDS): Add elf32-epiphany.lo.
558 (BFD32_BACKENDS_CFILES): Add elf32-epiphany.c.
559 * archures.c (bfd_arch_epiphany): Add.
560 (bfd_mach_epiphany16, bfd_mach_epiphany32): Define.
561 (bfd_epiphany_arch): Declare.
562 (bfd_archures_list): Add &bfd_epiphany_arch.
563 * config.bfd (epiphany-*-elf): New target case.
564 * configure.in (bfd_elf32_epiphany_vec): New target vector case.
565 * reloc.c (BFD_RELOC_EPIPHANY_SIMM8): New relocation.
566 (BFD_RELOC_EPIPHANY_SIMM24, BFD_RELOC_EPIPHANY_HIGH): Likewise.
567 (BFD_RELOC_EPIPHANY_LOW, BFD_RELOC_EPIPHANY_SIMM11): Likewise.
568 (BFD_RELOC_EPIPHANY_IMM11, BFD_RELOC_EPIPHANY_IMM8): Likewise.
569 * targets.c (bfd_elf32_epiphany_vec): Declare.
570 (_bfd_target_vector): Add bfd_elf32_epiphany_vec.
571 * Makefile.in: Regenerate.
572 * bfd-in2.h: Regenerate.
573 * configure: Regenerate.
574 * libbfd.h: Regenerate.
575 * po/SRC-POTFILES.in: Regenerate.
576 * po/bfd.pot: Regenerate.
577 * cpu-epiphany.c: New file.
578 * elf32-epiphany.c: New file.
580 2011-10-24 Maciej W. Rozycki <macro@codesourcery.com>
582 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Remove
585 2011-10-24 Eugeniy Meshcheryakov <eugen@debian.org>
588 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Do not warn about
589 identical TAG_PCS_config attributes.
591 2011-10-24 Nick Clifton <nickc@redhat.com>
593 * po/ja.po: Updated Japanese translation.
595 2011-10-24 Pau Garcia i Quiles <pgquiles@elpauer.org>
598 * bfd-in.h: Include <sys/stat.h> rather than forward defining
600 * bfd-in2.h: Regenerate.
602 2011-10-21 H.J. Lu <hongjiu.lu@intel.com>
605 * elf32-i386.c (elf_i386_relocate_section): Replace
606 R_386_IRELATIVE with R_386_RELATIVE.
608 * elf64-x86-64.c (elf_x86_64_relocate_section): Replace
609 R_X86_64_IRELATIVE with R_X86_64_RELATIVE.
611 2011-10-21 H.J. Lu <hongjiu.lu@intel.com>.
613 * elf32-i386.c (elf_i386_relocate_section): Fix a typo in
615 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
617 2011-10-21 H.J. Lu <hongjiu.lu@intel.com>
620 * elf32-i386.c (elf_i386_link_hash_table): Add next_jump_slot_index
621 and next_irelative_index.
622 (elf_i386_link_hash_table_create): Initialize next_jump_slot_index
623 and next_irelative_index.
624 (elf_i386_allocate_dynrelocs): Increment reloc_count instead of
626 (elf_i386_size_dynamic_sections): Set next_tls_desc_index and
627 next_irelative_index from reloc_count.
628 (elf_i386_finish_dynamic_symbol): Put R_386_IRELATIVE after
631 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add
632 next_jump_slot_index and next_irelative_index.
633 (elf_x86_64_link_hash_table_create): Initialize
634 next_jump_slot_index and next_irelative_index.
635 (elf_x86_64_size_dynamic_sections): Set next_irelative_index
637 (elf_x86_64_finish_dynamic_symbol): Put R_X86_64_IRELATIVE after
640 2011-10-20 Nick Clifton <nickc@redhat.com>
643 * elf32-arm.c (STUB_SUFFIX): Avoid collision with user namespace
645 * elf64-ppc.c (STUB_SUFFIX): Likewise.
646 * elf32-hppa.c (STUB_SUFFIX): Likewise.
648 2011-10-20 Alan Modra <amodra@gmail.com>
650 * elf32-i386.c (i386_opcode16): Delete.
651 (elf_i386_check_tls_transition): Use memcmp to compare contents.
652 * elf64-x86-64.c (x86_64_opcode16, x86_64_opcode32): Delete.
653 (elf_x86_64_check_tls_transition): Use memcmp to compare contents.
655 2011-10-19 Alan Modra <amodra@gmail.com>
658 * elflink.c (_bfd_elf_gc_mark_rsec): Set symbol "mark".
659 (elf_gc_sweep_symbol): Don't test plt/got refcounts, instead test
660 "mark". Hide undefweak too. Clear def_regular and ref_regular.
661 * elf-m10300.c (mn10300_elf_relocate_section): Ignore unresolved
662 reloc errors from garbage-collected code.
663 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
664 * elf32-bfin.c (bfin_relocate_section): Likewise.
665 (bfinfdpic_relocate_section): Likewise.
666 * elf32-cris.c (cris_elf_relocate_section): Likewise.
667 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
668 * elf32-i386.c (elf_i386_relocate_section): Likewise.
669 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
670 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
671 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
672 * elf32-s390.c (elf_s390_relocate_section): Likewise.
673 * elf32-sh.c (sh_elf_relocate_section): Likewise.
674 * elf32-spu.c (spu_elf_relocate_section): Likewise.
675 * elf32-tilepro.c (tilepro_elf_relocate_section): Likewise.
676 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
677 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
678 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
679 * elf64-s390.c (elf_s390_relocate_section): Likewise.
680 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
681 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
682 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
683 * elfxx-tilegx.c (tilegx_elf_relocate_section): Likewise.
685 2011-10-19 Alan Modra <amodra@gmail.com>
688 * elflink.c (elf_link_output_extsym): Correct test for warning when
689 forced local executable syms are referenced from shared libraries.
691 2011-10-19 Alan Modra <amodra@gmail.com>
694 * elflink.c (bfd_elf_final_link): Emit error_textrel error.
696 2011-10-18 David S. Miller <davem@davemloft.net>
699 * elfxx-sparc.c (sparc_elf_find_reloc_at_ofs): New function.
700 (_bfd_sparc_elf_relocate_section): Always move the __tls_get_addr
701 call delay slot instruction forward 4 bytes when performing
704 2011-10-17 Alan Modra <amodra@gmail.com>
708 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref): Apply 2011-09-15
709 and 2011-09-29 bfd_elf_gc_mark_dynamic_ref_symbol changes here too.
711 2011-10-14 Hans-Peter Nilsson <hp@axis.com>
713 * elf32-cris.c (cris_elf_gc_sweep_hook) <R_CRIS_16_GOTPLT>
714 <R_CRIS_32_GOTPLT>: Fix missing update of gotplt refcount for
716 <R_CRIS_8, R_CRIS_16, R_CRIS_32>: New cases for similar missing
717 updates of the plt refcount.
718 (elf_cris_adjust_gotplt_to_got): Assert integrity of the gotplt
719 refcount in relation to the plt refcount.
721 2011-10-13 Richard Sandiford <richard.sandiford@linaro.org>
723 * elf32-arm.c (elf32_arm_final_link_relocate): Mark PLT calls via
726 2011-10-11 Alan Modra <amodra@gmail.com>
729 * archive.c (bfd_generic_archive_p): Only check first element
730 when target_defaulted.
731 (_bfd_construct_extended_name_table): Use ar_maxnamelen.
732 (_bfd_archive_bsd44_construct_extended_name_table): Likewise.
734 2011-10-11 Alan Modra <amodra@gmail.com>
737 * archive.c (_bfd_find_nested_archive, _bfd_get_elt_at_filepos): Open
738 thin archive element using container target if not defaulted.
740 2011-10-10 Nick Clifton <nickc@redhat.com>
742 * po/es.po: Updated Spanish translation.
743 * po/fi.po: Updated Finnish translation.
744 * po/fr.po: Updated French translation.
745 * po/ru.po: Updated Russian translation.
747 2011-10-10 Alan Modra <amodra@gmail.com>
749 * elf64-ppc.c (ppc64_elf_howto_table): Add R_PPC64_TOCSAVE entry.
750 (struct ppc_link_hash_table): Add tocsave_htab.
751 (struct tocsave_entry): New.
752 (tocsave_htab_hash, tocsave_htab_eq, tocsave_find): New functions.
753 (ppc64_elf_link_hash_table_create): Create tocsave_htab..
754 (ppc64_elf_link_hash_table_free): ..and delete it.
755 (build_plt_stub): Always put STD_R2_40R1 first.
756 (ppc64_elf_size_stubs): Check for R_PPC64_TOCSAVE following reloc
757 on plt call. If present add prologue nop location to tocsave_htab.
758 (ppc64_elf_relocate_section): Convert prologue nop to std. Skip
759 first insn of plt call stub when R_PPC64_TOCSAVE present.
761 2011-10-08 H.J. Lu <hongjiu.lu@intel.com>
764 * elflink.c (elf_link_add_object_symbols): Preserve the maximum
765 alignment and size for common symbols.
767 2011-10-08 Alan Modra <amodra@gmail.com>
771 * elflink.c (elf_link_add_object_symbols): Don't make IR symbols
774 2011-10-08 Alan Modra <amodra@gmail.com>
777 * elflink.c (elf_link_output_extsym): Strip defined plugin symbols
778 even when strip_discarded is false.
780 2011-10-05 Kai Tietz <ktietz@redhat.com>
782 * coffgen.c (coff_write_alien_symbol): Don't write
783 symbol for discarded sections, if strip_discarded isn't
784 explicit set to false.
785 (coff_write_native_symbol): Likewise.
787 2011-10-05 DJ Delorie <dj@redhat.com>
788 Nick Clifton <nickc@redhat.com>
790 * elf32-rx.c: Add support for PID mode.
791 (rx_elf_relocate_section): Add checks for unsafe PID relocations.
792 Include addend in R_RX_SYM relocations.
794 2011-09-30 Tristan Gingold <gingold@adacore.com>
796 * dwarf2.c (struct dwarf2_debug): Add field debug_sections.
797 (read_section): Add sec argument. Adjust the code to get section
799 (read_indirect_string): Adjust call to read_section.
800 (read_abbrevs): Ditto.
801 (decode_line_info): Ditto.
802 (read_debug_ranges): Ditto.
803 (DWARF2_DEBUG_INFO, DWARF2_COMPRESSED_DEBUG_INFO): Remove.
804 (find_debug_info): Add debug_sections parameter. Use it instead
806 (place_sections): Get section names from stash.
807 (find_line): Add debug_sections argument. Initialize
808 debug_sections field of stash from it.
809 Adjust calls to find_debug_info.
810 (_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
811 Adjust call to find_line.
812 (_bfd_dwarf2_find_line): Adjust call to find_line.
813 * libcoff-in.h (struct dwarf_debug_section): New declaration.
814 (coff_find_nearest_line_with_names): Likewise.
815 * libcoff.h: Regenerate.
816 * libbfd-in.h (struct dwarf_debug_section): Move declaration.
817 (dwarf_debug_sections): Likewise.
818 (_bfd_dwarf2_find_nearest_line): Add debug_sections argument.
819 * libbfd.h: Regenerate.
820 * elf.c (_bfd_elf_find_nearest_line): Adjust call to
821 _bfd_dwarf2_find_nearest_line.
822 * elfxx-mips.c (_bfd_mips_elf_find_nearest_line): Ditto.
823 * elf64-alpha.c (elf64_alpha_find_nearest_line): Ditto.
824 * elf32-arm.c (elf32_arm_find_nearest_line): Ditto.
825 * coffgen.c (coff_find_nearest_line_with_names): New function.
826 (coff_find_nearest_line): Calls coff_find_nearest_line_with_names.
827 * coff-rs6000.c (xcoff_debug_sections): New constant.
828 (xcoff_find_nearest_line): New function.
829 (rs6000coff_vec): Use xcoff_find_nearest_line.
830 (pmac_xcoff_vec): Ditto.
832 2011-09-30 Alan Modra <amodra@gmail.com>
835 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add ha_relocs_not_using_r2.
836 (ppc64_elf_edit_toc): Check HA relocs.
837 (ha_reloc_match): Delete function.
838 (ppc64_elf_relocate_section): Remove delayed HA nop optimization.
839 Instead do it and low part optimization based on
840 ha_relocs_not_using_r2.
842 2011-09-29 Alan Modra <amodra@gmail.com>
845 * elflink.c (_bfd_elf_gc_mark_extra_sections): Mark single member
846 debug and special section groups.
848 2011-09-29 H.J. Lu <hongjiu.lu@intel.com>
851 * elflink.c (_bfd_elf_merge_symbol): Don't set dynamic_def when
852 clearing def_dynamic.
853 (elf_link_add_object_symbols): Likewise. Set dynamic_def when
855 (bfd_elf_gc_mark_dynamic_ref_symbol): Check if a symbol is
858 2011-09-27 Kai Tietz <ktietz@redhat.com>
860 * coffcode.h (sec_to_styp_flags): Handle
861 SEC_LINK_DUPLICATES_SAME_CONTENTS, and
862 SEC_LINK_DUPLICATES_SAME_SIZE.
864 2011-09-22 Tristan Gingold <gingold@adacore.com>
866 * configure.in: Bump version to 2.22.51
867 * configure: Regenerate.
869 2011-09-21 David S. Miller <davem@davemloft.net>
871 * elfxx-sparc.c (_bfd_sparc_elf_merge_private_bfd_data): New.
872 * elfxx-sparc.h: Declare it.
873 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Call it.
874 * elf64-sparc.c (elf64_sparc_merge_private_bfd_data): Likewise.
876 2011-09-21 Tristan Gingold <gingold@adacore.com>
878 * mach-o.c (bfd_mach_o_convert_section_name_to_bfd): Add comment.
879 Deals with size limited strings.
880 (bfd_mach_o_build_commands): Initialize more fields.
882 2011-09-15 H.J. Lu <hongjiu.lu@intel.com>
885 * elflink.c (elf_gc_sweep_symbol): Also hide symbols without PLT
888 2011-09-15 H.J. Lu <hongjiu.lu@intel.com>
891 * bfd-in.h (bfd_elf_size_dynamic_sections): Remove pointer
892 to struct bfd_elf_version_tree.
894 * elflink.c (elf_info_failed): Remove verdefs.
895 (_bfd_elf_export_symbol): Updated.
896 _bfd_elf_link_assign_sym_version): Likewise.
897 (bfd_elf_size_dynamic_sections): Remove pointer to struct
898 bfd_elf_version_tree. Updated.
899 (bfd_elf_gc_mark_dynamic_ref_symbol): Check if a symbol is hidden
902 * linker.c (bfd_hide_sym_by_version): New.
904 * bfd-in2.h: Regenerated.
906 2011-09-12 H.J. Lu <hongjiu.lu@intel.com>
909 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Use .got.plt
910 if there are no GOT relocations.
912 2011-09-09 Kai Tietz <ktietz@redhat.com>
914 * peicode.h (pe_ILF_build_a_bfd): Don't remove leading underscore
915 for targets without symbol_leading_char.
917 2011-09-08 Bernd Jendrissek <bernd.jendrissek@gmail.com>
919 * bfdwin.c (bfd_get_file_window): Fix memory leak.
921 2011-09-07 Alan Modra <amodra@gmail.com>
924 * bfd/elf64-ppc.c (adjust_toc_syms): Ensure ppc64_elf_howto_table
927 2011-09-06 Alan Modra <amodra@gmail.com>
930 * elf64-ppc.c (adjust_toc_syms): Delete redundant code.
931 (ppc64_elf_edit_toc): Fix style nit. Report some details
932 on linker failure due to reference in debug or non-alloc
933 sections to optimized away toc entry, and don't abort.
935 2011-09-01 Christophe Lyon <christophe.lyon@st.com>
937 * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip excluded
940 2011-08-26 Nick Clifton <nickc@redhat.com>
942 * po/es.po: Updated Spanish translation.
944 2011-08-19 Alan Modra <amodra@gmail.com>
946 * elf64-ppc.c (ppc64_elf_edit_toc): Ignore can_optimize bit if
947 we haven't seen expected -mcmodel=medium/large code relocs.
949 2011-08-18 Tristan Gingold <gingold@adacore.com>
951 * mach-o.c (bfd_mach_o_read_segment): Initialize list.
953 2011-08-17 Tristan Gingold <gingold@adacore.com>
955 * mach-o.c (bfd_mach_o_write_section_32): Fix typo.
957 2011-08-17 Alan Modra <amodra@gmail.com>
960 * bfd-in.h (struct bfd_section_already_linked): Forward declare.
961 (_bfd_handle_already_linked): Declare.
962 * coff-alpha.c (_bfd_ecoff_section_already_linked): Define as
963 _bfd_coff_section_already_linked.
964 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
965 * coffcode.h (coff_section_already_linked): Likewise.
966 * cofflink.c (coff_link_add_symbols): Revert 2011-07-09 changes.
967 * elf-bfd.h: Likewise.
968 * libbfd-in.h: Likewise.
969 * targets.c: Likewise.
970 * linker.c (bfd_section_already_linked): Likewise.
971 (bfd_section_already_linked_table_lookup): Likewise.
972 (bfd_section_already_linked_table_insert): Likewise.
973 (_bfd_generic_section_already_linked): Likewise. Call
974 _bfd_handle_already_linked.
975 (_bfd_handle_already_linked): New function, split out from..
976 * elflink.c (_bfd_elf_section_already_linked): ..here. Revert
977 2011-07-09 changes. Avoid unnecessary strcmp when matching
978 already_linked_list entries. Match plugin linkonce section.
979 (section_signature): Delete.
980 * coffgen.c (_bfd_coff_section_already_linked): New function.
981 * libcoff-in.h (_bfd_coff_section_already_linked): Declare.
982 * libbfd.h: Regenerate.
983 * libcoff.h: Regenerate.
984 * bfd-in2.h: Regenerate.
986 2011-08-14 Alan Modra <amodra@gmail.com>
988 * elf32-ppc.c (ppc_elf_select_plt_layout): Force bss-plt when
989 shared and call to _mcount will go via plt.
991 2011-08-14 Alan Modra <amodra@gmail.com>
993 * elf64-ppc.c: Prefix all einfo error strings with "%P: ".
994 * elf32-ppc.c: Likewise.
995 (ppc_elf_select_plt_layout): Use einfo rather than info to report
998 2011-08-12 H.J. Lu <hongjiu.lu@intel.com>
1001 * elf64-x86-64.c (x86_64_elf_howto_table): Add R_X86_64_RELATIVE64.
1002 (elf_x86_64_relocate_section): Treat R_X86_64_64 like R_X86_64_32
1003 and zero-extend it to 64bit if addend is zero for x32. Generate
1004 R_X86_64_RELATIVE64 for x32.
1006 2011-08-09 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1008 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1009 * bfd-in2.h (bfd_elf32_arm_set_target_relocs): Likewise.
1010 * elf32-arm.c (elf32_arm_link_hash_table): New field.
1011 (elf232_arm_link_hash_table_create): Initialise new field.
1012 (check_use_blx): Change test depending on fix_arm1176.
1013 (bfd_elf32_arm_set_target_relocs): Set fix_arm1176 from
1014 command line options.
1016 2011-08-08 Tristan Gingold <gingold@adacore.com>
1018 * mach-o.c (struct mach_o_segment_name_xlat): Add comments.
1019 (segsec_names_xlat): Reorder elements.
1020 (bfd_mach_o_read_section_32): Fix typo.
1021 (bfd_mach_o_read_section_64): Fix typo.
1023 2011-08-08 Tristan Gingold <gingold@adacore.com>
1025 * mach-o.h (BFD_MACH_O_SEGNAME_SIZE): New macro.
1026 (BFD_MACH_O_SECTNAME_SIZE): Ditto.
1027 (bfd_mach_o_section): Use them. Add next field.
1028 (bfd_mach_o_segment_command): Replace sections array by
1029 sect_head and sect_tail.
1030 (bfd_mach_o_get_mach_o_section): New macro.
1031 (bfd_mach_o_lookup_section): Remove.
1032 (bfd_mach_o_new_section_hook): New function.
1033 * mach-o.c (bfd_mach_o_normalize_section_name): Use strncmp
1035 (bfd_mach_o_convert_section_name_to_bfd): Replaces section
1036 parameter with segname and sectname parameters. Adjust.
1037 (bfd_mach_o_append_section_to_segment): New function. Use a
1038 linked list for Mach-O sections.
1039 (bfd_mach_o_write_segment_32): Adjust.
1040 (bfd_mach_o_write_segment_64): Ditto.
1041 (bfd_mach_o_build_commands): Fix comment. Adjust.
1042 (bfd_mach_o_flatten_sections): Adjust.
1043 (bfd_mach_o_print_section_map): Adjust.
1044 (bfd_mach_o_set_section_flags_from_bfd): Ditto.
1045 (bfd_mach_o_new_section_hook): New function.
1046 (bfd_mach_o_init_section_from_mach_o): Ditto.
1047 (bfd_mach_o_read_section_32): Remove section parameter.
1048 Return a section instead.
1049 (bfd_mach_o_read_section_64): Ditto.
1050 (bfd_mach_o_read_section): Ditto.
1051 (bfd_mach_o_make_bfd_section): Adjust.
1052 (bfd_mach_o_read_segment): Adjust for new profile of
1053 bfd_mach_o_read_section.
1054 (bfd_mach_o_lookup_section): Remove.
1055 * mach-o-target.c (bfd_mach_o_new_section_hook): Remove.
1057 2011-08-08 Tristan Gingold <gingold@adacore.com>
1059 * mach-o.h (bfd_mach_o_version_min_command): New structure.
1060 (bfd_mach_o_load_command): Add version_min.
1061 (mach_o_data_struct): Fix comment.
1062 * mach-o.c (bfd_mach_o_read_version_min): New function.
1063 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_FUNCTION_STARTS,
1064 BFD_MACH_O_LC_VERSION_MIN_MACOSX and
1065 BFD_MACH_O_LC_VERSION_MIN_IPHONEOS.
1066 (bfd_mach_o_get_name_or_null): New function.
1067 (bfd_mach_o_get_name): Use the above new one.
1068 (bfd_mach_o_load_command_name): Add the above new commands.
1069 (bfd_mach_o_bfd_print_private_bfd_data): Display numerically
1070 unknown commands. Handle BFD_MACH_O_LC_FUNCTION_STARTS,
1071 BFD_MACH_O_LC_VERSION_MIN_MACOSX and
1072 BFD_MACH_O_LC_VERSION_MIN_IPHONEOS.
1074 2011-08-08 Tristan Gingold <gingold@adacore.com>
1076 * mach-o.h: Move size macros to external.h
1077 Move reloc macros to reloc.h and x86-64.h.
1078 * mach-o-i386.c: Includes mach-o/reloc.h
1079 * mach-o-x86-64.c: Ditto and includes mach-o/x86-64.h
1080 * mach-o.c: Add includes.
1081 (bfd_mach_o_write_header): Use structure from external.h to convert.
1082 (bfd_mach_o_write_thread): Ditto.
1083 (bfd_mach_o_write_relocs): Ditto.
1084 (bfd_mach_o_write_section_32): Ditto.
1085 (bfd_mach_o_write_section_64): Ditto.
1086 (bfd_mach_o_write_segment_32): Ditto.
1087 (bfd_mach_o_write_segment_64): Ditto.
1088 (bfd_mach_o_write_symtab): Ditto.
1089 (bfd_mach_o_write_contents): Ditto.
1090 (bfd_mach_o_read_header): Ditto.
1091 (bfd_mach_o_read_section_32): Ditto.
1092 (bfd_mach_o_read_section_64): Ditto.
1093 (bfd_mach_o_read_symtab_symbol): Ditto.
1094 (bfd_mach_o_read_dylinker): Ditto.
1095 (bfd_mach_o_read_dylib): Ditto.
1096 (bfd_mach_o_read_dysymtab): Ditto.
1097 (bfd_mach_o_read_symtab): Ditto.
1098 (bfd_mach_o_read_linkedit): Ditto.
1099 (bfd_mach_o_read_str): Ditto.
1100 (bfd_mach_o_read_dyld_info): Ditto.
1101 (bfd_mach_o_read_segment): Ditto.
1102 (bfd_mach_o_read_command): Ditto.
1103 (bfd_mach_o_archive_p): Ditto.
1104 (bfd_mach_o_canonicalize_one_reloc): Ditto. Change the BUF parameter.
1105 (bfd_mach_o_canonicalize_relocs): Adjust to call the above function.
1106 (bfd_mach_o_read_dysymtab_symbol): Rename BUF variable.
1107 (bfd_mach_o_read_uuid): Remove useless cast. Use a macro instead
1108 of an hard-coded value.
1110 2011-08-08 Tristan Gingold <gingold@adacore.com>
1112 * mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Fix cut-and-past typos.
1113 (bfd_mach_o_x86_64_swap_reloc_out): Handle BFD_RELOC_32_PCREL,
1114 BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64 and
1115 BFD_RELOC_MACH_O_X86_64_GOT_LOAD. Share common code.
1117 2011-08-08 Tristan Gingold <gingold@adacore.com>
1119 * mach-o.c (bfd_mach_o_normalize_section_name): New function.
1120 (bfd_mach_o_convert_section_name_to_bfd): Use it.
1121 (bfd_mach_o_get_section_type_from_name): New function.
1122 (bfd_mach_o_get_section_attribute_from_name): Ditto.
1123 * mach-o.h (bfd_mach_o_section): Move bfdsection field at the end.
1124 Add comments. Add prototypes for the above new functions.
1126 2011-08-05 Mark Kettenis <kettenis@gnu.org>
1128 * netbsd-core.c (netbsd_core_vec): Init match_priority field.
1130 2011-08-05 Alan Modra <amodra@gmail.com>
1132 * elf64-ppc.c (maybe_strip_output): New function.
1133 (ppc64_elf_size_stubs): Use it to strip .branch_lt and .eh_frame.
1135 2011-08-05 Alan Modra <amodra@gmail.com>
1138 * elflink.c (_bfd_elf_section_already_linked): Return matched
1139 status. Remove COFF comdat section handling.
1140 * linker.c (_bfd_generic_section_already_linked): Return matched
1141 status. Don't set SEC_GROUP in l_flags for plugin entries.
1142 (bfd_section_already_linked): Update prototype.
1143 * targets.c (_section_already_linked): Likewise.
1144 * elf-bfd.h (_bfd_elf_section_already_linked): Likewise.
1145 * libbfd-in.h (_bfd_generic_section_already_linked): Likewise.
1146 (_bfd_nolink_section_already_linked): Update.
1147 * libbfd.h: Regenerate.
1148 * bfd-in2.h: Regenerate.
1150 2011-08-05 Alan Modra <amodra@gmail.com>
1152 * elf32-ppc.c: Include dwarf2.h.
1153 (struct ppc_elf_link_hash_table): Add glink_eh_frame.
1154 (ppc_elf_create_glink): Create .eh_frame section.
1155 (glink_eh_frame_cie): New array.
1156 (ppc_elf_size_dynamic_sections): Size glink_eh_frame.
1157 (ppc_elf_finish_dynamic_sections): Write glink_eh_frame.
1159 2011-08-04 Tristan Gingold <gingold@adacore.com>
1161 * vms-alpha.c (_bfd_vms_write_eeom): Round vms_linkage_index.
1162 (_bfd_vms_write_etir): Initialize vms_linkage_index to 0.
1164 2011-08-03 Tristan Gingold <gingold@adacore.com>
1166 * mach-o.c (bfd_mach_o_canonicalize_symtab): Handle no symbols case.
1167 (bfd_mach_o_read_symtab_symbols): Return if no symbols.
1169 2011-08-02 Maciej W. Rozycki <macro@codesourcery.com>
1171 * elfxx-mips.c (check_4byte_branch): Remove function.
1172 (check_relocated_bzc): New function.
1173 (_bfd_mips_elf_relax_section): Permit the relaxation of LUI
1174 instructions that immediately follow a compact branch
1177 2011-08-02 Alan Modra <amodra@gmail.com>
1179 * elf64-ppc.c (build_plt_stub): Correct emitted relocs when no
1181 (ppc_build_one_stub): Adjust get_relocs call to suit..
1182 (ppc_size_one_stub): ..and reloc sizing. Correct plt size corner case.
1184 2011-08-01 H.J. Lu <hongjiu.lu@intel.com>
1187 * archures.c (bfd_mach_i386_intel_syntax): New.
1188 (bfd_mach_i386_i8086): Updated.
1189 (bfd_mach_i386_i386): Likewise.
1190 (bfd_mach_x86_64): Likewise.
1191 (bfd_mach_x64_32): Likewise.
1192 (bfd_mach_i386_i386_intel_syntax): Likewise.
1193 (bfd_mach_x86_64_intel_syntax): Likewise.
1194 (bfd_mach_x64_32_intel_syntax): Likewise.
1195 (bfd_mach_l1om): Likewise.
1196 (bfd_mach_l1om_intel_syntax): Likewise.
1197 (bfd_mach_k1om): Likewise.
1198 (bfd_mach_k1om_intel_syntax): Likewise.
1200 * bfd-in2.h: Regenerated.
1202 * cpu-i386.c (bfd_i386_compatible): Check mach instead of
1204 (bfd_x64_32_arch_intel_syntax): Set bits_per_address to 64.
1205 (bfd_x64_32_arch): Likewise.
1207 * elf64-x86-64.c: Include "libiberty.h".
1208 (x86_64_elf_howto_table): Append x32 R_X86_64_32.
1209 (elf_x86_64_rtype_to_howto): Support x32 R_X86_64_32.
1210 (elf_x86_64_reloc_type_lookup): Likewise.
1211 (elf_x86_64_reloc_name_lookup): Likewise.
1212 (elf_x86_64_relocate_section): Likewise.
1213 (elf_x86_64_check_relocs): Allow R_X86_64_64 relocations for x32.
1215 2011-07-29 Maciej W. Rozycki <macro@codesourcery.com>
1217 * elfxx-mips.c (check_br32): Fix return type.
1219 2011-07-29 Maciej W. Rozycki <macro@codesourcery.com>
1221 * elfxx-mips.c (bz_insn_16): Correct opcode mask.
1223 2011-07-29 Maciej W. Rozycki <macro@codesourcery.com>
1225 * elfxx-mips.c: Adjust comments throughout.
1226 (mips_elf_relax_delete_bytes): Reshape code.
1227 (_bfd_mips_elf_relax_section): Remove check for
1228 R_MICROMIPS_GPREL16 relocations. Reshape code.
1230 2011-07-28 Roland McGrath <mcgrathr@google.com>
1232 * elf32-i386.c (NACL_PLT_ENTRY_SIZE, NACLMASK): New macros.
1233 (elf_i386_nacl_plt0_entry): New variable.
1234 (elf_i386_plt_entry): New variable.
1235 (elf_i386_nacl_pic_plt0_entry): New variable.
1236 (elf_i386_nacl_pic_plt_entry): New variable.
1237 (elf_i386_nacl_plt, elf_i386_nacl_arch_bed): New variables.
1238 (elf_backend_arch_data): New macro setting for elf_i386_nacl_vec stanza.
1239 (elf_backend_plt_alignment): Likewise.
1241 * config.bfd: Handle i[3-7]86-*-nacl*.
1242 * elf32-i386.c (bfd_elf32_i386_nacl_vec): New backend vector stanza.
1243 * targets.c: Support bfd_elf32_i386_nacl_vec.
1244 * configure.in: Likewise.
1245 * configure: Regenerated.
1247 * elf32-i386.c (struct elf_i386_plt_layout): New type.
1248 (GET_PLT_ENTRY_SIZE): New macro.
1249 (elf_i386_plt): New variable.
1250 (struct elf_i386_backend_data): New member `plt'.
1251 (elf_i386_arch_bed): Add initializer for it.
1252 (elf_i386_vxworks_arch_bed): Likewise.
1253 (elf_i386_allocate_dynrelocs): Use GET_PLT_ENTRY_SIZE.
1254 (elf_i386_plt_sym_val): Likewise.
1255 (elf_i386_relocate_section): Likewise.
1256 (elf_i386_finish_dynamic_symbol): Likewise.
1257 Also use other elf_i386_plt_layout members for PLT details.
1258 (elf_i386_finish_dynamic_sections): Likewise.
1260 * elf32-i386.c (struct elf_i386_backend_data): New type.
1261 (get_elf_i386_backend_data): New macro.
1262 (elf_i386_arch_bed): New variable.
1263 (elf_backend_arch_data): New macro.
1264 (struct elf_i386_link_hash_table): Remove plt0_pad_byte and is_vxworks.
1265 (elf_i386_link_hash_table_create): Don't initialize them.
1266 (elf_i386_create_dynamic_sections): Find is_vxworks flags in
1267 elf_i386_backend_data, not elf_i386_link_hash_table.
1268 (elf_i386_adjust_dynamic_symbol): Likewise.
1269 (elf_i386_allocate_dynrelocs): Likewise.
1270 (elf_i386_readonly_dynrelocs): Likewise.
1271 (elf_i386_size_dynamic_sections): Likewise.
1272 (elf_i386_relocate_section): Likewise.
1273 (elf_i386_finish_dynamic_symbol): Likewise.
1274 (elf_i386_finish_dynamic_sections): Likewise. Same for plt0_pad_byte.
1275 (elf_i386_vxworks_link_hash_table_create): Function removed.
1276 (elf_i386_vxworks_arch_bed): New variable.
1277 (elf_backend_arch_data): New macro in elf32-i386-vxworks stanza.
1279 * elf-bfd.h (elf_backend_data): New member arch_backend_data.
1280 * elfxx-target.h (elf_backend_arch_data): New macro.
1281 (elfNN_bed): Use it as initializer for the new member.
1283 2011-07-28 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
1285 * elf64-hppa.c (elf_hppa_final_link_relocate): Fix handling of out
1288 2011-07-26 Jakub Jelinek <jakub@redhat.com>
1290 * dwarf2.c (dwarf_debug_sections): Add .debug_macro
1291 and .zdebug_macro entry.
1292 (dwarf_debug_section_enum): Add debug_macro.
1294 2011-07-26 Alan Modra <amodra@gmail.com>
1296 * elf64-ppc.c: Include dwarf2.h.
1297 (struct ppc_link_hash_table): Add glink_eh_frame.
1298 (create_linkage_sections): Create .eh_frame section.
1299 (ppc64_elf_size_dynamic_sections): Arrange to drop unneeded
1301 (glink_eh_frame_cie): New array.
1302 (ppc64_elf_size_stubs): Size glink_eh_frame.
1303 (ppc64_elf_build_stubs): Init glink_eh_frame contents.
1304 (ppc64_elf_finish_dynamic_sections): Write glink_eh_frame.
1306 2011-07-25 Hans-Peter Nilsson <hp@bitrange.com>
1309 * elf64-mmix.c (struct _mmix_elf_section_data): New members
1310 has_warned_bpo and has_warned_pushj.
1311 (mmix_final_link_relocate): Remove PARAMS and PTR macros,
1312 converting to ISO C. Add new parameter error_message. All
1314 (mmix_elf_perform_relocation): Ditto.
1315 <case R_MMIX_PUSHJ_STUBBABLE, case R_MMIX_BASE_PLUS_OFFSET>:
1316 Handle the case where mmix_elf_check_common_relocs has not been
1317 called, missing preparations for relocs of the respective type.
1319 2011-07-24 Chao-ying Fu <fu@mips.com>
1320 Ilie Garbacea <ilie@mips.com>
1321 Maciej W. Rozycki <macro@codesourcery.com>
1322 Joseph Myers <joseph@codesourcery.com>
1323 Catherine Moore <clm@codesourcery.com>
1324 Richard Sandiford <rdsandiford@googlemail.com>
1326 * archures.c (bfd_mach_mips_micromips): New macro.
1327 * cpu-mips.c (I_micromips): New enum value.
1328 (arch_info_struct): Add bfd_mach_mips_micromips.
1329 * elfxx-mips.h (_bfd_mips_elf_is_target_special_symbol): New
1331 (_bfd_mips_elf_relax_section): Likewise.
1332 (_bfd_mips16_elf_reloc_unshuffle): Rename to...
1333 (_bfd_mips_elf_reloc_unshuffle): ... this. Handle microMIPS
1335 (_bfd_mips16_elf_reloc_shuffle): Rename to...
1336 (_bfd_mips_elf_reloc_shuffle): ... this. Handle microMIPS ASE.
1337 (gprel16_reloc_p): Handle microMIPS ASE.
1338 (literal_reloc_p): New function.
1339 * elf32-mips.c (elf_micromips_howto_table_rel): New variable.
1340 (_bfd_mips_elf32_gprel16_reloc): Handle microMIPS ASE.
1341 (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
1342 and _bfd_mips_elf_reloc_shuffle changes.
1343 (mips_elf_gprel32_reloc): Update comment.
1344 (micromips_reloc_map): New variable.
1345 (bfd_elf32_bfd_reloc_type_lookup): Handle microMIPS ASE.
1346 (mips_elf32_rtype_to_howto): Likewise.
1347 (mips_info_to_howto_rel): Likewise.
1348 (bfd_elf32_bfd_is_target_special_symbol): Define.
1349 (bfd_elf32_bfd_relax_section): Likewise.
1350 * elf64-mips.c (micromips_elf64_howto_table_rel): New variable.
1351 (micromips_elf64_howto_table_rela): Likewise.
1352 (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
1353 and _bfd_mips_elf_reloc_shuffle changes.
1354 (micromips_reloc_map): Likewise.
1355 (bfd_elf64_bfd_reloc_type_lookup): Handle microMIPS ASE.
1356 (bfd_elf64_bfd_reloc_name_lookup): Likewise.
1357 (mips_elf64_rtype_to_howto): Likewise.
1358 (bfd_elf64_bfd_is_target_special_symbol): Define.
1359 * elfn32-mips.c (elf_micromips_howto_table_rel): New variable.
1360 (elf_micromips_howto_table_rela): Likewise.
1361 (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
1362 and _bfd_mips_elf_reloc_shuffle changes.
1363 (micromips_reloc_map): Likewise.
1364 (bfd_elf32_bfd_reloc_type_lookup): Handle microMIPS ASE.
1365 (bfd_elf32_bfd_reloc_name_lookup): Likewise.
1366 (mips_elf_n32_rtype_to_howto): Likewise.
1367 (bfd_elf32_bfd_is_target_special_symbol): Define.
1368 * elfxx-mips.c (LA25_LUI_MICROMIPS_1): New macro.
1369 (LA25_LUI_MICROMIPS_2): Likewise.
1370 (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise.
1371 (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise.
1372 (TLS_RELOC_P): Handle microMIPS ASE.
1373 (mips_elf_create_stub_symbol): Adjust value of stub symbol if
1374 target is a microMIPS function.
1375 (micromips_reloc_p): New function.
1376 (micromips_reloc_shuffle_p): Likewise.
1377 (got16_reloc_p, call16_reloc_p): Handle microMIPS ASE.
1378 (got_disp_reloc_p, got_page_reloc_p): New functions.
1379 (got_ofst_reloc_p): Likewise.
1380 (got_hi16_reloc_p, got_lo16_reloc_p): Likewise.
1381 (call_hi16_reloc_p, call_lo16_reloc_p): Likewise.
1382 (hi16_reloc_p, lo16_reloc_p, jal_reloc_p): Handle microMIPS ASE.
1383 (micromips_branch_reloc_p): New function.
1384 (tls_gd_reloc_p, tls_ldm_reloc_p): Likewise.
1385 (tls_gottprel_reloc_p): Likewise.
1386 (_bfd_mips16_elf_reloc_unshuffle): Rename to...
1387 (_bfd_mips_elf_reloc_unshuffle): ... this. Handle microMIPS
1389 (_bfd_mips16_elf_reloc_shuffle): Rename to...
1390 (_bfd_mips_elf_reloc_shuffle): ... this. Handle microMIPS ASE.
1391 (_bfd_mips_elf_lo16_reloc): Handle microMIPS ASE.
1392 (mips_tls_got_index, mips_elf_got_page): Likewise.
1393 (mips_elf_create_local_got_entry): Likewise.
1394 (mips_elf_relocation_needs_la25_stub): Likewise.
1395 (mips_elf_calculate_relocation): Likewise.
1396 (mips_elf_perform_relocation): Likewise.
1397 (_bfd_mips_elf_symbol_processing): Likewise.
1398 (_bfd_mips_elf_add_symbol_hook): Likewise.
1399 (_bfd_mips_elf_link_output_symbol_hook): Likewise.
1400 (mips_elf_add_lo16_rel_addend): Likewise.
1401 (_bfd_mips_elf_check_relocs): Likewise.
1402 (mips_elf_adjust_addend): Likewise.
1403 (_bfd_mips_elf_relocate_section): Likewise.
1404 (mips_elf_create_la25_stub): Likewise.
1405 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1406 (_bfd_mips_elf_gc_sweep_hook): Likewise.
1407 (_bfd_mips_elf_is_target_special_symbol): New function.
1408 (mips_elf_relax_delete_bytes): Likewise.
1409 (opcode_descriptor): New structure.
1411 (OP32_SREG, OP32_TREG, OP16_VALID_REG): Likewise.
1412 (b_insns_32, bc_insn_32, bz_insn_32, bzal_insn_32): New variables.
1413 (beq_insn_32): Likewise.
1414 (b_insn_16, bz_insn_16): New variables.
1415 (BZC32_REG_FIELD): New macro.
1416 (bz_rs_insns_32, bz_rt_insns_32): New variables.
1417 (bzc_insns_32, bz_insns_16):Likewise.
1418 (BZ16_REG, BZ16_REG_FIELD): New macros.
1419 (jal_insn_32_bd16, jal_insn_32_bd32): New variables.
1420 (jal_x_insn_32_bd32): Likewise.
1421 (j_insn_32, jalr_insn_32): Likewise.
1422 (ds_insns_32_bd16, ds_insns_32_bd32): Likewise.
1423 (jalr_insn_16_bd16, jalr_insn_16_bd32, jr_insn_16): Likewise.
1424 (JR16_REG): New macro.
1425 (ds_insns_16_bd16): New variable.
1426 (lui_insn): Likewise.
1427 (addiu_insn, addiupc_insn): Likewise.
1428 (ADDIUPC_REG_FIELD): New macro.
1429 (MOVE32_RD, MOVE32_RS): Likewise.
1430 (MOVE16_RD_FIELD, MOVE16_RS_FIELD): Likewise.
1431 (move_insns_32, move_insns_16): New variables.
1432 (nop_insn_32, nop_insn_16): Likewise.
1434 (find_match): New function.
1435 (check_br16_dslot, check_br32_dslot): Likewise.
1436 (check_br16, check_br32): Likewise.
1437 (IS_BITSIZE): New macro.
1438 (check_4byte_branch): New function.
1439 (_bfd_mips_elf_relax_section): Likewise.
1440 (_bfd_mips_elf_merge_private_bfd_data): Disallow linking MIPS16
1441 and microMIPS modules together.
1442 (_bfd_mips_elf_print_private_bfd_data): Handle microMIPS ASE.
1443 * reloc.c (BFD_RELOC_MICROMIPS_7_PCREL_S1): New relocation.
1444 (BFD_RELOC_MICROMIPS_10_PCREL_S1): Likewise.
1445 (BFD_RELOC_MICROMIPS_16_PCREL_S1): Likewise.
1446 (BFD_RELOC_MICROMIPS_GPREL16): Likewise.
1447 (BFD_RELOC_MICROMIPS_JMP, BFD_RELOC_MICROMIPS_HI16): Likewise.
1448 (BFD_RELOC_MICROMIPS_HI16_S): Likewise.
1449 (BFD_RELOC_MICROMIPS_LO16): Likewise.
1450 (BFD_RELOC_MICROMIPS_LITERAL): Likewise.
1451 (BFD_RELOC_MICROMIPS_GOT16): Likewise.
1452 (BFD_RELOC_MICROMIPS_CALL16): Likewise.
1453 (BFD_RELOC_MICROMIPS_GOT_HI16): Likewise.
1454 (BFD_RELOC_MICROMIPS_GOT_LO16): Likewise.
1455 (BFD_RELOC_MICROMIPS_CALL_HI16): Likewise.
1456 (BFD_RELOC_MICROMIPS_CALL_LO16): Likewise.
1457 (BFD_RELOC_MICROMIPS_SUB): Likewise.
1458 (BFD_RELOC_MICROMIPS_GOT_PAGE): Likewise.
1459 (BFD_RELOC_MICROMIPS_GOT_OFST): Likewise.
1460 (BFD_RELOC_MICROMIPS_GOT_DISP): Likewise.
1461 (BFD_RELOC_MICROMIPS_HIGHEST): Likewise.
1462 (BFD_RELOC_MICROMIPS_HIGHER): Likewise.
1463 (BFD_RELOC_MICROMIPS_SCN_DISP): Likewise.
1464 (BFD_RELOC_MICROMIPS_JALR): Likewise.
1465 (BFD_RELOC_MICROMIPS_TLS_GD): Likewise.
1466 (BFD_RELOC_MICROMIPS_TLS_LDM): Likewise.
1467 (BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16): Likewise.
1468 (BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16): Likewise.
1469 (BFD_RELOC_MICROMIPS_TLS_GOTTPREL): Likewise.
1470 (BFD_RELOC_MICROMIPS_TLS_TPREL_HI16): Likewise.
1471 (BFD_RELOC_MICROMIPS_TLS_TPREL_LO16): Likewise.
1472 * bfd-in2.h: Regenerate.
1473 * libbfd.h: Regenerate.
1475 2011-07-22 H.J. Lu <hongjiu.lu@intel.com>
1477 * Makefile.am (ALL_MACHINES): Add cpu-k1om.lo.
1478 (ALL_MACHINES_CFILES): Add cpu-k1om.c.
1479 * Makefile.in: Regenerated.
1481 * archures.c (bfd_architecture): Add bfd_arch_k1om.
1482 (bfd_k1om_arch): New.
1483 (bfd_archures_list): Add &bfd_k1om_arch.
1484 * bfd-in2.h: Regenerated.
1486 * config.bfd (targ64_selvecs): Add bfd_elf64_k1om_vec if
1487 bfd_elf64_x86_64_vec is supported. Add bfd_elf64_k1om_freebsd_vec
1488 if bfd_elf64_x86_64_freebsd_vec is supported.
1489 (targ_selvecs): Likewise.
1491 * configure.in: Support bfd_elf64_k1om_vec and
1492 bfd_elf64_k1om_freebsd_vec.
1493 * configure: Regenerated.
1497 * elf64-x86-64.c (elf64_k1om_elf_object_p): New.
1498 (bfd_elf64_k1om_vec): Likewise.
1499 (bfd_elf64_k1om_freebsd_vec): Likewise.
1501 * targets.c (bfd_elf64_k1om_vec): New.
1502 (bfd_elf64_k1om_freebsd_vec): Likewise.
1503 (_bfd_target_vector): Add bfd_elf64_k1om_vec and
1504 bfd_elf64_k1om_freebsd_vec.
1506 2011-07-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1508 Fix false coff-go32-exe matches.
1509 * coff-i386.c (TARGET_SYM) <_bfd_check_format>: Conditionally use
1511 * coff-stgo32.c (go32_check_format): New forward declaration.
1512 (COFF_CHECK_FORMAT): New defintion.
1513 (go32_check_format): New function.
1515 2011-07-15 Alan Modra <amodra@gmail.com>
1517 * configure.in: Bump version.
1518 * configure: Regenerate.
1520 2011-07-14 Alan Modra <amodra@gmail.com>
1522 * linker.c (_bfd_generic_section_already_linked): Set l_flags.
1523 * elf-bfd.h (struct already_linked): Forward declare.
1525 2011-07-14 Alan Modra <amodra@gmail.com>
1527 * elflink.c (_bfd_elf_fix_symbol_flags): Loop on indirect syms.
1528 (_bfd_elf_adjust_dynamic_symbol): Remove FIXME.
1530 2011-07-14 Alan Modra <amodra@gmail.com>
1532 * elf64-ppc.c (struct ppc_link_hash_table): Add plt_static_chain.
1533 (build_plt_stub): Add plt_static_chain param, don't load r11 if false.
1534 (build_tls_get_addr_stub): Likewise.
1535 (ppc_build_one_stub): Update calls to above.
1536 (ppc_size_one_stub): Adjust stub size.
1537 (ppc64_elf_size_stubs): Add plt_static_chain param, save to htab.
1538 * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
1540 2011-07-12 Nick Clifton <nickc@redhat.com>
1542 * elf32-arm.c (elf32_arm_section_flags): Delete.
1543 (elf_backend_section_flags): Remove.
1545 2011-07-11 H.J. Lu <hongjiu.lu@intel.com>
1548 * elflink.c (bfd_elf_size_dynamic_sections): Also skip BFD_PLUGIN
1549 when setting stack_flags.
1551 2011-07-11 Catherine Moore <clm@codesourcery.com>
1553 * aout-adobe.c (aout_32_bfd_lookup_section_flags): New definition.
1554 * aout-target.h (MY_bfd_lookup_section_flags): New definition.
1555 * aout-tic30.c (MY_bfd_lookup_section_flags): New definition.
1556 * bfd-in2.h: Regenerated.
1557 * bfd.c (bfd_lookup_section_flags): New definition.
1558 * binary.c (binary_bfd_lookup_section_flags): New definition.
1559 * bout.c (b_out_bfd_lookup_section_flags): New definition.
1560 * coff-alpha.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
1561 * coff-mips.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
1562 * coff-rs6000.c (rs6000coff_vec): Include
1563 bfd_generic_lookup_section_flags.
1564 (pmac_xcoff_vec): Likewise.
1565 * coffcode.h (coff_bfd_lookup_section_flags): New definition.
1566 * coff64-rs6000.c (rs6000coff64_vec): Include
1567 bfd_generic_lookup_section_flags.
1568 (aix5coff64_vec): Likewise.
1569 * ecoff.c (bfd_debug_section): Initialize flag_info field.
1570 * elf-bfd.h (elf_backend_lookup_section_flags_hook): Declare.
1571 (bfd_elf_lookup_section_flags): Declare.
1572 * elflink.c (bfd_elf_lookup_section_flags): New function.
1573 * elfxx-target.h (bfd_elfNN_bfd_lookup_section_flags): Define.
1574 (elf_backend_lookup_section_flags_hook): Define.
1575 (elf_backend_data): Add elf_backend_lookup_section_flags_hook.
1576 * i386msdos.c (msdos_bfd_lookup_section_flags): New define.
1577 * i386os9k.c (os9k_bfd_lookup_section_flags): New define.
1578 * ieee.c (ieee_bfd_lookup_section_flags): New define.
1579 * ihex.c (ihex_bfd_lookup_section_flags): New define.
1580 * libbfd-in.h (_bfd_nolink_bfd_lookup_section_flags): Declare.
1581 (bfd_generic_lookup_section_flags): Declare.
1582 * libbfd.h: Regenerated.
1583 * mach-o-target.c (bfd_mach_o_bfd_lookup_section_flags): New.
1584 * mmo.c (mmo_bfd_lookup_section_flags): New definition.
1585 * nlm-target.h (nlm_bfd_lookup_section_flags): New definition.
1586 * oasys.c (oasys_bfd_lookup_section_flags): New definition.
1587 * pef.c (bfd_pef_bfd_lookup_section_flags): New definition.
1588 * plugin.c (bfd_plugin_bfd_lookup_section_flags): New definition.
1589 * ppcboot.c (ppcboot_bfd_lookup_section_flags): New definition.
1590 * reloc.c (bfd_generic_lookup_section_flags): New function.
1591 * som.c (som_bfd_lookup_section_flags): New definition.
1592 * srec.c (srec_bfd_lookup_section_flags): New definition.
1593 * targets.c (flag_info): Declare.
1594 (NAME##_bfd_lookup_section_flags): Add to LINK jump table.
1595 (_bfd_lookup_section_flags): New.
1596 * tekhex.c (tekhex_bfd_lookup_section_flags): New definition.
1597 * versados.c (versados_bfd_lookup_section_flags): New definition.
1598 * vms-alpha.c (alpha_vms_bfd_lookup_section_flag): New definition.
1599 * xsym.c (bfd_sym_bfd_lookup_section_flags): New definition.
1601 2011-07-11 H.J. Lu <hongjiu.lu@intel.com>
1604 * elfnn-ia64.c (count_dyn_reloc): Fix a typo.
1606 2011-07-09 Alan Modra <amodra@gmail.com>
1609 * elflink.c (elf_link_add_object_symbols): Use elf_discarded_section
1610 rather than kept_section to determine whether a symbol is from
1611 a discarded section.
1612 * cofflink.c (coff_link_add_symbols): Make symbols from discarded
1613 sections appear undefined.
1615 2011-07-09 H.J. Lu <hongjiu.lu@intel.com>
1618 * elf-bfd.h (_bfd_elf_section_already_linked): Replace
1619 "asection *" with "struct already_linked *".
1620 * libbfd-in.h (_bfd_nolink_section_already_linked): Likewise.
1621 (_bfd_generic_section_already_linked): Likewise.
1622 (bfd_section_already_linked_table_insert): Likewise.
1623 (struct already_linked): New.
1624 (struct bfd_section_already_linked): Use it.
1625 * elflink.c (_bfd_elf_section_already_linked): Replace.
1626 "asection *" with "struct already_linked *". Replace the plugin
1627 dummy with the LTO output.
1628 * linker.c (_bfd_generic_section_already_linked): Likewise.
1629 * targets.c (struct already_linked): Add forward declaration.
1630 (bfd_target): Replace "struct bfd_section *" with
1631 "struct already_linked *" in _section_already_linked.
1632 * bfd-in2.h: Regenerate.
1633 * libbfd.h: Regenerate.
1635 2011-07-06 Tristan Gingold <gingold@adacore.com>
1637 * mach-o.h: Move loader related definitions to
1638 include/mach-o/loader.h. Include it.
1640 2011-07-05 H.J. Lu <hongjiu.lu@intel.com>
1642 * elf64-x86-64.c (elf_backend_post_process_headers): Always
1643 define to _bfd_elf_set_osabi.
1645 2011-07-03 Samuel Thibault <samuel.thibault@gnu.org>
1646 Thomas Schwinge <thomas@schwinge.name>
1649 * elf.c (_bfd_elf_set_osabi): Use ELFOSABI_GNU name instead of
1650 ELFOSABI_LINUX alias.
1651 * elf32-hppa.c: Likewise.
1652 * elf32-i370.c: Likewise.
1653 * elf64-hppa.c: Likewise.
1655 2011-07-01 Ian Lance Taylor <iant@google.com>
1657 * elf32-i386.c (elf_i386_eh_frame_plt): Correct expression: change
1658 DW_OP_lit3 to DW_OP_lit2.
1660 2011-07-01 Alan Modra <amodra@gmail.com>
1662 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't look at
1663 dyn relocs when called to copy flags for a weak sym.
1664 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1665 (ppc64_elf_merge_private_bfd_data): Delete.
1666 (bfd_elf64_bfd_merge_private_bfd_data): Define as
1667 _bfd_generic_verify_endian_match.
1669 2011-06-30 Bernd Schmidt <bernds@codesourcery.com>
1671 * bfd/elf32-tic6x.c (elf32_tic6x_set_osabi): Also set it if
1674 2011-06-28 Tristan Gingold <gingold@adacore.com>
1676 * vms-alpha.c (vms_private_data_struct): Make vms_linkage_index
1678 (_bfd_vms_write_etir): Write linkage index from reloc.
1680 2011-06-28 Fawzi Mohamed <fawzi.mohamed@nokia.com>
1682 * mach-o.c (bfd_mach_o_read_command): Also ignore
1683 BFD_MACH_O_LC_ROUTINES_64.
1685 2011-06-27 Tristan Gingold <gingold@adacore.com>
1687 * vms-alpha.c (_bfd_vms_write_etir): Use 'section' to get current
1688 section target index.
1690 2011-06-27 Nick Clifton <nickc@redhat.com>
1692 * cisco-core.c (cisco_core_little_vec): Add initialization of
1693 match_priority field.
1695 2011-06-27 Tristan Gingold <gingold@adacore.com>
1697 * cache.c: Include bfd_stdint.h.
1698 (cache_bmmap): Change profile. Return region start and size.
1699 * bfdio.c (struct bfd_iovec): Change bmmap profile.
1700 (bfd_mmap): Change profile and adjust. Update comment.
1701 (memory_bmmap): Change profile.
1702 * opncls.c (opncls_bmmap): Change profile.
1703 * vms-lib.c (vms_lib_bmmap): Likewise.
1704 * libbfd.h: Regenerate.
1705 * bfd-in2.h: Regenerate.
1707 2011-06-27 Tristan Gingold <gingold@adacore.com>
1709 * vms-misc.c (vms_time_to_time_t): Adjust overflow detection.
1712 2011-06-25 H.J. Lu <hongjiu.lu@intel.com>
1714 * elf64-x86-64.c (elf_backend_post_process_headers): Don't
1715 define for FreeBSD/x86-64 nor FreeBSD/L1OM. Define for L1OM.
1717 2011-06-25 Jan Kratochvil <jan.kratochvil@redhat.com>
1719 * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Initialize
1721 * elf32-i386.c (elf_i386_link_hash_table): Likewise.
1723 2011-06-24 Richard Henderson <rth@redhat.com>
1726 * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Recover the
1727 tlsgd insn before swapping adjacent insns.
1729 2011-06-24 Tristan Gingold <gingold@adacore.com>
1731 * vms-alpha.c (alpha_vms_slurp_relocs): Add a guard for relocs in the
1734 2011-06-24 Alan Modra <amodra@gmail.com>
1737 * elf.c (assign_file_positions_for_load_sections): Don't align
1738 sh_offset for all SHT_NOBITS sections here, just .tbss sections
1739 that don't get a PT_LOAD.
1741 2011-06-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1743 * elf32-sh.c (sh_elf_relocate_section): Allow R_SH_TLS_LE_32 for PIE.
1744 (sh_elf_check_relocs): Likewise.
1746 2011-06-22 Richard Henderson <rth@redhat.com>
1748 * elf64-alpha.c (elf64_alpha_check_relocs): No dynamic reloc for
1749 TPREL in a PIE image.
1750 (alpha_dynamic_entries_for_reloc): Likewise.
1751 (elf64_alpha_relocate_section): Allow TPREL in PIE images.
1752 (elf64_alpha_relax_got_load): Likewise.
1754 2011-06-22 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
1756 * elf32-arm.c (elf32_arm_final_link_relocate): Allow R_ARM_TLS_LE32
1759 2011-06-22 Alan Modra <amodra@gmail.com>
1761 * elflink.c (_bfd_elf_merge_symbol): Allow type changes for
1762 plugin symbols. Fix segfault on linker scrip defined syms.
1764 2011-06-20 Jakub Jelinek <jakub@redhat.com>
1767 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Allow no relocations
1768 at all for linker created .eh_frame sections.
1769 (_bfd_elf_discard_section_eh_frame): Handle linker created
1770 .eh_frame sections with no relocations.
1771 * elf64-x86-64.c: Include dwarf2.h.
1772 (elf_x86_64_eh_frame_plt): New variable.
1773 (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
1774 PLT_FDE_LEN_OFFSET): Define.
1775 (struct elf_x86_64_link_hash_table): Add plt_eh_frame field.
1776 (elf_x86_64_create_dynamic_sections): Create and fill in
1777 .eh_frame section for .plt section.
1778 (elf_x86_64_size_dynamic_sections): Write .plt section size
1779 into .eh_frame FDE covering .plt section.
1780 (elf_x86_64_finish_dynamic_sections): Write .plt section
1781 start into .eh_frame FDE covering .plt section. Call
1782 _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
1783 (elf_backend_plt_alignment): Define to 4.
1784 * elf32-i386.c: Include dwarf2.h.
1785 (elf_i386_eh_frame_plt): New variable.
1786 (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
1787 PLT_FDE_LEN_OFFSET): Define.
1788 (struct elf_i386_link_hash_table): Add plt_eh_frame field.
1789 (elf_i386_create_dynamic_sections): Create and fill in
1790 .eh_frame section for .plt section.
1791 (elf_i386_size_dynamic_sections): Write .plt section size
1792 into .eh_frame FDE covering .plt section.
1793 (elf_i386_finish_dynamic_sections): Write .plt section
1794 start into .eh_frame FDE covering .plt section. Call
1795 _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
1796 (elf_backend_plt_alignment): Define to 4.
1798 2011-06-19 H.J. Lu <hongjiu.lu@intel.com>
1800 * elf64-x86-64.c (elf_backend_post_process_headers): Defined
1803 2011-06-16 H.J. Lu <hongjiu.lu@intel.com>
1805 * elf64-x86-64.c: Include <stdarg.h> and CORE_HEADER if
1806 CORE_HEADER is defined.
1807 (elf_x86_64_write_core_note): New.
1808 (elf_backend_write_core_note): Likewise.
1810 * hosts/x86-64linux.h (uint64_t): New.
1811 (user_regsx32_struct): Likewise.
1812 (elf_gregx32_t): Likewise.
1813 (ELF_NGREGX32): Likewise.
1814 (elf_gregsetx32_t): Likewise.
1815 (elf_prstatusx32): Likewise.
1816 (prstatusx32_t): Likewise.
1817 (user_fpregs32_struct): Removed.
1818 (user_fpxregs32_struct): Likewise.
1820 (elf_fpregset32_t): Likewise.
1821 (elf_fpxregset32_t): Likewise.
1822 (prgregset32_t): Likewise.
1823 (prfpregset32_t): Likewise.
1825 2011-06-16 H.J. Lu <hongjiu.lu@intel.com>
1827 * elf64-x86-64.c (elf_x86_64_grok_prstatus): Support x32.
1828 (elf_x86_64_grok_psinfo): Likewise.
1830 2011-06-16 Nick Clifton <nickc@redhat.com>
1832 * elf.c (elf_find_function): Fail if not provided with a symbol
1835 2011-06-15 Ulrich Weigand <ulrich.weigand@linaro.org>
1837 * elf-bfd.h (elfcore_write_arm_vfp): Add prototype.
1838 * elf.c (elfcore_grok_arm_vfp): New function.
1839 (elfcore_grok_note): Call it to handle NT_ARM_VFP notes.
1840 (elfcore_write_arm_vfp): New function.
1841 (elfcore_write_register_note): Call it to handle .reg-arm-vfp.
1843 2011-06-14 Richard Henderson <rth@redhat.com>
1845 * elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Rename from
1846 elf64_alpha_merge_ind_symbols; adjust for the generic interface.
1847 (elf64_alpha_always_size_sections): Don't call
1848 elf64_alpha_merge_ind_symbols.
1849 (elf_backend_copy_indirect_symbol): New.
1851 2011-06-14 Alan Modra <amodra@gmail.com>
1854 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Check sec_info_type
1855 before doing anything.
1856 (_bfd_elf_discard_section_eh_frame): Likewise.
1858 2011-06-14 Alan Modra <amodra@gmail.com>
1860 * Makefile.am: Formatting.
1861 * Makefile.in: Regenerate.
1862 * configure.in (bfd_elf64_tilegx_vec): Add elfxx-tilegx.lo.
1863 * po/SRC-POTFILES.in: Regnerate.
1865 2011-06-14 Alan Modra <amodra@gmail.com>
1867 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Don't use PTR.
1868 (allocate_dynrelocs, readonly_dynrelocs): Replace PTR with void *.
1869 Don't handle warning symbols here.
1870 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): As above.
1871 (allocate_dynrelocs, readonly_dynrelocs): As above.
1873 2011-06-14 Alan Modra <amodra@gmail.com>
1876 * elflink.c (_bfd_elf_gc_mark_extra_sections): New function.
1877 (elf_gc_sweep): Don't treat debug and sections like .comment
1879 (bfd_elf_gc_sections): Treat note sections as gc roots only when
1880 not part of a group. Always call gc_mark_extra_sections.
1881 * elf-bfd.h (_bfd_elf_gc_mark_extra_sections): Declare.
1882 * elfxx-target.h (elf_backend_gc_mark_extra_sections): Default to
1883 _bfd_elf_gc_mark_extra_sections.
1884 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Call
1885 _bfd_elf_gc_mark_extra_sections.
1886 * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): Likewise.
1888 2011-06-13 Nick Clifton <nickc@redhat.com>
1890 * elf32-tilepro.c (tilepro_elf_check_relocs): Delete unused local
1891 variable 'local_got_offsets'.
1892 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
1893 (tilegx_finish_dyn): Delete unused local variable 'abi_64_p'.
1895 2011-06-13 Walter Lee <walt@tilera.com>
1897 * Makefile.am (ALL_MACHINES): Add cpu-tilegx.lo and cpu-tilepro.lo.
1898 (ALL_MACHINE_CFILES): Add cpu-tilegx.c and cpu-tilepro.c.
1899 (BFD32_BACKENDS): Add elf32-tilegx.lo, elf32-tilepro.lo,
1900 and elfxx-tilegx.lo.
1901 (BFD32_BACKENDS_CFILES): Add elf32-tilegx.c elf32-tilepro.c, and
1903 (BFD64_BACKENDS): Add elf64-tilegx.lo.
1904 (BFD64_BACKENDS_CFILES): Add elf64-tilegx.c.
1905 * Makefile.in: Regenerate.
1906 * arctures.c (bfd_architecture): Define bfd_arch_tilepro,
1907 bfd_arch_tilegx, bfd_mach_tilepro, bfd_mach_tilegx.
1908 (bfd_arch_info): Add bfd_tilegx_arch, bfd_tilepro_arch.
1909 (bfd_archures_list): Add bfd_tilegx_arch, bfd_tilepro_arch.
1910 bfd-in2.h: Regenerate.
1911 * config.bfd: Handle tilegx-*-* and tilepro-*-*.
1912 * configure.in: Handle bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
1913 and bfd_elf64_tilegx_vec.
1914 * configure: Regenerate.
1915 * elf-bfd.h (enum elf_target_id): Define TILEGX_ELF_DATA and
1917 * libbfd.h: Regenerate.
1918 * reloc.c: Add BFD_RELOC_TILEPRO_{COPY, GLOB_DAT, JMP_SLOT,
1919 RELATIVE, BROFF_X1, JOFFLONG_X1, JOFFLONG_X1_PLT, IMM8_X0,
1920 IMM8_Y0, IMM8_X1, IMM8_Y1, DEST_IMM8_X1, MT_IMM15_X1, MF_IMM15_X1,
1921 IMM16_X0, IMM16_X1, IMM16_X0_LO, IMM16_X1_LO, IMM16_X0_HI,
1922 IMM16_X1_HI, IMM16_X0_HA, IMM16_X1_HA, IMM16_X0_PCREL,
1923 IMM16_X1_PCREL, IMM16_X0_LO_PCREL, IMM16_X1_LO_PCREL,
1924 IMM16_X0_HI_PCREL, IMM16_X1_HI_PCREL, IMM16_X0_HA_PCREL,
1925 IMM16_X1_HA_PCREL, IMM16_X0_GOT, IMM16_X1_GOT, IMM16_X0_GOT_LO,
1926 IMM16_X1_GOT_LO, IMM16_X0_GOT_HI, IMM16_X1_GOT_HI,
1927 IMM16_X0_GOT_HA, IMM16_X1_GOT_HA, MMSTART_X0, MMEND_X0,
1928 MMSTART_X1, MMEND_X1, SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1,
1929 IMM16_X0_TLS_GD, IMM16_X1_TLS_GD, IMM16_X0_TLS_GD_LO,
1930 IMM16_X1_TLS_GD_LO, IMM16_X0_TLS_GD_HI, IMM16_X1_TLS_GD_HI,
1931 IMM16_X0_TLS_GD_HA, IMM16_X1_TLS_GD_HA, IMM16_X0_TLS_IE,
1932 IMM16_X1_TLS_IE, IMM16_X0_TLS_IE_LO, IMM16_X1_TLS_IE_LO,
1933 IMM16_X0_TLS_IE_HI, IMM16_X1_TLS_IE_HI, IMM16_X0_TLS_IE_HA,
1934 IMM16_X1_TLS_IE_HA, TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
1935 Add BFD_RELOC_TILEGX_{HW0, HW1, HW2, HW3, HW0_LAST, HW1_LAST,
1936 HW2_LAST, COPY, GLOB_DAT, JMP_SLOT, RELATIVE, BROFF_X1,
1937 JUMPOFF_X1, JUMPOFF_X1_PLT, IMM8_X0, IMM8_Y0, IMM8_X1, IMM8_Y1,
1938 DEST_IMM8_X1, MT_IMM14_X1, MF_IMM14_X1, MMSTART_X0, MMEND_X0,
1939 SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1, IMM16_X0_HW0,
1940 IMM16_X1_HW0, IMM16_X0_HW1, IMM16_X1_HW1, IMM16_X0_HW2,
1941 IMM16_X1_HW2, IMM16_X0_HW3, IMM16_X1_HW3, IMM16_X0_HW0_LAST,
1942 IMM16_X1_HW0_LAST, IMM16_X0_HW1_LAST, IMM16_X1_HW1_LAST,
1943 IMM16_X0_HW2_LAST, IMM16_X1_HW2_LAST, IMM16_X0_HW0_PCREL,
1944 IMM16_X1_HW0_PCREL, IMM16_X0_HW1_PCREL, IMM16_X1_HW1_PCREL,
1945 IMM16_X0_HW2_PCREL, IMM16_X1_HW2_PCREL, IMM16_X0_HW3_PCREL,
1946 IMM16_X1_HW3_PCREL, IMM16_X0_HW0_LAST_PCREL,
1947 IMM16_X1_HW0_LAST_PCREL, IMM16_X0_HW1_LAST_PCREL,
1948 IMM16_X1_HW1_LAST_PCREL, IMM16_X0_HW2_LAST_PCREL,
1949 IMM16_X1_HW2_LAST_PCREL, IMM16_X0_HW0_GOT, IMM16_X1_HW0_GOT,
1950 IMM16_X0_HW1_GOT, IMM16_X1_HW1_GOT, IMM16_X0_HW2_GOT,
1951 IMM16_X1_HW2_GOT, IMM16_X0_HW3_GOT, IMM16_X1_HW3_GOT,
1952 IMM16_X0_HW0_LAST_GOT, IMM16_X1_HW0_LAST_GOT,
1953 IMM16_X0_HW1_LAST_GOT, IMM16_X1_HW1_LAST_GOT,
1954 IMM16_X0_HW2_LAST_GOT, IMM16_X1_HW2_LAST_GOT, IMM16_X0_HW0_TLS_GD,
1955 IMM16_X1_HW0_TLS_GD, IMM16_X0_HW1_TLS_GD, IMM16_X1_HW1_TLS_GD,
1956 IMM16_X0_HW2_TLS_GD, IMM16_X1_HW2_TLS_GD, IMM16_X0_HW3_TLS_GD,
1957 IMM16_X1_HW3_TLS_GD, IMM16_X0_HW0_LAST_TLS_GD,
1958 IMM16_X1_HW0_LAST_TLS_GD, IMM16_X0_HW1_LAST_TLS_GD,
1959 IMM16_X1_HW1_LAST_TLS_GD, IMM16_X0_HW2_LAST_TLS_GD,
1960 IMM16_X1_HW2_LAST_TLS_GD, IMM16_X0_HW0_TLS_IE,
1961 IMM16_X1_HW0_TLS_IE, IMM16_X0_HW1_TLS_IE, IMM16_X1_HW1_TLS_IE,
1962 IMM16_X0_HW2_TLS_IE, IMM16_X1_HW2_TLS_IE, IMM16_X0_HW3_TLS_IE,
1963 IMM16_X1_HW3_TLS_IE, IMM16_X0_HW0_LAST_TLS_IE,
1964 IMM16_X1_HW0_LAST_TLS_IE, IMM16_X0_HW1_LAST_TLS_IE,
1965 IMM16_X1_HW1_LAST_TLS_IE, IMM16_X0_HW2_LAST_TLS_IE,
1966 IMM16_X1_HW2_LAST_TLS_IE, TLS_DTPMOD64, TLS_DTPOFF64, TLS_TPOFF64,
1967 TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
1968 * targets.c (bfd_elf32_tilegx_vec): Declare.
1969 (bfd_elf32_tilepro_vec): Declare.
1970 (bfd_elf64_tilegx_vec): Declare.
1971 (bfd_target_vector): Add bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
1972 and bfd_elf64_tilegx_vec.
1973 * cpu-tilegx.c: New file.
1974 * cpu-tilepro.c: New file.
1975 * elf32-tilepro.h: New file.
1976 * elf32-tilepro.c: New file.
1977 * elf32-tilegx.c: New file.
1978 * elf32-tilegx.h: New file.
1979 * elf64-tilegx.c: New file.
1980 * elf64-tilegx.h: New file.
1981 * elfxx-tilegx.c: New file.
1982 * elfxx-tilegx.h: New file.
1984 2011-06-13 Alan Modra <amodra@gmail.com>
1986 * linker.c (bfd_link_hash_traverse): Follow warning symbol link.
1987 (_bfd_generic_link_write_global_symbol, fix_syms): Don't handle
1988 warning symbols here.
1989 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
1990 * elf32-arm.c (allocate_dynrelocs_for_symbol,
1991 elf32_arm_readonly_dynrelocs): Likewise.
1992 * elf32-bfin.c (bfin_discard_copies): Likewise.
1993 * elf32-cris.c (elf_cris_adjust_gotplt_to_got,
1994 elf_cris_discard_excess_dso_dynamics,
1995 elf_cris_discard_excess_program_dynamics): Likewise.
1996 * elf32-hppa.c (allocate_plt_static, allocate_dynrelocs,
1997 clobber_millicode_symbols, readonly_dynrelocs): Likewise.
1998 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
1999 * elf32-i386.c (elf_i386_allocate_dynrelocs,
2000 elf_i386_readonly_dynrelocs): Likewise.
2001 * elf32-lm32.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
2002 * elf32-m32c.c (m32c_relax_plt_check, m32c_relax_plt_realloc): Likewise.
2003 * elf32-m32r.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
2004 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
2005 * elf32-microblaze.c (allocate_dynrelocs): Likewise.
2006 * elf32-ppc.c (allocate_dynrelocs, maybe_set_textrel): Likewise.
2007 * elf32-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
2008 * elf32-score.c (score_elf_sort_hash_table_f): Likewise.
2009 * elf32-score7.c (score_elf_sort_hash_table_f): Likewise.
2010 * elf32-sh.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
2011 * elf32-tic6x.c (elf32_tic6x_allocate_dynrelocs,
2012 elf32_tic6x_readonly_dynrelocs): Likewise.
2013 * elf32-vax.c (elf_vax_discard_copies): Likewise.
2014 * elf32-xstormy16.c (xstormy16_relax_plt_check,
2015 xstormy16_relax_plt_realloc): Likewise.
2016 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Likewise.
2017 * elf64-alpha.c (elf64_alpha_output_extsym,
2018 elf64_alpha_calc_got_offsets_for_symbol,
2019 elf64_alpha_calc_dynrel_sizes, elf64_alpha_size_rela_got_1): Likewise.
2020 * elf64-hppa.c (elf64_hppa_mark_exported_functions,
2021 allocate_global_data_opd, elf64_hppa_mark_milli_and_exported_functions,
2022 elf_hppa_unmark_useless_dynamic_symbols,
2023 elf_hppa_remark_useless_dynamic_symbols): Likewise.
2024 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref, func_desc_adjust,
2025 adjust_opd_syms, adjust_toc_syms, allocate_dynrelocs,
2026 readonly_dynrelocs, merge_global_got, reallocate_got,
2027 undo_symbol_twiddle): Likewise.
2028 * elf64-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
2029 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
2030 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs,
2031 elf_x86_64_readonly_dynrelocs): Likewise.
2032 * elflink.c (elf_link_renumber_hash_table_dynsyms,
2033 elf_link_renumber_local_hash_table_dynsyms, _bfd_elf_export_symbol,
2034 _bfd_elf_link_find_version_dependencies,
2035 _bfd_elf_link_assign_sym_version, _bfd_elf_adjust_dynamic_symbol,
2036 _bfd_elf_link_sec_merge_syms, elf_adjust_dynstr_offsets,
2037 elf_collect_hash_codes, elf_collect_gnu_hash_codes,
2038 elf_renumber_gnu_hash_syms, elf_gc_sweep_symbol,
2039 elf_gc_propagate_vtable_entries_used,
2040 elf_gc_smash_unused_vtentry_relocs, bfd_elf_gc_mark_dynamic_ref_symbol,
2041 elf_gc_allocate_got_offsets): Likewise.
2042 * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free,
2043 elfNN_ia64_global_dyn_sym_thunk): Likewise.
2044 * elfxx-mips.c (mips_elf_check_symbols, mips_elf_output_extsym,
2045 mips_elf_sort_hash_table_f, allocate_dynrelocs): Likewise.
2046 * elfxx-sparc.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
2047 * i386linux.c (linux_tally_symbols): Likewise.
2048 * m68klinux.c (linux_tally_symbols): Likewise.
2049 * sparclinux.c (linux_tally_symbols): Likewise.
2050 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
2051 * xcofflink.c (xcoff_post_gc_symbol): Likewise.
2053 * elflink.c (elf_link_output_extsym): Make it a bfd_hash_traverse
2054 function. Update all callers.
2055 * aoutx.h (aout_link_write_other_symbol): Likewise.
2056 * pdp11.c (aout_link_write_other_symbol): Likewise.
2057 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
2058 * ecoff.c (ecoff_link_write_external): Likewise.
2059 * xcofflink.c (xcoff_write_global_symbol): Likewise.
2060 * vms-alpha.c (alpha_vms_link_output_symbol): Likewise. Handle
2062 * ecoff.c (ecoff_link_hash_traverse): Delete.
2063 * coff-ppc.c (ppc_bfd_coff_final_link): Use bfd_hash_traverse for
2064 _bfd_coff_write_global_sym.
2065 * libcoff-in.h (_bfd_coff_write_global_sym): Update prototype.
2066 * libcoff.h: Regenerate.
2068 2011-06-10 Nick Clifton <nickc@redhat.com>
2070 * elflink.c (_bfd_elf_link_create_dynamic_sections): If the
2071 backend does not provide a function for creating dynamic sections
2073 (bfd_elf_final_link): Issue a warning message if a dynamic section
2074 has the SHT_NOTE type.
2075 (bfd_elf_final_link): Do not look for dynamic strings in a section
2076 that does not have the SHT_STRTAB type or the name .dynstr.
2077 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Fail if the got
2078 section is not in the output binary.
2079 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Likewise.
2081 2011-06-09 Tristan Gingold <gingold@adacore.com>
2083 * elfnn-ia64.c (elfNN_ia64_relax_section, elfNN_ia64_choose_gp)
2084 (elfNN_ia64_relocate_section, elfNN_vms_object_p): Remove trailing
2087 2011-06-09 Tristan Gingold <gingold@adacore.com>
2089 * bfd.c (bfd_get_sign_extend_vma): Handle aixcoff.
2091 2011-06-09 Nick Clifton <nickc@redhat.com>
2094 * elf.c (_bfd_elf_init_private_section_data): Add an assertion
2095 that the output section has an allocated bfd_elf_section_data
2097 * elfxx-mips.c (mips_elf_check_symbols): Do not create a stub for
2098 symbols in sections that have been removed by garbage collection.
2100 2011-06-08 H.J. Lu <hongjiu.lu@intel.com>
2102 * elf64-x86-64.c (elf_x86_64_check_relocs): Allow R_X86_64_64
2103 relocations in SEC_DEBUGGING sections when building shared
2106 2011-06-08 H.J. Lu <hongjiu.lu@intel.com>
2109 * elflink.c (elf_gc_sweep): Don't check SHT_NOTE sections here.
2110 (bfd_elf_gc_sections): Also check SHT_NOTE sections.
2112 2011-06-08 Tristan Gingold <gingold@adacore.com>
2114 * makefile.vms (OBJS): Add elfxx-ia64.obj
2117 2011-06-08 Alan Modra <amodra@gmail.com>
2119 * aix386-core.c, * cisco-core.c, * hpux-core.c, * osf-core.c,
2120 * sco5-core.c: Init match_priority field.
2122 2011-06-08 Alan Modra <amodra@gmail.com>
2124 * elflink.c (_bfd_elf_archive_symbol_lookup): Follow warning and
2125 indirect links here.
2127 2011-06-07 Joel Brobecker <brobecker@adacore.com>
2129 * irix-core.c (irix_core_vec): Add match_priority field.
2131 2011-06-06 Alan Modra <amodra@gmail.com>
2133 * targets.c (bfd_target): Make ar_max_namelen an unsigned char.
2135 * configure.in: Bump bfd version.
2136 * elfcode.h (elf_object_p): Delete hacks preventing match of
2137 EM_NONE and ELFOSABI_NONE targets when a better match exists.
2138 * elfxx-target.h (elf_match_priority): Define and use.
2139 * format.c (bfd_check_format_matches): Use target match_priority
2140 to choose best of multiple matching targets. In cases with multiple
2141 matches rerun _bfd_check_format if we don't choose the last match.
2142 * aout-adobe.c, * aout-arm.c, * aout-target.h, * aout-tic30.c,
2143 * binary.c, * bout.c, * coff-alpha.c, * coff-i386.c, * coff-i860.c,
2144 * coff-i960.c, * coff-ia64.c, * coff-mips.c, * coff-or32.c,
2145 * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic30.c,
2146 * coff-tic54x.c, * coff-x86_64.c, * coff64-rs6000.c, * coffcode.h,
2147 * i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c, * mach-o-target.c,
2148 * mipsbsd.c, * mmo.c, * nlm-target.h, * oasys.c, * pdp11.c,
2149 * pe-mips.c, * pef.c, * plugin.c, * ppcboot.c, * som.c, * srec.c,
2150 * tekhex.c, * trad-core.c, * verilog.c, * versados.c, * vms-alpha.c,
2151 * vms-lib.c, * xsym.c: Init match_priority field.
2152 * configure: Regenerate.
2153 * bfd-in2.h: Regenerate.
2155 2011-06-04 H.J. Lu <hongjiu.lu@intel.com>
2158 * elfcode.h (elf_object_p): Revert the last change.
2160 2011-06-04 Alan Modra <amodra@gmail.com>
2162 * archures.c (bfd_arch_get_compatible): If one arch is unknown,
2163 return the other arch.
2164 * elfcode.h (elf_object_p): Allow explicit match to generic ELF
2167 2011-06-03 Bertram Felgenhauer <bertram.felgenhauer@gmail.com>
2170 * hash.c (higher_primer_number): Add more, small, prime numbers.
2171 (bfd_hash_set_default_size): Likewise.
2173 2011-06-02 Nick Clifton <nickc@redhat.com>
2175 * coff-mcore.c: Fix spelling typo.
2176 * coff-stgo32.c: Likewise.
2177 * elf32-arm.c: Likewise.
2178 * elf32-avr.c: Likewise.
2179 * elf-m68hc1x.c: Likewise.
2180 * elf32-mcore.c: Likewise.
2181 * elf32-mep.c: Likewise.
2182 * elf32-mt.c: Likewise.
2183 * elf32-ppc.c: Likewise.
2184 * elf32-xtensa.c: Likewise.
2185 * elf64-ppc.c: Likewise.
2186 * elfxx-mips.c: Likewise.
2187 * netbsd.h: Likewise.
2188 * nlmcode.h: Likewise.
2189 * vms-alpha.c: Likewise.
2190 * po/bfd.pot: Regenerate.
2191 * po/SRC-POTFILES.in: Regenerate.
2193 2011-06-01 DJ Delorie <dj@redhat.com>
2195 * config.bfd: Add bfd_elf32_rx_be_ns_vec.
2196 * target.c: Likewise.
2197 * configure.in: Likewise.
2198 * configure.in: Regenerate.
2199 * elf32-rx.c: Add elf32-rx-be-ns target.
2200 (rx_elf_object_p): Never allow the be-ns target by default,
2201 only allow it if the user requests it.
2203 2011-06-01 H.J. Lu <hongjiu.lu@intel.com>
2205 * elf32-i386.c (elf_i386_size_dynamic_sections): Properly warn
2206 relocation in readonly section in a shared object.
2207 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
2209 2011-05-31 Nick Clifton <nickc@redhat.com>
2211 * archive.c (adjust_relative_path): Fix comment to prevent it
2212 corrupting the auto-generated bfd.h.
2214 2011-05-31 Paul Brook <paul@codesourcery.com>
2216 * elf32-arm.c (elf32_arm_final_link_relocate): Only do bl conversion
2217 for known functions.
2218 (elf32_arm_swap_symbol_in): Only set ST_BRANCH_TO_ARM for function
2221 2011-05-31 Paul Brook <paul@codesourcery.com>
2223 * elf32-arm.c (arm_stub_is_thumb): Add
2224 arm_stub_long_branch_v4t_thumb_tls_pic.
2225 (elf32_arm_final_link_relocate): TLS stubs are always ARM.
2228 2011-05-27 Nick Clifton <nickc@redhat.com>
2231 * archive.c (_bfd_get_elt_at_filepos): Set correct error value if
2232 unable to read a file pointed to by an entry in a thin archive.
2233 (adjust_relative_path): Use lrealpath to canonicalize paths.
2234 Handle the case where the reference path is above the current
2235 path in the directory tree.
2237 2011-05-26 H.J. Lu <hongjiu.lu@intel.com>
2240 * elf64-x86-64.c (elf_x86_64_relocate_section): Handle
2241 R_X86_64_TPOFF64 in executable.
2243 2011-05-26 Alan Modra <amodra@gmail.com>
2245 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment.
2246 * elflink.c (_bfd_elf_symbol_refs_local_p): Expand
2247 local_protected comment.
2249 2011-05-25 Tristan Gingold <gingold@adacore.com>
2251 * configure.in (bfd_elf32_ia64_big_vec, bfd_elf32_ia64_hpux_big_vec)
2252 (bfd_elf64_ia64_big_vec, bfd_elf64_ia64_hpux_big_vec)
2253 (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_vms_vec): Add elfxx-ia64.lo
2254 * Makefile.am (BFD64_BACKENDS): Add elfxx-ia64.lo
2255 (BFD64_BACKENDS_CFILES): Add elfxx-ia64.c
2256 (elf32-ia64.c): Created from elfnn-ia64.c
2257 (elf64-ia64.c): Likewise.
2258 * elfxx-ia64.h: New file.
2259 * elfxx-ia64.c: Split with elfnn-ia64.c. Keep only the following
2260 functions.Includes elfxx-ia64.h.
2261 (elfNN_ia64_reloc): Renames to ia64_elf_reloc. Adjust error message.
2262 (IA64_HOWTO): Adjust.
2263 (lookup_howto): Renames to ia64_elf_lookup_howto. Make it public.
2264 (elfNN_ia64_reloc_type_lookup): Renames to
2265 ia64_elf_reloc_type_lookup. Make it public. Adjust calls.
2266 (elfNN_ia64_reloc_name_lookup): Renames to
2267 ia64_elf_reloc_name_lookup. Make it public.
2268 (elfNN_ia64_relax_br): Renames to ia64_elf_relax_br. Make it public.
2269 (elfNN_ia64_relax_brl): Renames to ia64_elf_relax_brl. Make it
2271 (elfNN_ia64_relax_ldxmov): Renames to ia64_elf_relax_ldxmov.
2272 Move it and make it public. Move prototype to elfxx-ia64.h
2273 (elfNN_ia64_install_value): Renames to ia64_elf_install_value.
2274 Move prototype to elfxx-ia64.h
2275 * elfnn-ia64.c: New file, split from elfxx-ia64.c.
2276 (elfNN_ia64_info_to_howto): Adjust calls.
2277 (elfNN_ia64_relax_section): Adjust calls.
2278 (count_dyn_reloc): Fix typo.
2279 (elfNN_ia64_relocate_section): Adjust calls.
2280 (elfNN_ia64_finish_dynamic_symbol): Likewise.
2281 (bfd_elfNN_bfd_reloc_type_lookup)
2282 (bfd_elfNN_bfd_reloc_name_lookup): Adjust macros.
2283 * configure: Regenerate.
2284 * Makefile.in: Regenerate.
2286 2011-05-23 DJ Delorie <dj@redhat.com>
2288 * elf32-rx.c (rx_elf_object_p): When reading an RX object in, undo
2289 the vma/lma swapping done in elf32_rx_modify_program_headers.
2291 2011-05-23 Nick Clifton <nickc@redhat.com>
2293 * elf-m10300.c (mn10300_elf_mkobject): New function.
2294 (bfd_elf32_mkobject): Define.
2296 2011-05-23 Alan Modra <amodra@gmail.com>
2298 * elf-bfd.h: Comment typo fix.
2299 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Delete. Replace with
2300 struct elf_dyn_relocs throughout.
2301 * elf64-ppc.c (struct ppc_dyn_relocs): Likewise.
2303 2011-05-23 Alan Modra <amodra@gmail.com>
2305 * elf32-frv.c: Use info->callbacks->einfo throughout file in linker
2306 functions rather than warning callback or _bfd_error_handler.
2307 * elf32-ppc.c: Likewise.
2308 * elf64-ppc.c: Likewise.
2309 * elf32-ppc.c (ppc_elf_tls_optimize): Use %H in __tls_get_addr lost
2311 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
2313 2011-05-23 Alan Modra <amodra@gmail.com>
2316 * elf.c (assign_file_positions_for_load_sections): Set sh_offset for
2317 .tbss, and page align same for all SHT_NOBITS sections.
2319 2011-05-21 Alan Modra <amodra@gmail.com>
2322 * elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs
2324 (_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD
2325 segment if just for .tbss.
2326 (assign_file_positions_for_load_sections): Don't report "can't
2327 allocate in segment" errors for .tbss.
2328 (assign_file_positions_for_non_load_sections): Don't set p_filesz
2329 from SHT_NOBITS section filepos.
2331 2011-05-20 Bernd Schmidt <bernds@codesourcery.com>
2333 * elf32-tic6x.c (elf32_tic6x_howto_table): Add entries for
2334 R_C6000_PCR_H16 and R_C6000_PCR_L16.
2335 (elf32_tic6x_relocate_section): Handle them.
2337 2011-05-18 Nick Clifton <nickc@redhat.com>
2340 * elflink.c (elf_link_add_object_symbols): Process .gnu.warning
2341 sections when building shared libraries.
2343 2011-05-18 Rafał Krypa <r.krypa@samsung.com>
2346 * elf32-arm.c (elf32_arm_gc_sweep_hook): Use the computed dynamic
2349 2011-05-18 Tristan Gingold <gingold@adacore.com>
2351 * xcofflink.c (xcoff_link_add_symbols): Handle C_DWARF symbols.
2352 (xcoff_sweep): Always keep dwarf sections.
2353 (xcoff_link_input_bfd): Handle dwarf symbols and sections.
2355 2011-05-18 Tristan Gingold <gingold@adacore.com>
2357 * libxcoff.h (struct xcoff_dwsect_name): New type.
2358 (XCOFF_DWSECT_NBR_NAMES): New macro.
2359 (xcoff_dwsect_names): Declare.
2360 * coffcode.h (sec_to_styp_flags): Handle xcoff dwarf sections.
2361 (styp_to_sec_flags): Ditto.
2362 (coff_new_section_hook): Ditto.
2363 (coff_slurp_symbol_table): Handle C_DWARF and C_INFO.
2364 * coff-rs6000.c (xcoff_dwsect_name): New variable.
2366 2011-05-17 Tomohiro Kashiwada <kikairoya@gmail.com>
2369 * elf32-rx.c (ignore_lma): New variable.
2370 (bfd_elf32_rx_set_target_flags): Add ignore_lma parameter.
2371 (rx_modify_program_headers): Only copy the LMA into the VMA if
2374 2011-05-17 Alan Modra <amodra@gmail.com>
2377 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call.
2378 * elflink.c (elf_link_add_object_symbols): Likewise.
2379 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
2381 2011-05-16 Alan Modra <amodra@gmail.com>
2383 * linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak.
2385 2011-05-15 Richard Sandiford <rdsandiford@googlemail.com>
2387 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and
2388 global GOT entries for GOT_PAGE relocations against global symbols.
2390 2011-05-13 Bernd Schmidt <bernds@codesourcery.com>
2392 * config.bfd (tic6x-*-elf, tic6x-*-uclinux): New.
2393 (tic6x-*-*): Replaced by these.
2394 * elf32-tic6x.c (elf32_tic6x_set_osabi): New static function.
2395 (elf32_tic6x_check_relocs): Create dynamic sections if -shared.
2396 (elf_backend_relocs_compatible, elf_backend_post_process_headers):
2398 (elf32_bed, TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM,
2399 TARGET_BIG_NAME, ELF_OSABI): Redefine twice, and include
2400 "elf32-target.h" two more times.
2401 * configure.in: Handle bfd_elf32_tic6x_linux_be_vec,
2402 bfd_elf32_tic6x_linux_le_vec, bfd_elf32_tic6x_elf_be_vec and
2403 bfd_elf32_tic6x_elf_le_vec.
2404 * configure: Regenerate.
2406 2011-05-13 Jan Beulich <jbeulich@novell.com>
2408 * config.bfd: Add targets x86_64-*-pe and x86_64-*-pep.
2410 2011-05-12 Jan Kratochvil <jan.kratochvil@redhat.com>
2412 * config.in: Regenerated.
2413 * configure: Regenerated.
2414 * configure.in: New tests for HAVE_PRPSINFO_T_PR_PID,
2415 HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and
2416 HAVE_PSINFO32_T_PR_PID.
2417 * elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by
2418 HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID
2419 and HAVE_PSINFO32_T_PR_PID.
2420 * hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition.
2422 2011-05-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2424 * elf.c (elfcore_grok_psinfo): Initialize CORE_PID for both native and
2426 * elf32-ppc.c (ppc_elf_grok_psinfo): Initialize core_pid.
2427 * elf64-ppc.c (ppc64_elf_grok_psinfo): Likewise.
2429 2011-05-09 Paul Brook <paul@codesourcery.com>
2431 * bfd-in.h (elf32_tic6x_fix_exidx_coverage): Add prototype.
2432 * bfd-in2.h: Regenerate.
2433 * elf32-tic6x.c: Include limits.h.
2434 (tic6x_unwind_edit_type, tic6x_unwind_table_edit,
2435 _tic6x_elf_section_data): New.
2436 (elf32_tic6x_section_data): Define.
2437 (elf32_tic6x_new_section_hook): Allocate target specific data.
2438 (elf32_tic6x_add_unwind_table_edit): New function.
2439 (get_tic6x_elf_section_data, elf32_tic6x_adjust_exidx_size,
2440 elf32_tic6x_insert_cantunwind_after, elf32_tic6x_add_low31,
2441 elf32_tic6x_copy_exidx_entry): New functions.
2442 (elf_backend_write_section): Define.
2444 2011-05-09 Paul Brook <paul@codesourcery.com>
2446 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name,
2447 elf32_tic6x_fake_sections): New functions.
2448 (elf_backend_fake_sections): Define.
2450 2011-05-09 Paul Brook <paul@codesourcery.com>
2452 * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): New function.
2453 (elf_backend_gc_mark_extra_sections): Define.
2455 2011-05-07 Dave Korn <dave.korn.cygwin@gmail.com>
2458 * cofflink.c (bfd_coff_link_input_bfd): Check for and warn about
2459 references to symbols defined in discarded sections.
2461 2011-05-07 Dave Korn <dave.korn.cygwin@gmail.com>
2464 * coffgen.c (coff_write_symbol): Assume input section is its own
2465 output section if output_section member not set.
2466 (coff_write_alien_symbol): Likewise.
2468 2011-05-07 H.J. Lu <hongjiu.lu@intel.com>
2471 * elf.c (_bfd_elf_section_offset): Check SEC_ELF_REVERSE_COPY.
2473 * elflink.c (elf_link_input_bfd): Reverse copy .ctors/.dtors
2476 * section.c (SEC_ELF_REVERSE_COPY): New.
2477 * bfd-in2.h: Regenerated.
2479 2011-05-07 Anders Kaseorg <andersk@ksplice.com>
2482 * libbfd.c (bfd_get_8, bfd_get_signed_8): Use const cast.
2483 * bfd-in2.h: Regenerate.
2485 2011-05-06 Tristan Gingold <gingold@adacore.com>
2487 * vms-alpha.c (evax_section_flags): Remove SEC_IN_MEMORY.
2488 (_bfd_vms_slurp_egsd): Rename old_flags to vms_flags. Handle
2489 any code section. Add comments.
2490 (alpha_vms_object_p): Use void * instead of PTR.
2491 (alpha_vms_create_eisd_for_section): Fix test for setting DZRO.
2492 (build_module_list): Guard against no DST section. Add comments.
2493 (alpha_vms_link_output_symbol): Discard undefined symbols.
2494 (alpha_vms_get_section_contents): Simply memcpy if the section was
2495 already loaded. Fix typo.
2496 (vms_new_section_hook): Use void * instead of PTR.
2497 (vms_alpha_vec): Ditto.
2499 2011-05-06 Richard Sandiford <richard.sandiford@linaro.org>
2501 * elf32-arm.c (cortex_a8_erratum_scan): If the stub is a Thumb
2502 branch to a PLT entry, redirect it to the PLT's Thumb entry point.
2504 2011-05-05 Bernd Schmidt <bernds@codesourcery.com>
2506 * elf32-tic6x.c (elf32_tic6x_final_link): New function.
2507 (elf32_tic6x_merge_attributes): Do not warn for PID or PIC
2508 mismatch. Choose the lower of the two values.
2509 (bfd_elf32_bfd_final_link): New macro.
2511 2011-04-28 Tristan Gingold <gingold@adacore.com>
2513 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
2514 (bfd_xcoff_swap_aux_out): Ditto.
2515 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
2516 (bfd_xcoff64_swap_aux_out): Ditto.
2518 2011-05-04 Alan Modra <amodra@gmail.com>
2521 * elf64-ppc.c (ppc_build_one_stub <ppc_sub_plt_call>): Clear
2522 was_undefined on dot-symbols.
2524 2011-05-03 Paul Brook <paul@codesourcery.com>
2527 * elf32-tic6x.c (elf32_tic6x_howto_table,
2528 elf32_tic6x_howto_table_rel, (elf32_tic6x_gc_sweep_hook,
2529 elf32_tic6x_relocate_section, elf32_tic6x_check_relocs):
2532 2011-05-01 Alan Modra <amodra@gmail.com>
2535 * elf32-i386.c (elf_i386_check_relocs): Ensure dynobj set before
2536 creating ifunc sections.
2537 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
2539 2011-04-30 H.J. Lu <hongjiu.lu@intel.com>
2541 * elf64-x86-64.c (elf_x86_64_merge_symbol): Correct parameter
2544 2011-04-28 Tom Tromey <tromey@redhat.com>
2546 * bfdio.c (memory_bstat): Pass correct size to memset.
2548 2011-04-28 Mike Frysinger <vapier@gentoo.org>
2550 * dwarf2.c (dwarf_debug_sections): Mark const.
2551 * elf.c (special_sections): Likewise.
2552 * libbfd-in.h (dwarf_debug_sections): Likewise.
2553 * libbfd.h: Regenerate.
2555 2011-04-26 Kai Tietz <ktietz@redhat.com>
2557 * coffcode.h (sec_to_styp_flags): Allow linkonce for
2560 2011-04-26 Tristan Gingold <gingold@adacore.com>
2562 * coff64-rs6000.c: Convert to ISO-C. Remove PARAMS and PTR macros.
2564 2011-04-24 Alan Modra <amodra@gmail.com>
2568 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call.
2569 * linker.c (_bfd_link_hash_newfunc): Clear bitfields.
2570 (_bfd_generic_link_add_one_symbol): Update "notice" call.
2571 * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when
2572 it is a redef of an IR symbol in a real BFD.
2574 2011-04-22 H.J. Lu <hongjiu.lu@intel.com>
2576 * elf32-i386.c (elf_i386_readonly_dynrelocs): Warn relocation
2577 in readonly section in a shared object.
2578 (elf_i386_size_dynamic_sections): Likewise.
2579 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
2580 (elf_x86_64_size_dynamic_sections): Likewise.
2582 2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
2585 * elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC
2587 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
2589 2011-04-21 H.J. Lu <hongjiu.lu@intel.com>
2591 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Return false
2592 on dynamic symbol error.
2593 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
2595 2011-04-20 Tristan Gingold <gingold@adacore.com>
2597 * config.bfd (alpha*-*-*vms*, ia64*-*-*vms*): Define targ_selvecs.
2599 2011-04-20 Alan Modra <amodra@gmail.com>
2601 * hash.c (bfd_default_hash_table_size): Make it an unsigned long.
2602 (bfd_hash_table_init_n): Overflow checking.
2603 (bfd_hash_set_default_size): Return current size. Take unsigned long
2604 arg. Add 65537 to hash_size primes.
2605 * bfd-in.h (bfd_hash_set_default_size): Update prototype.
2606 * bfd-in2.h: Regenerate.
2608 2011-04-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2610 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of
2613 2011-04-20 Alan Modra <amodra@gmail.com>
2615 * libbfd.c (bfd_log2): Do return rounded up value.
2616 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Replace bfd_log2
2617 call with expanded old round down version of the function.
2619 * archive.c (_bfd_get_elt_at_filepos): Don't release n_nfd.
2620 * elflink.c (elf_link_add_object_symbols): Delete redundant code.
2622 2011-04-20 Alan Modra <amodra@gmail.com>
2625 * elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols
2626 in their own common section.
2627 * elflink.c (elf_link_add_object_symbols): Likewise.
2628 * linker.c (generic_link_check_archive_element): Don't lose flags
2629 if common section is pre-existing.
2630 (_bfd_generic_link_add_one_symbol): Likewise.
2632 2011-04-20 Alan Modra <amodra@gmail.com>
2635 * elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls.
2636 * linker.c (_bfd_generic_link_add_one_symbol): Likewise. Call
2637 multiple_definition regardless of allow_multiple_definition.
2638 * simple.c (simple_dummy_multiple_definition): Update.
2639 * xcofflink.c (xcoff_link_add_symbols): Update multiple_definition
2642 2011-04-18 Tristan Gingold <gingold@adacore.com>
2644 * coff-rs6000.c: Convert to ISO-C. Remove PARAMS macro.
2646 2011-04-18 Alan Modra <amodra@gmail.com>
2650 * bfd.c (BFD_PLUGIN): Define.
2651 (BFD_FLAGS_SAVED, BFD_FLAGS_FOR_BFD_USE_MASK): Add BFD_PLUGIN.
2652 * bfd-in2.h: Regenerate.
2653 * elflink.c (elf_link_output_extsym): Strip undefined plugin syms.
2654 * opncls.c (bfd_make_readable): Don't lose original bfd flags.
2656 2011-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
2658 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for
2661 2011-04-15 Sergio Durigan Junior <sergiodj@redhat.com>
2663 * elf-bfd.h (struct sdt_note): New struct.
2664 (struct elf_obj_tdata) <sdt_note_head>: New field.
2665 * elf.c (elfobj_grok_stapsdt_note_1): New function.
2666 (elfobj_grok_stapsdt_note): Likewise.
2667 (elf_parse_notes): Added code to treat SystemTap note
2670 2011-04-12 Richard Henderson <rth@redhat.com>
2672 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not
2673 exclude empty .got sections.
2675 2011-04-11 H.J. Lu <hongjiu.lu@intel.com>
2677 * elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound
2678 array access for BFD_RELOC_386_IRELATIVE.
2680 2011-04-11 Bernd Schmidt <bernds@codesourcery.com>
2682 * elf32-tic6x.c (elf32_tic6x_check_relocs): Initialize pc_count field.
2684 2011-04-11 Mark Wielaard <mjw@redhat.com>
2687 * elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols.
2688 (has_gnu_symbols): Renamed from has_ifunc_symbols.
2689 * elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name.
2690 * elf32-arm.c (elf32_arm_add_symbol_hook): Set has_gnu_symbols
2691 also if STB_GNU_UNIQUE symbol binding was seen.
2692 * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
2693 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
2694 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
2695 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
2696 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
2697 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
2699 2011-04-11 Alan Modra <amodra@gmail.com>
2701 * bfd-in.h (bfd_get_section_limit): Don't use rawsize with output
2703 * libbfd.c (_bfd_generic_get_section_contents): Likewise.
2704 (_bfd_generic_get_section_contents_in_window): Likewise.
2705 * section.c (bfd_get_section_contents): Likewise.
2706 * compress.c (bfd_get_full_section_contents): Likewise.
2707 * elf32-rx.c (rx_final_link): Ignore rawsize.
2708 * elf32-microblaze.c (microblaze_elf_relocate_section): Use correct
2709 bfd with bfd_get_section_limit.
2710 * elfxx-ia64.c (elfNN_ia64_choose_gp): Add "final" parameter. Use
2711 os->size during final link. Update callers.
2712 * bfd-in2.h: Regenerate.
2714 2011-04-10 Richard Sandiford <rdsandiford@googlemail.com>
2717 * elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count
2718 as the number of global entries when merging with the primary GOT.
2720 2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
2722 * elf32-i386.c: Update copyright year.
2723 * elf64-x86-64.c: Likewise.
2725 2011-04-09 Kai Tietz <ktietz@redhat.com>
2727 * peXXigen.c (_bfd_XXi_final_link_postscripte): Sort pdata in temporary
2728 buffer and use rawsize for sorting.
2729 * coffcode.h (coff_compute_section_file_positions): Set rawsize
2730 before doing alignment.
2732 2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
2734 * elf32-i386.c (elf_i386_relocate_section): Return relocation
2735 error on unsupported relocation.
2736 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
2738 2011-04-09 H.J. Lu <hongjiu.lu@intel.com>
2741 * hosts/x86-64linux.h (elf_prstatus32): Replace __pid_t with
2744 2011-04-08 H.J. Lu <hongjiu.lu@intel.com>
2747 * elf32-i386.c (elf_i386_relocate_section): Check !executable
2748 instead of shared for R_386_TLS_LDO_32.
2750 2011-04-08 Tristan Gingold <gingold@adacore.com>
2752 * Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
2754 * xcoff-target.h: Remove
2755 * Makefile.in: Regenerate.
2757 2011-04-07 Cary Coutant <ccoutant@google.com>
2759 * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification.
2761 2011-04-07 Paul Brook <paul@codesourcery.com>
2763 * elf32-tic6x.c (elf32_tic6x_howto_table): R_C6000_PREL31 is
2765 (elf32_tic6x_howto_table_rel): Ditto.
2766 (elf32_tic6x_relocate_section): Implement R_C6000_PREL31.
2767 (elf32_tic6x_check_relocs): Ditto.
2769 2011-04-06 Joseph Myers <joseph@codesourcery.com>
2771 * config.bfd (thumb-*-oabi): Don't handle in list of obsolete
2773 (strongarm*, thumb*, xscale*): Remove architectures.
2774 (strongarm-*-kaos*, thumb-*-coff, thumb-*-elf, thumb-epoc-pe*,
2775 thumb-*-pe*, strongarm-*-elf, strongarm-*-coff, xscale-*-elf,
2776 xscale-*-coff): Remove targets.
2778 2011-04-01 Tristan Gingold <gingold@adacore.com>
2780 * elfxx-ia64.c: include bfd_stdint.h
2782 2011-03-31 Jan Kratochvil <jan.kratochvil@redhat.com>
2784 * elf32-tic6x.c (elf32_tic6x_relocate_section): Remove unused variable
2785 dynobj and its initialization.
2787 2011-03-31 Tristan Gingold <gingold@adacore.com>
2789 * makefile.vms (DEFS): Add HAVE_bfd_elf64_ia64_vms_vec.
2790 * configure.com: Set BFD_HOST_64BIT_LONG_LONG and
2791 BFD_HOST_LONG_LONG to 1.
2793 2011-03-31 Tristan Gingold <gingold@adacore.com>
2795 * vms-alpha.c (vms_get_remaining_object_record): Fix dec-c warning.
2796 (_bfd_vms_write_etir): Ditto.
2797 (_bfd_vms_slurp_etir): Avoid to use intptr_t
2798 * configure.com: Generate bfd_stdint.h
2800 2011-03-31 Bernd Schmidt <bernds@codesourcery.com>
2802 * elf32-tic6x.h (struct elf32_tic6x_params): New.
2803 (elf32_tic6x_setup): Declare.
2804 * elf32-tic6x.c: Include <limits.h>.
2805 (ELF_DYNAMIC_LINKER, DEFAULT_STACK_SIZE, PLT_ENTRY_SIZE): Define.
2806 (struct elf32_tic6x_link_hash_table, struct elf32_link_hash_entry):
2808 (elf32_tic6x_link_hash_table, is_tic6x_elf): New macros.
2809 (tic6x_elf_scom_section, tic6x_elf_scom_symbol,
2810 tic6x_elf_scom_symbol_ptr): New static variables.
2811 (elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel,
2812 elf32_tic6x_reloc_map): Add R_C6000_JUMP_SLOT, R_C6000_EHTYPE,
2813 R_C6000_PCR_H16 and R_C6000_PCR_L16.
2814 (elf32_tic6x_link_hash_newfunc, elf32_tic6x_link_hash_table_create,
2815 elf32_tic6x_link_hash_table_free, elf32_tic6x_setup,
2816 elf32_tic6x_using_dsbt, elf32_tic6x_install_rela,
2817 elf32_tic6x_create_dynamic_sections, elf32_tic6x_make_got_dynreloc,
2818 elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_gc_sweep_hook,
2819 elf32_tic6x_adjust_dynamic_symbol): New static functions.
2820 (elf32_tic6x_relocate_section): For R_C6000_PCR_S21, convert branches
2821 to weak symbols as required by the ABI.
2822 Handle GOT and DSBT_INDEX relocs, and copy relocs to the output file
2823 as needed when generating DSBT output.
2824 (elf32_tic6x_check_relocs, elf32_tic6x_add_symbol_hook,
2825 elf32_tic6x_symbol_processing, elf32_tic6x_section_from_bfd_section,
2826 elf32_tic6x_allocate_dynrelocs, elf32_tic6x_size_dynamic_sections,
2827 elf32_tic6x_always_size_sections, elf32_tic6x_modify_program_headers,
2828 elf32_tic6x_finish_dynamic_sections, elf32_tic6x_plt_sym_val,
2829 elf32_tic6x_copy_private_data, elf32_tic6x_link_omit_section_dynsym):
2830 New static functions.
2831 (ELF_MAXPAGESIZE): Define to 0x1000.
2832 (bfd_elf32_bfd_copy_private_bfd_data,
2833 bfd_elf32_bfd_link_hash_table_create,
2834 bfd_elf32_bfd_link_hash_table_free, elf_backend_can_refcount,
2835 elf_backend_want_got_plt, elf_backend_want_dynbss,
2836 elf_backend_plt_readonly, elf_backend_got_header_size,
2837 elf_backend_gc_sweep_hook, elf_backend_modify_program_headers,
2838 elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
2839 elf_backend_check_relocs, elf_backend_add_symbol_hook,
2840 elf_backend_symbol_processing, elf_backend_link_output_symbol_hook,
2841 elf_backend_section_from_bfd_section,
2842 elf_backend_finish_dynamic_symbol, elf_backend_always_size_sections,
2843 elf32_tic6x_size_dynamic_sections, elf_backend_finish_dynamic_sections,
2844 elf_backend_omit_section_dynsym, elf_backend_plt_sym_val): Define.
2846 * bfd/reloc.c (BFD_RELOC_C6000_JUMP_SLOT, BFD_RELOC_C6000_EHTYPE,
2847 BFD_RELOC_C6000_PCR_H16, BFD_RELOC_C6000_PCR_S16): Add.
2848 * bfd/bfd-in2.h: Regenerate.
2849 * bfd/libbfd.h: Regenerate.
2850 * config.bfd: Accept tic6x-*-* instead of tic6x-*-elf.
2852 2011-03-31 Tristan Gingold <gingold@adacore.com>
2854 * coffcode.h (coff_slurp_symbol_table): Silently discard C_NULL
2855 entry on xcoff when value is C_NULL_VALUE.
2857 2011-03-31 Tristan Gingold <gingold@adacore.com>
2859 * libcoff-in.h (exec_hdr): Remove.
2860 * libcoff.h: Regenerate.
2862 2011-03-30 Nick Clifton <nickc@redhat.com>
2864 * po/da.po: Updated Danish translation.
2866 2011-03-29 Richard Henderson <rth@redhat.com>
2868 * elf64-alpha.c (elf64_alpha_gc_mark_hook): New.
2869 (elf64_alpha_gc_sweep_hook): New.
2870 (elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): New.
2871 (elf_backend_can_gc_sections): New.
2873 2011-03-26 John Marino <binutils@marino.st>
2875 * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*.
2876 * configure.in: Delete unused bfd_elf32_i386_dragonfly_vec.
2877 * configure: Regenerate.
2879 2011-03-25 Michael Snyder <msnyder@vmware.com>
2881 * coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
2883 2011-03-25 Tristan Gingold <gingold@adacore.com>
2885 * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Allow the use
2886 of find_nearest_line on object files.
2888 2011-03-25 Tristan Gingold <gingold@adacore.com>
2890 * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only.
2892 (alpha_vms_create_eisd_for_section): Make code sections read-only.
2894 2011-03-24 Alan Modra <amodra@gmail.com>
2896 * elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where
2897 old-style __tls_get_addr calls without marker relocs don't match
2898 their arg setup insn one for one. If such mismatches are found
2899 report the reloc and don't do any tls optimization.
2900 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
2902 2011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
2904 * bfd-in2.h: Regenerate.
2906 2011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
2908 * archures.c: Add AVR XMEGA architecture information.
2909 * cpu-avr.c (arch_info_struct): Likewise.
2910 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
2911 (elf32_avr_object_p): Likewise.
2913 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2915 * reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
2916 * bfd-in2.h: Regenerate.
2917 * elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
2918 to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
2920 (elf32_arm_howto_from_type): Update accordingly.
2921 (elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
2922 (elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
2923 (arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
2924 with an extra noncall_refcount field.
2925 (arm_local_iplt_info): New structure.
2926 (elf_arm_obj_tdata): Add local_iplt.
2927 (elf32_arm_local_iplt): New accessor macro.
2928 (elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
2929 plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
2930 Change tls_type to a bitfield and add is_iplt.
2931 (elf32_arm_link_hash_newfunc): Update accordingly.
2932 (elf32_arm_allocate_local_sym_info): New function.
2933 (elf32_arm_create_local_iplt): Likewise.
2934 (elf32_arm_get_plt_info): Likewise.
2935 (elf32_arm_plt_needs_thumb_stub_p): Likewise.
2936 (elf32_arm_get_local_dynreloc_list): Likewise.
2937 (create_ifunc_sections): Likewise.
2938 (elf32_arm_copy_indirect_symbol): Update after the changes to
2939 elf32_arm_link_hash_entry. Assert the is_iplt has not yet been set.
2940 (arm_type_of_stub): Add an st_type argument. Use elf32_arm_get_plt_info
2941 to get PLT information. Assert that all STT_GNU_IFUNC references
2942 are turned into PLT references.
2943 (arm_build_one_stub): Pass the symbol type to
2944 elf32_arm_final_link_relocate.
2945 (elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
2946 (elf32_arm_allocate_irelocs): New function.
2947 (elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
2948 all R_ARM_IRELATIVE.
2949 (elf32_arm_allocate_plt_entry): New function.
2950 (elf32_arm_populate_plt_entry): Likewise.
2951 (elf32_arm_final_link_relocate): Add an st_type parameter.
2952 Set srelgot to null for static objects. Use separate variables
2953 to record which st_value and st_type should be used when generating
2954 a dynamic relocation. Use elf32_arm_get_plt_info to find the
2955 symbol's PLT information, setting has_iplt_entry, splt,
2956 plt_offset and gotplt_offset accordingly. Check whether
2957 STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
2958 the relocation target accordingly. Broaden assert to include
2959 .iplts. Don't set sreloc for static relocations. Assert that
2960 we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
2961 and R_ARM_ABS32_NOI. Generate R_ARM_IRELATIVE relocations instead
2962 of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
2963 symbol. Pass the symbol type to arm_type_of_stub. Conditionally
2964 resolve GOT references to the .igot.plt entry.
2965 (elf32_arm_relocate_section): Update the call to
2966 elf32_arm_final_link_relocate.
2967 (elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
2968 information. Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
2969 relocations in shared libraries and relocatable executables.
2970 Count non-call PLT references. Use elf32_arm_get_local_dynreloc_list
2971 to get the list of dynamic relocations for a local symbol.
2972 (elf32_arm_check_relocs): Always create ifunc sections. Set isym
2973 at the same time as setting h. Use elf32_arm_allocate_local_sym_info
2974 to allocate local symbol information. Treat R_ARM_REL32 and
2975 R_ARM_REL32_NOI as call relocations in shared libraries and
2976 relocatable executables. Record PLT information for local
2977 STT_GNU_IFUNC functions as well as global functions. Count
2978 non-call PLT references. Use elf32_arm_get_local_dynreloc_list
2979 to get the list of dynamic relocations for a local symbol.
2980 (elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
2981 Don't remove STT_GNU_IFUNC PLTs unless all references have been
2982 removed. Update after the changes to elf32_arm_link_hash_entry.
2983 (allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
2984 entries should live in .plt or .iplt. Check whether the .igot.plt
2985 and .got entries can be combined. Use elf32_arm_allocate_plt_entry
2986 to allocate .plt and .(i)got.plt entries. Detect which .got
2987 entries will need R_ARM_IRELATIVE relocations and use
2988 elf32_arm_allocate_irelocs to allocate them. Likewise other
2989 non-.got dynamic relocations.
2990 (elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
2991 and dynamic relocations for local STT_GNU_IFUNC symbols.
2992 Check whether the .igot.plt and .got entries can be combined.
2993 Detect which .got entries will need R_ARM_IRELATIVE relocations
2994 and use elf32_arm_allocate_irelocs to allocate them. Use stashed
2995 section pointers intead of strcmp checks. Handle iplt and igotplt.
2996 (elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
2997 to fill in .plt, .got.plt and .rel(a).plt entries. Point
2998 STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
3000 (elf32_arm_output_plt_map_1): New function, split out from
3001 elf32_arm_output_plt_map. Handle .iplt entries. Use
3002 elf32_arm_plt_needs_thumb_stub_p.
3003 (elf32_arm_output_plt_map): Call it.
3004 (elf32_arm_output_arch_local_syms): Add mapping symbols for
3005 local .iplt entries.
3006 (elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
3007 (elf32_arm_swap_symbol_out): Likewise.
3008 (elf32_arm_add_symbol_hook): New function.
3009 (elf_backend_add_symbol_hook): Define for all targets.
3011 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
3013 * elf-bfd.h (elf_link_hash_entry): Add target_internal.
3014 * elf.c (swap_out_syms): Set st_target_internal for each
3016 * elfcode.h (elf_swap_symbol_in): Likewise.
3017 * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
3018 * elf32-sh-symbian.c (sh_symbian_relocate_section): Likewise.
3019 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
3020 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
3021 * elflink.c (elf_link_output_extsym): Likewise.
3022 (bfd_elf_final_link): Likewise.
3023 (elf_link_add_object_symbols): Copy st_target_internal
3024 to the hash table if we see a definition.
3025 (_bfd_elf_copy_link_hash_symbol_type): Copy target_internal.
3026 * elf32-arm.c (elf32_arm_stub_hash_entry): Replace st_type with
3027 a branch_type field.
3028 (a8_erratum_fix, a8_erratum_reloc): Likewise.
3029 (arm_type_of_stub): Replace actual_st_type with an
3030 actual_branch_type parameter.
3031 (arm_build_one_stub): Use branch types rather than st_types to
3032 determine the type of branch.
3033 (cortex_a8_erratum_scan): Likewise.
3034 (elf32_arm_size_stubs): Likewise.
3035 (bfd_elf32_arm_process_before_allocation): Likewise.
3036 (allocate_dynrelocs_for_symbol): Likewise.
3037 (elf32_arm_finish_dynamic_sections): Likewise.
3038 (elf32_arm_final_link_relocate): Replace sym_flags parameter with
3039 a branch_type parameter.
3040 (elf32_arm_relocate_section): Update call accordingly.
3041 (elf32_arm_adjust_dynamic_symbol): Don't check STT_ARM_TFUNC.
3042 (elf32_arm_output_map_sym): Initialize st_target_internal.
3043 (elf32_arm_output_stub_sym): Likewise.
3044 (elf32_arm_symbol_processing): Delete.
3045 (elf32_arm_swap_symbol_in): Convert STT_ARM_TFUNCs into STT_FUNCs.
3046 Use st_target_internal to record the branch type.
3047 (elf32_arm_swap_symbol_out): Use st_target_internal to test for
3049 (elf32_arm_is_function_type): Delete.
3050 (elf_backend_symbol_processing): Likewise.
3051 (elf_backend_is_function_type): Likewise.
3053 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
3055 * elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
3056 (elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
3059 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
3061 * elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
3062 may_need_local_target_p and may_become_dynamic_p to classify
3063 the relocation type. Don't check info->symbolic or h->def_regular
3064 when deciding whether to record a potential dynamic reloc.
3065 Don't treat potential dynamic relocs as PLT references.
3066 (elf32_arm_gc_sweep_hook): Update to match. Assert that we don't
3067 try to make the PLT reference count go negative.
3069 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
3071 * elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
3072 GOT entry here, rather than leaving it to finish_dynamic_symbol.
3073 Only create a dynamic relocation for local references if
3075 (allocate_dynrelocs_for_symbol): Update dynamic relocation
3076 allocation accordingly.
3077 (elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.
3079 2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
3081 * elf32-arm.c (elf32_arm_allocate_dynrelocs): New function.
3082 (elf32_arm_add_dynreloc): Likewise.
3083 (elf32_arm_adjust_dynamic_symbol): Use elf32_arm_allocate_dynrelocs
3084 to allocate dynamic relocations.
3085 (elf32_arm_size_dynamic_sections): Likewise.
3086 (allocate_dynrelocs): Likewise. Rename to
3087 allocate_dynrelocs_for_symbol.
3088 (elf32_arm_final_link_relocate): Use elf32_arm_add_dynreloc to
3089 create dynamic relocations.
3090 (elf32_arm_finish_dynamic_symbol): Likewise.
3092 2011-03-12 H.J. Lu <hongjiu.lu@intel.com>
3094 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
3095 x32 GD->IE and GD->LE transitions.
3096 (elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
3097 and LD->LE transitions.
3099 2011-03-10 Alan Modra <amodra@gmail.com>
3101 * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset
3102 for LO_DS error message and correct multiple.
3104 2011-03-10 Alan Modra <amodra@gmail.com>
3106 * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define.
3107 (ppc64_elf_link_just_syms): New function.
3108 (opd_entry_value): Don't assume big-endian host.
3109 (get_r2off): New function.
3110 (ppc_build_one_stub, ppc_size_one_stub): Use it here.
3112 2011-03-06 Michael Snyder <msnyder@vmware.com>
3114 * compress.c (bfd_compress_section_contents): Check for out of mem.
3116 * elf64-x86-64.c (elf_x86_64_relocate_section): Document
3117 that case statement falls through intentionally.
3119 * elf32-i386.c (elf_i386_relocate_section): Document fall through.
3121 2011-03-04 Alan Modra <amodra@gmail.com>
3123 * archive.c (bsd_write_armap): Don't call stat in deterministic
3124 mode, and don't use st_mtime if stat returns error.
3126 2011-03-03 Michael Snyder <msnyder@vmware.com>
3128 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove dead code.
3130 * coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
3132 * aoutx.h (aout_final_link): Use sizeof int not sizeof int*.
3133 (aout_link_write_other_symbol): Missing break statement.
3135 * dwarf2.c (scan_unit_for_symbols): Stop memory leak.
3137 * archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek fails.
3139 2011-03-03 H.J. Lu <hongjiu.lu@intel.com>
3141 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
3142 x32 IE->LE transition.
3143 (elf_x86_64_relocate_section): Likewise.
3145 2011-03-02 Bernd Schmidt <bernds@codesourcery.com>
3147 * elflink.c (is_reloc_section): Remove function.
3148 (get_dynamic_reloc_section_name): Construct string manually.
3150 2011-02-28 Kai Tietz <kai.tietz@onevision.com>
3152 * archive.c (_bfd_find_nested_archive): Use filename_(n)cmp.
3153 (adjust_relative_path): Likewise.
3154 (_bfd_construct_extended_name_table): Likewise.
3155 * corefile.c (generic_core_file_matches_executable_p): Likewise.
3156 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
3157 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3158 * elf32-spu.c (sort_bfds): Likewise.
3159 (spu_elf_auto_overlay): Likewise.
3160 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
3161 * xcofflink.c (xcoff_set_import_path): Likewise.
3162 * xtensa-isa.c (xtensa_regfile_lookup): Likewise.
3163 (xtensa_regfile_lookup_shortname): Likewise.
3165 2011-02-28 Alan Modra <amodra@gmail.com>
3168 * archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and
3169 stringsize. Properly sanity check symdef_count. Remove redundant
3172 2011-02-25 Rafael Ávila de Espíndola <respindola@mozilla.com>
3174 * plugin.c (bfd_plugin_object_p): Correctly set the filesize
3175 and handle claim_file seeking. Only try to load the plugin once.
3177 2011-02-22 Andreas Schwab <schwab@redhat.com>
3179 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
3180 relocation read the value from the second GOT slot.
3182 2011-02-15 Tristan Gingold <gingold@adacore.com>
3184 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
3186 2011-02-15 Alan Modra <amodra@gmail.com>
3188 * elf64-ppc.c (ppc64_elf_edit_toc): Reinstate second read of
3189 toc relocs. Fuss over free(NULL).
3191 2011-02-14 Mike Frysinger <vapier@gentoo.org>
3193 * elflink.c (bfd_elf_size_dynamic_sections): Add
3194 bfd_get_symbol_leading_char to the start of newname.
3196 2011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3198 * configure: Regenerate.
3200 2011-02-09 Alan Modra <amodra@gmail.com>
3202 * elf64-ppc.c (ppc64_elf_edit_toc): Don't free toc relocs until
3203 we are done. When optimising large toc, check that a global
3204 symbol on a toc reloc is defined in a kept section.
3206 2011-02-08 Nick Clifton <nickc@redhat.com>
3209 * elf.c (assign_file_positions_for_load_sections): Set the program
3210 header offset and entry size to zero if there are no program
3213 2011-02-08 Alan Modra <amodra@gmail.com>
3215 * elf64-ppc.c (ppc64_elf_edit_toc): Don't segfault on NULL
3216 local_syms when looking for local symbols in .toc.
3218 2011-02-01 Alan Modra <amodra@gmail.com>
3220 * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value
3221 for toc pointer on any section having makes_toc_func_call set.
3222 (check_pasted_section): Ensure pasted .init/.fini fragments use
3223 the same toc if any has makes_toc_func_call set.
3225 2011-01-28 Joseph Myers <joseph@codesourcery.com>
3227 * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
3230 2011-01-22 Richard Sandiford <rdsandiford@googlemail.com>
3232 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
3233 common sections too.
3235 2011-01-18 H.J. Lu <hongjiu.lu@intel.com>
3237 * elf64-x86-64.c (elf_backend_want_plt_sym): Redefine to 0 after
3240 2011-01-18 Pierre Muller <muller@ics.u-strasbg.fr>
3242 Fix compilation for mingw64.
3243 * coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate
3244 typecast to avoid warning.
3245 * elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type
3247 * elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead
3248 of long for pointer to avoid warning.
3249 (elfNN_ia64_relax_brl): Idem.
3250 (elfNN_ia64_install_value): Idem.
3251 * vms-alpha.c (_bfd_vms_slurp_etir): Idem.
3253 2011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
3255 * elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
3256 h->needs_plt when deciding whether to record a possible dynamic reloc.
3258 2011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
3260 * elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
3261 dynamic relocs for the removed section.
3263 2011-01-15 H.J. Lu <hongjiu.lu@intel.com>
3265 * elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32
3268 2011-01-14 H.J. Lu <hongjiu.lu@intel.com>
3270 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
3271 (elf_x86_64_link_hash_table_create): Set pointer_r_type.
3272 (elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
3273 for ILP32. Remove ABI_64_P PIC check for R_X86_64_8,
3274 R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
3275 (elf_x86_64_relocate_section): Handle R_X86_64_32 like R_X86_64_64
3278 2011-01-14 Alan Modra <amodra@gmail.com>
3280 * bfd.c (bfd_perror): Flush stdout before and stderr after printing
3282 (_bfd_default_error_handler): Likewise.
3283 * elf.c (print_segment_map): Likewise.
3284 * libbfd.c (warn_deprecated): Likewise.
3285 * som.c (som_sizeof_headers): No need to do so here.
3286 * coff-i860.c: Replace use of printf for error messages with
3288 * coff-ppc.c: Likewise.
3289 * coff-sh.c: Likewise.
3290 * elf32-bfin.c: Likewise.
3291 * elf32-dlx.c: Likewise.
3292 * elf32-mep.c: Likewise.
3293 * elf32-v850.c: Likewise.
3294 * mach-o.c: Likewise.
3297 2011-01-13 H.J. Lu <hongjiu.lu@intel.com>
3299 * elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
3301 (elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
3302 (elf_x86_64_check_relocs): Align relocation section to 4 byte
3304 (elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
3306 (elf_x86_64_finish_dynamic_symbol): Updated.
3307 (elf_x86_64_finish_dynamic_sections): Don't use
3308 Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
3309 bfd_elf64_swap_dyn_out.
3311 2011-01-14 J. Park <grassman@gmail.com>
3314 * elf32-arm.c (allocate_dynrelocs): Don't set up eh before
3315 following bfd_link_hash_warning symbol link.
3317 2011-01-10 Nathan Sidwell <nathan@codesourcery.com>
3318 Glauber de Oliveira Costa <glommer@gmail.com>
3320 * reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
3321 BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
3322 BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
3324 * libbfd.h: Rebuilt.
3325 * bfd-in2.h: Rebuilt.
3326 * elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
3327 (elf32_arm_reloc_map): Likewise.
3328 (tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
3329 (elf32_arm_stub_long_branch_any_tls_pic,
3330 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
3331 (DEF_STUBS): Add new stubs.
3332 (struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
3333 (elf32_arm_local_tlsdesc_gotent): New.
3334 (GOT_TLS_GDESC): New mask.
3335 (GOT_TLS_GD_ANY): Define.
3336 (struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
3337 (elf32_arm_compute_jump_table_size): New.
3338 (struct elf32_arm_link_hash_table): Add next_tls_desc_index,
3339 num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
3340 sgotplt_jump_table_size fields.
3341 (elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
3342 (elf32_arm_link_hash_table_create): Initialize new fields.
3343 (arm_type_of_stub): Check TLS desc relocs too.
3344 (elf32_arm_stub_name): TLS desc relocs can be shared.
3345 (elf32_arm_tls_transition): Determine relaxation.
3346 (arm_stub_required_alignment): Add tls stubs.
3347 (elf32_arm_size_stubs): Likewise.
3348 (elf32_arm_tls_relax): Perform TLS relaxing.
3349 (elf32_arm_final_link_relocate): Process TLS DESC relocations.
3350 (IS_ARM_TLS_GNU_RELOC): New.
3351 (IS_ARM_TLS_RELOC): Use it.
3352 (elf32_arm_relocate_section): Perform TLS relaxing.
3353 (elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
3355 (allocate_dynrelocs): Allocate tls desc relcoations.
3356 (elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
3358 (elf32_arm_size_dynamic_sections): Allocate tls trampolines and
3360 (elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
3362 (elf32_arm_finish_dynamic_symbol): Adjust.
3363 (arm_put_trampoline): New.
3364 (elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
3366 (elf_backend_always_size_sections): Define.
3368 2011-01-06 H.J. Lu <hongjiu.lu@intel.com>
3370 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Optimized.
3372 2011-01-06 H.J. Lu <hongjiu.lu@intel.com>
3376 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
3377 handle symbols marked with regular reference, but not non-GOT
3378 reference when building shared library.
3380 * elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
3381 local and global STT_GNU_IFUNC symols when building shared
3383 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
3385 2011-01-05 DJ Delorie <dj@redhat.com>
3387 * reloc.c: Add BFD_RELOC_RX_OP_NEG.
3388 * libbfd.h: Regenerate.
3389 * bfd-in2.h: Regenerate.
3390 * elf32-rx.c: Add it to the list, corresponding to R_RX_OPneg.
3392 2011-01-03 H.J. Lu <hongjiu.lu@intel.com>
3394 * cpu-i386.c (bfd_i386_compatible): New.
3395 (bfd_x64_32_arch_intel_syntax): Replace bfd_default_compatible
3396 with bfd_i386_compatible.
3397 (bfd_x86_64_arch_intel_syntax): Likewise.
3398 (bfd_i386_arch_intel_syntax): Likewise.
3399 (i8086_arch): Likewise.
3400 (bfd_x64_32_arch): Likewise.
3401 (bfd_x86_64_arch): Likewise.
3402 (bfd_i386_arch): Likewise.
3404 For older changes see ChangeLog-2010
3410 version-control: never