daily update
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
28942f62
AM
12011-09-07 Alan Modra <amodra@gmail.com>
2
3 PR ld/13131
4 * bfd/elf64-ppc.c (adjust_toc_syms): Ensure ppc64_elf_howto_table
5 is initialized.
6
b140b010
AM
72011-09-06 Alan Modra <amodra@gmail.com>
8
9 PR ld/13131
10 * elf64-ppc.c (adjust_toc_syms): Delete redundant code.
11 (ppc64_elf_edit_toc): Fix style nit. Report some details
12 on linker failure due to reference in debug or non-alloc
13 sections to optimized away toc entry, and don't abort.
14
7d500b83
CL
152011-09-01 Christophe Lyon <christophe.lyon@st.com>
16
17 * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip excluded
18 sections.
19
7cf80422
NC
202011-08-26 Nick Clifton <nickc@redhat.com>
21
22 * po/es.po: Updated Spanish translation.
23
af75cb9c
AM
242011-08-19 Alan Modra <amodra@gmail.com>
25
26 * elf64-ppc.c (ppc64_elf_edit_toc): Ignore can_optimize bit if
27 we haven't seen expected -mcmodel=medium/large code relocs.
28
9d4b6009
TG
292011-08-18 Tristan Gingold <gingold@adacore.com>
30
31 * mach-o.c (bfd_mach_o_read_segment): Initialize list.
32
72b5104c
TG
332011-08-17 Tristan Gingold <gingold@adacore.com>
34
35 * mach-o.c (bfd_mach_o_write_section_32): Fix typo.
36
c77ec726
AM
372011-08-17 Alan Modra <amodra@gmail.com>
38
39 PR ld/12762
40 * bfd-in.h (struct bfd_section_already_linked): Forward declare.
41 (_bfd_handle_already_linked): Declare.
42 * coff-alpha.c (_bfd_ecoff_section_already_linked): Define as
43 _bfd_coff_section_already_linked.
44 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
45 * coffcode.h (coff_section_already_linked): Likewise.
46 * cofflink.c (coff_link_add_symbols): Revert 2011-07-09 changes.
47 * elf-bfd.h: Likewise.
48 * libbfd-in.h: Likewise.
49 * targets.c: Likewise.
50 * linker.c (bfd_section_already_linked): Likewise.
51 (bfd_section_already_linked_table_lookup): Likewise.
52 (bfd_section_already_linked_table_insert): Likewise.
53 (_bfd_generic_section_already_linked): Likewise. Call
54 _bfd_handle_already_linked.
55 (_bfd_handle_already_linked): New function, split out from..
56 * elflink.c (_bfd_elf_section_already_linked): ..here. Revert
57 2011-07-09 changes. Avoid unnecessary strcmp when matching
58 already_linked_list entries. Match plugin linkonce section.
59 (section_signature): Delete.
60 * coffgen.c (_bfd_coff_section_already_linked): New function.
61 * libcoff-in.h (_bfd_coff_section_already_linked): Declare.
62 * libbfd.h: Regenerate.
63 * libcoff.h: Regenerate.
64 * bfd-in2.h: Regenerate.
65
b3874e1a
AM
662011-08-14 Alan Modra <amodra@gmail.com>
67
68 * elf32-ppc.c (ppc_elf_select_plt_layout): Force bss-plt when
69 shared and call to _mcount will go via plt.
70
8de848d8
AM
712011-08-14 Alan Modra <amodra@gmail.com>
72
73 * elf64-ppc.c: Prefix all einfo error strings with "%P: ".
74 * elf32-ppc.c: Likewise.
75 (ppc_elf_select_plt_layout): Use einfo rather than info to report
76 forced bss-plt.
77
64d25c44
L
782011-08-12 H.J. Lu <hongjiu.lu@intel.com>
79
80 PR ld/13082
81 * elf64-x86-64.c (x86_64_elf_howto_table): Add R_X86_64_RELATIVE64.
82 (elf_x86_64_relocate_section): Treat R_X86_64_64 like R_X86_64_32
83 and zero-extend it to 64bit if addend is zero for x32. Generate
84 R_X86_64_RELATIVE64 for x32.
85
2de70689
MGD
862011-08-09 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
87
88 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
89 * bfd-in2.h (bfd_elf32_arm_set_target_relocs): Likewise.
90 * elf32-arm.c (elf32_arm_link_hash_table): New field.
91 (elf232_arm_link_hash_table_create): Initialise new field.
92 (check_use_blx): Change test depending on fix_arm1176.
93 (bfd_elf32_arm_set_target_relocs): Set fix_arm1176 from
94 command line options.
95
5a5cbf72
TG
962011-08-08 Tristan Gingold <gingold@adacore.com>
97
98 * mach-o.c (struct mach_o_segment_name_xlat): Add comments.
99 (segsec_names_xlat): Reorder elements.
100 (bfd_mach_o_read_section_32): Fix typo.
101 (bfd_mach_o_read_section_64): Fix typo.
102
f1bde64c
TG
1032011-08-08 Tristan Gingold <gingold@adacore.com>
104
105 * mach-o.h (BFD_MACH_O_SEGNAME_SIZE): New macro.
106 (BFD_MACH_O_SECTNAME_SIZE): Ditto.
107 (bfd_mach_o_section): Use them. Add next field.
108 (bfd_mach_o_segment_command): Replace sections array by
109 sect_head and sect_tail.
110 (bfd_mach_o_get_mach_o_section): New macro.
111 (bfd_mach_o_lookup_section): Remove.
112 (bfd_mach_o_new_section_hook): New function.
113 * mach-o.c (bfd_mach_o_normalize_section_name): Use strncmp
114 instead of strcmp.
115 (bfd_mach_o_convert_section_name_to_bfd): Replaces section
116 parameter with segname and sectname parameters. Adjust.
117 (bfd_mach_o_append_section_to_segment): New function. Use a
118 linked list for Mach-O sections.
119 (bfd_mach_o_write_segment_32): Adjust.
120 (bfd_mach_o_write_segment_64): Ditto.
121 (bfd_mach_o_build_commands): Fix comment. Adjust.
122 (bfd_mach_o_flatten_sections): Adjust.
123 (bfd_mach_o_print_section_map): Adjust.
124 (bfd_mach_o_set_section_flags_from_bfd): Ditto.
125 (bfd_mach_o_new_section_hook): New function.
126 (bfd_mach_o_init_section_from_mach_o): Ditto.
127 (bfd_mach_o_read_section_32): Remove section parameter.
128 Return a section instead.
129 (bfd_mach_o_read_section_64): Ditto.
130 (bfd_mach_o_read_section): Ditto.
131 (bfd_mach_o_make_bfd_section): Adjust.
132 (bfd_mach_o_read_segment): Adjust for new profile of
133 bfd_mach_o_read_section.
134 (bfd_mach_o_lookup_section): Remove.
135 * mach-o-target.c (bfd_mach_o_new_section_hook): Remove.
136
edbdea0e
TG
1372011-08-08 Tristan Gingold <gingold@adacore.com>
138
139 * mach-o.h (bfd_mach_o_version_min_command): New structure.
140 (bfd_mach_o_load_command): Add version_min.
141 (mach_o_data_struct): Fix comment.
142 * mach-o.c (bfd_mach_o_read_version_min): New function.
143 (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_FUNCTION_STARTS,
144 BFD_MACH_O_LC_VERSION_MIN_MACOSX and
145 BFD_MACH_O_LC_VERSION_MIN_IPHONEOS.
146 (bfd_mach_o_get_name_or_null): New function.
147 (bfd_mach_o_get_name): Use the above new one.
148 (bfd_mach_o_load_command_name): Add the above new commands.
149 (bfd_mach_o_bfd_print_private_bfd_data): Display numerically
150 unknown commands. Handle BFD_MACH_O_LC_FUNCTION_STARTS,
151 BFD_MACH_O_LC_VERSION_MIN_MACOSX and
152 BFD_MACH_O_LC_VERSION_MIN_IPHONEOS.
153
46d1c23b
TG
1542011-08-08 Tristan Gingold <gingold@adacore.com>
155
156 * mach-o.h: Move size macros to external.h
157 Move reloc macros to reloc.h and x86-64.h.
158 * mach-o-i386.c: Includes mach-o/reloc.h
159 * mach-o-x86-64.c: Ditto and includes mach-o/x86-64.h
160 * mach-o.c: Add includes.
161 (bfd_mach_o_write_header): Use structure from external.h to convert.
162 (bfd_mach_o_write_thread): Ditto.
163 (bfd_mach_o_write_relocs): Ditto.
164 (bfd_mach_o_write_section_32): Ditto.
165 (bfd_mach_o_write_section_64): Ditto.
166 (bfd_mach_o_write_segment_32): Ditto.
167 (bfd_mach_o_write_segment_64): Ditto.
168 (bfd_mach_o_write_symtab): Ditto.
169 (bfd_mach_o_write_contents): Ditto.
170 (bfd_mach_o_read_header): Ditto.
171 (bfd_mach_o_read_section_32): Ditto.
172 (bfd_mach_o_read_section_64): Ditto.
173 (bfd_mach_o_read_symtab_symbol): Ditto.
174 (bfd_mach_o_read_dylinker): Ditto.
175 (bfd_mach_o_read_dylib): Ditto.
176 (bfd_mach_o_read_dysymtab): Ditto.
177 (bfd_mach_o_read_symtab): Ditto.
178 (bfd_mach_o_read_linkedit): Ditto.
179 (bfd_mach_o_read_str): Ditto.
180 (bfd_mach_o_read_dyld_info): Ditto.
181 (bfd_mach_o_read_segment): Ditto.
182 (bfd_mach_o_read_command): Ditto.
183 (bfd_mach_o_archive_p): Ditto.
184 (bfd_mach_o_canonicalize_one_reloc): Ditto. Change the BUF parameter.
185 (bfd_mach_o_canonicalize_relocs): Adjust to call the above function.
186 (bfd_mach_o_read_dysymtab_symbol): Rename BUF variable.
187 (bfd_mach_o_read_uuid): Remove useless cast. Use a macro instead
188 of an hard-coded value.
189
fde33808
TG
1902011-08-08 Tristan Gingold <gingold@adacore.com>
191
192 * mach-o-x86-64.c (bfd_mach_o_x86_64_mkobject): Fix cut-and-past typos.
193 (bfd_mach_o_x86_64_swap_reloc_out): Handle BFD_RELOC_32_PCREL,
194 BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64 and
195 BFD_RELOC_MACH_O_X86_64_GOT_LOAD. Share common code.
196
53d58d96
TG
1972011-08-08 Tristan Gingold <gingold@adacore.com>
198
199 * mach-o.c (bfd_mach_o_normalize_section_name): New function.
200 (bfd_mach_o_convert_section_name_to_bfd): Use it.
201 (bfd_mach_o_get_section_type_from_name): New function.
202 (bfd_mach_o_get_section_attribute_from_name): Ditto.
203 * mach-o.h (bfd_mach_o_section): Move bfdsection field at the end.
204 Add comments. Add prototypes for the above new functions.
205
9a66aae0
MK
2062011-08-05 Mark Kettenis <kettenis@gnu.org>
207
208 * netbsd-core.c (netbsd_core_vec): Init match_priority field.
209
d969d15f
AM
2102011-08-05 Alan Modra <amodra@gmail.com>
211
212 * elf64-ppc.c (maybe_strip_output): New function.
213 (ppc64_elf_size_stubs): Use it to strip .branch_lt and .eh_frame.
214
43e1669b
AM
2152011-08-05 Alan Modra <amodra@gmail.com>
216
217 PR ld/12762
218 * elflink.c (_bfd_elf_section_already_linked): Return matched
219 status. Remove COFF comdat section handling.
220 * linker.c (_bfd_generic_section_already_linked): Return matched
221 status. Don't set SEC_GROUP in l_flags for plugin entries.
222 (bfd_section_already_linked): Update prototype.
223 * targets.c (_section_already_linked): Likewise.
224 * elf-bfd.h (_bfd_elf_section_already_linked): Likewise.
225 * libbfd-in.h (_bfd_generic_section_already_linked): Likewise.
226 (_bfd_nolink_section_already_linked): Update.
227 * libbfd.h: Regenerate.
228 * bfd-in2.h: Regenerate.
229
6177242a
AM
2302011-08-05 Alan Modra <amodra@gmail.com>
231
232 * elf32-ppc.c: Include dwarf2.h.
233 (struct ppc_elf_link_hash_table): Add glink_eh_frame.
234 (ppc_elf_create_glink): Create .eh_frame section.
235 (glink_eh_frame_cie): New array.
236 (ppc_elf_size_dynamic_sections): Size glink_eh_frame.
237 (ppc_elf_finish_dynamic_sections): Write glink_eh_frame.
238
f1bb0388
TG
2392011-08-04 Tristan Gingold <gingold@adacore.com>
240
241 * vms-alpha.c (_bfd_vms_write_eeom): Round vms_linkage_index.
242 (_bfd_vms_write_etir): Initialize vms_linkage_index to 0.
243
092d27ff
TG
2442011-08-03 Tristan Gingold <gingold@adacore.com>
245
246 * mach-o.c (bfd_mach_o_canonicalize_symtab): Handle no symbols case.
247 (bfd_mach_o_read_symtab_symbols): Return if no symbols.
248
80cab405
MR
2492011-08-02 Maciej W. Rozycki <macro@codesourcery.com>
250
251 * elfxx-mips.c (check_4byte_branch): Remove function.
252 (check_relocated_bzc): New function.
253 (_bfd_mips_elf_relax_section): Permit the relaxation of LUI
254 instructions that immediately follow a compact branch
255 instruction.
256
c7131b65
AM
2572011-08-02 Alan Modra <amodra@gmail.com>
258
259 * elf64-ppc.c (build_plt_stub): Correct emitted relocs when no
260 plt_static_chain.
261 (ppc_build_one_stub): Adjust get_relocs call to suit..
262 (ppc_size_one_stub): ..and reloc sizing. Correct plt size corner case.
263
d7921315
L
2642011-08-01 H.J. Lu <hongjiu.lu@intel.com>
265
266 PR ld/13048
267 * archures.c (bfd_mach_i386_intel_syntax): New.
268 (bfd_mach_i386_i8086): Updated.
269 (bfd_mach_i386_i386): Likewise.
270 (bfd_mach_x86_64): Likewise.
271 (bfd_mach_x64_32): Likewise.
272 (bfd_mach_i386_i386_intel_syntax): Likewise.
273 (bfd_mach_x86_64_intel_syntax): Likewise.
274 (bfd_mach_x64_32_intel_syntax): Likewise.
275 (bfd_mach_l1om): Likewise.
276 (bfd_mach_l1om_intel_syntax): Likewise.
277 (bfd_mach_k1om): Likewise.
278 (bfd_mach_k1om_intel_syntax): Likewise.
279
280 * bfd-in2.h: Regenerated.
281
282 * cpu-i386.c (bfd_i386_compatible): Check mach instead of
283 bits_per_address.
284 (bfd_x64_32_arch_intel_syntax): Set bits_per_address to 64.
285 (bfd_x64_32_arch): Likewise.
286
287 * elf64-x86-64.c: Include "libiberty.h".
288 (x86_64_elf_howto_table): Append x32 R_X86_64_32.
289 (elf_x86_64_rtype_to_howto): Support x32 R_X86_64_32.
290 (elf_x86_64_reloc_type_lookup): Likewise.
291 (elf_x86_64_reloc_name_lookup): Likewise.
292 (elf_x86_64_relocate_section): Likewise.
293 (elf_x86_64_check_relocs): Allow R_X86_64_64 relocations for x32.
294
f41e5fcc
MR
2952011-07-29 Maciej W. Rozycki <macro@codesourcery.com>
296
297 * elfxx-mips.c (check_br32): Fix return type.
298
c088dedf
MR
2992011-07-29 Maciej W. Rozycki <macro@codesourcery.com>
300
301 * elfxx-mips.c (bz_insn_16): Correct opcode mask.
302
2309ddf2
MR
3032011-07-29 Maciej W. Rozycki <macro@codesourcery.com>
304
305 * elfxx-mips.c: Adjust comments throughout.
306 (mips_elf_relax_delete_bytes): Reshape code.
307 (_bfd_mips_elf_relax_section): Remove check for
308 R_MICROMIPS_GPREL16 relocations. Reshape code.
309
23209a78
RM
3102011-07-28 Roland McGrath <mcgrathr@google.com>
311
a27e4371
RM
312 * elf32-i386.c (NACL_PLT_ENTRY_SIZE, NACLMASK): New macros.
313 (elf_i386_nacl_plt0_entry): New variable.
314 (elf_i386_plt_entry): New variable.
315 (elf_i386_nacl_pic_plt0_entry): New variable.
316 (elf_i386_nacl_pic_plt_entry): New variable.
317 (elf_i386_nacl_plt, elf_i386_nacl_arch_bed): New variables.
318 (elf_backend_arch_data): New macro setting for elf_i386_nacl_vec stanza.
319 (elf_backend_plt_alignment): Likewise.
320
321 * config.bfd: Handle i[3-7]86-*-nacl*.
322 * elf32-i386.c (bfd_elf32_i386_nacl_vec): New backend vector stanza.
323 * targets.c: Support bfd_elf32_i386_nacl_vec.
324 * configure.in: Likewise.
325 * configure: Regenerated.
326
25e762b9
RM
327 * elf32-i386.c (struct elf_i386_plt_layout): New type.
328 (GET_PLT_ENTRY_SIZE): New macro.
329 (elf_i386_plt): New variable.
330 (struct elf_i386_backend_data): New member `plt'.
331 (elf_i386_arch_bed): Add initializer for it.
332 (elf_i386_vxworks_arch_bed): Likewise.
333 (elf_i386_allocate_dynrelocs): Use GET_PLT_ENTRY_SIZE.
334 (elf_i386_plt_sym_val): Likewise.
335 (elf_i386_relocate_section): Likewise.
336 (elf_i386_finish_dynamic_symbol): Likewise.
337 Also use other elf_i386_plt_layout members for PLT details.
338 (elf_i386_finish_dynamic_sections): Likewise.
339
23209a78
RM
340 * elf32-i386.c (struct elf_i386_backend_data): New type.
341 (get_elf_i386_backend_data): New macro.
342 (elf_i386_arch_bed): New variable.
343 (elf_backend_arch_data): New macro.
344 (struct elf_i386_link_hash_table): Remove plt0_pad_byte and is_vxworks.
345 (elf_i386_link_hash_table_create): Don't initialize them.
346 (elf_i386_create_dynamic_sections): Find is_vxworks flags in
347 elf_i386_backend_data, not elf_i386_link_hash_table.
348 (elf_i386_adjust_dynamic_symbol): Likewise.
349 (elf_i386_allocate_dynrelocs): Likewise.
350 (elf_i386_readonly_dynrelocs): Likewise.
351 (elf_i386_size_dynamic_sections): Likewise.
352 (elf_i386_relocate_section): Likewise.
353 (elf_i386_finish_dynamic_symbol): Likewise.
354 (elf_i386_finish_dynamic_sections): Likewise. Same for plt0_pad_byte.
355 (elf_i386_vxworks_link_hash_table_create): Function removed.
356 (elf_i386_vxworks_arch_bed): New variable.
357 (elf_backend_arch_data): New macro in elf32-i386-vxworks stanza.
358
359 * elf-bfd.h (elf_backend_data): New member arch_backend_data.
360 * elfxx-target.h (elf_backend_arch_data): New macro.
361 (elfNN_bed): Use it as initializer for the new member.
362
d91a6875
NC
3632011-07-28 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
364
365 * elf64-hppa.c (elf_hppa_final_link_relocate): Fix handling of out
366 of range branches.
367
4ccf1e31
JJ
3682011-07-26 Jakub Jelinek <jakub@redhat.com>
369
370 * dwarf2.c (dwarf_debug_sections): Add .debug_macro
371 and .zdebug_macro entry.
372 (dwarf_debug_section_enum): Add debug_macro.
373
58d180e8
AM
3742011-07-26 Alan Modra <amodra@gmail.com>
375
6177242a 376 * elf64-ppc.c: Include dwarf2.h.
58d180e8
AM
377 (struct ppc_link_hash_table): Add glink_eh_frame.
378 (create_linkage_sections): Create .eh_frame section.
379 (ppc64_elf_size_dynamic_sections): Arrange to drop unneeded
380 glink_eh_frame.
381 (glink_eh_frame_cie): New array.
382 (ppc64_elf_size_stubs): Size glink_eh_frame.
383 (ppc64_elf_build_stubs): Init glink_eh_frame contents.
384 (ppc64_elf_finish_dynamic_sections): Write glink_eh_frame.
385
18978b27
HPN
3862011-07-25 Hans-Peter Nilsson <hp@bitrange.com>
387
388 PR ld/12815
389 * elf64-mmix.c (struct _mmix_elf_section_data): New members
390 has_warned_bpo and has_warned_pushj.
391 (mmix_final_link_relocate): Remove PARAMS and PTR macros,
392 converting to ISO C. Add new parameter error_message. All
393 callers changed.
394 (mmix_elf_perform_relocation): Ditto.
395 <case R_MMIX_PUSHJ_STUBBABLE, case R_MMIX_BASE_PLUS_OFFSET>:
396 Handle the case where mmix_elf_check_common_relocs has not been
397 called, missing preparations for relocs of the respective type.
398
df58fc94 3992011-07-24 Chao-ying Fu <fu@mips.com>
58d180e8
AM
400 Ilie Garbacea <ilie@mips.com>
401 Maciej W. Rozycki <macro@codesourcery.com>
402 Joseph Myers <joseph@codesourcery.com>
403 Catherine Moore <clm@codesourcery.com>
df58fc94
RS
404 Richard Sandiford <rdsandiford@googlemail.com>
405
406 * archures.c (bfd_mach_mips_micromips): New macro.
407 * cpu-mips.c (I_micromips): New enum value.
408 (arch_info_struct): Add bfd_mach_mips_micromips.
409 * elfxx-mips.h (_bfd_mips_elf_is_target_special_symbol): New
410 prototype.
411 (_bfd_mips_elf_relax_section): Likewise.
412 (_bfd_mips16_elf_reloc_unshuffle): Rename to...
413 (_bfd_mips_elf_reloc_unshuffle): ... this. Handle microMIPS
414 ASE.
415 (_bfd_mips16_elf_reloc_shuffle): Rename to...
416 (_bfd_mips_elf_reloc_shuffle): ... this. Handle microMIPS ASE.
417 (gprel16_reloc_p): Handle microMIPS ASE.
418 (literal_reloc_p): New function.
419 * elf32-mips.c (elf_micromips_howto_table_rel): New variable.
420 (_bfd_mips_elf32_gprel16_reloc): Handle microMIPS ASE.
421 (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
422 and _bfd_mips_elf_reloc_shuffle changes.
423 (mips_elf_gprel32_reloc): Update comment.
424 (micromips_reloc_map): New variable.
425 (bfd_elf32_bfd_reloc_type_lookup): Handle microMIPS ASE.
426 (mips_elf32_rtype_to_howto): Likewise.
427 (mips_info_to_howto_rel): Likewise.
428 (bfd_elf32_bfd_is_target_special_symbol): Define.
429 (bfd_elf32_bfd_relax_section): Likewise.
430 * elf64-mips.c (micromips_elf64_howto_table_rel): New variable.
431 (micromips_elf64_howto_table_rela): Likewise.
432 (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
433 and _bfd_mips_elf_reloc_shuffle changes.
434 (micromips_reloc_map): Likewise.
435 (bfd_elf64_bfd_reloc_type_lookup): Handle microMIPS ASE.
436 (bfd_elf64_bfd_reloc_name_lookup): Likewise.
437 (mips_elf64_rtype_to_howto): Likewise.
438 (bfd_elf64_bfd_is_target_special_symbol): Define.
439 * elfn32-mips.c (elf_micromips_howto_table_rel): New variable.
440 (elf_micromips_howto_table_rela): Likewise.
441 (mips16_gprel_reloc): Update for _bfd_mips_elf_reloc_unshuffle
442 and _bfd_mips_elf_reloc_shuffle changes.
443 (micromips_reloc_map): Likewise.
444 (bfd_elf32_bfd_reloc_type_lookup): Handle microMIPS ASE.
445 (bfd_elf32_bfd_reloc_name_lookup): Likewise.
446 (mips_elf_n32_rtype_to_howto): Likewise.
447 (bfd_elf32_bfd_is_target_special_symbol): Define.
448 * elfxx-mips.c (LA25_LUI_MICROMIPS_1): New macro.
449 (LA25_LUI_MICROMIPS_2): Likewise.
450 (LA25_J_MICROMIPS_1, LA25_J_MICROMIPS_2): Likewise.
451 (LA25_ADDIU_MICROMIPS_1, LA25_ADDIU_MICROMIPS_2): Likewise.
452 (TLS_RELOC_P): Handle microMIPS ASE.
453 (mips_elf_create_stub_symbol): Adjust value of stub symbol if
454 target is a microMIPS function.
455 (micromips_reloc_p): New function.
456 (micromips_reloc_shuffle_p): Likewise.
457 (got16_reloc_p, call16_reloc_p): Handle microMIPS ASE.
458 (got_disp_reloc_p, got_page_reloc_p): New functions.
459 (got_ofst_reloc_p): Likewise.
460 (got_hi16_reloc_p, got_lo16_reloc_p): Likewise.
461 (call_hi16_reloc_p, call_lo16_reloc_p): Likewise.
462 (hi16_reloc_p, lo16_reloc_p, jal_reloc_p): Handle microMIPS ASE.
463 (micromips_branch_reloc_p): New function.
464 (tls_gd_reloc_p, tls_ldm_reloc_p): Likewise.
465 (tls_gottprel_reloc_p): Likewise.
466 (_bfd_mips16_elf_reloc_unshuffle): Rename to...
467 (_bfd_mips_elf_reloc_unshuffle): ... this. Handle microMIPS
468 ASE.
469 (_bfd_mips16_elf_reloc_shuffle): Rename to...
470 (_bfd_mips_elf_reloc_shuffle): ... this. Handle microMIPS ASE.
471 (_bfd_mips_elf_lo16_reloc): Handle microMIPS ASE.
472 (mips_tls_got_index, mips_elf_got_page): Likewise.
473 (mips_elf_create_local_got_entry): Likewise.
474 (mips_elf_relocation_needs_la25_stub): Likewise.
475 (mips_elf_calculate_relocation): Likewise.
476 (mips_elf_perform_relocation): Likewise.
477 (_bfd_mips_elf_symbol_processing): Likewise.
478 (_bfd_mips_elf_add_symbol_hook): Likewise.
479 (_bfd_mips_elf_link_output_symbol_hook): Likewise.
480 (mips_elf_add_lo16_rel_addend): Likewise.
481 (_bfd_mips_elf_check_relocs): Likewise.
482 (mips_elf_adjust_addend): Likewise.
483 (_bfd_mips_elf_relocate_section): Likewise.
484 (mips_elf_create_la25_stub): Likewise.
485 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
486 (_bfd_mips_elf_gc_sweep_hook): Likewise.
487 (_bfd_mips_elf_is_target_special_symbol): New function.
488 (mips_elf_relax_delete_bytes): Likewise.
489 (opcode_descriptor): New structure.
490 (RA): New macro.
491 (OP32_SREG, OP32_TREG, OP16_VALID_REG): Likewise.
492 (b_insns_32, bc_insn_32, bz_insn_32, bzal_insn_32): New variables.
493 (beq_insn_32): Likewise.
494 (b_insn_16, bz_insn_16): New variables.
495 (BZC32_REG_FIELD): New macro.
496 (bz_rs_insns_32, bz_rt_insns_32): New variables.
497 (bzc_insns_32, bz_insns_16):Likewise.
498 (BZ16_REG, BZ16_REG_FIELD): New macros.
499 (jal_insn_32_bd16, jal_insn_32_bd32): New variables.
500 (jal_x_insn_32_bd32): Likewise.
501 (j_insn_32, jalr_insn_32): Likewise.
502 (ds_insns_32_bd16, ds_insns_32_bd32): Likewise.
503 (jalr_insn_16_bd16, jalr_insn_16_bd32, jr_insn_16): Likewise.
504 (JR16_REG): New macro.
505 (ds_insns_16_bd16): New variable.
506 (lui_insn): Likewise.
507 (addiu_insn, addiupc_insn): Likewise.
508 (ADDIUPC_REG_FIELD): New macro.
509 (MOVE32_RD, MOVE32_RS): Likewise.
510 (MOVE16_RD_FIELD, MOVE16_RS_FIELD): Likewise.
511 (move_insns_32, move_insns_16): New variables.
512 (nop_insn_32, nop_insn_16): Likewise.
513 (MATCH): New macro.
514 (find_match): New function.
515 (check_br16_dslot, check_br32_dslot): Likewise.
516 (check_br16, check_br32): Likewise.
517 (IS_BITSIZE): New macro.
518 (check_4byte_branch): New function.
519 (_bfd_mips_elf_relax_section): Likewise.
520 (_bfd_mips_elf_merge_private_bfd_data): Disallow linking MIPS16
521 and microMIPS modules together.
522 (_bfd_mips_elf_print_private_bfd_data): Handle microMIPS ASE.
523 * reloc.c (BFD_RELOC_MICROMIPS_7_PCREL_S1): New relocation.
524 (BFD_RELOC_MICROMIPS_10_PCREL_S1): Likewise.
525 (BFD_RELOC_MICROMIPS_16_PCREL_S1): Likewise.
526 (BFD_RELOC_MICROMIPS_GPREL16): Likewise.
527 (BFD_RELOC_MICROMIPS_JMP, BFD_RELOC_MICROMIPS_HI16): Likewise.
528 (BFD_RELOC_MICROMIPS_HI16_S): Likewise.
529 (BFD_RELOC_MICROMIPS_LO16): Likewise.
530 (BFD_RELOC_MICROMIPS_LITERAL): Likewise.
531 (BFD_RELOC_MICROMIPS_GOT16): Likewise.
532 (BFD_RELOC_MICROMIPS_CALL16): Likewise.
533 (BFD_RELOC_MICROMIPS_GOT_HI16): Likewise.
534 (BFD_RELOC_MICROMIPS_GOT_LO16): Likewise.
535 (BFD_RELOC_MICROMIPS_CALL_HI16): Likewise.
536 (BFD_RELOC_MICROMIPS_CALL_LO16): Likewise.
537 (BFD_RELOC_MICROMIPS_SUB): Likewise.
538 (BFD_RELOC_MICROMIPS_GOT_PAGE): Likewise.
539 (BFD_RELOC_MICROMIPS_GOT_OFST): Likewise.
540 (BFD_RELOC_MICROMIPS_GOT_DISP): Likewise.
541 (BFD_RELOC_MICROMIPS_HIGHEST): Likewise.
542 (BFD_RELOC_MICROMIPS_HIGHER): Likewise.
543 (BFD_RELOC_MICROMIPS_SCN_DISP): Likewise.
544 (BFD_RELOC_MICROMIPS_JALR): Likewise.
545 (BFD_RELOC_MICROMIPS_TLS_GD): Likewise.
546 (BFD_RELOC_MICROMIPS_TLS_LDM): Likewise.
547 (BFD_RELOC_MICROMIPS_TLS_DTPREL_HI16): Likewise.
548 (BFD_RELOC_MICROMIPS_TLS_DTPREL_LO16): Likewise.
549 (BFD_RELOC_MICROMIPS_TLS_GOTTPREL): Likewise.
550 (BFD_RELOC_MICROMIPS_TLS_TPREL_HI16): Likewise.
551 (BFD_RELOC_MICROMIPS_TLS_TPREL_LO16): Likewise.
552 * bfd-in2.h: Regenerate.
553 * libbfd.h: Regenerate.
554
7a9068fe
L
5552011-07-22 H.J. Lu <hongjiu.lu@intel.com>
556
557 * Makefile.am (ALL_MACHINES): Add cpu-k1om.lo.
558 (ALL_MACHINES_CFILES): Add cpu-k1om.c.
559 * Makefile.in: Regenerated.
560
561 * archures.c (bfd_architecture): Add bfd_arch_k1om.
562 (bfd_k1om_arch): New.
563 (bfd_archures_list): Add &bfd_k1om_arch.
564 * bfd-in2.h: Regenerated.
565
566 * config.bfd (targ64_selvecs): Add bfd_elf64_k1om_vec if
567 bfd_elf64_x86_64_vec is supported. Add bfd_elf64_k1om_freebsd_vec
568 if bfd_elf64_x86_64_freebsd_vec is supported.
569 (targ_selvecs): Likewise.
570
571 * configure.in: Support bfd_elf64_k1om_vec and
572 bfd_elf64_k1om_freebsd_vec.
573 * configure: Regenerated.
574
575 * cpu-k1om.c: New.
576
577 * elf64-x86-64.c (elf64_k1om_elf_object_p): New.
578 (bfd_elf64_k1om_vec): Likewise.
579 (bfd_elf64_k1om_freebsd_vec): Likewise.
580
581 * targets.c (bfd_elf64_k1om_vec): New.
582 (bfd_elf64_k1om_freebsd_vec): Likewise.
583 (_bfd_target_vector): Add bfd_elf64_k1om_vec and
584 bfd_elf64_k1om_freebsd_vec.
585
156f6ad8
JK
5862011-07-20 Jan Kratochvil <jan.kratochvil@redhat.com>
587
588 Fix false coff-go32-exe matches.
589 * coff-i386.c (TARGET_SYM) <_bfd_check_format>: Conditionally use
590 COFF_CHECK_FORMAT.
591 * coff-stgo32.c (go32_check_format): New forward declaration.
592 (COFF_CHECK_FORMAT): New defintion.
593 (go32_check_format): New function.
594
05aecedb
AM
5952011-07-15 Alan Modra <amodra@gmail.com>
596
597 * configure.in: Bump version.
598 * configure: Regenerate.
599
cbde55ab
AM
6002011-07-14 Alan Modra <amodra@gmail.com>
601
602 * linker.c (_bfd_generic_section_already_linked): Set l_flags.
603 * elf-bfd.h (struct already_linked): Forward declare.
604
ec24dc88
AM
6052011-07-14 Alan Modra <amodra@gmail.com>
606
607 * elflink.c (_bfd_elf_fix_symbol_flags): Loop on indirect syms.
608 (_bfd_elf_adjust_dynamic_symbol): Remove FIXME.
609
9df0ef5f
AM
6102011-07-14 Alan Modra <amodra@gmail.com>
611
612 * elf64-ppc.c (struct ppc_link_hash_table): Add plt_static_chain.
613 (build_plt_stub): Add plt_static_chain param, don't load r11 if false.
614 (build_tls_get_addr_stub): Likewise.
615 (ppc_build_one_stub): Update calls to above.
616 (ppc_size_one_stub): Adjust stub size.
617 (ppc64_elf_size_stubs): Add plt_static_chain param, save to htab.
618 * elf64-ppc.h (ppc64_elf_size_stubs): Update prototype.
619
8de863a5
NC
6202011-07-12 Nick Clifton <nickc@redhat.com>
621
622 * elf32-arm.c (elf32_arm_section_flags): Delete.
623 (elf_backend_section_flags): Remove.
624
a92c088a
L
6252011-07-11 H.J. Lu <hongjiu.lu@intel.com>
626
627 PR ld/12982
628 * elflink.c (bfd_elf_size_dynamic_sections): Also skip BFD_PLUGIN
629 when setting stack_flags.
630
ae17ab41
CM
6312011-07-11 Catherine Moore <clm@codesourcery.com>
632
633 * aout-adobe.c (aout_32_bfd_lookup_section_flags): New definition.
634 * aout-target.h (MY_bfd_lookup_section_flags): New definition.
635 * aout-tic30.c (MY_bfd_lookup_section_flags): New definition.
58d180e8 636 * bfd-in2.h: Regenerated.
ae17ab41
CM
637 * bfd.c (bfd_lookup_section_flags): New definition.
638 * binary.c (binary_bfd_lookup_section_flags): New definition.
639 * bout.c (b_out_bfd_lookup_section_flags): New definition.
640 * coff-alpha.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
641 * coff-mips.c (_bfd_ecoff_bfd_lookup_section_flags): New definition.
642 * coff-rs6000.c (rs6000coff_vec): Include
643 bfd_generic_lookup_section_flags.
644 (pmac_xcoff_vec): Likewise.
645 * coffcode.h (coff_bfd_lookup_section_flags): New definition.
646 * coff64-rs6000.c (rs6000coff64_vec): Include
647 bfd_generic_lookup_section_flags.
648 (aix5coff64_vec): Likewise.
649 * ecoff.c (bfd_debug_section): Initialize flag_info field.
650 * elf-bfd.h (elf_backend_lookup_section_flags_hook): Declare.
651 (bfd_elf_lookup_section_flags): Declare.
652 * elflink.c (bfd_elf_lookup_section_flags): New function.
653 * elfxx-target.h (bfd_elfNN_bfd_lookup_section_flags): Define.
654 (elf_backend_lookup_section_flags_hook): Define.
655 (elf_backend_data): Add elf_backend_lookup_section_flags_hook.
656 * i386msdos.c (msdos_bfd_lookup_section_flags): New define.
657 * i386os9k.c (os9k_bfd_lookup_section_flags): New define.
658 * ieee.c (ieee_bfd_lookup_section_flags): New define.
659 * ihex.c (ihex_bfd_lookup_section_flags): New define.
660 * libbfd-in.h (_bfd_nolink_bfd_lookup_section_flags): Declare.
661 (bfd_generic_lookup_section_flags): Declare.
662 * libbfd.h: Regenerated.
663 * mach-o-target.c (bfd_mach_o_bfd_lookup_section_flags): New.
664 * mmo.c (mmo_bfd_lookup_section_flags): New definition.
665 * nlm-target.h (nlm_bfd_lookup_section_flags): New definition.
666 * oasys.c (oasys_bfd_lookup_section_flags): New definition.
667 * pef.c (bfd_pef_bfd_lookup_section_flags): New definition.
668 * plugin.c (bfd_plugin_bfd_lookup_section_flags): New definition.
669 * ppcboot.c (ppcboot_bfd_lookup_section_flags): New definition.
670 * reloc.c (bfd_generic_lookup_section_flags): New function.
671 * som.c (som_bfd_lookup_section_flags): New definition.
672 * srec.c (srec_bfd_lookup_section_flags): New definition.
673 * targets.c (flag_info): Declare.
674 (NAME##_bfd_lookup_section_flags): Add to LINK jump table.
675 (_bfd_lookup_section_flags): New.
676 * tekhex.c (tekhex_bfd_lookup_section_flags): New definition.
677 * versados.c (versados_bfd_lookup_section_flags): New definition.
678 * vms-alpha.c (alpha_vms_bfd_lookup_section_flag): New definition.
679 * xsym.c (bfd_sym_bfd_lookup_section_flags): New definition.
680
23ebcd30
L
6812011-07-11 H.J. Lu <hongjiu.lu@intel.com>
682
683 PR ld/12978
684 * elfnn-ia64.c (count_dyn_reloc): Fix a typo.
685
0c511000
AM
6862011-07-09 Alan Modra <amodra@gmail.com>
687
688 PR ld/12942
689 * elflink.c (elf_link_add_object_symbols): Use elf_discarded_section
690 rather than kept_section to determine whether a symbol is from
691 a discarded section.
692 * cofflink.c (coff_link_add_symbols): Make symbols from discarded
693 sections appear undefined.
694
6952011-07-09 H.J. Lu <hongjiu.lu@intel.com>
696
697 PR ld/12942
698 * elf-bfd.h (_bfd_elf_section_already_linked): Replace
699 "asection *" with "struct already_linked *".
700 * libbfd-in.h (_bfd_nolink_section_already_linked): Likewise.
701 (_bfd_generic_section_already_linked): Likewise.
702 (bfd_section_already_linked_table_insert): Likewise.
703 (struct already_linked): New.
704 (struct bfd_section_already_linked): Use it.
705 * elflink.c (_bfd_elf_section_already_linked): Replace.
706 "asection *" with "struct already_linked *". Replace the plugin
707 dummy with the LTO output.
708 * linker.c (_bfd_generic_section_already_linked): Likewise.
709 * targets.c (struct already_linked): Add forward declaration.
710 (bfd_target): Replace "struct bfd_section *" with
711 "struct already_linked *" in _section_already_linked.
712 * bfd-in2.h: Regenerate.
713 * libbfd.h: Regenerate.
714
74f26653
TG
7152011-07-06 Tristan Gingold <gingold@adacore.com>
716
717 * mach-o.h: Move loader related definitions to
718 include/mach-o/loader.h. Include it.
719
52cb9dfe
L
7202011-07-05 H.J. Lu <hongjiu.lu@intel.com>
721
722 * elf64-x86-64.c (elf_backend_post_process_headers): Always
723 define to _bfd_elf_set_osabi.
724
9c55345c
TS
7252011-07-03 Samuel Thibault <samuel.thibault@gnu.org>
726 Thomas Schwinge <thomas@schwinge.name>
727
2bb70ae0 728 PR binutils/12913
9c55345c
TS
729 * elf.c (_bfd_elf_set_osabi): Use ELFOSABI_GNU name instead of
730 ELFOSABI_LINUX alias.
731 * elf32-hppa.c: Likewise.
732 * elf32-i370.c: Likewise.
733 * elf64-hppa.c: Likewise.
734
28ede8be
ILT
7352011-07-01 Ian Lance Taylor <iant@google.com>
736
737 * elf32-i386.c (elf_i386_eh_frame_plt): Correct expression: change
738 DW_OP_lit3 to DW_OP_lit2.
739
c79d6685
AM
7402011-07-01 Alan Modra <amodra@gmail.com>
741
742 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Don't look at
743 dyn relocs when called to copy flags for a weak sym.
744 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
745 (ppc64_elf_merge_private_bfd_data): Delete.
746 (bfd_elf64_bfd_merge_private_bfd_data): Define as
747 _bfd_generic_verify_endian_match.
748
dc076558
BS
7492011-06-30 Bernd Schmidt <bernds@codesourcery.com>
750
751 * bfd/elf32-tic6x.c (elf32_tic6x_set_osabi): Also set it if
752 link_info is NULL.
753
25d41743
TG
7542011-06-28 Tristan Gingold <gingold@adacore.com>
755
756 * vms-alpha.c (vms_private_data_struct): Make vms_linkage_index
757 unsigned int.
758 (_bfd_vms_write_etir): Write linkage index from reloc.
759
9b02d212
TG
7602011-06-28 Fawzi Mohamed <fawzi.mohamed@nokia.com>
761
762 * mach-o.c (bfd_mach_o_read_command): Also ignore
763 BFD_MACH_O_LC_ROUTINES_64.
764
a8efca92
TG
7652011-06-27 Tristan Gingold <gingold@adacore.com>
766
767 * vms-alpha.c (_bfd_vms_write_etir): Use 'section' to get current
768 section target index.
769
20ee8bc9
NC
7702011-06-27 Nick Clifton <nickc@redhat.com>
771
772 * cisco-core.c (cisco_core_little_vec): Add initialization of
773 match_priority field.
774
4c95ab76
TG
7752011-06-27 Tristan Gingold <gingold@adacore.com>
776
777 * cache.c: Include bfd_stdint.h.
778 (cache_bmmap): Change profile. Return region start and size.
779 * bfdio.c (struct bfd_iovec): Change bmmap profile.
780 (bfd_mmap): Change profile and adjust. Update comment.
781 (memory_bmmap): Change profile.
782 * opncls.c (opncls_bmmap): Change profile.
783 * vms-lib.c (vms_lib_bmmap): Likewise.
784 * libbfd.h: Regenerate.
785 * bfd-in2.h: Regenerate.
786
62a35308
TG
7872011-06-27 Tristan Gingold <gingold@adacore.com>
788
789 * vms-misc.c (vms_time_to_time_t): Adjust overflow detection.
790 Add comment.
791
5d430399
L
7922011-06-25 H.J. Lu <hongjiu.lu@intel.com>
793
794 * elf64-x86-64.c (elf_backend_post_process_headers): Don't
795 define for FreeBSD/x86-64 nor FreeBSD/L1OM. Define for L1OM.
796
332ce62b
JK
7972011-06-25 Jan Kratochvil <jan.kratochvil@redhat.com>
798
799 * elf64-x86-64.c (elf_x86_64_link_hash_table_create): Initialize
800 PLT_EH_FRAME.
801 * elf32-i386.c (elf_i386_link_hash_table): Likewise.
802
7dbf3b76
RH
8032011-06-24 Richard Henderson <rth@redhat.com>
804
805 PR ld/12928
806 * elf64-alpha.c (elf64_alpha_relax_tls_get_addr): Recover the
807 tlsgd insn before swapping adjacent insns.
808
d120eec2
TG
8092011-06-24 Tristan Gingold <gingold@adacore.com>
810
811 * vms-alpha.c (alpha_vms_slurp_relocs): Add a guard for relocs in the
812 absolute section.
813
1e951488
AM
8142011-06-24 Alan Modra <amodra@gmail.com>
815
816 PR ld/12921
817 * elf.c (assign_file_positions_for_load_sections): Don't align
818 sh_offset for all SHT_NOBITS sections here, just .tbss sections
819 that don't get a PT_LOAD.
820
b68593b9
KK
8212011-06-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
822
823 * elf32-sh.c (sh_elf_relocate_section): Allow R_SH_TLS_LE_32 for PIE.
824 (sh_elf_check_relocs): Likewise.
825
e366eeae
RH
8262011-06-22 Richard Henderson <rth@redhat.com>
827
828 * elf64-alpha.c (elf64_alpha_check_relocs): No dynamic reloc for
829 TPREL in a PIE image.
830 (alpha_dynamic_entries_for_reloc): Likewise.
831 (elf64_alpha_relocate_section): Allow TPREL in PIE images.
832 (elf64_alpha_relax_got_load): Likewise.
833
9ec0c936
RR
8342011-06-22 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
835
c79d6685
AM
836 * elf32-arm.c (elf32_arm_final_link_relocate): Allow R_ARM_TLS_LE32
837 for PIE.
9ec0c936 838
3a5dbfb2
AM
8392011-06-22 Alan Modra <amodra@gmail.com>
840
841 * elflink.c (_bfd_elf_merge_symbol): Allow type changes for
842 plugin symbols. Fix segfault on linker scrip defined syms.
843
e41b3a13
JJ
8442011-06-20 Jakub Jelinek <jakub@redhat.com>
845
846 PR ld/12570
847 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Allow no relocations
848 at all for linker created .eh_frame sections.
849 (_bfd_elf_discard_section_eh_frame): Handle linker created
850 .eh_frame sections with no relocations.
851 * elf64-x86-64.c: Include dwarf2.h.
852 (elf_x86_64_eh_frame_plt): New variable.
853 (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
854 PLT_FDE_LEN_OFFSET): Define.
855 (struct elf_x86_64_link_hash_table): Add plt_eh_frame field.
856 (elf_x86_64_create_dynamic_sections): Create and fill in
857 .eh_frame section for .plt section.
858 (elf_x86_64_size_dynamic_sections): Write .plt section size
859 into .eh_frame FDE covering .plt section.
860 (elf_x86_64_finish_dynamic_sections): Write .plt section
861 start into .eh_frame FDE covering .plt section. Call
862 _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
863 (elf_backend_plt_alignment): Define to 4.
864 * elf32-i386.c: Include dwarf2.h.
865 (elf_i386_eh_frame_plt): New variable.
866 (PLT_CIE_LENGTH, PLT_FDE_LENGTH, PLT_FDE_START_OFFSET,
867 PLT_FDE_LEN_OFFSET): Define.
868 (struct elf_i386_link_hash_table): Add plt_eh_frame field.
869 (elf_i386_create_dynamic_sections): Create and fill in
870 .eh_frame section for .plt section.
871 (elf_i386_size_dynamic_sections): Write .plt section size
872 into .eh_frame FDE covering .plt section.
873 (elf_i386_finish_dynamic_sections): Write .plt section
874 start into .eh_frame FDE covering .plt section. Call
875 _bfd_elf_write_section_eh_frame on htab->plt_eh_frame section.
876 (elf_backend_plt_alignment): Define to 4.
877
8b778942
L
8782011-06-19 H.J. Lu <hongjiu.lu@intel.com>
879
880 * elf64-x86-64.c (elf_backend_post_process_headers): Defined
881 for x32.
882
8fd79e71
L
8832011-06-16 H.J. Lu <hongjiu.lu@intel.com>
884
885 * elf64-x86-64.c: Include <stdarg.h> and CORE_HEADER if
886 CORE_HEADER is defined.
887 (elf_x86_64_write_core_note): New.
888 (elf_backend_write_core_note): Likewise.
889
890 * hosts/x86-64linux.h (uint64_t): New.
891 (user_regsx32_struct): Likewise.
892 (elf_gregx32_t): Likewise.
893 (ELF_NGREGX32): Likewise.
894 (elf_gregsetx32_t): Likewise.
895 (elf_prstatusx32): Likewise.
896 (prstatusx32_t): Likewise.
897 (user_fpregs32_struct): Removed.
898 (user_fpxregs32_struct): Likewise.
899 (user32): Likewise.
900 (elf_fpregset32_t): Likewise.
901 (elf_fpxregset32_t): Likewise.
902 (prgregset32_t): Likewise.
903 (prfpregset32_t): Likewise.
904
bcd823f1
L
9052011-06-16 H.J. Lu <hongjiu.lu@intel.com>
906
907 * elf64-x86-64.c (elf_x86_64_grok_prstatus): Support x32.
908 (elf_x86_64_grok_psinfo): Likewise.
909
a06c7d5a
NC
9102011-06-16 Nick Clifton <nickc@redhat.com>
911
912 * elf.c (elf_find_function): Fail if not provided with a symbol
913 table.
914
faa9a424
UW
9152011-06-15 Ulrich Weigand <ulrich.weigand@linaro.org>
916
917 * elf-bfd.h (elfcore_write_arm_vfp): Add prototype.
918 * elf.c (elfcore_grok_arm_vfp): New function.
919 (elfcore_grok_note): Call it to handle NT_ARM_VFP notes.
920 (elfcore_write_arm_vfp): New function.
921 (elfcore_write_register_note): Call it to handle .reg-arm-vfp.
922
48f4b4f5
RH
9232011-06-14 Richard Henderson <rth@redhat.com>
924
925 * elf64-alpha.c (elf64_alpha_copy_indirect_symbol): Rename from
926 elf64_alpha_merge_ind_symbols; adjust for the generic interface.
927 (elf64_alpha_always_size_sections): Don't call
928 elf64_alpha_merge_ind_symbols.
929 (elf_backend_copy_indirect_symbol): New.
930
4d16d575
AM
9312011-06-14 Alan Modra <amodra@gmail.com>
932
933 PR ld/12887
934 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Check sec_info_type
935 before doing anything.
936 (_bfd_elf_discard_section_eh_frame): Likewise.
937
1e24d83c
AM
9382011-06-14 Alan Modra <amodra@gmail.com>
939
940 * Makefile.am: Formatting.
941 * Makefile.in: Regenerate.
942 * configure.in (bfd_elf64_tilegx_vec): Add elfxx-tilegx.lo.
943 * po/SRC-POTFILES.in: Regnerate.
944
e4d34ace
AM
9452011-06-14 Alan Modra <amodra@gmail.com>
946
947 * elf32-tilepro.c (tilepro_elf_size_dynamic_sections): Don't use PTR.
948 (allocate_dynrelocs, readonly_dynrelocs): Replace PTR with void *.
949 Don't handle warning symbols here.
950 * elfxx-tilegx.c (tilegx_elf_size_dynamic_sections): As above.
951 (allocate_dynrelocs, readonly_dynrelocs): As above.
952
7f6ab9f8
AM
9532011-06-14 Alan Modra <amodra@gmail.com>
954
955 PR ld/12851
956 * elflink.c (_bfd_elf_gc_mark_extra_sections): New function.
957 (elf_gc_sweep): Don't treat debug and sections like .comment
958 specially here.
959 (bfd_elf_gc_sections): Treat note sections as gc roots only when
960 not part of a group. Always call gc_mark_extra_sections.
961 * elf-bfd.h (_bfd_elf_gc_mark_extra_sections): Declare.
962 * elfxx-target.h (elf_backend_gc_mark_extra_sections): Default to
963 _bfd_elf_gc_mark_extra_sections.
964 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Call
965 _bfd_elf_gc_mark_extra_sections.
966 * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): Likewise.
967
09d9a62a
NC
9682011-06-13 Nick Clifton <nickc@redhat.com>
969
970 * elf32-tilepro.c (tilepro_elf_check_relocs): Delete unused local
971 variable 'local_got_offsets'.
972 * elfxx-tilegx.c (tilegx_elf_check_relocs): Likewise.
973 (tilegx_finish_dyn): Delete unused local variable 'abi_64_p'.
974
aa137e4d
NC
9752011-06-13 Walter Lee <walt@tilera.com>
976
977 * Makefile.am (ALL_MACHINES): Add cpu-tilegx.lo and cpu-tilepro.lo.
978 (ALL_MACHINE_CFILES): Add cpu-tilegx.c and cpu-tilepro.c.
979 (BFD32_BACKENDS): Add elf32-tilegx.lo, elf32-tilepro.lo,
980 and elfxx-tilegx.lo.
981 (BFD32_BACKENDS_CFILES): Add elf32-tilegx.c elf32-tilepro.c, and
982 elfxx-tilegx.c.
983 (BFD64_BACKENDS): Add elf64-tilegx.lo.
984 (BFD64_BACKENDS_CFILES): Add elf64-tilegx.c.
985 * Makefile.in: Regenerate.
986 * arctures.c (bfd_architecture): Define bfd_arch_tilepro,
987 bfd_arch_tilegx, bfd_mach_tilepro, bfd_mach_tilegx.
988 (bfd_arch_info): Add bfd_tilegx_arch, bfd_tilepro_arch.
989 (bfd_archures_list): Add bfd_tilegx_arch, bfd_tilepro_arch.
990 bfd-in2.h: Regenerate.
991 * config.bfd: Handle tilegx-*-* and tilepro-*-*.
992 * configure.in: Handle bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
993 and bfd_elf64_tilegx_vec.
994 * configure: Regenerate.
995 * elf-bfd.h (enum elf_target_id): Define TILEGX_ELF_DATA and
996 TILEPRO_ELF_DATA.
997 * libbfd.h: Regenerate.
998 * reloc.c: Add BFD_RELOC_TILEPRO_{COPY, GLOB_DAT, JMP_SLOT,
999 RELATIVE, BROFF_X1, JOFFLONG_X1, JOFFLONG_X1_PLT, IMM8_X0,
1000 IMM8_Y0, IMM8_X1, IMM8_Y1, DEST_IMM8_X1, MT_IMM15_X1, MF_IMM15_X1,
1001 IMM16_X0, IMM16_X1, IMM16_X0_LO, IMM16_X1_LO, IMM16_X0_HI,
1002 IMM16_X1_HI, IMM16_X0_HA, IMM16_X1_HA, IMM16_X0_PCREL,
1003 IMM16_X1_PCREL, IMM16_X0_LO_PCREL, IMM16_X1_LO_PCREL,
1004 IMM16_X0_HI_PCREL, IMM16_X1_HI_PCREL, IMM16_X0_HA_PCREL,
1005 IMM16_X1_HA_PCREL, IMM16_X0_GOT, IMM16_X1_GOT, IMM16_X0_GOT_LO,
1006 IMM16_X1_GOT_LO, IMM16_X0_GOT_HI, IMM16_X1_GOT_HI,
1007 IMM16_X0_GOT_HA, IMM16_X1_GOT_HA, MMSTART_X0, MMEND_X0,
1008 MMSTART_X1, MMEND_X1, SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1,
1009 IMM16_X0_TLS_GD, IMM16_X1_TLS_GD, IMM16_X0_TLS_GD_LO,
1010 IMM16_X1_TLS_GD_LO, IMM16_X0_TLS_GD_HI, IMM16_X1_TLS_GD_HI,
1011 IMM16_X0_TLS_GD_HA, IMM16_X1_TLS_GD_HA, IMM16_X0_TLS_IE,
1012 IMM16_X1_TLS_IE, IMM16_X0_TLS_IE_LO, IMM16_X1_TLS_IE_LO,
1013 IMM16_X0_TLS_IE_HI, IMM16_X1_TLS_IE_HI, IMM16_X0_TLS_IE_HA,
1014 IMM16_X1_TLS_IE_HA, TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
1015 Add BFD_RELOC_TILEGX_{HW0, HW1, HW2, HW3, HW0_LAST, HW1_LAST,
1016 HW2_LAST, COPY, GLOB_DAT, JMP_SLOT, RELATIVE, BROFF_X1,
1017 JUMPOFF_X1, JUMPOFF_X1_PLT, IMM8_X0, IMM8_Y0, IMM8_X1, IMM8_Y1,
1018 DEST_IMM8_X1, MT_IMM14_X1, MF_IMM14_X1, MMSTART_X0, MMEND_X0,
1019 SHAMT_X0, SHAMT_X1, SHAMT_Y0, SHAMT_Y1, IMM16_X0_HW0,
1020 IMM16_X1_HW0, IMM16_X0_HW1, IMM16_X1_HW1, IMM16_X0_HW2,
1021 IMM16_X1_HW2, IMM16_X0_HW3, IMM16_X1_HW3, IMM16_X0_HW0_LAST,
1022 IMM16_X1_HW0_LAST, IMM16_X0_HW1_LAST, IMM16_X1_HW1_LAST,
1023 IMM16_X0_HW2_LAST, IMM16_X1_HW2_LAST, IMM16_X0_HW0_PCREL,
1024 IMM16_X1_HW0_PCREL, IMM16_X0_HW1_PCREL, IMM16_X1_HW1_PCREL,
1025 IMM16_X0_HW2_PCREL, IMM16_X1_HW2_PCREL, IMM16_X0_HW3_PCREL,
1026 IMM16_X1_HW3_PCREL, IMM16_X0_HW0_LAST_PCREL,
1027 IMM16_X1_HW0_LAST_PCREL, IMM16_X0_HW1_LAST_PCREL,
1028 IMM16_X1_HW1_LAST_PCREL, IMM16_X0_HW2_LAST_PCREL,
1029 IMM16_X1_HW2_LAST_PCREL, IMM16_X0_HW0_GOT, IMM16_X1_HW0_GOT,
1030 IMM16_X0_HW1_GOT, IMM16_X1_HW1_GOT, IMM16_X0_HW2_GOT,
1031 IMM16_X1_HW2_GOT, IMM16_X0_HW3_GOT, IMM16_X1_HW3_GOT,
1032 IMM16_X0_HW0_LAST_GOT, IMM16_X1_HW0_LAST_GOT,
1033 IMM16_X0_HW1_LAST_GOT, IMM16_X1_HW1_LAST_GOT,
1034 IMM16_X0_HW2_LAST_GOT, IMM16_X1_HW2_LAST_GOT, IMM16_X0_HW0_TLS_GD,
1035 IMM16_X1_HW0_TLS_GD, IMM16_X0_HW1_TLS_GD, IMM16_X1_HW1_TLS_GD,
1036 IMM16_X0_HW2_TLS_GD, IMM16_X1_HW2_TLS_GD, IMM16_X0_HW3_TLS_GD,
1037 IMM16_X1_HW3_TLS_GD, IMM16_X0_HW0_LAST_TLS_GD,
1038 IMM16_X1_HW0_LAST_TLS_GD, IMM16_X0_HW1_LAST_TLS_GD,
1039 IMM16_X1_HW1_LAST_TLS_GD, IMM16_X0_HW2_LAST_TLS_GD,
1040 IMM16_X1_HW2_LAST_TLS_GD, IMM16_X0_HW0_TLS_IE,
1041 IMM16_X1_HW0_TLS_IE, IMM16_X0_HW1_TLS_IE, IMM16_X1_HW1_TLS_IE,
1042 IMM16_X0_HW2_TLS_IE, IMM16_X1_HW2_TLS_IE, IMM16_X0_HW3_TLS_IE,
1043 IMM16_X1_HW3_TLS_IE, IMM16_X0_HW0_LAST_TLS_IE,
1044 IMM16_X1_HW0_LAST_TLS_IE, IMM16_X0_HW1_LAST_TLS_IE,
1045 IMM16_X1_HW1_LAST_TLS_IE, IMM16_X0_HW2_LAST_TLS_IE,
1046 IMM16_X1_HW2_LAST_TLS_IE, TLS_DTPMOD64, TLS_DTPOFF64, TLS_TPOFF64,
1047 TLS_DTPMOD32, TLS_DTPOFF32, TLS_TPOFF32}
1048 * targets.c (bfd_elf32_tilegx_vec): Declare.
1049 (bfd_elf32_tilepro_vec): Declare.
1050 (bfd_elf64_tilegx_vec): Declare.
1051 (bfd_target_vector): Add bfd_elf32_tilegx_vec, bfd_elf32_tilepro_vec,
1052 and bfd_elf64_tilegx_vec.
1053 * cpu-tilegx.c: New file.
1054 * cpu-tilepro.c: New file.
1055 * elf32-tilepro.h: New file.
1056 * elf32-tilepro.c: New file.
1057 * elf32-tilegx.c: New file.
1058 * elf32-tilegx.h: New file.
1059 * elf64-tilegx.c: New file.
1060 * elf64-tilegx.h: New file.
1061 * elfxx-tilegx.c: New file.
1062 * elfxx-tilegx.h: New file.
1063
7686d77d
AM
10642011-06-13 Alan Modra <amodra@gmail.com>
1065
1066 * linker.c (bfd_link_hash_traverse): Follow warning symbol link.
1067 (_bfd_generic_link_write_global_symbol, fix_syms): Don't handle
1068 warning symbols here.
1069 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
1070 * elf32-arm.c (allocate_dynrelocs_for_symbol,
1071 elf32_arm_readonly_dynrelocs): Likewise.
1072 * elf32-bfin.c (bfin_discard_copies): Likewise.
1073 * elf32-cris.c (elf_cris_adjust_gotplt_to_got,
1074 elf_cris_discard_excess_dso_dynamics,
1075 elf_cris_discard_excess_program_dynamics): Likewise.
1076 * elf32-hppa.c (allocate_plt_static, allocate_dynrelocs,
1077 clobber_millicode_symbols, readonly_dynrelocs): Likewise.
1078 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
1079 * elf32-i386.c (elf_i386_allocate_dynrelocs,
1080 elf_i386_readonly_dynrelocs): Likewise.
1081 * elf32-lm32.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1082 * elf32-m32c.c (m32c_relax_plt_check, m32c_relax_plt_realloc): Likewise.
1083 * elf32-m32r.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1084 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
1085 * elf32-microblaze.c (allocate_dynrelocs): Likewise.
1086 * elf32-ppc.c (allocate_dynrelocs, maybe_set_textrel): Likewise.
1087 * elf32-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1088 * elf32-score.c (score_elf_sort_hash_table_f): Likewise.
1089 * elf32-score7.c (score_elf_sort_hash_table_f): Likewise.
1090 * elf32-sh.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1091 * elf32-tic6x.c (elf32_tic6x_allocate_dynrelocs,
1092 elf32_tic6x_readonly_dynrelocs): Likewise.
1093 * elf32-vax.c (elf_vax_discard_copies): Likewise.
1094 * elf32-xstormy16.c (xstormy16_relax_plt_check,
1095 xstormy16_relax_plt_realloc): Likewise.
1096 * elf32-xtensa.c (elf_xtensa_allocate_dynrelocs): Likewise.
1097 * elf64-alpha.c (elf64_alpha_output_extsym,
1098 elf64_alpha_calc_got_offsets_for_symbol,
1099 elf64_alpha_calc_dynrel_sizes, elf64_alpha_size_rela_got_1): Likewise.
1100 * elf64-hppa.c (elf64_hppa_mark_exported_functions,
1101 allocate_global_data_opd, elf64_hppa_mark_milli_and_exported_functions,
1102 elf_hppa_unmark_useless_dynamic_symbols,
1103 elf_hppa_remark_useless_dynamic_symbols): Likewise.
1104 * elf64-ppc.c (ppc64_elf_gc_mark_dynamic_ref, func_desc_adjust,
1105 adjust_opd_syms, adjust_toc_syms, allocate_dynrelocs,
1106 readonly_dynrelocs, merge_global_got, reallocate_got,
1107 undo_symbol_twiddle): Likewise.
1108 * elf64-s390.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1109 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
1110 * elf64-x86-64.c (elf_x86_64_allocate_dynrelocs,
1111 elf_x86_64_readonly_dynrelocs): Likewise.
1112 * elflink.c (elf_link_renumber_hash_table_dynsyms,
1113 elf_link_renumber_local_hash_table_dynsyms, _bfd_elf_export_symbol,
1114 _bfd_elf_link_find_version_dependencies,
1115 _bfd_elf_link_assign_sym_version, _bfd_elf_adjust_dynamic_symbol,
1116 _bfd_elf_link_sec_merge_syms, elf_adjust_dynstr_offsets,
1117 elf_collect_hash_codes, elf_collect_gnu_hash_codes,
1118 elf_renumber_gnu_hash_syms, elf_gc_sweep_symbol,
1119 elf_gc_propagate_vtable_entries_used,
1120 elf_gc_smash_unused_vtentry_relocs, bfd_elf_gc_mark_dynamic_ref_symbol,
1121 elf_gc_allocate_got_offsets): Likewise.
1122 * elfnn-ia64.c (elfNN_ia64_global_dyn_info_free,
1123 elfNN_ia64_global_dyn_sym_thunk): Likewise.
1124 * elfxx-mips.c (mips_elf_check_symbols, mips_elf_output_extsym,
1125 mips_elf_sort_hash_table_f, allocate_dynrelocs): Likewise.
1126 * elfxx-sparc.c (allocate_dynrelocs, readonly_dynrelocs): Likewise.
1127 * i386linux.c (linux_tally_symbols): Likewise.
1128 * m68klinux.c (linux_tally_symbols): Likewise.
1129 * sparclinux.c (linux_tally_symbols): Likewise.
1130 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
1131 * xcofflink.c (xcoff_post_gc_symbol): Likewise.
1132
1133 * elflink.c (elf_link_output_extsym): Make it a bfd_hash_traverse
1134 function. Update all callers.
1135 * aoutx.h (aout_link_write_other_symbol): Likewise.
1136 * pdp11.c (aout_link_write_other_symbol): Likewise.
1137 * cofflink.c (_bfd_coff_write_global_sym): Likewise.
1138 * ecoff.c (ecoff_link_write_external): Likewise.
1139 * xcofflink.c (xcoff_write_global_symbol): Likewise.
1140 * vms-alpha.c (alpha_vms_link_output_symbol): Likewise. Handle
1141 warning symbols.
1142 * ecoff.c (ecoff_link_hash_traverse): Delete.
1143 * coff-ppc.c (ppc_bfd_coff_final_link): Use bfd_hash_traverse for
1144 _bfd_coff_write_global_sym.
1145 * libcoff-in.h (_bfd_coff_write_global_sym): Update prototype.
1146 * libcoff.h: Regenerate.
1147
894891db
NC
11482011-06-10 Nick Clifton <nickc@redhat.com>
1149
1150 * elflink.c (_bfd_elf_link_create_dynamic_sections): If the
1151 backend does not provide a function for creating dynamic sections
1152 then fail.
1153 (bfd_elf_final_link): Issue a warning message if a dynamic section
1154 has the SHT_NOTE type.
1155 (bfd_elf_final_link): Do not look for dynamic strings in a section
1156 that does not have the SHT_STRTAB type or the name .dynstr.
1157 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Fail if the got
1158 section is not in the output binary.
1159 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Likewise.
1160
d17fe7b7
TG
11612011-06-09 Tristan Gingold <gingold@adacore.com>
1162
1163 * elfnn-ia64.c (elfNN_ia64_relax_section, elfNN_ia64_choose_gp)
1164 (elfNN_ia64_relocate_section, elfNN_vms_object_p): Remove trailing
1165 spaces.
1166
8076289e
TG
11672011-06-09 Tristan Gingold <gingold@adacore.com>
1168
1169 * bfd.c (bfd_get_sign_extend_vma): Handle aixcoff.
1170
ba85c43e
NC
11712011-06-09 Nick Clifton <nickc@redhat.com>
1172
1173 PR ld/12845
1174 * elf.c (_bfd_elf_init_private_section_data): Add an assertion
1175 that the output section has an allocated bfd_elf_section_data
1176 structure.
1177 * elfxx-mips.c (mips_elf_check_symbols): Do not create a stub for
1178 symbols in sections that have been removed by garbage collection.
1179
adc7571d
L
11802011-06-08 H.J. Lu <hongjiu.lu@intel.com>
1181
1182 * elf64-x86-64.c (elf_x86_64_check_relocs): Allow R_X86_64_64
1183 relocations in SEC_DEBUGGING sections when building shared
1184 libraries.
1185
24007750
L
11862011-06-08 H.J. Lu <hongjiu.lu@intel.com>
1187
1188 PR ld/12851
1189 * elflink.c (elf_gc_sweep): Don't check SHT_NOTE sections here.
1190 (bfd_elf_gc_sections): Also check SHT_NOTE sections.
1191
e79064fe
TG
11922011-06-08 Tristan Gingold <gingold@adacore.com>
1193
1194 * makefile.vms (OBJS): Add elfxx-ia64.obj
1195 Remove vax case.
1196
d3aeb6ee
AM
11972011-06-08 Alan Modra <amodra@gmail.com>
1198
1199 * aix386-core.c, * cisco-core.c, * hpux-core.c, * osf-core.c,
1200 * sco5-core.c: Init match_priority field.
1201
2a41f396
AM
12022011-06-08 Alan Modra <amodra@gmail.com>
1203
1204 * elflink.c (_bfd_elf_archive_symbol_lookup): Follow warning and
1205 indirect links here.
1206
1d859532
JB
12072011-06-07 Joel Brobecker <brobecker@adacore.com>
1208
1209 * irix-core.c (irix_core_vec): Add match_priority field.
1210
0aabe54e
AM
12112011-06-06 Alan Modra <amodra@gmail.com>
1212
1213 * targets.c (bfd_target): Make ar_max_namelen an unsigned char.
1214 Add match_priority.
1215 * configure.in: Bump bfd version.
1216 * elfcode.h (elf_object_p): Delete hacks preventing match of
1217 EM_NONE and ELFOSABI_NONE targets when a better match exists.
1218 * elfxx-target.h (elf_match_priority): Define and use.
1219 * format.c (bfd_check_format_matches): Use target match_priority
1220 to choose best of multiple matching targets. In cases with multiple
1221 matches rerun _bfd_check_format if we don't choose the last match.
1222 * aout-adobe.c, * aout-arm.c, * aout-target.h, * aout-tic30.c,
1223 * binary.c, * bout.c, * coff-alpha.c, * coff-i386.c, * coff-i860.c,
1224 * coff-i960.c, * coff-ia64.c, * coff-mips.c, * coff-or32.c,
1225 * coff-ppc.c, * coff-rs6000.c, * coff-sh.c, * coff-tic30.c,
1226 * coff-tic54x.c, * coff-x86_64.c, * coff64-rs6000.c, * coffcode.h,
1227 * i386msdos.c, * i386os9k.c, * ieee.c, * ihex.c, * mach-o-target.c,
1228 * mipsbsd.c, * mmo.c, * nlm-target.h, * oasys.c, * pdp11.c,
1229 * pe-mips.c, * pef.c, * plugin.c, * ppcboot.c, * som.c, * srec.c,
1230 * tekhex.c, * trad-core.c, * verilog.c, * versados.c, * vms-alpha.c,
1231 * vms-lib.c, * xsym.c: Init match_priority field.
1232 * configure: Regenerate.
1233 * bfd-in2.h: Regenerate.
1234
70b554c9
L
12352011-06-04 H.J. Lu <hongjiu.lu@intel.com>
1236
1237 PR ld/12842
1238 * elfcode.h (elf_object_p): Revert the last change.
1239
d50ec8a7
AM
12402011-06-04 Alan Modra <amodra@gmail.com>
1241
1242 * archures.c (bfd_arch_get_compatible): If one arch is unknown,
1243 return the other arch.
1244 * elfcode.h (elf_object_p): Allow explicit match to generic ELF
1245 target.
1246
164a5cb7
NC
12472011-06-03 Bertram Felgenhauer <bertram.felgenhauer@gmail.com>
1248
1249 PR ld/12682
1250 * hash.c (higher_primer_number): Add more, small, prime numbers.
1251 (bfd_hash_set_default_size): Likewise.
1252
cc643b88
NC
12532011-06-02 Nick Clifton <nickc@redhat.com>
1254
1255 * coff-mcore.c: Fix spelling typo.
1256 * coff-stgo32.c: Likewise.
1257 * elf32-arm.c: Likewise.
1258 * elf32-avr.c: Likewise.
1259 * elf-m68hc1x.c: Likewise.
1260 * elf32-mcore.c: Likewise.
1261 * elf32-mep.c: Likewise.
1262 * elf32-mt.c: Likewise.
1263 * elf32-ppc.c: Likewise.
1264 * elf32-xtensa.c: Likewise.
1265 * elf64-ppc.c: Likewise.
1266 * elfxx-mips.c: Likewise.
1267 * netbsd.h: Likewise.
1268 * nlmcode.h: Likewise.
1269 * vms-alpha.c: Likewise.
1270 * po/bfd.pot: Regenerate.
1271 * po/SRC-POTFILES.in: Regenerate.
1272
4c422395
DD
12732011-06-01 DJ Delorie <dj@redhat.com>
1274
1275 * config.bfd: Add bfd_elf32_rx_be_ns_vec.
1276 * target.c: Likewise.
1277 * configure.in: Likewise.
1278 * configure.in: Regenerate.
1279 * elf32-rx.c: Add elf32-rx-be-ns target.
1280 (rx_elf_object_p): Never allow the be-ns target by default,
1281 only allow it if the user requests it.
1282
4b819e1f
L
12832011-06-01 H.J. Lu <hongjiu.lu@intel.com>
1284
1285 * elf32-i386.c (elf_i386_size_dynamic_sections): Properly warn
1286 relocation in readonly section in a shared object.
1287 * elf64-x86-64.c (elf_x86_64_size_dynamic_sections): Likewise.
1288
74ce8de7
NC
12892011-05-31 Nick Clifton <nickc@redhat.com>
1290
1291 * archive.c (adjust_relative_path): Fix comment to prevent it
1292 corrupting the auto-generated bfd.h.
1293
63e1a0fc
PB
12942011-05-31 Paul Brook <paul@codesourcery.com>
1295
1296 * elf32-arm.c (elf32_arm_final_link_relocate): Only do bl conversion
1297 for known functions.
1298 (elf32_arm_swap_symbol_in): Only set ST_BRANCH_TO_ARM for function
1299 symbols.
1300
12352d3f
PB
13012011-05-31 Paul Brook <paul@codesourcery.com>
1302
1303 * elf32-arm.c (arm_stub_is_thumb): Add
1304 arm_stub_long_branch_v4t_thumb_tls_pic.
1305 (elf32_arm_final_link_relocate): TLS stubs are always ARM.
1306 Handle Thumb stubs.
1307
c4948609
NC
13082011-05-27 Nick Clifton <nickc@redhat.com>
1309
1310 PR binutils/12710
1311 * archive.c (_bfd_get_elt_at_filepos): Set correct error value if
1312 unable to read a file pointed to by an entry in a thin archive.
1313 (adjust_relative_path): Use lrealpath to canonicalize paths.
1314 Handle the case where the reference path is above the current
1315 path in the directory tree.
1316
6769d501
L
13172011-05-26 H.J. Lu <hongjiu.lu@intel.com>
1318
1319 PR ld/12809
1320 * elf64-x86-64.c (elf_x86_64_relocate_section): Handle
1321 R_X86_64_TPOFF64 in executable.
1322
2676a7d9
AM
13232011-05-26 Alan Modra <amodra@gmail.com>
1324
1325 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Remove most of comment.
1326 * elflink.c (_bfd_elf_symbol_refs_local_p): Expand
1327 local_protected comment.
1328
cbe79dfe
TG
13292011-05-25 Tristan Gingold <gingold@adacore.com>
1330
1331 * configure.in (bfd_elf32_ia64_big_vec, bfd_elf32_ia64_hpux_big_vec)
1332 (bfd_elf64_ia64_big_vec, bfd_elf64_ia64_hpux_big_vec)
1333 (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_vms_vec): Add elfxx-ia64.lo
1334 * Makefile.am (BFD64_BACKENDS): Add elfxx-ia64.lo
1335 (BFD64_BACKENDS_CFILES): Add elfxx-ia64.c
1336 (elf32-ia64.c): Created from elfnn-ia64.c
1337 (elf64-ia64.c): Likewise.
1338 * elfxx-ia64.h: New file.
1339 * elfxx-ia64.c: Split with elfnn-ia64.c. Keep only the following
1340 functions.Includes elfxx-ia64.h.
1341 (elfNN_ia64_reloc): Renames to ia64_elf_reloc. Adjust error message.
1342 (IA64_HOWTO): Adjust.
1343 (lookup_howto): Renames to ia64_elf_lookup_howto. Make it public.
1344 (elfNN_ia64_reloc_type_lookup): Renames to
1345 ia64_elf_reloc_type_lookup. Make it public. Adjust calls.
1346 (elfNN_ia64_reloc_name_lookup): Renames to
1347 ia64_elf_reloc_name_lookup. Make it public.
1348 (elfNN_ia64_relax_br): Renames to ia64_elf_relax_br. Make it public.
1349 (elfNN_ia64_relax_brl): Renames to ia64_elf_relax_brl. Make it
1350 public.
1351 (elfNN_ia64_relax_ldxmov): Renames to ia64_elf_relax_ldxmov.
1352 Move it and make it public. Move prototype to elfxx-ia64.h
1353 (elfNN_ia64_install_value): Renames to ia64_elf_install_value.
1354 Move prototype to elfxx-ia64.h
1355 * elfnn-ia64.c: New file, split from elfxx-ia64.c.
1356 (elfNN_ia64_info_to_howto): Adjust calls.
1357 (elfNN_ia64_relax_section): Adjust calls.
1358 (count_dyn_reloc): Fix typo.
1359 (elfNN_ia64_relocate_section): Adjust calls.
1360 (elfNN_ia64_finish_dynamic_symbol): Likewise.
1361 (bfd_elfNN_bfd_reloc_type_lookup)
1362 (bfd_elfNN_bfd_reloc_name_lookup): Adjust macros.
1363 * configure: Regenerate.
1364 * Makefile.in: Regenerate.
1365
1ce74905
DD
13662011-05-23 DJ Delorie <dj@redhat.com>
1367
1368 * elf32-rx.c (rx_elf_object_p): When reading an RX object in, undo
1369 the vma/lma swapping done in elf32_rx_modify_program_headers.
1370
997fbe36
NC
13712011-05-23 Nick Clifton <nickc@redhat.com>
1372
1373 * elf-m10300.c (mn10300_elf_mkobject): New function.
1374 (bfd_elf32_mkobject): Define.
1375
6061a67d
AM
13762011-05-23 Alan Modra <amodra@gmail.com>
1377
1378 * elf-bfd.h: Comment typo fix.
1379 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Delete. Replace with
1380 struct elf_dyn_relocs throughout.
1381 * elf64-ppc.c (struct ppc_dyn_relocs): Likewise.
1382
25f53a85
AM
13832011-05-23 Alan Modra <amodra@gmail.com>
1384
1385 * elf32-frv.c: Use info->callbacks->einfo throughout file in linker
1386 functions rather than warning callback or _bfd_error_handler.
1387 * elf32-ppc.c: Likewise.
1388 * elf64-ppc.c: Likewise.
1389 * elf32-ppc.c (ppc_elf_tls_optimize): Use %H in __tls_get_addr lost
1390 arg error.
1391 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
1392
6de6a7fe
AM
13932011-05-23 Alan Modra <amodra@gmail.com>
1394
1395 PR 12763
1396 * elf.c (assign_file_positions_for_load_sections): Set sh_offset for
1397 .tbss, and page align same for all SHT_NOBITS sections.
1398
86b2281f
AM
13992011-05-21 Alan Modra <amodra@gmail.com>
1400
1401 PR 12763
1402 * elf.c (_bfd_elf_make_section_from_shdr): Set up TLS section LMAs
1403 from PT_TLS header.
1404 (_bfd_elf_map_sections_to_segments): Don't create a final PT_LOAD
1405 segment if just for .tbss.
1406 (assign_file_positions_for_load_sections): Don't report "can't
1407 allocate in segment" errors for .tbss.
1408 (assign_file_positions_for_non_load_sections): Don't set p_filesz
1409 from SHT_NOBITS section filepos.
1410
4a732032
BS
14112011-05-20 Bernd Schmidt <bernds@codesourcery.com>
1412
1413 * elf32-tic6x.c (elf32_tic6x_howto_table): Add entries for
1414 R_C6000_PCR_H16 and R_C6000_PCR_L16.
1415 (elf32_tic6x_relocate_section): Handle them.
1416
dd98f8d2
NC
14172011-05-18 Nick Clifton <nickc@redhat.com>
1418
1419 PR ld/12761
1420 * elflink.c (elf_link_add_object_symbols): Process .gnu.warning
1421 sections when building shared libraries.
1422
9c489990
NC
14232011-05-18 Rafał Krypa <r.krypa@samsung.com>
1424
1425 PR ld/12778
1426 * elf32-arm.c (elf32_arm_gc_sweep_hook): Use the computed dynamic
1427 reloc pointer.
1428
5ccfed9b
TG
14292011-05-18 Tristan Gingold <gingold@adacore.com>
1430
1431 * xcofflink.c (xcoff_link_add_symbols): Handle C_DWARF symbols.
1432 (xcoff_sweep): Always keep dwarf sections.
1433 (xcoff_link_input_bfd): Handle dwarf symbols and sections.
1434
85645aed
TG
14352011-05-18 Tristan Gingold <gingold@adacore.com>
1436
1437 * libxcoff.h (struct xcoff_dwsect_name): New type.
1438 (XCOFF_DWSECT_NBR_NAMES): New macro.
1439 (xcoff_dwsect_names): Declare.
1440 * coffcode.h (sec_to_styp_flags): Handle xcoff dwarf sections.
1441 (styp_to_sec_flags): Ditto.
1442 (coff_new_section_hook): Ditto.
1443 (coff_slurp_symbol_table): Handle C_DWARF and C_INFO.
1444 * coff-rs6000.c (xcoff_dwsect_name): New variable.
1445
84bff83f
NC
14462011-05-17 Tomohiro Kashiwada <kikairoya@gmail.com>
1447
1448 PR ld/12759
1449 * elf32-rx.c (ignore_lma): New variable.
1450 (bfd_elf32_rx_set_target_flags): Add ignore_lma parameter.
1451 (rx_modify_program_headers): Only copy the LMA into the VMA if
1452 ignore_lma is true.
1453
16d96b5b
AM
14542011-05-17 Alan Modra <amodra@gmail.com>
1455
1456 PR ld/12760
1457 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Adjust "notice" call.
1458 * elflink.c (elf_link_add_object_symbols): Likewise.
1459 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1460
41e04eaa
AM
14612011-05-16 Alan Modra <amodra@gmail.com>
1462
1463 * linker.c (_bfd_generic_link_add_one_symbol): Don't init u.undef.weak.
1464
77c56f44
RS
14652011-05-15 Richard Sandiford <rdsandiford@googlemail.com>
1466
1467 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Record both local and
1468 global GOT entries for GOT_PAGE relocations against global symbols.
1469
2a616379
BS
14702011-05-13 Bernd Schmidt <bernds@codesourcery.com>
1471
1472 * config.bfd (tic6x-*-elf, tic6x-*-uclinux): New.
1473 (tic6x-*-*): Replaced by these.
1474 * elf32-tic6x.c (elf32_tic6x_set_osabi): New static function.
1475 (elf32_tic6x_check_relocs): Create dynamic sections if -shared.
1476 (elf_backend_relocs_compatible, elf_backend_post_process_headers):
1477 Define.
1478 (elf32_bed, TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, TARGET_BIG_SYM,
1479 TARGET_BIG_NAME, ELF_OSABI): Redefine twice, and include
1480 "elf32-target.h" two more times.
1481 * configure.in: Handle bfd_elf32_tic6x_linux_be_vec,
1482 bfd_elf32_tic6x_linux_le_vec, bfd_elf32_tic6x_elf_be_vec and
1483 bfd_elf32_tic6x_elf_le_vec.
1484 * configure: Regenerate.
1485
3ac5406b
JB
14862011-05-13 Jan Beulich <jbeulich@novell.com>
1487
1488 * config.bfd: Add targets x86_64-*-pe and x86_64-*-pep.
1489
335e41d4
JK
14902011-05-12 Jan Kratochvil <jan.kratochvil@redhat.com>
1491
1492 * config.in: Regenerated.
1493 * configure: Regenerated.
1494 * configure.in: New tests for HAVE_PRPSINFO_T_PR_PID,
1495 HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and
1496 HAVE_PSINFO32_T_PR_PID.
1497 * elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by
1498 HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID
1499 and HAVE_PSINFO32_T_PR_PID.
1500 * hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition.
1501
bc989cdc
JK
15022011-05-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1503
1504 * elf.c (elfcore_grok_psinfo): Initialize CORE_PID for both native and
1505 32bit psinfo.
1506 * elf32-ppc.c (ppc_elf_grok_psinfo): Initialize core_pid.
1507 * elf64-ppc.c (ppc64_elf_grok_psinfo): Likewise.
1508
fbd9ad90
PB
15092011-05-09 Paul Brook <paul@codesourcery.com>
1510
1511 * bfd-in.h (elf32_tic6x_fix_exidx_coverage): Add prototype.
1512 * bfd-in2.h: Regenerate.
1513 * elf32-tic6x.c: Include limits.h.
1514 (tic6x_unwind_edit_type, tic6x_unwind_table_edit,
1515 _tic6x_elf_section_data): New.
1516 (elf32_tic6x_section_data): Define.
1517 (elf32_tic6x_new_section_hook): Allocate target specific data.
1518 (elf32_tic6x_add_unwind_table_edit): New function.
1519 (get_tic6x_elf_section_data, elf32_tic6x_adjust_exidx_size,
1520 elf32_tic6x_insert_cantunwind_after, elf32_tic6x_add_low31,
1521 elf32_tic6x_copy_exidx_entry): New functions.
1522 (elf_backend_write_section): Define.
1523
1bce6bd8
PB
15242011-05-09 Paul Brook <paul@codesourcery.com>
1525
1526 * elf32-tic6x.c (is_tic6x_elf_unwind_section_name,
1527 elf32_tic6x_fake_sections): New functions.
1528 (elf_backend_fake_sections): Define.
1529
9cf0e282
PB
15302011-05-09 Paul Brook <paul@codesourcery.com>
1531
1532 * elf32-tic6x.c (elf32_tic6x_gc_mark_extra_sections): New function.
1533 (elf_backend_gc_mark_extra_sections): Define.
1534
730035f7
DK
15352011-05-07 Dave Korn <dave.korn.cygwin@gmail.com>
1536
1537 PR ld/12365
1538 * cofflink.c (bfd_coff_link_input_bfd): Check for and warn about
1539 references to symbols defined in discarded sections.
1540
88e59394
DK
15412011-05-07 Dave Korn <dave.korn.cygwin@gmail.com>
1542
1543 PR ld/12365
1544 * coffgen.c (coff_write_symbol): Assume input section is its own
1545 output section if output_section member not set.
1546 (coff_write_alien_symbol): Likewise.
1547
310fd250
L
15482011-05-07 H.J. Lu <hongjiu.lu@intel.com>
1549
1550 PR ld/12730
1551 * elf.c (_bfd_elf_section_offset): Check SEC_ELF_REVERSE_COPY.
1552
1553 * elflink.c (elf_link_input_bfd): Reverse copy .ctors/.dtors
41e04eaa 1554 sections if needed.
310fd250
L
1555
1556 * section.c (SEC_ELF_REVERSE_COPY): New.
1557 * bfd-in2.h: Regenerated.
1558
70778fc7
AM
15592011-05-07 Anders Kaseorg <andersk@ksplice.com>
1560
1561 PR 12739
1562 * libbfd.c (bfd_get_8, bfd_get_signed_8): Use const cast.
1563 * bfd-in2.h: Regenerate.
1564
8185f55c
TG
15652011-05-06 Tristan Gingold <gingold@adacore.com>
1566
1567 * vms-alpha.c (evax_section_flags): Remove SEC_IN_MEMORY.
1568 (_bfd_vms_slurp_egsd): Rename old_flags to vms_flags. Handle
1569 any code section. Add comments.
1570 (alpha_vms_object_p): Use void * instead of PTR.
1571 (alpha_vms_create_eisd_for_section): Fix test for setting DZRO.
1572 (build_module_list): Guard against no DST section. Add comments.
1573 (alpha_vms_link_output_symbol): Discard undefined symbols.
1574 (alpha_vms_get_section_contents): Simply memcpy if the section was
1575 already loaded. Fix typo.
1576 (vms_new_section_hook): Use void * instead of PTR.
1577 (vms_alpha_vec): Ditto.
1578
7d24e6a6
RS
15792011-05-06 Richard Sandiford <richard.sandiford@linaro.org>
1580
1581 * elf32-arm.c (cortex_a8_erratum_scan): If the stub is a Thumb
1582 branch to a PLT entry, redirect it to the PLT's Thumb entry point.
1583
c6a8f6e0
BS
15842011-05-05 Bernd Schmidt <bernds@codesourcery.com>
1585
1586 * elf32-tic6x.c (elf32_tic6x_final_link): New function.
1587 (elf32_tic6x_merge_attributes): Do not warn for PID or PIC
1588 mismatch. Choose the lower of the two values.
1589 (bfd_elf32_bfd_final_link): New macro.
1590
7f41df2e
TG
15912011-04-28 Tristan Gingold <gingold@adacore.com>
1592
1593 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Adjust for x_file.
1594 (bfd_xcoff_swap_aux_out): Ditto.
1595 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Ditto.
1596 (bfd_xcoff64_swap_aux_out): Ditto.
1597
9507a174
AM
15982011-05-04 Alan Modra <amodra@gmail.com>
1599
1600 PR ld/12727
1601 * elf64-ppc.c (ppc_build_one_stub <ppc_sub_plt_call>): Clear
1602 was_undefined on dot-symbols.
1603
2fbb87f6
PB
16042011-05-03 Paul Brook <paul@codesourcery.com>
1605
1606
1607 * elf32-tic6x.c (elf32_tic6x_howto_table,
1608 elf32_tic6x_howto_table_rel, (elf32_tic6x_gc_sweep_hook,
1609 elf32_tic6x_relocate_section, elf32_tic6x_check_relocs):
1610 Add R_C6000_EHTYPE.
1611
9d4057ee
AM
16122011-05-01 Alan Modra <amodra@gmail.com>
1613
1614 PR ld/12718
1615 * elf32-i386.c (elf_i386_check_relocs): Ensure dynobj set before
1616 creating ifunc sections.
1617 * elf64-x86-64.c (elf_x86_64_check_relocs): Likewise.
1618
71e7aa7d
L
16192011-04-30 H.J. Lu <hongjiu.lu@intel.com>
1620
1621 * elf64-x86-64.c (elf_x86_64_merge_symbol): Correct parameter
1622 names.
1623
b5dee4ea
TT
16242011-04-28 Tom Tromey <tromey@redhat.com>
1625
1626 * bfdio.c (memory_bstat): Pass correct size to memset.
1627
e4c93b56
MF
16282011-04-28 Mike Frysinger <vapier@gentoo.org>
1629
1630 * dwarf2.c (dwarf_debug_sections): Mark const.
1631 * elf.c (special_sections): Likewise.
1632 * libbfd-in.h (dwarf_debug_sections): Likewise.
1633 * libbfd.h: Regenerate.
1634
72b016b4
NC
16352011-04-26 Kai Tietz <ktietz@redhat.com>
1636
1637 * coffcode.h (sec_to_styp_flags): Allow linkonce for
1638 debugging sections.
1639
4964e065
TG
16402011-04-26 Tristan Gingold <gingold@adacore.com>
1641
1642 * coff64-rs6000.c: Convert to ISO-C. Remove PARAMS and PTR macros.
1643
35ed3f94
AM
16442011-04-24 Alan Modra <amodra@gmail.com>
1645
1646 PR ld/12365
1647 PR ld/12696
1648 * coff-aux.c (coff_m68k_aux_link_add_one_symbol): Update "notice" call.
1649 * linker.c (_bfd_link_hash_newfunc): Clear bitfields.
1650 (_bfd_generic_link_add_one_symbol): Update "notice" call.
1651 * elflink.c (_bfd_elf_merge_symbol): Don't skip weak redefs when
1652 it is a redef of an IR symbol in a real BFD.
1653
b70321a2
L
16542011-04-22 H.J. Lu <hongjiu.lu@intel.com>
1655
1656 * elf32-i386.c (elf_i386_readonly_dynrelocs): Warn relocation
1657 in readonly section in a shared object.
1658 (elf_i386_size_dynamic_sections): Likewise.
1659 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
1660 (elf_x86_64_size_dynamic_sections): Likewise.
1661
aa715242
L
16622011-04-21 H.J. Lu <hongjiu.lu@intel.com>
1663
1664 PR ld/12694
1665 * elf32-i386.c (elf_i386_readonly_dynrelocs): Skip local IFUNC
1666 symbols.
1667 * elf64-x86-64.c (elf_x86_64_readonly_dynrelocs): Likewise.
1668
f6df62c8
L
16692011-04-21 H.J. Lu <hongjiu.lu@intel.com>
1670
1671 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Return false
1672 on dynamic symbol error.
1673 * elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Likewise.
1674
4bbd5a24
TG
16752011-04-20 Tristan Gingold <gingold@adacore.com>
1676
1677 * config.bfd (alpha*-*-*vms*, ia64*-*-*vms*): Define targ_selvecs.
1678
8ad17b3a
AM
16792011-04-20 Alan Modra <amodra@gmail.com>
1680
1681 * hash.c (bfd_default_hash_table_size): Make it an unsigned long.
1682 (bfd_hash_table_init_n): Overflow checking.
1683 (bfd_hash_set_default_size): Return current size. Take unsigned long
1684 arg. Add 65537 to hash_size primes.
1685 * bfd-in.h (bfd_hash_set_default_size): Update prototype.
1686 * bfd-in2.h: Regenerate.
1687
1b0df531
JK
16882011-04-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1689
1690 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): Fix +1 overrun of
1691 memmove elements.
1692
595213d4
AM
16932011-04-20 Alan Modra <amodra@gmail.com>
1694
9e6619e2
AM
1695 * libbfd.c (bfd_log2): Do return rounded up value.
1696 * elflink.c (bfd_elf_size_dynsym_hash_dynstr): Replace bfd_log2
1697 call with expanded old round down version of the function.
1698
595213d4
AM
1699 * archive.c (_bfd_get_elt_at_filepos): Don't release n_nfd.
1700 * elflink.c (elf_link_add_object_symbols): Delete redundant code.
1701
02d00247
AM
17022011-04-20 Alan Modra <amodra@gmail.com>
1703
1704 PR ld/12365
1705 * elfcode.h (elf_slurp_symbol_table): Put common plugin IR symbols
1706 in their own common section.
1707 * elflink.c (elf_link_add_object_symbols): Likewise.
1708 * linker.c (generic_link_check_archive_element): Don't lose flags
1709 if common section is pre-existing.
1710 (_bfd_generic_link_add_one_symbol): Likewise.
1711
24f58f47
AM
17122011-04-20 Alan Modra <amodra@gmail.com>
1713
1714 PR ld/12365
1715 * elflink.c (_bfd_elf_merge_symbol): Update multiple_common calls.
1716 * linker.c (_bfd_generic_link_add_one_symbol): Likewise. Call
1717 multiple_definition regardless of allow_multiple_definition.
1718 * simple.c (simple_dummy_multiple_definition): Update.
1719 * xcofflink.c (xcoff_link_add_symbols): Update multiple_definition
1720 calls.
1721
417236c0
TG
17222011-04-18 Tristan Gingold <gingold@adacore.com>
1723
1724 * coff-rs6000.c: Convert to ISO-C. Remove PARAMS macro.
1725
901f1d17
AM
17262011-04-18 Alan Modra <amodra@gmail.com>
1727
1728 PR ld/12365
1729 PR ld/12672
1730 * bfd.c (BFD_PLUGIN): Define.
1731 (BFD_FLAGS_SAVED, BFD_FLAGS_FOR_BFD_USE_MASK): Add BFD_PLUGIN.
1732 * bfd-in2.h: Regenerate.
1733 * elflink.c (elf_link_output_extsym): Strip undefined plugin syms.
1734 * opncls.c (bfd_make_readable): Don't lose original bfd flags.
1735
63524580
JK
17362011-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
1737
1738 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Do not check for
1739 SEC_LOAD.
1740
e21e5835
NC
17412011-04-15 Sergio Durigan Junior <sergiodj@redhat.com>
1742
1743 * elf-bfd.h (struct sdt_note): New struct.
1744 (struct elf_obj_tdata) <sdt_note_head>: New field.
1745 * elf.c (elfobj_grok_stapsdt_note_1): New function.
1746 (elfobj_grok_stapsdt_note): Likewise.
1747 (elf_parse_notes): Added code to treat SystemTap note
1748 sections.
1749
6452a567
RH
17502011-04-12 Richard Henderson <rth@redhat.com>
1751
1752 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Do not
1753 exclude empty .got sections.
1754
2a750708
L
17552011-04-11 H.J. Lu <hongjiu.lu@intel.com>
1756
1757 * elf32-i386.c (elf_i386_reloc_type_lookup): Fix the out of bound
1758 array access for BFD_RELOC_386_IRELATIVE.
1759
2123f9ad
BS
17602011-04-11 Bernd Schmidt <bernds@codesourcery.com>
1761
1762 * elf32-tic6x.c (elf32_tic6x_check_relocs): Initialize pc_count field.
1763
f64b2e8d
NC
17642011-04-11 Mark Wielaard <mjw@redhat.com>
1765
1766 PR 10549
1767 * elf-bfd.h (has_ifunc_symbols): Renamed to has_gnu_symbols.
1768 (has_gnu_symbols): Renamed from has_ifunc_symbols.
1769 * elf.c (_bfd_elf_set_osabi): Use new has_gnu_symbols name.
1770 * elf32-arm.c (elf32_arm_add_symbol_hook): Set has_gnu_symbols
1771 also if STB_GNU_UNIQUE symbol binding was seen.
1772 * elf32-i386.c (elf_i386_add_symbol_hook): Likewise.
1773 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1774 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1775 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1776 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1777 * elf64-x86-64.c (elf_x86_64_add_symbol_hook): Likewise.
1778
e57278ef
AM
17792011-04-11 Alan Modra <amodra@gmail.com>
1780
1781 * bfd-in.h (bfd_get_section_limit): Don't use rawsize with output
1782 sections.
1783 * libbfd.c (_bfd_generic_get_section_contents): Likewise.
1784 (_bfd_generic_get_section_contents_in_window): Likewise.
1785 * section.c (bfd_get_section_contents): Likewise.
1786 * compress.c (bfd_get_full_section_contents): Likewise.
1787 * elf32-rx.c (rx_final_link): Ignore rawsize.
1788 * elf32-microblaze.c (microblaze_elf_relocate_section): Use correct
1789 bfd with bfd_get_section_limit.
1790 * elfxx-ia64.c (elfNN_ia64_choose_gp): Add "final" parameter. Use
1791 os->size during final link. Update callers.
1792 * bfd-in2.h: Regenerate.
1793
e2ece73c
RS
17942011-04-10 Richard Sandiford <rdsandiford@googlemail.com>
1795
1796 PR ld/12637
1797 * elfxx-mips.c (mips_elf_merge_got_with): Use arg->global_count
1798 as the number of global entries when merging with the primary GOT.
1799
9f973f28
L
18002011-04-09 H.J. Lu <hongjiu.lu@intel.com>
1801
1802 * elf32-i386.c: Update copyright year.
1803 * elf64-x86-64.c: Likewise.
1804
21e68916
KT
18052011-04-09 Kai Tietz <ktietz@redhat.com>
1806
1807 * peXXigen.c (_bfd_XXi_final_link_postscripte): Sort pdata in temporary
1808 buffer and use rawsize for sorting.
1809 * coffcode.h (coff_compute_section_file_positions): Set rawsize
1810 before doing alignment.
1811
62d78908
L
18122011-04-09 H.J. Lu <hongjiu.lu@intel.com>
1813
1814 * elf32-i386.c (elf_i386_relocate_section): Return relocation
1815 error on unsupported relocation.
1816 * elf64-x86-64.c (elf_x86_64_relocate_section): Likewise.
1817
2351cae0
L
18182011-04-09 H.J. Lu <hongjiu.lu@intel.com>
1819
1820 PR binutils/12657
1821 * hosts/x86-64linux.h (elf_prstatus32): Replace __pid_t with
1822 pid_t.
1823
959b0961
L
18242011-04-08 H.J. Lu <hongjiu.lu@intel.com>
1825
1826 PR ld/12654
1827 * elf32-i386.c (elf_i386_relocate_section): Check !executable
1828 instead of shared for R_386_TLS_LDO_32.
1829
33b54431
TG
18302011-04-08 Tristan Gingold <gingold@adacore.com>
1831
1832 * Makefile.am (SOURCE_HFILES): Remove xcoff-target.h
1833 * coff-pmac: Remove
1834 * xcoff-target.h: Remove
1835 * Makefile.in: Regenerate.
1836
5d8e6b4d
CC
18372011-04-07 Cary Coutant <ccoutant@google.com>
1838
1839 * dwarf2.c (scan_unit_for_symbols): Check for DW_AT_specification.
1840
44e87ece 18412011-04-07 Paul Brook <paul@codesourcery.com>
33b54431 1842
44e87ece
PB
1843 * elf32-tic6x.c (elf32_tic6x_howto_table): R_C6000_PREL31 is
1844 pc-relative.
1845 (elf32_tic6x_howto_table_rel): Ditto.
1846 (elf32_tic6x_relocate_section): Implement R_C6000_PREL31.
1847 (elf32_tic6x_check_relocs): Ditto.
1848
8c5fc800
JM
18492011-04-06 Joseph Myers <joseph@codesourcery.com>
1850
1851 * config.bfd (thumb-*-oabi): Don't handle in list of obsolete
1852 targets.
1853 (strongarm*, thumb*, xscale*): Remove architectures.
1854 (strongarm-*-kaos*, thumb-*-coff, thumb-*-elf, thumb-epoc-pe*,
1855 thumb-*-pe*, strongarm-*-elf, strongarm-*-coff, xscale-*-elf,
1856 xscale-*-coff): Remove targets.
1857
6f8027ae
TG
18582011-04-01 Tristan Gingold <gingold@adacore.com>
1859
1860 * elfxx-ia64.c: include bfd_stdint.h
1861
c89ce65c
JK
18622011-03-31 Jan Kratochvil <jan.kratochvil@redhat.com>
1863
1864 * elf32-tic6x.c (elf32_tic6x_relocate_section): Remove unused variable
1865 dynobj and its initialization.
1866
545f57c6
TG
18672011-03-31 Tristan Gingold <gingold@adacore.com>
1868
1869 * makefile.vms (DEFS): Add HAVE_bfd_elf64_ia64_vms_vec.
1870 * configure.com: Set BFD_HOST_64BIT_LONG_LONG and
1871 BFD_HOST_LONG_LONG to 1.
1872
083faca9
TG
18732011-03-31 Tristan Gingold <gingold@adacore.com>
1874
1875 * vms-alpha.c (vms_get_remaining_object_record): Fix dec-c warning.
1876 (_bfd_vms_write_etir): Ditto.
1877 (_bfd_vms_slurp_etir): Avoid to use intptr_t
1878 * configure.com: Generate bfd_stdint.h
1879
ac145307
BS
18802011-03-31 Bernd Schmidt <bernds@codesourcery.com>
1881
1882 * elf32-tic6x.h (struct elf32_tic6x_params): New.
1883 (elf32_tic6x_setup): Declare.
1884 * elf32-tic6x.c: Include <limits.h>.
1885 (ELF_DYNAMIC_LINKER, DEFAULT_STACK_SIZE, PLT_ENTRY_SIZE): Define.
1886 (struct elf32_tic6x_link_hash_table, struct elf32_link_hash_entry):
1887 New structures.
1888 (elf32_tic6x_link_hash_table, is_tic6x_elf): New macros.
1889 (tic6x_elf_scom_section, tic6x_elf_scom_symbol,
1890 tic6x_elf_scom_symbol_ptr): New static variables.
1891 (elf32_tic6x_howto_table, elf32_tic6x_howto_table_rel,
1892 elf32_tic6x_reloc_map): Add R_C6000_JUMP_SLOT, R_C6000_EHTYPE,
1893 R_C6000_PCR_H16 and R_C6000_PCR_L16.
1894 (elf32_tic6x_link_hash_newfunc, elf32_tic6x_link_hash_table_create,
1895 elf32_tic6x_link_hash_table_free, elf32_tic6x_setup,
1896 elf32_tic6x_using_dsbt, elf32_tic6x_install_rela,
1897 elf32_tic6x_create_dynamic_sections, elf32_tic6x_make_got_dynreloc,
1898 elf32_tic6x_finish_dynamic_symbol, elf32_tic6x_gc_sweep_hook,
1899 elf32_tic6x_adjust_dynamic_symbol): New static functions.
1900 (elf32_tic6x_relocate_section): For R_C6000_PCR_S21, convert branches
1901 to weak symbols as required by the ABI.
1902 Handle GOT and DSBT_INDEX relocs, and copy relocs to the output file
1903 as needed when generating DSBT output.
1904 (elf32_tic6x_check_relocs, elf32_tic6x_add_symbol_hook,
1905 elf32_tic6x_symbol_processing, elf32_tic6x_section_from_bfd_section,
1906 elf32_tic6x_allocate_dynrelocs, elf32_tic6x_size_dynamic_sections,
1907 elf32_tic6x_always_size_sections, elf32_tic6x_modify_program_headers,
1908 elf32_tic6x_finish_dynamic_sections, elf32_tic6x_plt_sym_val,
1909 elf32_tic6x_copy_private_data, elf32_tic6x_link_omit_section_dynsym):
1910 New static functions.
1911 (ELF_MAXPAGESIZE): Define to 0x1000.
1912 (bfd_elf32_bfd_copy_private_bfd_data,
1913 bfd_elf32_bfd_link_hash_table_create,
1914 bfd_elf32_bfd_link_hash_table_free, elf_backend_can_refcount,
1915 elf_backend_want_got_plt, elf_backend_want_dynbss,
1916 elf_backend_plt_readonly, elf_backend_got_header_size,
1917 elf_backend_gc_sweep_hook, elf_backend_modify_program_headers,
1918 elf_backend_create_dynamic_sections, elf_backend_adjust_dynamic_symbol,
1919 elf_backend_check_relocs, elf_backend_add_symbol_hook,
1920 elf_backend_symbol_processing, elf_backend_link_output_symbol_hook,
1921 elf_backend_section_from_bfd_section,
1922 elf_backend_finish_dynamic_symbol, elf_backend_always_size_sections,
1923 elf32_tic6x_size_dynamic_sections, elf_backend_finish_dynamic_sections,
1924 elf_backend_omit_section_dynsym, elf_backend_plt_sym_val): Define.
1925
1926 * bfd/reloc.c (BFD_RELOC_C6000_JUMP_SLOT, BFD_RELOC_C6000_EHTYPE,
1927 BFD_RELOC_C6000_PCR_H16, BFD_RELOC_C6000_PCR_S16): Add.
1928 * bfd/bfd-in2.h: Regenerate.
1929 * bfd/libbfd.h: Regenerate.
1930 * config.bfd: Accept tic6x-*-* instead of tic6x-*-elf.
1931
53dd76d3
TG
19322011-03-31 Tristan Gingold <gingold@adacore.com>
1933
1934 * coffcode.h (coff_slurp_symbol_table): Silently discard C_NULL
1935 entry on xcoff when value is C_NULL_VALUE.
1936
19372011-03-31 Tristan Gingold <gingold@adacore.com>
2040caca
TG
1938
1939 * libcoff-in.h (exec_hdr): Remove.
1940 * libcoff.h: Regenerate.
1941
3a294fa7
NC
19422011-03-30 Nick Clifton <nickc@redhat.com>
1943
1944 * po/da.po: Updated Danish translation.
1945
e117360e
RH
19462011-03-29 Richard Henderson <rth@redhat.com>
1947
1948 * elf64-alpha.c (elf64_alpha_gc_mark_hook): New.
1949 (elf64_alpha_gc_sweep_hook): New.
1950 (elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): New.
1951 (elf_backend_can_gc_sections): New.
1952
5b806d27
NC
19532011-03-26 John Marino <binutils@marino.st>
1954
1955 * config.bfd: Add x86_64-*-dragonfly*, fix i386-*-dragonfly*.
1956 * configure.in: Delete unused bfd_elf32_i386_dragonfly_vec.
1957 * configure: Regenerate.
1958
b42adabf
NC
19592011-03-25 Michael Snyder <msnyder@vmware.com>
1960
1961 * coffcode.h (coff_set_alignment_hook): Check return of bfd_seek.
1962
a283ff93
TG
19632011-03-25 Tristan Gingold <gingold@adacore.com>
1964
1965 * vms-alpha.c (_bfd_vms_find_nearest_dst_line): Allow the use
1966 of find_nearest_line on object files.
1967
cf6b8767
TG
19682011-03-25 Tristan Gingold <gingold@adacore.com>
1969
1970 * vms-alpha.c (evax_section_flags): Make $CODE$ section read-only.
1971 Minor reordering.
1972 (alpha_vms_create_eisd_for_section): Make code sections read-only.
1973
663a1470
AM
19742011-03-24 Alan Modra <amodra@gmail.com>
1975
1976 * elf32-ppc.c (ppc_elf_tls_optimize): Catch more cases where
1977 old-style __tls_get_addr calls without marker relocs don't match
1978 their arg setup insn one for one. If such mismatches are found
1979 report the reloc and don't do any tls optimization.
1980 * elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
1981
dc80f6ae
EW
19822011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
1983
1984 * bfd-in2.h: Regenerate.
1985
8cc66334
EW
19862011-03-22 Eric B. Weddington <eric.weddington@atmel.com>
1987
1988 * archures.c: Add AVR XMEGA architecture information.
1989 * cpu-avr.c (arch_info_struct): Likewise.
1990 * elf32-avr.c (bfd_elf_avr_final_write_processing): Likewise.
1991 (elf32_avr_object_p): Likewise.
1992
34e77a92
RS
19932011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
1994
1995 * reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
1996 * bfd-in2.h: Regenerate.
1997 * elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
1998 to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
1999 entry.
2000 (elf32_arm_howto_from_type): Update accordingly.
2001 (elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
2002 (elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
2003 (arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
2004 with an extra noncall_refcount field.
2005 (arm_local_iplt_info): New structure.
2006 (elf_arm_obj_tdata): Add local_iplt.
2007 (elf32_arm_local_iplt): New accessor macro.
2008 (elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
2009 plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
2010 Change tls_type to a bitfield and add is_iplt.
2011 (elf32_arm_link_hash_newfunc): Update accordingly.
2012 (elf32_arm_allocate_local_sym_info): New function.
2013 (elf32_arm_create_local_iplt): Likewise.
2014 (elf32_arm_get_plt_info): Likewise.
2015 (elf32_arm_plt_needs_thumb_stub_p): Likewise.
2016 (elf32_arm_get_local_dynreloc_list): Likewise.
2017 (create_ifunc_sections): Likewise.
2018 (elf32_arm_copy_indirect_symbol): Update after the changes to
2019 elf32_arm_link_hash_entry. Assert the is_iplt has not yet been set.
2020 (arm_type_of_stub): Add an st_type argument. Use elf32_arm_get_plt_info
2021 to get PLT information. Assert that all STT_GNU_IFUNC references
2022 are turned into PLT references.
2023 (arm_build_one_stub): Pass the symbol type to
2024 elf32_arm_final_link_relocate.
2025 (elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
2026 (elf32_arm_allocate_irelocs): New function.
2027 (elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
2028 all R_ARM_IRELATIVE.
2029 (elf32_arm_allocate_plt_entry): New function.
2030 (elf32_arm_populate_plt_entry): Likewise.
2031 (elf32_arm_final_link_relocate): Add an st_type parameter.
2032 Set srelgot to null for static objects. Use separate variables
2033 to record which st_value and st_type should be used when generating
2034 a dynamic relocation. Use elf32_arm_get_plt_info to find the
2035 symbol's PLT information, setting has_iplt_entry, splt,
2036 plt_offset and gotplt_offset accordingly. Check whether
2037 STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
2038 the relocation target accordingly. Broaden assert to include
2039 .iplts. Don't set sreloc for static relocations. Assert that
2040 we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
2041 and R_ARM_ABS32_NOI. Generate R_ARM_IRELATIVE relocations instead
2042 of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
2043 symbol. Pass the symbol type to arm_type_of_stub. Conditionally
2044 resolve GOT references to the .igot.plt entry.
2045 (elf32_arm_relocate_section): Update the call to
2046 elf32_arm_final_link_relocate.
2047 (elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
2048 information. Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
2049 relocations in shared libraries and relocatable executables.
2050 Count non-call PLT references. Use elf32_arm_get_local_dynreloc_list
2051 to get the list of dynamic relocations for a local symbol.
2052 (elf32_arm_check_relocs): Always create ifunc sections. Set isym
2053 at the same time as setting h. Use elf32_arm_allocate_local_sym_info
2054 to allocate local symbol information. Treat R_ARM_REL32 and
2055 R_ARM_REL32_NOI as call relocations in shared libraries and
2056 relocatable executables. Record PLT information for local
2057 STT_GNU_IFUNC functions as well as global functions. Count
2058 non-call PLT references. Use elf32_arm_get_local_dynreloc_list
2059 to get the list of dynamic relocations for a local symbol.
2060 (elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
2061 Don't remove STT_GNU_IFUNC PLTs unless all references have been
2062 removed. Update after the changes to elf32_arm_link_hash_entry.
2063 (allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
2064 entries should live in .plt or .iplt. Check whether the .igot.plt
2065 and .got entries can be combined. Use elf32_arm_allocate_plt_entry
2066 to allocate .plt and .(i)got.plt entries. Detect which .got
2067 entries will need R_ARM_IRELATIVE relocations and use
2068 elf32_arm_allocate_irelocs to allocate them. Likewise other
2069 non-.got dynamic relocations.
2070 (elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
2071 and dynamic relocations for local STT_GNU_IFUNC symbols.
2072 Check whether the .igot.plt and .got entries can be combined.
2073 Detect which .got entries will need R_ARM_IRELATIVE relocations
2074 and use elf32_arm_allocate_irelocs to allocate them. Use stashed
2075 section pointers intead of strcmp checks. Handle iplt and igotplt.
2076 (elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
2077 to fill in .plt, .got.plt and .rel(a).plt entries. Point
2078 STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
2079 resolve to it.
2080 (elf32_arm_output_plt_map_1): New function, split out from
2081 elf32_arm_output_plt_map. Handle .iplt entries. Use
2082 elf32_arm_plt_needs_thumb_stub_p.
2083 (elf32_arm_output_plt_map): Call it.
2084 (elf32_arm_output_arch_local_syms): Add mapping symbols for
2085 local .iplt entries.
2086 (elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
2087 (elf32_arm_swap_symbol_out): Likewise.
2088 (elf32_arm_add_symbol_hook): New function.
2089 (elf_backend_add_symbol_hook): Define for all targets.
2090
35fc36a8
RS
20912011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2092
2093 * elf-bfd.h (elf_link_hash_entry): Add target_internal.
2094 * elf.c (swap_out_syms): Set st_target_internal for each
2095 Elf_Internal_Sym.
2096 * elfcode.h (elf_swap_symbol_in): Likewise.
2097 * elf32-i370.c (i370_elf_finish_dynamic_sections): Likewise.
2098 * elf32-sh-symbian.c (sh_symbian_relocate_section): Likewise.
2099 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
2100 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Likewise.
2101 * elflink.c (elf_link_output_extsym): Likewise.
2102 (bfd_elf_final_link): Likewise.
2103 (elf_link_add_object_symbols): Copy st_target_internal
2104 to the hash table if we see a definition.
2105 (_bfd_elf_copy_link_hash_symbol_type): Copy target_internal.
2106 * elf32-arm.c (elf32_arm_stub_hash_entry): Replace st_type with
2107 a branch_type field.
2108 (a8_erratum_fix, a8_erratum_reloc): Likewise.
2109 (arm_type_of_stub): Replace actual_st_type with an
2110 actual_branch_type parameter.
2111 (arm_build_one_stub): Use branch types rather than st_types to
2112 determine the type of branch.
2113 (cortex_a8_erratum_scan): Likewise.
2114 (elf32_arm_size_stubs): Likewise.
2115 (bfd_elf32_arm_process_before_allocation): Likewise.
2116 (allocate_dynrelocs_for_symbol): Likewise.
2117 (elf32_arm_finish_dynamic_sections): Likewise.
2118 (elf32_arm_final_link_relocate): Replace sym_flags parameter with
2119 a branch_type parameter.
2120 (elf32_arm_relocate_section): Update call accordingly.
2121 (elf32_arm_adjust_dynamic_symbol): Don't check STT_ARM_TFUNC.
2122 (elf32_arm_output_map_sym): Initialize st_target_internal.
2123 (elf32_arm_output_stub_sym): Likewise.
2124 (elf32_arm_symbol_processing): Delete.
2125 (elf32_arm_swap_symbol_in): Convert STT_ARM_TFUNCs into STT_FUNCs.
2126 Use st_target_internal to record the branch type.
2127 (elf32_arm_swap_symbol_out): Use st_target_internal to test for
2128 Thumb functions.
2129 (elf32_arm_is_function_type): Delete.
2130 (elf_backend_symbol_processing): Likewise.
2131 (elf_backend_is_function_type): Likewise.
2132
cbc704f3
RS
21332011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2134
2135 * elf32-arm.c (elf32_arm_check_relocs): Always assign a dynobj.
2136 (elf32_arm_finish_dynamic_sections): Move sgot != NULL assertion
2137 into the PLT block.
2138
f6e32f6d
RS
21392011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2140
2141 * elf32-arm.c (elf32_arm_check_relocs): Use call_reloc_p,
2142 may_need_local_target_p and may_become_dynamic_p to classify
2143 the relocation type. Don't check info->symbolic or h->def_regular
2144 when deciding whether to record a potential dynamic reloc.
2145 Don't treat potential dynamic relocs as PLT references.
2146 (elf32_arm_gc_sweep_hook): Update to match. Assert that we don't
2147 try to make the PLT reference count go negative.
2148
b436d854
RS
21492011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2150
2151 * elf32-arm.c (elf32_arm_final_link_relocate): Always fill in the
2152 GOT entry here, rather than leaving it to finish_dynamic_symbol.
2153 Only create a dynamic relocation for local references if
2154 info->shared.
2155 (allocate_dynrelocs_for_symbol): Update dynamic relocation
2156 allocation accordingly.
2157 (elf32_arm_finish_dynamic_symbol): Don't initialise the GOT entry here.
2158
47beaa6a
RS
21592011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
2160
2161 * elf32-arm.c (elf32_arm_allocate_dynrelocs): New function.
2162 (elf32_arm_add_dynreloc): Likewise.
2163 (elf32_arm_adjust_dynamic_symbol): Use elf32_arm_allocate_dynrelocs
2164 to allocate dynamic relocations.
2165 (elf32_arm_size_dynamic_sections): Likewise.
2166 (allocate_dynrelocs): Likewise. Rename to
2167 allocate_dynrelocs_for_symbol.
2168 (elf32_arm_final_link_relocate): Use elf32_arm_add_dynreloc to
2169 create dynamic relocations.
2170 (elf32_arm_finish_dynamic_symbol): Likewise.
2171
52bc799a
L
21722011-03-12 H.J. Lu <hongjiu.lu@intel.com>
2173
2174 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
2175 x32 GD->IE and GD->LE transitions.
2176 (elf_x86_64_relocate_section): Supprt TLS x32 GD->IE, GD->LE
2177 and LD->LE transitions.
2178
e11840f9
AM
21792011-03-10 Alan Modra <amodra@gmail.com>
2180
2181 * elf64-ppc.c (ppc64_elf_relocate_section): Provide section/offset
2182 for LO_DS error message and correct multiple.
2183
aa374f67
AM
21842011-03-10 Alan Modra <amodra@gmail.com>
2185
2186 * elf64-ppc.c (bfd_elf64_bfd_link_just_syms): Define.
2187 (ppc64_elf_link_just_syms): New function.
2188 (opd_entry_value): Don't assume big-endian host.
2189 (get_r2off): New function.
2190 (ppc_build_one_stub, ppc_size_one_stub): Use it here.
2191
d59a60e9
MS
21922011-03-06 Michael Snyder <msnyder@vmware.com>
2193
4281caad
MS
2194 * compress.c (bfd_compress_section_contents): Check for out of mem.
2195
17672001
MS
2196 * elf64-x86-64.c (elf_x86_64_relocate_section): Document
2197 that case statement falls through intentionally.
2198
d59a60e9
MS
2199 * elf32-i386.c (elf_i386_relocate_section): Document fall through.
2200
0e29e6e8
AM
22012011-03-04 Alan Modra <amodra@gmail.com>
2202
2203 * archive.c (bsd_write_armap): Don't call stat in deterministic
2204 mode, and don't use st_mtime if stat returns error.
2205
eb00922a
MS
22062011-03-03 Michael Snyder <msnyder@vmware.com>
2207
08c13595
MS
2208 * elf64-x86-64.c (elf_x86_64_relocate_section): Remove dead code.
2209
d543c50d
MS
2210 * coff-x86_64.c (coff_amd64_rtype_to_howto): Fencepost error.
2211
c38eb2a6
MS
2212 * aoutx.h (aout_final_link): Use sizeof int not sizeof int*.
2213 (aout_link_write_other_symbol): Missing break statement.
2214
8ecc1f20
MS
2215 * dwarf2.c (scan_unit_for_symbols): Stop memory leak.
2216
eb00922a
MS
2217 * archive.c (_bfd_slurp_extended_name_table): Fail if bfd_seek fails.
2218
4a4c5f25
L
22192011-03-03 H.J. Lu <hongjiu.lu@intel.com>
2220
2221 * elf64-x86-64.c (elf_x86_64_check_tls_transition): Supprt TLS
2222 x32 IE->LE transition.
2223 (elf_x86_64_relocate_section): Likewise.
2224
ddcf1fcf
BS
22252011-03-02 Bernd Schmidt <bernds@codesourcery.com>
2226
aa374f67
AM
2227 * elflink.c (is_reloc_section): Remove function.
2228 (get_dynamic_reloc_section_name): Construct string manually.
ddcf1fcf 2229
007d6189
KT
22302011-02-28 Kai Tietz <kai.tietz@onevision.com>
2231
2232 * archive.c (_bfd_find_nested_archive): Use filename_(n)cmp.
2233 (adjust_relative_path): Likewise.
2234 (_bfd_construct_extended_name_table): Likewise.
2235 * corefile.c (generic_core_file_matches_executable_p): Likewise.
2236 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
2237 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2238 * elf32-spu.c (sort_bfds): Likewise.
2239 (spu_elf_auto_overlay): Likewise.
2240 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
2241 * xcofflink.c (xcoff_set_import_path): Likewise.
2242 * xtensa-isa.c (xtensa_regfile_lookup): Likewise.
2243 (xtensa_regfile_lookup_shortname): Likewise.
2244
8616ad89
AM
22452011-02-28 Alan Modra <amodra@gmail.com>
2246
2247 PR 12513
2248 * archive.c (bfd_slurp_bsd_armap_f2): Sanity check parsed_size and
2249 stringsize. Properly sanity check symdef_count. Remove redundant
2250 bfd_release.
2251
80549d04
RÁE
22522011-02-25 Rafael Ávila de Espíndola <respindola@mozilla.com>
2253
2254 * plugin.c (bfd_plugin_object_p): Correctly set the filesize
2255 and handle claim_file seeking. Only try to load the plugin once.
2256
93b3ac75
AS
22572011-02-22 Andreas Schwab <schwab@redhat.com>
2258
2259 * elf32-m68k.c (elf_m68k_finish_dynamic_symbol): For a TLS_GD
2260 relocation read the value from the second GOT slot.
2261
6fa052f0
TG
22622011-02-15 Tristan Gingold <gingold@adacore.com>
2263
2264 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Add a comment.
2265
28be611c
AM
22662011-02-15 Alan Modra <amodra@gmail.com>
2267
2268 * elf64-ppc.c (ppc64_elf_edit_toc): Reinstate second read of
2269 toc relocs. Fuss over free(NULL).
2270
93252b1c
MF
22712011-02-14 Mike Frysinger <vapier@gentoo.org>
2272
2273 * elflink.c (bfd_elf_size_dynamic_sections): Add
2274 bfd_get_symbol_leading_char to the start of newname.
2275
822ce8ee
RW
22762011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2277
2278 * configure: Regenerate.
2279
425b145b
AM
22802011-02-09 Alan Modra <amodra@gmail.com>
2281
2282 * elf64-ppc.c (ppc64_elf_edit_toc): Don't free toc relocs until
2283 we are done. When optimising large toc, check that a global
2284 symbol on a toc reloc is defined in a kept section.
2285
82f2dbf7
NC
22862011-02-08 Nick Clifton <nickc@redhat.com>
2287
2288 PR binutils/12467
2289 * elf.c (assign_file_positions_for_load_sections): Set the program
2290 header offset and entry size to zero if there are no program
2291 headers.
2292
df22d223
AM
22932011-02-08 Alan Modra <amodra@gmail.com>
2294
2295 * elf64-ppc.c (ppc64_elf_edit_toc): Don't segfault on NULL
2296 local_syms when looking for local symbols in .toc.
2297
6683a28d
AM
22982011-02-01 Alan Modra <amodra@gmail.com>
2299
2300 * elf64-ppc.c (ppc64_elf_next_input_section): Use elf_gp value
2301 for toc pointer on any section having makes_toc_func_call set.
2302 (check_pasted_section): Ensure pasted .init/.fini fragments use
2303 the same toc if any has makes_toc_func_call set.
2304
5240d94d
JM
23052011-01-28 Joseph Myers <joseph@codesourcery.com>
2306
2307 * elf32-ppc.c (ppc_elf_link_hash_newfunc): Initialize has_sda_refs
2308 field.
2309
ed88c97e
RS
23102011-01-22 Richard Sandiford <rdsandiford@googlemail.com>
2311
2312 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Ignore
2313 common sections too.
2314
1a0c107f
L
23152011-01-18 H.J. Lu <hongjiu.lu@intel.com>
2316
04449d86
L
2317 * elf64-x86-64.c (elf_backend_want_plt_sym): Redefine to 0 after
2318 Solaris target.
1a0c107f 2319
d68cd58c
NC
23202011-01-18 Pierre Muller <muller@ics.u-strasbg.fr>
2321
2322 Fix compilation for mingw64.
2323 * coffcode.h (coff_slurp_symbol_table): Add intptr_t intermediate
2324 typecast to avoid warning.
2325 * elf32-rx.c: Add "bfd_stdint.h" include required for int32_t type
2326 usage.
2327 * elfxx-ia64.c (elfNN_ia64_relax_br): Use intptr_t typeacast instead
2328 of long for pointer to avoid warning.
2329 (elfNN_ia64_relax_brl): Idem.
2330 (elfNN_ia64_install_value): Idem.
2331 * vms-alpha.c (_bfd_vms_slurp_etir): Idem.
2332
da17376b
RS
23332011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
2334
2335 * elf32-arm.c (elf32_arm_check_relocs): Check needs_plt rather than
2336 h->needs_plt when deciding whether to record a possible dynamic reloc.
2337
1e81e12b
RS
23382011-01-17 Richard Sandiford <richard.sandiford@linaro.org>
2339
2340 * elf32-arm.c (elf32_arm_gc_sweep_hook): Remove all registered
2341 dynamic relocs for the removed section.
2342
d1534d16
L
23432011-01-15 H.J. Lu <hongjiu.lu@intel.com>
2344
2345 * elf64-x86-64.c (elf_x86_64_check_relocs): Check invalid x32
2346 relocations.
2347
248775ba
L
23482011-01-14 H.J. Lu <hongjiu.lu@intel.com>
2349
2350 * elf64-x86-64.c (elf_x86_64_link_hash_table): Add pointer_r_type.
2351 (elf_x86_64_link_hash_table_create): Set pointer_r_type.
2352 (elf_x86_64_check_relocs): Handle R_X86_64_32 like R_X86_64_64
2353 for ILP32. Remove ABI_64_P PIC check for R_X86_64_8,
2354 R_X86_64_16, R_X86_64_32 and R_X86_64_32S.
2355 (elf_x86_64_relocate_section): Handle R_X86_64_32 like R_X86_64_64
2356 for ILP32.
2357
4a97a0e5
AM
23582011-01-14 Alan Modra <amodra@gmail.com>
2359
2360 * bfd.c (bfd_perror): Flush stdout before and stderr after printing
2361 error.
2362 (_bfd_default_error_handler): Likewise.
2363 * elf.c (print_segment_map): Likewise.
2364 * libbfd.c (warn_deprecated): Likewise.
2365 * som.c (som_sizeof_headers): No need to do so here.
2366 * coff-i860.c: Replace use of printf for error messages with
2367 _bfd_error_handler.
2368 * coff-ppc.c: Likewise.
2369 * coff-sh.c: Likewise.
2370 * elf32-bfin.c: Likewise.
2371 * elf32-dlx.c: Likewise.
2372 * elf32-mep.c: Likewise.
2373 * elf32-v850.c: Likewise.
2374 * mach-o.c: Likewise.
2375 * pef.c: Likewise.
2376
82e96e07
L
23772011-01-13 H.J. Lu <hongjiu.lu@intel.com>
2378
2379 * elf64-x86-64.c (elf_x86_64_link_hash_table): Remove
2380 swap_reloca_out.
2381 (elf_x86_64_link_hash_table_create): Don't set swap_reloca_out.
2382 (elf_x86_64_check_relocs): Align relocation section to 4 byte
2383 for 32bit.
2384 (elf_x86_64_gc_sweep_hook): Replace ELF64_ST_TYPE with
2385 ELF_ST_TYPE.
2386 (elf_x86_64_finish_dynamic_symbol): Updated.
2387 (elf_x86_64_finish_dynamic_sections): Don't use
2388 Elf64_External_Dyn, bfd_elf64_swap_dyn_in, nor
2389 bfd_elf64_swap_dyn_out.
2390
e6a6bb22
AM
23912011-01-14 J. Park <grassman@gmail.com>
2392
2393 PR ld/12339
2394 * elf32-arm.c (allocate_dynrelocs): Don't set up eh before
2395 following bfd_link_hash_warning symbol link.
2396
0855e32b
NS
23972011-01-10 Nathan Sidwell <nathan@codesourcery.com>
2398 Glauber de Oliveira Costa <glommer@gmail.com>
2399
2400 * reloc.c (BFD_RELOC_ARM_TLS_GOTDESC, BFD_RELOC_ARM_TLS_CALL,
2401 BFD_RELOC_ARM_THM_TLS_CALL, BFD_RELOC_ARM_TLS_DESCSEQ,
2402 BFD_RELOC_ARM_THM_TLS_DESCSEQ, BFD_RELOC_ARM_TLS_DESC): New
2403 relocations.
2404 * libbfd.h: Rebuilt.
2405 * bfd-in2.h: Rebuilt.
2406 * elf32-arm.c (elf32_arm_howto_table_1): Add new relocations.
2407 (elf32_arm_reloc_map): Likewise.
2408 (tls_trampoline, dl_tlsdesc_lazy_trampoline): New PLT templates.
2409 (elf32_arm_stub_long_branch_any_tls_pic,
2410 elf32_arm_stub_long_branch_v4t_thumb_tls_pic): New stub templates.
2411 (DEF_STUBS): Add new stubs.
2412 (struct_elf_arm_obj_data): Add local_tlsdesc_gotent field.
2413 (elf32_arm_local_tlsdesc_gotent): New.
2414 (GOT_TLS_GDESC): New mask.
2415 (GOT_TLS_GD_ANY): Define.
2416 (struct elf32_arm_link_hash_entry): Add tlsdesc_got field.
2417 (elf32_arm_compute_jump_table_size): New.
2418 (struct elf32_arm_link_hash_table): Add next_tls_desc_index,
2419 num_tls_desc, dt_tlsdesc_plt, dt_tlsdesc_got, tls_trampoline,
2420 sgotplt_jump_table_size fields.
2421 (elf32_arm_link_hash_newfunc): Initialize tlsdesc_got field.
2422 (elf32_arm_link_hash_table_create): Initialize new fields.
2423 (arm_type_of_stub): Check TLS desc relocs too.
2424 (elf32_arm_stub_name): TLS desc relocs can be shared.
2425 (elf32_arm_tls_transition): Determine relaxation.
2426 (arm_stub_required_alignment): Add tls stubs.
2427 (elf32_arm_size_stubs): Likewise.
2428 (elf32_arm_tls_relax): Perform TLS relaxing.
2429 (elf32_arm_final_link_relocate): Process TLS DESC relocations.
2430 (IS_ARM_TLS_GNU_RELOC): New.
2431 (IS_ARM_TLS_RELOC): Use it.
2432 (elf32_arm_relocate_section): Perform TLS relaxing.
2433 (elf32_arm_check_relocs): Anticipate TLS relaxing, process tls
2434 desc relocations.
2435 (allocate_dynrelocs): Allocate tls desc relcoations.
2436 (elf32_arm_output_arch_local_syms): Emit tls trampoline mapping
2437 symbols.
2438 (elf32_arm_size_dynamic_sections): Allocate tls trampolines and
2439 got slots.
2440 (elf32_arm_always_size_sections): New. Create _TLS_MODULE_BASE
2441 symbol.
2442 (elf32_arm_finish_dynamic_symbol): Adjust.
2443 (arm_put_trampoline): New.
2444 (elf32_arm_finish_dynamic_sections): Emit new dynamic tags and tls
2445 trampolines.
2446 (elf_backend_always_size_sections): Define.
2447
7be86737
L
24482011-01-06 H.J. Lu <hongjiu.lu@intel.com>
2449
2450 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Optimized.
2451
ae428b57 24522011-01-06 H.J. Lu <hongjiu.lu@intel.com>
3db2e7dd
L
2453
2454 PR ld/12366
2455 PR ld/12371
2456 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Properly
2457 handle symbols marked with regular reference, but not non-GOT
2458 reference when building shared library.
2459
2460 * elf32-i386.c (elf_i386_gc_sweep_hook): Properly handle
2461 local and global STT_GNU_IFUNC symols when building shared
2462 library.
2463 * elf64-x86-64.c (elf_x86_64_gc_sweep_hook): Likewise.
2464
9689e3a3
DD
24652011-01-05 DJ Delorie <dj@redhat.com>
2466
2467 * reloc.c: Add BFD_RELOC_RX_OP_NEG.
2468 * libbfd.h: Regenerate.
2469 * bfd-in2.h: Regenerate.
2470 * elf32-rx.c: Add it to the list, corresponding to R_RX_OPneg.
2471
889a4d3e
L
24722011-01-03 H.J. Lu <hongjiu.lu@intel.com>
2473
2474 * cpu-i386.c (bfd_i386_compatible): New.
2475 (bfd_x64_32_arch_intel_syntax): Replace bfd_default_compatible
2476 with bfd_i386_compatible.
2477 (bfd_x86_64_arch_intel_syntax): Likewise.
2478 (bfd_i386_arch_intel_syntax): Likewise.
2479 (i8086_arch): Likewise.
2480 (bfd_x64_32_arch): Likewise.
2481 (bfd_x86_64_arch): Likewise.
2482 (bfd_i386_arch): Likewise.
2483
9e9e0820 2484For older changes see ChangeLog-2010
56882138
AM
2485\f
2486Local Variables:
2487mode: change-log
2488left-margin: 8
2489fill-column: 74
2490version-control: never
2491End:
This page took 0.683858 seconds and 4 git commands to generate.