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