Minor fixes in sim, gold, gdb for Autoconf 2.64, Automake 1.11.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
cd1dac3d
DG
12009-08-21 Daniel Gutson <dgutson@codesourcery.com>
2
3 * elf32-arm.c (arch_has_thumb2_nop): New function.
4 (arch_has_arm_nop): New function.
5 (elf32_arm_final_link_relocate): NOP opcodes changed.
6
440ae135
DE
72009-08-16 Doug Evans <dje@google.com>
8
9 * opncls.c (bfd_close): Until BFD_IN_MEMORY has an iovec,
10 at least don't leak memory.
11
a109e2f5
DD
122009-08-13 DJ Delorie <dj@redhat.com>
13
14 * elf32-m32c.c (m32c_elf_relax_delete_bytes): Adjust symbol sizes
15 if needed.
16
c1742541
NC
172009-08-12 Nick Clifton <nickc@redhat.com>
18
19 * po/fi.po: Updated Finnish translation.
20
6a9adeca
BS
212009-08-11 Bernd Schmidt <bernd.schmidt@analog.com>
22
23 Merge some FRV FDPIC changes into the Blackfin code.
24 * elf32-bfin.c (struct bfinfdpic_elf_link_hash_table): Add pointer to
25 summary reloc information.
26 (bfinfdpic_dynamic_got_plt_info): New.
27 (_bfin_create_got_section): Create the PLT section here.
28 (elf32_bfinfdpic_create_dynamic_sections): Not here.
29 (_bfinfdpic_count_nontls_entries): Move out of...
30 (_bfinfdpic_count_got_plt_entries): ... here.
31 (_bfinfdpic_count_relocs_fixups): Likewise.
32 (_bfinfdpic_reset_got_plt_entries): New.
33 (_bfinfdpic_size_got_plt): Move out of...
34 (elf32_bfinfdpic_size_dynamic_sections): ... here.
35 (bfinfdpic_relocate_section): Be careful not to call
36 _bfinfdpic_add_rofixup or _bfinfdpic_add_dyn_reloc for deleted relocs.
37 (bfinfdpic_check_discarded_relocs, bfinfdpic_elf_discard_info):
38 New functions.
39 (elf_backend_discard_info): Define for FD-PIC.
40
5dabe785
AM
412009-08-11 Alan Modra <amodra@bigpond.net.au>
42
43 * elflink.c: Add FIXMEs for some places that require octets_per_byte
44 adjustments.
45 * elf-eh-frame.c: Likewise.
46 * merge.c: Likewise.
47
ea7a63de
AM
482009-08-11 Alan Modra <amodra@bigpond.net.au>
49
50 * configure.in: Remove elf-ifunc.lo from common ELF files. Add
51 to x86 and x86_64 configurations.
52 * configure: Regenerate.
53
9bf609ec
JK
542009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
55
56 Stop using bfd_usrdata in libbfd.
57 * coff-stgo32.c (bfd_coff_go32stub): Remove.
58 (stub_bytes, comment): Replace STUBSIZE by GO32_STUBSIZE.
59 (adjust_filehdr_in_post): Declare the abfd parameter as unused.
60 Replace STUBSIZE by GO32_STUBSIZE. Save now the stub in
61 filehdr_dst->u.go32.stub. New comment with the reason.
62 (adjust_filehdr_out_pre): Replace STUBSIZE by GO32_STUBSIZE.
63 Substitute the removed macro bfd_coff_go32stub.
64 (adjust_filehdr_out_post, adjust_scnhdr_in_post, adjust_scnhdr_out_pre)
65 (adjust_scnhdr_out_post, adjust_aux_in_post, adjust_aux_out_pre)
66 (adjust_aux_out_post): Replace STUBSIZE by GO32_STUBSIZE.
67 (create_go32_stub, go32_stubbed_coff_bfd_copy_private_bfd_data):
68 Replace STUBSIZE by GO32_STUBSIZE. Substitute the removed macro
69 bfd_coff_go32stub.
70 * coffcode.h (coff_mkobject_hook): Initialize coff->go32stub.
71 * libcoff-in.h (coff_data_type): New field go32stub.
72 * libcoff.h: Regenerated.
73
e39e47bd
JK
742009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
75
76 Fix go32 stub preservation by objcopy.
77 * coff-stgo32.c (adjust_filehdr_in_post): Use bfd_malloc.
78 (go32_stubbed_coff_bfd_copy_private_bfd_data): Optionally allocate OBFD
79 go32stub.
80
ffcb4889
NS
812009-08-10 Nathan Sidwell <nathan@codesourcery.com>
82
83 * elf32-arm.c (elf32_arm_size_stubs): Don't die on undefined local
84 symbols.
85 (elf32_arm_final_link_relocate): Treat local undefined symbols the
86 same as global undefined symbols.
87 (elf32_arm_relocate_section): Give an error for local undefined
88 non-weak symbols, unless the reloc will not use the symbol.
89
01017ef8
NS
902009-08-10 Nathan Sidwell <nathan@codesourcery.com>
91
92 * elf32-ppc.c (shared_stub_entry, stub_entry): Use r12, not r11.
93 (ppc_elf_relax_section): Use symbol index to distinguish
94 relocatable stubs.
95
a8ad78a7
AM
962009-08-10 Alan Modra <amodra@bigpond.net.au>
97
98 * elf32-ppc.c (ppc_elf_relax_section): Ignore non-code sections.
99
91e21fb7
AM
1002009-08-10 Alan Modra <amodra@bigpond.net.au>
101
102 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Don't clear plt
103 info for STT_GNU_IFUNC.
104 * elf32-ppc.c (ppc_elf_check_relocs): Count a needed plt entry
105 on got refs in case the symbol turns out to be ifunc.
106 (ppc_elf_gc_sweep_hook): Similarly.
107 (ppc_elf_adjust_dynamic_symbol): Adjust assertion.
108 (allocate_dynrelocs): Don't specially allocate got relocs for ifunc.
109 (ppc_elf_size_dynamic_sections): Likewise.
110 (ppc_elf_relocate_section): Likewise.
111
6a9adeca 1122009-08-09 Bernd Schmidt <bernd.schmidt@analog.com>
cb88ce9f
BS
113
114 From Mike Frysinger <michael.frysinger@analog.com>
115 * elf32-bfin.c (bfin_howto_table, bfin_reloc_map, bfin_check_relocs,
116 bfin_final_link_relocate, bfin_relocate_section, bfin_gc_sweep_hook,
117 _bfinfdpic_emit_got_relocs_plt_entries, bfinfdpic_relocate_section,
118 bfinfdpic_gc_sweep_hook, bfinfdpic_check_relocs,
119 bfin_finish_dynamic_symbol, bfd_bfin_elf32_create_embedded_relocs):
120 Adjust to match the renamed reloc definitions.
121
e7e75368
AM
1222009-08-08 Alan Modra <amodra@bigpond.net.au>
123
124 PR 10494
125 * elf.c (_bfd_elf_make_section_from_shdr): When setting up section
126 LMAs, use ELF_IS_SECTION_IN_SEGMENT to match sections with headers.
127
918d9742
TT
1282009-08-07 Tom Tromey <tromey@redhat.com>
129
130 * elf32-microblaze.c (microblaze_elf_check_relocs): Avoid strict
131 aliasing error.
132
7ba29e2a
NC
1332009-08-06 Michael Eager <eager@eagercon.com>
134
135 * Makefile.am: Add cpu-microblaze.{lo,c}, elf32-microblaze.{lo,c}.
136 * Makefile.in: Regenerate.
137 * archures.c: Add bfd_arch_microblaze.
138 * bfd-in2.h: Regenerate.
139 * config.bfd: Add microblaze target.
140 * configure.in: Add bfd_elf32_microblaze_vec target.
141 * configure: Regenerate.
142 * cpu-microblaze.c: New.
143 * elf32-microblaze.c: New.
144 * libbfd-in.h: Add prototype _bfd_dwarf2_fixup_section_debug_loc().
145 * libbfd.h: Regenerate.
146 * reloc.c: Add MICROBLAZE relocations.
147 * section.c: Add struct relax_table and relax_count to section.
148 * targets.c: Add bfd_elf32_microblaze_vec.
149
e47bf690
JJ
1502009-08-06 Jakub Jelinek <jakub@redhat.com>
151 Alan Modra <amodra@bigpond.net.au>
152
153 PR binutils/10492
154 * elf.c (sym_is_global): Return true even for BSF_GNU_UNIQUE
155 symbols.
156 * elf32-mips.c (mips_elf_sym_is_global): Likewise.
157 * elfn32-mips.c (mips_elf_sym_is_global): Likewise.
158
3ae046cc
NS
1592009-08-06 Nathan Sidwell <nathan@codesourcery.com>
160
161 * elf32-arm.c (elf32_arm_size_stubs): Call layout_sections_again
162 at least once when fixing cortex-a8.
163
cd8d5a82
CF
1642009-08-05 Chao-ying Fu <fu@mips.com>
165
166 * elf32-mips.c (mips_reloc_map): Add BFD_RELOC_MIPS_JALR.
167 * elfxx-mips.c (JAL_TO_BAL_P): New define to transform JAL to BAL
168 for CPUs. It is true for RM9000.
169 (JALR_TO_BAL_P): New define to transform JALR to BAL. It is true
170 for all CPUs.
171 (mips_elf_perform_relocation): Use JAL_TO_BAL_P and JALR_TO_BAL_P
172 to guard the transformation.
173
9cc305ec
TS
1742009-08-05 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
175
176 * elf32-spu.h (spu_elf_params): Add member emit_fixups.
177 (spu_elf_size_sections): Declare prototype.
178 * elf32-spu.c (spu_link_hash_table): Add member sfixup.
179 (FIXUP_RECORD_SIZE, FIXUP_GET, FIXUP_PUT): New macros.
180 (spu_elf_emit_fixup): New function.
181 (spu_elf_relocate_section): Emit fixup for each SPU_ADDR32.
182 (spu_elf_size_sections): New function.
183
eb7c4339
NS
1842009-08-05 Nathan Sidwell <nathan@codesourcery.com>
185
186 * elf32-arm.c (elf32_arm_stub_type): Add arm_stub_a8_veneer_lwm.
187 (arm_build_one_stub): Build a8 veneers as a separate pass.
188 (cortex_a8_erratum_scan): Add prev_num_a8_fixes and stub_changed_p
189 parameters. Use them to check if we create a different a8 fixup
190 than the previous pass.
191 (elf32_arm_size_stubs): Move scope of stub_changed and
192 prev_num_a8_fixes into main loop.
193 (elf32_arm_build_stubs): Build a8 veneers in a second pass.
194
a9585d22
AM
1952009-08-04 Alan Modra <amodra@bigpond.net.au>
196
197 * elf32-ppc.c (ppc_elf_relax_section): Correct conditions under
198 which find_plt_ent is called. Delete redundant code.
199
45b222d6
L
2002009-08-03 H.J. Lu <hongjiu.lu@intel.com>
201
202 PR binutils/10363
203 * elf.c (bfd_elf_string_from_elf_section): Return NULL on
204 invalid string offset.
205
004fb780
L
2062009-08-03 H.J. Lu <hongjiu.lu@intel.com>
207
208 PR ld/10433
209 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Set got
210 to htab->init_got_offset and plt to htab->init_plt_offset
211 when discarding space for dynamic relocations.
212
a877a2b6
AM
2132009-08-03 Alan Modra <amodra@bigpond.net.au>
214
215 * elf32-ppc.c (struct plt_entry): Revise comments.
216 (ppc_elf_check_relocs): Don't create needless plt_entry info
217 for non-pie executables. Don't test info->pie when info->shared
218 already covers that case.
219 (ppc_elf_gc_sweep_hook): Adjust for above change.
220 (add_stub_sym): Don't test info->pie when info->shared tested.
221 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Likewise.
222 (write_glink_stub, ppc_elf_finish_dynamic_symbol): Likewise.
223 (ppc_elf_relax_section): Adjust find_plt_ent arguments.
224 (ppc_elf_relocate_section): Likewise.
225
de972ffa
AM
2262009-08-03 Alan Modra <amodra@bigpond.net.au>
227
228 * elf32-ppc.c (ppc_elf_check_relocs): Always add a plt ref count
229 for local ifunc symbols in non-pie executables, regardless of
230 reloc type. Don't specially create ifunc dyn relocs. Tidy ifunc
231 code so that it's obvious that we only do anything special for
232 local ifunc syms.
233 (ppc_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
234 (allocate_dynrelocs): Correct comment for syms defined in plt.
235 Don't specially allocate ifunc dyn relocs.
236 (ppc_elf_relax_section): Relax branches to ifunc plt entries too.
237 (ppc_elf_relocate_section): Set "relocation" value for ifunc
238 syms in non-pie executables. No specially allocated dyn relocs
239 for ifunc to write. Allow for local sym on R_PPC_RELAX32_PLT.
240 (ppc_elf_finish_dynamic_symbol): Set value of ifunc symbols in
241 a non-pie executable.
242
1d85728f
L
2432009-08-02 H.J. Lu <hongjiu.lu@intel.com>
244 Jakub Jelinek <jakub@redhat.com>
245
246 PR ld/6443
247 * elf32-i386.c (elf_i386_tls_transition): Check executable
248 instead of shared for TLS when building PIE.
249 (elf_i386_check_relocs): Likewise.
250 (elf_i386_allocate_dynrelocs): Likewise.
251 (elf_i386_relocate_section): Likewise.
252
253 * elf64-x86-64.c (elf64_x86_64_tls_transition): Check executable
254 instead of shared for TLS when building PIE.
255 (elf64_x86_64_check_relocs): Likewise.
256 (elf64_x86_64_allocate_dynrelocs): Likewise.
257 (elf64_x86_64_relocate_section): Likewise.
258
5d8d4872
AG
2592009-07-31 Anthony Green <green@moxielogic.com>
260
261 * config.bfd (targ_cpu): Add moxie-uclinux support.
262
080a1b9f
HPN
2632009-07-31 Hans-Peter Nilsson <hp@bitrange.com>
264
265 * linker.c (fix_syms): Consider SEC_LOAD when choosing section.
266
25f23106
AM
2672009-07-30 Alan Modra <amodra@bigpond.net.au>
268
269 * elf32-ppc.c (ppc_elf_check_relocs): Always set up sections
270 used by indirect function support. Count dynamic relocs for
271 ifunc syms.
272 (ppc_elf_adjust_dynamic_symbol): Tweak for ifunc.
273 (allocate_dynrelocs): Allocate all non-dynamic ifunc plt entries
274 in iplt and their relocs in reliplt. Don't make ifunc syms
275 dynamic. Allocate got entry relocs for non-dynamic ifunc in
276 reliplt. Handle other dynamic relocs for ifunc.
277 (ppc_elf_size_dynamic_sections): Alloc dyn relocs for static
278 ifunc in reliplt, likewise relocs for got against local ifunc.
279 Typo fix on reliplt size adjust.
280 (ppc_elf_relocate_section): Don't use plt scheme of allocating
281 relocs 1-1 with entries for iplt, instead just add using
282 reloc_count. Write got relocs and dyn relocs for ifunc to reliplt.
283 Error on invalid ifunc dyn relocs.
284 (ppc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt
285 in iplt/reliplt.
286 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_JMP_IREL,
287 R_PPC64_REL16, R_PPC64_REL16_LO, R_PPC64_REL16_HI, R_PPC64_REL16_HA.
288 (ppc64_elf_reloc_type_lookup): Handle new relocs.
289 (ppc64_elf_check_relocs): Likewise. Count dyn relocs for ifunc.
290 (allocate_dynrelocs): As for elf32-ppc.c above.
291 (ppc64_elf_size_dynamic_sections): Likewise.
292 (ppc_build_one_stub): Put non-dynamic ifunc plt call stubs in iplt,
293 and their relocs in reliplt. Use R_PPC64_JMP_IREL.
294 (ppc_size_one_stub): Similarly.
295 (ppc64_elf_relocate_section): As for elf32-ppc.c above. Handle new
296 relocs too.
297 (ppc64_elf_finish_dynamic_symbol): As for elf32-ppc.c above.
298
80f540b7
HPN
2992009-07-29 Hans-Peter Nilsson <hp@bitrange.com>
300
301 * elf64-mmix.c (mmix_elf_relax_section): Revert 2009-05-27
302 change. Add note to head comment.
303
4ad4f3cb
JB
3042009-07-28 Jan Beulich <jbeulich@novell.com>
305
306 * archive.c (get_extended_arelt_filename): Remove redundant
307 range check on index.
308
d8d2f433
DK
3092009-07-27 Doug Kwan <dougkwan@google.com>
310
311 * elf32-arm.c (stub_hash_newfunc): Initialize field output_name.
312
9e675548
L
3132009-07-27 H.J. Lu <hongjiu.lu@intel.com>
314
315 * archures.c bfd_*_arch): Sorted.
316 (bfd_archures_list): Likewise.
317
86514226
SR
3182009-07-27 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
319
9e675548 320 * elf32-cr16.c (elf_cr16_final_link_relocate): Add code to handle
86514226
SR
321 to R_cr16_NUM32 relocation.
322
305f7588
MS
3232009-07-26 Michael Eager <eager@eagercon.com>
324
325 * archures.c: Add bfd_mach_ppc_405
326 * bfd-in2.h: Same.
327
b1995b01
L
3282009-07-25 H.J. Lu <hongjiu.lu@intel.com>
329
330 * cpu-i386.c (bfd_x86_64_arch): Fix comment typos.
331 * cpu-l1om.c (bfd_l1om_arch): Likewise.
332
8a9036a4
L
3332009-07-25 H.J. Lu <hongjiu.lu@intel.com>
334
335 * archures.c (bfd_architecture): Add bfd_arch_l1om.
336 (bfd_l1om_arch): New.
337 (bfd_archures_list): Add &bfd_l1om_arch.
338 * bfd-in2.h: Regenerated.
339
340 * config.bfd (targ64_selvecs): Add bfd_elf64_l1om_vec if
341 bfd_elf64_x86_64_vec is supported. Add bfd_elf64_l1om_freebsd_vec
342 if bfd_elf64_x86_64_freebsd_vec is supported.
343 (targ_selvecs): Likewise.
344
345 * configure.in: Support bfd_elf64_l1om_vec and
346 bfd_elf64_l1om_freebsd_vec.
347 * configure: Regenerated.
348
349 * cpu-l1om.c: New.
350
351 * elf64-x86-64.c (elf64_l1om_elf_object_p): New.
352 (bfd_elf64_l1om_vec): Likewise.
353 (bfd_elf64_l1om_freebsd_vec): Likewise.
354
355 * Makefile.am (ALL_MACHINES): Add cpu-l1om.lo.
356 (ALL_MACHINES_CFILES): Add cpu-l1om.c.
357 * Makefile.in: Regenerated.
358
359 * targets.c (bfd_elf64_l1om_vec): New.
360 (bfd_elf64_l1om_freebsd_vec): Likewise.
361 (_bfd_target_vector): Add bfd_elf64_l1om_vec and
362 bfd_elf64_l1om_freebsd_vec.
363
8fdcc58d
TS
3642009-07-24 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
365 Alan Modra <amodra@bigpond.net.au>
366
367 * reloc.c (BFD_RELOC_SPU_ADD_PIC): Define.
368 * bfd-in2.h: Regenerate.
369 * libbfd.h: Regenerate.
370 * elf32-spu.c (elf_howto_table): Add entries SPU_ADD_PIC.
371 (spu_elf_bfd_to_reloc_type): Handle SPU_ADD_PIC.
372 (spu_elf_relocate_section): Patch instructions marked by SPU_ADD_PIC.
373
9b769489
L
3742009-07-23 H.J. Lu <hongjiu.lu@intel.com>
375
376 PR ld/10434
377 * elf64-x86-64.c (elf64_x86_64_check_relocs): Check executable
378 instead of shared for R_X86_64_TPOFF32.
379 (elf64_x86_64_relocate_section): Likewise.
380
3e7a7d11
NC
3812009-07-23 Ulrich Drepper <drepper@redhat.com>
382
383 * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field.
384 * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols
385 with the BSF_GNU_UNIQUE flag bit set.
386 * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag
387 for symbols with STB_GNU_UNIQUE binding.
388 * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols
389 with the STB_GNU_UNIQUE binding.
390 (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for
391 symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for
392 symbols with the unique_global field set.
393 (elf_link_output_extsym): Set unique_global field for symbols with
394 the STB_GNU_UNIQUE binding.
395 * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit.
396 (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE
397 symbols.
398 (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE
399 symbols.
400 * bfd-in2.h: Regenerate.
401
5f35ea9c
L
4022009-07-22 H.J. Lu <hongjiu.lu@intel.com>
403
404 * elflink.c (elf_link_output_extsym): Revert the last change.
405
b63cc625
L
4062009-07-22 H.J. Lu <hongjiu.lu@intel.com>
407
408 PR ld/10433
409 * elflink.c (elf_link_output_extsym): Special case ifunc syms
410 when ref_regular, not def_regular.
411
2955ec4c
L
4122009-07-21 H.J. Lu <hongjiu.lu@intel.com>
413
414 PR ld/10426
415 * elflink.c (elf_link_add_object_symbols): Turn an IFUNC symbol
416 from a DSO into a normal FUNC symbol.
417 (elf_link_output_extsym): Turn an undefined IFUNC symbol into
418 a normal FUNC symbol.
419
6d30f5b2
NC
4202009-07-17 Chao-ying Fu <fu@mips.com>
421
422 * elfxx-mips.c (LOAD_INTERLOCKS_P): New define.
423 (_bfd_mips_elf_size_dynamic_sections): For CPUs without load
424 interlocking, the last PLT entry needs a nop in the branch delay slot.
425 (_bfd_mips_elf_finish_dynamic_symbol): For CPUs with load itnerlocking,
426 output the last two PLT entries in reverse order.
427
1f85278f
L
4282009-07-16 H.J. Lu <hongjiu.lu@intel.com>
429
430 * elf32-i386.c (elf_i386_relocate_section): Don't get local
431 STT_GNU_IFUNC symbol for relocatable link.
432 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
433
f07749bb
L
4342009-07-10 H.J. Lu <hongjiu.lu@intel.com>
435
436 * bfdio.c (bfd_iovec): Add comments for bmmap.
437 * bfd-in2.h: Regenerated.
438
8455dd2c
L
4392009-07-10 H.J. Lu <hongjiu.lu@intel.com>
440
441 * Makefile.am: Run "make dep-am".
442 * Makefile.in: Regenerated.
443
cedfb179
DK
4442009-07-10 Doug Kwan <dougkwan@google.com>
445
446 * elf32-arm.c (stub_hash_newfunc): Initialize fields
447 target_addend and orig_insn.
448
fa8f86ff
TT
4492009-07-10 Tom Tromey <tromey@redhat.com>
450
451 * Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h.
452 (elf-eh-frame.lo): Likewise.
453 (elf32-bfin.lo): Likewise.
454 (elf32-frv.lo): Likewise.
455 (elf32-xc16x.lo): Likewise.
456 * Makefile.in: Rebuild.
457 * dwarf2.c: Included dwarf.h, not elf/dwarf2.h.
458 * elf-eh-frame.c: Likewise.
459 * elf32-bfin.c: Likewise.
460 * elf32-frv.c: Likewise.
461 * elf32-xc16x.c: Likewise.
462
33c6a8fc
JB
4632009-07-10 Julian Brown <julian@codesourcery.com>
464
465 * elf32-arm.c (arm_build_one_stub): Use the hash entry of the
466 symbol a stub entry is derived from, not the entry for the stub
467 itself, in call to elf32_arm_final_link_relocate.
468
1d770845
L
4692009-07-10 H.J. Lu <hongjiu.lu@intel.com>
470
471 * elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros
472 when reporting addends.
473
52cfded7
AM
4742009-07-10 Alan Modra <amodra@bigpond.net.au>
475
476 * elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
477 data even when no stubs.
478 (spu_elf_place_overlay_data, spu_elf_build_stubs): Adjust.
479
e054468f
AM
4802009-07-10 Alan Modra <amodra@bigpond.net.au>
481
482 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_IRELATIVE.
483 (ppc_elf_get_synthetic_symtab): Report addend.
484 (PLT_IFUNC): Define.
485 (struct ppc_elf_link_hash_table): Add iplt and reliplt.
486 (ppc_elf_create_glink): New function.
487 (ppc_elf_create_dynamic_sections): Use it.
488 (ppc_elf_add_symbol_hook): Set has_ifunc_symbols.
489 (update_local_sym_info): Allocate space for local_plt array.
490 Don't bump local_got_refcounts for PLT_IFUNC. Return local_plt
491 entry pointer.
492 (is_branch_reloc): New function.
493 (ppc_elf_check_relocs): Handle STT_GNU_IFUNC symbols.
494 (ppc_elf_gc_sweep_hook): Likewise.
495 (ppc_elf_adjust_dynamic_symbol): Likewise.
496 (allocate_dynrelocs): Likewise.
497 (ppc_elf_size_dynamic_sections): Likewise.
498 (ppc_elf_relocate_section): Likewise.
499 (branch_reloc_hash_match): Use is_branch_reloc.
500 (ppc_elf_tls_optimize): Adjust for local_plt.
501 (write_glink_stub): New function, extracted from..
502 (ppc_elf_finish_dynamic_symbol): ..here. Handle STT_GNU_IFUNC.
503 (ppc_elf_finish_dynamic_sections): Only write plt resolver and
504 branch table when dynamic.
505 (elf_backend_post_process_headers): Define.
506 * elf64-ppc.c (elf_backend_post_process_headers): Define.
507 (ppc64_elf_howto_raw): Add R_PPC64_IRELATIVE.
508 (ppc64_elf_get_synthetic_symtab): Report addend.
509 (struct ppc_stub_hash_entry): Add plt_ent.
510 (PLT_IFUNC): Define.
511 (struct ppc_link_hash_table): Add iplt and reliplt.
512 (create_linkage_sections): Make .iplt and .rela.iplt sections.
513 (ppc64_elf_add_symbol_hook): Set has_ifunc_symbols.
514 (update_local_sym_info): Allocate space for local_plt array.
515 Don't bump local_got_ents for PLT_IFUNC. Return local_plt
516 entry pointer.
517 (update_plt_info): Pass pointer to plt_entry rather than sym hash,
518 and don't change hash flags here.
519 (is_branch_reloc): New function.
520 (ppc64_elf_check_relocs): Handle STT_GNU_IFUNC.
521 (ppc64_elf_gc_sweep_hook): Likewise.
522 (ppc64_elf_adjust_dynamic_symbol): Likewise.
523 (allocate_dynrelocs): Likewise.
524 (ppc64_elf_size_dynamic_sections): Likewise.
525 (ppc_build_one_stub, ppc_size_one_stub): Likewise.
526 (ppc64_elf_size_stubs): Likewise.
527 (ppc64_elf_relocate_section): Likewise.
528 (get_sym_h): Adjust for local_plt.
529 (branch_reloc_hash_match): Use is_branch_reloc.
530 (ppc_type_of_stub): Pass plt_entry pointer and handle ifunc.
531 (ppc64_elf_toc): Ignore SEC_EXCLUDE sections.
532
041de40d
AM
5332009-07-10 Alan Modra <amodra@bigpond.net.au>
534
535 * elf.c (_bfd_elf_get_synthetic_symtab): Report addends.
536
7ae26bc1
AM
5372009-07-10 Alan Modra <amodra@bigpond.net.au>
538
539 * elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
540 and ref_regular_nonweak comment.
541 * elflink.c (elf_link_output_extsym): Special case ifunc syms
542 when def_regular, not ref_regular.
543 (elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,..
544 * elf32-i386.c (elf_i386_check_relocs): ..set it here instead..
545 * elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
546
9c4d0c1f
AM
5472009-07-09 Alan Modra <amodra@bigpond.net.au>
548
549 * elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
550 of malloc'd struct call_info.
551 (pasted_function): Likewise, priority too.
552
2fc6d3b0
AM
5532009-07-07 Alan Modra <amodra@bigpond.net.au>
554
555 * elf32-spu.c (spu_elf_auto_overlay): Take into account section
556 alignment when packing sections into overlays.
557
9e1f7c0e
DK
5582009-07-03 Cary Coutant <ccoutant@google.com>
559
560 * dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator.
561
4a768870
DK
5622009-07-03 Dave Korn <dave.korn.cygwin@gmail.com>
563
564 * coffcode.h (sec_to_styp_flags): Partially revert (functional
565 changes only) earlier patch:-
566
567 2009-06-25 Kai Tietz <kai.tietz@onevision.com>
568
569 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
570 give .debug and .reloc data characteristics.
571 (DOT_RELOC): New define for .reloc section string.
572 (coff_write_object_contents): Use DOT_RELOC instead of string.
573
848f5748
TT
5742009-07-02 Tom Tromey <tromey@redhat.com>
575
576 * aoutx.h (aout_get_external_symbols): Declare 'amt' locally.
577 * bfdwin.c (bfd_free_window): Cast to unsigned long.
578
dda46a27
L
5792009-07-01 Nick Clifton <nickc@redhat.com>
580
581 * elf-m10300.c: Remove trailing white space.
582 * reloc.c: Likewise.
583
efde2f2c
NC
5842009-07-01 Douglas B Rupp <rupp@gnat.com>
585
dda46a27 586 * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
efde2f2c 587 BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions.
dda46a27
L
588 * configure.in: Use them.
589 * configure: Regenerate.
590 * config.in: Regnerate.
591 * vmsutil.c: Include sysdep.h, remove ansidecl.h.
efde2f2c
NC
592 #define _BSD_SOURCE. Add comments.
593 (vms_file_stats_name): Calculate creation date based on available
594 runtime data. Return 1 for version instead of 0.
595
e1ec24c6
NC
5962009-07-01 Nick Clifton <nickc@redhat.com>
597
598 PR 10072
599 * elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle
600 to R_ARM_THM_PC8 relocation.
601
2709f570
NC
6022009-06-29 Nick Clifton <nickc@redhat.com>
603
604 * elf-m10300.c (mn10300_elf_relax_section): Allow for the
605 different uses of the relocations addend when a symbol is in a
606 merged section.
607
83b89087
L
6082009-06-27 H.J. Lu <hongjiu.lu@intel.com>
609
610 PR ld/10337
611 * elf.c (bfd_section_from_shdr): Don't change sh_link for
612 SHT_REL/SHT_RELA sections on executable nor shared library.
613 Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF
614 as a normal section.
615
be7035c6
NC
6162009-06-25 Nick Clifton <nickc@redhat.com>
617
618 * elf-m10300.c (mn10300_elf_relax_section): Handle non-section
619 symbols with SEC_MERGE flag.
620
bdeb4032
KT
6212009-06-25 Kai Tietz <kai.tietz@onevision.com>
622
623 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
624 give .debug and .reloc data characteristics.
625 (DOT_RELOC): New define for .reloc section string.
626 (coff_write_object_contents): Use DOT_RELOC instead of string.
627
b32e07d7
TG
6282009-06-25 Tristan Gingold <gingold@adacore.com>
629
630 * mach-o-target.c (bfd_mach_o_get_dynamic_symtab_upper_bound)
631 (bfd_mach_o_canonicalize_dynamic_symtab)
632 (bfd_mach_o_get_synthetic_symtab): Defines.
633 (TARGET_NAME_BACKEND): Add bfd_mach_o_print_thread entry.
634 (TARGET_NAME): Use Mach-O specific functions for dynamic.
635
636 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_in): Fix howto indexes
637 for scattered relocations.
638 (bfd_mach_o_i386_print_thread): New function.
639 (bfd_mach_o_print_thread): Define.
640
641 * mach-o.c (text_section_names_xlat): Add an entry for __const.
642 (bfd_mach_o_canonicalize_one_reloc, bfd_mach_o_canonicalize_relocs):
643 New functions extracted from ...
644 (bfd_mach_o_canonicalize_reloc): ... This. Simplified.
645 (bfd_mach_o_get_dynamic_reloc_upper_bound): New function.
646 (bfd_mach_o_canonicalize_dynamic_reloc): New function.
647 (bfd_mach_o_i386_flavour_string): Adjusted after enum renaming.
648 (bfd_mach_o_ppc_flavour_string): Reindentation. Add 64 bits cases.
649 (bfd_mach_o_scan_read_dylinker): Do not create a section anymore.
650 Set name_str field.
651 (bfd_mach_o_scan_read_dylib): Ditto.
652 (bfd_mach_o_scan_read_thread): Set mdata at declaration. Add comments,
653 reindent.
654 (bfd_mach_o_scan_read_dysymtab): Set mdata at declaration. Correctly
655 decode isym and flags on little endian targets. Set dysymtab field.
656 (bfd_mach_o_scan_start_address): Adjust for enum names.
657 (bfd_mach_o_lookup_section): Do not look for segments anymore.
658 (bfd_mach_o_print_section): Display bfd section name.
659 (bfd_mach_o_print_segment): Display none if no name.
660 (bfd_mach_o_print_dysymtab): Display next index for local, external
661 and undefined symbols.
662 (bfd_mach_o_bfd_print_private_bfd_data): Adjust code by using name_str.
663 Display dylinker name. Display thread and unixthread commands content.
664 (bfd_mach_o_print_thread): New macro.
665
666 * mach-o.h (bfd_mach_o_mach_header_magic): Align numbers.
667 (bfd_mach_o_ppc_thread_flavour): Ditto.
668 (bfd_mach_o_i386_thread_flavour): Ditto.
669 (BFD_MACH_O_PPC_THREAD_STATE_NONE): New enum.
670 (BFD_MACH_O_x86_THREAD_STATE_NONE): Replaces
671 BFD_MACH_O_THREAD_STATE_NONE.
672 (bfd_mach_o_segment_command): Remove segment field.
673 (bfd_mach_o_thread_flavour): Field offset is now unsigned long.
674 (bfd_mach_o_dylinker_command): Remove section field, add name_str.
675 (bfd_mach_o_prebound_dylib_command): Ditto.
676 (bfd_mach_o_dylib_command): Ditto.
677 (bfd_mach_o_prebound_dylib_command): Remove section field.
678 (mach_o_data_struct): Add dysymtab field.
679 (bfd_mach_o_backend_data): Add _bfd_mach_o_print_thread field.
680 (bfd_mach_o_get_reloc_upper_bound, bfd_mach_o_canonicalize_reloc)
681 (bfd_mach_o_build_commands): Remove parameter names and attributes.
682 (bfd_mach_o_get_dynamic_reloc_upper_bound)
683 (bfd_mach_o_canonicalize_dynamic_reloc): New prototypes.
684
c41ba836
DK
6852009-06-25 Rafael Avila de Espindola <espindola@google.com>
686
687 * plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type
688 field of struct dirent.
689
3188b070
TG
6902009-06-23 Tristan Gingold <gingold@adacore.com>
691
692 * vms.c (vms_get_synthetic_symtab): Remove duplicate definition
693 of this macro. Fix indentation.
694
022f8312
CL
6952009-06-22 Christophe Lyon <christophe.lyon@st.com>
696
697 * elf32-arm.c (elf32_arm_size_stubs): Use PLT address as
698 destination for defined dynamic symbols when deciding whether to
699 insert a stub or not.
700 (allocate_dynrelocs): Make sure functions are not marked as Thumb
701 when actually accessed through a PLT, even when generating a
702 shared lib.
703
d297e807
TG
7042009-06-22 Tristan Gingold <gingold@adacore.com>
705
706 * mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
707 the relocs array.
708
ceaf50a2
AM
7092009-06-22 Alan Modra <amodra@bigpond.net.au>
710
711 * elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
712 * elf32-v850.c (v850_elf_relocate_section): Warning fix.
713
983bddc8
AM
7142009-06-22 Alan Modra <amodra@bigpond.net.au>
715
716 * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
717
f8703194
L
7182009-06-19 H.J. Lu <hongjiu.lu@intel.com>
719
720 * elflink.c (elf_link_add_object_symbols): Avoid warning
721 from -Wjump-misses-init in gcc 4.5.0.
722
09a24cbf
L
7232009-06-19 H.J. Lu <hongjiu.lu@intel.com>
724
725 * elf32-i386.c (elf_i386_check_relocs): Properly check local
726 symbol on error.
727 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
728
4c544807
L
7292009-06-19 H.J. Lu <hongjiu.lu@intel.com>
730
731 * elf32-i386.c (elf_i386_tls_transition): Add a parameter,
732 r_symndx. Report local symbol name on error.
733 (elf_i386_check_relocs): Updated. Report local symbol name on
734 error.
735 (elf_i386_gc_sweep_hook): Updated.
736 (elf_i386_relocate_section): Likewise.
737
738 * elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter,
739 r_symndx. Report local symbol name on error.
740 (elf64_x86_64_check_relocs): Updated. Report local symbol name
741 on error.
742 (elf64_x86_64_gc_sweep_hook): Updated.
743 (elf64_x86_64_relocate_section): Likewise.
744
b8674692
TG
7452009-06-19 Tristan Gingold <gingold@adacore.com>
746
747 * mach-o.c (bfd_mach_o_print_private_header): Fix format character.
748
046b007d
TG
7492009-06-19 Tristan Gingold <gingold@adacore.com>
750
751 * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype.
752 (bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access.
753 (bfd_mach_o_valid): Ditto.
754 (bfd_mach_o_wide_p): Ditto.
755 (bfd_mach_o_canonicalize_reloc): Ditto.
756 (bfd_mach_o_build_commands): Ditto.
757 (bfd_mach_o_scan_read_thread): Ditto.
758 (bfd_mach_o_flatten_sections): Ditto.
759 (bfd_mach_o_scan_start_address): Ditto.
760 (bfd_mach_o_lookup_section): Ditto.
761 (bfd_mach_o_core_fetch_environment): Ditto.
762 (bfd_mach_o_write_contents): Ditto. Handle reexport_dylib.
763 (bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data.
764 (bfd_mach_o_scan_write_symtab): Ditto.
765 Use macros instead of hard-coded values.
766 (bfd_mach_o_scan_read_symtab_symbol): Make the function static.
767 Use bfd_mach_o_get_data instead of direct access. Use macros
768 instead of hard-coded values.
769 (bfd_mach_o_scan_read_symtab_strtab): Make the function static.
770 Remove sym argument and get section from mdata.
771 Move code into the else branch.
772 (bfd_mach_o_scan_read_symtab_symbols): Make the function static.
773 Remove sym argument and get section from mdata. Adjust code.
774 (bfd_mach_o_scan_read_dylib): Move assertion into the created
775 switch (which replaces consecutive if statements).
776 (bfd_mach_o_scan_read_dysymtab): Rename seg to cmd. Load
777 module table, table of content, indirect symbols and external
778 referenced symbols.
779 (bfd_mach_o_scan_read_symtab): Renames seg to symtab. Set symtab
780 field.
781 (bfd_mach_o_scan_read_linkedit): New function.
782 (bfd_mach_o_scan_read_str): Ditto.
783 (bfd_mach_o_count_symbols): Simplify the code by using the symtab
784 field of mdata.
785 (bfd_mach_o_get_symtab_upper_bound): Remove check as
786 bfd_mach_o_count_symbols never returns an error.
787 (bfd_mach_o_canonicalize_symtab): Simplify the code by using the
788 symtab field (there might be only one symtab).
789 (bfd_mach_o_scan_read_command): Handle reexported dylib.
790 Handle sub frameworks, sub umbrella, sub library and sub client.
791 Read code signature and segment split info commands.
792 (bfd_mach_o_scan): Reindent.
793 (bfd_mach_o_xlat_name): New type.
794 (bfd_mach_o_print_flags): New function.
795 (bfd_mach_o_get_name): Ditto.
796 (bfd_mach_o_cpu_name): New variable.
797 (bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name)
798 (bfd_mach_o_section_type_name)
799 (bfd_mach_o_section_attribute_name)
800 (bfd_mach_o_load_command_name): New variables.
801 (bfd_mach_o_print_private_header): New function.
802 (bfd_mach_o_print_section_map): New function extracted from
803 bfd_mach_o_print_private_bfd_data.
804 (bfd_mach_o_print_section): Ditto. Print more infos.
805 (bfd_mach_o_print_segment): Ditto.
806 (bfd_mach_o_print_dysymtab): Ditto.
807 (bfd_mach_o_bfd_print_private_bfd_data): Reworked. Handle
808 load weak dylib, reexport dylib and id dylib.
809 Handle code signature and segment_split info.
810 Handle sub frameworks, sub umbrella, sub library and sub client.
811 (bfd_mach_o_section_get_nbr_indirect): New function.
812
813 * mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro. Add comment.
814 (bfd_mach_o_header_flags): New enum to define header flags.
815 (bfd_mach_o_section_attribute): New enum to replace ...
816 (BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
817 BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
818 BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT,
819 BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS,
820 BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ...
821 these removed macros.
822 (BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros.
823 (bfd_mach_o_dylib_module): New type.
824 (BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New
825 macros.
826 (bfd_mach_o_dylib_table_of_content): New type.
827 (BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro.
828 (bfd_mach_o_dylib_reference): New type.
829 (BFD_MACH_O_REFERENCE_SIZE): New macro.
830 (bfd_mach_o_dysymtab_command): Add fields for loaded and decoded
831 modules, toc, references and indirect syms.
832 (BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro.
833 (bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were
834 unused). Add comment.
835 (bfd_mach_o_dylib_command): Ditto.
836 (bfd_mach_o_prebound_dylib_command): Ditto.
837 (bfd_mach_o_linkedit_command): New type.
838 (bfd_mach_o_str_command): New type.
839 (bfd_mach_o_load_command): Add linkedit and str fields.
840 (mach_o_data_struct): Add symtab field.
841 (bfd_get_mach_o_data): Renamed to ...
842 (bfd_mach_o_get_data): ... this new macro.
843 (bfd_mach_o_scan_read_symtab_symbol,
844 bfd_mach_o_scan_read_symtab_strtab,
845 bfd_mach_o_scan_read_symtab_symbols): Prototypes removed.
846
847 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data
848 instead of direct access.
849
6d78d0b9
AM
8502009-06-19 Alan Modra <amodra@bigpond.net.au>
851
852 * elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
853 R_PPC_PLTREL24 relocs.
854 (ppc_elf_relocate_section): Likewise.
855
3ec01793
AM
8562009-06-19 Alan Modra <amodra@bigpond.net.au>
857
858 * elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
859 pointer to sym hash. Update all uses.
860 (update_plt_info): Likewise. Don't check addend here.
861
c2e61a4e
L
8622009-06-18 H.J. Lu <hongjiu.lu@intel.com>
863
864 * elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use
865 bfd_sym_from_r_symndx.
866 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
867
87d72d41
AM
8682009-06-18 Alan Modra <amodra@bigpond.net.au>
869
870 * elf-bfd.h (struct sym_sec_cache): Delete.
871 (struct sym_cache): New.
872 (bfd_section_from_r_symndx): Delete prototype.
873 (bfd_sym_from_r_symndx): Define prototype.
874 * elf.c (bfd_section_from_r_symndx): Delete, replace with..
875 (bfd_sym_from_r_symndx): ..new function.
876 * elf32-arm.c: Update all uses of struct sym_sec_cache and
877 bfd_section_from_r_symndx to new struct and function.
878 * elf32-bfin.c: Likewise.
879 * elf32-hppa.c: Likewise.
880 * elf32-i386.c: Likewise.
881 * elf32-m32r.c: Likewise.
882 * elf32-m68hc1x.c: Likewise.
883 * elf32-m68hc1x.h: Likewise.
884 * elf32-m68k.c: Likewise.
885 * elf32-ppc.c: Likewise.
886 * elf32-s390.c: Likewise.
887 * elf32-sh.c: Likewise.
888 * elf64-ppc.c: Likewise.
889 * elf64-s390.c: Likewise.
890 * elf64-x86-64.c: Likewise.
891 * elfxx-sparc.c: Likewise.
892 * elfxx-sparc.h: Likewise.
893
14aae723
L
8942009-06-18 H.J. Lu <hongjiu.lu@intel.com>
895
896 * elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf.
897 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
898
5e486aa1
NC
8992009-06-18 Nick Clifton <nickc@redhat.com>
900
901 * elflink.c (elf_link_sort_relocs): Return early if there are no
902 relocs to sort.
903
361dff73
DK
9042009-06-18 Dave Korn <dave.korn.cygwin@gmail.com>
905
32425da9
NC
906 Merge cegcc and mingw32ce target name changes from
907 CeGCC project:
361dff73 908
32425da9 909 2007-12-25 Pedro Alves <pedro_alves@portugalmail.pt>
361dff73
DK
910
911 * config.bfd: Add arm*-*-cegcc* target.
912
32425da9 913 2007-12-17 Pedro Alves <pedro_alves@portugalmail.pt>
361dff73
DK
914
915 * config.bfd: Add arm-*-mingw32ce* target.
916
e03a8ed8
L
9172009-06-17 H.J. Lu <hongjiu.lu@intel.com>
918
919 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New.
920 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise.
921 * elf32-i386.c (elf_i386_allocate_dynrelocs): Use it.
922 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
923
9242009-06-17 H.J. Lu <hongjiu.lu@intel.com>
925
926 * elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New.
927 * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise.
928 * elf32-i386.c (elf_i386_check_relocs): Use it.
929 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
930
9312009-06-17 H.J. Lu <hongjiu.lu@intel.com>
932
933 * elf-bfd.h (elf_dyn_relocs): New.
934
935 * elf32-i386.c (elf_i386_dyn_relocs): Removed.
936 (elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with
937 elf_dyn_relocs.
938 (elf_i386_copy_indirect_symbol): Likewise.
939 (elf_i386_check_relocs): Likewise.
940 (elf_i386_gc_sweep_hook): Likewise.
941 (elf_i386_allocate_dynrelocs): Likewise.
942 (elf_i386_readonly_dynrelocs): Likewise.
943 (elf_i386_size_dynamic_sections): Likewise.
944
945 * elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed.
946 (elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs
947 with elf_dyn_relocs.
948 (elf64_x86_64_copy_indirect_symbol): Updated.
949 (elf64_x86_64_check_relocs): Likewise.
950 (elf64_x86_64_gc_sweep_hook): Likewise.
951 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
952 (elf64_x86_64_allocate_dynrelocs): Likewise.
953 (elf64_x86_64_readonly_dynrelocs): Likewise.
954 (elf64_x86_64_size_dynamic_sections): Likewise.
955
64e77c6d
L
9562009-06-17 H.J. Lu <hongjiu.lu@intel.com>
957
958 * elf32-arm.c (create_got_section): Get existing .rela.got
959 section.
960 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
961 * elf32-lm32.c (create_got_section): Likewise.
962 * elf32-m32r.c (create_got_section): Likewise.
963 * elf32-ppc.c (ppc_elf_create_got): Likewise.
964 * elf32-s390.c (create_got_section): Likewise.
965 * elf32-sh.c (create_got_section): Likewise.
966 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
967 * elf64-s390.c (create_got_section): Likewise.
968 * elfxx-sparc.c (create_got_section): Likewise.
969
970 * elflink.c (_bfd_elf_create_got_section): Properly initialize
971 the GOT size.
972
d2149d72
L
9732009-06-16 H.J. Lu <hongjiu.lu@intel.com>
974
975 * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New.
976
977 * elf32-i386.c (elf_i386_local_hash): Removed.
978 (elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
979 (elf_i386_get_local_sym_hash): Likewise.
980
981 * elf64-x86-64.c (elf64_x86_64_local_hash): Removed.
982 (elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
983 (elf64_x86_64_get_local_sym_hash): Likewise.
984 * elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise.
985 (get_local_sym_hash): Likewise.
986
cc3bd654
L
9872009-06-16 H.J. Lu <hongjiu.lu@intel.com>
988
989 * elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec,
990 rel_got_sec and plt_sec.
991 (elfNN_ia64_relax_section): Updated.
992 (elfNN_ia64_create_dynamic_sections): Likewise.
993 (get_got): Likewise.
994 (allocate_dynrel_entries): Likewise.
995 (elfNN_ia64_size_dynamic_sections): Likewise.
996 (set_got_entry): Likewise.
997 (elfNN_ia64_choose_gp): Likewise.
998 (elfNN_ia64_relocate_section): Likewise.
999 (elfNN_ia64_finish_dynamic_symbol): Likewise.
1000 (elfNN_ia64_finish_dynamic_sections): Likewise.
1001
be3e406d
UW
10022009-06-16 Ulrich Weigand <uweigand@de.ibm.com>
1003
1004 * elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
1005 also for calls.
1006
6de2ae4a
L
10072009-06-16 H.J. Lu <hongjiu.lu@intel.com>
1008
1009 * configure.in (elf): Add elf-ifunc.lo.
1010
1011 * configure: Regenerated.
1012 * Makefile.in: Likewise.
1013
1014 * elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt,
1015 srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc.
1016
1017 * elf32-i386.c (elf_i386_link_hash_table): Remove sgot,
1018 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
1019 irelifunc.
1020 (elf_i386_link_hash_table_create): Likewise.
1021 (elf_i386_create_dynamic_sections): Likewise.
1022 (elf_i386_check_relocs): Likewise.
1023 (elf_i386_allocate_dynrelocs): Likewise.
1024 (elf_i386_size_dynamic_sections): Likewise.
1025 (elf_i386_relocate_section): Likewise.
1026 (elf_i386_finish_dynamic_symbol): Likewise.
1027 (elf_i386_finish_dynamic_sections): Likewise.
1028 (elf_i386_create_got_section): Removed.
1029
1030 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot,
1031 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
1032 irelifunc.
1033 (elf64_x86_64_compute_jump_table_size): Updated.
1034 (elf64_x86_64_link_hash_table_create): Likewise.
1035 (elf64_x86_64_create_dynamic_sections): Likewise.
1036 (elf64_x86_64_check_relocs): Likewise.
1037 (elf64_x86_64_allocate_dynrelocs): Likewise.
1038 (elf64_x86_64_size_dynamic_sections): Likewise.
1039 (elf64_x86_64_relocate_section): Likewise.
1040 (elf64_x86_64_finish_dynamic_symbol): Likewise.
1041 (elf64_x86_64_finish_dynamic_sections): Likewise.
1042 (elf64_x86_64_create_got_section): Removed.
1043
1044 * elflink.c (_bfd_elf_create_got_section): Use log_file_align
1045 for pointer alignment. Set up section pointers.
1046 (_bfd_elf_create_dynamic_sections): Likewise.
1047 (_bfd_elf_create_ifunc_sections): Moved to ...
1048 * elf-ifunc.c: Here. New.
1049
1050 * Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo.
1051 (BFD32_BACKENDS_CFILES): Add elf-ifunc.c.
1052 Run "make dep-am".
1053
81694485
NC
10542009-06-16 Doug Kwan <dougkwan@google.com>
1055
6de2ae4a
L
1056 * elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
1057 to bfd_signed_vma. Cast constant operands which are used in
1058 offset related expressions to bfd_signed_vma type as appropriate.
81694485 1059
6db7e006
MR
10602009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1061
1062 * elf32-vax.c (elf_vax_plt_sym_val): New function.
1063 (elf_backend_plt_sym_val): Define.
1064
9b90d8fd
MR
10652009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1066
1067 * elf32-vax.c (elf_vax_reloc_type_class): New function.
1068 (elf_backend_reloc_type_class): Define.
1069
04981bc1
MR
10702009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1071
1072 * elf32-vax.c (elf_vax_relocate_section): For symbol references
1073 from an executable to a shared library treat R_VAX_PC32
1074 relocations as R_VAX_PLT32 ones.
1075
886815b2
MR
10762009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1077
1078 * elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
1079 symbols in GOT space calculation.
1080 (elf_vax_relocate_section): Adjust accordingly.
1081
6c4fb25a
MR
10822009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1083
1084 * elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
1085 include <R11:R2>.
1086
7b6021f1
MR
10872009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
1088
1089 * elf32-vax.c (elf_vax_check_relocs): Handle the visibility
1090 attribute.
1091 (elf_vax_relocate_section): Likewise.
1092
188dbb07
L
10932009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1094
1095 * elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
1096 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1097
048cbda4
L
10982009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1099
1100 * elf32-i386.c (elf_i386_check_relocs): Reformat.
1101 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1102
482c6ce9
L
11032009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1104
1105 * Makefile.am: Run "make dep-am".
1106 * Makefile.in: Regenerated.
1107
eba077f2
L
11082009-06-15 H.J. Lu <hongjiu.lu@intel.com>
1109
1110 * elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
1111 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1112
ec68b083
NC
11132009-06-15 Nick Clifton <nickc@redhat.com>
1114
1115 * po/ru.po: New Russian translation.
1116 * configure.in (ALL_LINGUAS): Add ru.
1117 * configure: Regenerate.
1118
b80ee1aa
L
11192009-06-14 H.J. Lu <hongjiu.lu@intel.com>
1120
1121 * elf32-i386.c: Remove duplicated comments.
1122
44c4ea11
L
11232009-06-14 H.J. Lu <hongjiu.lu@intel.com>
1124
1125 PR ld/10270
1126 * elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
1127 dynamic IFUNC pointer in non-shared object. Use .got.plt
1128 for IFUNC definition in PIE.
1129 (elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
1130 PIE locally.
1131
1132 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
1133 dynamic IFUNC pointer in non-shared object. Use .got.plt
1134 for IFUNC definition in PIE.
1135 (elf64_x86_64_relocate_section): Resolve IFUNC definition in
1136 PIE locally.
1137
8b7e2992
L
11382009-06-13 H.J. Lu <hongjiu.lu@intel.com>
1139
1140 * elf32-i386.c (elf_i386_check_relocs): Properly report
1141 local symbol for unhandled relocation against STT_GNU_IFUNC
1142 symbol.
637fa7af 1143 (elf_i386_relocate_section): Likewise.
8b7e2992 1144 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
637fa7af 1145 (elf64_x86_64_relocate_section): Likewise.
8b7e2992 1146
c25bc9fc
L
11472009-06-13 H.J. Lu <hongjiu.lu@intel.com>
1148
1149 PR ld/10269
1150 * elf32-i386.c: Include "objalloc.h" and "hashtab.h".
1151 (elf_i386_link_hash_table): Add loc_hash_table and
1152 loc_hash_memory.
1153 (elf_i386_local_hash): New.
1154 (elf_i386_local_htab_hash): Likewise.
1155 (elf_i386_local_htab_eq): Likewise.
1156 (elf_i386_get_local_sym_hash): Likewise.
1157 (elf_i386_link_hash_table_free): Likewise.
1158 (elf_i386_allocate_local_dynrelocs): Likewise.
1159 (elf_i386_finish_local_dynamic_symbol): Likewise.
1160 (bfd_elf64_bfd_link_hash_table_free): Likewise.
1161 (elf_i386_link_hash_table_create): Create loc_hash_table and
1162 loc_hash_memory.
1163 (elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
1164 (elf_i386_size_dynamic_sections): Likewise.
1165 (elf_i386_relocate_section): Likewise.
1166 (elf_i386_finish_dynamic_sections): Likewise.
1167 (elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
1168 isn't NULL.
1169
1170 * elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
1171 (elf64_x86_64_link_hash_table): Add loc_hash_table and
1172 loc_hash_memory.
1173 (elf64_x86_64_local_hash): New.
1174 (elf64_x86_64_local_htab_hash): Likewise.
1175 (elf64_x86_64_local_htab_eq): Likewise.
1176 (elf64_x86_64_get_local_sym_hash): Likewise.
1177 (elf64_x86_64_link_hash_table_free): Likewise.
1178 (elf64_x86_64_allocate_local_dynrelocs): Likewise.
1179 (elf64_x86_64_finish_local_dynamic_symbol): Likewise.
1180 (bfd_elf64_bfd_link_hash_table_free): Likewise.
1181 (elf64_x86_64_link_hash_table_create): Create loc_hash_table
1182 and loc_hash_memory.
1183 (elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
1184 symbols.
1185 (elf64_x86_64_size_dynamic_sections): Likewise.
1186 (elf64_x86_64_relocate_section): Likewise.
1187 (elf64_x86_64_finish_dynamic_sections): Likewise.
1188 (elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
1189 sym isn't NULL.
1190
dec9d5df
PB
11912009-06-10 Philip Blundell <philb@gnu.org>
1192
1193 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
1194 elf_sec->this_hdr == NULL.
1195
92bc0e80
TG
11962009-06-12 Tristan Gingold <gingold@adacore.com>
1197
1198 * reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
1199 * bfd-in2.h: Regenerated.
1200 * libbfd.h: Regenerated.
1201
1202 * mach-o.c (FILE_ALIGN): New macro.
1203 (bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
1204 (bfd_mach_o_print_symbol): Ditto.
1205 (bfd_mach_o_scan_write_thread): Adjust type of variable offset.
1206 (bfd_mach_o_get_reloc_upper_bound): New function.
1207 (bfd_mach_o_canonicalize_reloc): Ditto.
1208 (bfd_mach_o_scan_write_relocs): Ditto.
1209 (bfd_mach_o_scan_write_section_32): Remove offset argument.
1210 (bfd_mach_o_scan_write_section_64): Ditto.
1211 (bfd_mach_o_scan_write_segment_32): Write relocs. Fix size of data
1212 written for load command. Do not compute section file offset.
1213 (bfd_mach_o_scan_write_segment_64): Ditto.
1214 (bfd_mach_o_scan_write_symtab): Compute file offset first.
1215 Adjust for bfd_mach_o_asymbol. Move code to convert from BFD to
1216 Mach-O to ...
1217 (bfd_mach_o_mangle_symbols): ... this new function.
046b007d 1218 (bfd_mach_o_write_contents): Be sure to have load commands built.
92bc0e80
TG
1219 Call bfd_mach_o_mangle_symbols.
1220 (bfd_mach_o_build_commands): Adjust for filelen field.
1221 Use FILE_ALIGN macro. Clear section file offset if section is empty.
1222 Do not set symtab file offset anymore here.
1223 (bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
1224 (bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
1225 Set reloc_count and rel_filepos section fields.
1226 (bfd_mach_o_scan_read_section_32): Type of argument offset is now
1227 unsigned int.
1228 (bfd_mach_o_scan_read_section_64): Ditto.
1229 (bfd_mach_o_scan_read_section): Ditto.
1230 (bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
1231 bfd_mach_o_asymbol. Use unsigned int for file offset type.
1232 (bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
1233 Handle weak-ref symbols.
1234 (bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
1235 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1236 (bfd_mach_o_scan): Remove assignment to removed field.
1237 (bfd_mach_o_mkobject_init): Ditto.
1238 (bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
1239 (bfd_mach_o_bfd_reloc_type_lookup): New macro.
1240 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
1241 (bfd_mach_o_swap_reloc_in): Ditto.
1242 (bfd_mach_o_swap_reloc_out): Ditto.
1243
1244 * mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
1245 (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
1246 (BFD_MACH_O_REFERENCE_FLAG_DEFINED)
1247 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
1248 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
1249 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
1250 (BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
1251 (BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
1252 (BFD_MACH_O_N_WEAK_DEF): New macros.
1253 Add comments.
1254 (bfd_mach_o_section_type): Add new enumeration values.
1255 (BFD_MACH_O_S_SELF_MODIFYING_CODE)
1256 (BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
1257 (BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
1258 (BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
1259 macros.
1260 (BFD_MACH_O_GENERIC_RELOC_VANILLA)
1261 (BFD_MACH_O_GENERIC_RELOC_PAIR)
1262 (BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
1263 (BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
1264 (BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
1265 (BFD_MACH_O_RELENT_SIZE): Ditto.
1266 (BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
1267 (BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
1268 (BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
1269 (BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
1270 (BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
1271 (BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
1272 (BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
1273 (BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
1274 (bfd_mach_o_reloc_info): New struct.
1275 (bfd_mach_o_asymbol): New struct.
1276 (bfd_mach_o_symtab_command): The symbols field is now of type
1277 bfd_mach_o_asymbol.
1278 (bfd_mach_o_load_command): The offset and len fields are now of type
1279 unsigned int.
1280 (mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
1281 Add a filelen field. Add comments.
1282 (bfd_mach_o_backend_data): New struct.
1283 (bfd_mach_o_get_backend_data): New macro.
1284 (bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
1285 bfd_mach_o_asymbol.
1286 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1287 (bfd_mach_o_get_reloc_upper_bound): New prototype.
1288 (bfd_mach_o_canonicalize_reloc): Ditto.
1289
1290 * mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
1291 duplicated macro. Now defined to _bfd_generic_is_local_label.
1292 (TARGET_NAME_BACKEND): New macro...
1293 (TARGET_NAME_BACKEND): ... used to name a new variable.
1294 (TARGET_NAME): Define relocs table using bfd_mach_o, reference
1295 Mach-O backend data.
1296
1297 * mach-o-i386.c (i386_howto_table): New variable.
1298 (bfd_mach_o_i386_swap_reloc_in): New function.
1299 (bfd_mach_o_i386_swap_reloc_out): Ditto.
1300 (bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
1301 (bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
1302 (bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
1303 (bfd_mach_o_bfd_reloc_type_lookup)
1304 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
1305
8c7d38e8
NC
13062009-06-11 Eric Paris <eparis@redhat.com>
1307 Nick Clifton <nickc@redhat.com>
1308
1309 * opncls.c (_maybe_make_executable): New function. Gives execute
1310 permission to an executable bfd that was opened for writing
1311 provided that it is a regular file. Replaces common code found in...
1312 (bfd_close): here and ...
1313 (bfd_close_all_done): here.
1314
f865a31d
AG
13152009-06-11 Anthony Green <green@moxielogic.com>
1316
1317 * reloc.c: Add BFD_RELOC_MOXIE_10_PCREL.
1318 * bfd-in2.h: Rebuilt.
1319 * libbfd.h: Rebuilt.
1320 * elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10
1321 relocation support.
1322 (moxie_reloc_map): Ditto.
1323 Clean up copyright notice.
1324
25b88f33
PP
13252009-06-10 Paul Pluzhnikov <ppluzhnikov@google.com>
1326
1372b818 1327 * bfd-in2.h: bfd_mmap prototype.
25b88f33
PP
1328 * bfdio.c (bfd_mmap): New function.
1329 * libbfd.h (bfd_iovec): Add bmmap.
1372b818 1330 * cache.c (cache_bmmap): New function.
25b88f33
PP
1331 (cache_iovec): Initialize bmmap member.
1332 * opencls.c (opncls_bmmap): New function.
1333 (opncls_iovec): Initialize bmmap member.
1334
c2f09c75
TG
13352009-06-09 Tristan Gingold <gingold@adacore.com>
1336
1337 * mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
1338 and stabstr_segment fields.
1339 (mach_o_be_vec, mach_o_le_vec): Removed
1340 (bfd_mach_o_version): New prototype.
1341
1342 * mach-o.c (bfd_mach_o_version): Make this function public.
1343 (mach_o_wide_p): New function.
1344 (bfd_mach_o_wide_p): Ditto.
1345 (bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
1346 weird names.
1347 (bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
1348 Search in the list only if the name starts with a dot.
1349 (bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
1350 test. Check bfd_seek status.
1351 (bfd_mach_o_scan_write_thread): Check bfd_seek status.
1352 (bfd_mach_o_scan_write_section_32): Ditto.
1353 (bfd_mach_o_scan_write_section_64): Ditto.
1354 (bfd_mach_o_scan_write_section): Removed.
1355 (bfd_mach_o_scan_write_segment): Split into ...
1356 (bfd_mach_o_scan_write_segment_32): ... this and ...
1357 (bfd_mach_o_scan_write_segment_64): ... this. Check bfd_seek status.
1358 (bfd_mach_o_scan_write_symtab_symbols): Moved into ...
1359 (bfd_mach_o_scan_write_symtab): ... this. Write symtab from BFD
1360 symbol table. Now returns a boolean.
1361 (bfd_mach_o_write_contents): Set filetype. Check bfd_seek status.
1362 Adjust for status type.
1363 (bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
1364 test. Write symbol table. Numbers the sections.
1365 (bfd_mach_o_read_header): Check bfd_seek status.
1366 Use mach_o_wide_p instead of hard-coded test.
1367 (bfd_mach_o_scan_read_section_32): Check bfd_seek status.
1368 (bfd_mach_o_scan_read_section_64): Ditto.
1369 (bfd_mach_o_scan_read_symtab_symbol): Ditto. Check bfd_seek status.
1370 Use BFD_MACH_O_N_TYPE instead of hard-coded value. Correctly
1371 handled common symbols.
1372 (bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
1373 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
1374 (bfd_mach_o_scan_read_dylinker): Ditto.
1375 (bfd_mach_o_scan_read_dylib): Ditto.
1376 (bfd_mach_o_scan_read_thread): Ditto.
1377 (bfd_mach_o_scan_read_symtab): Ditto.
1378 Do not create a section for the stabs.
1379 (bfd_mach_o_scan_read_uuid): Check bfd_seek status.
1380 (bfd_mach_o_scan_read_segment): Ditto.
1381 (bfd_mach_o_scan_read_command): Ditto.
1382 (bfd_mach_o_scan_start_address): Ditto.
1383 (bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
1384 (bfd_mach_o_archive_p): Check bfd_seek status.
1385 (bfd_mach_o_core_fetch_environment): Ditto.
1386
1387 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
1388
2a81c24a
L
13892009-06-06 H.J. Lu <hongjiu.lu@intel.com>
1390
1391 * elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
1392 (elf_i386_link_hash_table_create): Initialize irelifunc.
1393 (elf_i386_check_relocs): Updated. Set up irelifunc for
1394 shared objects.
1395 (elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
1396 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
1397 shared objects.
1398 (elf_i386_relocate_section): Likewise.
1399
1400 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
1401 (elf64_x86_64_link_hash_table_create): Initialize irelifunc.
1402 (elf64_x86_64_check_relocs): Updated. Set up irelifunc for
1403 shared objects.
1404 (elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
1405 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
1406 shared objects.
1407 (elf64_x86_64_relocate_section): Likewise.
1408
1409 * elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
1410 ...
1411 (_bfd_elf_create_ifunc_sections): This.
1412
c2f09c75 1413 * elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
2a81c24a
L
1414 ...
1415 (_bfd_elf_create_ifunc_sections): This. Create .rel[a].ifunc
1416 for shared objects.
1417
710ab287
L
14182009-06-06 H.J. Lu <hongjiu.lu@intel.com>
1419
1420 * elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
1421 relocation for R_386_32 against STT_GNU_IFUNC symbol when
1422 building shared object. Check info->executable instead of
1423 !info->shared when setting non_got_ref.
1424 (elf_i386_allocate_dynrelocs): Allocate dynamic relocation
1425 for non-GOT reference of STT_GNU_IFUNC symbol in shared
1426 object. Allocate GOT relocation agsinst STT_GNU_IFUNC
1427 symbol if needed.
1428 (elf_i386_relocate_section): Output dynamic relocation for
1429 R_386_32 against STT_GNU_IFUNC symbol to get the real
1430 function address when building shared object.
1431 (elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
1432 relocation for STT_GNU_IFUNC symbol in shared object.
1433
1434 * elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
1435 dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
1436 symbol when building shared object. Check info->executable
1437 instead of !info->shared when setting non_got_ref.
1438 (elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
1439 for non-GOT reference of STT_GNU_IFUNC symbol in shared
1440 library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
1441 if needed.
1442 (elf64_x86_64_relocate_section): Output dynamic relocation
1443 for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
1444 function address when building shared object.
1445 (elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
1446 relocation for STT_GNU_IFUNC symbol in shared object.
1447
9e93c730
JK
14482009-06-06 Jan Kratochvil <jan.kratochvil@redhat.com>
1449
1450 * Makefile.am: Run "make dep-am".
1451 (BFD32_BACKENDS): Add mach-o-i386.lo.
1452 (BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
1453 * Makefile.in: Regenerate.
1454
74681fc4
AM
14552009-06-06 Alan Modra <amodra@bigpond.net.au>
1456
1457 * elf32-spu.c (spu_elf_relocate_section): Match overlay number
1458 when looking for soft-icache stubs.
1459
154a1ee5
TG
14602009-06-05 Tristan Gingold <gingold@adacore.com>
1461
1462 * mach-o.h: Update copyright year.
1463 (bfd_mach_o_mach_header_magic): New enum.
1464 (bfd_mach_o_cpu_subtype): Now an enum.
1465 (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
1466 (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
1467 (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
1468 (bfd_mach_o_load_command): Field type_required is now a boolean.
1469 Reindent prototypes.
1470 (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
1471 (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
1472 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
1473 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
1474 (bfd_mach_o_get_symtab_upper_bound): Ditto.
1475 (bfd_mach_o_canonicalize_symtab): Ditto.
1476 (bfd_mach_o_get_symbol_info): Ditto.
1477 (bfd_mach_o_print_symbol): Ditto.
1478 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
1479 (bfd_mach_o_make_empty_symbol): Ditto.
1480 (bfd_mach_o_write_contents): Ditto.
1481
1482 * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
1483 bfd_mach_o_mkobject): Defines.
1484 (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
1485 Do not check with target vector but with flavour.
1486 (struct mach_o_section_name_xlat): New declaration.
1487 (dwarf_section_names_xlat): Ditto.
1488 (text_section_names_xlat): Ditto.
1489 (data_section_names_xlat): Ditto.
1490 (struct mach_o_segment_name_xlat): Ditto.
1491 (segsec_names_xlat): Ditto.
1492 (bfd_mach_o_convert_section_name_to_bfd): New function.
1493 (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
1494 (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
1495 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
1496 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
1497 Accept any input and output flavour. Do not share private data
1498 anymore.
1499 (bfd_mach_o_count_symbols): Add a comment.
1500 (bfd_mach_o_get_symtab_upper_bound): Make it public.
1501 (bfd_mach_o_canonicalize_symtab): Ditto.
1502 (bfd_mach_o_get_symbol_info): Ditto.
1503 (bfd_mach_o_print_symbol): Ditto.
1504 (bfd_mach_o_write_header): Now returns a boolean instead of an int.
1505 Use constants instead of hard-coded values.
1506 (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
1507 values.
1508 (bfd_mach_o_scan_write_section_64): Ditto.
1509 (bfd_mach_o_scan_write_segment): Ditto.
1510 Do not copy sections anymore.
1511 (bfd_mach_o_write_contents): Make it public.
1512 Remove dead code. Rewrite typeflag assignment.
1513 (bfd_mach_o_build_commands): New function.
1514 (bfd_mach_o_set_section_contents): Ditto.
1515 (bfd_mach_o_make_empty_symbol): Make it public.
1516 (bfd_mach_o_read_header): Make it static.
1517 Convert to bfd_boolean.
1518 Use constants instead of hard-coded values.
1519 (bfd_mach_o_make_bfd_section): Call
1520 bfd_mach_o_convert_section_name_to_bfd to create name.
1521 (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
1522 values.
1523 (bfd_mach_o_scan_read_section_64): Ditto.
1524 (bfd_mach_o_scan_read_segment): Do not create a bfd section for
1525 a segment anymore. Use constants instead of hard-coded values.
1526 (bfd_mach_o_scan_read_command): Fix style.
1527 (bfd_mach_o_scan): Use constants instead of hard-coded values.
1528 Get rid of BFD_IO_FUNCS.
1529 (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
1530 (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
1531 (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
1532 (bfd_mach_o_object_p): Removed.
1533 (bfd_mach_o_gen_core_p): New function, replaces ...
1534 (bfd_mach_o_core_p): ... deleted.
1535 (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
1536
1537 * mach-o-i386.c: New file.
1538 * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
1539 * configure.in (TDEFINES): Add mach_o_i386_vec.
1540 * configure: Regenerated.
1541 * targets.c: Add mach_o_i386_vec.
1542
1543 * mach-o.c: Update copyright years.
1544 (BFD_IO_FUNCS): Remove (was not used).
1545 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
1546 bfd_mach_o_slurp_extended_name_table,
1547 bfd_mach_o_construct_extended_name_table,
1548 bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
1549 bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
1550 bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
1551 bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
1552 bfd_mach_o_get_section_contents_in_window,
1553 bfd_mach_o_bfd_is_local_label_name,
1554 bfd_mach_o_bfd_is_target_special_symbol,
1555 bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
1556 bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
1557 bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
1558 bfd_mach_o_minisymbol_to_symbol,
1559 bfd_mach_o_bfd_get_relocated_section_contents,
1560 bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
1561 bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
1562 bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
1563 bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
1564 bfd_mach_o_bfd_merge_private_bfd_data,
1565 bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
1566 bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
1567 bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
1568 bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
1569 bfd_mach_o_bfd_copy_private_header_data,
1570 bfd_mach_o_core_file_matches_executable_p): Move these defines ...
1571 * mach-o-target.c: ... here.
1572 Update copyright years.
1573
a1ef399e
AM
15742009-06-04 Alan Modra <amodra@bigpond.net.au>
1575
1576 * dep-in.sed: Don't use \n in replacement part of s command.
1577 * Makefile.am (DEP1): LC_ALL for uniq.
1578 Run "make dep-am".
1579 * Makefile.in: Regenerate.
1580
2e75bb35
L
15812009-06-03 H.J. Lu <hongjiu.lu@intel.com>
1582
1583 * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
1584 h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
1585 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
1586
0018b0a3
L
15872009-06-03 H.J. Lu <hongjiu.lu@intel.com>
1588
1589 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
1590 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
1591 (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
1592 against STT_GNU_IFUNC symbols for static executables.
1593 (elf_i386_finish_dynamic_symbol): Load GOT entry with
1594 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
1595
1596 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
1597 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
1598 (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
1599 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
1600
94313f36
RS
16012009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com>
1602
1603 * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
1604 symbols to be left unimported when linking statically.
1605 * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
1606 code when linking statically.
1607
7afd84dc
L
16082009-06-02 H.J. Lu <hongjiu.lu@intel.com>
1609
1610 * elf32-i386.c (elf_i386_check_relocs): Increment
1611 got.refcount for R_386_GOT32/R_386_GOTOFF relocations
1612 against STT_GNU_IFUNC symbol.
1613 (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
1614 local STT_GNU_IFUNC definition is used.
1615 (elf_i386_relocate_section): Handle got.offset != -1 for
1616 R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
1617 symbol.
1618
1619 * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
1620 got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
1621 relocations against STT_GNU_IFUNC symbol.
1622 (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
1623 local STT_GNU_IFUNC definition is used.
1624 (elf64_x86_64_relocate_section): Handle got.offset != -1
1625 for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
1626 STT_GNU_IFUNC symbol.
1627
cbe950e9
L
16282009-06-01 H.J. Lu <hongjiu.lu@intel.com>
1629
1630 PR ld/10205
1631 * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
1632 (elf_i386_reloc_type_lookup): Likewise.
1633 (R_386_tls): Removed.
1634 (R_386_irelative): New.
1635 (R_386_vt_offset): Updated.
1636 (elf_i386_rtype_to_howto): Likewise.
1637 (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
1638 (elf_i386_link_hash_table_create): Initialize igotplt,
1639 iplt and irelplt.
1640 (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
1641 (elf_i386_adjust_dynamic_symbol): Likewise.
1642 (elf_i386_allocate_dynrelocs): Likewise.
1643 (elf_i386_relocate_section): Likewise.
1644 (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
1645 sections.
1646 (elf_i386_finish_dynamic_symbol): When building a static
1647 executable, use .iplt, .igot.plt and .rel.iplt sections for
1648 STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
1649 locally defined STT_GNU_IFUNC symbol.
1650
1651 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
1652 (x86_64_reloc_map): Likewise.
1653 (R_X86_64_standard): Updated.
1654 (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
1655 (elf64_x86_64_link_hash_table_create): Initialize igotplt,
1656 iplt and irelplt.
1657 (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
1658 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1659 (elf64_x86_64_allocate_dynrelocs): Likewise.
1660 (elf64_x86_64_relocate_section): Likewise.
1661 (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
1662 sections.
1663 (elf64_x86_64_finish_dynamic_symbol): When building a static
1664 executable, use .iplt, .igot.plt and .rela.iplt sections for
1665 STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
1666 for locally defined STT_GNU_IFUNC symbol.
1667
1668 * reloc.c (BFD_RELOC_386_IRELATIVE): New.
1669 (BFD_RELOC_X86_64_IRELATIVE): Likewise.
1670
1671 * bfd-in2.h: Regenerated.
1672 * libbfd.h: Likewise.
1673
3aa14d16
L
16742009-06-01 H.J. Lu <hongjiu.lu@intel.com>
1675
1676 * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
1677 (_bfd_elf_make_ifunc_reloc_section): Removed.
1678 (_bfd_elf_is_ifunc_symbol): Likewise.
1679 (_bfd_elf_create_static_ifunc_sections): New.
1680
1681 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
1682 symbol check to ...
1683 (elf_link_add_object_symbols): Here.
1684 (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
1685 STT_GNU_IFUNC symbol.
1686 (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
1687 if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
1688 (IFUNC_INFIX): Removed.
1689 (get_ifunc_reloc_section_name): Likewise.
1690 (_bfd_elf_make_ifunc_reloc_section): Likewise.
1691 (_bfd_elf_is_ifunc_symbol): Likewise.
1692 (_bfd_elf_create_static_ifunc_sections): New.
1693
eb4ff4d6
L
16942009-05-29 H.J. Lu <hongjiu.lu@intel.com>
1695
1696 * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
1697 (create_got_section): Likewise.
1698 (allocate_dynrelocs): Likewise.
1699 (readonly_dynrelocs): Likewise.
1700 (set_tls_module_base): Likewise.
1701 (dtpoff_base): Likewise.
1702 (tpoff): Likewise.
1703 (elf_i386_link_hash_table_create): Updated.
1704 (elf_i386_create_dynamic_sections): Likewise.
1705 (elf_i386_check_relocs): Likewise.
1706 (elf_i386_size_dynamic_sections): Likewise.
1707 (elf_i386_relocate_section): Likewise.
1708
1709 * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
1710 (create_got_section): Likewise.
1711 (allocate_dynrelocs): Likewise.
1712 (readonly_dynrelocs): Likewise.
1713 (set_tls_module_base): Likewise.
1714 (dtpoff_base): Likewise.
1715 (tpoff): Likewise.
1716 (elf64_x86_64_link_hash_table_create): Updated.
1717 (elf64_x86_64_create_dynamic_sections): Likewise.
1718 (elf64_x86_64_check_relocs): Likewise.
1719 (elf64_x86_64_size_dynamic_sections): Likewise.
1720 (elf64_x86_64_relocate_section): Likewise.
1721
fc579192
NC
17222009-05-28 Nick Clifton <nickc@redhat.com>
1723
1724 * targets.c (_bfd_target_vector): Only include plugin target in
1725 all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
1726
5ebe2858
UW
17272009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
1728
1729 * elf32-spu.c (struct call_info): New member broken_cycle.
1730 (remove_cycle): Instead of physically removing call_info structures
1731 to break call graph cycles, mark them using the broken_cycle flag.
1732 (mark_overlay_section): Respect broken_cycle flag.
1733 (unmark_overlay_section): Likewise.
1734 (collect_lib_sections): Likewise.
1735 (collect_overlays): Likewise.
1736 (sum_stack): Likewise.
1737
34ad4cb0
UW
17382009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
1739
1740 * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
1741 (mark_functions_via_relocs): Initialize callee->count to 1.
1742 (pasted_function): Likewise.
1743 (spu_elf_auto_overlay): Honor call counts when determining number
1744 of stubs required in software i-cache mode.
1745
fc579192
NC
17462009-05-27 Rafael Avila de Espindola <espindola@google.com>
1747
1748 * plugin.c (program_name): Remove.
1749 (plugin_program_name): New.
1750 (bfd_plugin_set_program_name): New.
1751 (try_load_plugin): Use plugin_program_name.
1752 * plugin.h (bfd_plugin_set_program_name): New.
1753
17542009-05-27 Rafael Avila de Espindola <espindola@google.com>
5691d22d
NC
1755
1756 * aclocal.m4: Include ../config/plugins.m4.
1757 * configure.in: Use AC_PLUGINS.
1758 * configure: Regenerate.
1759 * Makefile.in: Regenerate.
1760 * doc/Makefile.in: Regenerate.
1761
c8a1f254
NS
17622009-05-27 Nathan Sidwell <nathan@codesourcery.com>
1763
1764 * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
1765 link.
1766 * bout.c (b_out_bfd_relax_section): Reject relocatable links.
1767 * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
1768 * elf32-avr.c (elf32_avr_relax_section): Likewise.
1769 * elf32-frv.c (elf32_avr_relax_section): Likewise.
1770 * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
1771 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1772 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1773 * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
1774 * reloc.c (bfd_generic_relax_section): Likewise.
1775 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
1776 * vms.c (vms_bfd_relax_section): Likewise.
1777
68d7e96a
L
17782009-05-26 H.J. Lu <hongjiu.lu@intel.com>
1779
1780 * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
1781
1782 * elf32-i386.c (is_indirect_symbol): Renamed to ...
1783 * elflink.c (_bfd_elf_is_ifunc_symbol): This.
1784
1785 * elf32-i386.c (allocate_dynrelocs): Updated.
1786 (elf_i386_relocate_section): Likewise.
1787 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1788 (elf64_x86_64_relocate_section): Likewise.
1789
1790 * elf64-x86-64.c (is_indirect_symbol): Removed.
1791
f12e7348
NC
17922009-05-26 Nick Clifton <nickc@redhat.com>
1793
1794 * po/id.po: Updated Indonesian translation.
1795
ce3c775b
NC
17962009-05-26 Rafael Avila de Espindola <espindola@google.com>
1797
1798 * Makefile.am: Run "make dep-am".
1799 (AM_CPPFLAGS): New.
1800 (LIBDL): New.
1801 (ALL_MACHINES): Add cpu-plugin.lo.
1802 (ALL_MACHINES_CFILES): Add cpu-plugin.c.
1803 (BFD32_BACKENDS): Add plugin.lo.
1804 (BFD32_BACKENDS_CFILES): Add plugin.c.
1805 (libbfd_la_LIBADD): Add LIBDL
1806 * archures.c (bfd_architecture): Add bfd_arch_plugin.
1807 (bfd_plugin_arch): Declare.
1808 * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
1809 * bfd.c (bfd): Add plugin_data.
1810 * config.bfd: Handle the plugin target.
1811 * configure.in: Check for --enable-plugins.
1812 (LT_INIT): Use the dlopen option.
1813 * cpu-plugin.c: New.
1814 * plugin.c: New.
1815 * plugin.h: New.
1816 * targets.c (plugin_vec): Declare.
1817 (_bfd_target_vector): Add plugin_vec.
1818 * Makefile.in: Regenerate.
1819 * bfd-in2.h: Regenerate.
1820 * configure: Regenerate.
1821
9e097a72
AM
18222009-05-26 Alan Modra <amodra@bigpond.net.au>
1823
1824 * dep-in.sed: Don't modify .o to .lo here. Output one filename
1825 per line with all lines having continuation backslash. Prefix
1826 first line with "A", following lines with "B".
1827 * Makefile.am (DEP): Don't use dep.sed here.
1828 (DEP1): Run $MKDEP on single files, modify .o to .lo here. Use
1829 dep.sed here on dependencies, sort and uniq.
1830 * Makefile.in: Regenerate.
1831
d5acff2f
TG
18322009-05-25 Tristan Gingold <gingold@adacore.com>
1833
1834 * makefile.vms: Add verilog.obj to object list OBJS.
1835
5c93f09b
AM
18362009-05-24 Alan Modra <amodra@bigpond.net.au>
1837
1838 * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory
1839 for BFD_IN_MEMORY is cleared.
1840 (bfd_bwrite): Zero excess memory allocated.
1841
48229727
JB
18422009-05-22 Julian Brown <julian@codesourcery.com>
1843
1844 * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
1845 macros.
1846 (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
1847 (elf32_arm_stub_a8_veneer_blx): New stub sequences.
1848 (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
1849 arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
1850 (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
1851 (a8_erratum_fix, a8_erratum_reloc): New structs.
1852 (elf32_arm_link_hash_table): Add a8_erratum_fixes,
1853 num_a8_erratum_fixes, fix_cortex_a8 fields.
1854 (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
1855 (elf32_arm_add_stub): Split into two parts, creating...
1856 (elf32_arm_create_or_find_stub_sec): New function.
1857 (elf32_arm_final_link_relocate): Add forward declaration.
1858 (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
1859 relocations, multiple relocations per stub.
1860 (find_stub_size_and_template): New (using parts of arm_size_one_stub).
1861 (arm_size_one_stub): Use find_stub_size_and_template.
1862 (a8_reloc_compare): New.
1863 (find_thumb_glue): Add forward declaration.
1864 (cortex_a8_erratum_scan): New.
1865 (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
1866 (bfd_elf32_arm_set_cortex_a8_fix): New.
1867 (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
1868 (arm_map_one_stub): Add THUMB32_TYPE support.
1869 (a8_branch_to_stub_data): New.
1870 (make_branch_to_a8_stub): New.
1871 (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
1872 * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
1873 (bfd_elf32_arm_set_target_relocs): Add argument for controlling
1874 Cortex-A8 erratum workaround.
1875 * bfd-in2.h: Regenerate.
1876
2b3decb5
AM
18772009-05-22 Alan Modra <amodra@bigpond.net.au>
1878
1879 * Makefile.am: Run "make dep-am".
1880 * Makefile.in: Regenerate.
1881 * po/SRC-POTFILES.in: Regenerate.
1882
930e005c
AM
18832009-05-21 Alan Modra <amodra@bigpond.net.au>
1884
1885 * elflink.c (elf_link_input_bfd): Correct *pindex change in last
1886 commit.
1887
6e0b88f1
AM
18882009-05-21 Alan Modra <amodra@bigpond.net.au>
1889
1890 * elf-bfd.h (struct elf_backend_data
1891 <elf_backend_link_output_symbol_hook>): Return an int.
1892 * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
1893 symbols on deleted .opd entries.
1894 * elflink.c (elf_link_output_sym): Return without outputting sym
1895 if output_symbol_hook returns 2.
1896 (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
1897 Abort if we must not discard sym.
1898 (elf_link_input_bfd): Similarly, don't set finfo->indices for
1899 local syms.
1900 (bfd_elf_final_link): Adjust elf_link_output_sym calls.
1901 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
1902 elf_backend_link_output_symbol_hook return type change.
1903 * elf32-arm.c (output_arch_syminfo): Likewise.
1904 (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
1905 (elf32_arm_output_arch_local_syms): Likewise.
1906 * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
1907 * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
1908 (bfd_score_elf_link_output_symbol_hook): Likewise.
1909 * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
1910 * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
1911 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
1912 * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
1913 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
1914 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
1915 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
1916 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
1917 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
1918 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
1919 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
1920
5ef11c02
AM
19212009-05-21 Alan Modra <amodra@bigpond.net.au>
1922
1923 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
1924 out of range .opd symbols.
1925
ebf12fbe
DK
19262009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
1927
1928 * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
1929 fprintf_vma directly.
1930 * peXXigen.c (pe_print_edata): Likewise.
1931 (pe_print_pdata): Likewise.
1932 (_bfd_XX_print_ce_compressed_pdata): Likewise.
1933 (_bfd_XX_print_private_bfd_data_common): Likewise.
1934
c1711530
DK
19352009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
1936
1937 * cofflink.c (process_embedded_commands): Ignore "-aligncomm".
1938
22a8f80e 19392009-05-15 Andrew Stubbs <ams@codesourcery.com>
164e7efc 1940 Paul Brook <paul@codesourcery.com>
22a8f80e
PB
1941
1942 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
1943 fix discarded sections.
1944
335bd8f2
UW
19452009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1946
1947 * elf32-spu.c (mark_overlay_section): Move .init and .fini
1948 sections into the software icache.
1949
cdc83fba
UW
19502009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1951
1952 * elf32-spu.c (build_stub): Always build "compact" sofware
1953 i-cache stubs.
1954
97fc8d84
UW
19552009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1956
1957 * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
1958 (spu_elf_setup): Initialize it.
1959 (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
1960 Update to new-sytle cache manager data structures.
1961 (spu_elf_build_stubs): Generate new-style cache manager data
1962 structures and symbols.
1963 (spu_elf_auto_overlay): Update size computation.
1964
452de53c
UW
19652009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1966
1967 * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
1968 segments first amongst the program headers.
1969
d342a8b1
UW
19702009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1971
1972 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
1973 into addresses for relocation types that look at high bits. Remove
1974 special handling of relocation overflow warnings.
1975
cc210763
UW
19762009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1977
1978 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
1979 control flow graph between fragments of a function.
1980
c1ea05bb
UW
19812009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1982
1983 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
1984 generate only a 16-byte .toe section.
1985 (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
1986
bbb0fc04
AM
19872009-05-14 Alan Modra <amodra@bigpond.net.au>
1988
1989 * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
1990 (spu_elf_place_overlay_data): ..here. New function.
1991 * elf32-spu.h (spu_elf_place_overlay_data): Declare.
1992
6e6718a3
AJ
19932009-05-13 Andrew Jenner <andrew@codesourcery.com>
1994
1995 * elf32-arm.c: Move sysdep.h to start of file.
1996
77ae44b0
AM
19972009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
1998
1999 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
2000 start of overlays.
2001 (spu_elf_build_stubs): Don't define __icache_tagbase. Define
2002 __icache_tag_array and __icache_tag_array_size.
2003
51408ec2
AM
20042009-05-11 Masaki Muranaka <monaka@monami-software.com>
2005
2006 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
2007 ATTRIBUTE_UNUSED.
2008 (bfinfdpic_link_omit_section_dynsym): Likewise.
2009 (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
2010
2468f9c9
PB
20112009-05-05 Paul Brook <paul@codesourcery.com>
2012
2013 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
2014 * bfd-in2.h: Regenerate.
2015 * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
2016 (_arm_elf_section_data): Add text and exidx fields.
2017 (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
2018 insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
2019 copy_exidx_entry): New functions.
2020 (elf32_arm_write_section): Fixup .ARM.exidx contents.
2021
738a79f6
CL
20222009-05-05 Christophe lyon <christophe.lyon@st.com>
2023
2024 * elf32-arm.c (DEF_STUBS): New helper define.
2025 (DEF_STUB): Likewise.
2026 (stub_def): New type.
2027 (stub_definitions): New array, containing stub template pointers
2028 and sizes.
2029 (arm_size_one_stub): Make use of stub_definitions.
2030
09e2aba4
DK
20312009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
2032
2033 * elflink.c (find_version_for_sym): Remove from here, ...
2034 * linker.c (bfd_find_version_for_sym): ... rename, replace
2035 here, make public and update all callers.
2036 * bfd-in2.h: Regenerate.
2037
d8045f23
NC
20382009-04-30 Nick Clifton <nickc@redhat.com>
2039
2040 * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
2041 section pointer.
2042 (struct elf_obj_data): Add has_ifunc_symbols boolean.
2043 * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
2044 into a STT_GNU_IFUNC symbol type.
2045 (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
2046 type.
2047 (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
2048 the binary contains ifunc symbols.
2049 * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
2050 symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
2051 * elf32-i386.c (is_indirect_function): New function.
2052 (elf_i386_check_relocs): Create an ifunc output section.
2053 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
2054 section if necessary.
2055 (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
2056 if necessary.
2057 (elf_i386_add_symbol_hook): New function. Set the
2058 has_ifunc_symbols field of the elf_obj_data structure if an ifunc
2059 symbol is encountered.
2060 (elf_backend_post_process_headers): Define.
2061 (elf_backend_add_symbol_hook): Define.
2062 (elf_i386_post_process_headers): Rename to
2063 elf_i388_fbsd_post_process_headers.
2064 * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
2065 (is_indirect_function): New function.
2066 (elf64_x86_64_check_relocs): Create an ifunc output section.
2067 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
2068 section if necessary.
2069 (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
2070 symbol if necessary.
2071 (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
2072 elf_obj_data structure if an ifunc symbol is encountered.
2073 (elf_backend_post_process_headers): Define.
2074 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
2075 if we have ifunc symbols to handle.
2076 (get_ifunc_reloc_section_name): New function. Computes the name
2077 for an ifunc section.
2078 (_bfd_elf_make_ifunc_reloc_section): New function. Creates a
2079 section to hold ifunc relocs.
2080 * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
2081 (bfd_print_symbol_vandf): Handle ifunc symbols.
2082 (bfd_decode_symclass): Likewise.
2083 * bfd-in2.h: Regenerate.
2084
96c23d59
JM
20852009-04-30 Joseph Myers <joseph@codesourcery.com>
2086
2087 * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
2088 MOVW and MOVT relocations in a shared library link.
2089
c067354b
NC
20902009-04-27 Anthony Green <green@moxielogic.com>
2091
2092 * verilog.c: New file.
2093 * Makefile.am (BFD32_LIBS): Add verilog.c.
2094 (BFD32_LIBS_CFILES): Add verilog.c.
2095 (verilog.lo): New build rule.
2096 * Makefile.in: Rebuilt.
2097 * targets.c: Add verilog support.
2098 * bfd.c (tdata union): Add Verilog private data field.
2099 * bfd-in2.h: Regenerate.
2100
325c681d
L
21012009-04-27 H.J. Lu <hongjiu.lu@intel.com>
2102
2103 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
2104 copy pe_opthdr.
2105
ba775898
DK
21062009-04-23 Matthias Klose <doko@ubuntu.com>
2107
2e28a5fc 2108 * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
ba775898 2109
155d87d7
CL
21102009-04-22 Christophe Lyon <christophe.lyon@st.com>
2111
2112 PR9743
2113 * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
2114 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
2115 (elf32_arm_size_stubs): Likewise.
2116 (record_thumb_to_arm_glue): Deleted unused function.
2117 (bfd_elf32_arm_process_before_allocation): No longer handle
2118 R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
2119 (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
2120 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
2121
3e6b1042
DJ
21222009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
2123
2124 * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
2125 (elf32_arm_write_section): Declare early.
2126 (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
2127 (arm_allocate_glue_section_space): Exclude empty sections.
2128 (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
2129 (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
2130 BFD.
2131 (elf32_arm_output_glue_section, elf32_arm_final_link): New.
2132 (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
2133 (elf32_arm_size_dynamic_sections): Allocate interworking
2134 sections here.
2135 (bfd_elf32_bfd_final_link): Define.
2136
4f360784
L
21372009-04-21 H.J. Lu <hongjiu.lu@intel.com>
2138
2139 * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
154a1ee5 2140
4f360784
L
2141 * coffcode.h (coff_compute_section_file_positions): Clear
2142 D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
2143
2144 * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
2145 force_minimum_alignment.
2146
2147 * libcoff.h: Regenerated.
2148
2149 * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
2150 (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
2151
2152 * peicode.h (pe_mkobject): Don't set force_minimum_alignment
2153 nor target_subsystem.
2154
2155 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
2156 force_minimum_alignment nor target_subsystem.
2157
e48570bb
DK
21582009-04-21 Kai Tietz <kai.tietz@onevision.com>
2159
2160 * coff-x86_64.c (PEI_HEADERS): Protect includes.
2161 (bfd_pe_print_pdata): Remove #ifdef PE variation.
2162 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
2163 include in coff-x86_64.c of headers.
2164 (PDATA_ROW_SIZE): New define.
2165 (pex_regs[]): New static array.
2166 (pex64_get_runtime_function): New static function.
2167 (pex64_get_unwind_info): Likewise.
2168 (pex64_get_scope_entry): Likewise.
2169 (pex64_xdata_print_uwd_codes): Likewise.
2170 (pex64_get_section_by_rva): Likewise.
2171 (pex64_dump_xdata): Likewise.
2172 (pex64_bfd_print_pdata): Likewise.
2173 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
2174 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
2175 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
2176
383c383f 21772009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
4f360784
L
2178 Alan Modra <amodra@bigpond.net.au>
2179 Dave Korn <dave.korn.cygwin@gmail.com>
383c383f
AM
2180
2181 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
2182 long names and non-NUL-terminated strings.
2183
b6b450f1
L
21842009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2185
2186 * bfd-in2.h: Regenerated.
2187
d9118602
L
21882009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2189
2190 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
2191 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
2192
92dd4511
L
21932009-04-17 H.J. Lu <hongjiu.lu@intel.com>
2194
2195 PR binutils/10074
2196 * coffcode.h (bfd_pei_p): New.
2197
2198 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
2199 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
2200 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
2201 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
2202 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
2203 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
2204
2205 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
2206 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
2207 bfd_efi_rtdrv_x86_64_vec,
2208 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
2209 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
2210 * targets.c: Likewise.
2211
2212 * configure: Regenerated.
2213 * libcoff.h: Likewise.
2214 * Makefile.in: Likewise.
2215
2216 * efi-app-ia32.c: Removed.
2217 * efi-app-x86_64.c: Likewise.
2218 * efi-bsdrv-ia32.c: Likewise.
2219 * efi-bsdrv-ia64.c: Likewise.
2220 * efi-bsdrv-x86_64.c: Likewise.
2221 * efi-rtdrv-ia32.c: Likewise.
2222 * efi-rtdrv-ia64.c: Likewise.
2223 * efi-rtdrv-x86_64.c: Likewise.
2224 * efi-rtdrv-ia32.c: Likewise.
2225
2226 * efi-app-ia64.c: Moved to ...
2227 * pei-ia64.c: This.
2228 (TARGET_SYM): Set to bfd_pei_ia64_vec.
2229 (TARGET_NAME): Set to pei-ia64.
2230
2231 * libpei.h (bfd_target_pei_p): Removed.
2232 (bfd_target_pei_arch): Likewise.
2233 (bfd_target_efi_app_p): Likewise.
2234 (bfd_target_efi_app_arch): Likewise.
2235 (bfd_target_efi_bsdrv_p): Likewise.
2236 (bfd_target_efi_bsdrv_arch): Likewise.
2237 (bfd_target_efi_rtdrv_p): Likewise.
2238 (bfd_target_efi_rtdrv_arch): Likewise.
2239 (bfd_pe_executable_p): Likewise.
2240
2241 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
2242 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
2243 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
2244 and efi-rtdrv-ia32.c.
2245 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
2246 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
2247 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
2248 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
2249 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
2250 efi-rtdrv-x86_64.c. Add pei-ia64.c.
2251 (efi-app-ia64.lo): Removed.
2252 (efi-bsdrv-ia32.lo): Likewise.
2253 (efi-rtdrv-ia32.lo): Likewise.
2254 (efi-app-ia64.lo): Likewise.
2255 (efi-bsdrv-ia64.lo): Likewise.
2256 (efi-rtdrv-ia64.lo): Likewise.
2257 (efi-app-x86_64.lo): Likewise.
2258 (efi-bsdrv-x86_64.lo): Likewise.
2259 (efi-rtdrv-x86_64.lo): Likewise.
2260 (pei-ia64.lo): New.
2261
2262 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
2263 with bfd_pei_p.
2264 (arch_type): Removed.
2265 (pe_arch): Likewise.
2266 (pe_bfd_object_p): Just return coff_object_p.
2267
2268 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
2269 bfd_pe_executable_p with bfd_pei_p.
2270
69c5861e
CL
22712009-04-17 Christophe Lyon <christophe.lyon@st.com>
2272
2273 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
2274 PLT entries to an undefined symbol when generating a shared
2275 library.
2276
e9cd0660
NC
22772009-04-17 Nick Clifton <nickc@redhat.com>
2278
2279 PR 9909
2280 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
2281
3023e3f6
RS
22822009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
2283
2284 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
2285 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
2286 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
2287 * binary.c (binary_bfd_define_common_symbol): Likewise.
2288 * bout.c (b_out_bfd_define_common_symbol): Likewise.
2289 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
2290 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
2291 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
2292 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
2293 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
2294 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
2295 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
2296 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
2297 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
2298 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
2299 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
2300 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
2301 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
2302 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
2303 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
2304 * som.c (som_bfd_define_common_symbol): Likewise.
2305 * srec.c (srec_bfd_define_common_symbol): Likewise.
2306 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
2307 * versados.c (versados_bfd_define_common_symbol): Likewise.
2308 * vms.c (vms_bfd_define_common_symbol): Likewise.
2309 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
2310 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
2311 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
2312 (pmac_xcoff_vec): Likewise.
2313 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2314 (aix5coff64_vec): Likewise.
2315 * linker.c (bfd_generic_define_common_symbol): New function.
2316 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
2317 (_bfd_define_common_symbol): New field.
2318 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
2319 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
2320 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
2321 symbols here.
2322 * bfd-in2.h: Regenerate.
2323 * libbfd.h: Likewise.
2324 * libcoff.h: Likewise.
2325
20135e4c
NC
23262009-04-15 Anthony Green <green@moxielogic.com>
2327
2328 * targets.c: Add moxie support.
2329 * Makefile.am: Ditto.
2330 * Makefile.in: Rebuilt.
2331 * cpu-moxie.c, elf32-moxie.c: New files.
2332 * archures.c: Add moxie support.
2333 * configure.in: Add moxie support.
2334 * configure: Rebuilt.
2335 * config.bfd, archures.c: Add moxie support.
2336 * bfd-in2.h: Rebuilt.
2337
82b5c97a
CL
23382009-04-15 Christophe Lyon <christophe.lyon@st.com>
2339
2340 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
2341 branch to an undef weak symbol into a jump to next instruction if
2342 a PLT entry will be created.
2343
0408dee6
DK
23442009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
2345
2346 * coffgen.c (make_a_section_from_file): Set the backend long
2347 section names enable if long section names found on input.
2348 * coffcode.h: Extend long section names documentation to match.
2349
a0c402a5
L
23502009-04-08 H.J. Lu <hongjiu.lu@intel.com>
2351
2352 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
2353 machine code.
2354
4d28413b
DD
23552009-04-07 DJ Delorie <dj@redhat.com>
2356
2357 * archures.c: Add bfd_mach_mep_c5.
2358 * bfd-in2.h: Likewise.
2359 * cpu-mep.c: Add bfd_c5_arch.
2360 * elf32-mep.c: Support it.
2361
bb6198d2
L
23622009-04-07 H.J. Lu <hongjiu.lu@intel.com>
2363
2364 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
2365 info->callbacks->einfo.
2366 * linker.c (_bfd_generic_section_already_linked): Likewise.
2367
bcb012d3
DD
23682009-04-06 DJ Delorie <dj@redhat.com>
2369
2370 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
2371
db1fe6e9
L
23722009-04-06 H.J. Lu <hongjiu.lu@intel.com>
2373
2374 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
2375 _bfd_pex64_print_pdata only if PE is defined.
2376
2377 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
2378 (_bfd_pex64_print_pdata): This.
2379
2380 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
2381 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
2382 is defined.
2383
c7c7219d
KT
23842009-04-05 Kai Tietz <kai.tietz@onevision.com>
2385
2386 * coff-x86_64.c (bfd_pe_print_pdata): Define as
2387 _bfd_pep_print_x64_pdata.
2388 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
2389 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
2390
3df502ae
SA
23912009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
2392
154a1ee5 2393 * elf32-xtensa.c (relax_property_section): Always set r_offset
3df502ae
SA
2394 to zero.
2395
d3626fb0
CL
23962009-04-02 Christophe Lyon <christophe.lyon@st.com>
2397
2398 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
2399 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
2400 branch stubs.
2401 (elf32_arm_stub_type): New enum values for the two new stubs.
2402 (arm_type_of_stub): Make use of the two new stubs.
2403 (arm_size_one_stub): Handle the two new stubs.
2404
fe723c87
MT
24052009-04-01 Matt Thomas <matt@netbsd.org>
2406
2407 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
2408 hidden symbols into the GOT or PLT.GOT.
154a1ee5 2409 (elf_vax_relocate_section): Do not emit a PCREL reloc
fe723c87
MT
2410 into a shared object if it is against a hidden symbol.
2411
ee698300
RS
24122009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2413
2414 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
2415 and know_contains_shared_object_p.
2416 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
2417 Cache the result in the archive_info table.
2418 (xcoff_auto_export_p): Add an "info" parameter and update the
2419 call to xcoff_archive_contains_shared_object_p.
2420 (xcoff_mark_auto_exports): Update accordingly.
2421 (xcoff_post_gc_symbol): Likewise.
2422
54e2dbe0
RS
24232009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2424
2425 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
2426 rather than C_EXT.
2427
2e470849
RS
24282009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2429
2430 * coff-rs6000.c (member_layout): New structure.
2431 (archive_iterator): Likewise.
2432 (member_layout_init): New function.
2433 (archive_iterator_begin): Likewise.
2434 (archive_iterator_next): Likewise.
2435 (xcoff_write_armap_old): Use the new iterator functions.
2436 (do_shared_object_padding): Delete.
2437 (xcoff_write_armap_big): Use the new iterator functions. Simplify
2438 handling of arch_info.
2439 (xcoff_write_archive_contents_old): Allocate arelt_data in the
2440 first loop rather than the second. Allocate a member header if
2441 there isn't one, then work out the stat information and length
2442 in the first loop too. Use the new iterators for the second loop.
2443 (xcoff_write_archive_contents_big): Likewise.
2444
24c611d1
RS
24452009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2446
2447 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
2448 (bfd_xcoff_set_archive_import_path): Likewise.
2449 * bfd-in2.h: Regenerate.
2450 * xcofflink.c: Include libiberty.h.
2451 (xcoff_archive_info): New structure.
2452 (xcoff_archive_info_hash): New function.
2453 (xcoff_archive_info_eq): Likewise.
2454 (xcoff_get_archive_info): Likewise.
2455 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
2456 (bfd_xcoff_split_import_path): New function.
2457 (bfd_xcoff_set_archive_import_path): Likewise.
2458 (xcoff_set_import_path): Move earlier in file.
2459 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
2460 object to the the directory part of the bfd's filename. Get the
2461 import path and filename of an archive object from the archive's
2462 xcoff_tdata, initializing it if necessary. Update use of
2463 import_file_id.
2464 (bfd_link_input_bfd): Update use of import_file_id.
2465 (xcoff_write_global_symbol): Likewise.
2466
d286971a
RS
24672009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2468
2469 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
2470
24712009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2472
2473 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
2474 a .loader section for relocatable links.
2475 (xcoff_need_ldrel_p): New function.
2476 (xcoff_mark): Use it.
2477 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
2478 a loader section.
2479 (xcoff_build_ldsym): New function, split out from...
2480 (xcoff_build_ldsyms): ...here. Rename to...
2481 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
2482 call xcoff_build_ldsym, if there's a loader section.
2483 (xcoff_build_loader_section): New function, extracted verbatim from...
2484 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
2485 there's a loader section. Only add an __rtinit loader symbol
2486 if there's a loader section. Update after above name change.
2487 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
2488 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
2489 and xcoff_create_ldrel.
2490 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
2491 (xcoff_reloc_link_order): Likewise, but only call it if there's
2492 a loader section. Use xcoff_symbol_section.
2493 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
2494 if there's a loader section.
2495
8707bb87
RS
24962009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
2497
2498 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
2499
e780aef2
CL
25002009-04-01 Christophe Lyon <christophe.lyon@st.com>
2501
2502 * elf32-arm.c (group_sections): Rewrite loops for better
2503 readability.
2504
c301e700
DD
25052009-03-30 DJ Delorie <dj@redhat.com>
2506
2507 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
2508 relocs when doing a relocatable link.
2509
3895f852
MM
25102009-03-28 Mark Mitchell <mark@codesourcery.com>
2511
2512 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
2513 "ERROR:", in error messages.
2514 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
2515 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
2516 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
2517 (elf32_arm_merge_eabi_attributes): Likewise.
2518 (elf32_arm_merge_private_bfd_data): Likewise.
2519
ea882e87
NC
25202009-03-27 Nick Clifton <nickc@redhat.com>
2521
2522 * section.c (bfd_get_section_contents): Detect and handle the case
2523 where a section has the SEC_IN_MEMORY flag set but no actual
2524 contents allocated.
2525
9433b9b1
AM
25262009-03-26 Alan Modra <amodra@bigpond.net.au>
2527
2528 PR 6494
2529 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
2530 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
2531 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
2532 if we don't find matching PT_LOAD when copying.
2533
dc1aa734
SR
25342009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
2535
2536 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
2537 the reloc descriptions.
2538
34d3d6b9
HPN
25392009-03-25 Hans-Peter Nilsson <hp@axis.com>
2540
2541 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2542 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
2543 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
2544
34274ccc
L
25452009-03-24 H.J. Lu <hongjiu.lu@intel.com>
2546
2547 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
2548 (bfd_i386_arch_intel_syntax): Likewise.
2549 (i8086_arch): Likewise.
2550 (bfd_x86_64_arch): Likewise.
2551
019c5a2e
HPN
25522009-03-24 Hans-Peter Nilsson <hp@axis.com>
2553
6718f446
HPN
2554 * elf32-cris.c (cris_elf_relocate_section): <case
2555 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
2556 symbols for non-allocated sections. Don't check whether to
2557 generate R_CRIS_DTPMOD for non-allocated sections.
2558 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
2559 handle relocation GC:ing if applied to non-allocated section.
2560 (cris_elf_check_relocs): Similar.
2561
019c5a2e
HPN
2562 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
2563 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
2564 when emitting a known TP offset in the GOT.
2565
ffcfec52
AM
25662009-03-23 Alan Modra <amodra@bigpond.net.au>
2567
2568 * elf64-ppc.c (synthetic_opd): Delete.
2569 (compare_symbols): Look for .opd name rather than section match.
2570 (ppc64_elf_get_synthetic_symtab): Likewise.
2571
c6dd29ce
AM
25722009-03-21 Alan Modra <amodra@bigpond.net.au>
2573
2574 * elf32-ppc.c (is_pic_glink_stub): Delete.
2575 (is_nonpic_glink_stub): New function.
2576 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
2577 than first pic one.
2578 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
2579
8c21ca21
AK
25802009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
2581 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
2582
2583 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
4f360784 2584 macros for visibilty and locality checks.
8c21ca21
AK
2585 (elf_s390_adjust_dynamic_symbol): Likewise.
2586 (allocate_dynrelocs): Likewise.
2587 (elf_s390_relocate_section): Likewise.
2588 (elf_s390_finish_dynamic_symbol): Likewise.
2589 * elf64-s390.c (elf_s390_check_relocs): Likewise.
2590 (elf_s390_adjust_dynamic_symbol): Likewise.
2591 (allocate_dynrelocs): Likewise.
2592 (elf_s390_relocate_section): Likewise.
2593 (elf_s390_finish_dynamic_symbol): Likewise.
2594
156621f3
KT
25952009-03-19 Kai Tietz <kai.tietz@onevision.com>
2596
2597 * bfd-in2.h: Regenerated.
2598 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
2599 for debugging sections and map memory read/write dependent on
2600 SEC_COFF_NOREAD.
2601 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
2602 without memory read flags set.
2603 * section.c: Add SEC_COFF_NOREAD to section flags.
2604
d1fa68d3
AS
26052009-03-19 Andreas Schwab <schwab@linux-m68k.org>
2606
2607 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
2608 for format string.
2609
ad2adbc8
AM
26102009-03-19 Alan Modra <amodra@bigpond.net.au>
2611
2612 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
2613 "no overlays" return. If there are overlays, create overlay
2614 manager entry symbols here, so that..
2615 (spu_elf_build_stubs): ..we don't need to set them up here.
2616 Simplify entry symbol tests.
2617 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
2618
67cc5033
MK
26192009-03-18 Mark Kettenis <kettenis@gnu.org>
2620
d1fa68d3 2621 * elf.c (elfcore_grok_openbsd_procinfo)
67cc5033
MK
2622 (elfcore_grok_openbsd_note): New functions.
2623 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
2624
8d25cc3d
AM
26252009-03-18 Alan Modra <amodra@bigpond.net.au>
2626
3889c459 2627 * vms-hdr.c: Don't include alloca.h.
8d25cc3d
AM
2628 * elf32-m68hc1x.c: Include alloca-conf.h.
2629 * xsym.c: Likewise.
2630 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
2631 * som.c: Likewise.
2632 * Makefile.am: Run "make dep-am".
2633 * Makefile.in: Regenerate.
2634
a89e6478
DJ
26352009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
2636
2637 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
2638
a7e11ee1
AM
26392009-03-17 Alan Modra <amodra@bigpond.net.au>
2640
2641 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
2642 Add compact_stub.
2643 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
2644 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
2645 ovly_return fields with ovly_entry[2]. Adjust all users.
2646 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
2647 when soft-icache.
2648 (spu_elf_build_stubs): Likewise.
2649 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
2650 ovly_flavour changes. Update all callers.
2651 (ovl_stub_size_log2): New function.
2652 (build_stub): Handle compact icache stubs. Use different manager
2653 entry point for stubs in non-icache area.
2654 (spu_elf_size_stubs): Don't allocate space for indirect branch
2655 descriptors.
2656 (spu_elf_build_stubs): And don't built them.
2657
607a83c9
AS
26582009-03-16 Andrew Stubbs <ams@codesourcery.com>
2659
2660 * dwarf2.c (read_section): Always use rawsize, if available.
2661
588f62fc
AM
26622009-03-16 Alan Modra <amodra@bigpond.net.au>
2663
2664 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
2665 of rawsize and size for buffer.
2666
a14c90c1
UW
26672009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
2668
2669 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
2670 parameter just because fixed sections fit into local store.
2671 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
2672 generating overlays if fixed sections plus reserved stack
2673 and heap space fit into local store.
2674
30c665df
AM
26752009-03-15 Alan Modra <amodra@bigpond.net.au>
2676
2677 * elf32-spu.c (build_stub): Correct icache set_id.
2678 (spu_elf_relocate_section): Likewise.
2679
f95942a3
RS
26802009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2681
2682 * xcofflink.c (xcoff_link_check_archive_element): Only free the
2683 symbol table if it was created by the current call.
2684
670562e9
RS
26852009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2686
2687 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
2688 class XMC_DS rather than XMC_UA.
2689
b64232cc
RS
26902009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2691
2692 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
2693 bfd_boolean export_defineds parameter with an unsigned int
2694 auto_export_flags parameter.
2695 * bfd-in2.h: Regenerate.
2696 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
2697 split out from xcoff_build_ldsyms.
2698 (xcoff_covered_by_expall_p): New function.
2699 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
2700 but with extra code to handle -bexpfull and -bexpall.
2701 (xcoff_mark_auto_exports): New function.
2702 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
2703 a function should be automatically exported.
2704 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
2705 parameter with an auto_export_flags parameter. Update ldinfo
2706 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
2707 exported symbols.
2708
7d504122
RS
27092009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2710
2711 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
2712 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
2713 init and fini functions. Do garbage collection for objects
2714 without an entry point too.
2715
8602d4fe
RS
27162009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2717
2718 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
2719 check whether a symbol has csect information.
2720 (coff_print_aux): Likewise.
2721 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
2722 information for C_AIX_WEAKEXT too.
2723 (_bfd_xcoff_swap_aux_out): Likewise.
2724 (xcoff_reloc_type_br): Handle defweak symbols too.
2725 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
2726 information for C_AIX_WEAKEXT too.
2727 (_bfd_xcoff64_swap_aux_out): Likewise.
2728 (xcoff64_reloc_type_br): Handle defweak symbols too.
2729 * coffgen.c (coff_print_symbol): Handle auxillary function
2730 information for C_AIX_WEAKEXT too.
2731 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
2732 instead of BSF_GLOBAL if the L_WEAK flag is set.
2733 (xcoff_dynamic_definition_p): New function.
2734 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
2735 defines h. Don't change h if ldsym isn't the definition. Otherwise,
2736 always take the symbol class from the ldsym. Use weak bfd symbol
2737 types for weak ldsyms.
2738 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
2739 Fix the check for whether a definition is from a shared object.
2740 Allow redefinitions of weak symbols.
2741 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
2742 (xcoff_keep_symbol_p): Likewise.
2743 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
2744 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
2745 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
2746 but mark them as L_WEAK.
2747 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
2748 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
2749
5b49f6dc
RS
27502009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2751
2752 * xcofflink.c (xcoff_mark): When walking the relocations,
2753 only mark the target symbol or the target section, not both.
2754 (xcoff_final_definition_p): New function.
2755 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
2756 symbol is a valid definition of the associated output symbol.
2757 Use XCOFF_ALLOCATED to stop the same hash table entry having
2758 two output symbols.
2759 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
2760 keeping a symbol.
2761 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
2762
c4037431
RS
27632009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2764
2765 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
2766 symbols as XMC_XO.
2767
3df13c4a
RS
27682009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2769
2770 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
2771 * libcoff.h: Regenerate.
2772 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
2773 line-number counts in the bfd's lineno_counts field.
2774 Don't keep per-csect line-number counts.
2775 (xcoff_sweep): Don't update per-csect line-number counts.
2776 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
2777 entries in each output section.
2778 (xcoff_link_input_bfd): Get the number of line numbers from
2779 the bfd's lineno_counts field, rather than recalculating it
2780 from scratch. Fix the range check when updating C_BINCL and
2781 C_EINCL symbols.
2782 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
2783 here. Don't expect csects to have line-number counts.
2784
e450936a
RS
27852009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2786
2787 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
2788 * libcoff.h: Regenerate.
2789 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
2790 "skip" logic from xcoff_link_input_bfd.
2791 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
2792 objects in a dynamic link, rather than checking whether csectpp
2793 is null. Always allocate debug_index for other objects,
2794 and always go through the loop. Update the type of debug_index
2795 after the change above. Read the auxillary csect information
2796 and use xcoff_keep_symbol_p to decide whether a symbol should
2797 be kept. Set its debug_index to -2 if not.
2798 (xcoff_link_input_bfd): Update the type of debug_index after
2799 the change above and always expect it to be nonnull. Use it to
2800 test whether a symbol should be stripped, rather than making the
2801 decision here. Postpone all symbol creation to the second pass.
2802
47dfb2ca
RS
28032009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2804
2805 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
2806 creating a descriptor.
2807 (xcoff_sweep): Don't mark toc_section unless it's needed.
2808 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
2809 when marking every bfd.
2810 (xcoff_link_input_bfd): Skip all TOC anchors.
2811 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
2812 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
2813 to -1; call xcoff_find_tc0 instead.
2814
4cc02a02
RS
28152009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2816
2817 * libcoff-in.h (xcoff_section_tdata): Update commentary.
2818 * libcoff.h: Regenerate.
2819 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
2820 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
2821 the previous symbol's csect. Treat last_symndx as an inclusive value
2822 and simplify its handling.
2823 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
2824 symbols with the right csect. Don't mark rsec when processing
d1fa68d3 2825 relocations against undefined or absolute sections.
4cc02a02
RS
2826 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
2827 of bfd_und_section_ptr.
2828 (xcoff_link_input_bfd): Likewise.
2829
858ef0ce
RS
28302009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2831
2832 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
2833 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
2834 flag is set. Assert that all undefined symbols are either
2835 imported or defined by a dynamic object.
2836 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
2837 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
2838 handling to all relocations. Only set XCOFF_CALLED for function
2839 symbols.
2840 (xcoff_find_function): New function, split out from...
2841 (bfd_xcoff_export_symbol) ...here.
2842 (xcoff_set_import_path): New function, split out from...
2843 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
2844 meaning of XCOFF_CALLED.
2845 (xcoff_mark_symbol): If we mark an undefined and unimported
2846 symbol, find some way of defining it. If the symbol is a function
2847 descriptor, fill in its definition automatically. If the symbol
2848 is a function, mark its descriptor and allocate room for global
2849 linkage code. Otherwise mark the symbol as implicitly imported.
2850 Move the code for creating function descriptors from...
d1fa68d3 2851 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
858ef0ce
RS
2852 check for symbols that were implicitly defined.
2853 (xcoff_mark): Don't count any dynamic relocations against
2854 function symbols.
2855 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
2856 in the xcoff link info.
2857 (xcoff_link_input_bfd): Remove handling of undefined and
2858 unexported symbols.
2859
12b2cce9
RS
28602009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2861
2862 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
2863 if the target is absolute. Fix comment typo.
2864 (xcoff_ppc_relocate_section): Remove FIXME.
2865 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
2866 if the target is absolute.
2867
0e3212ad
RS
28682009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2869
2870 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
2871 R_POS and R_NEG relocations against absolute symbols to the
2872 .loader section.
2873
d19d97e9
RS
28742009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2875
2876 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
2877 to 2 for bfd_mach_ppc_620.
2878
e5231592
RS
28792009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
2880
2881 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
2882 * configure.in: Likewise.
2883 * configure: Regenerate.
2884
3516e984
L
28852009-03-13 H.J. Lu <hongjiu.lu@intel.com>
2886
2887 PR binutils/9945
2888 * elf.c (assign_section_numbers): Generate symbol table if there
2889 is any relocation in output.
2890 (_bfd_elf_compute_section_file_positions): Likewise.
2891
ce98a316
NC
28922009-03-13 Nick Clifton <nickc@redhat.com>
2893
2894 PR 9934
2895 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
2896 * elflink.c (elf_link_read_relocs_from_section): Use
2897 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
2898 relocs but no symbol table.
2899 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
2900
c4fb387b
L
29012009-03-12 H.J. Lu <hongjiu.lu@intel.com>
2902
2903 PR ld/9938
2904 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
2905 to check ___tls_get_addr.
2906
2907 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
2908 strncmp to check __tls_get_addr.
2909
53638231
AS
29102009-03-12 Andrew Stubbs <ams@codesourcery.com>
2911
2912 * dwarf2.c (read_section): Always check the offset, even when the
2913 section has been read before.
2914
09e8c3bf
L
29152009-03-11 H.J. Lu <hongjiu.lu@intel.com>
2916
2917 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
2918 comments.
2919
36e4dce6
CD
29202009-03-11 Chris Demetriou <cgd@google.com>
2921
2922 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
2923 * bfd-in2.h: Regenerate.
2924 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
2925 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
2926 mode.
2927 (bsd_write_armap): Likewise.
2928 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
2929 flag is set, do nothing.
2930 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
2931 for timestamp.
2932
9b175a76
UW
29332009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
2934
2935 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
2936 used to update stack pointer.
2937
f501de17
DA
29382009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
2939
2940 PR binutils/9921
2941 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
2942 for unknown symbols in absolute section.
2943
d11fd249
NC
29442009-03-06 Nick Clifton <nickc@redhat.com>
2945
2946 * po/es.po: Updated Spanish translation.
2947
8cd931b7
CL
29482009-03-05 Christophe Lyon <christophe.lyon@st.com>
2949
2950 * elf32-arm.c (group_sections): Take next section size into
2951 account before accepting to group it.
2952
5fa9e92f
CL
29532009-03-05 Christophe Lyon <christophe.lyon@st.com>
2954
2955 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
2956 PLT entries.
2957 (elf32_arm_final_link_relocate): Likewise.
2958
b92997d6
AM
29592009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
2960
2961 PR 9923
2962 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
2963
727fc41e
AM
29642009-03-04 Alan Modra <amodra@bigpond.net.au>
2965
2966 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
2967 * section.c (struct bfd_section): Add has_tls_get_addr_call.
2968 (BFD_FAKE_SECTION): Init new flag.
2969 * ecoff.c (bfd_debug_section): Likewise.
2970 * bfd-in2.h: Regenerate.
2971 * libbfd.h: Regenerate.
2972 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
2973 (ppc_elf_reloc_type_lookup): Handle new relocs.
2974 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
2975 without marker relocs.
2976 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
2977 if section has no old-style calls.
2978 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
2979 Don't try to optimize new-style __tls_get_addr call when handling
2980 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
2981 relocs.
2982 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
2983 (ppc64_elf_reloc_type_lookup): Handle new relocs.
2984 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
2985 without marker relocs.
2986 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
2987 if section has no old-style calls. Set toc_ref for new relocs as
2988 appropriate.
2989 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
2990 Don't try to optimize new-style __tls_get_addr call when handling
2991 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
2992 relocs.
2993
51dec227
AM
29942009-03-04 Alan Modra <amodra@bigpond.net.au>
2995
2996 PR 6768
2997 * configure.in: Test for ld --as-needed support. Link shared
2998 libbfd against libm.
2999 * configure: Regenerate.
3000
a1f7ca36
AM
30012009-03-03 Alan Modra <amodra@bigpond.net.au>
3002
3003 * Makefile.am: Run "make dep-am".
3004 * Makefile.in: Regenerate.
3005
c3b7224a
NC
30062009-03-02 Qinwei <qinwei@sunnorth.com.cn>
3007
3008 * elf32-score7.c: New file.
3009 * elf32-score.h: New file.
3010 * elf32-score.c: Add code to support score 7. Set score7 as the
3011 default.
3012 * cpu-score.c: Add score7 architecure.
3013 (compatibile): New function.
3014 * Makefile.am: Add rules for building elf32-score7 object.
3015 * Makefile.in: Regenerate.
3016 * configure.in: Add elf32-score7 object to score vectors.
3017 * configure: Regenerate.
3018 * reloc.c: Add score7 relocs.
3019 * archures.c: Add score3 and score7 machine numbers.
3020 * bfd-in2.h: Regenerate.
3021 * libbfd.h: Regenerate.
3022
58e24671
RW
30232009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3024
3025 * configure: Regenerate.
3026
5887528b
DA
30272009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3028
d45b7d74
DA
3029 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
3030 (elf32_hppa_check_relocs): Use it.
3031
5887528b
DA
3032 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
3033 elf64-hppa.c.
3034 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
3035 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
3036 (elf_hppa_is_dynamic_loader_symbol): Likewise.
3037 (elf_hppa_record_segment_addrs): Likewise.
3038 (elf_hppa_final_link): Likewise.
3039 (elf_hppa_relocate_insn): Likewise.
3040 (elf_hppa_final_link_relocate): Likewise.
3041 (elf64_hppa_relocate_section): Likewise.
3042 * elf64-hppa.c: Insert above.
3043
a03bd320
DA
30442009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3045
3046 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
3047 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
3048 (elf_hppa_relocate_section): Likewise.
3049 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
3050 from struct elf_link_hash_entry. Add count field.
3051 (struct elf64_hppa_dyn_hash_table): Delete.
3052 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
3053 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
3054 (hppa_elf_hash_entry, eh_name): Define.
3055 (elf64_hppa_new_dyn_hash_entry): Delete.
3056 (elf64_hppa_dyn_hash_lookup): Delete.
3057 (elf64_hppa_dyn_hash_traverse): Delete.
3058 (get_dyn_name): Delete.
3059 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
3060 of struct elf64_hppa_dyn_hash_entry *.
3061 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
3062 allocate_global_data_plt, allocate_global_data_stub,
3063 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
3064 Likewise.
3065 (hppa64_link_hash_newfunc): New.
3066 (elf64_hppa_hash_table_create): Rework.
3067 (count_dyn_reloc): Likewise.
3068 (hppa64_elf_local_refcounts): New.
3069 (elf64_hppa_check_relocs): Rework using standard technique for recording
3070 local DLT, PLT and OPD reference counts.
3071 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
3072 elf_link_hash_entry *.
3073 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
3074 allocate_global_data_plt, allocate_global_data_stub,
3075 allocate_global_data_opd, allocate_dynrel_entries,
3076 elf64_hppa_adjust_dynamic_symbol,
3077 elf64_hppa_mark_milli_and_exported_functions): Likewise.
3078 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
3079 Use hppa_link_hash_table. Rework.
3080 (elf64_hppa_link_output_symbol_hook): Rework.
3081 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
3082 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
3083 elf64_hppa_finish_dynamic_sections): Likewise.
3084
ebe24dd4
CL
30852009-02-26 Christophe Lyon <christophe.lyon@st.com>
3086
3087 * elf32-arm.c (stub_reloc_type): Removed.
3088 (insn_sequence): Renamed reloc_type field to r_type.
3089 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
3090 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
3091 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
3092 (elf32_arm_stub_type): Add new enum entries for the new stubs.
3093 (arm_stub_is_thumb): Catch new stubs.
3094 (arm_type_of_stub): Handle new stubs.
3095 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
3096 (bfd_elf32_arm_process_before_allocation): Remove useless
3097 condition.
3098
b9d678e0
L
30992009-02-25 H.J. Lu <hongjiu.lu@intel.com>
3100
3101 * elf.c (elf_find_function): Use is_function_type to check
3102 function symbol.
3103
56fb3749
SA
31042009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
3105
3106 * xtensa-modules.c: Revert to previous version 1.11 due
3107 to inadvertant commit.
3108
658ff993
SA
31092009-02-24 Sterling Augustine <sterling@tensilica.com>
3110
3111 * elf32-xtensa.c (text_action_add): Separate test for action
3112 type. Break if saved action is ta_widen_insn at same offset.
3113
cf3eccff
DJ
31142009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
3115
3116 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
3117 to elf32_arm_stub_long_branch_any_arm_pic.
3118 (elf32_arm_stub_long_branch_any_thumb_pic): New.
3119 (enum elf32_arm_stub_type, arm_type_of_stub)
3120 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
3121 separately.
3122
07d72278
DJ
31232009-02-24 Joseph Myers <joseph@codesourcery.com>
3124
3125 * elf32-arm.c (PREV_SEC): Update comment.
3126 (group_sections): Rename argument to stubs_always_after_branch.
3127 Reverse the list and place stubs at the end of input sections.
3128 Undefine NEXT_SEC.
3129 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
3130
4e31c731
DJ
31312009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
3132
3133 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
3134 Fix formatting.
3135 (arm_size_one_stub): Remove unnecessary break.
3136 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
3137
31382009-02-23 Christophe Lyon <christophe.lyon@st.com>
461a49ca
DJ
3139
3140 * elf32-arm.c (stub_insn_type): New type.
3141 (stub_reloc_type): Likewise.
3142 (insn_sequence): Likewise.
3143 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
3144 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
3145 (elf32_arm_stub_long_branch_thumb_only): Likewise.
3146 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
3147 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
3148 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
3149 (elf32_arm_stub_hash_entry): Add new helper fields.
3150 (stub_hash_newfunc): Initialize these new fields.
3151 (arm_build_one_stub): Encode Arm and Thumb instructions separately
3152 to take endianness into account.
3153 (arm_size_one_stub): Compute size of stubs using insn_sequence.
3154 (arm_map_one_stub): Code is now more generic, thanks to
3155 insn_sequence.
3156
c2b4a39d
CL
31572009-02-23 Christophe Lyon <christophe.lyon@st.com>
3158
3159 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
3160 code.
3161 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
3162 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
3163 BLX is not available. Fix typo in warning message. Add comments
3164 and improve formatting.
3165 (arm_build_one_stub): Adjust to new
3166 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
3167 (arm_map_one_stub): Likewise.
3168
0c376465 31692009-02-23 Tristan Gingold <gingold@adacore.com>
a60a89d6
TG
3170 Eric Botcazou <ebotcazou@adacore.com>
3171 Douglas B Rupp <rupp@gnat.com>
0c376465
TG
3172
3173 * vms.h: Update copyright year, fix comments, reorder declarations.
3174 (_bfd_save_vms_section): Remove the prototype.
3175 (EGPS_S_V_NO_SHIFT): New constant.
3176 (bfd_vms_set_section_flags): New prototype.
3177 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
3178 constants.
3179 (EGSY_S_W_FLAGS): Ditto.
3180 (EGSY_S_V_QUAD_VAL): Ditto.
3181 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
3182 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
3183 EGST_S_B_NAMLNG): Ditto.
3184 (ESRF_S_B_NAMLNG): Ditto.
3185 (ETIR_S_C_HEADER_SIZE): Ditto.
3186 (EGPS_S_V_ALLOC_64BIT): Ditto.
3187 (DST_S_C_EPILOG): Ditto.
3188 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
3189 (DST_S_C_SRC_INCRLNUM_B): Ditto.
3190 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
3191 (DST_S_L_PCLINE_UNSLONG): Ditto.
3192 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
3193 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
3194 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
3195 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
3196 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
3197 (DST_S_B_SRC_UNSBYTE): Ditto.
3198 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
3199 Add prototypes.
3200 (vms_section, vms_reloc): Remove types.
3201 (hdr_struc): Replaced by ...
3202 (hdr_struct): ... new type.
3203 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
3204 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
3205 (EMH_DATE_LENGTH): Ditto.
3206 (eom_struc): Replaced by ...
3207 (eom_struct): ... new type.
3208 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
3209 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
3210 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
3211 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
3212 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
3213 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
3214 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
3215 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
3216 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
3217 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
3218 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
3219 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
3220 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
3221 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
3222 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
3223 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
3224 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
3225 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
3226 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
3227 (enum file_type_enum): New type.
3228 (struct location_struct): Removed.
3229 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
3230 (struct funcinfo, struct module): Ditto.
3231 (struct vms_private_data_struct): Update fields.
3232 (struct vms_section_data_struct): New type.
3233
3234 * vms.c: Update copyright year, fix comments,
3235 Fix includes for DECC, add prototypes.
3236 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
3237 some initializers.
3238 Use flavour to set is_vax, location_stack is removed.
3239 (struct pair): Declare.
3240 (fill_section_ptr): Initialize variables at declaration.
3241 Add guard to set SECTION_SYM flag, handlde und section.
3242 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
3243 (_bfd_vms_slurp_object_records): New function, replaces previous
3244 vms_object_p.
3245 (vms_slurp_module): New function.
3246 (vms_slurp_image): Ditto.
3247 (vms_object_p): Complete rewrite.
3248 (vms_mkobject): Use is_vax field to slect architecture.
3249 (free_reloc_stream): New function.
3250 (vms_convert_to_var): Ditto.
3251 (vms_convert_to_var_1): Ditto.
3252 (vms_convert_to_var_unix_filename): Ditto.
3253 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
3254 VAR format on VMS.
3255 (vms_new_section_hook): Set alignment to 0, allocate private data.
3256 (vms_get_section_contents): Load content.
3257 (vms_get_symbol_info): Handle undefined section.
3258 (vms_find_nearest_line): Handle.
3259 (alloc_reloc_stream): New function.
3260 (vms_slurp_reloc_table): Ditto.
3261 (vms_get_reloc_upper_bound): Make it real.
3262 (vms_canonicalize_reloc): Do the real work.
3263 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
3264 ALPHA_R_BOH.
3265 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
3266 (vms_set_arch_mach): Check arch.
3267 (vms_set_section_contents): Copy the content after allocation.
3268 (vms_alpha_vec): Update object flags.
3269
3270 * vms-tir.c: Update copyright year, fix comments,
3271 add prototypes for new functions.
3272 (dst_define_location): New function.
3273 (dst_restore_location): New function.
3274 (dst_retrieve_location): New function.
3275 (dst_check_allocation): New function.
3276 (image_dump): Call dst_check_allocation.
3277 (image_write_b): Ditto.
3278 (image_write_w): Ditto.
3279 (image_write_l): Ditto.
3280 (image_write_q): Ditto.
3281 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
3282 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
3283 CTL_STKDL.
3284 Call error handler instead of abort if name is not known.
3285 (etir_sta): Add quarter_relocs argument and set it.
3286 Fix cast.
3287 (etir_sto): Ditto.
3288 (etir_opr): Ditto, return FALSE in case of error.
3289 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
3290 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
3291 (etir_stc): Add quarter_relocs argument and set it, fix cast.
3292 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
3293 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
3294 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
3295 Return FALSE in case of error.
3296 (tir_sta): Change sign of psect.
3297 (tir_ctl): Ditto.
3298 (tir_cmd): Fix cast. Makes tir_table static const.
3299 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
3300 add argument to explain.
3301 (analyze_etir): Initialize maxptr, add quarter_relocs
3302 declaration, move some declarations into inner scopes.
3303 Handle quarter_relocs and STO_IMM.
3304 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
3305 (_bfd_vms_slurp_relocs): New function.
3306 (_bfd_vms_decode_relocs): New function.
3307 (sto_imm): Rewritten.
3308 (start_first_etbt_record): New function.
3309 (start_another_etbt_record): Ditto.
3310 (etir_output_check): Ditto.
3311 (defer_reloc_p): Ditto.
3312 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
3313 a for-loop. Correctly deals with contents, deals with .vmsdebug,
3314 rewritte relocations handling.
3315 (_bfd_vms_write_tbt): Removed.
3316 (_bfd_vms_write_dbg): Ditto.
3317
3318 * vms-misc.c: Update copyright year, Fix comments.
3319 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
3320 (maybe_adjust_record_pointer_for_object): New function.
3321 (_bfd_vms_get_first_record): New function, replaces ...
3322 (_bfd_vms_get_record): .. removed.
3323 (_bfd_vms_get_object_record): New function.
3324 (_bfd_vms_get_object_record): New function.
3325 (vms_get_remaining_object_record): New function, replaces ...
3326 (_bfd_vms_get_next_record): ... removed.
3327 (add_new_contents): Removed.
3328 (_bfd_save_vms_section): Removed.
3329 (_bfd_get_vms_section): Removed.
3330 (_bfd_vms_output_flush): Write in VAR format.
3331 (new_symbol): Don't make UND section.
3332
3333 * vms-hdr.c: Update copyright year, update list of record handled.
3334 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
3335 (_bfd_vms_write_hdr): Strip vms and unix patches,
3336 add comments, truncate module name at 31 characters,
3337 use constants instead of hard-coded value,
3338 write BFD version instead of a fixed string.
3339 (_bfd_vms_slurp_ihd): New function.
3340 (_bfd_vms_slurp_isd): Ditto.
3341 (_bfd_vms_slurp_ihs): Ditto.
3342 (new_module): Ditto.
3343 (parse_module): Ditto
3344 (build_module_list): Ditto.
3345 (module_find_nearest_line): Ditto.
3346 (_bfd_vms_find_nearest_dst_line): Ditto.
3347 (vms_slurp_debug): Ditto.
3348 (_bfd_vms_slurp_dbg): Ditto.
3349 (_bfd_vms_slurp_tbt): Ditto.
3350 (_bfd_vms_write_dbg): Ditto.
3351 (_bfd_vms_write_tbt): Ditto.
3352
3353 * vms-gsd.c: Update copyright year, update list of records handled.
3354 (EVAX_LITERALS_NAME): New macro.
3355 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
3356 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
3357 (register_universal_symbol): New function and prototype.
3358 (_bfd_vms_slurp_gsd): Fix indentations and casts,
3359 improve debug messages,
3360 use constants instead of hard-coded value,
3361 fix missing endianness conversion,
3362 handle global symbol (SYMG).
3363 (bfd_vms_set_section_flags): New function.
3364 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
3365 handle section literals,
3366 fix indentation,
3367 handle section bfd and vms flags,
3368 don't output LIB$INITIALIZE symbol,
3369 fix handling of weak symbols,
3370 fix evax vs vax procedure descriptor,
3371 handle absolute symbols.
3372
3373 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
3374 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
3375
3376 * makefile.vms (DEFS): Fix flags for VMS.
3377
3378 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
3379
3380 * bfd-in2.h: Regenerated.
3381 * libbfd.h: Regenerated.
3382
47149254
CC
33832009-02-20 Cary Coutant <ccoutant@google.com>
3384
3385 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
3386 in struct stat.
3387
6b1cecf3
DK
33882009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
3389
3390 PR gas/7059
3391 * coffcode.h (coff_write_object_contents): Don't let the string
3392 table offset overflow the s_name field when using long section names.
3393
88183869
DK
33942009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
3395
3396 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
3397 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
3398 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3399 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
3400 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
3401 (bfd_pmac_xcoff_backend_data): Likewise.
3402 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
3403 (bfd_xcoff_aix5_backend_data): Likewise.
3404 (xcoff64_write_object_contents): Delete unused long_section_names
3405 local variable.
3406 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
3407 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
3408 struct non-const.
3409 * coffcode.h (documentation): Update to describe long section names.
3410 (COFFLONGSECTIONCATHELPER): New helper macro.
3411 (BLANKOR1TOODD): Likewise.
3412 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
3413 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
3414 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
3415 (bfd_coff_set_long_section_names_allowed): New function.
3416 (bfd_coff_set_long_section_names_disallowed): Likewise.
3417 (struct bfd_coff_backend_data): Add new backend hook function
3418 pointer _bfd_coff_set_long_section_names.
3419 (bfd_coff_set_long_section_names): New backend hook.
3420 (coff_write_object_contents): Only generate long section names if
3421 bfd_coff_long_section_names() indicates they are currently enabled.
3422 (bfd_coff_std_swap_table): Make non-const, and initialise long
3423 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
3424 (ticoff0_swap_table): Likewise to both.
3425 (ticoff1_swap_table): Again, likewise to both.
3426 * coffgen.c (make_a_section_from_file): Allow long section names
3427 as inputs even if not currently allowed for outputs.
3428 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
3429 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
3430 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3431 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3432 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
3433 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3434 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3435 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
3436 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
3437 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3438 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
3439 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
3440 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
3441 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
3442 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
3443 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
3444 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
3445 * libcoff-in.h: Update copyright year to cause updated copyright
3446 year in generated libcoff.h, and fix typo.
3447 * libcoff.h: Regenerated.
3448 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
3449 (_bfd_ecoff_no_long_sections): Add prototype.
3450 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
3451 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
3452 defined by an including .c file.
3453 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
3454 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
3455 (ticoff1_swap_table): Likewise to both.
3456
90d8a22c
CL
34572009-02-18 Christophe Lyon <christophe.lyon@st.com>
3458
3459 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
3460 stub. Catch default case error.
3461 (arm_map_one_stub): Add missing Thumb mapping symbol.
3462
12123067
NC
34632009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
3464
3465 PR 9841
3466 * elf32-avr.c: Handle case where no local symbos exist correctly.
3467
fea2b4d6
CL
34682009-02-16 Christophe Lyon <christophe.lyon@st.com>
3469
3470 bfd/
3471 * elf32-arm.c (arm_long_branch_stub,
3472 arm_thumb_v4t_long_branch_stub,
3473 arm_thumb_thumb_long_branch_stub,
3474 arm_thumb_arm_v4t_long_branch_stub,
3475 arm_thumb_arm_v4t_short_branch_stub,
3476 arm_pic_long_branch_stub):
3477 Renamed to elf32_arm_stub_long_branch_any_any,
3478 elf32_arm_stub_long_branch_v4t_arm_thumb,
3479 elf32_arm_stub_long_branch_thumb_only,
3480 elf32_arm_stub_long_branch_v4t_thumb_arm,
3481 elf32_arm_stub_short_branch_v4t_thumb_arm,
3482 elf32_arm_stub_long_branch_any_any_pic.
3483 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
3484 arm_thumb_thumb_stub_long_branch,
3485 arm_thumb_arm_v4t_stub_long_branch,
3486 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
3487 Renamed to arm_stub_long_branch_any_any,
3488 arm_stub_long_branch_v4t_arm_thumb,
3489 arm_stub_long_branch_thumb_only,
3490 arm_stub_long_branch_v4t_thumb_arm,
3491 arm_stub_short_branch_v4t_thumb_arm,
3492 arm_stub_long_branch_any_any_pic.
3493
13e0a874
DA
34942009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3495
3496 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
3497 in branch offset check.
3498
3a71aa26
AM
34992009-02-15 Alan Modra <amodra@bigpond.net.au>
3500
3501 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
3502 add toc.symndx and toc.add.
3503 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
3504 Set up toc.add.
3505 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
3506 callers.
3507 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
3508 (branch_reloc_hash_match): New function, extracted from..
3509 (ppc64_elf_tls_optimize): ..here.
3510 (ppc64_elf_relocate_section): Properly set addends when optimizing
3511 tls sequences. Avoid unnecessary reading and writing of insns.
3512 Only redo reloc when symbol changed. Bypass symbol checks when
3513 using tlsld_got.
3514 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
3515 (branch_reloc_hash_match): New function, extracted from..
3516 (ppc_elf_tls_optimize): ..here.
3517 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
3518 Don't clear addend on zapped __tls_get_addr reloc.
3519
2c2b4ed4
NC
35202009-02-12 Nick Clifton <nickc@redhat.com>
3521
3522 PR 9827
3523 * elflink.c (bfd_elf_final_link): When counting the relocations,
3524 if the header size has not been set yet then assume that it will
3525 match the output section's reloc type.
3526
453f5985
NS
35272009-02-12 Nathan Sidwell <nathan@codesourcery.com>
3528
3529 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
3530 relocatable link.
3531
3209bffa
AM
35322009-02-09 Alan Modra <amodra@bigpond.net.au>
3533
3534 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
3535 (find_function): Likewise.
3536 (pasted_function): Don't error if no prior function found.
3537 (discover_functions): Revert 2008-12-10 change. Extend first
3538 function range to start of section.
3539
813c8a3c
DA
35402009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3541
3542 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
3543 functions to C90.
3544 * elf64-hppa.h: Likewise.
3545
2d0f9ad9
JM
35462009-02-06 Joseph Myers <joseph@codesourcery.com>
3547
3548 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
3549 .sbss handling.
3550
50e00962
AM
35512009-02-04 Alan Modra <amodra@bigpond.net.au>
3552
3553 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
3554 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
3555
52b6b6b9
JM
35562009-02-03 Sandip Matte <sandip@rmicorp.com>
3557
3558 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
3559 * archures.c (bfd_mach_mips_xlr): Define.
3560 * bfd-in2.h: Regenerate.
3561 * cpu-mips.c (I_xlr): Define.
3562 (arch_info_struct): Add XLR entry.
3563 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
3564 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
3565 (mips_mach_extensions): Add XLR entry.
3566
654c3c9f
EW
35672009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
3568
3569 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
3570
31dd3154
JM
35712009-02-03 Carlos O'Donell <carlos@codesourcery.com>
3572
3573 * configure.in: AC_SUBST pdfdir.
d1fa68d3 3574 * Makefile.am: Add install-pdf, install-pdf-am
31dd3154
JM
3575 and install-pdf-recursive targets. Define pdfdir.
3576 * doc/Makefile.am: Define pdf__strip_dir. Add
3577 install-pdf and install-pdf-am targets.
d1fa68d3 3578 * po/Make-in: Add install-pdf target.
31dd3154
JM
3579 * configure: Regenerate.
3580 * Makefile.in: Regenerate
3581 * doc/Makefile.in: Regenerate.
3582
cf869cce
NC
35832009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
3584
3585 * bfd-in2.h: Regenerate.
3586 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
3587 fields from n_entries to n_slots where appropriate, update comments.
3588 (HOWTO): Add TLS relocations.
3589 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
3590 (enum elf_m68k_got_offset_size): New enum.
3591 (struct elf_m68k_got_entry.type): Move field to ...
3592 (struct elf_m68k_got_entry_key): ... here. Update all uses.
3593 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
3594 functions.
3595 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
3596 functions.
3597 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
3598 fields into n_entries array. Update comments.
3599 (elf_m68k_init_got): Simplify, update all uses.
3600 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
3601 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
3602 GOT entries; update name, update all uses.
3603 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
3604 (elf_m68k_get_got_entry): Update.
3605 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
3606 simplify.
3607 (elf_m68k_remove_got_entry_type): Simplify.
3608 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
3609 (elf_m68k_can_merge_gots): Update.
3610 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
3611 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
3612 GOT entries, simplify.
3613 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
3614 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
3615 field, remove obsoleted local_n_entries field.
3616 (elf_m68k_partition_multi_got_2): New static function.
3617 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
3618 update.
3619 (elf_m68k_remove_got_entry_type): Update.
3620 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
d1fa68d3 3621 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
cf869cce
NC
3622 update of sgot->size and srelgot->size.
3623 (elf_m68k_gc_sweep_hook): Update.
3624 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
3625 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
3626 TLS relocations.
3627 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
3628 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
3629
c1a0a41f
DD
36302009-02-02 DJ Delorie <dj@redhat.com>
3631
3632 * elf32-mep.c (config_names): Regenerate configuration.
3633
72a80a16
AM
36342009-02-02 Alan Modra <amodra@bigpond.net.au>
3635
3636 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
3637 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
3638 * elf.c (bfd_elf_get_str_section): Make static.
3639 (bfd_elf_find_section): Delete.
3640 * libbfd.h: Regenerate.
3641
273f4430
JK
36422009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
3643
3644 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
3645 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
3646
010e5ae2
AM
36472009-01-31 Alan Modra <amodra@bigpond.net.au>
3648
3649 * elflink.c (on_needed_list): New function.
3650 (elf_link_add_object_symbols): Link in --as-needed libs if they
3651 satisfy undefined symbols in other libs.
3652
33a7ffc2
JM
36532009-01-30 Julian Brown <julian@codesourcery.com>
3654
3655 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
3656 EXEC_P or DYNAMIC flags, and skip sections which are being linked
3657 with --just-symbols (-R).
3658
13d72a14
AN
36592009-01-29 Adam Nemet <anemet@caviumnetworks.com>
3660
3661 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
3662 high_pc in order to properly sign-extend VMAs.
3663
d334575b 36642009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
d1fa68d3
AS
3665 Mark Shinwell <shinwell@codesourcery.com>
3666 Catherine Moore <clm@codesourcery.com>
d334575b
JM
3667
3668 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
3669
528aeb62
CM
36702009-01-28 Catherine Moore <clm@codesourcery.com>
3671
3672 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
3673 SEC_LOAD for dynamic relocation sections.
3674
f6f05983
HPN
36752009-01-27 Hans-Peter Nilsson <hp@axis.com>
3676
3677 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
3678 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
3679 the size of local TLS data.
3680
27cc28f9
AS
36812009-01-27 Andreas Schwab <schwab@suse.de>
3682
3683 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
3684 architectures in the archive.
3685
b3bf42d8
HPN
36862009-01-27 Hans-Peter Nilsson <hp@axis.com>
3687
f551b6f0
HPN
3688 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
3689 <R_CRIS_32_DTPREL>: Correct relocation value.
3690
b3bf42d8
HPN
3691 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
3692 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
3693 symbols with non-default visibility.
3694
9bc4e62b
NS
36952009-01-26 Nathan Sidwell <nathan@codesourcery.com>
3696
3697 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
3698 describing the trampolines.
3699 (ppc_elf_relocate_section): Update relocs to describe the
3700 trampolines.
3701
aeaf6540
DA
37022009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3703
3704 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
3705 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
3706 and R_PARISC_PCREL12F relocations.
3707
1e8fa21e
AM
37082009-01-24 Alan Modra <amodra@bigpond.net.au>
3709
3710 PR 6022
3711 * elflink.c (find_version_for_sym): New function split out from,
3712 but without export_dynamic test, ..
3713 (_bfd_elf_link_assign_sym_version): ..here.
3714 (_bfd_elf_export_symbol): Use it.
3715
28caa186
AM
37162009-01-23 Alan Modra <amodra@bigpond.net.au>
3717
3718 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
3719 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
3720 * elflink.c: ..here, somewhat modified.
3721 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
3722 _bfd_elf_link_find_version_dependencies,
3723 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
3724 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3725 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
3726 declare..
3727 * elflink.c: ..and make static here.
3728 (_bfd_elf_link_find_version_dependencies): Adjust for removal
3729 of output_bfd from struct elf_find_verdep_info.
3730 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
3731 struct elf_info_failed.
3732 (bfd_elf_size_dynamic_sections): Adjust.
3733
be04437d
AM
37342009-01-22 Alan Modra <amodra@bigpond.net.au>
3735
3736 PR 6832
3737 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
3738 after comp_unit_find_line call.
3739
58f9615c
NC
37402009-01-21 Nick Clifton <nickc@redhat.com>
3741
3742 PR 9769
3743 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
3744 tm_gmtoff field in struct tm.
3745
fb266b8b
AM
37462009-01-21 Alan Modra <amodra@bigpond.net.au>
3747
3748 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
3749 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
3750 sections in soft-icache lines unless non_ia_text. Don't add
3751 rodata if doing so would exceed line size.
3752
451ffe63
HPN
37532009-01-19 Hans-Peter Nilsson <hp@axis.com>
3754
3755 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
3756 types than bfd_link_hash_indirect, before early return, call
3757 _bfd_elf_link_hash_copy_indirect.
3758
5aa6ff7c
AS
37592009-01-19 Andrew Stubbs <ams@codesourcery.com>
3760
3761 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
3762 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
3763 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
3764 (elf_backend_obj_attrs_order): New define.
3765 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
3766 (elfNN_bed): Add elf_backend_obj_attrs_order.
3767
3483fe2e
AS
37682009-01-19 Andrew Stubbs <ams@codesourcery.com>
3769
3770 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
3771 (obj_attr_size): Likewise.
3772 (write_obj_attribute): Likewise.
3773 (_bfd_elf_copy_obj_attributes): Likewise.
3774 (_bfd_elf_parse_attributes): Likewise.
3775 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
3776 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
3777 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
3778 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
3779 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
3780 with macros.
3781
2d0bb761
AS
37822009-01-19 Andrew Stubbs <ams@codesourcery.com>
3783
3784 * elf-attrs.c (is_default_attr): Support defaultless attributes.
3785 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
3786 (bfd_elf_add_obj_attr_string): Likewise.
3787 (bfd_elf_add_obj_attr_int_string): Likewise.
3788 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
3789 * elf-bfd.h (struct obj_attribute): Document new flag bit.
3790 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
3791 Tag_nodefaults has no default value.
3792 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
3793 comment to reflect the new state.
3794
a77e83b7
AM
37952009-01-19 Alan Modra <amodra@bigpond.net.au>
3796
3797 PR 9695
3798 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
3799 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
3800 (adjust_z_magix): Delete dead code handling QMAGIC.
3801
f6d29e26
KT
38022009-01-16 Kai Tietz <kai.tietz@onevision.com>
3803
3804 * coffcode.h (styp_to_sec_flags): Correct interpretation of
3805 IMAGE_SCN_MEM_DISCARDABLE.
3806
29670fb9
AM
38072009-01-16 Alan Modra <amodra@bigpond.net.au>
3808
3809 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
3810 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
3811 * configure.in (commonbfdlib): Delete.
3812 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
3813 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
3814 is available, not just for linux.
3815 * po/SRC-POTFILES.in: Regenerate.
3816 * Makefile.in: Regenerate.
3817 * configure: Regenerate.
3818
91e22acd
AS
38192009-01-15 Andrew Stubbs <ams@codesourcery.com>
3820 Julian Brown <julian@codesourcery.com>
3821
3822 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
3823 ARM attributes in ABI 2.07.
3824 * elf32-arm.c (get_secondary_compatible_arch): New function.
3825 (set_secondary_compatible_arch): New function.
3826 (tag_cpu_arch_combine): New function.
3827 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
3828 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
3829 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
3830 make it fit with order_01243.
3831 Add support for Tag_also_compatible_with,
3832 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
3833 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
3834 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
3835 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
3836 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
3837 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
3838 Rework the way unknown attributes are handled.
3839 Defer errors until all attributes have been processed.
3840
7b86a9fa
AS
38412009-01-15 Andrew Stubbs <ams@codesourcery.com>
3842
3843 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
3844 bfd_elf_add_obj_attr_int_string.
3845 Read Tag_compatibility from its new location in the attribute array,
3846 rather than the attribute list.
3847 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
3848 bfd_elf_add_obj_attr_int_string.
3849 (_bfd_elf_parse_attributes): Likewise.
3850 (_bfd_elf_merge_object_attributes): There's now only one
3851 Tag_compatibility, and it's in the array, not the list.
3852 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
3853 Tag_compatibility.
3854 (bfd_elf_add_obj_attr_compat): Rename to
3855 bfd_elf_add_obj_attr_int_string.
3856 (bfd_elf_add_proc_attr_compat): Rename to
3857 bfd_elf_add_proc_attr_int_string.
3858 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
3859 Tag_compatibility.
3860
01e1a5bc
NC
38612009-01-15 Douglas B Rupp <rupp@gnat.com>
3862
3863 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
3864 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
3865 (vmsutil.lo): Add dependency rule.
3866 * Makefile.in: Regenerate.
3867 * config.bfd (ia64*-*-*vms*): Add case.
3868 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
3869 * configure: Regenerate.
3870 * vmsutil.c: New file.
3871 * vmsutil.h: New file.
3872 * elf-bfd.h (struct bfd_elf_special_section): Change type of
3873 attr to bfd_vma.
3874 * elfxx-ia64.c (elfNN_vms_post_process_headers,
3875 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
3876 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
3877 elfNN_vms_object_p): New functions
3878 * targets.c (bfd_elf64_ia64_vms_vec): New target.
3879
a33dafc3
L
38802009-01-14 H.J. Lu <hongjiu.lu@intel.com>
3881
3882 PR ld/9727
3883 * elflink.c (elf_gc_sweep): Exclude the group section if the
3884 first member of the section group is excluded.
3885
13c0e967
AM
38862009-01-14 Alan Modra <amodra@bigpond.net.au>
3887
3888 PR 9735
3889 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
3890 saved filename, use bfd_alloc rather than bfd_malloc for it.
3891
460e679b
AM
38922009-01-13 Alan Modra <amodra@bigpond.net.au>
3893
3894 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
3895
25076afa
AM
38962009-01-13 Alan Modra <amodra@bigpond.net.au>
3897
3898 * elf32-spu.c (remove_cycles): Always set call->max_depth.
3899
37107878
AM
39002009-01-12 Alan Modra <amodra@bigpond.net.au>
3901
3902 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
3903
cd4a7468
AM
39042009-01-12 Alan Modra <amodra@bigpond.net.au>
3905
3906 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
3907 num_lines_log2.
3908 (struct got_entry): Add br_addr.
3909 (struct call_info): Add priority.
3910 (struct function_info): Add lr_store and sp_adjust.
3911 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
3912 (spu_elf_find_overlays): For soft-icache, mark any section within cache
3913 area as an overlay, and check that no other overlays exist. Look up
3914 icache overlay manager entry sym.
3915 (BRA_STUBS, BRA, BRASL): Define.
3916 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
3917 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
3918 in branch insn.
3919 (count_stub, build_stub): Support soft-icache.
3920 (build_spuear_stubs, process_stubs): Adjust build_stub call.
3921 (spu_elf_size_stubs): Size soft-icache stubs.
3922 (overlay_index): New function.
3923 (spu_elf_build_stubs): Make static. Support soft-icache.
3924 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
3925 (find_function_stack_adjust): Save lr store and stack adjust insn
3926 offsets.
3927 (maybe_insert_function): Adjust find_function_stack_adjust call.
3928 (mark_functions_via_relocs): Retrieve priority.
3929 (remove_cycles): Only warn about pruned arcs when stack_analysis.
3930 (sort_calls): Sort by priority first.
3931 (mark_overlay_section): Ignore .ovl.init.
3932 (sum_stack): Only print when stack_analysis.
3933 (print_one_overlay_section): New function, extracted from..
3934 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
3935 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
3936 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
3937 analysis. Call spu_elf_build_stubs.
3938 (spu_elf_relocate_section): For soft-icache encode overlay index
3939 into addresses.
3940 (spu_elf_output_symbol_hook): Support soft-icache.
3941 (spu_elf_modify_program_headers: Likewise.
37107878 3942
cd4a7468
AM
3943 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
3944 num_regions to num_lines. Add line_size and max_branch.
3945 (enum _ovly_flavour): Add ovly_soft_icache.
3946 (spu_elf_build_stubs): Delete.
3947
80c29487
JK
39482009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
3949
3950 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
3951 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
3952
1bc86aea
HPN
39532009-01-07 Hans-Peter Nilsson <hp@axis.com>
3954
3955 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3956 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
3957 the program, the known offset starts at the negative size of the
3958 TLS section.
3959 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
3960 Similar.
3961
3baa454d 39622009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
75606e85 3963
3baa454d 3964 * config.bfd: Add lm32-*-rtems*.
75606e85 3965
9dbe8890
L
39662009-01-03 H.J. Lu <hongjiu.lu@intel.com>
3967
3968 * coff-ppc.c: Add 2009 to Copyright.
3969 * elf32-cris.c: Likewise.
3970 * elflink.c: Likewise.
3971
0bdf8d40
HPN
39722009-01-03 Hans-Peter Nilsson <hp@axis.com>
3973
3974 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
3975 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
3976
54ac0771
L
39772009-01-02 H.J. Lu <hongjiu.lu@intel.com>
3978
3979 PR ld/9679
3980 * elflink.c (elf_merge_st_other): New.
3981 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
3982 hide them if needed.
3983 (elf_link_add_object_symbols): Updated.
3984
d8880531
L
39852009-01-02 H.J. Lu <hongjiu.lu@intel.com>
3986
3987 PR ld/9676
3988 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
3989 ref_dynamic and dynamic_def fields when setting def_regular
3990 to 1.
3991
b70b5c14
NC
39922009-01-02 Curtis Mackie <curtmackevo@gmail.com>
3993
3994 PR 9682
3995 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
3996 literal.
3997
d8880531 3998For older changes see ChangeLog-2008
56882138
AM
3999\f
4000Local Variables:
4001mode: change-log
4002left-margin: 8
4003fill-column: 74
4004version-control: never
4005End:
This page took 0.751256 seconds and 4 git commands to generate.