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