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