* config/tc-ppc.c (toc_reloc_types): New variable.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
bddc25c9
AM
12010-07-01 Alan Modra <amodra@gmail.com>
2
3 * elf64-ppc.c (ppc64_elf_edit_toc): Keep toc entries for ifuncs.
4
360cfc9c
AM
52010-06-29 Alan Modra <amodra@gmail.com>
6
7 * cpu-maxq.c: Delete file.
8 * coff-maxq.c: Delete file.
9 * Makefile.am: Remove references to maxq.
10 * archures.c: Likewise.
11 * coffcode.h: Likewise.
12 * configure.in: Likewise.
13 * targets.c: Likewise.
14 * config.bfd: Move maxq from obsolete to removed.
15 * Makefile.in: Regenerate.
16 * bfd-in2.h: Regenerate.
17 * configure: Regenerate.
18 * libbfd.h: Regenerate.
19 * po/SRC-POTFILES.in: Regenerate.
20
3f062f44
AM
212010-06-28 Alan Modra <amodra@gmail.com>
22
23 * compress.c (bfd_uncompress_section_contents): Use ATTRIBUTE_UNUSED
24 to silence gcc warning.
25
6bee8834
AM
262010-06-27 Alan Modra <amodra@gmail.com>
27
28 * elf64-ppc.c (get_tls_mask): Don't segfault on NULL elf_section_data.
29 (group_sections): Likewise.
30
c7e2358a
AM
312010-06-27 Alan Modra <amodra@gmail.com>
32
33 * bout.c (aligncode): Delete set but unused variables.
34 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
35 * coff-ppc.c (ppc_record_toc_entry): Likewise.
36 (coff_ppc_relocate_section): Likewise.
37 * coff-rs6000.c (xcoff_complain_overflow_bitfield_func): Likewise.
38 * elf-m10200.c (mn10200_elf_relax_delete_bytes): Likewise.
39 * elf-m10300.c (mn10300_elf_final_link_relocate): Likewise.
40 (mn10300_elf_relax_section): Likewise.
41 * elf32-arm.c (arm_build_one_stub, arm_size_one_stub): Likewise.
42 (record_vfp11_erratum_veneer): Likewise.
43 (bfd_elf32_arm_vfp11_erratum_scan): Likewise.
44 (elf32_arm_final_link_relocate): Likewise.
45 (elf32_arm_check_relocs, arm_map_one_stub): Likewise.
46 * elf32-avr.c (elf32_avr_relax_delete_bytes): Likewise.
47 (elf32_avr_relax_section): Likewise.
48 (avr_mark_stub_not_to_be_necessary): Likewise.
49 * elf32-bfin.c (_bfin_create_got_section): Likewise.
50 * elf32-cr16.c (cr16_elf_final_link_relocate): Likewise.
51 (elf32_cr16_relax_delete_bytes): Likewise.
52 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Likewise.
53 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Likewise.
54 * elf32-crx.c (elf32_crx_relax_delete_bytes): Likewise.
55 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
56 (elf32_h8_relax_delete_bytes): Likewise.
57 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
58 * elf32-i370.c (i370_elf_check_relocs): Likewise.
59 (elf_relocate_section): Likewise.
60 * elf32-ip2k.c (adjust_all_relocations): Likewise.
61 (ip2k_elf_relax_section): Likewise.
62 * elf32-lm32.c (lm32_elf_relocate_section): Likewise.
63 (lm32_elf_check_relocs): Likewise.
64 (lm32_elf_finish_dynamic_sections): Likewise.
65 (lm32_elf_finish_dynamic_symbol): Likewise.
66 * elf32-m32c.c (m32c_offset_for_reloc): Likewise.
67 (m32c_elf_relax_delete_bytes): Likewise.
68 * elf32-m32r.c (m32r_elf_finish_dynamic_symbol): Likewise.
69 (m32r_elf_finish_dynamic_sections): Likewise.
70 (m32r_elf_check_relocs, m32r_elf_fake_sections): Likewise.
71 * elf32-m68hc11.c (m68hc11_elf_relax_section): Likewise.
72 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
73 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
74 * elf32-microblaze.c (microblaze_elf_relocate_section): Likewise.
75 (microblaze_elf_check_relocs): Likewise.
76 (microblaze_elf_finish_dynamic_symbol): Likewise.
77 * elf32-msp430.c (msp430_elf_relax_delete_bytes): Likewise.
78 * elf32-ppc.c (ppc_elf_tls_optimize): Likewise.
79 * elf32-rx.c (rx_elf_relocate_section): Likewise.
80 (elf32_rx_relax_delete_bytes, rx_offset_for_reloc): Likewise.
81 (elf32_rx_relax_section): Likewise.
82 * elf32-score.c (score_elf_got_offset_from_index): Likewise.
83 (score_elf_final_link_relocate): Likewise.
84 (s3_bfd_score_elf_relocate_section): Likewise.
85 * elf32-score7.c (score_elf_got_offset_from_index): Likewise.
86 (s7_bfd_score_elf_relocate_section): Likewise.
87 * elf32-sh.c (sh_elf_check_relocs): Likewise.
88 * elf32-spu.c (spu_elf_relocate_section): Likewise.
89 * elf32-v850.c (v850_elf_check_relocs): Likewise.
90 (find_remembered_hi16s_reloc): Likewise.
91 * elf32-vax.c (elf32_vax_merge_private_bfd_data): Likewise.
92 (elf_vax_relocate_section): Likewise.
93 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
94 * elf32-xtensa.c (xlate_offset_with_removed_text): Likewise.
95 (move_literal): Likewise.
96 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
97 (elf64_hppa_check_relocs): Likewise.
98 (elf64_hppa_finish_dynamic_symbol): Likewise.
99 (elf64_hppa_relocate_section): Likewise.
100 * elf64-mmix.c (mmix_elf_reloc, mmix_elf_relax_section): Likewise.
101 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
102 (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Likewise.
103 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
104 (elfNN_vms_section_from_shdr): Likewise.
105 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
106 (_bfd_sparc_elf_relocate_section): Likewise.
107 * hp300hpux.c (slurp_symbol_table): Likewise.
108 * i386lynx.c (swap_std_reloc_out, swap_std_reloc_in): Likewise.
109 * mach-o.c (bfd_mach_o_write_thread): Likewise.
110 * mmo.c (mmo_scan, mmo_write_symbols_and_terminator): Likewise.
111 * nlm32-sparc.c (nlm_sparc_read_reloc): Likewise.
112 * pdp11.c (pdp11_aout_link_input_section): Likewise.
113 (aout_link_input_section, aout_link_input_bfd): Likewise.
114 * pe-mips.c (mips_swap_reloc_out): Likewise.
115 (coff_pe_mips_relocate_section): Likewise.
116 * som.c (som_bfd_ar_write_symbol_stuff): Likewise.
117 * vms-alpha.c (_bfd_vms_slurp_egsd): Likewise.
118 * xsym.c (bfd_sym_fetch_type_information_table_ent): Likewise.
119
120 * coff-i860.c (i860_reloc_processing): Avoid set but unused warning.
121 * coffcode.h (coff_compute_section_file_positions): Likewise.
122 (coff_slurp_reloc_table): Likewise.
123 * cpu-arm.c (arm_check_note): Likewise.
124 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Likewise.
125 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
126 * elf32-bfin.c (elf32_bfin_merge_private_bfd_data): Likewise.
127 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
128 * elf32-moxie.c (moxie_elf_relocate_section): Likewise.
129 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
130 * elf32-sh64.c (_bfd_sh_align_load_span): Likewise.
131 * ieee.c (parse_expression): Likewise.
132 (ieee_slurp_external_symbols, drop_int): Likewise.
133 * peXXigen.c (pe_print_pdata): Likewise.
134 * versados.c (process_esd): Likewise.
135
4ba2ab9f
TG
1362010-06-25 Tristan Gingold <gingold@adacore.com>
137
138 * vms-alpha.c (_bfd_vms_write_egsd): Check absolute section with
139 its flags. Create an absolute section if needed.
140
1b3d1dbf
TG
1412010-06-25 Tristan Gingold <gingold@adacore.com>
142
143 * vms-alpha.c (_bfd_vms_write_egsd): Set target_index field of
144 sections. Mark .vmsdebug section as SEC_DEBUGGING. Do not create
145 dummy psect anymore. Adjust.
146 (_bfd_vms_write_eeom): Adjust (use target_index instead of index)
147 (_bfd_vms_write_etir): Ditto.
148 (start_etir_or_etbt_record): Test for SEC_DEBUGGING instead of
149 section name. Adjust.
150
9714ee48
TG
1512010-06-25 Tristan Gingold <gingold@adacore.com>
152
153 * vms-alpha.c (alpha_vms_write_exec): Set linktime field.
154
ba761f19
AM
1552010-06-25 Alan Modra <amodra@gmail.com>
156
157 * elf64-ppc.c (toc_skip_enum): Define.
158 (ppc64_elf_edit_toc): Use two low bits of skip array as markers.
159 Optimize largetoc sequences.
160 (adjust_toc_syms): Update for skip array change.
161 (ppc64_elf_relocate_section): Handle R_PPC64_LO_DS_OPT.
162
854b41e7
AM
1632010-06-25 Alan Modra <amodra@gmail.com>
164
165 * elf64-ppc.c (is_static_defined): New function.
166 (get_tls_mask, ppc_type_of_stub): Use it here.
167 (ppc64_elf_edit_opd): Ensure we only attempt to edit ppc64 input.
168 (ppc64_elf_tls_setup): Typo fix.
169 (adjust_toc_syms): Correctly handle symbols defined past the end
170 of the toc. Move syms on removed entries to next entry rather
171 than to start of toc.
172 (ppc64_elf_edit_toc): Likewise. Ensure we only attempt to
173 edit ppc64 input. Allocate one extra word in skip array.
174 Honour info->keep_memory when reading relocs if we can.
175 Adjust toc relocs after adjusting symbols.
176
61e8a5ea
NS
1772010-06-23 Nathan Sidwell <nathan@codesourcery.com>
178
179 * archive64.c (bfd_elf64_archive_write_armap): Fix buffer overrun
180 when scaning map.
181
24df9a51
TG
1822010-06-17 Tristan Gingold <gingold@adacore.com>
183
184 * Makefile.am (BFD32_BACKENDS_CFILES): Move vms-alpha.c to ...
185 (BFD64_BACKENDS_CFILES): ... here.
186 (BFD32_BACKENDS): Move vms-alpha.lo to ...
187 (BFD64_BACKENDS): ... here.
188 * Makefile.in: Regenerate.
189
59e6276b
JM
1902010-06-15 Joseph Myers <joseph@codesourcery.com>
191
192 * elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Decrease to 2.
193 * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type,
194 elf32_tic6x_merge_arch_attributes, elf32_tic6x_merge_attributes,
195 elf32_tic6x_merge_private_bfd_data): New.
196 (bfd_elf32_bfd_merge_private_bfd_data,
197 elf_backend_obj_attrs_arg_type, elf_backend_obj_attrs_section,
198 elf_backend_obj_attrs_section_type, elf_backend_obj_attrs_vendor):
199 Define.
200 * elf32-tic6x.h (elf32_tic6x_merge_arch_attributes): Declare.
201
3de4a297
JM
2022010-06-15 Joseph Myers <joseph@codesourcery.com>
203
204 * elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Define.
205 (struct elf_backend_data): Update comment on obj_attrs_order.
206 * elf-attrs.c (vendor_obj_attr_size, vendor_set_obj_attr_contents,
207 _bfd_elf_copy_obj_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
208 instead of hardcoded 4.
209 * elf32-arm.c (elf32_arm_obj_attrs_order): Use
210 LEAST_KNOWN_OBJ_ATTRIBUTE and LEAST_KNOWN_OBJ_ATTRIBUTE + 1
211 instead of hardcoded 4 and 5.
212 (elf32_arm_merge_eabi_attributes): Use LEAST_KNOWN_OBJ_ATTRIBUTE
213 instead of hardcoded 4.
214
84477db9
KB
2152010-06-14 Kevin Buettner <kevinb@redhat.com>
216
217 * elf32-h8300.c (elf_symbol_leading_char): Define.
218
dddb0e80
JK
2192010-06-11 Jan Kratochvil <jan.kratochvil@redhat.com>
220
221 * vms-alpha.c (_bfd_vms_write_egsd): Make sname const.
222
f654f403
TG
2232010-06-11 Tristan Gingold <gingold@adacore.com>
224
225 * vms-alpha.c (_bfd_vms_slurp_egsd): Always set vma of absolute
226 sections to 0.
227
ff150b92
TG
2282010-06-11 Tristan Gingold <gingold@adacore.com>
229
230 * vms-alpha.c (evax_bfd_print_etir): Handle ETIR__C_STO_GBL_LW.
231
81bb31c0
TG
2322010-06-11 Tristan Gingold <gingold@adacore.com>
233
234 * vms-misc.c (_bfd_vms_output_counted): Make VALUE argument const.
235 Adjust cast.
236 (_bfd_vms_output_dump): Make DATA argument const, adjust cast.
237 * vms.h (_bfd_vms_output_counted, _bfd_vms_output_dump): Adjust.
238 * vms-alpha.c (evax_section_flags): Make it const.
239 (vms_secflag_by_name): Remove unused ABFD argument.
240 Make SECTION_FLAGS and NAME arguments const. Clarify comment.
241 (vms_esecflag_by_name): Make SECTION_FLAGS and NAME arguments const.
242 (_bfd_vms_slurp_egsd): Adjust call to vms_secflag_by_name.
243 (_bfd_vms_write_egsd): Remove useless cast.
244
cb3aabc7
TG
2452010-06-10 Tristan Gingold <gingold@adacore.com>
246
247 * config.bfd: Remove #if/#endif so that som can be compiled on any
248 host.
249 * targets.c (_bfd_target_vector): Remove #if/#endif so that som
250 can be used on any host.
251
e1f000f6
TG
2522010-06-10 Tristan Gingold <gingold@adacore.com>
253
254 * som.c: Can now be compiled on any host.
255 Include bfd headers instead of system one.
256 (som_compute_checksum): Parameter is now a pointer to a
257 som_external_header structure. Adjust.
258 (struct section_to_type): Field section is now const.
259 (R_DLT_REL, R_AUX_UNWIND, R_SEC_STMT): Removed conditional
260 definition.
261 (R_LONG_PCREL_MODE, R_N0SEL, R_N1SEL, R_LINETAB): Ditto.
262 (R_LINETAB_ESC, R_LTP_OVERRIDE, R_COMMENT): Ditto.
263 (som_swap_clock_in, som_swap_clock_out): New functions.
264 (som_swap_header_in, som_swap_header_out): Likewise.
265 (som_swap_space_dictionary_in): Likewise.
266 (som_swap_space_dictionary_out): Likewise.
267 (som_swap_subspace_dictionary_in): Likewise.
268 (som_swap_subspace_dictionary_record_out): Likewise.
269 (som_swap_aux_id_in, som_swap_aux_id_out): Likewise.
270 (som_swap_string_auxhdr_out): Likewise.
271 (som_swap_compilation_unit_out): Likewise.
272 (som_swap_exec_auxhdr_in): Likewise.
273 (som_swap_exec_auxhdr_out): Likewise.
274 (som_swap_lst_header_in): Likewise.
275 (som_object_setup): Adjust parameter type using bfd types.
276 (setup_sections): Likewise. Ditto for object file types.
277 Use intermediate variables for external representation and use the
278 swap functions to convert.
279 (som_object_p): Ditto. Remove #ifdef/#endif on always defined
280 macros.
281 (som_prep_headers): Likewise.
282 (som_write_symbol_strings): Likewise.
283 (som_begin_writing): Likewise.
284 (som_finish_writing): Likewise.
285 (som_build_and_write_symbol_table): Likewise.
286 (bfd_section_from_som_symbol): Likewise.
287 (som_slurp_symbol_table): Likewise.
288 (som_bfd_print_private_bfd_data): Likewise.
289 (bfd_som_attach_aux_hdr): Likewise. Clear the padding.
290 (bfd_som_attach_compilation_unit): Likewise.
291 (som_bfd_count_ar_symbols): Likewise.
292 (som_bfd_fill_in_ar_symbols): Likewise.
293 (som_slurp_armap): Likewise.
294 (som_bfd_ar_write_symbol_stuff): Likewise.
295 (som_write_armap): Likewise. Use _bfd_ar_spacepad instead of
296 sprintf to write header fields.
297 * som.h: Include bfd headers instead of system one.
298 (FILE_HDR_SIZE, AUX_HDR_SIZE): Removed.
299 (struct somdata): Use bfd structures instead of system ones.
300 (struct som_section_data_struct): Likewise.
301 (struct som_subspace_dictionary_record): Removed (now in
302 include/som/internal.h)
303
318cadba
TG
3042010-06-10 Tristan Gingold <gingold@adacore.com>
305
306 * targets.c (bfd_target_list): Remove hp/ux compiler work-around
307 as bfd requires an ANSI-C compiler.
308
f0b3dbfc
TG
3092010-06-09 Tristan Gingold <gingold@adacore.com>
310
311 * bfdio.c (bfd_bread): Fix the code to prevent reading past the
312 end of archive members.
313
7da73d69
TG
3142010-06-08 Tristan Gingold <gingold@adacore.com>
315
316 * som.c (som_bfd_free_cached_info): Do not free relocations as
317 they were allocated with bfd_zalloc.
318
cba3addf
TG
3192010-06-08 Tristan Gingold <gingold@adacore.com>
320
321 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Increment
322 for the first block.
323
09266d1a
TG
3242010-06-08 Tristan Gingold <gingold@adacore.com>
325
326 * vms-lib.c (_bfd_vms_lib_ia64_mkarchive): New function.
327 * libbfd-in.h (_bfd_vms_lib_ia64_mkarchive): Declare.
328 * libbfd.h: Regenerate.
329 * elfxx-ia64.c (bfd_elfNN_write_archive_contents): Redefine for VMS.
330 (bfd_elfNN_mkarchive): Ditto.
331
d0ef7741
TG
3322010-06-02 Tristan Gingold <gingold@adacore.com>
333
334 * vms-alpha.c (alpha_vms_bfd_final_link): Fix 64bit constant.
335
a009f2e7
RW
3362010-06-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
337
338 * configure: Regenerate.
339
46d00b8a
TG
3402010-06-01 Tristan Gingold <gingold@adacore.com>
341
342 * vms-alpha.c (struct vms_private_data_struct): Add
343 transfer_address field. Remove unused dst_info field.
344 (alpha_vms_write_exec): Use transfer_address.
345 (_bfd_vms_write_egsd): Add a comment about LIB$INITIALIZE.
346 (alpha_vms_bfd_final_link): Set transfer_address.
347
7d5ee7d7
TG
3482010-05-31 Tristan Gingold <gingold@adacore.com>
349
350 * vms-lib.c (credat_lo, credat_hi): New fields.
351 (vms_read_block): Adjust comments.
352 (vms_write_block): New function.
353 (_bfd_vms_lib_archive_p): Decode majorid once. Replace some
354 hard-coded values with constants. Set credat_lo and credat_hi.
355 (_bfd_vms_lib_mkarchive): Add argument kind.
356 Set ver, mhd_size and type according to kind.
357 (_bfd_vms_lib_alpha_mkarchive): New function.
358 (struct lib_index): Renamed from struct vms_index
359 (lib_index_cmp): Renamed from vms_index_cmp. Adjusted.
360 (get_idxlen): Type of idx argument adjusted. Add is_elfidx
361 argument and handle it.
362 (vms_write_index): Adjust argument idx. Handle elf indexes.
363 (_bfd_vms_lib_build_map): Adjust type of arguments modules and res.
364 (_bfd_vms_lib_write_archive_contents): Add is_elfidx variable and
365 use it. Handle elf indexes. Set credat.
366 * libbfd-in.h (_bfd_vms_lib_mkarchive): Renamed to ...
367 (_bfd_vms_lib_alpha_mkarchive): ... this.
368 * libbfd.h: Regenerated.
369 * vms-alpha.c (vms_alpha_vec): Adjust after previous renaming.
370
7aa09196
SA
3712010-05-28 Sterling Augustine <sterling@tensilica.com>
372
7d5ee7d7 373 * elf32-xtensa.c (elf_xtensa_relocate_section): Add a large amount
7aa09196
SA
374 of code to change the bits in the instructions to match the changes
375 in the relocations. Declare dest_addr and sym_sec to help.
376
81c5c866
JK
3772010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
378
379 Workaround GCC PR middle-end/4210.
380 * vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2]
381 and val[3].
382
953b49ed
TG
3832010-05-27 Tristan Gingold <gingold@adacore.com>
384
385 * vms-misc.c: Define __NEW_STARLET. Remove trailing spaces.
386 (VMS_TIME_FACTOR, VMS_TIME_OFFSET): New macros.
387 (vms_time_to_time_t): Use them instead of local const.
388 (vms_time_t_to_vms_time): New function.
389 (vms_get_time): Likewise.
390 (vms_raw_get_time): Likewise.
391 * vms.h (vms_time_t_to_vms_time): New declaration.
392 (vms_get_time): Likewise.
393 (vms_raw_get_time): Likewise.
394
f9eeb9c9
TG
3952010-05-26 Tristan Gingold <gingold@adacore.com>
396
397 * vms-alpha.c: Update comments.
398 (alpha_vms_write_exec): Set lnkflags. Write the GST.
399 (alpha_vms_link_output_symbol): New function.
400 (alpha_vms_bfd_final_link): Generate the VMS symbol table.
401 Set dst_section private field.
402 (alpha_vms_bfd_final_link): Remove code that set dst_section.
403
65077aa8
TG
4042010-05-26 Tristan Gingold <gingold@adacore.com>
405
406 * bfdio.c: Declare and define _bfd_memory_iovec.
407 (bfd_bread): Move code for BFD_IN_MEMORY...
408 (bfd_bwrite): ... Ditto ...
409 (bfd_tell): ... Ditto ...
410 (bfd_flush): ... Ditto ...
411 (bfd_stat): ... Ditto ...
412 (bfd_seek): ... Ditto ...
413 (bfd_get_size): ... Ditto ...
414 (bfd_mmap): ... Ditto ...
415 (memory_bread): ... to these new functions.
416 (memory_bwrite): Ditto.
417 (memory_btell): Ditto.
418 (memory_bseek): Ditto.
419 (memory_bflush): Ditto.
420 (memory_bstat): Ditto.
421 (memory_bmmap): Ditto.
422 (memory_bclose): New function.
423 * peicode.h (pe_ILF_build_a_bfd): Use BFD_IN_MEMORY.
424 * xcofflink.c (bfd_xcoff_link_generate_rtinit): Ditto.
425 * opncls.c (bfd_close): Do not handle BFD_IN_MEMORY case.
426 (bfd_make_writable): Use _bfd_memory_iovec.
427 * elfcode.h (bfd_from_remote_memory): Use _bfd_memory_iovec.
428 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Use
429 _bfd_memory_iovec.
430 (alpha_ecoff_openr_next_archived_file): Use proxy_origin
431 instead of origin.
432 * libbfd.h: Regenerate.
433
8e45593f
NC
4342010-05-25 Daniel Jacobowitz <dan@codesourcery.com>
435 Joseph Myers <joseph@codesourcery.com>
436 Andrew Stubbs <ams@codesourcery.com>
437
438 * config.bfd (sh-*-uclinux* | sh[12]-*-uclinux*): Add
439 bfd_elf32_shl_vec, and FDPIC vectors to targ_selvecs.
440 * configure.in: Handle FDPIC vectors.
441 * elf32-sh-relocs.h: Add FDPIC and movi20 relocations.
442 * elf32-sh.c (DEFAULT_STACK_SIZE): Define.
443 (SYMBOL_FUNCDESC_LOCAL): Define. Use it instead of
444 SYMBOL_REFERENCES_LOCAL for function descriptors.
445 (fdpic_object_p): New.
446 (sh_reloc_map): Add FDPIC and movi20 relocations.
447 (sh_elf_info_to_howto, sh_elf_relocate_section): Handle new invalid
448 range.
449 (struct elf_sh_plt_info): Add got20 and short_plt. Update all
450 definitions.
451 (FDPIC_PLT_ENTRY_SIZE, FDPIC_PLT_LAZY_OFFSET): Define.
452 (fdpic_sh_plt_entry_be, fdpic_sh_plt_entry_le, fdpic_sh_plts): New.
453 (FDPIC_SH2A_PLT_ENTRY_SIZE, FDPIC_SH2A_PLT_LAZY_OFFSET): Define.
454 (fdpic_sh2a_plt_entry_be, fdpic_sh2a_plt_entry_le)
455 (fdpic_sh2a_short_plt_be, fdpic_sh2a_short_plt_le, fdpic_sh2a_plts):
456 New.
457 (get_plt_info): Handle FDPIC.
458 (MAX_SHORT_PLT): Define.
459 (get_plt_index, get_plt_offset): Handle short_plt.
460 (union gotref): New.
461 (struct elf_sh_link_hash_entry): Add funcdesc, rename tls_type to
462 got_type and adjust all uses. Add GOT_FUNCDESC.
463 (struct sh_elf_obj_tdata): Add local_funcdesc. Rename
464 local_got_tls_type to local_got_type.
465 (sh_elf_local_got_type): Renamed from sh_elf_local_got_tls_type. All
466 users changed.
467 (sh_elf_local_funcdesc): Define.
468 (struct elf_sh_link_hash_table): Add sfuncdesc, srelfuncdesc, fdpic_p,
469 and srofixup.
470 (sh_elf_link_hash_newfunc): Initialize new fields.
471 (sh_elf_link_hash_table_create): Set fdpic_p.
472 (sh_elf_omit_section_dynsym): New.
473 (create_got_section): Create .got.funcdesc, .rela.got.funcdesc
474 and .rofixup.
475 (allocate_dynrelocs): Allocate local function descriptors and space
476 for R_SH_FUNCDESC-related relocations, and for rofixups.
477 Handle GOT_FUNCDESC. Create fixups. Handle GOT entries which
478 require function descriptors.
479 (sh_elf_always_size_sections): Handle PT_GNU_STACK and __stacksize.
480 (sh_elf_modify_program_headers): New.
481 (sh_elf_size_dynamic_sections): Allocate function descriptors for
482 local symbols. Allocate .got.funcdesc contents. Allocate rofixups.
483 Handle local GOT entries of type GOT_FUNCDESC. Create fixups for
484 local GOT entries. Ensure that FDPIC libraries always have a PLTGOT
485 entry in the .dynamic section.
486 (sh_elf_add_dyn_reloc, sh_elf_got_offset, sh_elf_initialize_funcdesc)
487 (sh_elf_add_rofixup, sh_elf_osec_to_segment)
488 (sh_elf_osec_readonly_p, install_movi20_field): New functions.
489 (sh_elf_relocate_section): Handle new relocations, R_SH_FUNCDESC,
490 R_SH_GOTFUNCDESC and R_SH_GOTOFFFUNCDESC. Use sh_elf_got_offset
491 and .got.plt throughout to find _GLOBAL_OFFSET_TABLE_. Add rofixup
492 read-only section warnings. Handle undefined weak symbols. Generate
493 fixups for R_SH_DIR32 and GOT entries. Check for cross-segment
494 relocations and clear EF_SH_PIC. Handle 20-bit relocations.
495 Always generate R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
496 (sh_elf_gc_sweep_hook): Handle R_SH_FUNCDESC, R_SH_GOTOFF20,
497 R_SH_GOTFUNCDESC, R_SH_GOTFUNCDESC20, and R_SH_GOTOFFFUNCDESC.
498 Handle 20-bit relocations.
499 (sh_elf_copy_indirect_symbol): Copy function descriptor reference
500 counts.
501 (sh_elf_check_relocs): Handle new relocations. Make symbols
502 dynamic for FDPIC relocs. Account for rofixups. Error for FDPIC
503 symbol mismatches. Allocate a GOT for R_SH_DIR32. Allocate fixups
504 for R_SH_DIR32.
505 (sh_elf_copy_private_data): Copy PT_GNU_STACK size.
506 (sh_elf_merge_private_data): Copy initial flags. Do not clobber
507 non-mach flags. Set EF_SH_PIC for FDPIC. Reject FDPIC mismatches.
508 (sh_elf_finish_dynamic_symbol): Do not handle got_funcdesc entries
509 here. Rename sgot to sgotplt and srel to srelplt. Handle short_plt,
510 FDPIC descriptors, and got20. Create R_SH_FUNCDESC_VALUE for FDPIC.
511 Use install_movi20_field. Rename srel to srelgot. Always generate
512 R_SH_DIR32 for FDPIC instead of R_SH_RELATIVE.
513 (sh_elf_finish_dynamic_sections): Fill in the GOT pointer in rofixup.
514 Do not fill in reserved GOT entries for FDPIC. Correct DT_PLTGOT.
515 Rename sgot to sgotplt. Assert that the right number of rofixups
516 and dynamic relocations were allocated.
517 (sh_elf_use_relative_eh_frame, sh_elf_encode_eh_address): New.
518 (elf_backend_omit_section_dynsym): Use sh_elf_omit_section_dynsym.
519 (elf_backend_can_make_relative_eh_frame)
520 (elf_backend_can_make_lsda_relative_eh_frame)
521 (elf_backend_encode_eh_address): Define.
522 (TARGET_BIG_SYM, TARGET_BIG_NAME, TARGET_LITTLE_SYM)
523 (TARGET_LITTLE_NAME, elf_backend_modify_program_headers, elf32_bed):
524 Redefine for FDPIC vector.
525 * reloc.c: Add SH FDPIC and movi20 relocations.
526 * targets.c (_bfd_target_vector): Add FDPIC vectors.
527 * configure, bfd-in2.h, libbfd.h: Regenerated.
528
9fcd9da6
NC
5292010-05-25 Jay Krell <jay.krell@cornell.edu>
530
531 PR ld/11624
532 * archive.c (_bfd_calloc_wrapper): New function.
533 (_bfd_add_bfd_to_archive_cache): Use it.
534
535 * configure.in: Add alpha*-*-*vms* to list of natives.
536 * configure: Regenerate.
537
538 * vms-misc.c: Define globalref if necessary.
539 (vms_convert_to_var_unix_filename): Rename to
540 _bfd_vms_convert_to_var_unix_filename and export.
541 * vms.h: Add prototype for _bfd_vms_convert_to_var_unix_filename.
542 * vms-alpha.c (vms_close_and_cleanup): Update invocation of
543 vms_convert_to_var_unix_filename.
544
c734eb83
TG
5452010-05-24 Tristan Gingold <gingold@adacore.com>
546
ce76e55c
TG
547 * vms-alpha.c (add_symbol_entry): New function extrated from ...
548 (add_symbol): ... adjusted.
c734eb83 549
5fe88cfb
TG
5502010-05-24 Tristan Gingold <gingold@adacore.com>
551
552 * vms-alpha.c (_bfd_vms_slurp_egsd): Fix indentation.
553 (alpha_vms_write_exec): Add a comment.
554 (_bfd_vms_write_egsd): Ditto.
555 (alpha_vms_convert_symbol): Remove a blank line.
556
6a286118
TG
5572010-05-21 Tristan Gingold <gingold@adacore.com>
558
559 * vms-alpha.c (_bfd_vms_slurp_eihs): Do not create a bfd section
560 for the GST.
561
c068d5be
TG
5622010-05-21 Tristan Gingold <gingold@adacore.com>
563
564 * vms-alpha.c (_bfd_vms_slurp_eisd): Set SEC_HAS_CONTENTS and
565 SEC_LOAD if isect has data.
566 (vms_get_symbol_info): Refine the condition for 'T' type.
567
bd7b51b4
TG
5682010-05-18 Tristan Gingold <gingold@adacore.com>
569
570 * vms-alpha.c (_bfd_vms_write_emh): New function.
571 (_bfd_vms_write_lmn): New function.
572 (_bfd_vms_write_eeom): Moved.
573 (hash_string): Likewise.
574 (_bfd_vms_length_hash_symbol): Likewise.
575 (_bfd_vms_write_ehdr): Code moved to _bfd_vms_write_emh
576 and _bfd_vms_write_lmn, and call these functions.
577
0fca53b7
TG
5782010-05-18 Tristan Gingold <gingold@adacore.com>
579
580 * vms-alpha.c (evax_bfd_print_dst): Handle INCR_LINUM_L.
581 Add details in the messages.
582 (evax_bfd_print_image): Change message.
583
18ae9cc1
L
5842010-05-18 H.J. Lu <hongjiu.lu@intel.com>
585
586 PR gas/11600
587 * elf.c (_bfd_elf_make_section_from_shdr): Handle SHF_EXCLUDE
588 (elf_fake_sections): Likewise.
589
590 * elf32-i370.c (i370_elf_section_from_shdr): Don't handle
591 SHF_EXCLUDE here.
592 * elf32-ppc.c (ppc_elf_fake_sections): Likewise.
593
9a1b4480
TG
5942010-05-17 Tristan Gingold <gingold@adacore.com>
595
596 * vms-alpha.c: Include esgps.h and eidc.h.
597 (_bfd_vms_slurp_egsd): Ignore SPSC and IDC sub-records.
3a689531
TG
598 (evax_bfd_print_egsd_flags): New function, extracted from ...
599 (evax_bfd_print_egsd): ..., calls evax_bfd_print_egsd_flags. Handles
9a1b4480
TG
600 EGSD__C_SPSC and EGSD__C_IDC.
601
af47dcbf
TG
6022010-05-14 Tristan Gingold <gingold@adacore.com>
603
604 * vms-alpha.c (alpha_vms_object_p): Accept header size of 0.
605 (_bfd_vms_get_object_record): Handle align byte only in the
606 foreign case.
607
7256a114
TG
6082010-05-14 Tristan Gingold <gingold@adacore.com>
609
610 * vms-lib.c (_bfd_vms_lib_ia64_archive_p): New function.
611 * libbfd-in.h (_bfd_vms_lib_ia64_archive_p): Add prototype.
612 * libbfd.h: Regenerate.
613 * configure.in (havevecs): Define HAVE_all_vecs when
614 --enable-targets=all is set. Use AC_SUBST on it.
615 (tdefaults): Do not add havevecs.
616 (bfd_elf64_ia64_vms_vec): Add vms-lib.lo and vms-misc.lo
617 * configure: Regenerate.
618 * Makefile.am (HAVEVECS): New variable.
619 (INCLUDES): Add HAVEVECS.
620 * Makefile.in: Regenerate.
621 * elfxx-ia64.c (INCLUDE_IA64_VMS): New macro, defined if vms
622 target is selected. Add #ifdef/#endif around vms specific code.
623 (bfd_elfNN_archive_p, bfd_elfNN_archive_slurp_armap,
624 bfd_elfNN_archive_slurp_extended_name_table,
625 bfd_elfNN_archive_construct_extended_name_table,
626 bfd_elfNN_archive_truncate_arname,
627 bfd_elfNN_archive_write_armap,
628 bfd_elfNN_archive_read_ar_hdr,
629 bfd_elfNN_archive_write_ar_hdr,
630 bfd_elfNN_archive_openr_next_archived_file,
631 bfd_elfNN_archive_get_elt_at_index,
632 bfd_elfNN_archive_generic_stat_arch_elt,
633 bfd_elfNN_archive_update_armap_timestamp): Define to use vms archives.
634
4547cb56
NC
6352010-05-11 Jie Zhang <jie@codesourcery.com>
636
637 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Merge
638 Tag_ABI_HardFP_use correctly.
639
3390ce30
AM
6402010-05-11 Alan Modra <amodra@gmail.com>
641
642 * coffcode.h (coff_write_object_contents): Enclose all occurrences
643 of hasdebug and is_reloc_section in #ifdef COFF_IMAGE_WITH_PE.
644
92750f34
DJ
6452010-05-07 Daniel Jacobowitz <dan@codesourcery.com>
646
647 * elf32-arm.c (struct a8_erratum_reloc): Add hash member. Move
648 sym_name to improve packing.
649 (cortex_a8_erratum_scan): Check for PLT entries.
650 (elf32_arm_size_stubs): Save the target symbol for a8 relocs.
651
6540b386
TG
6522010-05-07 Tristan Gingold <gingold@adacore.com>
653
654 * Makefile.in: Regenerate with automake 1.11.1.
655 * aclocal.m4: Ditto.
656
3e01a7fd
NC
6572010-05-05 Nick Clifton <nickc@redhat.com>
658
659 * po/es.po: Updated Spanish translation.
660
fa23f0f4
TG
6612010-05-03 Tristan Gingold <gingold@adacore.com>
662
663 * vms-lib.c (vms_lib_bopen): Fix the size threshold to read
664 selective_search flag.
665 Add comments.
666 * vms-alpha.c (alpha_vms_bfd_final_link): Create the DMT section
667 before output_has_begun is set.
668
44273c5b
TG
6692010-05-03 Tristan Gingold <gingold@adacore.com>
670
671 * vms-alpha.c: Add comments.
672 (struct vms_private_data_struct): Remove image_autoextend field.
673 (dst_check_allocation): Removed.
674 (image_write): Remove call to dst_check_allocation.
675 (vms_slurp_debug): Do not set image_autoextend. Adjust section
676 size.
677 (_bfd_vms_slurp_object_records): Remove useless new_type variable.
678 (alpha_vms_write_exec): Use dst_section to get the dst section.
679 Write the dmt section.
680 (evax_bfd_print_image): Also print the dst size in hexa. Fix typo.
681 (alpha_vms_read_sections_content): Do not set image_autoextend.
fa23f0f4 682 (alpha_vms_bfd_final_link): Generate the dst.
44273c5b 683
ab94b07c
TG
6842010-05-03 Tristan Gingold <gingold@adacore.com>
685
686 * vms-lib.c (_bfd_vms_lib_archive_p): Adjust for a possible empty
687 next array.
688 (vms_lib_dcx): Adjust for the above change.
689
0672748a
L
6902010-04-30 H.J. Lu <hongjiu.lu@intel.com>
691
692 PR ld/11542
693 * elf-bfd.h (RELOC_AGAINST_DISCARDED_SECTION): New.
694
695 * elf32-i386.c (elf_i386_relocate_section): Use it.
696 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
697
13a985e1
TG
6982010-04-30 Tristan Gingold <gingold@adacore.com>
699
700 * vms-lib.c (vms_read_block): New function.
701 (vms_traverse_index): Use vms_read_block. Handle long key names.
702
8e57e1d1
TG
7032010-04-30 Tristan Gingold <gingold@adacore.com>
704
705 * vms-lib.c (struct lib_tdata): Field artdata added, fields nbr_syms
706 and syms removed.
707 (struct carsym_mem): New structure.
708 (vms_add_index): New function.
709 (vms_add_indexes_from_list): New function.
710 (vms_traverse_index): Parameter carsym changed to carsym_mem.
711 Code adjusted to handle elfidx.
712 (vms_lib_read_index): Adjusted for vms_traverse_index changes.
713 Parameter NBREL is now a pointer.
714 (_bfd_vms_lib_archive_p): Adjust for above change. Handle ia64
715 archives.
716 (_bfd_vms_lib_mkarchive): Adjusted for changes in struct lib_tdata.
717 (_bfd_vms_lib_find_symbol): Ditto.
718 (vms_lib_bopen): Fix two typos: return FALSE in case of error,
719 check MHD id.
720 (_bfd_vms_lib_get_module): New function.
721 (_bfd_vms_lib_get_elt_at_index): Rewritten using the above
722 function.
723 (_bfd_vms_lib_openr_next_archived_file): Use _bfd_vms_lib_get_module.
724 (_bfd_vms_lib_generic_stat_arch_elt): Handle ia64 archives.
725 (vms_write_index): Adjust for structure renamed.
726 * vms-alpha.c (alpha_vms_link_add_archive_symbols): Adjust for
727 changes of _bfd_vms_lib_find_symbol.
728
bb591cfe
KT
7292010-04-28 Kai Tietz <kai.tietz@onevision.com>
730
731 * config.bfd: Correct accidential reverted patch
732 about vax*-*-*vms*.
733
ef72a554
KT
7342010-04-27 Kai Tietz <kai.tietz@onevision.com>
735
736 * pe-x86_64.c (TARGET_UNDERSCORE): Set value dependent
737 to USE_MINGW64_LEADING_UNDERSCORES.
854b41e7 738 * pei-x86_64.c (TARGET_UNDERSCORE): Likewise.
ef72a554
KT
739 * config.bfd: Change underscoring default for x64 mingw
740 to false.
741 * coffcode.h (coff_write_relocs): Add check that dereferenced
742 sym_ptr_ptr isn't NULL.
743 * config.in (USE_MINGW64_LEADING_UNDERSCORES): New.
744 * configure: Regenerated.
745 * configure.in: Add option '--enable-leading-mingw64-underscores'
746 and define config.in variable USE_MINGW64_LEADING_UNDERSCORES.
747
4d9e2b27
NC
7482010-04-27 Nick Clifton <nickc@redhat.com>
749
750 PR binutils/11512
751 * coffgen.c (coff_find_nearest_line): Incldue the section address
752 of function name symbols in address comparisons.
753
4ba3f034
NC
7542010-04-27 Nick Clifton <nickc@redhat.com>
755
756 * po/fr.po: Updated French translation.
757
9a83a553
AM
7582010-04-23 Alan Modra <amodra@gmail.com>
759
760 * elf.c: Replace use of ELF_IS_SECTION_IN_SEGMENT and
761 ELF_IS_SECTION_IN_SEGMENT_FILE with ELF_SECTION_IN_SEGMENT
762 throughout file.
763 (assign_file_positions_for_load_sections): Modify section in
764 segment warning to ignore overlay vmas.
765 * elf32-spu.c (spu_elf_object_p): Replace use of
766 ELF_IS_SECTION_IN_SEGMENT_MEMORY with ELF_SECTION_IN_SEGMENT.
767
9c9c98a5
NC
7682010-04-22 Nick Clifton <nickc@redhat.com>
769
770 * po/bfd.pot: Updated by the Translation project.
771 * po/vi.po: Updated Vietnamese translation.
772
3ac9b6c9
AM
7732010-04-22 Alan Modra <amodra@gmail.com>
774
775 * elf.c (assign_file_positions_for_load_sections): Revert 2008-05-29
776 change. Tidy. Don't error on sections not allocated in segment.
777
85fdf906
AH
7782010-04-15 Andrew Haley <aph@redhat.com>
779
780 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add new flag:
781 merge_exidx_entries.
782 * bfd-in2.h: Likewise.
783 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Likewise. Use it to
784 control merging of exidx entries.
9c9c98a5 785
41820509
JM
7862010-04-20 Joseph Myers <joseph@codesourcery.com>
787
788 * elf32-tic6x.h: New.
789 * elf-bfd.h (enum elf_target_id): Define TIC6X_ELF_DATA.
790 * elf32-tic6x.c (struct elf32_tic6x_obj_tdata, elf32_tic6x_tdata,
791 elf32_tic6x_howto_table_rel, elf32_tic6x_info_to_howto_rel,
792 elf32_tic6x_set_use_rela_p, elf32_tic6x_mkobject,
793 elf32_tic6x_new_section_hook, elf32_tic6x_rel_relocation_p,
794 bfd_elf32_mkobject, bfd_elf32_new_section_hook): New.
795 (elf32_tic6x_reloc_type_lookup, elf32_tic6x_reloc_name_lookup,
796 elf32_tic6x_relocate_section): Handle REL relocations.
797 (elf_info_to_howto_rel): Define to elf32_tic6x_info_to_howto_rel.
798
643be349
JJ
7992010-04-20 Jakub Jelinek <jakub@redhat.com>
800
801 * dwarf2.c (find_abstract_instance_name, scan_unit_for_symbols): Treat
802 DW_AT_linkage_name the same as DW_AT_MIPS_linkage_name.
803
c9736ba0
NC
8042010-04-19 Nick Clifton <nickc@redhat.com>
805
806 * archive64.c (bfd_elf64_archive_slurp_armap): Remove unused
807 arhdrpos variable.
808 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add unused
809 attribute to warned variable. Remove unused val, type and type2
810 variables.
811
11afaeda
TG
8122010-04-16 Andreas Schwab <schwab@redhat.com>
813
814 * vms-alpha.c (alpha_vms_link_add_object_symbols): Avoid breaking
815 strict-aliasing rules.
c9736ba0 816
ddfb684a
TG
8172010-04-16 Tristan Gingold <gingold@adacore.com>
818
819 * vms-alpha.c (_bfd_vms_slurp_eihd): Fix typo.
820 (_bfd_vms_get_object_record): Always assume there is a pad byte
821 for alignment.
11afaeda 822
ddfb684a
TG
823 * vms-lib.c: Add a few comments.
824
75375b3e
MGD
8252010-04-15 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
826
827 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Support additions to
828 attributes in v2.08 of the ABI.
829
f526ccf3
AM
8302010-04-15 Alan Modra <amodra@gmail.com>
831
832 * config.bfd (vax*-*-*vms*): Delete.
833
95e34ef7
TG
8342010-04-14 Tristan Gingold <gingold@adacore.com>
835
836 * Makefile.am (BFD32_BACKENDS): Remove vms-gsd.lo, vms-hdr.lo,
837 vms-tir.lo, vms.lo and add vms-alpha.lo
838 (BFD32_BACKENDS_CFILES): Remove vms-gsd.c, vms-hdr.c,
839 vms-tir.c, vms.c and add vms-alpha.c
840 * Makefile.in: Regenerate.
841 * configure.in (TDEFINES): Adjust file list for vms_alpha_vec.
842 Remove vms_vax_vec.
843 * configure: Regenerate.
844 * targets.c (vms_vax_vec): Remove the declaration.
845 (_bfd_target_vector): Remove vms_vax_vec.
846 * vms-alpha.c: New file.
847 * vms-gsd.c: Removed, rewritten in vms-alpha.c
848 * vms-hdr.c: Ditto.
849 * vms-tir.c: Ditto.
850 * vms.c: Ditto.
851 * vms-misc.c: Fix indentation and comments. Replace most of
852 #if VMS_DEBUG/vms_debug with vms_debug2.
853 (_bfd_vms_hash_newfunc): Moved to vms-alpha.c
854 (hash_string): Ditto.
855 (_bfd_vms_length_hash_symbol): Ditto.
856 (maybe_adjust_record_pointer_for_object): Ditto.
857 (_bfd_vms_get_object_record): Ditto.
858 (vms_get_remaining_object_record): Ditto.
859 (_bfd_vms_push): Ditto.
860 (_bfd_vms_pop): Ditto.
861 (_bfd_vms_get_header_values): Removed.
862 (_bfd_vms_get_first_record): Removed.
863 (vms_get_remaining_image_record): Removed.
864 (new_symbol): Removed.
865 (_bfd_vms_enter_symbol): Removed.
866 (_bfd_vms_save_sized_string): Use memcpy instead of strncpy.
867 (_bfd_vms_output_begin): Remove rechead parameter. Replace bfd
868 parameter with struct vms_rec_wr.
869 (_bfd_vms_output_push): Removed and replaced by ...
870 (_bfd_vms_output_begin_subrec): ... new function.
871 (_bfd_vms_output_alignment): Replace bfd parameter with
872 struct vms_rec_wr, and adjust.
873 (_bfd_vms_output_check): Ditto
874 (_bfd_vms_output_byte): Ditto.
875 (_bfd_vms_output_short): Ditto.
876 (_bfd_vms_output_long): Ditto.
877 (_bfd_vms_output_quad): Ditto.
878 (_bfd_vms_output_counted): Ditto.
879 (_bfd_vms_output_dump): Ditto.
880 (_bfd_vms_output_fill): Ditto.
881 (_bfd_vms_output_pop): Removed and replaced by ...
882 (_bfd_vms_output_end_subrec): ... new function.
883 (_bfd_vms_output_flush): Removed.
884 (_bfd_vms_output_align): New function.
885 (_bfd_vms_output_end): Add recwr parameter. Adjust for this new
886 parameter.
887 (vms_convert_to_var): New function imported from vms.c
888 (vms_convert_to_var_1): Ditto.
889 (vms_convert_to_var_unix_filename): Ditto.
890 (vms_get_module_name): Ditto.
891 (get_vms_time_string): Ditto.
892 (vms_time_to_time_t): Ditto.
893 (vms_rawtime_to_time_t): Ditto.
894 * vms.h: All macros for the VMS file format are now in include/vms.
895 Prototypes for vms.c, vms-gsd.c, vms-misc.c, vms-hdr.c, vms-tir.c
896 have been removed.
897 (struct vms_symbol_struct, struct stack_struct): Moved to vms-alpha.c
898 (struct fileinfo, struct srecinfo, struct lineinfo): Ditto.
899 (struct funcinfo, struct vms_private_data_struct): Ditto.
900 (struct vms_section_data_struct): Ditto.
901 (struct vms_rec_rd, stryct vms_rec_wr): New declarations.
902 (vms_get_module_name, get_vms_time_string): New declarations.
903 (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
904 (_bfd_vms_output_begin_subrec, _bfd_vms_output_end_subrec): Ditto.
905 (_bfd_vms_save_sized_string, _bfd_vms_save_counted_string): Adjusted.
906 (_bfd_vms_output_begin, _bfd_vms_output_alignment): Ditto.
907 (_bfd_vms_output_end,_bfd_vms_output_check): Ditto.
908 (_bfd_vms_output_byte, _bfd_vms_output_short): Ditto.
909 (_bfd_vms_output_long, _bfd_vms_output_quad): Ditto.
910 (_bfd_vms_output_counted, _bfd_vms_output_dump): Ditto.
911 (_bfd_vms_output_fill): Ditto.
912 (bfd_vms_set_section_flags): Ditto.
913
895fa45f
MGD
9142010-04-14 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
915
916 * elflink.c (_bfd_elf_merge_symbol): Tighten up the test for early
917 exit due to merging the same weak symbol to test that the symbols are
918 actually weak.
919
727ac201
AM
9202010-04-13 Alan Modra <amodra@gmail.com>
921
922 * elf64-ppc.c (ppc64_elf_relocate_section): Correct NOP location
923 when optimizing high got_tlsgd/ld insns.
924
fe50f439
L
9252010-04-10 H.J. Lu <hongjiu.lu@intel.com>
926
927 * hosts/x86-64linux.h (HAVE_PRPSINFO32_T): Undefine before
928 define.
929 (HAVE_PRSTATUS32_T): Likewise.
930
8bc7f138
L
9312010-04-10 H.J. Lu <hongjiu.lu@intel.com>
932
933 PR corefiles/11467
934 * configure.in (CORE_HEADER): New. Set to hosts/x86-64linux.h
935 for x86_64-*-linux*.
936 * config.in: Regenerated.
937 * configure: Likewise.
938
939 * elf.c: Include CORE_HEADER if it is defined.
940
9412010-04-10 H.J. Lu <hongjiu.lu@intel.com>
942 Jan Kratochvil <jan.kratochvil@redhat.com>
943
944 * hosts/x86-64linux.h: New.
945
3d540e93
NC
9462010-04-09 Nick Clifton <nickc@redhat.com>
947
948 * aoutx.h (aout_link_input_bfd): Remove unused variable sym_count.
949 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Remove unused
950 variables htab and hdr_info and mark info parameter as unused.
951 * elf.c (prep_headers): Remove unused variable i_phdrp.
952 (_bfd_elf_write_object_contents): Remove unused variable i_ehdrp.
953 * elf32-i386.c (elf_i386_relocate_section): Mark variabled warned
954 as unused.
955 * peXXigen.c (pe_print_reloc): Remove unused variable datasize.
956 * verilog.c (verilog_write_section): Remove unused variable
957 address.
958
d1a98e0c
AM
9592010-04-07 Alan Modra <amodra@gmail.com>
960
961 * warning.m4 (GCC_WARN_CFLAGS): Only add -Wshadow for gcc-4 and above.
962 * configure: Regenerate.
963
6f8bcf84
L
9642010-04-06 H.J. Lu <hongjiu.lu@intel.com>
965
966 PR ld/11434
967 * elf-bfd.h (SYMBOLIC_BIND): Don't bind unique symbol locally.
968
0e9b2e9a
TG
9692010-04-06 Tristan Gingold <gingold@adacore.com>
970
971 * vms-lib.c (_bfd_vms_lib_write_archive_contents): Fix idd flags.
972
a233b20c
JJ
9732010-04-05 Jakub Jelinek <jakub@redhat.com>
974
604282a7
JJ
975 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): Handle CIE version 4
976 provided that it has the expected address size and zero segment
977 length.
978
a233b20c
JJ
979 * dwarf2.c (struct line_head): Add maximum_ops_per_insn field.
980 (struct line_info): Add op_index field, change end_sequence type to
981 unsigned char.
982 (new_line_sorts_after): For the same address compare op_index.
983 (add_line_info): Add op_index argument, store it into the structure.
984 (decode_line_info): Complain about unknown versions of .debug_line.
985 Initialize maximum_ops_per_insn. Add op_index state register and
986 track it.
987
f2faa800
NS
9882010-04-01 Nathan Sidwell <nathan@codesourcery.com>
989
990 * elf32-ppc.c (apuinfo_set): New static var.
991 (ppc_elf_begin_write_processing): Set it here, always create an
992 APUinfo section if there were any in the inputs.
993 (ppc_elf_write_section): Check apuinfo_set.
994 (ppc_elf_final_write_processing): Likewise.
995
4b544b64
TG
9962010-04-01 Tristan Gingold <gingold@adacore.com>
997
998 * vms.h: Include time.h. Add prototypes for vms_get_module_name,
999 vms_time_to_time_t and vms_rawtime_to_time_t.
1000 * vms.c (vms_alpha_vec): Add archives support.
1001 * vms-misc.c: Include safe-ctype.h
1002 (vms_get_module_name): New function.
1003 (vms_time_to_time_t, vms_rawtime_to_time_t): Ditto.
1004 * vms-hdr.c (_bfd_vms_write_hdr): Put module name creation to the
1005 vms_get_module_name function. Use this function.
1006 * targets.c: Declare vms_lib_txt_vec. Add it to _bfd_target_vector.
1007 * libbfd-in.h: Add prototype for _bfd_append_relative_path.
1008 Add prototypes for vms-lib.c
1009 * libbfd.h: Regenerate.
1010 * configure.in (TDEFINES): Add an entry for vms_lib_txt_vec. Add
1011 vms-lib.lo to vms_alpha_vec.
1012 * config.bfd (targ_cpu): Add targ_selvecs for alpha*-*-*vms*.
1013 * configure: Regenerate.
1014 * bfd.c: Add selective_search field.
1015 * bfd-in2.h: Regenerate.
1016 * archive.c (append_relative_path): Rename to
1017 _bfd_append_relative_path and make it public.
1018 (_bfd_get_elt_at_filepos): Adjust for above renaming.
1019 * Makefile.am (BFD32_BACKENDS): Add vms-lib.lo
1020 (BFD32_BACKENDS_CFILES): Add vms-lib.c
1021 * Makefile.in: Regenerate.
1022
c07cbdd7
JJ
10232010-04-01 Jakub Jelinek <jakub@redhat.com>
1024
1025 * dwarf2.c (read_attribute_value): Handle CU version 4
1026 for DW_FORM_ref_addr, handle DW_FORM_sec_offset, DW_FORM_exprloc
1027 and DW_FORM_flag_present. For unknown form value return NULL.
1028 (scan_unit_for_symbols): For DW_AT_location handle DW_FORM_exprloc
1029 like DW_FORM_block.
1030 (parse_comp_unit): Allow CU version 4.
1031
e236b51d
HPN
10322010-04-01 Hans-Peter Nilsson <hp@axis.com>
1033
1034 * elf32-cris.c (cris_elf_relocate_section): Correct first argument
1035 to _bfd_elf_get_dynamic_reloc_section.
1036 (elf_cris_discard_excess_dso_dynamics): Ditto.
1037
b706dc83
KT
10382010-03-31 Kai Tietz <kai.tietz@onevision.com>
1039
1040 * coff-i386.c (in_reloc_p): Check also for R_SECREL32.
1041 * coff-x86_64.c (in_reloc_p): Check also for R_AMD64_SECREL.
1042
9d6ded02
AM
10432010-03-31 Alan Modra <amodra@gmail.com>
1044
1045 * elf64-ppc.c (ppc64_elf_relocate_section): Nop out optimized
1046 TPREL16_HI and TPREL16_HA insns.
1047
bfbff9eb
HPN
10482010-03-31 Hans-Peter Nilsson <hp@axis.com>
1049
1050 PR ld/11458
1051 * elf32-cris.c (elf_cris_copy_indirect_symbol): Remove invalid
1052 assert of empty pcrel_relocs_copied on the direct symbol. Instead
1053 of moving the list from the indirect symbol to the direct symbol,
1054 merge into any existing list.
1055 (cris_elf_check_relocs): Store the original section in the
1056 pcrel_relocs_copied list, not the relocation section.
1057 (elf_cris_discard_excess_dso_dynamics): Adjust accordingly to find
1058 the relocation section, for reducing its size. Change the
1059 BFD_ASSERT into a check for the section being read-only, and only
1060 emit warnings and TEXTREL marker when there's an entry for a
1061 read-only section.
1062
41ed1ee7
DJ
10632010-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1064
1065 * elf32-arm.c (using_thumb_only): Handle v6-M.
1066
ddfd6795
AM
10672010-03-26 Alan Modra <amodra@gmail.com>
1068
1069 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_EMB_RELSDA>): Not pc-relative.
1070 * bfd-in.h (elf_discarded_section): Clarify comment.
1071 * reloc.c (struct reloc_howto_struct <pc_relative>): Likewise.
1072 * bfd-in2.h: Regenerate.
1073
1352b58a
AM
10742010-03-26 Matt Rice <ratmice@gmail.com>
1075
1076 * archive.c (_bfd_compute_and_write_armap): Allow symbols flagged
1077 as unique in the armap.
1078
6abec6bc
AM
10792010-03-26 Alan Modra <amodra@gmail.com>
1080
1081 PR ld/11375
1082 * elf64-ppc.c (ppc64_elf_relocate_section): Always look up a
1083 possible stub on branches.
1084
40b36596
JM
10852010-03-25 Joseph Myers <joseph@codesourcery.com>
1086
1087 * Makefile.am (ALL_MACHINES): Add cpu-tic6x.lo.
1088 (ALL_MACHINES_CFILES): Add cpu-tic6x.c.
1089 (BFD32_BACKENDS): Add elf32-tic6x.lo.
1090 (BFD32_BACKENDS_CFILES): Add elf32-tic6x.c.
1091 * Makefile.in: Regenerate.
1092 * archures.c (bfd_arch_tic6x, bfd_tic6x_arch): New.
1093 (bfd_archures_list): Update.
1094 * config.bfd (tic6x-*-elf): New.
1095 * configure.in (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec):
1096 New.
1097 * configure: Regenerate.
1098 * cpu-tic6x.c, elf32-tic6x.c: New.
1099 * reloc.c (BFD_RELOC_C6000_PCR_S21, BFD_RELOC_C6000_PCR_S12,
1100 BFD_RELOC_C6000_PCR_S10, BFD_RELOC_C6000_PCR_S7,
1101 BFD_RELOC_C6000_ABS_S16, BFD_RELOC_C6000_ABS_L16,
1102 BFD_RELOC_C6000_ABS_H16, BFD_RELOC_C6000_SBR_U15_B,
1103 BFD_RELOC_C6000_SBR_U15_H, BFD_RELOC_C6000_SBR_U15_W,
1104 BFD_RELOC_C6000_SBR_S16, BFD_RELOC_C6000_SBR_L16_B,
1105 BFD_RELOC_C6000_SBR_L16_H, BFD_RELOC_C6000_SBR_L16_W,
1106 BFD_RELOC_C6000_SBR_H16_B, BFD_RELOC_C6000_SBR_H16_H,
1107 BFD_RELOC_C6000_SBR_H16_W, BFD_RELOC_C6000_SBR_GOT_U15_W,
1108 BFD_RELOC_C6000_SBR_GOT_L16_W, BFD_RELOC_C6000_SBR_GOT_H16_W,
1109 BFD_RELOC_C6000_DSBT_INDEX, BFD_RELOC_C6000_PREL31,
1110 BFD_RELOC_C6000_COPY, BFD_RELOC_C6000_ALIGN,
1111 BFD_RELOC_C6000_FPHEAD, BFD_RELOC_C6000_NOCMP): New.
1112 * targets.c (bfd_elf32_tic6x_be_vec, bfd_elf32_tic6x_le_vec): New.
1113 (_bfd_target_vector): Update.
1114 * bfd-in2.h, libbfd.h: Regenerate.
1115
4f608e79
L
11162010-03-24 H.J. Lu <hongjiu.lu@intel.com>
1117
1118 * aout-target.h: Update copyright year.
1119 * aout-tic30.c: Likewise.
1120 * coff-alpha.c: Likewise.
1121 * coff-rs6000.c: Likewise.
1122 * coff64-rs6000.c: Likewise.
1123 * elf64-mips.c: Likewise.
1124 * ieee.c: Likewise.
1125 * libecoff.h: Likewise.
1126 * mach-o-target.c: Likewise.
1127 * mach-o.c: Likewise.
1128 * oasys.c: Likewise.
1129 * targets.c: Likewise.
1130
337660d8
L
11312010-03-24 H.J. Lu <hongjiu.lu@intel.com>
1132
1133 * libbfd-in.h: Update copyright year.
1134
ca4a656b
L
11352010-03-21 H.J. Lu <hongjiu.lu@intel.com>
1136
1137 PR ld/11413
1138 * elflink.c (_bfd_elf_add_default_symbol): Check !executable
1139 instead of shared.
1140
47b2e99c
JZ
11412010-03-19 Jie Zhang <jie@codesourcery.com>
1142
1143 * elf32-arm.c (struct section_list): Remove.
1144 (section_list): Remove typedef.
1145 (record_section_with_arm_elf_section_data): Remove.
1146 (find_arm_elf_section_entry): Remove.
1147 (get_arm_elf_section_data): Use is_arm_elf.
1148 (unrecord_section_with_arm_elf_section_data): Remove.
1149 (elf32_arm_new_section_hook): Don't call
1150 record_section_with_arm_elf_section_data.
1151 (elf32_arm_write_section): Set mapcount to -1 when
1152 the map has been used. Don't call
1153 unrecord_section_with_arm_elf_section_data.
1154 (unrecord_section_via_map_over_sections): Remove.
1155 (elf32_arm_close_and_cleanup): Remove.
1156 (elf32_arm_bfd_free_cached_info): Remove.
1157 (bfd_elf32_close_and_cleanup): Don't define.
1158 (bfd_elf32_bfd_free_cached_info): Don't define.
1159
441f34fa
L
11602010-03-18 H.J. Lu <hongjiu.lu@intel.com>
1161
1162 PR binutils/11396
1163 * libcoff-in.h (pe_tdata): Add dont_strip_reloc.
1164 * libcoff.h: Regenerated.
1165
1166 * peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Clear F_RELFLG
1167 if dont_strip_reloc is set.
1168 (_bfd_XX_bfd_copy_private_bfd_data_common): Set
1169 dont_strip_reloc on output if there is no .reloc and
1170 IMAGE_FILE_RELOCS_STRIPPED isn't set in input.
1171
b43420e6
NC
11722010-03-18 Wei Guozhi <carrot@google.com>
1173
1174 PR gas/11323
1175 * elf32-arm.c (elf32_arm_reloc_map): Map BFD_RELOC_ARM_GOT_PREL to
1176 R_ARM_GOT_PREL.
1177 * reloc.c (BFD_RELOC_ARM_GOT_PREL): New ARM relocation.
1178 * bfd-in2.h: Regenerate.
1179 * libbfd.h: Regenerate.
1180
a1b88b01
L
11812010-03-17 H.J. Lu <hongjiu.lu@intel.com>
1182
1183 * reloc.c (BFD_RELOC_SPU_PIC18): Removed.
1184 (BFD_RELOC_SPU_STUB): Likewise.
1185
4b0f0711
L
11862010-03-17 Jie Zhang <jie@codesourcery.com>
1187
1188 * elf.c (assign_file_positions_for_load_sections): Avoid
1189 overflow.
1190
f4bacdc0
AM
11912010-03-17 Alan Modra <amodra@gmail.com>
1192
93620fdb 1193 PR binutils/11382
f4bacdc0
AM
1194 * plugin.c (bfd_plugin_object_p): Pass iostream to fileno using
1195 proper type.
1196
8f73510c
AM
11972010-03-17 Alan Modra <amodra@gmail.com>
1198
1199 * elf32-arm.c (cortex_a8_erratum_scan): Warning fix.
1200
67f0cbdb
AM
12012010-03-16 Alan Modra <amodra@gmail.com>
1202
1203 * elf64-ppc.c (struct ppc_link_hash_table): Add do_toc_opt.
1204 (ppc64_elf_edit_toc): Set it here.
1205 (ha_reloc_match): New function.
1206 (ppc64_elf_relocate_section): Optimize bigtoc insn sequences.
1207
1bbe0902
AM
12082010-03-15 Alan Modra <amodra@gmail.com>
1209
1210 * elf64-ppc.c (ppc64_elf_has_small_toc_reloc): New function.
1211 * elf64-ppc.h (ppc64_elf_has_small_toc_reloc): Declare.
1212
70cc837d
AM
12132010-03-14 Alan Modra <amodra@gmail.com>
1214
1215 PR ld/11378
1216 * elf64-ppc.h (ppc64_elf_check_init_fini): Declare.
1217 * elf64-ppc.c (call_check_done): Define.
1218 (ppc64_elf_add_symbol_hook): Substitute bfd_get_section_name macro.
1219 (ppc64_elf_check_relocs, ppc64_elf_size_dynamic_sections): Likewise.
1220 (ppc64_elf_finish_multitoc_partition): Remove unnecessary check.
1221 (toc_adjusting_stub_needed): Use call_check_done rather than toc_off.
1222 Simplify return logic. Iterate over all .init and .fini fragments
1223 by recursion. Set makes_toc_func_call here..
1224 (ppc64_elf_next_input_section): ..rather than here.
1225 (check_pasted_section, ppc64_elf_check_init_fini): New functions.
1226
7b8f6675
AM
12272010-03-13 Alan Modra <amodra@gmail.com>
1228
1229 PR ld/11375
1230 * elf64-ppc.c (ppc_type_of_stub): Always set *hash to the
1231 function descriptor symbol if there is one, not just for plt stubs.
1232 (ppc64_elf_relocate_section): Use fdh on all ppc_get_stub_entry calls.
1233
a6cc6b3b
RO
12342010-03-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1235
1236 * elflink.c (bfd_elf_size_dynamic_sections): Don't emit base
1237 version twice.
1238 Skip it when constructing def.vd_next.
1239
1240 * elf32-i386.c (TARGET_LITTLE_SYM): Redefine to
1241 bfd_elf32_i386_sol2_vec.
1242 (TARGET_LITTLE_NAME): Redefine to elf32-i386-sol2.
1243 (elf32_bed): Redefine to elf32_i386_sol2_bed.
1244 (elf_backend_want_plt_sym): Redefine to 1.
1245
1246 * elf64-x86-64.c (TARGET_LITTLE_SYM): Redefine to
1247 bfd_elf64_x86_64_sol2_vec.
1248 (TARGET_LITTLE_NAME): Redefine to elf64-x86-64-sol2.
1249 (elf64_bed): Redefine to elf64_x86_64_sol2_bed.
1250 (elf_backend_want_plt_sym): Redefine to 1.
1251
1252 * config.bfd (i[3-7]86-*-solaris2*): Set targ_defvec to
1253 bfd_elf32_i386_sol2_vec.
1254 Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
1255 targ64_selvecs.
1256 (x86_64-*-solaris2*): Set targ_defvec to bfd_elf32_i386_sol2_vec.
1257 Replace bfd_elf64_x86_64_vec by bfd_elf64_x86_64_sol2_vec in
1258 targ_selvecs.
1259
1260 * configure.in: Handle bfd_elf32_i386_sol2_vec,
1261 bfd_elf64_x86_64_sol2_vec.
1262 * configure: Regenerate.
1263
1264 * targets.c (bfd_elf32_i386_sol2_vec): Declare.
1265 (bfd_elf64_x86_64_sol2_vec): Declare.
1266 (_bfd_target_vector): Add bfd_elf32_i386_sol2_vec,
1267 bfd_elf64_x86_64_sol2_vec.
1268
f7dd8c79
DJ
12692010-03-04 Daniel Jacobowitz <dan@codesourcery.com>
1270
1271 * elf32-arm.c (elf32_arm_output_arch_local_syms): Skip non-program
1272 sections.
1273
8af6b354
AM
12742010-03-04 Alan Modra <amodra@gmail.com>
1275
1276 PR 11302
1277 * dwarf2.c (read_abbrevs): Return NULL on alloc failures.
1278 (read_attribute_value, decode_line_info): Likewise.
1279 (add_line_info, read_rangelist): Return FALSE on alloc failures.
1280 (arange_add, sort_line_sequences): Likewise.
1281 (find_abstract_instance_name): Handle failures from called funcs.
1282 (scan_unit_for_symbols, parse_comp_unit, decode_line_info): Likewise.
1283 (find_line): Realloc to a temp, and handle alloc fail.
1284
501abfe0
DJ
12852010-03-03 Daniel Jacobowitz <dan@codesourcery.com>
1286
1287 * elf32-arm.c (elf32_arm_output_arch_local_syms): Do not add
1288 a mapping symbol to an empty section.
1289
5488d830
MGD
12902010-03-02 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1291
1292 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add a check of the
1293 return value from the call to _bfd_elf_merge_object_attributes.
1294
fe33d2fa
CL
12952010-03-02 Christophe Lyon <christophe.lyon@st.com>
1296 Alan Modra <amodra@gmail.com>
1297
1298 * elf32-arm.c (a8_erratum_fix): Add st_type field to record the
1299 destination mode of the a8 stub.
1300 (elf32_arm_link_hash_table): Add top_id field.
1301 (elf32_arm_link_hash_table_create): Initialize top_id.
1302 (arm_type_of_stub): Update prototype, st_type can now be updated
1303 by this function. Actual destination address in case of PLT is
1304 computed here, to help factorizing code.
1305 (elf32_arm_stub_name): Update prototype, use stub_type additional
1306 parameter to build stub name.
1307 (elf32_arm_get_stub_entry): Update prototype, use stub_type
1308 additional parameter to build stub entry.
1309 (arm_build_one_stub): Use bfd_put_16/bfd_put_32 instead of
1310 put_thumb_insn/put_arm_insn as BE8 encoding is now handled later.
1311 Call elf32_arm_final_link_relocate to process all in-stub
1312 relocations.
1313 (elf32_arm_setup_section_lists): Update top_id.
1314 (cortex_a8_erratum_scan): Record stub destination mode.
1315 (elf32_arm_size_stubs): Update call to arm_type_of_stub according
1316 to new prototype.
1317 (elf32_arm_final_link_relocate): Enable processing of in-stub
1318 REL32 relocations. Rely on arm_type_of_stub to detect if a stub is
1319 needed, enabling code factorization.
1320 (elf32_arm_final_link): Process stub sections.
1321 (elf32_arm_output_map_sym): Add entry to code/data map.
1322
b48ca1d4
DM
13232010-03-01 David S. Miller <davem@davemloft.net>
1324
1325 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and
1326 h->def_regular, set h->ref_regular.
1327 (allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries
1328 and dynamic relocations if h->ref_regular.
1329
679b7c76
DM
1330 * elfxx-sparc.c (struct elf_reloc_map): Delete.
1331 (sparc_reloc_map): Delete.
1332 (_bfd_sparc_elf_reloc_type_lookup): Explicitly handle each
1333 relocation type in switch statements.
1334
dfa7b0b8
AM
13352010-02-25 Alan Modra <amodra@gmail.com>
1336
1337 PR ld/11304
1338 * elf.c (_bfd_elf_init_private_section_data): Rename need_group
1339 to final_link and invert. For final link allow some flags to
1340 differ. Don't specially allow flags to be all zero.
1341
d4a77f3f
NC
13422010-02-24 Alan Modra <amodra@gmail.com>
1343
1344 PR binutils/10858
1345 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Ise
1346 SYMBOL_REFERENCES_LOCAL to exclude entries from the dynamic symbol
1347 table.
1348
17e57237
NC
13492010-02-23 Andrew Zabolotny <anpaza@mail.ru>
1350
1351 PR binutils/11297
1352 * elf32-avr.c (elf_avr_howto_table): Add R_AVR_8.
1353 (avr_reloc_map): Map BFD_RELOC_8 to R_AVR_8.
1354
263badd7
AM
13552010-02-22 Alan Modra <amodra@gmail.com>
1356
1357 * reloc.c (bfd_check_overflow): When forming addrmask, shift
1358 fieldmask left by rightshift.
1359 (_bfd_relocate_contents): Likewise. Use rightshift addrmask in all
1360 overflow checks.
1361
c35bdf6e
L
13622010-02-20 H.J. Lu <hongjiu.lu@intel.com>
1363
1364 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Don't check
1365 STT_GNU_IFUNC on large common symbol.
1366
c16153ae
L
13672010-02-18 H.J. Lu <hongjiu.lu@intel.com>
1368
1369 * elf32-i386.c (elf_i386_add_symbol_hook): Don't set
1370 has_ifunc_symbols if the symbol comes from a shared library.
1371 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
1372 * elf32-sparc.c (elf32_sparc_add_symbol_hook): Likewise.
1373 * elf64-ppc.c (ppc64_elf_add_symbol_hook): Likewise.
1374 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Likewise.
1375 * elf64-x86-64.c (elf64_x86_64_add_symbol_hook): Likewise.
1376
d0bf826b
AM
13772010-02-19 Alan Modra <amodra@gmail.com>
1378
1379 * elf.c (_bfd_elf_fixup_group_sections): New function, split out from..
1380 (_bfd_elf_copy_private_header_data): ..here.
1381 * elflink.c (_bfd_elf_size_group_sections): New function.
1382 (bfd_elf_size_dynamic_sections): Call it.
1383 * elf-bfd.h (_bfd_elf_size_group_sections): Declare.
1384 (_bfd_elf_fixup_group_sections): Declare.
1385
cd21e546
MGD
13862010-02-18 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1387
1388 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Add support for
1389 merging Tag_DIV_use, Tag_MPextension_use, and
1390 Tag_MPextension_use_legacy tags.
1391
415f38a6
AM
13922010-02-18 Alan Modra <amodra@gmail.com>
1393
1394 * elf.c (bfd_elf_set_group_contents): Revert accidental 2009-01-15
1395 commit. Don't write zeros for removed group members.
1396 (_bfd_elf_copy_private_header_data): Adjust size of group section
1397 when group members are removed by objcopy.
1398
b946d5d8
DK
13992010-02-15 Dave Korn <dave.korn.cygwin@gmail.com>
1400
1401 PR binutils/11280
1402 * configure.host (*-*-solaris2.11): Add host define to select
1403 valid default code page for windres/windmc on solaris.
1404
ab7875de
NC
14052010-02-15 Nick Clifton <nickc@redhat.com>
1406
1407 * po/vi.po: Updated Vietnamese translation.
1408
33811162
DG
14092010-02-12 Daniel Gutson <dgutson@codesourcery.com>
1410
1411 * elf32-arm.c (elf32_arm_output_arch_local_syms): add
1412 missing mapping symbol to data only sections.
1413
00c50991
DM
14142010-02-11 David S. Miller <davem@davemloft.net>
1415
1416 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): For R_SPARC_GOTDATA_OP_HIX22
1417 and R_SPARC_GOTDATA_OP_LOX10, only bump the GOT refcount for global
1418 symbols.
1419 (_bfd_sparc_elf_gc_sweep_hook): Likewise only decrement the GOT count for
1420 these relocs on global symbols.
1421 (gdopoff): New.
1422 (_bfd_sparc_elf_relocate_section): Perform GOTDATA optimizations on
1423 local symbol references which are not STT_GNU_IFUNC. Handle
1424 relocation of them like R_SPARC_HIX22 and R_SPARC_LOX10 respectively,
1425 and deal with negative vs. non-negative values properly.
1426
1523fa24
TG
14272010-02-09 Tristan Gingold <gingold@adacore.com>
1428
1429 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Adjust addend for
1430 non-external relocation.
1431
7865406b
AM
14322010-02-09 Alan Modra <amodra@gmail.com>
1433
1434 * elf64-ppc.c (merge_got_entries): Move earlier in file.
1435 (allocate_dynrelocs): Merge got entries here if not doing multi-toc.
1436 (ppc64_elf_size_dynamic_sections): Similarly merge tlsld_got.
1437 (ppc64_elf_layout_multitoc): Don't resize if we have already
1438 merged got entries.
1439
d7eeb400
MS
14402010-02-09 Michael Holzheu <holzheu@de.ibm.com>
1441
1442 * elf-bfd.h (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
1443 elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
1444 elfcore_write_s390_prefix): New.
1445 * elf.c (elfcore_write_s390_timer, elfcore_write_s390_todcmp,
1446 elfcore_write_s390_todpreg, elfcore_write_s390_ctrs,
1447 elfcore_write_s390_prefix): New.
1448 (elfcore_grok_note): Handle NT_S390_TIMER, NT_S390_TODCMP,
1449 NT_S390_TODPREG, NT_S390_CTRS and NT_S390_PREFIX.
1352b58a 1450 (elfcore_write_register_note): Handle .reg-s390-timer,
d7eeb400
MS
1451 .reg-s390-todcmp, .reg-s390-todpreg, .reg-s390-ctrs,
1452 .reg-s390-prefix section.
1453
f961d9dd
AM
14542010-02-09 Alan Modra <amodra@gmail.com>
1455
1456 * elf64-ppc.c (struct got_entry): Make tls_type and is_indirect
1457 unsigned char. Update variables and code using them throughout file.
1458 (struct ppc_link_hash_entry): Likewise for tls_mask.
1459
d0fae19d
AM
1460 * elf64-ppc.c (ppc64_elf_layout_multitoc): Don't merge local got ents.
1461
d77c8a4b
AM
1462 * elf64-ppc.c (has_small_toc_reloc): Don't define.
1463 (makes_toc_func_call, call_check_in_progress): Shuffle flags.
1464 (struct ppc64_elf_obj_tdata): Add has_small_toc_reloc. Update
1465 code setting the flag.
1466 (ppc64_elf_next_toc_section): Group big-toc sections in
1467 0x80008000 chunks.
1468
72fbc6e5
DM
14692010-02-08 David S. Miller <davem@davemloft.net>
1470
1471 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove sgot,
1472 srelgot, splt, srelplt, and sgotplt members in favor of generic copies.
1473
1474 * elfxx-sparc.c (create_got_section): Delete.
1475 (_bfd_sparc_elf_create_dynamic_sections): Don't call, the dynamic
1476 section creator does that work for us. Use ->elf.foo instead of
1477 ->foo where applicable.
1478 (_bfd_sparc_elf_check_relocs): Use ->elf.foo instead of ->foo
1479 where applicable.
1480 (allocate_dynrelocs): Likewise.
1481 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
1482 (_bfd_sparc_elf_relocate_section): Likewise.
1483 (sparc_vxworks_build_plt_entry): Likewise.
1484 (_bfd_sparc_elf_finish_dynamic_symbol): Likewise.
1485 (sparc_finish_dyn): Likewise.
1486 (sparc_vxworks_finish_exec_plt): Likewise.
1487 (sparc_vxworks_finish_shared_plt): Likewise.
1488 (_bfd_sparc_elf_finish_dynamic_sections): Likewise.
1489
1490 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Use the SYMBOL_*
1491 macros for visibilty and locality checks.
1492 (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
1493 (allocate_dynrelocs): Likewise.
1494 (_bfd_sparc_elf_relocate_section): Likewise.
1495 (_bfd_sparc_elf_finish_dynamic_symbol):Likewise.
1496
1497 * elfxx-sparc.c (_bfd_sparc_elf_finish_dynamic_symbol): Remove set
1498 but never used local var 'dynobj'.
1499
1500 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Handle
1501 nocopyreloc.
1502
d0c9aeb3
DM
1503 * reloc.c (BFD_RELOC_SPARC_JMP_IREL): New.
1504 (BFD_RELOC_SPARC_IRELATIVE): Likewise.
1505 * bfd-in2.h: Regenerate.
1506 * libbfd.h: Regenerate.
1507
1508 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Add loc_hash_table
1509 and loc_hash_memory.
1510 (_bfd_sparc_elf_link_hash_table_free): Declare.
1511 * elf32-sparc.c (elf32_sparc_add_symbol_hook): New.
1512 (elf_backend_add_symbol_hook, elf_backend_post_process_headers,
1513 bfd_elf32_bfd_link_hash_table_free): Define.
1514 * elf64-sparc.c (elf64_sparc_add_symbol_hook): Set
1515 has_ifunc_symbols if STT_GNU_IFUNC.
1516 (bfd_elf64_bfd_link_hash_table_free): Define.
1517 (elf_backend_post_process_headers): Define always.
1518 * elfxx-sparc.c (sparc_jmp_irel_howto, sparc_irelative_howto): New.
1519 (sparc_reloc_map): Add entries for new IFUNC relocs.
1520 (_bfd_sparc_elf_reloc_type_lookup): Handle new IFUNC relocs.
1521 (_bfd_sparc_elf_info_to_howto_ptr): Likewise.
1522 (elf_sparc_local_htab_hash, elf_sparc_local_htab_eq,
1523 elf_sparc_get_local_sym_hash): New.
1524 (_bfd_sparc_elf_create_dynamic_sections): Move PLT ops initialization
1525 from here...
1526 (_bfd_sparc_elf_link_hash_table_create): ... to here. Allocate
1527 local hash table.
1528 (_bfd_sparc_elf_link_hash_table_free): New.
1529 (create_ifunc_sections): New.
1530 (_bfd_sparc_elf_check_relocs): Unconditionally assign htab->elf.dynobj
1531 and call create_ifunc_sections(). For local STT_GNU_IFUNC symbols
1532 cons up a fake local hash table entry for it. Unconditionally add
1533 a PLT refcount for STT_GNU_IFUNC symbols when h->def_regular. Count
1534 dyn relocs for ifunc.
1535 (_bfd_sparc_elf_adjust_dynamic_symbol): Handle ifunc.
1536 (allocate_dynrelocs): Unconditionally emit a PLT entry when
1537 STT_GNU_IFUNC and h->def_regular. Count GOT dyn relocs for ifunc.
1538 (allocate_local_dynrelocs): New function.
1539 (_bfd_sparc_elf_size_dynamic_sections): Invoke it over the local hash
1540 table. Emit dynamic relocs to irelplt when not shared. Treat iplt
1541 like splt.
1542 (_bfd_sparc_elf_relocate_section): Handle ifunc relocations by hand.
1543 (_bfd_sparc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc
1544 plt in iplt/irelplt.
1545
9ea2b942
RS
15462010-02-08 Richard Sandiford <r.sandiford@uk.ibm.com>
1547
1548 * xcofflink.c (_bfd_xcoff_bfd_final_link): When calculating
1549 max_contents_size, only consider sections whose contents must
1550 be swapped in.
1551
0b8bcf0d
AM
15522010-02-09 Alan Modra <amodra@gmail.com>
1553
1554 * elf64-ppc.c (allocate_dynrelocs): Remove unused got structs here..
1555 (ppc64_elf_size_dynamic_sections): ..and here..
1556 (merge_got_entries): ..rather than here.
1557
33c0ec9d
AM
15582010-02-09 Alan Modra <amodra@gmail.com>
1559
1560 * elf64-ppc.c (struct ppc_link_hash_table): Add do_multi_toc.
1561 (has_small_toc_reloc): Define.
1562 (ppc64_elf_check_relocs): Set the above flags.
1563 (ppc64_elf_edit_opd): Delete obfd param.
1564 (ppc64_elf_tls_optimize): Likewise.
1565 (ppc64_elf_edit_toc): Likewise.
1566 (ppc64_elf_tls_setup): Likewise. Add no_multi_toc param.
1567 * elf64-ppc.h: Update prototypes.
1568
b0dddeec
AM
15692010-02-08 Alan Modra <amodra@gmail.com>
1570
1571 * section.c (struct bfd_section): Delete has_tls_reloc,
1572 has_tls_get_addr_call, has_gp_reloc, need_finalize_relax, reloc_done.
1573 Add sec_flg0 thru sec_flg5.
1574 (BFD_FAKE_SECTION): Update for changed flags.
1575 * ecoff.c (bfd_debug_section): Likewise.
1576 * elf32-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
1577 * elf64-ppc.c (has_tls_reloc, has_tls_get_addr_call): Define.
1578 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Update.
1579 * elf32-xtensa.c (reloc_done): Define.
1580 * elfxx-ia64.c (skip_relax_pass_0, skip_relax_pass_1): Update.
1581 * bfd-in2.h: Regenerate.
1582
06988dfc
TG
15832010-02-08 Tristan Gingold <gingold@adacore.com>
1584
1585 * mach-o.c (bfd_mach_o_canonicalize_one_reloc): Set reloc.r_extern
1586 for non-scattered relocations.
1587
deddc40b
NS
15882010-02-08 Nathan Sidwell <nathan@codesourcery.com>
1589
1590 * elf32-ppc.c (ppc_elf_begin_write_processing): Allow empty
1591 apuinfo sections, only scan input sections once and reuse the
1592 buffer.
1593
ce3d2015
AM
15942010-02-08 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
1595
1596 * archures.c (bfd_mach_ppc_titan): Define.
1597 * bfd-in2.h: Regenerate.
1598 * cpu-powerpc.c (bfd_powerpc_archs): Add titan entry.
1599
06a162cf
AM
16002010-02-08 Alan Modra <amodra@gmail.com>
1601
1602 * elf32-ppc.c (ppc_elf_check_relocs): Remove dead ifunc code.
1603
4c348442
SA
16042010-02-05 Sterling Augustine <sterling@tensilica.com>
1605
1606 * elf.c (assign_file_positions_for_load_sections) Update lma of
1607 section if necessary. Fixes Bugzilla 11219.
1608
6bbec505
L
16092010-02-05 H.J. Lu <hongjiu.lu@intel.com>
1610
1611 * elf32-i386.c: Remove trailing white spaces.
1612 * elf64-x86-64.c: Likewise.
1613
4dfe6ac6
NC
16142010-02-03 Nick Clifton <nickc@redhat.com>
1615
1616 * elf-bfd.h (emum elf_object_id): Rename to elf_target_id. Add
1617 entries for other architectures.
1618 (struct elf_link_hash_table): Add hash_table_id field.
1619 (elf_hash_table_id): New accessor macro.
1620 * elflink.c (_bfd_elf_link_hash_table_init): Add target_id
1621 parameter.
1622 * elf-m10300.c (elf32_mn10300_hash_table): Check table id before
1623 returning cast pointer.
1624 (elf32_mn10300_link_hash_table_create): Identify new table as
1625 containing MN10300 extensions.
1626 (mn10300_elf_relax_section): Check pointer returned by
1627 elf32_mn10300_hash_table.
1628 * elf32-arm.c: Likewise, except using ARM extensions.
1629 * elf32-avr.c: Likewise, except using AVR extensions.
1630 * elf32-bfin.c: Likewise, except using BFIN extensions.
1631 * elf32-cris.c: Likewise, except using CRIS extensions.
1632 * elf32-frv.c: Likewise, except using FRV extensions.
1633 * elf32-hppa.c: Likewise, except using HPPA32 extensions.
1634 * elf32-i386.c: Likewise, except using I386 extensions.
1635 * elf32-lm32.c: Likewise, except using LM32 extensions.
1636 * elf32-m32r.c: Likewise, except using M32RM extensions.
1637 * elf32-m68hc11.c: Likewise, except using M68HC11 extensions.
1638 * elf32-m68hc1x.c: Likewise, except using M68HC11 extensions.
1639 * elf32-m68hc1x.h: Likewise, except using M68HC11 extensions.
1640 * elf32-m68k.c: Likewise, except using M68K extensions.
1641 * elf32-microblaze.c: Likewise, except using MICROBLAZE extensions.
1642 * elf32-ppc.c: Likewise, except using PPC32 extensions.
1643 * elf32-s390.c: Likewise, except using S390 extensions.
1644 * elf32-sh.c: Likewise, except using SH extensions.
1645 * elf32-spu.c: Likewise, except using SPU extensions.
1646 * elf32-xtensa.c: Likewise, except using XTENSA extensions.
1647 * elf64-alpha.c: Likewise, except using ALPHA extensions.
1648 * elf64-hppa.c: Likewise, except using HPPA64 extensions.
1649 * elf64-ppc.c: Likewise, except using PPC64 extensions.
1650 * elf64-s390.c: Likewise, except using S390 extensions.
1651 * elf64-x86-64.c: Likewise, except using X86_64 extensions.
1652 * elfxx-ia64.c: Likewise, except using IA64 extensions.
1653 * elfxx-mips.c: Likewise, except using MIPS extensions.
1654 * elfxx-sparc.c: Likewise, except using SPARC extensions.
1655 * elfxx-sparc.h: Likewise, except using SPARC extensions.
1656 * elf32-cr16.c (struct elf32_cr16_link_hash_table): Delete
1657 redundant structure.
1658 (elf32_cr16_hash_table): Delete unused macro.
1659 (elf32_cr16_link_hash_traverse): Delete unused macro.
1660 * elf32-score.c: Likewise.
1661 * elf32-score7.c: Likewise.
1662 * elf32-vax.c: Likewise.
1663 * elf64-sh64.c: Likewise.
1664
927be08e
AM
16652010-02-03 Alan Modra <amodra@gmail.com>
1666
1667 * elf64-ppc.c (struct plt_entry): Move earlier in file.
1668 (struct got_entry): Likewise. Add is_indirect and got.ent fields.
1669 (struct ppc64_elf_obj_tdata): Change tlsld_got to be a struct got_entry.
1670 Update all uses.
1671 (struct ppc_link_hash_table): Add got_reli_size and second_toc_pass.
1672 Remove no_multi_toc.
1673 (update_local_sym_info, ppc64_elf_check_relocs): Clear is_indirect
1674 when allocating a new struct got_entry.
1675 (allocate_got): New function, extracted from..
1676 (allocate_dynrelocs): ..here. Abort on got entry in non-ppc64 bfd.
1677 (ppc64_elf_size_dynamic_sections): Track got relocs allocated in
1678 .reliplt by got_reli_size. Set owner on ppc64_tlsld_got entries.
1679 (ppc64_elf_setup_section_lists): Remove output_bfd param and
1680 no_multi_toc, add add_stub_section and layout_sections_again. Stash
1681 new params in htab. Extract some code to..
1682 (ppc64_elf_start_multitoc_partition): ..here. New function.
1683 (ppc64_elf_next_toc_section): Check for linker script errors. Handle
1684 second pass toc scan.
1685 (merge_got_entries, merge_global_got, reallocate_got): New functions.
1686 (ppc64_elf_reinit_toc): Rename to..
1687 (ppc64_elf_finish_multitoc_partition): ..this.
1688 (ppc64_elf_layout_multitoc): New function.
1689 (ppc64_elf_size_stubs): Delete output_bfd, add_stub_section and
1690 layout_sections_again params.
1691 (ppc64_elf_relocate_section): Handle indirect got entries.
1692 * elf64-ppc.h: Update prototypes. Declare new functions.
1693
4339cae0
L
16942010-02-02 H.J. Lu <hongjiu.lu@intel.com>
1695
1696 * elf-bfd.h (elfcore_write_xstatereg): New.
1697
1698 * elf.c (elfcore_grok_xstatereg): New.
1699 (elfcore_write_xstatereg): Likewise.
1700 (elfcore_grok_note): Handle NT_X86_XSTATE.
1701 (elfcore_write_register_note): Handle .reg-xstate section.
1702
9848eadf
TG
17032010-02-01 Tristan Gingold <gingold@adacore.com>
1704
1705 * som.c (som_write_ar_hdr): Define this macro.
1706
f6fd0237
DA
17072010-01-30 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1708
1709 * elf32-hppa.c (final_link_relocate): Convert R_PARISC_TLS_GD21L,
1710 R_PARISC_TLS_LDM21L and R_PARISC_TLS_IE21L relocations that use the
1711 linkage table pointer to use the global table pointer if not doing
1712 a shared link.
1713
a1504221
JB
17142010-01-29 Joel Brobecker <brobecker@adacore.com>
1715
1716 * elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal
1717 if it has already been set.
1718
771deb08
TG
17192010-01-27 Tristan Gingold <gingold@adacore.com>
1720
1721 * vms.h: Remove trailing spaces.
1722 (struct hdr_struct): Remove unused hdr_c_cpr field.
1723 (enum file_format_enum): Add comments.
1724 * vms.c (vms_bfd_print_private_bfd_data): New function that
1725 replaces the macro.
1726 Remove trailing spaces.
1727 * vms-misc.c: Improve comments.
1728 (_bfd_vms_get_object_record): Also handle files without pads.
1729 * vms-hdr.c (_bfd_vms_write_dbg): Fix format string.
1730 * vms-gsd.c (struct flagdescstruct): Make name field const.
1731 (gsyflagdesc): Fix typo.
1732
bf102f86
AM
17332010-01-27 Alan Modra <amodra@gmail.com>
1734
1735 PR ld/11217
1736 * elf64-ppc.c (struct ppc_link_hash_table): Add toc_bfd, toc_first_sec.
1737 (ppc64_elf_setup_section_lists): Init them.
1738 (ppc64_elf_next_toc_section): Don't partition multi-toc between .got
1739 and .toc on the same input file.
1740 (ppc64_elf_relocate_section): Correct GOT entry offset.
1741
8f95b6e4
TG
17422010-01-26 Tristan Gingold <gingold@adacore.com>
1743
1744 * targets.c (BFD_JUMP_TABLE_ARCHIVE): Add initializer for write_ar_hdr.
1745 (bfd_target): Add _bfd_write_ar_hdr_fn field.
1746 * archive.c (is_bsd44_extended_name): New macro.
1747 (_bfd_generic_read_ar_hdr_mag): Use it. Add extra_size.
1748 (bfd_slurp_armap): Also check for "__.SYMDEF" as a BSD4.4 extended
1749 name.
1750 (_bfd_archive_bsd44_construct_extended_name_table): New function.
1751 (_bfd_generic_write_ar_hdr): Ditto.
1752 (_bfd_bsd44_write_ar_hdr): Ditto.
1753 (_bfd_write_archive_contents): Call _bfd_write_ar_hdr.
1754 (bsd_write_armap): Adjust firstreal computation.
1755 * libbfd-in.h (struct areltdata): Add extra_size field.
1756 (_bfd_generic_write_ar_hdr): Add prototype.
1757 (_bfd_bsd44_write_ar_hdr): Ditto.
1758 (_bfd_write_ar_hdr): Define.
1759 (_bfd_noarchive_write_ar_hdr): Ditto.
1760 (_bfd_archive_bsd_write_ar_hdr): Ditto.
1761 (_bfd_archive_coff_write_ar_hdr): Ditto.
1762 (_bfd_archive_bsd44_slurp_armap): Ditto.
1763 (_bfd_archive_bsd44_slurp_extended_name_table): Ditto.
1764 (_bfd_archive_bsd44_construct_extended_name_table): New prototype.
1765 (_bfd_archive_bsd44_truncate_arname): Ditto.
1766 (_bfd_archive_bsd44_write_armap): Ditto.
1767 (_bfd_archive_bsd44_read_ar_hdr): Ditto.
1768 (_bfd_archive_bsd44_write_ar_hdr): Ditto.
1769 (_bfd_archive_bsd44_openr_next_archived_file): Ditto.
1770 (_bfd_archive_bsd44_get_elt_at_index): Ditto.
1771 (_bfd_archive_bsd44_generic_stat_arch_elt): Ditto.
1772 (_bfd_archive_bsd44_update_armap_timestamp): Ditto.
1773 * libbfd.h: Regenerate.
1774 * oasys.c (oasys_write_ar_hdr): Define.
1775 * libecoff.h (_bfd_ecoff_write_ar_hdr): Define.
1776 * ieee.c (ieee_write_ar_hdr): Define.
1777 * elf64-mips.c (bfd_elf64_archive_write_ar_hdr): Define.
1778 * coff-rs6000.c (rs6000coff_vec): Adjust for write_ar_hdr field.
1779 (bfd_pmac_xcoff_backend_data): Ditto.
1780 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
1781 (bfd_xcoff_aix5_backend_data): Ditto.
1782 * coff-alpha.c (alpha_ecoff_write_ar_hdr): Define.
1783 * aout-target.h (MY_write_ar_hdr): Define it if not defined.
1784 * aout-tic30.c (MY_write_ar_hdr): Ditto.
1785 * mach-o-target.c (TARGET_NAME): Use _bfd_archive_bsd44 archive.
1786 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
1787 (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
1788 (bfd_mach_o_construct_extended_name_table)
1789 (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
1790 (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
1791 (bfd_mach_o_update_armap_timestamp): Moved to mach-o.c
1792 * mach-o.c (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr)
1793 (bfd_mach_o_slurp_armap, bfd_mach_o_slurp_extended_name_table)
1794 (bfd_mach_o_construct_extended_name_table)
1795 (bfd_mach_o_truncate_arname, bfd_mach_o_write_armap)
1796 (bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt)
1797 (bfd_mach_o_update_armap_timestamp): Moved from mach-o-target.c
1798 * bfd-in2.h: Regenerate.
1799
98da7939
L
18002010-01-26 Alan Modra <amodra@gmail.com>
1801 H.J. Lu <hongjiu.lu@intel.com>
1802
1803 PR ld/11218
1804 * elflink.c (elf_link_output_extsym): Do not ignore undefined
1805 symbols with ref_regular set when gc_sections is active.
1806
766bc656
AM
18072010-01-25 Alan Modra <amodra@gmail.com>
1808
1809 PR ld/11217
1810 * elf64-ppc.c (ppc64_elf_tls_optimize): Optimize tls sequences
1811 with relocations against undefined weak symbols.
1812 (ppc64_elf_relocate_section): Don't optimize calls to undefined
1813 weak functions if the symbol is dynamic.
1814 (ppc64_elf_relocate_section): Edit tprel tls sequences.
1815 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1816 (_bfd_elf_ppc_at_tprel_transform): New function.
1817 * bfd-in.h (_bfd_elf_ppc_at_tprel_transform): Declare.
1818 * bfd-in2.h: Regenerate.
1819
c865e45b
RS
18202010-01-23 Richard Sandiford <r.sandiford@uk.ibm.com>
1821
1822 * coff-rs6000.c (xcoff_howto_table): Change size to 0 and bitsize to 1.
1823 (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_NONE.
1824 * coff64-rs6000.c (xcoff64_howto_table): Change size to 0 and
1825 bitsize to 1.
1826 (xcoff64_reloc_type_lookup): Handle BFD_RELOC_NONE.
1827
b918acf9
NC
18282010-01-21 Nick Clifton <nickc@redhat.com>
1829
1830 * elflink.c (elf_link_add_object_symbols): Look up name of
1831 undefined symbol both before and after versioning has been
1832 applied. Do not bother with symbols that are weakly undefined.
1833
55786da2 18342010-01-21 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
b918acf9 1835
55786da2
AK
1836 * elf32-s390.c (elf32_s390_merge_private_bfd_data): New function.
1837 (bfd_elf32_bfd_merge_private_bfd_data): New macro definition.
1838
a37a68dd
CC
18392010-01-19 Cary Coutant <ccoutant@google.com>
1840
1841 * dwarf2.c (read_attribute_value): Add DW_FORM_ref_sig8.
1842
ecd12bc1
AM
18432010-01-19 Daisuke Hatayama <d.hatayama@jp.fujitsu.com>
1844 Alan Modra <amodra@gmail.com>
1845
1352b58a 1846 * elfcode.h (elf_swap_ehdr_out): Handle e_phnum > 0xffff.
ecd12bc1
AM
1847 (elf_object_p): Read e_phnum extension.
1848 (elf_write_shdrs_and_ehdr): Write e_phnum extension.
1352b58a 1849 * elfcore.h (elf_core_file_p): Read e_phnum extension. Sanity check
ecd12bc1
AM
1850 that we can read last program header.
1851
f6ebfac0
AM
18522010-01-19 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
1853
1854 * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
1855 R_ARM_THM_CALL entry.
1856 (elf32_arm_final_link_relocate): Correct calculation of
1857 reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22,
1858 or R_ARM_THM_JUMP24 relocation.
1859
22eb4b1d
AM
18602010-01-18 Alan Modra <amodra@gmail.com>
1861
1862 PR 11168
1863 * coffcode.h (coff_compute_section_file_positions): Move Rs6000COFF_C
1864 block past vars in COFF_IMAGE_WITH_PE block. Report error on more
1865 than 32k sections.
1866
6ec12636
JK
18672010-01-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1868
1869 Fix compilation warning on gcc-3.4.
1870 * vms-tir.c (start_etir_record, sto_imm): Rename the prototype
1871 parameter index to sec_index according to the function definition.
1872
38a7df63
CF
18732010-01-13 Chao-ying Fu <fu@mips.com>
1874
1875 * elfxx-mips.c (JR_TO_B_P): New define to transform JR to B.
1876 It is true for all CPUs.
1877 (jal_reloc_p): New function.
1878 (mips_elf_calculate_relocation): Rename require_jalxp to
1879 cross_mode_jump_p.
1880 Update comment for CROSS_MODE_JUMP_P.
1881 Set up cross_mode_jump_p based on the mode change.
1882 (mips_elf_perform_relocation): Rename require_jalx to cross_mode_jump_p.
1883 Update comment for CROSS_MODE_JUMP_P.
1884 Test cross_mode_jump_p and jal_reloc_p to turn jal to jalx.
1885 Use !cross_mode_jump_p to guard conversion.
1886 Convert "jr t9" to "b", if possible.
1887 (_bfd_mips_elf_relocate_section): Rename require_jalx to
1888 cross_mode_jump_p.
1889 Pass &cross_mode_jump_p to call mips_elf_calculate_relocation.
1890 Pass cross_mode_jump_p to call mips_elf_perform_relocation.
1891
91b9a4a4
NC
18922010-01-13 Nick Clifton <nickc@redhat.com>
1893
1894 * cpu-m32c.c (m32c_scan): New function. Ensures that a scan for
1895 "m32c" returns the m32c arch_info_struct and not the m16c
1896 arch_info_struct.
1897 (arch_info_struct): Use the new scan function.
1898 (bfd_m32c_arch): Likewise.
1899
618b7301
TG
19002010-01-13 Tristan Gingold <gingold@adacore.com>
1901
1902 * config.bfd: Remove duplicated target vector for i386-*-darwin.
1903 Appends new arch instead of overriding.
1904 Use mach_o_x86_64_vec for x86_64-*-darwin.
1905 * configure.in: Add mach_o_x86_64_vec.
1906 * configure: Regenerate.
1907 * targets.c: Declare mach_o_x86_64_vec, add it to _bfd_target_vector.
1908 * Makefile.am (BFD64_BACKENDS): Add mach-o-x86-64.lo
1909 (BFD64_BACKENDS_CFILES): Add mach-o-x86-64.c
1910 * Makefile.in: Regenerate.
1911 * mach-o-x86-64.c: New file.
1912
f88af2f1
TG
19132010-01-13 Tristan Gingold <gingold@adacore.com>
1914
1915 * reloc.c: Add MACH_O_X86_64 relocations.
1916 * bfd-in2.h: Regenerate.
1917 * libbfd.h: Regenerate.
1918
19172f39
TG
19192010-01-13 Tristan Gingold <gingold@adacore.com>
1920
1921 * archive.c (normalize): Use lbasename.
1922 (bfd_bsd_truncate_arname): Ditto.
1923 (bfd_gnu_truncate_arname): Ditto.
1924
6cdb8d82
TG
19252010-01-12 Tristan Gingold <gingold@adacore.com>
1926
1927 * makefile.vms (CFLAGS): Turns warnings into informational messages.
1928
9a753de0
TG
19292010-01-11 Tristan Gingold <gingold@adacore.com>
1930
1931 * mach-o.h: Add x86-64 relocation types.
1932
42fa0891
TG
19332010-01-11 Tristan Gingold <gingold@adacore.com>
1934
1935 * mach-o.h (bfd_mach_o_backend_data): Add arch field.
1936 (bfd_mach_o_set_arch_mach): New prototype.
1937 * mach-o.c (bfd_mach_o_mkobject): Define with bfd_mach_o_gen_mkobject.
1938 (bfd_mach_o_set_arch_mach): New function.
1939 (bfd_mach_o_gen_mkobject): New function.
1940 Set TARGET_ARCHITECTURE for the generic back-ends.
1941 * mach-o-target.c (bfd_mach_o_set_arch_mach): Remove define.
1942 Check that TARGET_ARCHITECTURE is defined.
1943 Add TARGET_ARCHITECTURE in TARGET_NAME_BACKEND structure.
1944 * mach-o-i386.c (TARGET_ARCHITECTURE): Define.
1945
cba0723b
TG
19462010-01-11 Tristan Gingold <gingold@adacore.com>
1947
19172f39 1948 * archive.c (bfd_slurp_armap): Also check for Mach-O sorted armap.
cba0723b 1949
4d421096
NC
19502010-01-11 Nick Clifton <nickc@redhat.com>
1951
1952 * elf32-v850.c (v850_elf_perform_relocation): Fix overflow
1953 handling of R_V850_HI16_S relocation.
1954
20b1d3e3
AM
19552010-01-11 Alan Modra <amodra@gmail.com>
1956
1957 PR 11103
1958 * dwarf1.c (parse_die): Correct FORM_STRING data pointer increment.
1959
a358ecb8
AM
19602010-01-11 Alan Modra <amodra@gmail.com>
1961
1962 PR 6832
1963 * dwarf2.c (struct comp_unit): Add sec_info_ptr.
1964 (find_abstract_instance_name): Use it.
1965 (parse_comp_unit): Set it.
1966
3725885a
RW
19672010-01-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1968
1969 * Makefile.in: Regenerate.
1970 * configure: Regenerate.
1971
3ee87829
TG
19722010-01-08 Tristan Gingold <gingold@adacore.com>
1973
1974 * archive.c: Remove bfd_special_undocumented_glue.
1975
fb34365b
AM
19762010-01-08 Alan Modra <amodra@gmail.com>
1977
1978 PR ld/11133
1979 * elf32-cr16.c (elf32_cr16_gc_mark_hook): Call _bfd_elf_gc_mark_hook.
1980 * elf32-microblaze.c (microblaze_elf_gc_mark_hook): Likewise.
1981 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
1982
d023c380
L
19832010-01-07 H.J. Lu <hongjiu.lu@intel.com>
1984
1985 PR ld/11138
1986 * elflink.c (elf_link_check_versioned_symbol): Don't abort if
1987 a symbol referenced by DSO is is defined in a non-shared object
1988 and forced local.
1989
bde6f3eb
L
19902010-01-07 H.J. Lu <hongjiu.lu@intel.com>
1991
1992 PR ld/11133
1993 * elflink.c (_bfd_elf_gc_mark_hook): Check section XXX for
1994 undefined __start_XXX/__stop_XXX in all input files and set
1995 SEC_KEEP.
1996
16583161
L
19972010-01-07 H.J. Lu <hongjiu.lu@intel.com>
1998
1999 PR ld/11143
2000 * elflink.c (elf_gc_sweep): Keep SHT_NOTE section.
2001
16231b7b
DG
20022010-01-04 Daniel Gutson <dgutson@codesourcery.com>
2003
2004 * bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC
2005 before including procfs.h.
2006 (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise.
2007 * configure.in: Added autoconf probe for the pr_fpreg member.
2008 * configure: Regenerated.
2009 * config.in: Regenerated.
2010 * elf.c: Define _STRUCTURE_PROC before including procfs.h.
2011
608fa8d3
JB
20122010-01-04 Joel Brobecker <brobecker@adacore.com>
2013
2014 Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64).
2015 * dwarf2.c (concat_filename): Rename dirname with dir_name
2016 to void shadowing the dirname function.
2017 Rename subdirname with subdir_name to stay consistent with
2018 the new dir_name variable name.
2019
0dc93057
AM
20202010-01-04 Edmar Wienskoski <edmar@freescale.com>
2021
2022 * archures.c: Add bfd_mach_ppc_e500mc64.
2023 * bfd-in2.h: Regenerate.
2024 * cpu-powerpc.c (bfd_powerpc_archs): Add entry for
2025 bfd_mach_ppc_e500mc64.
2026
baf9bed3
JB
20272010-01-01 Joel Brobecker <brobecker@adacore.com>
2028
2029 Fix -Wshadow warnings (seen on ppc-aix)
2030 * xcofflink.c: Replace finfo by flinfo throughout.
2031
43ecc30f 2032For older changes see ChangeLog-2009
56882138
AM
2033\f
2034Local Variables:
2035mode: change-log
2036left-margin: 8
2037fill-column: 74
2038version-control: never
2039End:
This page took 0.628392 seconds and 4 git commands to generate.