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