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