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