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