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