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