*** empty log message ***
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
154a1ee5
TG
12009-06-05 Tristan Gingold <gingold@adacore.com>
2
3 * mach-o.h: Update copyright year.
4 (bfd_mach_o_mach_header_magic): New enum.
5 (bfd_mach_o_cpu_subtype): Now an enum.
6 (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
7 (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
8 (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
9 (bfd_mach_o_load_command): Field type_required is now a boolean.
10 Reindent prototypes.
11 (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
12 (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
13 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
14 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
15 (bfd_mach_o_get_symtab_upper_bound): Ditto.
16 (bfd_mach_o_canonicalize_symtab): Ditto.
17 (bfd_mach_o_get_symbol_info): Ditto.
18 (bfd_mach_o_print_symbol): Ditto.
19 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
20 (bfd_mach_o_make_empty_symbol): Ditto.
21 (bfd_mach_o_write_contents): Ditto.
22
23 * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
24 bfd_mach_o_mkobject): Defines.
25 (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
26 Do not check with target vector but with flavour.
27 (struct mach_o_section_name_xlat): New declaration.
28 (dwarf_section_names_xlat): Ditto.
29 (text_section_names_xlat): Ditto.
30 (data_section_names_xlat): Ditto.
31 (struct mach_o_segment_name_xlat): Ditto.
32 (segsec_names_xlat): Ditto.
33 (bfd_mach_o_convert_section_name_to_bfd): New function.
34 (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
35 (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
36 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
37 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
38 Accept any input and output flavour. Do not share private data
39 anymore.
40 (bfd_mach_o_count_symbols): Add a comment.
41 (bfd_mach_o_get_symtab_upper_bound): Make it public.
42 (bfd_mach_o_canonicalize_symtab): Ditto.
43 (bfd_mach_o_get_symbol_info): Ditto.
44 (bfd_mach_o_print_symbol): Ditto.
45 (bfd_mach_o_write_header): Now returns a boolean instead of an int.
46 Use constants instead of hard-coded values.
47 (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
48 values.
49 (bfd_mach_o_scan_write_section_64): Ditto.
50 (bfd_mach_o_scan_write_segment): Ditto.
51 Do not copy sections anymore.
52 (bfd_mach_o_write_contents): Make it public.
53 Remove dead code. Rewrite typeflag assignment.
54 (bfd_mach_o_build_commands): New function.
55 (bfd_mach_o_set_section_contents): Ditto.
56 (bfd_mach_o_make_empty_symbol): Make it public.
57 (bfd_mach_o_read_header): Make it static.
58 Convert to bfd_boolean.
59 Use constants instead of hard-coded values.
60 (bfd_mach_o_make_bfd_section): Call
61 bfd_mach_o_convert_section_name_to_bfd to create name.
62 (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
63 values.
64 (bfd_mach_o_scan_read_section_64): Ditto.
65 (bfd_mach_o_scan_read_segment): Do not create a bfd section for
66 a segment anymore. Use constants instead of hard-coded values.
67 (bfd_mach_o_scan_read_command): Fix style.
68 (bfd_mach_o_scan): Use constants instead of hard-coded values.
69 Get rid of BFD_IO_FUNCS.
70 (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
71 (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
72 (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
73 (bfd_mach_o_object_p): Removed.
74 (bfd_mach_o_gen_core_p): New function, replaces ...
75 (bfd_mach_o_core_p): ... deleted.
76 (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
77
78 * mach-o-i386.c: New file.
79 * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
80 * configure.in (TDEFINES): Add mach_o_i386_vec.
81 * configure: Regenerated.
82 * targets.c: Add mach_o_i386_vec.
83
84 * mach-o.c: Update copyright years.
85 (BFD_IO_FUNCS): Remove (was not used).
86 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
87 bfd_mach_o_slurp_extended_name_table,
88 bfd_mach_o_construct_extended_name_table,
89 bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
90 bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
91 bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
92 bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
93 bfd_mach_o_get_section_contents_in_window,
94 bfd_mach_o_bfd_is_local_label_name,
95 bfd_mach_o_bfd_is_target_special_symbol,
96 bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
97 bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
98 bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
99 bfd_mach_o_minisymbol_to_symbol,
100 bfd_mach_o_bfd_get_relocated_section_contents,
101 bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
102 bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
103 bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
104 bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
105 bfd_mach_o_bfd_merge_private_bfd_data,
106 bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
107 bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
108 bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
109 bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
110 bfd_mach_o_bfd_copy_private_header_data,
111 bfd_mach_o_core_file_matches_executable_p): Move these defines ...
112 * mach-o-target.c: ... here.
113 Update copyright years.
114
a1ef399e
AM
1152009-06-04 Alan Modra <amodra@bigpond.net.au>
116
117 * dep-in.sed: Don't use \n in replacement part of s command.
118 * Makefile.am (DEP1): LC_ALL for uniq.
119 Run "make dep-am".
120 * Makefile.in: Regenerate.
121
2e75bb35
L
1222009-06-03 H.J. Lu <hongjiu.lu@intel.com>
123
124 * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
125 h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
126 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
127
0018b0a3
L
1282009-06-03 H.J. Lu <hongjiu.lu@intel.com>
129
130 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
131 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
132 (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
133 against STT_GNU_IFUNC symbols for static executables.
134 (elf_i386_finish_dynamic_symbol): Load GOT entry with
135 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
136
137 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
138 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
139 (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
140 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
141
94313f36
RS
1422009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com>
143
144 * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
145 symbols to be left unimported when linking statically.
146 * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
147 code when linking statically.
148
7afd84dc
L
1492009-06-02 H.J. Lu <hongjiu.lu@intel.com>
150
151 * elf32-i386.c (elf_i386_check_relocs): Increment
152 got.refcount for R_386_GOT32/R_386_GOTOFF relocations
153 against STT_GNU_IFUNC symbol.
154 (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
155 local STT_GNU_IFUNC definition is used.
156 (elf_i386_relocate_section): Handle got.offset != -1 for
157 R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
158 symbol.
159
160 * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
161 got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
162 relocations against STT_GNU_IFUNC symbol.
163 (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
164 local STT_GNU_IFUNC definition is used.
165 (elf64_x86_64_relocate_section): Handle got.offset != -1
166 for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
167 STT_GNU_IFUNC symbol.
168
cbe950e9
L
1692009-06-01 H.J. Lu <hongjiu.lu@intel.com>
170
171 PR ld/10205
172 * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
173 (elf_i386_reloc_type_lookup): Likewise.
174 (R_386_tls): Removed.
175 (R_386_irelative): New.
176 (R_386_vt_offset): Updated.
177 (elf_i386_rtype_to_howto): Likewise.
178 (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
179 (elf_i386_link_hash_table_create): Initialize igotplt,
180 iplt and irelplt.
181 (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
182 (elf_i386_adjust_dynamic_symbol): Likewise.
183 (elf_i386_allocate_dynrelocs): Likewise.
184 (elf_i386_relocate_section): Likewise.
185 (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
186 sections.
187 (elf_i386_finish_dynamic_symbol): When building a static
188 executable, use .iplt, .igot.plt and .rel.iplt sections for
189 STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
190 locally defined STT_GNU_IFUNC symbol.
191
192 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
193 (x86_64_reloc_map): Likewise.
194 (R_X86_64_standard): Updated.
195 (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
196 (elf64_x86_64_link_hash_table_create): Initialize igotplt,
197 iplt and irelplt.
198 (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
199 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
200 (elf64_x86_64_allocate_dynrelocs): Likewise.
201 (elf64_x86_64_relocate_section): Likewise.
202 (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
203 sections.
204 (elf64_x86_64_finish_dynamic_symbol): When building a static
205 executable, use .iplt, .igot.plt and .rela.iplt sections for
206 STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
207 for locally defined STT_GNU_IFUNC symbol.
208
209 * reloc.c (BFD_RELOC_386_IRELATIVE): New.
210 (BFD_RELOC_X86_64_IRELATIVE): Likewise.
211
212 * bfd-in2.h: Regenerated.
213 * libbfd.h: Likewise.
214
3aa14d16
L
2152009-06-01 H.J. Lu <hongjiu.lu@intel.com>
216
217 * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
218 (_bfd_elf_make_ifunc_reloc_section): Removed.
219 (_bfd_elf_is_ifunc_symbol): Likewise.
220 (_bfd_elf_create_static_ifunc_sections): New.
221
222 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
223 symbol check to ...
224 (elf_link_add_object_symbols): Here.
225 (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
226 STT_GNU_IFUNC symbol.
227 (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
228 if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
229 (IFUNC_INFIX): Removed.
230 (get_ifunc_reloc_section_name): Likewise.
231 (_bfd_elf_make_ifunc_reloc_section): Likewise.
232 (_bfd_elf_is_ifunc_symbol): Likewise.
233 (_bfd_elf_create_static_ifunc_sections): New.
234
eb4ff4d6
L
2352009-05-29 H.J. Lu <hongjiu.lu@intel.com>
236
237 * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
238 (create_got_section): Likewise.
239 (allocate_dynrelocs): Likewise.
240 (readonly_dynrelocs): Likewise.
241 (set_tls_module_base): Likewise.
242 (dtpoff_base): Likewise.
243 (tpoff): Likewise.
244 (elf_i386_link_hash_table_create): Updated.
245 (elf_i386_create_dynamic_sections): Likewise.
246 (elf_i386_check_relocs): Likewise.
247 (elf_i386_size_dynamic_sections): Likewise.
248 (elf_i386_relocate_section): Likewise.
249
250 * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
251 (create_got_section): Likewise.
252 (allocate_dynrelocs): Likewise.
253 (readonly_dynrelocs): Likewise.
254 (set_tls_module_base): Likewise.
255 (dtpoff_base): Likewise.
256 (tpoff): Likewise.
257 (elf64_x86_64_link_hash_table_create): Updated.
258 (elf64_x86_64_create_dynamic_sections): Likewise.
259 (elf64_x86_64_check_relocs): Likewise.
260 (elf64_x86_64_size_dynamic_sections): Likewise.
261 (elf64_x86_64_relocate_section): Likewise.
262
fc579192
NC
2632009-05-28 Nick Clifton <nickc@redhat.com>
264
265 * targets.c (_bfd_target_vector): Only include plugin target in
266 all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
267
5ebe2858
UW
2682009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
269
270 * elf32-spu.c (struct call_info): New member broken_cycle.
271 (remove_cycle): Instead of physically removing call_info structures
272 to break call graph cycles, mark them using the broken_cycle flag.
273 (mark_overlay_section): Respect broken_cycle flag.
274 (unmark_overlay_section): Likewise.
275 (collect_lib_sections): Likewise.
276 (collect_overlays): Likewise.
277 (sum_stack): Likewise.
278
34ad4cb0
UW
2792009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
280
281 * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
282 (mark_functions_via_relocs): Initialize callee->count to 1.
283 (pasted_function): Likewise.
284 (spu_elf_auto_overlay): Honor call counts when determining number
285 of stubs required in software i-cache mode.
286
fc579192
NC
2872009-05-27 Rafael Avila de Espindola <espindola@google.com>
288
289 * plugin.c (program_name): Remove.
290 (plugin_program_name): New.
291 (bfd_plugin_set_program_name): New.
292 (try_load_plugin): Use plugin_program_name.
293 * plugin.h (bfd_plugin_set_program_name): New.
294
2952009-05-27 Rafael Avila de Espindola <espindola@google.com>
5691d22d
NC
296
297 * aclocal.m4: Include ../config/plugins.m4.
298 * configure.in: Use AC_PLUGINS.
299 * configure: Regenerate.
300 * Makefile.in: Regenerate.
301 * doc/Makefile.in: Regenerate.
302
c8a1f254
NS
3032009-05-27 Nathan Sidwell <nathan@codesourcery.com>
304
305 * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
306 link.
307 * bout.c (b_out_bfd_relax_section): Reject relocatable links.
308 * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
309 * elf32-avr.c (elf32_avr_relax_section): Likewise.
310 * elf32-frv.c (elf32_avr_relax_section): Likewise.
311 * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
312 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
313 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
314 * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
315 * reloc.c (bfd_generic_relax_section): Likewise.
316 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
317 * vms.c (vms_bfd_relax_section): Likewise.
318
68d7e96a
L
3192009-05-26 H.J. Lu <hongjiu.lu@intel.com>
320
321 * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
322
323 * elf32-i386.c (is_indirect_symbol): Renamed to ...
324 * elflink.c (_bfd_elf_is_ifunc_symbol): This.
325
326 * elf32-i386.c (allocate_dynrelocs): Updated.
327 (elf_i386_relocate_section): Likewise.
328 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
329 (elf64_x86_64_relocate_section): Likewise.
330
331 * elf64-x86-64.c (is_indirect_symbol): Removed.
332
f12e7348
NC
3332009-05-26 Nick Clifton <nickc@redhat.com>
334
335 * po/id.po: Updated Indonesian translation.
336
ce3c775b
NC
3372009-05-26 Rafael Avila de Espindola <espindola@google.com>
338
339 * Makefile.am: Run "make dep-am".
340 (AM_CPPFLAGS): New.
341 (LIBDL): New.
342 (ALL_MACHINES): Add cpu-plugin.lo.
343 (ALL_MACHINES_CFILES): Add cpu-plugin.c.
344 (BFD32_BACKENDS): Add plugin.lo.
345 (BFD32_BACKENDS_CFILES): Add plugin.c.
346 (libbfd_la_LIBADD): Add LIBDL
347 * archures.c (bfd_architecture): Add bfd_arch_plugin.
348 (bfd_plugin_arch): Declare.
349 * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
350 * bfd.c (bfd): Add plugin_data.
351 * config.bfd: Handle the plugin target.
352 * configure.in: Check for --enable-plugins.
353 (LT_INIT): Use the dlopen option.
354 * cpu-plugin.c: New.
355 * plugin.c: New.
356 * plugin.h: New.
357 * targets.c (plugin_vec): Declare.
358 (_bfd_target_vector): Add plugin_vec.
359 * Makefile.in: Regenerate.
360 * bfd-in2.h: Regenerate.
361 * configure: Regenerate.
362
9e097a72
AM
3632009-05-26 Alan Modra <amodra@bigpond.net.au>
364
365 * dep-in.sed: Don't modify .o to .lo here. Output one filename
366 per line with all lines having continuation backslash. Prefix
367 first line with "A", following lines with "B".
368 * Makefile.am (DEP): Don't use dep.sed here.
369 (DEP1): Run $MKDEP on single files, modify .o to .lo here. Use
370 dep.sed here on dependencies, sort and uniq.
371 * Makefile.in: Regenerate.
372
d5acff2f
TG
3732009-05-25 Tristan Gingold <gingold@adacore.com>
374
375 * makefile.vms: Add verilog.obj to object list OBJS.
376
5c93f09b
AM
3772009-05-24 Alan Modra <amodra@bigpond.net.au>
378
379 * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory
380 for BFD_IN_MEMORY is cleared.
381 (bfd_bwrite): Zero excess memory allocated.
382
48229727
JB
3832009-05-22 Julian Brown <julian@codesourcery.com>
384
385 * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
386 macros.
387 (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
388 (elf32_arm_stub_a8_veneer_blx): New stub sequences.
389 (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
390 arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
391 (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
392 (a8_erratum_fix, a8_erratum_reloc): New structs.
393 (elf32_arm_link_hash_table): Add a8_erratum_fixes,
394 num_a8_erratum_fixes, fix_cortex_a8 fields.
395 (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
396 (elf32_arm_add_stub): Split into two parts, creating...
397 (elf32_arm_create_or_find_stub_sec): New function.
398 (elf32_arm_final_link_relocate): Add forward declaration.
399 (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
400 relocations, multiple relocations per stub.
401 (find_stub_size_and_template): New (using parts of arm_size_one_stub).
402 (arm_size_one_stub): Use find_stub_size_and_template.
403 (a8_reloc_compare): New.
404 (find_thumb_glue): Add forward declaration.
405 (cortex_a8_erratum_scan): New.
406 (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
407 (bfd_elf32_arm_set_cortex_a8_fix): New.
408 (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
409 (arm_map_one_stub): Add THUMB32_TYPE support.
410 (a8_branch_to_stub_data): New.
411 (make_branch_to_a8_stub): New.
412 (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
413 * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
414 (bfd_elf32_arm_set_target_relocs): Add argument for controlling
415 Cortex-A8 erratum workaround.
416 * bfd-in2.h: Regenerate.
417
2b3decb5
AM
4182009-05-22 Alan Modra <amodra@bigpond.net.au>
419
420 * Makefile.am: Run "make dep-am".
421 * Makefile.in: Regenerate.
422 * po/SRC-POTFILES.in: Regenerate.
423
930e005c
AM
4242009-05-21 Alan Modra <amodra@bigpond.net.au>
425
426 * elflink.c (elf_link_input_bfd): Correct *pindex change in last
427 commit.
428
6e0b88f1
AM
4292009-05-21 Alan Modra <amodra@bigpond.net.au>
430
431 * elf-bfd.h (struct elf_backend_data
432 <elf_backend_link_output_symbol_hook>): Return an int.
433 * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
434 symbols on deleted .opd entries.
435 * elflink.c (elf_link_output_sym): Return without outputting sym
436 if output_symbol_hook returns 2.
437 (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
438 Abort if we must not discard sym.
439 (elf_link_input_bfd): Similarly, don't set finfo->indices for
440 local syms.
441 (bfd_elf_final_link): Adjust elf_link_output_sym calls.
442 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
443 elf_backend_link_output_symbol_hook return type change.
444 * elf32-arm.c (output_arch_syminfo): Likewise.
445 (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
446 (elf32_arm_output_arch_local_syms): Likewise.
447 * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
448 * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
449 (bfd_score_elf_link_output_symbol_hook): Likewise.
450 * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
451 * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
452 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
453 * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
454 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
455 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
456 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
457 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
458 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
459 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
460 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
461
5ef11c02
AM
4622009-05-21 Alan Modra <amodra@bigpond.net.au>
463
464 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
465 out of range .opd symbols.
466
ebf12fbe
DK
4672009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
468
469 * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
470 fprintf_vma directly.
471 * peXXigen.c (pe_print_edata): Likewise.
472 (pe_print_pdata): Likewise.
473 (_bfd_XX_print_ce_compressed_pdata): Likewise.
474 (_bfd_XX_print_private_bfd_data_common): Likewise.
475
c1711530
DK
4762009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
477
478 * cofflink.c (process_embedded_commands): Ignore "-aligncomm".
479
22a8f80e 4802009-05-15 Andrew Stubbs <ams@codesourcery.com>
164e7efc 481 Paul Brook <paul@codesourcery.com>
22a8f80e
PB
482
483 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
484 fix discarded sections.
485
335bd8f2
UW
4862009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
487
488 * elf32-spu.c (mark_overlay_section): Move .init and .fini
489 sections into the software icache.
490
cdc83fba
UW
4912009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
492
493 * elf32-spu.c (build_stub): Always build "compact" sofware
494 i-cache stubs.
495
97fc8d84
UW
4962009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
497
498 * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
499 (spu_elf_setup): Initialize it.
500 (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
501 Update to new-sytle cache manager data structures.
502 (spu_elf_build_stubs): Generate new-style cache manager data
503 structures and symbols.
504 (spu_elf_auto_overlay): Update size computation.
505
452de53c
UW
5062009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
507
508 * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
509 segments first amongst the program headers.
510
d342a8b1
UW
5112009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
512
513 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
514 into addresses for relocation types that look at high bits. Remove
515 special handling of relocation overflow warnings.
516
cc210763
UW
5172009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
518
519 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
520 control flow graph between fragments of a function.
521
c1ea05bb
UW
5222009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
523
524 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
525 generate only a 16-byte .toe section.
526 (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
527
bbb0fc04
AM
5282009-05-14 Alan Modra <amodra@bigpond.net.au>
529
530 * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
531 (spu_elf_place_overlay_data): ..here. New function.
532 * elf32-spu.h (spu_elf_place_overlay_data): Declare.
533
6e6718a3
AJ
5342009-05-13 Andrew Jenner <andrew@codesourcery.com>
535
536 * elf32-arm.c: Move sysdep.h to start of file.
537
77ae44b0
AM
5382009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
539
540 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
541 start of overlays.
542 (spu_elf_build_stubs): Don't define __icache_tagbase. Define
543 __icache_tag_array and __icache_tag_array_size.
544
51408ec2
AM
5452009-05-11 Masaki Muranaka <monaka@monami-software.com>
546
547 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
548 ATTRIBUTE_UNUSED.
549 (bfinfdpic_link_omit_section_dynsym): Likewise.
550 (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
551
2468f9c9
PB
5522009-05-05 Paul Brook <paul@codesourcery.com>
553
554 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
555 * bfd-in2.h: Regenerate.
556 * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
557 (_arm_elf_section_data): Add text and exidx fields.
558 (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
559 insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
560 copy_exidx_entry): New functions.
561 (elf32_arm_write_section): Fixup .ARM.exidx contents.
562
738a79f6
CL
5632009-05-05 Christophe lyon <christophe.lyon@st.com>
564
565 * elf32-arm.c (DEF_STUBS): New helper define.
566 (DEF_STUB): Likewise.
567 (stub_def): New type.
568 (stub_definitions): New array, containing stub template pointers
569 and sizes.
570 (arm_size_one_stub): Make use of stub_definitions.
571
09e2aba4
DK
5722009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
573
574 * elflink.c (find_version_for_sym): Remove from here, ...
575 * linker.c (bfd_find_version_for_sym): ... rename, replace
576 here, make public and update all callers.
577 * bfd-in2.h: Regenerate.
578
d8045f23
NC
5792009-04-30 Nick Clifton <nickc@redhat.com>
580
581 * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
582 section pointer.
583 (struct elf_obj_data): Add has_ifunc_symbols boolean.
584 * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
585 into a STT_GNU_IFUNC symbol type.
586 (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
587 type.
588 (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
589 the binary contains ifunc symbols.
590 * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
591 symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
592 * elf32-i386.c (is_indirect_function): New function.
593 (elf_i386_check_relocs): Create an ifunc output section.
594 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
595 section if necessary.
596 (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
597 if necessary.
598 (elf_i386_add_symbol_hook): New function. Set the
599 has_ifunc_symbols field of the elf_obj_data structure if an ifunc
600 symbol is encountered.
601 (elf_backend_post_process_headers): Define.
602 (elf_backend_add_symbol_hook): Define.
603 (elf_i386_post_process_headers): Rename to
604 elf_i388_fbsd_post_process_headers.
605 * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
606 (is_indirect_function): New function.
607 (elf64_x86_64_check_relocs): Create an ifunc output section.
608 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
609 section if necessary.
610 (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
611 symbol if necessary.
612 (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
613 elf_obj_data structure if an ifunc symbol is encountered.
614 (elf_backend_post_process_headers): Define.
615 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
616 if we have ifunc symbols to handle.
617 (get_ifunc_reloc_section_name): New function. Computes the name
618 for an ifunc section.
619 (_bfd_elf_make_ifunc_reloc_section): New function. Creates a
620 section to hold ifunc relocs.
621 * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
622 (bfd_print_symbol_vandf): Handle ifunc symbols.
623 (bfd_decode_symclass): Likewise.
624 * bfd-in2.h: Regenerate.
625
96c23d59
JM
6262009-04-30 Joseph Myers <joseph@codesourcery.com>
627
628 * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
629 MOVW and MOVT relocations in a shared library link.
630
c067354b
NC
6312009-04-27 Anthony Green <green@moxielogic.com>
632
633 * verilog.c: New file.
634 * Makefile.am (BFD32_LIBS): Add verilog.c.
635 (BFD32_LIBS_CFILES): Add verilog.c.
636 (verilog.lo): New build rule.
637 * Makefile.in: Rebuilt.
638 * targets.c: Add verilog support.
639 * bfd.c (tdata union): Add Verilog private data field.
640 * bfd-in2.h: Regenerate.
641
325c681d
L
6422009-04-27 H.J. Lu <hongjiu.lu@intel.com>
643
644 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
645 copy pe_opthdr.
646
ba775898
DK
6472009-04-23 Matthias Klose <doko@ubuntu.com>
648
2e28a5fc 649 * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
ba775898 650
155d87d7
CL
6512009-04-22 Christophe Lyon <christophe.lyon@st.com>
652
653 PR9743
654 * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
655 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
656 (elf32_arm_size_stubs): Likewise.
657 (record_thumb_to_arm_glue): Deleted unused function.
658 (bfd_elf32_arm_process_before_allocation): No longer handle
659 R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
660 (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
661 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
662
3e6b1042
DJ
6632009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
664
665 * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
666 (elf32_arm_write_section): Declare early.
667 (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
668 (arm_allocate_glue_section_space): Exclude empty sections.
669 (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
670 (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
671 BFD.
672 (elf32_arm_output_glue_section, elf32_arm_final_link): New.
673 (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
674 (elf32_arm_size_dynamic_sections): Allocate interworking
675 sections here.
676 (bfd_elf32_bfd_final_link): Define.
677
4f360784
L
6782009-04-21 H.J. Lu <hongjiu.lu@intel.com>
679
680 * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
154a1ee5 681
4f360784
L
682 * coffcode.h (coff_compute_section_file_positions): Clear
683 D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
684
685 * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
686 force_minimum_alignment.
687
688 * libcoff.h: Regenerated.
689
690 * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
691 (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
692
693 * peicode.h (pe_mkobject): Don't set force_minimum_alignment
694 nor target_subsystem.
695
696 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
697 force_minimum_alignment nor target_subsystem.
698
e48570bb
DK
6992009-04-21 Kai Tietz <kai.tietz@onevision.com>
700
701 * coff-x86_64.c (PEI_HEADERS): Protect includes.
702 (bfd_pe_print_pdata): Remove #ifdef PE variation.
703 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
704 include in coff-x86_64.c of headers.
705 (PDATA_ROW_SIZE): New define.
706 (pex_regs[]): New static array.
707 (pex64_get_runtime_function): New static function.
708 (pex64_get_unwind_info): Likewise.
709 (pex64_get_scope_entry): Likewise.
710 (pex64_xdata_print_uwd_codes): Likewise.
711 (pex64_get_section_by_rva): Likewise.
712 (pex64_dump_xdata): Likewise.
713 (pex64_bfd_print_pdata): Likewise.
714 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
715 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
716 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
717
383c383f 7182009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
4f360784
L
719 Alan Modra <amodra@bigpond.net.au>
720 Dave Korn <dave.korn.cygwin@gmail.com>
383c383f
AM
721
722 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
723 long names and non-NUL-terminated strings.
724
b6b450f1
L
7252009-04-17 H.J. Lu <hongjiu.lu@intel.com>
726
727 * bfd-in2.h: Regenerated.
728
d9118602
L
7292009-04-17 H.J. Lu <hongjiu.lu@intel.com>
730
731 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
732 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
733
92dd4511
L
7342009-04-17 H.J. Lu <hongjiu.lu@intel.com>
735
736 PR binutils/10074
737 * coffcode.h (bfd_pei_p): New.
738
739 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
740 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
741 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
742 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
743 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
744 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
745
746 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
747 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
748 bfd_efi_rtdrv_x86_64_vec,
749 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
750 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
751 * targets.c: Likewise.
752
753 * configure: Regenerated.
754 * libcoff.h: Likewise.
755 * Makefile.in: Likewise.
756
757 * efi-app-ia32.c: Removed.
758 * efi-app-x86_64.c: Likewise.
759 * efi-bsdrv-ia32.c: Likewise.
760 * efi-bsdrv-ia64.c: Likewise.
761 * efi-bsdrv-x86_64.c: Likewise.
762 * efi-rtdrv-ia32.c: Likewise.
763 * efi-rtdrv-ia64.c: Likewise.
764 * efi-rtdrv-x86_64.c: Likewise.
765 * efi-rtdrv-ia32.c: Likewise.
766
767 * efi-app-ia64.c: Moved to ...
768 * pei-ia64.c: This.
769 (TARGET_SYM): Set to bfd_pei_ia64_vec.
770 (TARGET_NAME): Set to pei-ia64.
771
772 * libpei.h (bfd_target_pei_p): Removed.
773 (bfd_target_pei_arch): Likewise.
774 (bfd_target_efi_app_p): Likewise.
775 (bfd_target_efi_app_arch): Likewise.
776 (bfd_target_efi_bsdrv_p): Likewise.
777 (bfd_target_efi_bsdrv_arch): Likewise.
778 (bfd_target_efi_rtdrv_p): Likewise.
779 (bfd_target_efi_rtdrv_arch): Likewise.
780 (bfd_pe_executable_p): Likewise.
781
782 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
783 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
784 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
785 and efi-rtdrv-ia32.c.
786 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
787 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
788 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
789 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
790 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
791 efi-rtdrv-x86_64.c. Add pei-ia64.c.
792 (efi-app-ia64.lo): Removed.
793 (efi-bsdrv-ia32.lo): Likewise.
794 (efi-rtdrv-ia32.lo): Likewise.
795 (efi-app-ia64.lo): Likewise.
796 (efi-bsdrv-ia64.lo): Likewise.
797 (efi-rtdrv-ia64.lo): Likewise.
798 (efi-app-x86_64.lo): Likewise.
799 (efi-bsdrv-x86_64.lo): Likewise.
800 (efi-rtdrv-x86_64.lo): Likewise.
801 (pei-ia64.lo): New.
802
803 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
804 with bfd_pei_p.
805 (arch_type): Removed.
806 (pe_arch): Likewise.
807 (pe_bfd_object_p): Just return coff_object_p.
808
809 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
810 bfd_pe_executable_p with bfd_pei_p.
811
69c5861e
CL
8122009-04-17 Christophe Lyon <christophe.lyon@st.com>
813
814 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
815 PLT entries to an undefined symbol when generating a shared
816 library.
817
e9cd0660
NC
8182009-04-17 Nick Clifton <nickc@redhat.com>
819
820 PR 9909
821 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
822
3023e3f6
RS
8232009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
824
825 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
826 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
827 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
828 * binary.c (binary_bfd_define_common_symbol): Likewise.
829 * bout.c (b_out_bfd_define_common_symbol): Likewise.
830 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
831 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
832 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
833 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
834 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
835 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
836 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
837 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
838 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
839 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
840 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
841 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
842 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
843 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
844 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
845 * som.c (som_bfd_define_common_symbol): Likewise.
846 * srec.c (srec_bfd_define_common_symbol): Likewise.
847 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
848 * versados.c (versados_bfd_define_common_symbol): Likewise.
849 * vms.c (vms_bfd_define_common_symbol): Likewise.
850 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
851 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
852 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
853 (pmac_xcoff_vec): Likewise.
854 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
855 (aix5coff64_vec): Likewise.
856 * linker.c (bfd_generic_define_common_symbol): New function.
857 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
858 (_bfd_define_common_symbol): New field.
859 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
860 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
861 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
862 symbols here.
863 * bfd-in2.h: Regenerate.
864 * libbfd.h: Likewise.
865 * libcoff.h: Likewise.
866
20135e4c
NC
8672009-04-15 Anthony Green <green@moxielogic.com>
868
869 * targets.c: Add moxie support.
870 * Makefile.am: Ditto.
871 * Makefile.in: Rebuilt.
872 * cpu-moxie.c, elf32-moxie.c: New files.
873 * archures.c: Add moxie support.
874 * configure.in: Add moxie support.
875 * configure: Rebuilt.
876 * config.bfd, archures.c: Add moxie support.
877 * bfd-in2.h: Rebuilt.
878
82b5c97a
CL
8792009-04-15 Christophe Lyon <christophe.lyon@st.com>
880
881 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
882 branch to an undef weak symbol into a jump to next instruction if
883 a PLT entry will be created.
884
0408dee6
DK
8852009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
886
887 * coffgen.c (make_a_section_from_file): Set the backend long
888 section names enable if long section names found on input.
889 * coffcode.h: Extend long section names documentation to match.
890
a0c402a5
L
8912009-04-08 H.J. Lu <hongjiu.lu@intel.com>
892
893 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
894 machine code.
895
4d28413b
DD
8962009-04-07 DJ Delorie <dj@redhat.com>
897
898 * archures.c: Add bfd_mach_mep_c5.
899 * bfd-in2.h: Likewise.
900 * cpu-mep.c: Add bfd_c5_arch.
901 * elf32-mep.c: Support it.
902
bb6198d2
L
9032009-04-07 H.J. Lu <hongjiu.lu@intel.com>
904
905 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
906 info->callbacks->einfo.
907 * linker.c (_bfd_generic_section_already_linked): Likewise.
908
bcb012d3
DD
9092009-04-06 DJ Delorie <dj@redhat.com>
910
911 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
912
db1fe6e9
L
9132009-04-06 H.J. Lu <hongjiu.lu@intel.com>
914
915 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
916 _bfd_pex64_print_pdata only if PE is defined.
917
918 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
919 (_bfd_pex64_print_pdata): This.
920
921 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
922 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
923 is defined.
924
c7c7219d
KT
9252009-04-05 Kai Tietz <kai.tietz@onevision.com>
926
927 * coff-x86_64.c (bfd_pe_print_pdata): Define as
928 _bfd_pep_print_x64_pdata.
929 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
930 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
931
3df502ae
SA
9322009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
933
154a1ee5 934 * elf32-xtensa.c (relax_property_section): Always set r_offset
3df502ae
SA
935 to zero.
936
d3626fb0
CL
9372009-04-02 Christophe Lyon <christophe.lyon@st.com>
938
939 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
940 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
941 branch stubs.
942 (elf32_arm_stub_type): New enum values for the two new stubs.
943 (arm_type_of_stub): Make use of the two new stubs.
944 (arm_size_one_stub): Handle the two new stubs.
945
fe723c87
MT
9462009-04-01 Matt Thomas <matt@netbsd.org>
947
948 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
949 hidden symbols into the GOT or PLT.GOT.
154a1ee5 950 (elf_vax_relocate_section): Do not emit a PCREL reloc
fe723c87
MT
951 into a shared object if it is against a hidden symbol.
952
ee698300
RS
9532009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
954
955 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
956 and know_contains_shared_object_p.
957 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
958 Cache the result in the archive_info table.
959 (xcoff_auto_export_p): Add an "info" parameter and update the
960 call to xcoff_archive_contains_shared_object_p.
961 (xcoff_mark_auto_exports): Update accordingly.
962 (xcoff_post_gc_symbol): Likewise.
963
54e2dbe0
RS
9642009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
965
966 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
967 rather than C_EXT.
968
2e470849
RS
9692009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
970
971 * coff-rs6000.c (member_layout): New structure.
972 (archive_iterator): Likewise.
973 (member_layout_init): New function.
974 (archive_iterator_begin): Likewise.
975 (archive_iterator_next): Likewise.
976 (xcoff_write_armap_old): Use the new iterator functions.
977 (do_shared_object_padding): Delete.
978 (xcoff_write_armap_big): Use the new iterator functions. Simplify
979 handling of arch_info.
980 (xcoff_write_archive_contents_old): Allocate arelt_data in the
981 first loop rather than the second. Allocate a member header if
982 there isn't one, then work out the stat information and length
983 in the first loop too. Use the new iterators for the second loop.
984 (xcoff_write_archive_contents_big): Likewise.
985
24c611d1
RS
9862009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
987
988 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
989 (bfd_xcoff_set_archive_import_path): Likewise.
990 * bfd-in2.h: Regenerate.
991 * xcofflink.c: Include libiberty.h.
992 (xcoff_archive_info): New structure.
993 (xcoff_archive_info_hash): New function.
994 (xcoff_archive_info_eq): Likewise.
995 (xcoff_get_archive_info): Likewise.
996 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
997 (bfd_xcoff_split_import_path): New function.
998 (bfd_xcoff_set_archive_import_path): Likewise.
999 (xcoff_set_import_path): Move earlier in file.
1000 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
1001 object to the the directory part of the bfd's filename. Get the
1002 import path and filename of an archive object from the archive's
1003 xcoff_tdata, initializing it if necessary. Update use of
1004 import_file_id.
1005 (bfd_link_input_bfd): Update use of import_file_id.
1006 (xcoff_write_global_symbol): Likewise.
1007
d286971a
RS
10082009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1009
1010 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
1011
10122009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
1013
1014 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
1015 a .loader section for relocatable links.
1016 (xcoff_need_ldrel_p): New function.
1017 (xcoff_mark): Use it.
1018 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
1019 a loader section.
1020 (xcoff_build_ldsym): New function, split out from...
1021 (xcoff_build_ldsyms): ...here. Rename to...
1022 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
1023 call xcoff_build_ldsym, if there's a loader section.
1024 (xcoff_build_loader_section): New function, extracted verbatim from...
1025 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
1026 there's a loader section. Only add an __rtinit loader symbol
1027 if there's a loader section. Update after above name change.
1028 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
1029 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
1030 and xcoff_create_ldrel.
1031 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
1032 (xcoff_reloc_link_order): Likewise, but only call it if there's
1033 a loader section. Use xcoff_symbol_section.
1034 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
1035 if there's a loader section.
1036
8707bb87
RS
10372009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
1038
1039 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
1040
e780aef2
CL
10412009-04-01 Christophe Lyon <christophe.lyon@st.com>
1042
1043 * elf32-arm.c (group_sections): Rewrite loops for better
1044 readability.
1045
c301e700
DD
10462009-03-30 DJ Delorie <dj@redhat.com>
1047
1048 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
1049 relocs when doing a relocatable link.
1050
3895f852
MM
10512009-03-28 Mark Mitchell <mark@codesourcery.com>
1052
1053 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
1054 "ERROR:", in error messages.
1055 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
1056 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
1057 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
1058 (elf32_arm_merge_eabi_attributes): Likewise.
1059 (elf32_arm_merge_private_bfd_data): Likewise.
1060
ea882e87
NC
10612009-03-27 Nick Clifton <nickc@redhat.com>
1062
1063 * section.c (bfd_get_section_contents): Detect and handle the case
1064 where a section has the SEC_IN_MEMORY flag set but no actual
1065 contents allocated.
1066
9433b9b1
AM
10672009-03-26 Alan Modra <amodra@bigpond.net.au>
1068
1069 PR 6494
1070 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
1071 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
1072 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
1073 if we don't find matching PT_LOAD when copying.
1074
dc1aa734
SR
10752009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
1076
1077 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
1078 the reloc descriptions.
1079
34d3d6b9
HPN
10802009-03-25 Hans-Peter Nilsson <hp@axis.com>
1081
1082 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
1083 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
1084 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
1085
34274ccc
L
10862009-03-24 H.J. Lu <hongjiu.lu@intel.com>
1087
1088 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
1089 (bfd_i386_arch_intel_syntax): Likewise.
1090 (i8086_arch): Likewise.
1091 (bfd_x86_64_arch): Likewise.
1092
019c5a2e
HPN
10932009-03-24 Hans-Peter Nilsson <hp@axis.com>
1094
6718f446
HPN
1095 * elf32-cris.c (cris_elf_relocate_section): <case
1096 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
1097 symbols for non-allocated sections. Don't check whether to
1098 generate R_CRIS_DTPMOD for non-allocated sections.
1099 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
1100 handle relocation GC:ing if applied to non-allocated section.
1101 (cris_elf_check_relocs): Similar.
1102
019c5a2e
HPN
1103 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
1104 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
1105 when emitting a known TP offset in the GOT.
1106
ffcfec52
AM
11072009-03-23 Alan Modra <amodra@bigpond.net.au>
1108
1109 * elf64-ppc.c (synthetic_opd): Delete.
1110 (compare_symbols): Look for .opd name rather than section match.
1111 (ppc64_elf_get_synthetic_symtab): Likewise.
1112
c6dd29ce
AM
11132009-03-21 Alan Modra <amodra@bigpond.net.au>
1114
1115 * elf32-ppc.c (is_pic_glink_stub): Delete.
1116 (is_nonpic_glink_stub): New function.
1117 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
1118 than first pic one.
1119 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
1120
8c21ca21
AK
11212009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
1122 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
1123
1124 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
4f360784 1125 macros for visibilty and locality checks.
8c21ca21
AK
1126 (elf_s390_adjust_dynamic_symbol): Likewise.
1127 (allocate_dynrelocs): Likewise.
1128 (elf_s390_relocate_section): Likewise.
1129 (elf_s390_finish_dynamic_symbol): Likewise.
1130 * elf64-s390.c (elf_s390_check_relocs): Likewise.
1131 (elf_s390_adjust_dynamic_symbol): Likewise.
1132 (allocate_dynrelocs): Likewise.
1133 (elf_s390_relocate_section): Likewise.
1134 (elf_s390_finish_dynamic_symbol): Likewise.
1135
156621f3
KT
11362009-03-19 Kai Tietz <kai.tietz@onevision.com>
1137
1138 * bfd-in2.h: Regenerated.
1139 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
1140 for debugging sections and map memory read/write dependent on
1141 SEC_COFF_NOREAD.
1142 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
1143 without memory read flags set.
1144 * section.c: Add SEC_COFF_NOREAD to section flags.
1145
d1fa68d3
AS
11462009-03-19 Andreas Schwab <schwab@linux-m68k.org>
1147
1148 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
1149 for format string.
1150
ad2adbc8
AM
11512009-03-19 Alan Modra <amodra@bigpond.net.au>
1152
1153 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
1154 "no overlays" return. If there are overlays, create overlay
1155 manager entry symbols here, so that..
1156 (spu_elf_build_stubs): ..we don't need to set them up here.
1157 Simplify entry symbol tests.
1158 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
1159
67cc5033
MK
11602009-03-18 Mark Kettenis <kettenis@gnu.org>
1161
d1fa68d3 1162 * elf.c (elfcore_grok_openbsd_procinfo)
67cc5033
MK
1163 (elfcore_grok_openbsd_note): New functions.
1164 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
1165
8d25cc3d
AM
11662009-03-18 Alan Modra <amodra@bigpond.net.au>
1167
3889c459 1168 * vms-hdr.c: Don't include alloca.h.
8d25cc3d
AM
1169 * elf32-m68hc1x.c: Include alloca-conf.h.
1170 * xsym.c: Likewise.
1171 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
1172 * som.c: Likewise.
1173 * Makefile.am: Run "make dep-am".
1174 * Makefile.in: Regenerate.
1175
a89e6478
DJ
11762009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
1177
1178 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
1179
a7e11ee1
AM
11802009-03-17 Alan Modra <amodra@bigpond.net.au>
1181
1182 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
1183 Add compact_stub.
1184 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
1185 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
1186 ovly_return fields with ovly_entry[2]. Adjust all users.
1187 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
1188 when soft-icache.
1189 (spu_elf_build_stubs): Likewise.
1190 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
1191 ovly_flavour changes. Update all callers.
1192 (ovl_stub_size_log2): New function.
1193 (build_stub): Handle compact icache stubs. Use different manager
1194 entry point for stubs in non-icache area.
1195 (spu_elf_size_stubs): Don't allocate space for indirect branch
1196 descriptors.
1197 (spu_elf_build_stubs): And don't built them.
1198
607a83c9
AS
11992009-03-16 Andrew Stubbs <ams@codesourcery.com>
1200
1201 * dwarf2.c (read_section): Always use rawsize, if available.
1202
588f62fc
AM
12032009-03-16 Alan Modra <amodra@bigpond.net.au>
1204
1205 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
1206 of rawsize and size for buffer.
1207
a14c90c1
UW
12082009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
1209
1210 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
1211 parameter just because fixed sections fit into local store.
1212 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
1213 generating overlays if fixed sections plus reserved stack
1214 and heap space fit into local store.
1215
30c665df
AM
12162009-03-15 Alan Modra <amodra@bigpond.net.au>
1217
1218 * elf32-spu.c (build_stub): Correct icache set_id.
1219 (spu_elf_relocate_section): Likewise.
1220
f95942a3
RS
12212009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1222
1223 * xcofflink.c (xcoff_link_check_archive_element): Only free the
1224 symbol table if it was created by the current call.
1225
670562e9
RS
12262009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1227
1228 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
1229 class XMC_DS rather than XMC_UA.
1230
b64232cc
RS
12312009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1232
1233 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
1234 bfd_boolean export_defineds parameter with an unsigned int
1235 auto_export_flags parameter.
1236 * bfd-in2.h: Regenerate.
1237 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
1238 split out from xcoff_build_ldsyms.
1239 (xcoff_covered_by_expall_p): New function.
1240 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
1241 but with extra code to handle -bexpfull and -bexpall.
1242 (xcoff_mark_auto_exports): New function.
1243 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
1244 a function should be automatically exported.
1245 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
1246 parameter with an auto_export_flags parameter. Update ldinfo
1247 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
1248 exported symbols.
1249
7d504122
RS
12502009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1251
1252 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
1253 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
1254 init and fini functions. Do garbage collection for objects
1255 without an entry point too.
1256
8602d4fe
RS
12572009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1258
1259 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
1260 check whether a symbol has csect information.
1261 (coff_print_aux): Likewise.
1262 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
1263 information for C_AIX_WEAKEXT too.
1264 (_bfd_xcoff_swap_aux_out): Likewise.
1265 (xcoff_reloc_type_br): Handle defweak symbols too.
1266 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
1267 information for C_AIX_WEAKEXT too.
1268 (_bfd_xcoff64_swap_aux_out): Likewise.
1269 (xcoff64_reloc_type_br): Handle defweak symbols too.
1270 * coffgen.c (coff_print_symbol): Handle auxillary function
1271 information for C_AIX_WEAKEXT too.
1272 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
1273 instead of BSF_GLOBAL if the L_WEAK flag is set.
1274 (xcoff_dynamic_definition_p): New function.
1275 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
1276 defines h. Don't change h if ldsym isn't the definition. Otherwise,
1277 always take the symbol class from the ldsym. Use weak bfd symbol
1278 types for weak ldsyms.
1279 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
1280 Fix the check for whether a definition is from a shared object.
1281 Allow redefinitions of weak symbols.
1282 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
1283 (xcoff_keep_symbol_p): Likewise.
1284 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
1285 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
1286 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
1287 but mark them as L_WEAK.
1288 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
1289 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
1290
5b49f6dc
RS
12912009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1292
1293 * xcofflink.c (xcoff_mark): When walking the relocations,
1294 only mark the target symbol or the target section, not both.
1295 (xcoff_final_definition_p): New function.
1296 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
1297 symbol is a valid definition of the associated output symbol.
1298 Use XCOFF_ALLOCATED to stop the same hash table entry having
1299 two output symbols.
1300 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
1301 keeping a symbol.
1302 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
1303
c4037431
RS
13042009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1305
1306 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
1307 symbols as XMC_XO.
1308
3df13c4a
RS
13092009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1310
1311 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
1312 * libcoff.h: Regenerate.
1313 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
1314 line-number counts in the bfd's lineno_counts field.
1315 Don't keep per-csect line-number counts.
1316 (xcoff_sweep): Don't update per-csect line-number counts.
1317 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
1318 entries in each output section.
1319 (xcoff_link_input_bfd): Get the number of line numbers from
1320 the bfd's lineno_counts field, rather than recalculating it
1321 from scratch. Fix the range check when updating C_BINCL and
1322 C_EINCL symbols.
1323 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
1324 here. Don't expect csects to have line-number counts.
1325
e450936a
RS
13262009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1327
1328 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
1329 * libcoff.h: Regenerate.
1330 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
1331 "skip" logic from xcoff_link_input_bfd.
1332 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
1333 objects in a dynamic link, rather than checking whether csectpp
1334 is null. Always allocate debug_index for other objects,
1335 and always go through the loop. Update the type of debug_index
1336 after the change above. Read the auxillary csect information
1337 and use xcoff_keep_symbol_p to decide whether a symbol should
1338 be kept. Set its debug_index to -2 if not.
1339 (xcoff_link_input_bfd): Update the type of debug_index after
1340 the change above and always expect it to be nonnull. Use it to
1341 test whether a symbol should be stripped, rather than making the
1342 decision here. Postpone all symbol creation to the second pass.
1343
47dfb2ca
RS
13442009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1345
1346 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
1347 creating a descriptor.
1348 (xcoff_sweep): Don't mark toc_section unless it's needed.
1349 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
1350 when marking every bfd.
1351 (xcoff_link_input_bfd): Skip all TOC anchors.
1352 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
1353 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
1354 to -1; call xcoff_find_tc0 instead.
1355
4cc02a02
RS
13562009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1357
1358 * libcoff-in.h (xcoff_section_tdata): Update commentary.
1359 * libcoff.h: Regenerate.
1360 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
1361 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
1362 the previous symbol's csect. Treat last_symndx as an inclusive value
1363 and simplify its handling.
1364 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
1365 symbols with the right csect. Don't mark rsec when processing
d1fa68d3 1366 relocations against undefined or absolute sections.
4cc02a02
RS
1367 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
1368 of bfd_und_section_ptr.
1369 (xcoff_link_input_bfd): Likewise.
1370
858ef0ce
RS
13712009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1372
1373 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
1374 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
1375 flag is set. Assert that all undefined symbols are either
1376 imported or defined by a dynamic object.
1377 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
1378 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
1379 handling to all relocations. Only set XCOFF_CALLED for function
1380 symbols.
1381 (xcoff_find_function): New function, split out from...
1382 (bfd_xcoff_export_symbol) ...here.
1383 (xcoff_set_import_path): New function, split out from...
1384 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
1385 meaning of XCOFF_CALLED.
1386 (xcoff_mark_symbol): If we mark an undefined and unimported
1387 symbol, find some way of defining it. If the symbol is a function
1388 descriptor, fill in its definition automatically. If the symbol
1389 is a function, mark its descriptor and allocate room for global
1390 linkage code. Otherwise mark the symbol as implicitly imported.
1391 Move the code for creating function descriptors from...
d1fa68d3 1392 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
858ef0ce
RS
1393 check for symbols that were implicitly defined.
1394 (xcoff_mark): Don't count any dynamic relocations against
1395 function symbols.
1396 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
1397 in the xcoff link info.
1398 (xcoff_link_input_bfd): Remove handling of undefined and
1399 unexported symbols.
1400
12b2cce9
RS
14012009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1402
1403 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
1404 if the target is absolute. Fix comment typo.
1405 (xcoff_ppc_relocate_section): Remove FIXME.
1406 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
1407 if the target is absolute.
1408
0e3212ad
RS
14092009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1410
1411 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
1412 R_POS and R_NEG relocations against absolute symbols to the
1413 .loader section.
1414
d19d97e9
RS
14152009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1416
1417 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
1418 to 2 for bfd_mach_ppc_620.
1419
e5231592
RS
14202009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
1421
1422 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
1423 * configure.in: Likewise.
1424 * configure: Regenerate.
1425
3516e984
L
14262009-03-13 H.J. Lu <hongjiu.lu@intel.com>
1427
1428 PR binutils/9945
1429 * elf.c (assign_section_numbers): Generate symbol table if there
1430 is any relocation in output.
1431 (_bfd_elf_compute_section_file_positions): Likewise.
1432
ce98a316
NC
14332009-03-13 Nick Clifton <nickc@redhat.com>
1434
1435 PR 9934
1436 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
1437 * elflink.c (elf_link_read_relocs_from_section): Use
1438 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
1439 relocs but no symbol table.
1440 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
1441
c4fb387b
L
14422009-03-12 H.J. Lu <hongjiu.lu@intel.com>
1443
1444 PR ld/9938
1445 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
1446 to check ___tls_get_addr.
1447
1448 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
1449 strncmp to check __tls_get_addr.
1450
53638231
AS
14512009-03-12 Andrew Stubbs <ams@codesourcery.com>
1452
1453 * dwarf2.c (read_section): Always check the offset, even when the
1454 section has been read before.
1455
09e8c3bf
L
14562009-03-11 H.J. Lu <hongjiu.lu@intel.com>
1457
1458 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
1459 comments.
1460
36e4dce6
CD
14612009-03-11 Chris Demetriou <cgd@google.com>
1462
1463 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
1464 * bfd-in2.h: Regenerate.
1465 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
1466 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
1467 mode.
1468 (bsd_write_armap): Likewise.
1469 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
1470 flag is set, do nothing.
1471 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
1472 for timestamp.
1473
9b175a76
UW
14742009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
1475
1476 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
1477 used to update stack pointer.
1478
f501de17
DA
14792009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1480
1481 PR binutils/9921
1482 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
1483 for unknown symbols in absolute section.
1484
d11fd249
NC
14852009-03-06 Nick Clifton <nickc@redhat.com>
1486
1487 * po/es.po: Updated Spanish translation.
1488
8cd931b7
CL
14892009-03-05 Christophe Lyon <christophe.lyon@st.com>
1490
1491 * elf32-arm.c (group_sections): Take next section size into
1492 account before accepting to group it.
1493
5fa9e92f
CL
14942009-03-05 Christophe Lyon <christophe.lyon@st.com>
1495
1496 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
1497 PLT entries.
1498 (elf32_arm_final_link_relocate): Likewise.
1499
b92997d6
AM
15002009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
1501
1502 PR 9923
1503 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
1504
727fc41e
AM
15052009-03-04 Alan Modra <amodra@bigpond.net.au>
1506
1507 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
1508 * section.c (struct bfd_section): Add has_tls_get_addr_call.
1509 (BFD_FAKE_SECTION): Init new flag.
1510 * ecoff.c (bfd_debug_section): Likewise.
1511 * bfd-in2.h: Regenerate.
1512 * libbfd.h: Regenerate.
1513 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
1514 (ppc_elf_reloc_type_lookup): Handle new relocs.
1515 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
1516 without marker relocs.
1517 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
1518 if section has no old-style calls.
1519 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
1520 Don't try to optimize new-style __tls_get_addr call when handling
1521 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
1522 relocs.
1523 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
1524 (ppc64_elf_reloc_type_lookup): Handle new relocs.
1525 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
1526 without marker relocs.
1527 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
1528 if section has no old-style calls. Set toc_ref for new relocs as
1529 appropriate.
1530 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
1531 Don't try to optimize new-style __tls_get_addr call when handling
1532 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
1533 relocs.
1534
51dec227
AM
15352009-03-04 Alan Modra <amodra@bigpond.net.au>
1536
1537 PR 6768
1538 * configure.in: Test for ld --as-needed support. Link shared
1539 libbfd against libm.
1540 * configure: Regenerate.
1541
a1f7ca36
AM
15422009-03-03 Alan Modra <amodra@bigpond.net.au>
1543
1544 * Makefile.am: Run "make dep-am".
1545 * Makefile.in: Regenerate.
1546
c3b7224a
NC
15472009-03-02 Qinwei <qinwei@sunnorth.com.cn>
1548
1549 * elf32-score7.c: New file.
1550 * elf32-score.h: New file.
1551 * elf32-score.c: Add code to support score 7. Set score7 as the
1552 default.
1553 * cpu-score.c: Add score7 architecure.
1554 (compatibile): New function.
1555 * Makefile.am: Add rules for building elf32-score7 object.
1556 * Makefile.in: Regenerate.
1557 * configure.in: Add elf32-score7 object to score vectors.
1558 * configure: Regenerate.
1559 * reloc.c: Add score7 relocs.
1560 * archures.c: Add score3 and score7 machine numbers.
1561 * bfd-in2.h: Regenerate.
1562 * libbfd.h: Regenerate.
1563
58e24671
RW
15642009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1565
1566 * configure: Regenerate.
1567
5887528b
DA
15682009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1569
d45b7d74
DA
1570 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
1571 (elf32_hppa_check_relocs): Use it.
1572
5887528b
DA
1573 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
1574 elf64-hppa.c.
1575 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
1576 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
1577 (elf_hppa_is_dynamic_loader_symbol): Likewise.
1578 (elf_hppa_record_segment_addrs): Likewise.
1579 (elf_hppa_final_link): Likewise.
1580 (elf_hppa_relocate_insn): Likewise.
1581 (elf_hppa_final_link_relocate): Likewise.
1582 (elf64_hppa_relocate_section): Likewise.
1583 * elf64-hppa.c: Insert above.
1584
a03bd320
DA
15852009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1586
1587 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
1588 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
1589 (elf_hppa_relocate_section): Likewise.
1590 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
1591 from struct elf_link_hash_entry. Add count field.
1592 (struct elf64_hppa_dyn_hash_table): Delete.
1593 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
1594 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
1595 (hppa_elf_hash_entry, eh_name): Define.
1596 (elf64_hppa_new_dyn_hash_entry): Delete.
1597 (elf64_hppa_dyn_hash_lookup): Delete.
1598 (elf64_hppa_dyn_hash_traverse): Delete.
1599 (get_dyn_name): Delete.
1600 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
1601 of struct elf64_hppa_dyn_hash_entry *.
1602 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
1603 allocate_global_data_plt, allocate_global_data_stub,
1604 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
1605 Likewise.
1606 (hppa64_link_hash_newfunc): New.
1607 (elf64_hppa_hash_table_create): Rework.
1608 (count_dyn_reloc): Likewise.
1609 (hppa64_elf_local_refcounts): New.
1610 (elf64_hppa_check_relocs): Rework using standard technique for recording
1611 local DLT, PLT and OPD reference counts.
1612 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
1613 elf_link_hash_entry *.
1614 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
1615 allocate_global_data_plt, allocate_global_data_stub,
1616 allocate_global_data_opd, allocate_dynrel_entries,
1617 elf64_hppa_adjust_dynamic_symbol,
1618 elf64_hppa_mark_milli_and_exported_functions): Likewise.
1619 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
1620 Use hppa_link_hash_table. Rework.
1621 (elf64_hppa_link_output_symbol_hook): Rework.
1622 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
1623 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
1624 elf64_hppa_finish_dynamic_sections): Likewise.
1625
ebe24dd4
CL
16262009-02-26 Christophe Lyon <christophe.lyon@st.com>
1627
1628 * elf32-arm.c (stub_reloc_type): Removed.
1629 (insn_sequence): Renamed reloc_type field to r_type.
1630 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
1631 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
1632 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
1633 (elf32_arm_stub_type): Add new enum entries for the new stubs.
1634 (arm_stub_is_thumb): Catch new stubs.
1635 (arm_type_of_stub): Handle new stubs.
1636 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
1637 (bfd_elf32_arm_process_before_allocation): Remove useless
1638 condition.
1639
b9d678e0
L
16402009-02-25 H.J. Lu <hongjiu.lu@intel.com>
1641
1642 * elf.c (elf_find_function): Use is_function_type to check
1643 function symbol.
1644
56fb3749
SA
16452009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
1646
1647 * xtensa-modules.c: Revert to previous version 1.11 due
1648 to inadvertant commit.
1649
658ff993
SA
16502009-02-24 Sterling Augustine <sterling@tensilica.com>
1651
1652 * elf32-xtensa.c (text_action_add): Separate test for action
1653 type. Break if saved action is ta_widen_insn at same offset.
1654
cf3eccff
DJ
16552009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
1656
1657 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
1658 to elf32_arm_stub_long_branch_any_arm_pic.
1659 (elf32_arm_stub_long_branch_any_thumb_pic): New.
1660 (enum elf32_arm_stub_type, arm_type_of_stub)
1661 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
1662 separately.
1663
07d72278
DJ
16642009-02-24 Joseph Myers <joseph@codesourcery.com>
1665
1666 * elf32-arm.c (PREV_SEC): Update comment.
1667 (group_sections): Rename argument to stubs_always_after_branch.
1668 Reverse the list and place stubs at the end of input sections.
1669 Undefine NEXT_SEC.
1670 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
1671
4e31c731
DJ
16722009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
1673
1674 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
1675 Fix formatting.
1676 (arm_size_one_stub): Remove unnecessary break.
1677 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
1678
16792009-02-23 Christophe Lyon <christophe.lyon@st.com>
461a49ca
DJ
1680
1681 * elf32-arm.c (stub_insn_type): New type.
1682 (stub_reloc_type): Likewise.
1683 (insn_sequence): Likewise.
1684 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
1685 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
1686 (elf32_arm_stub_long_branch_thumb_only): Likewise.
1687 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
1688 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
1689 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
1690 (elf32_arm_stub_hash_entry): Add new helper fields.
1691 (stub_hash_newfunc): Initialize these new fields.
1692 (arm_build_one_stub): Encode Arm and Thumb instructions separately
1693 to take endianness into account.
1694 (arm_size_one_stub): Compute size of stubs using insn_sequence.
1695 (arm_map_one_stub): Code is now more generic, thanks to
1696 insn_sequence.
1697
c2b4a39d
CL
16982009-02-23 Christophe Lyon <christophe.lyon@st.com>
1699
1700 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
1701 code.
1702 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
1703 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
1704 BLX is not available. Fix typo in warning message. Add comments
1705 and improve formatting.
1706 (arm_build_one_stub): Adjust to new
1707 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
1708 (arm_map_one_stub): Likewise.
1709
0c376465 17102009-02-23 Tristan Gingold <gingold@adacore.com>
a60a89d6
TG
1711 Eric Botcazou <ebotcazou@adacore.com>
1712 Douglas B Rupp <rupp@gnat.com>
0c376465
TG
1713
1714 * vms.h: Update copyright year, fix comments, reorder declarations.
1715 (_bfd_save_vms_section): Remove the prototype.
1716 (EGPS_S_V_NO_SHIFT): New constant.
1717 (bfd_vms_set_section_flags): New prototype.
1718 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
1719 constants.
1720 (EGSY_S_W_FLAGS): Ditto.
1721 (EGSY_S_V_QUAD_VAL): Ditto.
1722 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
1723 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
1724 EGST_S_B_NAMLNG): Ditto.
1725 (ESRF_S_B_NAMLNG): Ditto.
1726 (ETIR_S_C_HEADER_SIZE): Ditto.
1727 (EGPS_S_V_ALLOC_64BIT): Ditto.
1728 (DST_S_C_EPILOG): Ditto.
1729 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
1730 (DST_S_C_SRC_INCRLNUM_B): Ditto.
1731 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
1732 (DST_S_L_PCLINE_UNSLONG): Ditto.
1733 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
1734 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
1735 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
1736 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
1737 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
1738 (DST_S_B_SRC_UNSBYTE): Ditto.
1739 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
1740 Add prototypes.
1741 (vms_section, vms_reloc): Remove types.
1742 (hdr_struc): Replaced by ...
1743 (hdr_struct): ... new type.
1744 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
1745 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
1746 (EMH_DATE_LENGTH): Ditto.
1747 (eom_struc): Replaced by ...
1748 (eom_struct): ... new type.
1749 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
1750 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
1751 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
1752 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
1753 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
1754 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
1755 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
1756 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
1757 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
1758 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
1759 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
1760 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
1761 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
1762 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
1763 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
1764 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
1765 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
1766 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
1767 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
1768 (enum file_type_enum): New type.
1769 (struct location_struct): Removed.
1770 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
1771 (struct funcinfo, struct module): Ditto.
1772 (struct vms_private_data_struct): Update fields.
1773 (struct vms_section_data_struct): New type.
1774
1775 * vms.c: Update copyright year, fix comments,
1776 Fix includes for DECC, add prototypes.
1777 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
1778 some initializers.
1779 Use flavour to set is_vax, location_stack is removed.
1780 (struct pair): Declare.
1781 (fill_section_ptr): Initialize variables at declaration.
1782 Add guard to set SECTION_SYM flag, handlde und section.
1783 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
1784 (_bfd_vms_slurp_object_records): New function, replaces previous
1785 vms_object_p.
1786 (vms_slurp_module): New function.
1787 (vms_slurp_image): Ditto.
1788 (vms_object_p): Complete rewrite.
1789 (vms_mkobject): Use is_vax field to slect architecture.
1790 (free_reloc_stream): New function.
1791 (vms_convert_to_var): Ditto.
1792 (vms_convert_to_var_1): Ditto.
1793 (vms_convert_to_var_unix_filename): Ditto.
1794 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
1795 VAR format on VMS.
1796 (vms_new_section_hook): Set alignment to 0, allocate private data.
1797 (vms_get_section_contents): Load content.
1798 (vms_get_symbol_info): Handle undefined section.
1799 (vms_find_nearest_line): Handle.
1800 (alloc_reloc_stream): New function.
1801 (vms_slurp_reloc_table): Ditto.
1802 (vms_get_reloc_upper_bound): Make it real.
1803 (vms_canonicalize_reloc): Do the real work.
1804 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
1805 ALPHA_R_BOH.
1806 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
1807 (vms_set_arch_mach): Check arch.
1808 (vms_set_section_contents): Copy the content after allocation.
1809 (vms_alpha_vec): Update object flags.
1810
1811 * vms-tir.c: Update copyright year, fix comments,
1812 add prototypes for new functions.
1813 (dst_define_location): New function.
1814 (dst_restore_location): New function.
1815 (dst_retrieve_location): New function.
1816 (dst_check_allocation): New function.
1817 (image_dump): Call dst_check_allocation.
1818 (image_write_b): Ditto.
1819 (image_write_w): Ditto.
1820 (image_write_l): Ditto.
1821 (image_write_q): Ditto.
1822 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
1823 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
1824 CTL_STKDL.
1825 Call error handler instead of abort if name is not known.
1826 (etir_sta): Add quarter_relocs argument and set it.
1827 Fix cast.
1828 (etir_sto): Ditto.
1829 (etir_opr): Ditto, return FALSE in case of error.
1830 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
1831 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
1832 (etir_stc): Add quarter_relocs argument and set it, fix cast.
1833 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
1834 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
1835 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
1836 Return FALSE in case of error.
1837 (tir_sta): Change sign of psect.
1838 (tir_ctl): Ditto.
1839 (tir_cmd): Fix cast. Makes tir_table static const.
1840 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
1841 add argument to explain.
1842 (analyze_etir): Initialize maxptr, add quarter_relocs
1843 declaration, move some declarations into inner scopes.
1844 Handle quarter_relocs and STO_IMM.
1845 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
1846 (_bfd_vms_slurp_relocs): New function.
1847 (_bfd_vms_decode_relocs): New function.
1848 (sto_imm): Rewritten.
1849 (start_first_etbt_record): New function.
1850 (start_another_etbt_record): Ditto.
1851 (etir_output_check): Ditto.
1852 (defer_reloc_p): Ditto.
1853 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
1854 a for-loop. Correctly deals with contents, deals with .vmsdebug,
1855 rewritte relocations handling.
1856 (_bfd_vms_write_tbt): Removed.
1857 (_bfd_vms_write_dbg): Ditto.
1858
1859 * vms-misc.c: Update copyright year, Fix comments.
1860 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
1861 (maybe_adjust_record_pointer_for_object): New function.
1862 (_bfd_vms_get_first_record): New function, replaces ...
1863 (_bfd_vms_get_record): .. removed.
1864 (_bfd_vms_get_object_record): New function.
1865 (_bfd_vms_get_object_record): New function.
1866 (vms_get_remaining_object_record): New function, replaces ...
1867 (_bfd_vms_get_next_record): ... removed.
1868 (add_new_contents): Removed.
1869 (_bfd_save_vms_section): Removed.
1870 (_bfd_get_vms_section): Removed.
1871 (_bfd_vms_output_flush): Write in VAR format.
1872 (new_symbol): Don't make UND section.
1873
1874 * vms-hdr.c: Update copyright year, update list of record handled.
1875 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
1876 (_bfd_vms_write_hdr): Strip vms and unix patches,
1877 add comments, truncate module name at 31 characters,
1878 use constants instead of hard-coded value,
1879 write BFD version instead of a fixed string.
1880 (_bfd_vms_slurp_ihd): New function.
1881 (_bfd_vms_slurp_isd): Ditto.
1882 (_bfd_vms_slurp_ihs): Ditto.
1883 (new_module): Ditto.
1884 (parse_module): Ditto
1885 (build_module_list): Ditto.
1886 (module_find_nearest_line): Ditto.
1887 (_bfd_vms_find_nearest_dst_line): Ditto.
1888 (vms_slurp_debug): Ditto.
1889 (_bfd_vms_slurp_dbg): Ditto.
1890 (_bfd_vms_slurp_tbt): Ditto.
1891 (_bfd_vms_write_dbg): Ditto.
1892 (_bfd_vms_write_tbt): Ditto.
1893
1894 * vms-gsd.c: Update copyright year, update list of records handled.
1895 (EVAX_LITERALS_NAME): New macro.
1896 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
1897 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
1898 (register_universal_symbol): New function and prototype.
1899 (_bfd_vms_slurp_gsd): Fix indentations and casts,
1900 improve debug messages,
1901 use constants instead of hard-coded value,
1902 fix missing endianness conversion,
1903 handle global symbol (SYMG).
1904 (bfd_vms_set_section_flags): New function.
1905 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
1906 handle section literals,
1907 fix indentation,
1908 handle section bfd and vms flags,
1909 don't output LIB$INITIALIZE symbol,
1910 fix handling of weak symbols,
1911 fix evax vs vax procedure descriptor,
1912 handle absolute symbols.
1913
1914 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
1915 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
1916
1917 * makefile.vms (DEFS): Fix flags for VMS.
1918
1919 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
1920
1921 * bfd-in2.h: Regenerated.
1922 * libbfd.h: Regenerated.
1923
47149254
CC
19242009-02-20 Cary Coutant <ccoutant@google.com>
1925
1926 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
1927 in struct stat.
1928
6b1cecf3
DK
19292009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
1930
1931 PR gas/7059
1932 * coffcode.h (coff_write_object_contents): Don't let the string
1933 table offset overflow the s_name field when using long section names.
1934
88183869
DK
19352009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
1936
1937 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
1938 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
1939 * coff-mips.c (mips_ecoff_backend_data): Likewise.
1940 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
1941 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
1942 (bfd_pmac_xcoff_backend_data): Likewise.
1943 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
1944 (bfd_xcoff_aix5_backend_data): Likewise.
1945 (xcoff64_write_object_contents): Delete unused long_section_names
1946 local variable.
1947 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
1948 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
1949 struct non-const.
1950 * coffcode.h (documentation): Update to describe long section names.
1951 (COFFLONGSECTIONCATHELPER): New helper macro.
1952 (BLANKOR1TOODD): Likewise.
1953 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
1954 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
1955 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
1956 (bfd_coff_set_long_section_names_allowed): New function.
1957 (bfd_coff_set_long_section_names_disallowed): Likewise.
1958 (struct bfd_coff_backend_data): Add new backend hook function
1959 pointer _bfd_coff_set_long_section_names.
1960 (bfd_coff_set_long_section_names): New backend hook.
1961 (coff_write_object_contents): Only generate long section names if
1962 bfd_coff_long_section_names() indicates they are currently enabled.
1963 (bfd_coff_std_swap_table): Make non-const, and initialise long
1964 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
1965 (ticoff0_swap_table): Likewise to both.
1966 (ticoff1_swap_table): Again, likewise to both.
1967 * coffgen.c (make_a_section_from_file): Allow long section names
1968 as inputs even if not currently allowed for outputs.
1969 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
1970 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
1971 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
1972 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1973 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
1974 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
1975 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1976 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
1977 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
1978 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1979 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
1980 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
1981 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
1982 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
1983 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
1984 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
1985 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
1986 * libcoff-in.h: Update copyright year to cause updated copyright
1987 year in generated libcoff.h, and fix typo.
1988 * libcoff.h: Regenerated.
1989 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
1990 (_bfd_ecoff_no_long_sections): Add prototype.
1991 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
1992 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
1993 defined by an including .c file.
1994 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
1995 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
1996 (ticoff1_swap_table): Likewise to both.
1997
90d8a22c
CL
19982009-02-18 Christophe Lyon <christophe.lyon@st.com>
1999
2000 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
2001 stub. Catch default case error.
2002 (arm_map_one_stub): Add missing Thumb mapping symbol.
2003
12123067
NC
20042009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
2005
2006 PR 9841
2007 * elf32-avr.c: Handle case where no local symbos exist correctly.
2008
fea2b4d6
CL
20092009-02-16 Christophe Lyon <christophe.lyon@st.com>
2010
2011 bfd/
2012 * elf32-arm.c (arm_long_branch_stub,
2013 arm_thumb_v4t_long_branch_stub,
2014 arm_thumb_thumb_long_branch_stub,
2015 arm_thumb_arm_v4t_long_branch_stub,
2016 arm_thumb_arm_v4t_short_branch_stub,
2017 arm_pic_long_branch_stub):
2018 Renamed to elf32_arm_stub_long_branch_any_any,
2019 elf32_arm_stub_long_branch_v4t_arm_thumb,
2020 elf32_arm_stub_long_branch_thumb_only,
2021 elf32_arm_stub_long_branch_v4t_thumb_arm,
2022 elf32_arm_stub_short_branch_v4t_thumb_arm,
2023 elf32_arm_stub_long_branch_any_any_pic.
2024 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
2025 arm_thumb_thumb_stub_long_branch,
2026 arm_thumb_arm_v4t_stub_long_branch,
2027 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
2028 Renamed to arm_stub_long_branch_any_any,
2029 arm_stub_long_branch_v4t_arm_thumb,
2030 arm_stub_long_branch_thumb_only,
2031 arm_stub_long_branch_v4t_thumb_arm,
2032 arm_stub_short_branch_v4t_thumb_arm,
2033 arm_stub_long_branch_any_any_pic.
2034
13e0a874
DA
20352009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2036
2037 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
2038 in branch offset check.
2039
3a71aa26
AM
20402009-02-15 Alan Modra <amodra@bigpond.net.au>
2041
2042 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
2043 add toc.symndx and toc.add.
2044 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
2045 Set up toc.add.
2046 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
2047 callers.
2048 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
2049 (branch_reloc_hash_match): New function, extracted from..
2050 (ppc64_elf_tls_optimize): ..here.
2051 (ppc64_elf_relocate_section): Properly set addends when optimizing
2052 tls sequences. Avoid unnecessary reading and writing of insns.
2053 Only redo reloc when symbol changed. Bypass symbol checks when
2054 using tlsld_got.
2055 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
2056 (branch_reloc_hash_match): New function, extracted from..
2057 (ppc_elf_tls_optimize): ..here.
2058 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
2059 Don't clear addend on zapped __tls_get_addr reloc.
2060
2c2b4ed4
NC
20612009-02-12 Nick Clifton <nickc@redhat.com>
2062
2063 PR 9827
2064 * elflink.c (bfd_elf_final_link): When counting the relocations,
2065 if the header size has not been set yet then assume that it will
2066 match the output section's reloc type.
2067
453f5985
NS
20682009-02-12 Nathan Sidwell <nathan@codesourcery.com>
2069
2070 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
2071 relocatable link.
2072
3209bffa
AM
20732009-02-09 Alan Modra <amodra@bigpond.net.au>
2074
2075 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
2076 (find_function): Likewise.
2077 (pasted_function): Don't error if no prior function found.
2078 (discover_functions): Revert 2008-12-10 change. Extend first
2079 function range to start of section.
2080
813c8a3c
DA
20812009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2082
2083 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
2084 functions to C90.
2085 * elf64-hppa.h: Likewise.
2086
2d0f9ad9
JM
20872009-02-06 Joseph Myers <joseph@codesourcery.com>
2088
2089 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
2090 .sbss handling.
2091
50e00962
AM
20922009-02-04 Alan Modra <amodra@bigpond.net.au>
2093
2094 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
2095 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
2096
52b6b6b9
JM
20972009-02-03 Sandip Matte <sandip@rmicorp.com>
2098
2099 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
2100 * archures.c (bfd_mach_mips_xlr): Define.
2101 * bfd-in2.h: Regenerate.
2102 * cpu-mips.c (I_xlr): Define.
2103 (arch_info_struct): Add XLR entry.
2104 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
2105 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
2106 (mips_mach_extensions): Add XLR entry.
2107
654c3c9f
EW
21082009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
2109
2110 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
2111
31dd3154
JM
21122009-02-03 Carlos O'Donell <carlos@codesourcery.com>
2113
2114 * configure.in: AC_SUBST pdfdir.
d1fa68d3 2115 * Makefile.am: Add install-pdf, install-pdf-am
31dd3154
JM
2116 and install-pdf-recursive targets. Define pdfdir.
2117 * doc/Makefile.am: Define pdf__strip_dir. Add
2118 install-pdf and install-pdf-am targets.
d1fa68d3 2119 * po/Make-in: Add install-pdf target.
31dd3154
JM
2120 * configure: Regenerate.
2121 * Makefile.in: Regenerate
2122 * doc/Makefile.in: Regenerate.
2123
cf869cce
NC
21242009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
2125
2126 * bfd-in2.h: Regenerate.
2127 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
2128 fields from n_entries to n_slots where appropriate, update comments.
2129 (HOWTO): Add TLS relocations.
2130 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
2131 (enum elf_m68k_got_offset_size): New enum.
2132 (struct elf_m68k_got_entry.type): Move field to ...
2133 (struct elf_m68k_got_entry_key): ... here. Update all uses.
2134 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
2135 functions.
2136 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
2137 functions.
2138 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
2139 fields into n_entries array. Update comments.
2140 (elf_m68k_init_got): Simplify, update all uses.
2141 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
2142 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
2143 GOT entries; update name, update all uses.
2144 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
2145 (elf_m68k_get_got_entry): Update.
2146 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
2147 simplify.
2148 (elf_m68k_remove_got_entry_type): Simplify.
2149 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
2150 (elf_m68k_can_merge_gots): Update.
2151 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
2152 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
2153 GOT entries, simplify.
2154 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
2155 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
2156 field, remove obsoleted local_n_entries field.
2157 (elf_m68k_partition_multi_got_2): New static function.
2158 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
2159 update.
2160 (elf_m68k_remove_got_entry_type): Update.
2161 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
d1fa68d3 2162 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
cf869cce
NC
2163 update of sgot->size and srelgot->size.
2164 (elf_m68k_gc_sweep_hook): Update.
2165 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
2166 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
2167 TLS relocations.
2168 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
2169 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
2170
c1a0a41f
DD
21712009-02-02 DJ Delorie <dj@redhat.com>
2172
2173 * elf32-mep.c (config_names): Regenerate configuration.
2174
72a80a16
AM
21752009-02-02 Alan Modra <amodra@bigpond.net.au>
2176
2177 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
2178 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
2179 * elf.c (bfd_elf_get_str_section): Make static.
2180 (bfd_elf_find_section): Delete.
2181 * libbfd.h: Regenerate.
2182
273f4430
JK
21832009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
2184
2185 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
2186 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
2187
010e5ae2
AM
21882009-01-31 Alan Modra <amodra@bigpond.net.au>
2189
2190 * elflink.c (on_needed_list): New function.
2191 (elf_link_add_object_symbols): Link in --as-needed libs if they
2192 satisfy undefined symbols in other libs.
2193
33a7ffc2
JM
21942009-01-30 Julian Brown <julian@codesourcery.com>
2195
2196 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
2197 EXEC_P or DYNAMIC flags, and skip sections which are being linked
2198 with --just-symbols (-R).
2199
13d72a14
AN
22002009-01-29 Adam Nemet <anemet@caviumnetworks.com>
2201
2202 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
2203 high_pc in order to properly sign-extend VMAs.
2204
d334575b 22052009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
d1fa68d3
AS
2206 Mark Shinwell <shinwell@codesourcery.com>
2207 Catherine Moore <clm@codesourcery.com>
d334575b
JM
2208
2209 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
2210
528aeb62
CM
22112009-01-28 Catherine Moore <clm@codesourcery.com>
2212
2213 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
2214 SEC_LOAD for dynamic relocation sections.
2215
f6f05983
HPN
22162009-01-27 Hans-Peter Nilsson <hp@axis.com>
2217
2218 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
2219 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
2220 the size of local TLS data.
2221
27cc28f9
AS
22222009-01-27 Andreas Schwab <schwab@suse.de>
2223
2224 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
2225 architectures in the archive.
2226
b3bf42d8
HPN
22272009-01-27 Hans-Peter Nilsson <hp@axis.com>
2228
f551b6f0
HPN
2229 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
2230 <R_CRIS_32_DTPREL>: Correct relocation value.
2231
b3bf42d8
HPN
2232 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
2233 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
2234 symbols with non-default visibility.
2235
9bc4e62b
NS
22362009-01-26 Nathan Sidwell <nathan@codesourcery.com>
2237
2238 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
2239 describing the trampolines.
2240 (ppc_elf_relocate_section): Update relocs to describe the
2241 trampolines.
2242
aeaf6540
DA
22432009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2244
2245 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
2246 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
2247 and R_PARISC_PCREL12F relocations.
2248
1e8fa21e
AM
22492009-01-24 Alan Modra <amodra@bigpond.net.au>
2250
2251 PR 6022
2252 * elflink.c (find_version_for_sym): New function split out from,
2253 but without export_dynamic test, ..
2254 (_bfd_elf_link_assign_sym_version): ..here.
2255 (_bfd_elf_export_symbol): Use it.
2256
28caa186
AM
22572009-01-23 Alan Modra <amodra@bigpond.net.au>
2258
2259 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
2260 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
2261 * elflink.c: ..here, somewhat modified.
2262 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
2263 _bfd_elf_link_find_version_dependencies,
2264 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
2265 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2266 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
2267 declare..
2268 * elflink.c: ..and make static here.
2269 (_bfd_elf_link_find_version_dependencies): Adjust for removal
2270 of output_bfd from struct elf_find_verdep_info.
2271 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
2272 struct elf_info_failed.
2273 (bfd_elf_size_dynamic_sections): Adjust.
2274
be04437d
AM
22752009-01-22 Alan Modra <amodra@bigpond.net.au>
2276
2277 PR 6832
2278 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
2279 after comp_unit_find_line call.
2280
58f9615c
NC
22812009-01-21 Nick Clifton <nickc@redhat.com>
2282
2283 PR 9769
2284 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
2285 tm_gmtoff field in struct tm.
2286
fb266b8b
AM
22872009-01-21 Alan Modra <amodra@bigpond.net.au>
2288
2289 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
2290 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
2291 sections in soft-icache lines unless non_ia_text. Don't add
2292 rodata if doing so would exceed line size.
2293
451ffe63
HPN
22942009-01-19 Hans-Peter Nilsson <hp@axis.com>
2295
2296 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
2297 types than bfd_link_hash_indirect, before early return, call
2298 _bfd_elf_link_hash_copy_indirect.
2299
5aa6ff7c
AS
23002009-01-19 Andrew Stubbs <ams@codesourcery.com>
2301
2302 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
2303 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
2304 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
2305 (elf_backend_obj_attrs_order): New define.
2306 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
2307 (elfNN_bed): Add elf_backend_obj_attrs_order.
2308
3483fe2e
AS
23092009-01-19 Andrew Stubbs <ams@codesourcery.com>
2310
2311 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
2312 (obj_attr_size): Likewise.
2313 (write_obj_attribute): Likewise.
2314 (_bfd_elf_copy_obj_attributes): Likewise.
2315 (_bfd_elf_parse_attributes): Likewise.
2316 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
2317 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
2318 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
2319 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
2320 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
2321 with macros.
2322
2d0bb761
AS
23232009-01-19 Andrew Stubbs <ams@codesourcery.com>
2324
2325 * elf-attrs.c (is_default_attr): Support defaultless attributes.
2326 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
2327 (bfd_elf_add_obj_attr_string): Likewise.
2328 (bfd_elf_add_obj_attr_int_string): Likewise.
2329 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
2330 * elf-bfd.h (struct obj_attribute): Document new flag bit.
2331 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
2332 Tag_nodefaults has no default value.
2333 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
2334 comment to reflect the new state.
2335
a77e83b7
AM
23362009-01-19 Alan Modra <amodra@bigpond.net.au>
2337
2338 PR 9695
2339 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
2340 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
2341 (adjust_z_magix): Delete dead code handling QMAGIC.
2342
f6d29e26
KT
23432009-01-16 Kai Tietz <kai.tietz@onevision.com>
2344
2345 * coffcode.h (styp_to_sec_flags): Correct interpretation of
2346 IMAGE_SCN_MEM_DISCARDABLE.
2347
29670fb9
AM
23482009-01-16 Alan Modra <amodra@bigpond.net.au>
2349
2350 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
2351 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
2352 * configure.in (commonbfdlib): Delete.
2353 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
2354 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
2355 is available, not just for linux.
2356 * po/SRC-POTFILES.in: Regenerate.
2357 * Makefile.in: Regenerate.
2358 * configure: Regenerate.
2359
91e22acd
AS
23602009-01-15 Andrew Stubbs <ams@codesourcery.com>
2361 Julian Brown <julian@codesourcery.com>
2362
2363 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
2364 ARM attributes in ABI 2.07.
2365 * elf32-arm.c (get_secondary_compatible_arch): New function.
2366 (set_secondary_compatible_arch): New function.
2367 (tag_cpu_arch_combine): New function.
2368 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
2369 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
2370 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
2371 make it fit with order_01243.
2372 Add support for Tag_also_compatible_with,
2373 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
2374 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
2375 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
2376 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
2377 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
2378 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
2379 Rework the way unknown attributes are handled.
2380 Defer errors until all attributes have been processed.
2381
7b86a9fa
AS
23822009-01-15 Andrew Stubbs <ams@codesourcery.com>
2383
2384 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
2385 bfd_elf_add_obj_attr_int_string.
2386 Read Tag_compatibility from its new location in the attribute array,
2387 rather than the attribute list.
2388 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
2389 bfd_elf_add_obj_attr_int_string.
2390 (_bfd_elf_parse_attributes): Likewise.
2391 (_bfd_elf_merge_object_attributes): There's now only one
2392 Tag_compatibility, and it's in the array, not the list.
2393 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
2394 Tag_compatibility.
2395 (bfd_elf_add_obj_attr_compat): Rename to
2396 bfd_elf_add_obj_attr_int_string.
2397 (bfd_elf_add_proc_attr_compat): Rename to
2398 bfd_elf_add_proc_attr_int_string.
2399 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
2400 Tag_compatibility.
2401
01e1a5bc
NC
24022009-01-15 Douglas B Rupp <rupp@gnat.com>
2403
2404 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
2405 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
2406 (vmsutil.lo): Add dependency rule.
2407 * Makefile.in: Regenerate.
2408 * config.bfd (ia64*-*-*vms*): Add case.
2409 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
2410 * configure: Regenerate.
2411 * vmsutil.c: New file.
2412 * vmsutil.h: New file.
2413 * elf-bfd.h (struct bfd_elf_special_section): Change type of
2414 attr to bfd_vma.
2415 * elfxx-ia64.c (elfNN_vms_post_process_headers,
2416 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
2417 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
2418 elfNN_vms_object_p): New functions
2419 * targets.c (bfd_elf64_ia64_vms_vec): New target.
2420
a33dafc3
L
24212009-01-14 H.J. Lu <hongjiu.lu@intel.com>
2422
2423 PR ld/9727
2424 * elflink.c (elf_gc_sweep): Exclude the group section if the
2425 first member of the section group is excluded.
2426
13c0e967
AM
24272009-01-14 Alan Modra <amodra@bigpond.net.au>
2428
2429 PR 9735
2430 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
2431 saved filename, use bfd_alloc rather than bfd_malloc for it.
2432
460e679b
AM
24332009-01-13 Alan Modra <amodra@bigpond.net.au>
2434
2435 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
2436
25076afa
AM
24372009-01-13 Alan Modra <amodra@bigpond.net.au>
2438
2439 * elf32-spu.c (remove_cycles): Always set call->max_depth.
2440
37107878
AM
24412009-01-12 Alan Modra <amodra@bigpond.net.au>
2442
2443 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
2444
cd4a7468
AM
24452009-01-12 Alan Modra <amodra@bigpond.net.au>
2446
2447 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
2448 num_lines_log2.
2449 (struct got_entry): Add br_addr.
2450 (struct call_info): Add priority.
2451 (struct function_info): Add lr_store and sp_adjust.
2452 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
2453 (spu_elf_find_overlays): For soft-icache, mark any section within cache
2454 area as an overlay, and check that no other overlays exist. Look up
2455 icache overlay manager entry sym.
2456 (BRA_STUBS, BRA, BRASL): Define.
2457 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
2458 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
2459 in branch insn.
2460 (count_stub, build_stub): Support soft-icache.
2461 (build_spuear_stubs, process_stubs): Adjust build_stub call.
2462 (spu_elf_size_stubs): Size soft-icache stubs.
2463 (overlay_index): New function.
2464 (spu_elf_build_stubs): Make static. Support soft-icache.
2465 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
2466 (find_function_stack_adjust): Save lr store and stack adjust insn
2467 offsets.
2468 (maybe_insert_function): Adjust find_function_stack_adjust call.
2469 (mark_functions_via_relocs): Retrieve priority.
2470 (remove_cycles): Only warn about pruned arcs when stack_analysis.
2471 (sort_calls): Sort by priority first.
2472 (mark_overlay_section): Ignore .ovl.init.
2473 (sum_stack): Only print when stack_analysis.
2474 (print_one_overlay_section): New function, extracted from..
2475 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
2476 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
2477 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
2478 analysis. Call spu_elf_build_stubs.
2479 (spu_elf_relocate_section): For soft-icache encode overlay index
2480 into addresses.
2481 (spu_elf_output_symbol_hook): Support soft-icache.
2482 (spu_elf_modify_program_headers: Likewise.
37107878 2483
cd4a7468
AM
2484 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
2485 num_regions to num_lines. Add line_size and max_branch.
2486 (enum _ovly_flavour): Add ovly_soft_icache.
2487 (spu_elf_build_stubs): Delete.
2488
80c29487
JK
24892009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
2490
2491 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
2492 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
2493
1bc86aea
HPN
24942009-01-07 Hans-Peter Nilsson <hp@axis.com>
2495
2496 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2497 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
2498 the program, the known offset starts at the negative size of the
2499 TLS section.
2500 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
2501 Similar.
2502
3baa454d 25032009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
75606e85 2504
3baa454d 2505 * config.bfd: Add lm32-*-rtems*.
75606e85 2506
9dbe8890
L
25072009-01-03 H.J. Lu <hongjiu.lu@intel.com>
2508
2509 * coff-ppc.c: Add 2009 to Copyright.
2510 * elf32-cris.c: Likewise.
2511 * elflink.c: Likewise.
2512
0bdf8d40
HPN
25132009-01-03 Hans-Peter Nilsson <hp@axis.com>
2514
2515 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
2516 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
2517
54ac0771
L
25182009-01-02 H.J. Lu <hongjiu.lu@intel.com>
2519
2520 PR ld/9679
2521 * elflink.c (elf_merge_st_other): New.
2522 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
2523 hide them if needed.
2524 (elf_link_add_object_symbols): Updated.
2525
d8880531
L
25262009-01-02 H.J. Lu <hongjiu.lu@intel.com>
2527
2528 PR ld/9676
2529 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
2530 ref_dynamic and dynamic_def fields when setting def_regular
2531 to 1.
2532
b70b5c14
NC
25332009-01-02 Curtis Mackie <curtmackevo@gmail.com>
2534
2535 PR 9682
2536 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
2537 literal.
2538
d8880531 2539For older changes see ChangeLog-2008
56882138
AM
2540\f
2541Local Variables:
2542mode: change-log
2543left-margin: 8
2544fill-column: 74
2545version-control: never
2546End:
This page took 0.631065 seconds and 4 git commands to generate.