]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - bfd/ChangeLog
* elf32-spu.c (build_stub): Correct icache set_id.
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
1 2009-03-15 Alan Modra <amodra@bigpond.net.au>
2
3 * elf32-spu.c (build_stub): Correct icache set_id.
4 (spu_elf_relocate_section): Likewise.
5
6 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
7
8 * xcofflink.c (xcoff_link_check_archive_element): Only free the
9 symbol table if it was created by the current call.
10
11 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
12
13 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
14 class XMC_DS rather than XMC_UA.
15
16 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
17
18 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
19 bfd_boolean export_defineds parameter with an unsigned int
20 auto_export_flags parameter.
21 * bfd-in2.h: Regenerate.
22 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
23 split out from xcoff_build_ldsyms.
24 (xcoff_covered_by_expall_p): New function.
25 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
26 but with extra code to handle -bexpfull and -bexpall.
27 (xcoff_mark_auto_exports): New function.
28 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
29 a function should be automatically exported.
30 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
31 parameter with an auto_export_flags parameter. Update ldinfo
32 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
33 exported symbols.
34
35 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
36
37 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
38 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
39 init and fini functions. Do garbage collection for objects
40 without an entry point too.
41
42 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
43
44 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
45 check whether a symbol has csect information.
46 (coff_print_aux): Likewise.
47 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
48 information for C_AIX_WEAKEXT too.
49 (_bfd_xcoff_swap_aux_out): Likewise.
50 (xcoff_reloc_type_br): Handle defweak symbols too.
51 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
52 information for C_AIX_WEAKEXT too.
53 (_bfd_xcoff64_swap_aux_out): Likewise.
54 (xcoff64_reloc_type_br): Handle defweak symbols too.
55 * coffgen.c (coff_print_symbol): Handle auxillary function
56 information for C_AIX_WEAKEXT too.
57 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
58 instead of BSF_GLOBAL if the L_WEAK flag is set.
59 (xcoff_dynamic_definition_p): New function.
60 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
61 defines h. Don't change h if ldsym isn't the definition. Otherwise,
62 always take the symbol class from the ldsym. Use weak bfd symbol
63 types for weak ldsyms.
64 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
65 Fix the check for whether a definition is from a shared object.
66 Allow redefinitions of weak symbols.
67 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
68 (xcoff_keep_symbol_p): Likewise.
69 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
70 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
71 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
72 but mark them as L_WEAK.
73 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
74 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
75
76 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
77
78 * xcofflink.c (xcoff_mark): When walking the relocations,
79 only mark the target symbol or the target section, not both.
80 (xcoff_final_definition_p): New function.
81 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
82 symbol is a valid definition of the associated output symbol.
83 Use XCOFF_ALLOCATED to stop the same hash table entry having
84 two output symbols.
85 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
86 keeping a symbol.
87 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
88
89 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
90
91 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
92 symbols as XMC_XO.
93
94 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
95
96 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
97 * libcoff.h: Regenerate.
98 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
99 line-number counts in the bfd's lineno_counts field.
100 Don't keep per-csect line-number counts.
101 (xcoff_sweep): Don't update per-csect line-number counts.
102 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
103 entries in each output section.
104 (xcoff_link_input_bfd): Get the number of line numbers from
105 the bfd's lineno_counts field, rather than recalculating it
106 from scratch. Fix the range check when updating C_BINCL and
107 C_EINCL symbols.
108 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
109 here. Don't expect csects to have line-number counts.
110
111 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
112
113 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
114 * libcoff.h: Regenerate.
115 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
116 "skip" logic from xcoff_link_input_bfd.
117 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
118 objects in a dynamic link, rather than checking whether csectpp
119 is null. Always allocate debug_index for other objects,
120 and always go through the loop. Update the type of debug_index
121 after the change above. Read the auxillary csect information
122 and use xcoff_keep_symbol_p to decide whether a symbol should
123 be kept. Set its debug_index to -2 if not.
124 (xcoff_link_input_bfd): Update the type of debug_index after
125 the change above and always expect it to be nonnull. Use it to
126 test whether a symbol should be stripped, rather than making the
127 decision here. Postpone all symbol creation to the second pass.
128
129 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
130
131 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
132 creating a descriptor.
133 (xcoff_sweep): Don't mark toc_section unless it's needed.
134 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
135 when marking every bfd.
136 (xcoff_link_input_bfd): Skip all TOC anchors.
137 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
138 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
139 to -1; call xcoff_find_tc0 instead.
140
141 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
142
143 * libcoff-in.h (xcoff_section_tdata): Update commentary.
144 * libcoff.h: Regenerate.
145 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
146 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
147 the previous symbol's csect. Treat last_symndx as an inclusive value
148 and simplify its handling.
149 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
150 symbols with the right csect. Don't mark rsec when processing
151 relocations against undefined or absolute sections.
152 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
153 of bfd_und_section_ptr.
154 (xcoff_link_input_bfd): Likewise.
155
156 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
157
158 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
159 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
160 flag is set. Assert that all undefined symbols are either
161 imported or defined by a dynamic object.
162 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
163 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
164 handling to all relocations. Only set XCOFF_CALLED for function
165 symbols.
166 (xcoff_find_function): New function, split out from...
167 (bfd_xcoff_export_symbol) ...here.
168 (xcoff_set_import_path): New function, split out from...
169 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
170 meaning of XCOFF_CALLED.
171 (xcoff_mark_symbol): If we mark an undefined and unimported
172 symbol, find some way of defining it. If the symbol is a function
173 descriptor, fill in its definition automatically. If the symbol
174 is a function, mark its descriptor and allocate room for global
175 linkage code. Otherwise mark the symbol as implicitly imported.
176 Move the code for creating function descriptors from...
177 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
178 check for symbols that were implicitly defined.
179 (xcoff_mark): Don't count any dynamic relocations against
180 function symbols.
181 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
182 in the xcoff link info.
183 (xcoff_link_input_bfd): Remove handling of undefined and
184 unexported symbols.
185
186 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
187
188 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
189 if the target is absolute. Fix comment typo.
190 (xcoff_ppc_relocate_section): Remove FIXME.
191 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
192 if the target is absolute.
193
194 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
195
196 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
197 R_POS and R_NEG relocations against absolute symbols to the
198 .loader section.
199
200 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
201
202 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
203 to 2 for bfd_mach_ppc_620.
204
205 2009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
206
207 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
208 * configure.in: Likewise.
209 * configure: Regenerate.
210
211 2009-03-13 H.J. Lu <hongjiu.lu@intel.com>
212
213 PR binutils/9945
214 * elf.c (assign_section_numbers): Generate symbol table if there
215 is any relocation in output.
216 (_bfd_elf_compute_section_file_positions): Likewise.
217
218 2009-03-13 Nick Clifton <nickc@redhat.com>
219
220 PR 9934
221 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
222 * elflink.c (elf_link_read_relocs_from_section): Use
223 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
224 relocs but no symbol table.
225 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
226
227 2009-03-12 H.J. Lu <hongjiu.lu@intel.com>
228
229 PR ld/9938
230 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
231 to check ___tls_get_addr.
232
233 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
234 strncmp to check __tls_get_addr.
235
236 2009-03-12 Andrew Stubbs <ams@codesourcery.com>
237
238 * dwarf2.c (read_section): Always check the offset, even when the
239 section has been read before.
240
241 2009-03-11 H.J. Lu <hongjiu.lu@intel.com>
242
243 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
244 comments.
245
246 2009-03-11 Chris Demetriou <cgd@google.com>
247
248 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
249 * bfd-in2.h: Regenerate.
250 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
251 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
252 mode.
253 (bsd_write_armap): Likewise.
254 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
255 flag is set, do nothing.
256 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
257 for timestamp.
258
259 2009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
260
261 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
262 used to update stack pointer.
263
264 2009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
265
266 PR binutils/9921
267 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
268 for unknown symbols in absolute section.
269
270 2009-03-06 Nick Clifton <nickc@redhat.com>
271
272 * po/es.po: Updated Spanish translation.
273
274 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
275
276 * elf32-arm.c (group_sections): Take next section size into
277 account before accepting to group it.
278
279 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
280
281 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
282 PLT entries.
283 (elf32_arm_final_link_relocate): Likewise.
284
285 2009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
286
287 PR 9923
288 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
289
290 2009-03-04 Alan Modra <amodra@bigpond.net.au>
291
292 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
293 * section.c (struct bfd_section): Add has_tls_get_addr_call.
294 (BFD_FAKE_SECTION): Init new flag.
295 * ecoff.c (bfd_debug_section): Likewise.
296 * bfd-in2.h: Regenerate.
297 * libbfd.h: Regenerate.
298 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
299 (ppc_elf_reloc_type_lookup): Handle new relocs.
300 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
301 without marker relocs.
302 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
303 if section has no old-style calls.
304 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
305 Don't try to optimize new-style __tls_get_addr call when handling
306 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
307 relocs.
308 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
309 (ppc64_elf_reloc_type_lookup): Handle new relocs.
310 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
311 without marker relocs.
312 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
313 if section has no old-style calls. Set toc_ref for new relocs as
314 appropriate.
315 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
316 Don't try to optimize new-style __tls_get_addr call when handling
317 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
318 relocs.
319
320 2009-03-04 Alan Modra <amodra@bigpond.net.au>
321
322 PR 6768
323 * configure.in: Test for ld --as-needed support. Link shared
324 libbfd against libm.
325 * configure: Regenerate.
326
327 2009-03-03 Alan Modra <amodra@bigpond.net.au>
328
329 * Makefile.am: Run "make dep-am".
330 * Makefile.in: Regenerate.
331
332 2009-03-02 Qinwei <qinwei@sunnorth.com.cn>
333
334 * elf32-score7.c: New file.
335 * elf32-score.h: New file.
336 * elf32-score.c: Add code to support score 7. Set score7 as the
337 default.
338 * cpu-score.c: Add score7 architecure.
339 (compatibile): New function.
340 * Makefile.am: Add rules for building elf32-score7 object.
341 * Makefile.in: Regenerate.
342 * configure.in: Add elf32-score7 object to score vectors.
343 * configure: Regenerate.
344 * reloc.c: Add score7 relocs.
345 * archures.c: Add score3 and score7 machine numbers.
346 * bfd-in2.h: Regenerate.
347 * libbfd.h: Regenerate.
348
349 2009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
350
351 * configure: Regenerate.
352
353 2009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
354
355 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
356 (elf32_hppa_check_relocs): Use it.
357
358 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
359 elf64-hppa.c.
360 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
361 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
362 (elf_hppa_is_dynamic_loader_symbol): Likewise.
363 (elf_hppa_record_segment_addrs): Likewise.
364 (elf_hppa_final_link): Likewise.
365 (elf_hppa_relocate_insn): Likewise.
366 (elf_hppa_final_link_relocate): Likewise.
367 (elf64_hppa_relocate_section): Likewise.
368 * elf64-hppa.c: Insert above.
369
370 2009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
371
372 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
373 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
374 (elf_hppa_relocate_section): Likewise.
375 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
376 from struct elf_link_hash_entry. Add count field.
377 (struct elf64_hppa_dyn_hash_table): Delete.
378 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
379 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
380 (hppa_elf_hash_entry, eh_name): Define.
381 (elf64_hppa_new_dyn_hash_entry): Delete.
382 (elf64_hppa_dyn_hash_lookup): Delete.
383 (elf64_hppa_dyn_hash_traverse): Delete.
384 (get_dyn_name): Delete.
385 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
386 of struct elf64_hppa_dyn_hash_entry *.
387 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
388 allocate_global_data_plt, allocate_global_data_stub,
389 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
390 Likewise.
391 (hppa64_link_hash_newfunc): New.
392 (elf64_hppa_hash_table_create): Rework.
393 (count_dyn_reloc): Likewise.
394 (hppa64_elf_local_refcounts): New.
395 (elf64_hppa_check_relocs): Rework using standard technique for recording
396 local DLT, PLT and OPD reference counts.
397 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
398 elf_link_hash_entry *.
399 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
400 allocate_global_data_plt, allocate_global_data_stub,
401 allocate_global_data_opd, allocate_dynrel_entries,
402 elf64_hppa_adjust_dynamic_symbol,
403 elf64_hppa_mark_milli_and_exported_functions): Likewise.
404 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
405 Use hppa_link_hash_table. Rework.
406 (elf64_hppa_link_output_symbol_hook): Rework.
407 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
408 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
409 elf64_hppa_finish_dynamic_sections): Likewise.
410
411 2009-02-26 Christophe Lyon <christophe.lyon@st.com>
412
413 * elf32-arm.c (stub_reloc_type): Removed.
414 (insn_sequence): Renamed reloc_type field to r_type.
415 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
416 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
417 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
418 (elf32_arm_stub_type): Add new enum entries for the new stubs.
419 (arm_stub_is_thumb): Catch new stubs.
420 (arm_type_of_stub): Handle new stubs.
421 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
422 (bfd_elf32_arm_process_before_allocation): Remove useless
423 condition.
424
425 2009-02-25 H.J. Lu <hongjiu.lu@intel.com>
426
427 * elf.c (elf_find_function): Use is_function_type to check
428 function symbol.
429
430 2009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
431
432 * xtensa-modules.c: Revert to previous version 1.11 due
433 to inadvertant commit.
434
435 2009-02-24 Sterling Augustine <sterling@tensilica.com>
436
437 * elf32-xtensa.c (text_action_add): Separate test for action
438 type. Break if saved action is ta_widen_insn at same offset.
439
440 2009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
441
442 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
443 to elf32_arm_stub_long_branch_any_arm_pic.
444 (elf32_arm_stub_long_branch_any_thumb_pic): New.
445 (enum elf32_arm_stub_type, arm_type_of_stub)
446 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
447 separately.
448
449 2009-02-24 Joseph Myers <joseph@codesourcery.com>
450
451 * elf32-arm.c (PREV_SEC): Update comment.
452 (group_sections): Rename argument to stubs_always_after_branch.
453 Reverse the list and place stubs at the end of input sections.
454 Undefine NEXT_SEC.
455 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
456
457 2009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
458
459 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
460 Fix formatting.
461 (arm_size_one_stub): Remove unnecessary break.
462 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
463
464 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
465
466 * elf32-arm.c (stub_insn_type): New type.
467 (stub_reloc_type): Likewise.
468 (insn_sequence): Likewise.
469 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
470 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
471 (elf32_arm_stub_long_branch_thumb_only): Likewise.
472 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
473 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
474 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
475 (elf32_arm_stub_hash_entry): Add new helper fields.
476 (stub_hash_newfunc): Initialize these new fields.
477 (arm_build_one_stub): Encode Arm and Thumb instructions separately
478 to take endianness into account.
479 (arm_size_one_stub): Compute size of stubs using insn_sequence.
480 (arm_map_one_stub): Code is now more generic, thanks to
481 insn_sequence.
482
483 2009-02-23 Christophe Lyon <christophe.lyon@st.com>
484
485 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
486 code.
487 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
488 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
489 BLX is not available. Fix typo in warning message. Add comments
490 and improve formatting.
491 (arm_build_one_stub): Adjust to new
492 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
493 (arm_map_one_stub): Likewise.
494
495 2009-02-23 Tristan Gingold <gingold@adacore.com>
496 Eric Botcazou <ebotcazou@adacore.com>
497 Douglas B Rupp <rupp@gnat.com>
498
499 * vms.h: Update copyright year, fix comments, reorder declarations.
500 (_bfd_save_vms_section): Remove the prototype.
501 (EGPS_S_V_NO_SHIFT): New constant.
502 (bfd_vms_set_section_flags): New prototype.
503 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
504 constants.
505 (EGSY_S_W_FLAGS): Ditto.
506 (EGSY_S_V_QUAD_VAL): Ditto.
507 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
508 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
509 EGST_S_B_NAMLNG): Ditto.
510 (ESRF_S_B_NAMLNG): Ditto.
511 (ETIR_S_C_HEADER_SIZE): Ditto.
512 (EGPS_S_V_ALLOC_64BIT): Ditto.
513 (DST_S_C_EPILOG): Ditto.
514 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
515 (DST_S_C_SRC_INCRLNUM_B): Ditto.
516 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
517 (DST_S_L_PCLINE_UNSLONG): Ditto.
518 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
519 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
520 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
521 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
522 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
523 (DST_S_B_SRC_UNSBYTE): Ditto.
524 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
525 Add prototypes.
526 (vms_section, vms_reloc): Remove types.
527 (hdr_struc): Replaced by ...
528 (hdr_struct): ... new type.
529 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
530 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
531 (EMH_DATE_LENGTH): Ditto.
532 (eom_struc): Replaced by ...
533 (eom_struct): ... new type.
534 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
535 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
536 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
537 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
538 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
539 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
540 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
541 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
542 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
543 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
544 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
545 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
546 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
547 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
548 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
549 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
550 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
551 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
552 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
553 (enum file_type_enum): New type.
554 (struct location_struct): Removed.
555 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
556 (struct funcinfo, struct module): Ditto.
557 (struct vms_private_data_struct): Update fields.
558 (struct vms_section_data_struct): New type.
559
560 * vms.c: Update copyright year, fix comments,
561 Fix includes for DECC, add prototypes.
562 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
563 some initializers.
564 Use flavour to set is_vax, location_stack is removed.
565 (struct pair): Declare.
566 (fill_section_ptr): Initialize variables at declaration.
567 Add guard to set SECTION_SYM flag, handlde und section.
568 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
569 (_bfd_vms_slurp_object_records): New function, replaces previous
570 vms_object_p.
571 (vms_slurp_module): New function.
572 (vms_slurp_image): Ditto.
573 (vms_object_p): Complete rewrite.
574 (vms_mkobject): Use is_vax field to slect architecture.
575 (free_reloc_stream): New function.
576 (vms_convert_to_var): Ditto.
577 (vms_convert_to_var_1): Ditto.
578 (vms_convert_to_var_unix_filename): Ditto.
579 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
580 VAR format on VMS.
581 (vms_new_section_hook): Set alignment to 0, allocate private data.
582 (vms_get_section_contents): Load content.
583 (vms_get_symbol_info): Handle undefined section.
584 (vms_find_nearest_line): Handle.
585 (alloc_reloc_stream): New function.
586 (vms_slurp_reloc_table): Ditto.
587 (vms_get_reloc_upper_bound): Make it real.
588 (vms_canonicalize_reloc): Do the real work.
589 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
590 ALPHA_R_BOH.
591 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
592 (vms_set_arch_mach): Check arch.
593 (vms_set_section_contents): Copy the content after allocation.
594 (vms_alpha_vec): Update object flags.
595
596 * vms-tir.c: Update copyright year, fix comments,
597 add prototypes for new functions.
598 (dst_define_location): New function.
599 (dst_restore_location): New function.
600 (dst_retrieve_location): New function.
601 (dst_check_allocation): New function.
602 (image_dump): Call dst_check_allocation.
603 (image_write_b): Ditto.
604 (image_write_w): Ditto.
605 (image_write_l): Ditto.
606 (image_write_q): Ditto.
607 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
608 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
609 CTL_STKDL.
610 Call error handler instead of abort if name is not known.
611 (etir_sta): Add quarter_relocs argument and set it.
612 Fix cast.
613 (etir_sto): Ditto.
614 (etir_opr): Ditto, return FALSE in case of error.
615 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
616 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
617 (etir_stc): Add quarter_relocs argument and set it, fix cast.
618 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
619 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
620 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
621 Return FALSE in case of error.
622 (tir_sta): Change sign of psect.
623 (tir_ctl): Ditto.
624 (tir_cmd): Fix cast. Makes tir_table static const.
625 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
626 add argument to explain.
627 (analyze_etir): Initialize maxptr, add quarter_relocs
628 declaration, move some declarations into inner scopes.
629 Handle quarter_relocs and STO_IMM.
630 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
631 (_bfd_vms_slurp_relocs): New function.
632 (_bfd_vms_decode_relocs): New function.
633 (sto_imm): Rewritten.
634 (start_first_etbt_record): New function.
635 (start_another_etbt_record): Ditto.
636 (etir_output_check): Ditto.
637 (defer_reloc_p): Ditto.
638 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
639 a for-loop. Correctly deals with contents, deals with .vmsdebug,
640 rewritte relocations handling.
641 (_bfd_vms_write_tbt): Removed.
642 (_bfd_vms_write_dbg): Ditto.
643
644 * vms-misc.c: Update copyright year, Fix comments.
645 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
646 (maybe_adjust_record_pointer_for_object): New function.
647 (_bfd_vms_get_first_record): New function, replaces ...
648 (_bfd_vms_get_record): .. removed.
649 (_bfd_vms_get_object_record): New function.
650 (_bfd_vms_get_object_record): New function.
651 (vms_get_remaining_object_record): New function, replaces ...
652 (_bfd_vms_get_next_record): ... removed.
653 (add_new_contents): Removed.
654 (_bfd_save_vms_section): Removed.
655 (_bfd_get_vms_section): Removed.
656 (_bfd_vms_output_flush): Write in VAR format.
657 (new_symbol): Don't make UND section.
658
659 * vms-hdr.c: Update copyright year, update list of record handled.
660 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
661 (_bfd_vms_write_hdr): Strip vms and unix patches,
662 add comments, truncate module name at 31 characters,
663 use constants instead of hard-coded value,
664 write BFD version instead of a fixed string.
665 (_bfd_vms_slurp_ihd): New function.
666 (_bfd_vms_slurp_isd): Ditto.
667 (_bfd_vms_slurp_ihs): Ditto.
668 (new_module): Ditto.
669 (parse_module): Ditto
670 (build_module_list): Ditto.
671 (module_find_nearest_line): Ditto.
672 (_bfd_vms_find_nearest_dst_line): Ditto.
673 (vms_slurp_debug): Ditto.
674 (_bfd_vms_slurp_dbg): Ditto.
675 (_bfd_vms_slurp_tbt): Ditto.
676 (_bfd_vms_write_dbg): Ditto.
677 (_bfd_vms_write_tbt): Ditto.
678
679 * vms-gsd.c: Update copyright year, update list of records handled.
680 (EVAX_LITERALS_NAME): New macro.
681 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
682 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
683 (register_universal_symbol): New function and prototype.
684 (_bfd_vms_slurp_gsd): Fix indentations and casts,
685 improve debug messages,
686 use constants instead of hard-coded value,
687 fix missing endianness conversion,
688 handle global symbol (SYMG).
689 (bfd_vms_set_section_flags): New function.
690 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
691 handle section literals,
692 fix indentation,
693 handle section bfd and vms flags,
694 don't output LIB$INITIALIZE symbol,
695 fix handling of weak symbols,
696 fix evax vs vax procedure descriptor,
697 handle absolute symbols.
698
699 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
700 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
701
702 * makefile.vms (DEFS): Fix flags for VMS.
703
704 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
705
706 * bfd-in2.h: Regenerated.
707 * libbfd.h: Regenerated.
708
709 2009-02-20 Cary Coutant <ccoutant@google.com>
710
711 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
712 in struct stat.
713
714 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
715
716 PR gas/7059
717 * coffcode.h (coff_write_object_contents): Don't let the string
718 table offset overflow the s_name field when using long section names.
719
720 2009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
721
722 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
723 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
724 * coff-mips.c (mips_ecoff_backend_data): Likewise.
725 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
726 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
727 (bfd_pmac_xcoff_backend_data): Likewise.
728 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
729 (bfd_xcoff_aix5_backend_data): Likewise.
730 (xcoff64_write_object_contents): Delete unused long_section_names
731 local variable.
732 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
733 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
734 struct non-const.
735 * coffcode.h (documentation): Update to describe long section names.
736 (COFFLONGSECTIONCATHELPER): New helper macro.
737 (BLANKOR1TOODD): Likewise.
738 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
739 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
740 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
741 (bfd_coff_set_long_section_names_allowed): New function.
742 (bfd_coff_set_long_section_names_disallowed): Likewise.
743 (struct bfd_coff_backend_data): Add new backend hook function
744 pointer _bfd_coff_set_long_section_names.
745 (bfd_coff_set_long_section_names): New backend hook.
746 (coff_write_object_contents): Only generate long section names if
747 bfd_coff_long_section_names() indicates they are currently enabled.
748 (bfd_coff_std_swap_table): Make non-const, and initialise long
749 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
750 (ticoff0_swap_table): Likewise to both.
751 (ticoff1_swap_table): Again, likewise to both.
752 * coffgen.c (make_a_section_from_file): Allow long section names
753 as inputs even if not currently allowed for outputs.
754 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
755 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
756 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
757 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
758 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
759 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
760 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
761 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
762 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
763 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
764 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
765 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
766 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
767 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
768 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
769 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
770 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
771 * libcoff-in.h: Update copyright year to cause updated copyright
772 year in generated libcoff.h, and fix typo.
773 * libcoff.h: Regenerated.
774 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
775 (_bfd_ecoff_no_long_sections): Add prototype.
776 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
777 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
778 defined by an including .c file.
779 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
780 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
781 (ticoff1_swap_table): Likewise to both.
782
783 2009-02-18 Christophe Lyon <christophe.lyon@st.com>
784
785 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
786 stub. Catch default case error.
787 (arm_map_one_stub): Add missing Thumb mapping symbol.
788
789 2009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
790
791 PR 9841
792 * elf32-avr.c: Handle case where no local symbos exist correctly.
793
794 2009-02-16 Christophe Lyon <christophe.lyon@st.com>
795
796 bfd/
797 * elf32-arm.c (arm_long_branch_stub,
798 arm_thumb_v4t_long_branch_stub,
799 arm_thumb_thumb_long_branch_stub,
800 arm_thumb_arm_v4t_long_branch_stub,
801 arm_thumb_arm_v4t_short_branch_stub,
802 arm_pic_long_branch_stub):
803 Renamed to elf32_arm_stub_long_branch_any_any,
804 elf32_arm_stub_long_branch_v4t_arm_thumb,
805 elf32_arm_stub_long_branch_thumb_only,
806 elf32_arm_stub_long_branch_v4t_thumb_arm,
807 elf32_arm_stub_short_branch_v4t_thumb_arm,
808 elf32_arm_stub_long_branch_any_any_pic.
809 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
810 arm_thumb_thumb_stub_long_branch,
811 arm_thumb_arm_v4t_stub_long_branch,
812 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
813 Renamed to arm_stub_long_branch_any_any,
814 arm_stub_long_branch_v4t_arm_thumb,
815 arm_stub_long_branch_thumb_only,
816 arm_stub_long_branch_v4t_thumb_arm,
817 arm_stub_short_branch_v4t_thumb_arm,
818 arm_stub_long_branch_any_any_pic.
819
820 2009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
821
822 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
823 in branch offset check.
824
825 2009-02-15 Alan Modra <amodra@bigpond.net.au>
826
827 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
828 add toc.symndx and toc.add.
829 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
830 Set up toc.add.
831 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
832 callers.
833 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
834 (branch_reloc_hash_match): New function, extracted from..
835 (ppc64_elf_tls_optimize): ..here.
836 (ppc64_elf_relocate_section): Properly set addends when optimizing
837 tls sequences. Avoid unnecessary reading and writing of insns.
838 Only redo reloc when symbol changed. Bypass symbol checks when
839 using tlsld_got.
840 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
841 (branch_reloc_hash_match): New function, extracted from..
842 (ppc_elf_tls_optimize): ..here.
843 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
844 Don't clear addend on zapped __tls_get_addr reloc.
845
846 2009-02-12 Nick Clifton <nickc@redhat.com>
847
848 PR 9827
849 * elflink.c (bfd_elf_final_link): When counting the relocations,
850 if the header size has not been set yet then assume that it will
851 match the output section's reloc type.
852
853 2009-02-12 Nathan Sidwell <nathan@codesourcery.com>
854
855 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
856 relocatable link.
857
858 2009-02-09 Alan Modra <amodra@bigpond.net.au>
859
860 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
861 (find_function): Likewise.
862 (pasted_function): Don't error if no prior function found.
863 (discover_functions): Revert 2008-12-10 change. Extend first
864 function range to start of section.
865
866 2009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
867
868 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
869 functions to C90.
870 * elf64-hppa.h: Likewise.
871
872 2009-02-06 Joseph Myers <joseph@codesourcery.com>
873
874 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
875 .sbss handling.
876
877 2009-02-04 Alan Modra <amodra@bigpond.net.au>
878
879 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
880 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
881
882 2009-02-03 Sandip Matte <sandip@rmicorp.com>
883
884 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
885 * archures.c (bfd_mach_mips_xlr): Define.
886 * bfd-in2.h: Regenerate.
887 * cpu-mips.c (I_xlr): Define.
888 (arch_info_struct): Add XLR entry.
889 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
890 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
891 (mips_mach_extensions): Add XLR entry.
892
893 2009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
894
895 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
896
897 2009-02-03 Carlos O'Donell <carlos@codesourcery.com>
898
899 * configure.in: AC_SUBST pdfdir.
900 * Makefile.am: Add install-pdf, install-pdf-am
901 and install-pdf-recursive targets. Define pdfdir.
902 * doc/Makefile.am: Define pdf__strip_dir. Add
903 install-pdf and install-pdf-am targets.
904 * po/Make-in: Add install-pdf target.
905 * configure: Regenerate.
906 * Makefile.in: Regenerate
907 * doc/Makefile.in: Regenerate.
908
909 2009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
910
911 * bfd-in2.h: Regenerate.
912 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
913 fields from n_entries to n_slots where appropriate, update comments.
914 (HOWTO): Add TLS relocations.
915 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
916 (enum elf_m68k_got_offset_size): New enum.
917 (struct elf_m68k_got_entry.type): Move field to ...
918 (struct elf_m68k_got_entry_key): ... here. Update all uses.
919 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
920 functions.
921 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
922 functions.
923 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
924 fields into n_entries array. Update comments.
925 (elf_m68k_init_got): Simplify, update all uses.
926 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
927 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
928 GOT entries; update name, update all uses.
929 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
930 (elf_m68k_get_got_entry): Update.
931 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
932 simplify.
933 (elf_m68k_remove_got_entry_type): Simplify.
934 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
935 (elf_m68k_can_merge_gots): Update.
936 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
937 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
938 GOT entries, simplify.
939 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
940 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
941 field, remove obsoleted local_n_entries field.
942 (elf_m68k_partition_multi_got_2): New static function.
943 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
944 update.
945 (elf_m68k_remove_got_entry_type): Update.
946 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
947 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
948 update of sgot->size and srelgot->size.
949 (elf_m68k_gc_sweep_hook): Update.
950 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
951 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
952 TLS relocations.
953 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
954 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
955
956 2009-02-02 DJ Delorie <dj@redhat.com>
957
958 * elf32-mep.c (config_names): Regenerate configuration.
959
960 2009-02-02 Alan Modra <amodra@bigpond.net.au>
961
962 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
963 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
964 * elf.c (bfd_elf_get_str_section): Make static.
965 (bfd_elf_find_section): Delete.
966 * libbfd.h: Regenerate.
967
968 2009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
969
970 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
971 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
972
973 2009-01-31 Alan Modra <amodra@bigpond.net.au>
974
975 * elflink.c (on_needed_list): New function.
976 (elf_link_add_object_symbols): Link in --as-needed libs if they
977 satisfy undefined symbols in other libs.
978
979 2009-01-30 Julian Brown <julian@codesourcery.com>
980
981 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
982 EXEC_P or DYNAMIC flags, and skip sections which are being linked
983 with --just-symbols (-R).
984
985 2009-01-29 Adam Nemet <anemet@caviumnetworks.com>
986
987 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
988 high_pc in order to properly sign-extend VMAs.
989
990 2009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
991 Mark Shinwell <shinwell@codesourcery.com>
992 Catherine Moore <clm@codesourcery.com>
993
994 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
995
996 2009-01-28 Catherine Moore <clm@codesourcery.com>
997
998 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
999 SEC_LOAD for dynamic relocation sections.
1000
1001 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
1002
1003 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
1004 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
1005 the size of local TLS data.
1006
1007 2009-01-27 Andreas Schwab <schwab@suse.de>
1008
1009 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
1010 architectures in the archive.
1011
1012 2009-01-27 Hans-Peter Nilsson <hp@axis.com>
1013
1014 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
1015 <R_CRIS_32_DTPREL>: Correct relocation value.
1016
1017 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
1018 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
1019 symbols with non-default visibility.
1020
1021 2009-01-26 Nathan Sidwell <nathan@codesourcery.com>
1022
1023 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
1024 describing the trampolines.
1025 (ppc_elf_relocate_section): Update relocs to describe the
1026 trampolines.
1027
1028 2009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1029
1030 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
1031 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
1032 and R_PARISC_PCREL12F relocations.
1033
1034 2009-01-24 Alan Modra <amodra@bigpond.net.au>
1035
1036 PR 6022
1037 * elflink.c (find_version_for_sym): New function split out from,
1038 but without export_dynamic test, ..
1039 (_bfd_elf_link_assign_sym_version): ..here.
1040 (_bfd_elf_export_symbol): Use it.
1041
1042 2009-01-23 Alan Modra <amodra@bigpond.net.au>
1043
1044 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
1045 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
1046 * elflink.c: ..here, somewhat modified.
1047 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
1048 _bfd_elf_link_find_version_dependencies,
1049 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
1050 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
1051 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
1052 declare..
1053 * elflink.c: ..and make static here.
1054 (_bfd_elf_link_find_version_dependencies): Adjust for removal
1055 of output_bfd from struct elf_find_verdep_info.
1056 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
1057 struct elf_info_failed.
1058 (bfd_elf_size_dynamic_sections): Adjust.
1059
1060 2009-01-22 Alan Modra <amodra@bigpond.net.au>
1061
1062 PR 6832
1063 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
1064 after comp_unit_find_line call.
1065
1066 2009-01-21 Nick Clifton <nickc@redhat.com>
1067
1068 PR 9769
1069 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
1070 tm_gmtoff field in struct tm.
1071
1072 2009-01-21 Alan Modra <amodra@bigpond.net.au>
1073
1074 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
1075 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
1076 sections in soft-icache lines unless non_ia_text. Don't add
1077 rodata if doing so would exceed line size.
1078
1079 2009-01-19 Hans-Peter Nilsson <hp@axis.com>
1080
1081 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
1082 types than bfd_link_hash_indirect, before early return, call
1083 _bfd_elf_link_hash_copy_indirect.
1084
1085 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
1086
1087 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
1088 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
1089 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
1090 (elf_backend_obj_attrs_order): New define.
1091 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
1092 (elfNN_bed): Add elf_backend_obj_attrs_order.
1093
1094 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
1095
1096 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
1097 (obj_attr_size): Likewise.
1098 (write_obj_attribute): Likewise.
1099 (_bfd_elf_copy_obj_attributes): Likewise.
1100 (_bfd_elf_parse_attributes): Likewise.
1101 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
1102 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
1103 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
1104 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
1105 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
1106 with macros.
1107
1108 2009-01-19 Andrew Stubbs <ams@codesourcery.com>
1109
1110 * elf-attrs.c (is_default_attr): Support defaultless attributes.
1111 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
1112 (bfd_elf_add_obj_attr_string): Likewise.
1113 (bfd_elf_add_obj_attr_int_string): Likewise.
1114 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
1115 * elf-bfd.h (struct obj_attribute): Document new flag bit.
1116 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
1117 Tag_nodefaults has no default value.
1118 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
1119 comment to reflect the new state.
1120
1121 2009-01-19 Alan Modra <amodra@bigpond.net.au>
1122
1123 PR 9695
1124 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
1125 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
1126 (adjust_z_magix): Delete dead code handling QMAGIC.
1127
1128 2009-01-16 Kai Tietz <kai.tietz@onevision.com>
1129
1130 * coffcode.h (styp_to_sec_flags): Correct interpretation of
1131 IMAGE_SCN_MEM_DISCARDABLE.
1132
1133 2009-01-16 Alan Modra <amodra@bigpond.net.au>
1134
1135 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
1136 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
1137 * configure.in (commonbfdlib): Delete.
1138 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
1139 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
1140 is available, not just for linux.
1141 * po/SRC-POTFILES.in: Regenerate.
1142 * Makefile.in: Regenerate.
1143 * configure: Regenerate.
1144
1145 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
1146 Julian Brown <julian@codesourcery.com>
1147
1148 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
1149 ARM attributes in ABI 2.07.
1150 * elf32-arm.c (get_secondary_compatible_arch): New function.
1151 (set_secondary_compatible_arch): New function.
1152 (tag_cpu_arch_combine): New function.
1153 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
1154 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
1155 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
1156 make it fit with order_01243.
1157 Add support for Tag_also_compatible_with,
1158 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
1159 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
1160 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
1161 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
1162 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
1163 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
1164 Rework the way unknown attributes are handled.
1165 Defer errors until all attributes have been processed.
1166
1167 2009-01-15 Andrew Stubbs <ams@codesourcery.com>
1168
1169 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
1170 bfd_elf_add_obj_attr_int_string.
1171 Read Tag_compatibility from its new location in the attribute array,
1172 rather than the attribute list.
1173 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
1174 bfd_elf_add_obj_attr_int_string.
1175 (_bfd_elf_parse_attributes): Likewise.
1176 (_bfd_elf_merge_object_attributes): There's now only one
1177 Tag_compatibility, and it's in the array, not the list.
1178 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
1179 Tag_compatibility.
1180 (bfd_elf_add_obj_attr_compat): Rename to
1181 bfd_elf_add_obj_attr_int_string.
1182 (bfd_elf_add_proc_attr_compat): Rename to
1183 bfd_elf_add_proc_attr_int_string.
1184 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
1185 Tag_compatibility.
1186
1187 2009-01-15 Douglas B Rupp <rupp@gnat.com>
1188
1189 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
1190 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
1191 (vmsutil.lo): Add dependency rule.
1192 * Makefile.in: Regenerate.
1193 * config.bfd (ia64*-*-*vms*): Add case.
1194 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
1195 * configure: Regenerate.
1196 * vmsutil.c: New file.
1197 * vmsutil.h: New file.
1198 * elf-bfd.h (struct bfd_elf_special_section): Change type of
1199 attr to bfd_vma.
1200 * elfxx-ia64.c (elfNN_vms_post_process_headers,
1201 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
1202 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
1203 elfNN_vms_object_p): New functions
1204 * targets.c (bfd_elf64_ia64_vms_vec): New target.
1205
1206 2009-01-14 H.J. Lu <hongjiu.lu@intel.com>
1207
1208 PR ld/9727
1209 * elflink.c (elf_gc_sweep): Exclude the group section if the
1210 first member of the section group is excluded.
1211
1212 2009-01-14 Alan Modra <amodra@bigpond.net.au>
1213
1214 PR 9735
1215 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
1216 saved filename, use bfd_alloc rather than bfd_malloc for it.
1217
1218 2009-01-13 Alan Modra <amodra@bigpond.net.au>
1219
1220 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
1221
1222 2009-01-13 Alan Modra <amodra@bigpond.net.au>
1223
1224 * elf32-spu.c (remove_cycles): Always set call->max_depth.
1225
1226 2009-01-12 Alan Modra <amodra@bigpond.net.au>
1227
1228 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
1229
1230 2009-01-12 Alan Modra <amodra@bigpond.net.au>
1231
1232 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
1233 num_lines_log2.
1234 (struct got_entry): Add br_addr.
1235 (struct call_info): Add priority.
1236 (struct function_info): Add lr_store and sp_adjust.
1237 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
1238 (spu_elf_find_overlays): For soft-icache, mark any section within cache
1239 area as an overlay, and check that no other overlays exist. Look up
1240 icache overlay manager entry sym.
1241 (BRA_STUBS, BRA, BRASL): Define.
1242 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
1243 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
1244 in branch insn.
1245 (count_stub, build_stub): Support soft-icache.
1246 (build_spuear_stubs, process_stubs): Adjust build_stub call.
1247 (spu_elf_size_stubs): Size soft-icache stubs.
1248 (overlay_index): New function.
1249 (spu_elf_build_stubs): Make static. Support soft-icache.
1250 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
1251 (find_function_stack_adjust): Save lr store and stack adjust insn
1252 offsets.
1253 (maybe_insert_function): Adjust find_function_stack_adjust call.
1254 (mark_functions_via_relocs): Retrieve priority.
1255 (remove_cycles): Only warn about pruned arcs when stack_analysis.
1256 (sort_calls): Sort by priority first.
1257 (mark_overlay_section): Ignore .ovl.init.
1258 (sum_stack): Only print when stack_analysis.
1259 (print_one_overlay_section): New function, extracted from..
1260 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
1261 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
1262 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
1263 analysis. Call spu_elf_build_stubs.
1264 (spu_elf_relocate_section): For soft-icache encode overlay index
1265 into addresses.
1266 (spu_elf_output_symbol_hook): Support soft-icache.
1267 (spu_elf_modify_program_headers: Likewise.
1268
1269 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
1270 num_regions to num_lines. Add line_size and max_branch.
1271 (enum _ovly_flavour): Add ovly_soft_icache.
1272 (spu_elf_build_stubs): Delete.
1273
1274 2009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
1275
1276 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
1277 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
1278
1279 2009-01-07 Hans-Peter Nilsson <hp@axis.com>
1280
1281 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
1282 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
1283 the program, the known offset starts at the negative size of the
1284 TLS section.
1285 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
1286 Similar.
1287
1288 2009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
1289
1290 * config.bfd: Add lm32-*-rtems*.
1291
1292 2009-01-03 H.J. Lu <hongjiu.lu@intel.com>
1293
1294 * coff-ppc.c: Add 2009 to Copyright.
1295 * elf32-cris.c: Likewise.
1296 * elflink.c: Likewise.
1297
1298 2009-01-03 Hans-Peter Nilsson <hp@axis.com>
1299
1300 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
1301 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
1302
1303 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
1304
1305 PR ld/9679
1306 * elflink.c (elf_merge_st_other): New.
1307 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
1308 hide them if needed.
1309 (elf_link_add_object_symbols): Updated.
1310
1311 2009-01-02 H.J. Lu <hongjiu.lu@intel.com>
1312
1313 PR ld/9676
1314 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
1315 ref_dynamic and dynamic_def fields when setting def_regular
1316 to 1.
1317
1318 2009-01-02 Curtis Mackie <curtmackevo@gmail.com>
1319
1320 PR 9682
1321 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
1322 literal.
1323
1324 For older changes see ChangeLog-2008
1325 \f
1326 Local Variables:
1327 mode: change-log
1328 left-margin: 8
1329 fill-column: 74
1330 version-control: never
1331 End: