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