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