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