*** empty log message ***
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
32af9f6e
AM
12009-12-17 Alan Modra <amodra@bigpond.net.au>
2
3 PR ld/11088
4 * elf32-ppc.c (update_plt_info): Clear sec here when addend is
5 less than 32768..
6 (ppc_elf_check_relocs): ..rather than doing so here. Ignore new
7 relax relocs.
8 (ppc_elf_gc_sweep_hook): Don't segfault when symbol hiding has
9 removed plt_entry records.
10 (ppc_elf_tls_setup): Handle PIE calls to __tls_get_addr correctly.
11 (ppc_elf_tls_optimize): Likewise. Also dec __tls_get_addr refcount
12 when optimizing code using new tlsgd and tlsld marker relocs.
13 (ppc_elf_relax_section): Differentiate relaxed PLTREL24 relocs
14 from ADDR24 relocs using plt or glink. Don't clear the addend
15 for R_PPC_RELAX_PLTREL24.
16 (ppc_elf_relocate_section): Correctly handle addends on relaxed
17 PLTREL24 relocs.
18
7c6c1722
AM
192009-12-17 Alan Modra <amodra@bigpond.net.au>
20
21 PR ld/11088
22 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Don't abort if symbol
23 hiding has nulled out plt.plist.
24
662e4701
L
252009-12-15 H.J. Lu <hongjiu.lu@intel.com>
26
27 * opncls.c (bfd_opnr_iovec): Replace _XXX with XXX_P in
28 parameters.
29
30 * tekhex.c (pass_over): Replace eof with is_eof.
31
7f7828f6
TG
322009-12-15 Tristan Gingold <gingold@adacore.com>
33
662e4701
L
34 * mach-o.h (bfd_mach_o_uuid_command): Remove section field.
35 * mach-o.c (bfd_mach_o_scan_read_uuid): Do not create a section
36 from this command.
7f7828f6 37
8462aec7
TG
382009-12-15 Tristan Gingold <gingold@adacore.com>
39
662e4701
L
40 * mach-o.c (struct mach_o_section_name_xlat): Add flags field.
41 (dwarf_section_names_xlat): Add section flags.
42 (text_section_names_xlat): Ditto.
43 (data_section_names_xlat): Ditto.
44 (bfd_mach_o_convert_section_name_to_bfd): Now return name and section
45 flags by reference.
46 (bfd_mach_o_make_bfd_section): Use section flags when know, otherwise
47 try to guess.
8462aec7 48
e7f8eadb
DK
492009-12-14 Doug Kwan <dougkwan@google.com>
50
51 * opncls.c (bfd_opnr_iovec): Rename parameters to avoid shawdowed
52 variable warnings.
53 * bfd-in2.h: Regnenerate.
54
9e9b49ab
NC
552009-12-12 Nick Clifton <nickc@redhat.com>
56
57 * coff-arm.c (coff_arm_rtype_to_howto): Fix shadowed variable
58 warning.
59
f664f618
TG
602009-12-11 Tristan Gingold <gingold@adacore.com>
61
7c6c1722 62 * som.c (bfd_som_set_subsection_attributes)
f664f618
TG
63 (bfd_section_from_som_symbol, som_reloc_queue_fix): Fix shadowed
64 variable warnings.
65 * cache.c (close_one): Likewise.
66
91d6fa6a
NC
672009-12-11 Nick Clifton <nickc@redhat.com>
68
69 * warning.m4 (GCC_WARN_CFLAGS): Add -Wshadow.
70 * configure: Regenerate.
71 * Makefile.in: Regenerate.
72 * doc/Makefile.in: Regenerate.
73 * aout-arm.c: Fix shadowed variable warnings.
74 * aout-tic30.c: Likewise.
75 * aoutx.h: Likewise.
76 * archive.c: Likewise.
77 * coff-alpha.c: Likewise.
78 * coff-i386.c: Likewise.
79 * coff-x86_64.c: Likewise.
80 * coffgen.c: Likewise.
81 * dwarf2.c: Likewise.
82 * ecoff.c: Likewise.
83 * elf-eh-frame.c: Likewise.
84 * elf-m10300.c: Likewise.
85 * elf.c: Likewise.
86 * elf32-arm.c: Likewise.
87 * elf32-avr.c: Likewise.
88 * elf32-bfin.c: Likewise.
89 * elf32-cr16.c: Likewise.
90 * elf32-i386.c: Likewise.
91 * elf32-ip2k.c: Likewise.
92 * elf32-lm32.c: Likewise.
93 * elf32-m68hc1x.c: Likewise.
94 * elf32-microblaze.c: Likewise.
95 * elf32-ppc.c: Likewise.
96 * elf32-rx.c: Likewise.
97 * elf32-score.c: Likewise.
98 * elf32-score7.c: Likewise.
99 * elf32-sh.c: Likewise.
100 * elf32-spu.c: Likewise.
101 * elf32-v850.c: Likewise.
102 * elf32-xtensa.c: Likewise.
103 * elf64-hppa.c: Likewise.
104 * elf64-ppc.c: Likewise.
105 * elf64-x86-64.c: Likewise.
106 * elflink.c: Likewise.
107 * elfxx-ia64.c: Likewise.
108 * elfxx-mips.c: Likewise.
109 * elfxx-sparc.c: Likewise.
110 * hash.c: Likewise.
111 * ieee.c: Likewise.
112 * libbfd.c: Likewise.
113 * mach-o.c: Likewise.
114 * merge.c: Likewise.
115 * nlm32-sparc.c: Likewise.
116 * oasys.c: Likewise.
117 * opncls.c: Likewise.
118 * pdp11.c: Likewise.
119 * peXXigen.c: Likewise.
120 * pef.c: Likewise.
121 * versados.c: Likewise.
122 * vms-gsd.c: Likewise.
123 * vms-hdr.c: Likewise.
124 * vms-tir.c: Likewise.
125 * vms.c: Likewise.
126 * xcofflink.c: Likewise.
127 * xsym.c: Likewise.
128 * xtensa-isa.c: Likewise.
129
e7e2196d
MR
1302009-12-10 Maciej W. Rozycki <macro@codesourcery.com>
131
132 * elfxx-mips.c (mips_elf_calculate_relocation): Correct handling
133 of undefined symbols.
134
a7470592
DJ
1352009-12-09 Daniel Jacobowitz <dan@codesourcery.com>
136
137 * elf32-arm.c (elf32_arm_next_input_section): Skip sections without
138 SEC_CODE.
139
32812159
AM
1402009-12-08 Alan Modra <amodra@bigpond.net.au>
141
142 * elf.c (write_zeros): New function.
143 (assign_file_positions_for_load_sections): Allocate file space for
144 NOBITS sections that are followed by PROGBITS sections in a segment.
145
ef17cb22
TG
1462009-12-03 Tristan Gingold <gingold@adacore.com>
147
148 * mach-o.c (bfd_mach_o_make_bfd_section): Force debug flags for
149 all sections of the __DWARF segment.
150
f58d5a2d
AM
1512009-12-03 Alan Modra <amodra@bigpond.net.au>
152
153 PR ld/11047
154 * elf32-ppc.c (ppc_elf_relocate_section): Delete __tls_get_addr
155 symbol reference from relocs belonging to calls that are
156 optimized away.
157 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
158
e05da72d
NC
1592009-12-02 Jerker Bäck <jerker.back@gmail.com>
160
161 PR binutils/11017
162 * coff-i386.h (COFF_PAGE_SIZE): Definition moved to coff/i386.h
163
3388710e
JM
1642009-11-30 Joseph Myers <joseph@codesourcery.com>
165
166 * configure: Regenerate.
167
69a630b5
L
1682009-11-26 Per Øyvind Karlsen <peroyvind@mandriva.org>
169
170 * plugin.c (bfd_plugin_bfd_copy_link_hash_symbol_type): Define.
171
bf993e3c
JB
1722009-11-24 Joel Brobecker <brobecker@adacore.com>
173
174 * acinclude.m4: Add include of ../config/zlib.m4.
175 * configure.in: AM_ZLIB to check for zlib support.
176 * configure: Regenerate.
177
1338dd10
PB
1782009-11-23 Paul Brook <paul@codesourcery.com>
179
180 * libbfd-in.h (_bfd_generic_copy_link_hash_symbol_type): Add
181 prototype.
182 * elf-bfd.h (_bfd_elf_copy_link_hash_symbol_type): Add prototype.
183 * linker.c (_bfd_generic_copy_link_hash_symbol_type): New function.
184 * elflink.c (_bfd_elf_copy_link_hash_symbol_type): New function.
185 * targets.c (BFD_JUMP_TABLE_LINK, struct bfd_target): Add
186 _copy_link_hash_symbol_type.
69a630b5 187 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Add
1338dd10 188 _bfd_generic_copy_link_hash_symbol_type.
69a630b5 189 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add
1338dd10
PB
190 _bfd_generic_copy_link_hash_symbol_type.
191 * aout-adobe.c (aout_32_bfd_copy_link_hash_symbol_type): Define.
192 * aout-target.h (MY_bfd_copy_link_hash_symbol_type): Define.
193 * aout-tic30.c (MY_bfd_copy_link_hash_symbol_type): Define.
194 * binary.c (binary_bfd_copy_link_hash_symbol_type): Define.
195 * bout.c (b_out_bfd_copy_link_hash_symbol_type): Define.
196 * coffcode.h (coff_bfd_copy_link_hash_symbol_type): Define.
197 * elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type): Define.
198 * i386msdos.c (msdos_bfd_copy_link_hash_symbol_type): Define.
199 * i386os9k.c (os9k_bfd_copy_link_hash_symbol_type): Define.
200 * ieee.c (ieee_bfd_copy_link_hash_symbol_type): Define.
201 * ihex.c (ihex_bfd_copy_link_hash_symbol_type): Define.
202 * libecoff.h (_bfd_ecoff_bfd_copy_link_hash_symbol_type): Define.
203 * mach-o.c (bfd_mach_o_bfd_copy_link_hash_symbol_type): Define.
204 * mmo.c (mmo_bfd_copy_link_hash_symbol_type): Define.
205 * nlm-target.h (nlm_bfd_copy_link_hash_symbol_type): Define.
206 * oasys.c (oasys_bfd_copy_link_hash_symbol_type): Define.
207 * pef.c (bfd_pef_bfd_copy_link_hash_symbol_type): Define.
208 * ppcboot.c (ppcboot_bfd_copy_link_hash_symbol_type): Define.
209 * som.c (som_bfd_copy_link_hash_symbol_type): Define.
210 * srec.c (srec_bfd_copy_link_hash_symbol_type): Define.
211 * tekhex.c (tekhex_bfd_copy_link_hash_symbol_type): Define.
212 * versados.c (versados_bfd_copy_link_hash_symbol_type): Define.
213 * vms.c (vms_bfd_copy_link_hash_symbol_type): Define.
214 * xsym.c (bfd_sym_bfd_copy_link_hash_symbol_type): Define.
215 * bfd-in2.h: Regenerate.
216 * libbfd.h: Regenerate.
217
ac96f0c7
TG
2182009-11-19 Tristan Gingold <gingold@adacore.com>
219
220 * coff-rs6000.c (rs6000coff_vec): Use generic routines instead of
221 hard-coded casts.
222 (pmac_xcoff_vec): Ditto.
223 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
224 (aix5coff64_vec): Ditto.
225
2d0f3896
AM
2262009-11-18 Alan Modra <amodra@bigpond.net.au>
227
228 * bfd-in.h (_bfd_elf_ppc_at_tls_transform): Declare.
229 * bfd-in2.h: Regenerate.
230 * elf64-ppc.c (ppc64_elf_relocate_section): Move code for R_PPC64_TLS
231 insn optimisation to..
232 * elf32-ppc.c (_bfd_elf_ppc_at_tls_transform): ..here. New function.
233 (ppc_elf_relocate_section): Use it.
234
8cddccd3
AM
2352009-11-18 Alan Modra <amodra@bigpond.net.au>
236
237 * targets.c: Don't include alloca-conf.h.
238 (bfd_get_target_info): Don't use alloca.
239
f4dcf782
L
2402009-11-17 H.J. Lu <hongjiu.lu@intel.com>
241
242 PR ld/10955
243 * elfxx-ia64.c (elfNN_ia64_update_short_info): Also skip ABS
244 sections.
245
affb4bf3
L
2462009-11-17 H.J. Lu <hongjiu.lu@intel.com>
247
248 PR ld/10955
249 * elfxx-ia64.c (elfNN_ia64_link_hash_table): Update comments.
250 (elfNN_ia64_update_short_info): Remove "->output_section" from
251 ia64_info->max_short_sec and ia64_info->min_short_sec.
252 (elfNN_ia64_choose_gp): Likewise.
253 (elfNN_ia64_relax_section): Pass tsec->output_section to
254 elfNN_ia64_update_short_info.
255
a231ddc0
L
2562009-11-17 H.J. Lu <hongjiu.lu@intel.com>
257
258 PR ld/10955
259 * elfxx-ia64.c (elfNN_ia64_link_hash_table): Add max_short_sec,
260 max_short_offset, min_short_sec and min_short_offset.
261 (elfNN_ia64_update_short_info): New.
262 (elfNN_ia64_relax_section): Update max_short_sec,
263 max_short_offset, min_short_sec and min_short_offset.
264 (elfNN_ia64_choose_gp): Use min_short_sec/max_short_sec if
265 they are set.
266
9e3c6df6 2672009-11-17 Paul Brook <paul@codesourcery.com>
a231ddc0 268 Daniel Jacobowitz <dan@codesourcery.com>
9e3c6df6
PB
269
270 * elf32-arm.c (using_thumb_only, arch_has_arm_nop,
271 arch_has_thumb2_nop): Handle TAG_CPU_ARCH_V7E_M.
272 (tag_cpu_arch_combine): Ditto. Correct MAX_TAG_CPU_ARCH test.
273
2a516af6
UW
2742009-11-17 Ulrich Weigand <uweigand@de.ibm.com>
275
276 * elf32-spu.c (struct spu_link_hash_table): Remove overlay_fixed,
277 reserved, and extra_stack_space members.
278 (spu_elf_auto_overlay): Use auto_overlay_fixed, auto_overlay_reserved,
279 and extra_stack_space members of htab->params instead.
280
310092bd
TG
2812009-11-17 Tristan Gingold <gingold@adacore.com>
282
283 * targets.c: Include alloca-conf.h
284
5fbe9721
KT
2852009-11-16 Kai Tietz <kai.tietz@onevision.com>
286
287 * targets.c (bfd_get_target_info): New function.
288 (_bfd_find_arch_match): New function.
289 * bfd-in2.h: Regenerated.
290
fa78c13a
NC
2912009-11-12 Nick Clifton <nickc@redhat.com>
292
293 * po/ru.po: Updates Russian translation.
294
41327c9d
NC
2952009-11-11 Nick Clifton <nickc@redhat.com>
296
297 * po/id.po: Updated Indonesian translation.
298
da2f07f1
JK
2992009-11-11 Jan Kratochvil <jan.kratochvil@redhat.com>
300
301 * configure.in: Call ACX_LARGEFILE. Stop calling AC_PLUGINS,
302 AC_SYS_LARGEFILE and checking the Solaris largefile exception.
303 * aclocal.m4: Regenerate.
304 * configure: Regenerate.
305
57ca8ac7
L
3062009-11-09 H.J. Lu <hongjiu.lu@intel.com>
307
308 PR ld/10911
309 * elflink.c (elf_link_output_extsym): Don't return on
310 STT_GNU_IFUNC symbol when stripping.
311
d9f40817
DA
3122009-11-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
313
314 * elf32-hppa.c (elf32_hppa_final_link): Don't sort unwind information
315 in a relocatable link.
316 * elf64-hppa.c (elf_hppa_final_link): Likewise.
317
3cbc5de0
NC
3182009-11-05 Nick Clifton <nickc@redhat.com>
319
320 * elflink.c (elf_link_add_object_symbols): Improve error
321 message generated when a symbol is left unresolved because a
57ca8ac7 322 --no-add-needed command line option has prevented the
3cbc5de0
NC
323 inclusion of the DSO defining it.
324
6567fa84
UW
3252009-11-03 Alan Modra <amodra@bigpond.net.au>
326 Ulrich Weigand <uweigand@de.ibm.com>
327
328 * elf32-spu.c (mark_functions_via_relocs): Handle non-branch relocs
329 (jump tables or other references to code labels) as well.
330
62f3b8c8
PB
3312009-11-02 Paul Brook <paul@codesourcery.com>
332
333 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle VFPv4
334 attributes.
335
3703bab9
AM
3362009-11-02 Alan Modra <amodra@bigpond.net.au>
337
338 * elflink.c (elf_link_add_object_symbols): Don't force debug
339 symbols local.
340
5d5a918a
HPN
3412009-10-29 Johan Kristell <johankri@axis.com>
342
343 * elf32-cris.c (cris_elf_plt_sym_val): New function.
344 (elf_backend_plt_sym_val): Define.
345
5fdcb63c
KT
3462009-10-27 Kai Tietz <kai.tietz@onevision.com>
347
348 * peXXigen.c (bfdver.h): Add include.
349 (LINKER_VERSION): Do calculation based on BFD_VERSION.
350
d76b263e
MR
3512009-10-25 Maciej W. Rozycki <macro@linux-mips.org>
352
353 * elf32-vax.c (elf_vax_relocate_section): Correct assertion.
354
71f136d6
MR
3552009-10-25 Maciej W. Rozycki <macro@linux-mips.org>
356
357 * elf32-vax.c (elf_vax_plt_entry): Fix formatting.
358
9e86195c
MR
3592009-10-25 Maciej W. Rozycki <macro@linux-mips.org>
360
361 * elf32-vax.c (elf_vax_relocate_section): Fix a typo.
362
406dba13
KT
3632009-10-23 Kai Tietz <kai.tietz@onevision.com>
364
365 * coff-x86_64.c (coff_amd64_rtype_to_howto): Subtract offset
366 of R_AMD64_PCRLONG_<X> relocations from addend.
367
98950613
AM
3682009-10-23 Alan Modra <amodra@bigpond.net.au>
369
370 * plugin.c: Produce empty object if not BFD_SUPPORTS_PLUGINS.
371
dbde1c12
AM
3722009-10-20 Alan Modra <amodra@bigpond.net.au>
373
374 PR binutils/10802
375 * opncls.c (_maybe_make_executable): Make DYNAMIC files executable.
376
ebf275e3
HPN
3772009-10-19 Hans-Peter Nilsson <hp@axis.com>
378
379 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_DTPREL>:
380 Don't subtract the size of the TLS block for non-shared objects
381 from the relocation.
382
6c293e26
AM
3832009-10-17 Arnold Metselaar <arnold.metselaar@planet.nl>
384
385 * coff-z80.c (z80coff_vec): Allow sections to be of type
386 SEC_CODE or SEC_DATA
387
493152cb
AM
3882009-10-16 Alan Modra <amodra@bigpond.net.au>
389
390 PR binutils/10785
391 * coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Don't bfd_alloc
392 bim and bim->buffer. bfd_malloc instead.
393 * peicode.h (pe_ILF_build_a_bfd): Similarly.
394 (ILF_DATA_SIZE): Don't include bim.
395 * opncls.c (bfd_close): Test bim->buffer non-NULL before freeing.
396
f88dc410
AM
3972009-10-14 Alan Modra <amodra@bigpond.net.au>
398
399 * aoutx.h (aout_link_check_ar_symbols): Typo fix.
400
cd2b2c10
L
4012009-10-13 H.J. Lu <hongjiu.lu@intel.com>
402
403 PR binutils/10763
404 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Declare plt
405 earlier.
406
fc3e1e3c
AM
4072009-10-13 Alan Modra <amodra@bigpond.net.au>
408
409 * elflink.c (_bfd_elf_merge_symbol): Revert previous patch.
410
f8076f98
RM
4112009-10-12 Roland McGrath <roland@frob.com>
412
413 * elflink.c (elf_link_add_object_symbols, _bfd_elf_merge_symbol):
414 Fix %s that should be %B in several message formats.
415
f0803690
AM
4162009-10-10 Alan Modra <amodra@bigpond.net.au>
417
418 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols for
419 excluded output sections.
420
0c9b2b4c
TG
4212009-10-09 Tristan Gingold <gingold@adacore.com>
422
423 * mach-o.c (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_RPATH.
424 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
425
ab273af8
TG
4262009-10-09 Tristan Gingold <gingold@adacore.com>
427
428 * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Rename to
429 bfd_mach_o_read_symtab_symbols.
430 (bfd_mach_o_scan_write_thread): Rename to bfd_mach_o_write_thread.
431 (bfd_mach_o_scan_write_relocs): Rename to bfd_mach_o_write_relocs.
432 (bfd_mach_o_scan_write_section_32): Rename to
433 bfd_mach_o_write_section_32.
434 (bfd_mach_o_scan_write_section_64): Rename to
435 bfd_mach_o_write_section_64.
436 (bfd_mach_o_scan_write_segment_32): Rename to
437 bfd_mach_o_write_segment_32.
438 (bfd_mach_o_scan_write_segment_64): Rename to
439 bfd_mach_o_write_segment_64.
440 (bfd_mach_o_scan_write_symtab): Rename to bfd_mach_o_write_symtab.
441 (bfd_mach_o_scan_read_section_32): Rename to
442 bfd_mach_o_read_section_32.
443 (bfd_mach_o_scan_read_section_64): Rename to
444 bfd_mach_o_read_section_64.
445 (bfd_mach_o_scan_read_section): Rename to bfd_mach_o_read_section.
446 (bfd_mach_o_scan_read_symtab_strtab): Rename to
447 bfd_mach_o_read_symtab_strtab.
448 (bfd_mach_o_scan_read_symtab_symbol): Rename to
449 bfd_mach_o_read_symtab_symbol.
450 (bfd_mach_o_scan_read_dysymtab_symbol): Rename to
451 bfd_mach_o_read_dysymtab_symbol.
452 (bfd_mach_o_scan_read_dylinker): Rename to bfd_mach_o_read_dylinker.
453 (bfd_mach_o_scan_read_dylib): Rename to bfd_mach_o_read_dylib.
454 (bfd_mach_o_scan_read_prebound_dylib): Rename to
455 bfd_mach_o_read_prebound_dylib.
456 (bfd_mach_o_scan_read_thread): Rename to bfd_mach_o_read_thread.
457 (bfd_mach_o_scan_read_dysymtab): Rename to bfd_mach_o_read_dysymtab.
458 (bfd_mach_o_scan_read_symtab): Rename to bfd_mach_o_read_symtab.
459 (bfd_mach_o_scan_read_uuid): Rename to bfd_mach_o_read_uuid.
460 (bfd_mach_o_scan_read_linkedit): Rename to bfd_mach_o_read_linkedit.
461 (bfd_mach_o_scan_read_str): Rename to bfd_mach_o_read_str.
462 (bfd_mach_o_scan_read_dyld_info): Rename to bfd_mach_o_read_dyld_info.
463 (bfd_mach_o_scan_read_segment): Rename to bfd_mach_o_read_segment.
464 (bfd_mach_o_scan_read_segment_32): Rename to
465 bfd_mach_o_read_segment_32.
466 (bfd_mach_o_scan_read_segment_64): Rename to
467 bfd_mach_o_read_segment_64.
468 (bfd_mach_o_scan_read_command): Rename to bfd_mach_o_read_command.
469 * mach-o.h (bfd_mach_o_scan_read_dysymtab_symbol): Rename to
470 bfd_mach_o_read_dysymtab_symbol.
471
b2b62060
TG
4722009-10-09 Tristan Gingold <gingold@adacore.com>
473
474 * mach-o.c (bfd_mach_o_section_get_entry_size): Moved.
475 (bfd_mach_o_section_get_nbr_indirect): Ditto.
476 (bfd_mach_o_get_synthetic_symtab): New function.
477 (bfd_mach_o_print_private_header): Print the number of commands
478 in decimal.
479 * mach-o.h (bfd_mach_o_get_synthetic_symtab): Add prototype.
480 * mach-o-target.c: Do not defined bfd_mach_o_get_synthetic_symtab.
481
615b63d4
TG
4822009-10-08 Tristan Gingold <gingold@adacore.com>
483
484 * config.bfd: Add bfd_mach_o_i386_vec in x86_64-darwin targ_selvecs.
485
8654b68a
L
4862009-10-06 H.J. Lu <hongjiu.lu@intel.com>
487
488 * bfd-in2.h: Regenerated.
489
4a056f14
AM
4902009-10-02 Alan Modra <amodra@bigpond.net.au>
491
492 * aout-cris.c (N_SHARED_LIB): Don't define.
493 * hp300bsd.c (N_SHARED_LIB): Don't define.
494 * i386bsd.c (N_SHARED_LIB): Don't define.
495 * i386linux.c (N_SHARED_LIB): Don't define.
496 * i386lynx.c (N_SHARED_LIB): Don't define.
497 * m68klinux.c (N_SHARED_LIB): Don't define.
498 * m88kmach3.c (N_SHARED_LIB): Don't define.
499 * mipsbsd.c (N_SHARED_LIB): Don't define.
500 * newsos3.c (N_SHARED_LIB): Don't define.
501 * pc532-mach.c (N_SHARED_LIB): Don't define.
502 * pdp11.c (N_SHARED_LIB): Don't define.
503 * sparclinux.c (N_SHARED_LIB): Don't define.
504 * vaxbsd.c (N_SHARED_LIB): Don't define.
505
eb503a00
DK
5062009-10-01 Dave Korn <dave.korn.cygwin@gmail.com>
507
508 * cofflink.c (_bfd_coff_generic_relocate_section): Look for the aux
509 symbol for a weak undef in the auxbfd, not the input bfd.
510
64028ad7
UW
5112009-10-01 Ulrich Weigand <uweigand@de.ibm.com>
512
513 * elf32-spu.c (spu_elf_auto_overlay): Insert icache linker script
514 after .toe instead of before .text section. Set the LMA of all
515 overlay sections to their icache IA address.
516 (spu_elf_find_overlays): Determine icache set id without reference
517 to the LMA.
518
27a5525e
TG
5192009-09-30 Tristan Gingold <gingold@adacore.com>
520
521 * configure.com: Use hosts/alphavms.h on both alpha and ia64 VMS.
522
464d3bd4
L
5232009-09-29 H.J. Lu <hongjiu.lu@intel.com>
524
525 * elf64-x86-64.c (elf64_x86_64_append_rela): New.
526 (elf64_x86_64_relocate_section): Use it.
527 (elf64_x86_64_finish_dynamic_symbol): Likewise.
528
c7927a3c
NC
5292009-09-29 DJ Delorie <dj@redhat.com>
530
531 * Makefile.am (ALL_MACHINES): Add cpu-rx.lo.
532 (ALL_MACHINES_CFILES): Add cpu-rx.c.
533 (BFD32_BACKENDS): Add elf32-rx.lo.
534 (BFD32_BACKENDS_CFILES): Add elf32-rx.c.
535 * archures.c (bfd_architecture): Add bfd_arch_rx and bfd_mach_rx.
536 Export bfd_rx_arch.
537 (bfd_archures_list): Add bfd_rx_arch.
538 * config.bfd: Add entry for rx-*-elf.
539 * configure.in: Add entries for bfd_elf32_rx_le_vec and
540 bfd_elf32_rx_be_vec.
541 * reloc.c: Add RX relocations.
542 * targets.c: Add RX target vectors.
543 * Makefile.in: Regenerate.
544 * bfd-in2.h: Regenerate.
545 * configure: Regenerate.
546 * libbfd.h: Regenerate.
547 * cpu-rx.c: New file.
548 * elf32-rx.c: New file.
549
0505e902
SR
5502009-09-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
551
552 * elf32-cr16.c (elf32_cr16_relocate_section): Removed
f8076f98 553 info->relocatable to fix the ld/testsuites/ld-elf/linkonce1 test case.
0505e902 554
caa83f8b
NC
5552009-09-28 Nick Clifton <nickc@redhat.com>
556
557 PR 10478: Accepting Solaris binaries.
558 * elf.c (bfd_section_from_shdr): Allow SHN_BEFORE and SHN_AFTER
559 section link values in x86 binaries.
560 * elfcode.h (elf_object_p): Likewise.
561
fc9f1df9
NC
5622009-09-28 Philippe De Muyter <phdm@macqel.be>
563
564 * elf32-m68k.c (elf_m68k_final_write_processing): New function.
565 (elf_backend_final_write_processing): Macro defined as above function.
566
21d799b5
NC
5672009-09-25 Martin Thuresson <martint@google.com>
568
4a056f14 569 Update sources to make alpha and arm targets compile cleanly with
21d799b5
NC
570 -Wc++-compat:
571 * ecoff.c: Add casts.
572 * ecofflink.c: Add casts.
573 * elf64-alpha.c: Add casts.
574 (struct alpha_elf_got_entry, struct alpha_elf_reloc_entry): Move
575 to top level.
576 (SKIP_HOWTO): Use enum name.
577 * elf32-arm.c: Add casts.
578 (elf32_arm_vxworks_bed): Update code to avoid multiple
579 declarations.
580 (struct map_stub): Move to top level.
581
935bd1e0
L
5822009-09-24 H.J. Lu <hongjiu.lu@intel.com>
583
584 PR ld/10630
585 * elflink.c (elf_link_output_extsym): Turn off visibility on
586 local symbol.
587 (bfd_elf_final_link): Turn off visibility on dynamic local
588 symbol.
589
107601c8
AM
5902009-09-24 Alan Modra <amodra@bigpond.net.au>
591
592 PR binutils/10654
593 * dwarf2.c (lookup_address_in_line_info_table): Remove workaround
594 for invalid location lists generated by gcc-2.95 and Intel 6.0 C++.
595 Remove "function" parm, adjust caller.
596
7ee314fa
AM
5972009-09-23 Matt Rice <ratmice@gmail.com>
598
599 * bfd-in.h (bfd_elf_size_dynamic_sections): Add audit and depaudit
600 arguments.
601 * elflink.c (bfd_elf_size_dynamic_sections): Generate DT_AUDIT,
602 DT_DEPAUDIT from audit/depaudit arguments.
603 (elf_finalize_dynstr): Finalize DT_AUDIT and DT_DEPAUDIT strtab entries.
604 (elf_link_add_object_symbols): Set dt_audit target data when finding a
605 DT_AUDIT.
606 * bfd-in2.h: Regenerate.
607 * bfd-elf.h: Add dt_audit to elf_obj_tdata, and elf_dt_audit macro.
608
d3e32c2e
JZ
6092009-09-23 Jie Zhang <jie.zhang@analog.com>
610
611 * elf32-bfin.c (_bfinfdpic_size_got_plt): Make sure empty
612 .rel.plt and .plt sections are removed.
613 (elf32_bfinfdpic_size_dynamic_sections): Remove empty .dynbss
614 section. Remove the duplicated removing of empty .rel.plt
615 section.
616
a10917ef
RS
6172009-09-21 Richard Sandiford <rdsandiford@googlemail.com>
618
619 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Extend previous
620 patch to handle the new personality relaxation.
621
30af5962
RS
6222009-09-21 Richard Sandiford <rdsandiford@googlemail.com>
623
624 * elf-eh-frame.c (make_pc_relative): New function.
625 (_bfd_elf_write_section_eh_frame): Use it.
626
a7f2871e
AM
6272009-09-21 Alan Modra <amodra@bigpond.net.au>
628
629 * elf32-ppc.c (TLS_GET_ADDR_GLINK_SIZE): Define.
630 (ADD_3_12_2, BEQLR, CMPWI_11_0, LWZ_11_3, LWZ_12_3): Define.
631 (MR_0_3, MR_3_0): Define.
632 (struct ppc_elf_link_hash_table): Add no_tls_get_addr_opt.
633 (ppc_elf_select_plt_layout): Save emit_stub_syms param earlier.
634 (ppc_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
635 table. Check for presense of __tls_get_addr_opt
636 (allocate_dynrelocs): Increase glink entry size for __tls_get_addr.
637 (ppc_elf_size_dynamic_sections): Add DT_PPC_TLS_OPT tag.
638 (write_glink_stub): Add param p.
639 (ppc_elf_relocate_section): Adjust write_glink_stub call.
640 (ppc_elf_finish_dynamic_symbol): Emit special glink call stub for
641 __tls_get_addr.
642 * elf32-ppc.h (ppc_elf_tls_setup): Update prototype.
643 * elf64-ppc.c (struct ppc_link_hash_table): Add no_tls_get_addr_opt.
644 (ppc64_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
645 table. Check for presense of __tls_get_addr_opt.
646 (ppc64_elf_size_dynamic_sections): Add DT_PPC64_TLS_OPT tag.
647 (LD_R11_0R3, LD_R12_0R3, MR_R0_R3, CMPDI_R11_0, ADD_R3_R12_R13,
648 BEQLR, MR_R3_R0, MFLR_R11, STD_R11_0R1, BCTRL, LD_R11_0R1,
649 LD_R2_0R1, MTLR_R11): Define.
650 (build_tls_get_addr_stub): New function.
651 (ppc_build_one_stub): Call it.
652 (ppc_size_one_stub): Add extra size for __tls_get_addr stub.
653 (ppc64_elf_relocate_section): Don't change nop to ld 2,40(1) for
654 __tls_get_addr plt call.
655 * elf64-ppc.h (ppc64_elf_tls_setup): Update prototype.
656
18e04883
RS
6572009-09-19 Richard Sandiford <rdsandiford@googlemail.com>
658
659 * elf-bfd.h (eh_cie_fde): Add personality_offset and
660 make_per_encoding_relative to the CIE structure. Add a padding field.
661 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Use 0x70
662 rather than 0xf0 when masking out the base address encoding
663 Record the offset of personality data from the start of the CIE.
664 Remove a repeated elf_backend_can_make_relative_eh_frame check.
665 (find_merged_cie): Take an info argument. If the personality
666 binds locally, try converting an absolute personality into
667 a local one.
668 (_bfd_elf_discard_section_eh_frame): Use 0x70 rather than 0xf0
669 when masking out the base address encoding. Update the call to
670 find_merged_cie.
671 (_bfd_elf_eh_frame_section_offset): Discard relocations against
672 the personality data if we are converting into PC-relative form.
673 (_bfd_elf_write_section_eh_frame): Use 0x70 rather than 0xf0
674 when masking out the base address encoding. Handle
675 make_per_encoding_relative.
676
bd6c6e2b
AM
6772009-09-18 Alan Modra <amodra@bigpond.net.au>
678
679 PR ld/10406
680 * elf32-ppc.c (ppc_elf_howto_raw): Make R_PPC_EMB_SDAI16 and
681 R_PPC_EMB_SDA2I16 complain_overflow_signed.
682 (create_sdata_sym): Pass info rather than htab.
683 Update all callers. Ensure symbols are hidden.
684 (ppc_elf_check_relocs): Allow SDAREL16 when shared.
685 (ppc_elf_size_dynamic_sections): When shared, equate _SDA_BASE_ to
686 _GLOBAL_OFFSET_TABLE_.
687 (elf_finish_pointer_linker_section): Don't assume that sdata base
688 symbol is always at 0x8000 offset. Don't subtract the addend here.
689 (is_static_defined): New function.
690 (ppc_elf_relocate_section): Verify symbol base used in SDA relocs
691 is statically defined. Clear addend for EMB_SDAI16 and EMB_SDA2I16
692 relocs. Downgrade error on unexpected section for EMB_SDA2REL
693 reloc symbols to a warning.
694
ca58b19f
NC
6952009-09-18 Nick Clifton <nickc@redhat.com>
696
697 * po/es.po: Updated Spanish translation.
2f0205e8 698 * po/vi.po: Updated Vietnamese translation.
ca58b19f 699
b31867b6
AM
7002009-09-18 Alan Modra <amodra@bigpond.net.au>
701
702 * elf64-ppc.c (follow_link, elf_follow_link, ppc_follow_link): New
703 functions. Use throughout.
704 (ppc64_elf_copy_indirect_symbol): Set direct symbol "oh" field
705 from indirect symbol.
706 (lookup_fdh): Rename from get_fdh. Follow indirect sym links.
707 (add_symbol_adjust): Simplify.
708 (defined_code_entry, defined_func_desc): New functions.
709 (ppc64_elf_gc_keep): Follow indirect sym links. Use defined_code_entry.
710 (ppc64_elf_gc_mark_dynamic_ref): Use defined_func_desc and
711 defined_code_entry to follow indirect sym links.
712 (ppc64_elf_gc_mark_hook, func_desc_adjust): Likewise.
713 (ppc_type_of_stub): Follow indirect sym links.
714 (toc_adjusting_stub_needed): Likewise.
715 (ppc_build_one_stub): Likewise. Make undefined dot-symbols weak
716 rather than defining them at stub.
717 (ppc64_elf_relocate_section): Rewrite call test to avoid multiple
718 assignments in test.
719
afecc97c 7202009-09-16 Tristan Gingold <gingold@adacore.com>
7ee314fa 721
afecc97c
TG
722 * mach-o.h (bfd_mach_o_filetype): Add new constants from darwin10.
723 Reindent.
724 * mach-o.c (bfd_mach_o_cpu_name): Reindent.
725 (bfd_mach_o_filetype_name): Complete with new constants. Reindent.
726 (bfd_mach_o_print_private_header): Use fputs instead of fprintf
727 when possible to avoid warnings.
728 (bfd_mach_o_print_section_map): Ditto.
729 (bfd_mach_o_section_get_entry_size): New function.
730 (bfd_mach_o_section_get_nbr_indirect): Simplify using the newly
731 added function.
732 (bfd_mach_o_print_dysymtab): Print address of indirect symbols.
733
df58f7b0
NC
7342009-09-14 Nick Clifton <nickc@redhat.com>
735
736 * po/fi.po: Updated Finnish translation.
737
1e9cc1c2
NC
7382009-09-11 Nick Clifton <nickc@redhat.com>
739
740 * po/bfd.pot: Updated by the Translation project.
741
8b31b6c4
NC
7422009-09-11 Philippe De Muyter <phdm@macqel.be>
743
744 * binary.c (binary_object_p): Remove bfd_external_binary_architecture
745 hack. objcopy `-B' (`--binary-architecture') option is now handled
746 in a generic way.
747
681fe688
NC
7482009-09-11 Nick Clifton <nickc@redhat.com>
749
750 * rs6000-core.c (read_hdr): Fix typo in recent C++ compatibility
751 changes.
752
3b6cfd4e 7532009-09-11 Jie Zhang <jie.zhang@analog.com>
83fd9437
JZ
754
755 * elf32-bfin.c (bfinfdpic_relocs_info_find): Just return
756 NULL if `ht' is NULL.
757
a50b1753
NC
7582009-09-09 Martin Thuresson <martin@mtme.org>
759
4a056f14 760 Update sources to compile cleanly with -Wc++-compat:
a50b1753
NC
761 * aoutx.h: Add casts.
762 * archive.c: Add casts.
763 * archive64.c: Add casts.
764 * archures.c: Add casts.
765 * bfd-in2.h: Regenerated.
766 * bfd.c: Add casts. (enum bfd_direction): Move out to top level.
767 * bfdio.c: Add casts.
768 * binary.c: Add casts.
769 * cache.c (cache_bseek,cache_bread_1,cache_bwrite): Updated
770 parameter to use enum value instead of int.
771 * coffcode.h: Add casts.
772 * coffgen.c: Add casts.
773 * cofflink.c: Add casts.
774 * compress.c: Add casts.
775 * dwarf1.c: Add casts.
776 * dwarf2.c: Add casts. (struct dwarf2_debug): Rename member bfd to
777 bfd_ptr. Update code to use new name.
778 * elf-attrs.c: Add casts.
779 * elf-bfd.h (elf_link_virtual_table_entry): Gives name to
780 anonymous struct. (union gotplt_union, struct
781 elf_link_virtual_table_entry): Move to top level.
782 * elf-eh-frame.c: Add casts.
783 * elf-strtab.c: Add casts.
784 * elf.c: Add casts. (_bfd_elm_make_Section_from_phdr): Change
785 argument name from typename to type_name.
786 * elf32-i386.c: Add casts.
787 * elf64-x86-64.c: Add casts.
788 * elfcode.h: Add casts.
789 * elfcore.h: Add casts.
790 * elflink.c: Add casts.
791 * format.c: Add casts.
792 * hash.c: Add casts.
793 * ihex.c: Add casts.
794 * libaout.h (enum aout_subformat, enum aout_magic): Move to top
795 level.
796 * libbfd.c: Add casts.
797 * linker.c: Add casts.
798 * merge.c: Add casts.
799 * opncls.c: Add casts.
800 * peXXigen.c: Add casts.
801 * peicode.h: Add casts.
802 * reloc.c: Add casts.
803 * section.c: Add casts.
804 * simple.c: Add casts.
805 * srec.c: Add casts.
806 * stabs.c: Add casts.
807 * syms.c: Add casts.
808 * targets.c: Add casts.
809 * tekhex.c: Add casts.
810 * verilog.c: Add casts.
811
f3b4f6d0
PB
8122009-09-09 Paolo Bonzini <bonzini@gnu.org>
813
814 * configure: Regenerate.
815
67d74e43
DJ
8162009-09-09 Daniel Jacobowitz <dan@codesourcery.com>
817
818 * elf32-arm.c (elf32_arm_final_link_relocate): Set sym_flags
819 for the mode of target PLT entries.
820 (allocate_dynrelocs): Only adjust symbol type if setting its
821 value.
822
07c58694
PB
8232009-09-09 Paolo Bonzini <bonzini@gnu.org>
824
f3b4f6d0 825 * configure: Regenerate.
07c58694 826
cfcac11d
NC
8272009-09-09 Nick Clifton <nickc@redhat.com>
828
829 PR 10478:
830 * elf.c (bfd_section_from_shdr): Do not reject sparc binaries with
831 section headers containing sh_link values of SHN_BEFORE or
832 SHN_AFTER.
833 * elfcode.h (elf_object_p): Likewise.
834
ad86f1fb
TG
8352009-09-09 Tristan Gingold <gingold@adacore.com>
836
837 Handle DYLD_INFO introduced by Darwin10.
838 * mach-o.h (bfd_mach_o_load_command_type): Add
839 BFD_MACH_O_LC_DYLD_INFO.
840 (bfd_mach_o_dyld_info_command): New type.
841 (bfd_mach_o_load_command): Add dyld_info field.
842 * mach-o.c (bfd_mach_o_scan_read_str): Reduce size of buf.
843 (bfd_mach_o_scan_read_dyld_info): New function.
844 (bfd_mach_o_scan_read_command): Handle BFD_MACH_O_LC_DYLD_INFO.
845 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
846 (bfd_mach_o_load_command_name): AddB FD_MACH_O_LC_DYLD_INFO.
847 (bfd_mach_o_print_dyld_info): New function.
848
1004c3e1
SR
8492009-09-09 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
850
851 * elf32-cr16.c (elf32_cr16_relocate_section): Add code to discard the
852 linkonce or linker script discarded section.
853
498199fc
AM
8542009-09-09 Alan Modra <amodra@bigpond.net.au>
855
856 * elf32-xtensa.c (elf_xtensa_relax_section): Delete -r check.
857
c86ad514
AS
8582009-09-07 Andreas Schwab <schwab@linux-m68k.org>
859
860 * elf32-m68k.c (rtype_to_howto): If the reloc index is out of
861 range call the bfd error hander and use R_68K_NONE instead.
862
b11d79f2
TG
8632009-09-07 Tristan Gingold <gingold@adacore.com>
864
23f938f1
TG
865 * po/SRC-POTFILES.in: Regenerate.
866 * po/bfd.pot: Regenerate.
867
b11d79f2
TG
868 * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
869 BFD_HAVE_SYS_STAT_TYPE_MEMBER): Moved to gas/acinclude.m4
870 * configure.in: Move tests for tm_gmtoff, st_mtim.tv_sec and
871 st_mtim.tv_nsec to gas/configure.in
872 (bfd_elf64_ia64_vms_vec): Remove vmsutil.lo
873 * configure: Regenerate.
874 * config.in: Regenerate.
875 * vmsutil.c: Moved to gas/config/te-vms.c
876 * vmsutil.h: Removed.
877 * Makefile.am (BFD32_BACKENDS_CFILES): Remove vmsutil.c
878 (BFD32_BACKENDS): Remove vmsutil.lo
879 * Makefile.in: Regenerate.
880
3d03da9a
EZ
8812009-09-05 Eli Zaretskii <eliz@gnu.org>
882
883 * coffcode.h: Include libiberty.h.
884
96d56e9f
NC
8852009-09-05 Martin Thuresson <martin@mtme.org>
886
887 * coff-arm.c (coff_arm_relocate_section)
888 (record_thumb_to_arm_glue, bfd_arm_process_before_allocation):
889 Change member name class to symbol_class.
890 * coff-i960.c (coff_i960_relocate_section) Rename variable
891 class to class_val. Change member name class to symbol_class.
892 * coff-rs6000.c (_bfd_xcoff_swap_aux_in)
893 (_bfd_xcoff_swap_aux_out): Rename arguments class to in_class.
894 * coff-stgo32.c (adjust_aux_in_post)
895 (adjust_aux_out_pre, adjust_aux_out_post): Rename arguments class
896 to in_class.
897 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in)
898 (_bfd_xcoff64_swap_aux_out): Rename arguments class to in_class.
899 * coffcode.h (coff_pointerize_aux_hook): Rename variable class
900 to n_sclass.
901 * coffgen.c (coff_write_symbol, coff_pointerize_aux): Rename
902 variables named class to n_sclass. (coff_write_symbols): Rename
903 variable class to sym_class. (bfd_coff_set_symbol_class): Rename
904 argument class to symbol_class.
905 * cofflink.c (_bfd_coff_link_hash_newfunc)
906 (coff_link_add_symbols, _bfd_coff_link_input_bfd)
907 (_bfd_coff_write_global_sym, _bfd_coff_generic_relocate_section):
908 Update code to use renamed members.
909 * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Rename
910 argument class to in_class.
911 * libcoff-in.h (struct coff_link_hash_entry, struct
912 coff_debug_merge_type) Renamed members class to symbol_class and
913 type_class.
914 * libcoff.h Regenerated.
915 * peXXigen.c: (_bfd_XXi_swap_aux_in, _bfd_XXi_swap_aux_out):
916 Rename argument class to in_class.
917 * pef.c (bfd_pef_parse_imported_symbol): Update code to use
918 renamed members.
919 * pef.h (struct bfd_pef_imported_symbol): Changed name of
920 member class to symbol_class.
921
df7e4f42
L
9222009-09-04 H.J. Lu <hongjiu.lu@intel.com>
923
924 * configure: Regenerated.
925
bac4da50
TG
9262009-09-04 Tristan Gingold <gingold@adacore.com>
927
928 * configure.in: Bump version to 2.20.51
bac4da50 929
57e96a08
AM
9302009-09-04 Alan Modra <amodra@bigpond.net.au>
931
932 * elf32-spu.c (spu_elf_relocate_section): Correct 2009-07-24 logic.
933
153d38f6
JZ
9342009-09-04 Jie Zhang <jie.zhang@analog.com>
935
936 * elf32-bfin.c (elf32_bfinfdpic_create_dynamic_sections): Always
937 create .rela.bss.
938 (elf32_bfinfdpic_size_dynamic_sections): Set SEC_EXCLUDE flag
939 for empty .rela.bss and .rel.plt sections.
940
5bbc5ae7
AN
9412009-09-03 Adam Nemet <anemet@caviumnetworks.com>
942
943 * elfxx-mips.c (mips_elf_calculate_relocation): Don't relocate
944 R_MIPS_JALR unless symbol resolves locally.
945
99da6b5f
AN
9462009-09-03 Adam Nemet <anemet@caviumnetworks.com>
947
948 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Don't set
949 has_static_relocs for R_MIPS_JALR.
950
fcbc2f09
MR
9512009-09-03 Maciej W. Rozycki <macro@codesourcery.com>
952
953 * elf64-mips.c (mips_elf64_howto_table_rela): Add support for
954 R_MIPS_TLS_DTPMOD64 and R_MIPS_TLS_TPREL64, replacing the
955 respective stubs.
956
90d60710
L
9572009-09-01 H.J. Lu <hongjiu.lu@intel.com>
958
959 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Declare
960 plt earlier.
961
11d73275
TG
9622009-09-01 Tristan Gingold <gingold@adacore.com>
963
964 * makefile.vms: Ported to Itanium VMS. Remove useless variable and
965 dependencies. Reindent.
966 * configure.com: Ported to Itanium VMS. Now generates a build.com
967 to build without make. Add messages but make edit silent.
968 * hosts/alphavms.h: Add a prototype for stpcpy.
969 * vms.c: Add a missing include for Alpha VMS.
970 * elfxx-ia64.c (ELF_OSABI): Define for OpenVMS.
971
94be91de
JB
9722009-08-31 Jan Beulich <jbeulich@novell.com>
973
974 * elf-bfd.h (bfd_elf_get_default_section_type): Declare.
975 * elf.c (bfd_elf_get_default_section_type): New.
976 (elf_fake_sections): Use bfd_elf_get_default_section_type.
977
883c7410
L
9782009-08-30 H.J. Lu <hongjiu.lu@intel.com>
979
980 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert the
981 accidental checkin.
982 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likwise.
983
095106a2
AM
9842009-08-30 Alan Modra <amodra@bigpond.net.au>
985
986 PR ld/10569
987 * bfd.c (bfd_emul_get_maxpagesize): Don't abort.
988 (bfd_emul_get_commonpagesize): Likewise.
989
d3ce72d0
NC
9902009-08-29 Martin Thuresson <martin@mtme.org>
991
992 * elf32-arm.c (struct stub_def): Rename member template to
993 template_sequence. (arm_build_one_stub,
994 find_stub_size_and_template, arm_size_one_stub, arm_map_one_stub):
995 Rename variable template to template_sequence.
996 * elfxx-ia64.c (elfNN_ia64_relax_br, elfNN_ia64_relax_brl):
997 Rename variable template to template_val.
998 * aoutx.h (NAME (aout, make_empty_symbol)): Rename variable
999 new to new_symbol.
1000 * coffgen.c (coff_make_empty_symbol)
1001 (coff_bfd_make_debug_symbol): Rename variable new to new_symbol.
1002 * cpu-ia64-opc.c (ext_reg, ins_imms_scaled): Rename variable
1003 new to new_insn.
1004 * ecoff.c (_bfd_ecoff_make_empty_symbol): Rename variable new
1005 to new_symbol.
1006 * elf32-m68k.c (elf_m68k_get_got_entry_type): Rename argument
1007 new to new_reloc.
1008 * hash.c (bfd_hash_lookup): Rename variable new to new_string.
1009 * ieee.c (ieee_make_empty_symbol): Rename variable new to
1010 new_symbol.
1011 * linker.c (bfd_new_link_order): Rename variable new to
1012 new_lo.
1013 * mach-o.c (bfd_mach_o_sizeof_headers): Rename variable new to
1014 symbol.
1015 * oasys.c (oasys_make_empty_symbol): Rename variable new to
1016 new_symbol_type.
1017 * pdp11.c (NAME (aout, make_empty_symbol)): Rename variable
1018 new to new_symbol_type.
1019 * plugin.c (bfd_plugin_make_empty_symbol): Rename variable new
1020 to new_symbol.
1021 * rs6000-core.c (CoreHdr, VmInfo): Rename union member new to
1022 new_dump.
1023 (read_hdr, rs6000coff_core_p)
1024 (rs6000coff_core_file_matches_executable_p)
1025 (rs6000coff_core_file_failing_command)
1026 (rs6000coff_core_file_failing_signal): Updated function to use new
1027 union member name.
1028 * som.c (som_make_empty_symbol): Rename variable new to
1029 new_symbol_type.
1030 * syms.c (_bfd_generic_make_empty_symbol): Rename variable new
1031 to new_symbol.
1032 * tekhex.c (first_phase, tekhex_make_empty_symbol): Rename
1033 variable new to new_symbol.
1034
573e8a1c
RW
10352009-08-27 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1036
1037 * acinclude.m4 (AM_INSTALL_LIBBFD): Call AM_SUBST_NOTMAKE for
1038 bfdlibdir and bfdincludedir.
1039 * Makefile.am (bfdlibdir, bfdincludedir): Move definition ...
1040 [INSTALL_LIBBFD]: ... here, ...
1041 [INSTALL_LIBBFD]: ... and empty overrides here.
1042 [!INSTALL_LIBBFD]: (rpath_bfdlibdir): New variable.
1043 [!INSTALL_LIBBFD] (libbfd_la_LDFLAGS): Use it.
1044 * Makefile.in: Regenerate.
1045 * configure: Regenerate.
1046
325e58c7
NC
10472009-08-26 Maxim Kuvyrkov <maxim@codesourcery.com>
1048
1049 * elf32-m68k.c: Rewrite initialization of GOT entries for TLS
1050 relocations. Rewrite output of dynamic TLS relocations.
1051 (DTP_OFFSET, TP_OFFSET): New constants.
1052 (dtpoff_base): Update.
1053 (tpoff): Rename to tpoff_base, update.
1054 (elf_m68k_init_got_entry_static, elf_m68k_init_got_entry_local_shared):
1055 New functions. Move code from elf_m68k_relocate_section here.
1056 (elf_m68k_relocate_section): Update.
1057 (elf_m68k_finish_dynamic_symbol): Fix handling of local TLS symbols.
1058
e5f2b1de
NC
10592009-08-26 Maxim Kuvyrkov <maxim@codesourcery.com>
1060
1061 * elf32-m68k.c (elf_m68k_copy_indirect_symbol): Propagate
1062 non_got_ref value.
1063 (elf_m68k_check_relocs): Handle dynamic TLS relocations.
1064 Handle non_got_ref field.
1065 (elf_m68k_adjust_dynamic_symbol): Handle non_got_ref field.
1066
0666b2c3
AM
10672009-08-26 Alan Modra <amodra@bigpond.net.au>
1068
600b8686 1069 PR ld/10518
0666b2c3
AM
1070 * linker.c (bfd_find_version_for_sym): Revert warning.
1071
78a03297
AM
10722009-08-26 Alan Modra <amodra@bigpond.net.au>
1073
600b8686 1074 PR ld/10518
78a03297
AM
1075 * linker.c (bfd_find_version_for_sym): Override a "*" match by any
1076 other wildcard match. Warn on multiple wildcard matches.
1077
81ecdfbb
RW
10782009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1079
14ec8efd
RW
1080 * Makefile.am (libbfd_la_LDFLAGS): Initialize early, to allow
1081 appending.
1082 [INSTALL_LIBBFD] (bfdlib_LTLIBRARIES, bfdinclude_HEADERS): Set
1083 only in this condition.
1084 [!INSTALL_LIBBFD] (noinst_LTLIBRARIES, libbfd_la_LDFLAGS): New,
1085 to build but not install libbfd.la in this condition.
1086 (install-bfdlibLTLIBRARIES, uninstall-bfdlibLTLIBRARIES)
1087 (install_libbfd, install_libbfd): Remove.
1088 * Makefile.in: Regenerate.
1089 * doc/Makefile.am (AM_CPPFLAGS): Renamed from ...
1090 (INCLUDES): ... this.
1091 ($(MKDOC)): Adjust.
1092 * doc/Makefile.in: Regenerate.
1093
95b40122
RW
1094 * Makefile.am (AUTOMAKE_OPTIONS): Remove cygnus, instead use
1095 no-dist and foreign.
1096 (EXTRA_libbfd_la_SOURCES): New, list $(CFILES) to allow
1097 dependency tracking to work for them.
1098 (targets.lo, archures.lo, dwarf.lo): Rewrite to
1099 use automake dependency tracking mechanism.
1100 (MKDEP, DEP, DEP1, dep.sed, dep, dep-in, dep-am): Remove.
1101 (mkdep section): Remove.
1102 (BUILT_SOURCES): New, list $(BUILD_HFILES).
1103 * Makefile.in: Regenerate.
1104 * po/SRC-POTFILES.in, po/bfd.pot: Regenerate.
1105
af542c2e
RW
1106 * Makefile.am (datarootdir, docdir, htmldor, pdfdir)
1107 (install-pdf, install-pdf-recursive, install-html)
1108 (install-html-recursive): Remove.
1109 * Makefile.in: Regenerate.
1110
81ecdfbb
RW
1111 * Makefile.in: Regenerate.
1112 * aclocal.m4: Likewise.
1113 * config.in: Likewise.
1114 * configure: Likewise.
1115
cd1dac3d
DG
11162009-08-21 Daniel Gutson <dgutson@codesourcery.com>
1117
1118 * elf32-arm.c (arch_has_thumb2_nop): New function.
1119 (arch_has_arm_nop): New function.
1120 (elf32_arm_final_link_relocate): NOP opcodes changed.
1121
440ae135
DE
11222009-08-16 Doug Evans <dje@google.com>
1123
1124 * opncls.c (bfd_close): Until BFD_IN_MEMORY has an iovec,
1125 at least don't leak memory.
1126
a109e2f5
DD
11272009-08-13 DJ Delorie <dj@redhat.com>
1128
1129 * elf32-m32c.c (m32c_elf_relax_delete_bytes): Adjust symbol sizes
1130 if needed.
1131
c1742541
NC
11322009-08-12 Nick Clifton <nickc@redhat.com>
1133
1134 * po/fi.po: Updated Finnish translation.
1135
6a9adeca
BS
11362009-08-11 Bernd Schmidt <bernd.schmidt@analog.com>
1137
1138 Merge some FRV FDPIC changes into the Blackfin code.
1139 * elf32-bfin.c (struct bfinfdpic_elf_link_hash_table): Add pointer to
1140 summary reloc information.
1141 (bfinfdpic_dynamic_got_plt_info): New.
1142 (_bfin_create_got_section): Create the PLT section here.
1143 (elf32_bfinfdpic_create_dynamic_sections): Not here.
1144 (_bfinfdpic_count_nontls_entries): Move out of...
1145 (_bfinfdpic_count_got_plt_entries): ... here.
1146 (_bfinfdpic_count_relocs_fixups): Likewise.
1147 (_bfinfdpic_reset_got_plt_entries): New.
1148 (_bfinfdpic_size_got_plt): Move out of...
1149 (elf32_bfinfdpic_size_dynamic_sections): ... here.
1150 (bfinfdpic_relocate_section): Be careful not to call
1151 _bfinfdpic_add_rofixup or _bfinfdpic_add_dyn_reloc for deleted relocs.
1152 (bfinfdpic_check_discarded_relocs, bfinfdpic_elf_discard_info):
1153 New functions.
1154 (elf_backend_discard_info): Define for FD-PIC.
1155
5dabe785
AM
11562009-08-11 Alan Modra <amodra@bigpond.net.au>
1157
1158 * elflink.c: Add FIXMEs for some places that require octets_per_byte
1159 adjustments.
1160 * elf-eh-frame.c: Likewise.
1161 * merge.c: Likewise.
1162
ea7a63de
AM
11632009-08-11 Alan Modra <amodra@bigpond.net.au>
1164
1165 * configure.in: Remove elf-ifunc.lo from common ELF files. Add
1166 to x86 and x86_64 configurations.
1167 * configure: Regenerate.
1168
9bf609ec
JK
11692009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1170
1171 Stop using bfd_usrdata in libbfd.
1172 * coff-stgo32.c (bfd_coff_go32stub): Remove.
1173 (stub_bytes, comment): Replace STUBSIZE by GO32_STUBSIZE.
1174 (adjust_filehdr_in_post): Declare the abfd parameter as unused.
1175 Replace STUBSIZE by GO32_STUBSIZE. Save now the stub in
1176 filehdr_dst->u.go32.stub. New comment with the reason.
1177 (adjust_filehdr_out_pre): Replace STUBSIZE by GO32_STUBSIZE.
1178 Substitute the removed macro bfd_coff_go32stub.
1179 (adjust_filehdr_out_post, adjust_scnhdr_in_post, adjust_scnhdr_out_pre)
1180 (adjust_scnhdr_out_post, adjust_aux_in_post, adjust_aux_out_pre)
1181 (adjust_aux_out_post): Replace STUBSIZE by GO32_STUBSIZE.
1182 (create_go32_stub, go32_stubbed_coff_bfd_copy_private_bfd_data):
1183 Replace STUBSIZE by GO32_STUBSIZE. Substitute the removed macro
1184 bfd_coff_go32stub.
1185 * coffcode.h (coff_mkobject_hook): Initialize coff->go32stub.
1186 * libcoff-in.h (coff_data_type): New field go32stub.
1187 * libcoff.h: Regenerated.
1188
e39e47bd
JK
11892009-08-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1190
1191 Fix go32 stub preservation by objcopy.
1192 * coff-stgo32.c (adjust_filehdr_in_post): Use bfd_malloc.
1193 (go32_stubbed_coff_bfd_copy_private_bfd_data): Optionally allocate OBFD
1194 go32stub.
1195
ffcb4889
NS
11962009-08-10 Nathan Sidwell <nathan@codesourcery.com>
1197
1198 * elf32-arm.c (elf32_arm_size_stubs): Don't die on undefined local
1199 symbols.
1200 (elf32_arm_final_link_relocate): Treat local undefined symbols the
1201 same as global undefined symbols.
1202 (elf32_arm_relocate_section): Give an error for local undefined
1203 non-weak symbols, unless the reloc will not use the symbol.
1204
01017ef8
NS
12052009-08-10 Nathan Sidwell <nathan@codesourcery.com>
1206
1207 * elf32-ppc.c (shared_stub_entry, stub_entry): Use r12, not r11.
1208 (ppc_elf_relax_section): Use symbol index to distinguish
1209 relocatable stubs.
1210
a8ad78a7
AM
12112009-08-10 Alan Modra <amodra@bigpond.net.au>
1212
1213 * elf32-ppc.c (ppc_elf_relax_section): Ignore non-code sections.
1214
91e21fb7
AM
12152009-08-10 Alan Modra <amodra@bigpond.net.au>
1216
1217 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Don't clear plt
1218 info for STT_GNU_IFUNC.
1219 * elf32-ppc.c (ppc_elf_check_relocs): Count a needed plt entry
1220 on got refs in case the symbol turns out to be ifunc.
1221 (ppc_elf_gc_sweep_hook): Similarly.
1222 (ppc_elf_adjust_dynamic_symbol): Adjust assertion.
1223 (allocate_dynrelocs): Don't specially allocate got relocs for ifunc.
1224 (ppc_elf_size_dynamic_sections): Likewise.
1225 (ppc_elf_relocate_section): Likewise.
1226
6a9adeca 12272009-08-09 Bernd Schmidt <bernd.schmidt@analog.com>
cb88ce9f
BS
1228
1229 From Mike Frysinger <michael.frysinger@analog.com>
1230 * elf32-bfin.c (bfin_howto_table, bfin_reloc_map, bfin_check_relocs,
1231 bfin_final_link_relocate, bfin_relocate_section, bfin_gc_sweep_hook,
1232 _bfinfdpic_emit_got_relocs_plt_entries, bfinfdpic_relocate_section,
1233 bfinfdpic_gc_sweep_hook, bfinfdpic_check_relocs,
1234 bfin_finish_dynamic_symbol, bfd_bfin_elf32_create_embedded_relocs):
1235 Adjust to match the renamed reloc definitions.
7ee314fa 1236
e7e75368
AM
12372009-08-08 Alan Modra <amodra@bigpond.net.au>
1238
1239 PR 10494
1240 * elf.c (_bfd_elf_make_section_from_shdr): When setting up section
1241 LMAs, use ELF_IS_SECTION_IN_SEGMENT to match sections with headers.
1242
918d9742
TT
12432009-08-07 Tom Tromey <tromey@redhat.com>
1244
1245 * elf32-microblaze.c (microblaze_elf_check_relocs): Avoid strict
1246 aliasing error.
1247
7ba29e2a
NC
12482009-08-06 Michael Eager <eager@eagercon.com>
1249
1250 * Makefile.am: Add cpu-microblaze.{lo,c}, elf32-microblaze.{lo,c}.
1251 * Makefile.in: Regenerate.
1252 * archures.c: Add bfd_arch_microblaze.
1253 * bfd-in2.h: Regenerate.
1254 * config.bfd: Add microblaze target.
1255 * configure.in: Add bfd_elf32_microblaze_vec target.
1256 * configure: Regenerate.
1257 * cpu-microblaze.c: New.
1258 * elf32-microblaze.c: New.
1259 * libbfd-in.h: Add prototype _bfd_dwarf2_fixup_section_debug_loc().
1260 * libbfd.h: Regenerate.
1261 * reloc.c: Add MICROBLAZE relocations.
1262 * section.c: Add struct relax_table and relax_count to section.
1263 * targets.c: Add bfd_elf32_microblaze_vec.
1264
e47bf690
JJ
12652009-08-06 Jakub Jelinek <jakub@redhat.com>
1266 Alan Modra <amodra@bigpond.net.au>
1267
1268 PR binutils/10492
1269 * elf.c (sym_is_global): Return true even for BSF_GNU_UNIQUE
1270 symbols.
1271 * elf32-mips.c (mips_elf_sym_is_global): Likewise.
1272 * elfn32-mips.c (mips_elf_sym_is_global): Likewise.
1273
3ae046cc
NS
12742009-08-06 Nathan Sidwell <nathan@codesourcery.com>
1275
1276 * elf32-arm.c (elf32_arm_size_stubs): Call layout_sections_again
1277 at least once when fixing cortex-a8.
1278
cd8d5a82
CF
12792009-08-05 Chao-ying Fu <fu@mips.com>
1280
1281 * elf32-mips.c (mips_reloc_map): Add BFD_RELOC_MIPS_JALR.
1282 * elfxx-mips.c (JAL_TO_BAL_P): New define to transform JAL to BAL
1283 for CPUs. It is true for RM9000.
1284 (JALR_TO_BAL_P): New define to transform JALR to BAL. It is true
1285 for all CPUs.
1286 (mips_elf_perform_relocation): Use JAL_TO_BAL_P and JALR_TO_BAL_P
1287 to guard the transformation.
1288
9cc305ec
TS
12892009-08-05 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
1290
1291 * elf32-spu.h (spu_elf_params): Add member emit_fixups.
1292 (spu_elf_size_sections): Declare prototype.
1293 * elf32-spu.c (spu_link_hash_table): Add member sfixup.
1294 (FIXUP_RECORD_SIZE, FIXUP_GET, FIXUP_PUT): New macros.
1295 (spu_elf_emit_fixup): New function.
1296 (spu_elf_relocate_section): Emit fixup for each SPU_ADDR32.
1297 (spu_elf_size_sections): New function.
1298
eb7c4339
NS
12992009-08-05 Nathan Sidwell <nathan@codesourcery.com>
1300
1301 * elf32-arm.c (elf32_arm_stub_type): Add arm_stub_a8_veneer_lwm.
1302 (arm_build_one_stub): Build a8 veneers as a separate pass.
1303 (cortex_a8_erratum_scan): Add prev_num_a8_fixes and stub_changed_p
1304 parameters. Use them to check if we create a different a8 fixup
1305 than the previous pass.
1306 (elf32_arm_size_stubs): Move scope of stub_changed and
1307 prev_num_a8_fixes into main loop.
1308 (elf32_arm_build_stubs): Build a8 veneers in a second pass.
1309
a9585d22
AM
13102009-08-04 Alan Modra <amodra@bigpond.net.au>
1311
1312 * elf32-ppc.c (ppc_elf_relax_section): Correct conditions under
1313 which find_plt_ent is called. Delete redundant code.
1314
45b222d6
L
13152009-08-03 H.J. Lu <hongjiu.lu@intel.com>
1316
1317 PR binutils/10363
1318 * elf.c (bfd_elf_string_from_elf_section): Return NULL on
1319 invalid string offset.
1320
004fb780
L
13212009-08-03 H.J. Lu <hongjiu.lu@intel.com>
1322
1323 PR ld/10433
1324 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Set got
1325 to htab->init_got_offset and plt to htab->init_plt_offset
1326 when discarding space for dynamic relocations.
1327
a877a2b6
AM
13282009-08-03 Alan Modra <amodra@bigpond.net.au>
1329
1330 * elf32-ppc.c (struct plt_entry): Revise comments.
1331 (ppc_elf_check_relocs): Don't create needless plt_entry info
1332 for non-pie executables. Don't test info->pie when info->shared
1333 already covers that case.
1334 (ppc_elf_gc_sweep_hook): Adjust for above change.
1335 (add_stub_sym): Don't test info->pie when info->shared tested.
1336 (allocate_dynrelocs, ppc_elf_size_dynamic_sections): Likewise.
1337 (write_glink_stub, ppc_elf_finish_dynamic_symbol): Likewise.
1338 (ppc_elf_relax_section): Adjust find_plt_ent arguments.
1339 (ppc_elf_relocate_section): Likewise.
1340
de972ffa
AM
13412009-08-03 Alan Modra <amodra@bigpond.net.au>
1342
1343 * elf32-ppc.c (ppc_elf_check_relocs): Always add a plt ref count
1344 for local ifunc symbols in non-pie executables, regardless of
1345 reloc type. Don't specially create ifunc dyn relocs. Tidy ifunc
1346 code so that it's obvious that we only do anything special for
1347 local ifunc syms.
1348 (ppc_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
1349 (allocate_dynrelocs): Correct comment for syms defined in plt.
1350 Don't specially allocate ifunc dyn relocs.
1351 (ppc_elf_relax_section): Relax branches to ifunc plt entries too.
1352 (ppc_elf_relocate_section): Set "relocation" value for ifunc
1353 syms in non-pie executables. No specially allocated dyn relocs
1354 for ifunc to write. Allow for local sym on R_PPC_RELAX32_PLT.
1355 (ppc_elf_finish_dynamic_symbol): Set value of ifunc symbols in
1356 a non-pie executable.
1357
1d85728f
L
13582009-08-02 H.J. Lu <hongjiu.lu@intel.com>
1359 Jakub Jelinek <jakub@redhat.com>
1360
1361 PR ld/6443
1362 * elf32-i386.c (elf_i386_tls_transition): Check executable
1363 instead of shared for TLS when building PIE.
1364 (elf_i386_check_relocs): Likewise.
1365 (elf_i386_allocate_dynrelocs): Likewise.
1366 (elf_i386_relocate_section): Likewise.
1367
1368 * elf64-x86-64.c (elf64_x86_64_tls_transition): Check executable
1369 instead of shared for TLS when building PIE.
1370 (elf64_x86_64_check_relocs): Likewise.
1371 (elf64_x86_64_allocate_dynrelocs): Likewise.
1372 (elf64_x86_64_relocate_section): Likewise.
1373
5d8d4872
AG
13742009-07-31 Anthony Green <green@moxielogic.com>
1375
1376 * config.bfd (targ_cpu): Add moxie-uclinux support.
1377
080a1b9f
HPN
13782009-07-31 Hans-Peter Nilsson <hp@bitrange.com>
1379
1380 * linker.c (fix_syms): Consider SEC_LOAD when choosing section.
1381
25f23106
AM
13822009-07-30 Alan Modra <amodra@bigpond.net.au>
1383
1384 * elf32-ppc.c (ppc_elf_check_relocs): Always set up sections
1385 used by indirect function support. Count dynamic relocs for
1386 ifunc syms.
1387 (ppc_elf_adjust_dynamic_symbol): Tweak for ifunc.
1388 (allocate_dynrelocs): Allocate all non-dynamic ifunc plt entries
1389 in iplt and their relocs in reliplt. Don't make ifunc syms
1390 dynamic. Allocate got entry relocs for non-dynamic ifunc in
1391 reliplt. Handle other dynamic relocs for ifunc.
1392 (ppc_elf_size_dynamic_sections): Alloc dyn relocs for static
1393 ifunc in reliplt, likewise relocs for got against local ifunc.
1394 Typo fix on reliplt size adjust.
1395 (ppc_elf_relocate_section): Don't use plt scheme of allocating
1396 relocs 1-1 with entries for iplt, instead just add using
1397 reloc_count. Write got relocs and dyn relocs for ifunc to reliplt.
1398 Error on invalid ifunc dyn relocs.
1399 (ppc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt
1400 in iplt/reliplt.
1401 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_JMP_IREL,
1402 R_PPC64_REL16, R_PPC64_REL16_LO, R_PPC64_REL16_HI, R_PPC64_REL16_HA.
1403 (ppc64_elf_reloc_type_lookup): Handle new relocs.
1404 (ppc64_elf_check_relocs): Likewise. Count dyn relocs for ifunc.
1405 (allocate_dynrelocs): As for elf32-ppc.c above.
1406 (ppc64_elf_size_dynamic_sections): Likewise.
1407 (ppc_build_one_stub): Put non-dynamic ifunc plt call stubs in iplt,
1408 and their relocs in reliplt. Use R_PPC64_JMP_IREL.
1409 (ppc_size_one_stub): Similarly.
1410 (ppc64_elf_relocate_section): As for elf32-ppc.c above. Handle new
1411 relocs too.
1412 (ppc64_elf_finish_dynamic_symbol): As for elf32-ppc.c above.
1413
80f540b7
HPN
14142009-07-29 Hans-Peter Nilsson <hp@bitrange.com>
1415
1416 * elf64-mmix.c (mmix_elf_relax_section): Revert 2009-05-27
1417 change. Add note to head comment.
1418
4ad4f3cb
JB
14192009-07-28 Jan Beulich <jbeulich@novell.com>
1420
1421 * archive.c (get_extended_arelt_filename): Remove redundant
1422 range check on index.
1423
d8d2f433
DK
14242009-07-27 Doug Kwan <dougkwan@google.com>
1425
1426 * elf32-arm.c (stub_hash_newfunc): Initialize field output_name.
1427
9e675548
L
14282009-07-27 H.J. Lu <hongjiu.lu@intel.com>
1429
1430 * archures.c bfd_*_arch): Sorted.
1431 (bfd_archures_list): Likewise.
1432
86514226
SR
14332009-07-27 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
1434
9e675548 1435 * elf32-cr16.c (elf_cr16_final_link_relocate): Add code to handle
86514226
SR
1436 to R_cr16_NUM32 relocation.
1437
305f7588
MS
14382009-07-26 Michael Eager <eager@eagercon.com>
1439
1440 * archures.c: Add bfd_mach_ppc_405
1441 * bfd-in2.h: Same.
1442
b1995b01
L
14432009-07-25 H.J. Lu <hongjiu.lu@intel.com>
1444
1445 * cpu-i386.c (bfd_x86_64_arch): Fix comment typos.
1446 * cpu-l1om.c (bfd_l1om_arch): Likewise.
1447
8a9036a4
L
14482009-07-25 H.J. Lu <hongjiu.lu@intel.com>
1449
1450 * archures.c (bfd_architecture): Add bfd_arch_l1om.
1451 (bfd_l1om_arch): New.
1452 (bfd_archures_list): Add &bfd_l1om_arch.
1453 * bfd-in2.h: Regenerated.
1454
1455 * config.bfd (targ64_selvecs): Add bfd_elf64_l1om_vec if
1456 bfd_elf64_x86_64_vec is supported. Add bfd_elf64_l1om_freebsd_vec
1457 if bfd_elf64_x86_64_freebsd_vec is supported.
1458 (targ_selvecs): Likewise.
1459
1460 * configure.in: Support bfd_elf64_l1om_vec and
1461 bfd_elf64_l1om_freebsd_vec.
1462 * configure: Regenerated.
1463
1464 * cpu-l1om.c: New.
1465
1466 * elf64-x86-64.c (elf64_l1om_elf_object_p): New.
1467 (bfd_elf64_l1om_vec): Likewise.
1468 (bfd_elf64_l1om_freebsd_vec): Likewise.
1469
1470 * Makefile.am (ALL_MACHINES): Add cpu-l1om.lo.
1471 (ALL_MACHINES_CFILES): Add cpu-l1om.c.
1472 * Makefile.in: Regenerated.
1473
1474 * targets.c (bfd_elf64_l1om_vec): New.
1475 (bfd_elf64_l1om_freebsd_vec): Likewise.
1476 (_bfd_target_vector): Add bfd_elf64_l1om_vec and
1477 bfd_elf64_l1om_freebsd_vec.
1478
8fdcc58d
TS
14792009-07-24 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
1480 Alan Modra <amodra@bigpond.net.au>
1481
1482 * reloc.c (BFD_RELOC_SPU_ADD_PIC): Define.
1483 * bfd-in2.h: Regenerate.
1484 * libbfd.h: Regenerate.
1485 * elf32-spu.c (elf_howto_table): Add entries SPU_ADD_PIC.
1486 (spu_elf_bfd_to_reloc_type): Handle SPU_ADD_PIC.
1487 (spu_elf_relocate_section): Patch instructions marked by SPU_ADD_PIC.
1488
9b769489
L
14892009-07-23 H.J. Lu <hongjiu.lu@intel.com>
1490
1491 PR ld/10434
1492 * elf64-x86-64.c (elf64_x86_64_check_relocs): Check executable
1493 instead of shared for R_X86_64_TPOFF32.
1494 (elf64_x86_64_relocate_section): Likewise.
1495
3e7a7d11
NC
14962009-07-23 Ulrich Drepper <drepper@redhat.com>
1497
1498 * elf-bfd.h (struct elf_link_hash_entry): Add unique_global field.
1499 * elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols
1500 with the BSF_GNU_UNIQUE flag bit set.
1501 * elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag
1502 for symbols with STB_GNU_UNIQUE binding.
1503 * elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols
1504 with the STB_GNU_UNIQUE binding.
1505 (elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for
1506 symbols with STB_GNU_UNIQUE binding. Set STB_GNU_UNIQUE for
1507 symbols with the unique_global field set.
1508 (elf_link_output_extsym): Set unique_global field for symbols with
1509 the STB_GNU_UNIQUE binding.
1510 * syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit.
1511 (bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE
1512 symbols.
1513 (bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE
1514 symbols.
1515 * bfd-in2.h: Regenerate.
1516
5f35ea9c
L
15172009-07-22 H.J. Lu <hongjiu.lu@intel.com>
1518
107601c8 1519 * elflink.c (elf_link_output_extsym): Revert the last change.
5f35ea9c 1520
b63cc625
L
15212009-07-22 H.J. Lu <hongjiu.lu@intel.com>
1522
107601c8
AM
1523 PR ld/10433
1524 * elflink.c (elf_link_output_extsym): Special case ifunc syms
1525 when ref_regular, not def_regular.
b63cc625 1526
2955ec4c
L
15272009-07-21 H.J. Lu <hongjiu.lu@intel.com>
1528
107601c8
AM
1529 PR ld/10426
1530 * elflink.c (elf_link_add_object_symbols): Turn an IFUNC symbol
1531 from a DSO into a normal FUNC symbol.
1532 (elf_link_output_extsym): Turn an undefined IFUNC symbol into
1533 a normal FUNC symbol.
2955ec4c 1534
6d30f5b2
NC
15352009-07-17 Chao-ying Fu <fu@mips.com>
1536
1537 * elfxx-mips.c (LOAD_INTERLOCKS_P): New define.
1538 (_bfd_mips_elf_size_dynamic_sections): For CPUs without load
1539 interlocking, the last PLT entry needs a nop in the branch delay slot.
1540 (_bfd_mips_elf_finish_dynamic_symbol): For CPUs with load itnerlocking,
1541 output the last two PLT entries in reverse order.
1542
1f85278f
L
15432009-07-16 H.J. Lu <hongjiu.lu@intel.com>
1544
1545 * elf32-i386.c (elf_i386_relocate_section): Don't get local
1546 STT_GNU_IFUNC symbol for relocatable link.
1547 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1548
f07749bb
L
15492009-07-10 H.J. Lu <hongjiu.lu@intel.com>
1550
1551 * bfdio.c (bfd_iovec): Add comments for bmmap.
1552 * bfd-in2.h: Regenerated.
1553
8455dd2c
L
15542009-07-10 H.J. Lu <hongjiu.lu@intel.com>
1555
1556 * Makefile.am: Run "make dep-am".
1557 * Makefile.in: Regenerated.
1558
cedfb179
DK
15592009-07-10 Doug Kwan <dougkwan@google.com>
1560
1561 * elf32-arm.c (stub_hash_newfunc): Initialize fields
1562 target_addend and orig_insn.
1563
fa8f86ff
TT
15642009-07-10 Tom Tromey <tromey@redhat.com>
1565
1566 * Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h.
1567 (elf-eh-frame.lo): Likewise.
1568 (elf32-bfin.lo): Likewise.
1569 (elf32-frv.lo): Likewise.
1570 (elf32-xc16x.lo): Likewise.
1571 * Makefile.in: Rebuild.
1572 * dwarf2.c: Included dwarf.h, not elf/dwarf2.h.
1573 * elf-eh-frame.c: Likewise.
1574 * elf32-bfin.c: Likewise.
1575 * elf32-frv.c: Likewise.
1576 * elf32-xc16x.c: Likewise.
1577
33c6a8fc
JB
15782009-07-10 Julian Brown <julian@codesourcery.com>
1579
1580 * elf32-arm.c (arm_build_one_stub): Use the hash entry of the
1581 symbol a stub entry is derived from, not the entry for the stub
1582 itself, in call to elf32_arm_final_link_relocate.
1583
1d770845
L
15842009-07-10 H.J. Lu <hongjiu.lu@intel.com>
1585
1586 * elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros
1587 when reporting addends.
1588
52cfded7
AM
15892009-07-10 Alan Modra <amodra@bigpond.net.au>
1590
1591 * elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
1592 data even when no stubs.
1593 (spu_elf_place_overlay_data, spu_elf_build_stubs): Adjust.
1594
e054468f
AM
15952009-07-10 Alan Modra <amodra@bigpond.net.au>
1596
1597 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_IRELATIVE.
1598 (ppc_elf_get_synthetic_symtab): Report addend.
1599 (PLT_IFUNC): Define.
1600 (struct ppc_elf_link_hash_table): Add iplt and reliplt.
1601 (ppc_elf_create_glink): New function.
1602 (ppc_elf_create_dynamic_sections): Use it.
1603 (ppc_elf_add_symbol_hook): Set has_ifunc_symbols.
1604 (update_local_sym_info): Allocate space for local_plt array.
1605 Don't bump local_got_refcounts for PLT_IFUNC. Return local_plt
1606 entry pointer.
1607 (is_branch_reloc): New function.
1608 (ppc_elf_check_relocs): Handle STT_GNU_IFUNC symbols.
1609 (ppc_elf_gc_sweep_hook): Likewise.
1610 (ppc_elf_adjust_dynamic_symbol): Likewise.
1611 (allocate_dynrelocs): Likewise.
1612 (ppc_elf_size_dynamic_sections): Likewise.
1613 (ppc_elf_relocate_section): Likewise.
1614 (branch_reloc_hash_match): Use is_branch_reloc.
1615 (ppc_elf_tls_optimize): Adjust for local_plt.
1616 (write_glink_stub): New function, extracted from..
1617 (ppc_elf_finish_dynamic_symbol): ..here. Handle STT_GNU_IFUNC.
1618 (ppc_elf_finish_dynamic_sections): Only write plt resolver and
1619 branch table when dynamic.
1620 (elf_backend_post_process_headers): Define.
1621 * elf64-ppc.c (elf_backend_post_process_headers): Define.
1622 (ppc64_elf_howto_raw): Add R_PPC64_IRELATIVE.
1623 (ppc64_elf_get_synthetic_symtab): Report addend.
1624 (struct ppc_stub_hash_entry): Add plt_ent.
1625 (PLT_IFUNC): Define.
1626 (struct ppc_link_hash_table): Add iplt and reliplt.
1627 (create_linkage_sections): Make .iplt and .rela.iplt sections.
1628 (ppc64_elf_add_symbol_hook): Set has_ifunc_symbols.
1629 (update_local_sym_info): Allocate space for local_plt array.
1630 Don't bump local_got_ents for PLT_IFUNC. Return local_plt
1631 entry pointer.
1632 (update_plt_info): Pass pointer to plt_entry rather than sym hash,
1633 and don't change hash flags here.
1634 (is_branch_reloc): New function.
1635 (ppc64_elf_check_relocs): Handle STT_GNU_IFUNC.
1636 (ppc64_elf_gc_sweep_hook): Likewise.
1637 (ppc64_elf_adjust_dynamic_symbol): Likewise.
1638 (allocate_dynrelocs): Likewise.
1639 (ppc64_elf_size_dynamic_sections): Likewise.
1640 (ppc_build_one_stub, ppc_size_one_stub): Likewise.
1641 (ppc64_elf_size_stubs): Likewise.
1642 (ppc64_elf_relocate_section): Likewise.
1643 (get_sym_h): Adjust for local_plt.
1644 (branch_reloc_hash_match): Use is_branch_reloc.
1645 (ppc_type_of_stub): Pass plt_entry pointer and handle ifunc.
1646 (ppc64_elf_toc): Ignore SEC_EXCLUDE sections.
1647
041de40d
AM
16482009-07-10 Alan Modra <amodra@bigpond.net.au>
1649
1650 * elf.c (_bfd_elf_get_synthetic_symtab): Report addends.
1651
7ae26bc1
AM
16522009-07-10 Alan Modra <amodra@bigpond.net.au>
1653
1654 * elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
1655 and ref_regular_nonweak comment.
1656 * elflink.c (elf_link_output_extsym): Special case ifunc syms
1657 when def_regular, not ref_regular.
1658 (elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,..
1659 * elf32-i386.c (elf_i386_check_relocs): ..set it here instead..
1660 * elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
1661
9c4d0c1f
AM
16622009-07-09 Alan Modra <amodra@bigpond.net.au>
1663
1664 * elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
1665 of malloc'd struct call_info.
1666 (pasted_function): Likewise, priority too.
1667
2fc6d3b0
AM
16682009-07-07 Alan Modra <amodra@bigpond.net.au>
1669
1670 * elf32-spu.c (spu_elf_auto_overlay): Take into account section
1671 alignment when packing sections into overlays.
1672
9e1f7c0e
DK
16732009-07-03 Cary Coutant <ccoutant@google.com>
1674
1675 * dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator.
1676
4a768870
DK
16772009-07-03 Dave Korn <dave.korn.cygwin@gmail.com>
1678
1679 * coffcode.h (sec_to_styp_flags): Partially revert (functional
1680 changes only) earlier patch:-
1681
107601c8 16822009-06-25 Kai Tietz <kai.tietz@onevision.com>
4a768870 1683
107601c8
AM
1684 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
1685 give .debug and .reloc data characteristics.
1686 (DOT_RELOC): New define for .reloc section string.
1687 (coff_write_object_contents): Use DOT_RELOC instead of string.
4a768870 1688
848f5748
TT
16892009-07-02 Tom Tromey <tromey@redhat.com>
1690
1691 * aoutx.h (aout_get_external_symbols): Declare 'amt' locally.
1692 * bfdwin.c (bfd_free_window): Cast to unsigned long.
1693
dda46a27
L
16942009-07-01 Nick Clifton <nickc@redhat.com>
1695
1696 * elf-m10300.c: Remove trailing white space.
1697 * reloc.c: Likewise.
1698
efde2f2c
NC
16992009-07-01 Douglas B Rupp <rupp@gnat.com>
1700
dda46a27 1701 * bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
efde2f2c 1702 BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions.
dda46a27
L
1703 * configure.in: Use them.
1704 * configure: Regenerate.
b11d79f2 1705 * config.in: Regenerate.
dda46a27 1706 * vmsutil.c: Include sysdep.h, remove ansidecl.h.
efde2f2c
NC
1707 #define _BSD_SOURCE. Add comments.
1708 (vms_file_stats_name): Calculate creation date based on available
1709 runtime data. Return 1 for version instead of 0.
1710
e1ec24c6
NC
17112009-07-01 Nick Clifton <nickc@redhat.com>
1712
1713 PR 10072
1714 * elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle
1715 to R_ARM_THM_PC8 relocation.
1716
2709f570
NC
17172009-06-29 Nick Clifton <nickc@redhat.com>
1718
1719 * elf-m10300.c (mn10300_elf_relax_section): Allow for the
1720 different uses of the relocations addend when a symbol is in a
1721 merged section.
1722
83b89087
L
17232009-06-27 H.J. Lu <hongjiu.lu@intel.com>
1724
1725 PR ld/10337
1726 * elf.c (bfd_section_from_shdr): Don't change sh_link for
1727 SHT_REL/SHT_RELA sections on executable nor shared library.
1728 Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF
1729 as a normal section.
1730
be7035c6
NC
17312009-06-25 Nick Clifton <nickc@redhat.com>
1732
1733 * elf-m10300.c (mn10300_elf_relax_section): Handle non-section
1734 symbols with SEC_MERGE flag.
1735
bdeb4032
KT
17362009-06-25 Kai Tietz <kai.tietz@onevision.com>
1737
1738 * coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
1739 give .debug and .reloc data characteristics.
1740 (DOT_RELOC): New define for .reloc section string.
1741 (coff_write_object_contents): Use DOT_RELOC instead of string.
1742
b32e07d7
TG
17432009-06-25 Tristan Gingold <gingold@adacore.com>
1744
1745 * mach-o-target.c (bfd_mach_o_get_dynamic_symtab_upper_bound)
1746 (bfd_mach_o_canonicalize_dynamic_symtab)
1747 (bfd_mach_o_get_synthetic_symtab): Defines.
1748 (TARGET_NAME_BACKEND): Add bfd_mach_o_print_thread entry.
1749 (TARGET_NAME): Use Mach-O specific functions for dynamic.
1750
1751 * mach-o-i386.c (bfd_mach_o_i386_swap_reloc_in): Fix howto indexes
1752 for scattered relocations.
1753 (bfd_mach_o_i386_print_thread): New function.
1754 (bfd_mach_o_print_thread): Define.
1755
1756 * mach-o.c (text_section_names_xlat): Add an entry for __const.
7ee314fa 1757 (bfd_mach_o_canonicalize_one_reloc, bfd_mach_o_canonicalize_relocs):
b32e07d7
TG
1758 New functions extracted from ...
1759 (bfd_mach_o_canonicalize_reloc): ... This. Simplified.
1760 (bfd_mach_o_get_dynamic_reloc_upper_bound): New function.
1761 (bfd_mach_o_canonicalize_dynamic_reloc): New function.
1762 (bfd_mach_o_i386_flavour_string): Adjusted after enum renaming.
1763 (bfd_mach_o_ppc_flavour_string): Reindentation. Add 64 bits cases.
1764 (bfd_mach_o_scan_read_dylinker): Do not create a section anymore.
1765 Set name_str field.
1766 (bfd_mach_o_scan_read_dylib): Ditto.
1767 (bfd_mach_o_scan_read_thread): Set mdata at declaration. Add comments,
1768 reindent.
1769 (bfd_mach_o_scan_read_dysymtab): Set mdata at declaration. Correctly
1770 decode isym and flags on little endian targets. Set dysymtab field.
1771 (bfd_mach_o_scan_start_address): Adjust for enum names.
1772 (bfd_mach_o_lookup_section): Do not look for segments anymore.
1773 (bfd_mach_o_print_section): Display bfd section name.
1774 (bfd_mach_o_print_segment): Display none if no name.
1775 (bfd_mach_o_print_dysymtab): Display next index for local, external
1776 and undefined symbols.
1777 (bfd_mach_o_bfd_print_private_bfd_data): Adjust code by using name_str.
1778 Display dylinker name. Display thread and unixthread commands content.
1779 (bfd_mach_o_print_thread): New macro.
1780
1781 * mach-o.h (bfd_mach_o_mach_header_magic): Align numbers.
1782 (bfd_mach_o_ppc_thread_flavour): Ditto.
1783 (bfd_mach_o_i386_thread_flavour): Ditto.
1784 (BFD_MACH_O_PPC_THREAD_STATE_NONE): New enum.
1785 (BFD_MACH_O_x86_THREAD_STATE_NONE): Replaces
1786 BFD_MACH_O_THREAD_STATE_NONE.
1787 (bfd_mach_o_segment_command): Remove segment field.
1788 (bfd_mach_o_thread_flavour): Field offset is now unsigned long.
1789 (bfd_mach_o_dylinker_command): Remove section field, add name_str.
1790 (bfd_mach_o_prebound_dylib_command): Ditto.
1791 (bfd_mach_o_dylib_command): Ditto.
1792 (bfd_mach_o_prebound_dylib_command): Remove section field.
1793 (mach_o_data_struct): Add dysymtab field.
1794 (bfd_mach_o_backend_data): Add _bfd_mach_o_print_thread field.
1795 (bfd_mach_o_get_reloc_upper_bound, bfd_mach_o_canonicalize_reloc)
1796 (bfd_mach_o_build_commands): Remove parameter names and attributes.
1797 (bfd_mach_o_get_dynamic_reloc_upper_bound)
1798 (bfd_mach_o_canonicalize_dynamic_reloc): New prototypes.
1799
c41ba836
DK
18002009-06-25 Rafael Avila de Espindola <espindola@google.com>
1801
1802 * plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type
1803 field of struct dirent.
1804
3188b070
TG
18052009-06-23 Tristan Gingold <gingold@adacore.com>
1806
1807 * vms.c (vms_get_synthetic_symtab): Remove duplicate definition
1808 of this macro. Fix indentation.
1809
022f8312
CL
18102009-06-22 Christophe Lyon <christophe.lyon@st.com>
1811
1812 * elf32-arm.c (elf32_arm_size_stubs): Use PLT address as
1813 destination for defined dynamic symbols when deciding whether to
1814 insert a stub or not.
1815 (allocate_dynrelocs): Make sure functions are not marked as Thumb
1816 when actually accessed through a PLT, even when generating a
1817 shared lib.
1818
d297e807
TG
18192009-06-22 Tristan Gingold <gingold@adacore.com>
1820
1821 * mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
1822 the relocs array.
1823
ceaf50a2
AM
18242009-06-22 Alan Modra <amodra@bigpond.net.au>
1825
1826 * elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
1827 * elf32-v850.c (v850_elf_relocate_section): Warning fix.
1828
983bddc8
AM
18292009-06-22 Alan Modra <amodra@bigpond.net.au>
1830
1831 * elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
1832
f8703194
L
18332009-06-19 H.J. Lu <hongjiu.lu@intel.com>
1834
1835 * elflink.c (elf_link_add_object_symbols): Avoid warning
1836 from -Wjump-misses-init in gcc 4.5.0.
1837
09a24cbf
L
18382009-06-19 H.J. Lu <hongjiu.lu@intel.com>
1839
1840 * elf32-i386.c (elf_i386_check_relocs): Properly check local
1841 symbol on error.
1842 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1843
4c544807
L
18442009-06-19 H.J. Lu <hongjiu.lu@intel.com>
1845
1846 * elf32-i386.c (elf_i386_tls_transition): Add a parameter,
1847 r_symndx. Report local symbol name on error.
1848 (elf_i386_check_relocs): Updated. Report local symbol name on
1849 error.
1850 (elf_i386_gc_sweep_hook): Updated.
1851 (elf_i386_relocate_section): Likewise.
1852
1853 * elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter,
1854 r_symndx. Report local symbol name on error.
1855 (elf64_x86_64_check_relocs): Updated. Report local symbol name
1856 on error.
1857 (elf64_x86_64_gc_sweep_hook): Updated.
1858 (elf64_x86_64_relocate_section): Likewise.
1859
b8674692
TG
18602009-06-19 Tristan Gingold <gingold@adacore.com>
1861
1862 * mach-o.c (bfd_mach_o_print_private_header): Fix format character.
1863
046b007d
TG
18642009-06-19 Tristan Gingold <gingold@adacore.com>
1865
1866 * mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype.
1867 (bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access.
1868 (bfd_mach_o_valid): Ditto.
1869 (bfd_mach_o_wide_p): Ditto.
1870 (bfd_mach_o_canonicalize_reloc): Ditto.
1871 (bfd_mach_o_build_commands): Ditto.
1872 (bfd_mach_o_scan_read_thread): Ditto.
1873 (bfd_mach_o_flatten_sections): Ditto.
1874 (bfd_mach_o_scan_start_address): Ditto.
1875 (bfd_mach_o_lookup_section): Ditto.
1876 (bfd_mach_o_core_fetch_environment): Ditto.
1877 (bfd_mach_o_write_contents): Ditto. Handle reexport_dylib.
1878 (bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data.
1879 (bfd_mach_o_scan_write_symtab): Ditto.
1880 Use macros instead of hard-coded values.
1881 (bfd_mach_o_scan_read_symtab_symbol): Make the function static.
1882 Use bfd_mach_o_get_data instead of direct access. Use macros
1883 instead of hard-coded values.
1884 (bfd_mach_o_scan_read_symtab_strtab): Make the function static.
1885 Remove sym argument and get section from mdata.
1886 Move code into the else branch.
1887 (bfd_mach_o_scan_read_symtab_symbols): Make the function static.
1888 Remove sym argument and get section from mdata. Adjust code.
1889 (bfd_mach_o_scan_read_dylib): Move assertion into the created
1890 switch (which replaces consecutive if statements).
1891 (bfd_mach_o_scan_read_dysymtab): Rename seg to cmd. Load
1892 module table, table of content, indirect symbols and external
1893 referenced symbols.
1894 (bfd_mach_o_scan_read_symtab): Renames seg to symtab. Set symtab
1895 field.
1896 (bfd_mach_o_scan_read_linkedit): New function.
1897 (bfd_mach_o_scan_read_str): Ditto.
1898 (bfd_mach_o_count_symbols): Simplify the code by using the symtab
1899 field of mdata.
1900 (bfd_mach_o_get_symtab_upper_bound): Remove check as
1901 bfd_mach_o_count_symbols never returns an error.
1902 (bfd_mach_o_canonicalize_symtab): Simplify the code by using the
1903 symtab field (there might be only one symtab).
1904 (bfd_mach_o_scan_read_command): Handle reexported dylib.
1905 Handle sub frameworks, sub umbrella, sub library and sub client.
1906 Read code signature and segment split info commands.
1907 (bfd_mach_o_scan): Reindent.
1908 (bfd_mach_o_xlat_name): New type.
1909 (bfd_mach_o_print_flags): New function.
1910 (bfd_mach_o_get_name): Ditto.
1911 (bfd_mach_o_cpu_name): New variable.
1912 (bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name)
1913 (bfd_mach_o_section_type_name)
1914 (bfd_mach_o_section_attribute_name)
1915 (bfd_mach_o_load_command_name): New variables.
1916 (bfd_mach_o_print_private_header): New function.
1917 (bfd_mach_o_print_section_map): New function extracted from
1918 bfd_mach_o_print_private_bfd_data.
1919 (bfd_mach_o_print_section): Ditto. Print more infos.
1920 (bfd_mach_o_print_segment): Ditto.
1921 (bfd_mach_o_print_dysymtab): Ditto.
1922 (bfd_mach_o_bfd_print_private_bfd_data): Reworked. Handle
1923 load weak dylib, reexport dylib and id dylib.
1924 Handle code signature and segment_split info.
1925 Handle sub frameworks, sub umbrella, sub library and sub client.
1926 (bfd_mach_o_section_get_nbr_indirect): New function.
1927
1928 * mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro. Add comment.
1929 (bfd_mach_o_header_flags): New enum to define header flags.
1930 (bfd_mach_o_section_attribute): New enum to replace ...
1931 (BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
1932 BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
1933 BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT,
1934 BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS,
1935 BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ...
1936 these removed macros.
1937 (BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros.
1938 (bfd_mach_o_dylib_module): New type.
1939 (BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New
1940 macros.
1941 (bfd_mach_o_dylib_table_of_content): New type.
1942 (BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro.
1943 (bfd_mach_o_dylib_reference): New type.
1944 (BFD_MACH_O_REFERENCE_SIZE): New macro.
1945 (bfd_mach_o_dysymtab_command): Add fields for loaded and decoded
1946 modules, toc, references and indirect syms.
1947 (BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro.
1948 (bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were
1949 unused). Add comment.
1950 (bfd_mach_o_dylib_command): Ditto.
1951 (bfd_mach_o_prebound_dylib_command): Ditto.
1952 (bfd_mach_o_linkedit_command): New type.
1953 (bfd_mach_o_str_command): New type.
1954 (bfd_mach_o_load_command): Add linkedit and str fields.
1955 (mach_o_data_struct): Add symtab field.
1956 (bfd_get_mach_o_data): Renamed to ...
1957 (bfd_mach_o_get_data): ... this new macro.
1958 (bfd_mach_o_scan_read_symtab_symbol,
1959 bfd_mach_o_scan_read_symtab_strtab,
1960 bfd_mach_o_scan_read_symtab_symbols): Prototypes removed.
1961
1962 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data
1963 instead of direct access.
1964
6d78d0b9
AM
19652009-06-19 Alan Modra <amodra@bigpond.net.au>
1966
1967 * elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
1968 R_PPC_PLTREL24 relocs.
1969 (ppc_elf_relocate_section): Likewise.
1970
3ec01793
AM
19712009-06-19 Alan Modra <amodra@bigpond.net.au>
1972
1973 * elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
1974 pointer to sym hash. Update all uses.
1975 (update_plt_info): Likewise. Don't check addend here.
1976
c2e61a4e
L
19772009-06-18 H.J. Lu <hongjiu.lu@intel.com>
1978
1979 * elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use
1980 bfd_sym_from_r_symndx.
1981 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1982
87d72d41
AM
19832009-06-18 Alan Modra <amodra@bigpond.net.au>
1984
1985 * elf-bfd.h (struct sym_sec_cache): Delete.
1986 (struct sym_cache): New.
1987 (bfd_section_from_r_symndx): Delete prototype.
1988 (bfd_sym_from_r_symndx): Define prototype.
1989 * elf.c (bfd_section_from_r_symndx): Delete, replace with..
1990 (bfd_sym_from_r_symndx): ..new function.
1991 * elf32-arm.c: Update all uses of struct sym_sec_cache and
1992 bfd_section_from_r_symndx to new struct and function.
1993 * elf32-bfin.c: Likewise.
1994 * elf32-hppa.c: Likewise.
1995 * elf32-i386.c: Likewise.
1996 * elf32-m32r.c: Likewise.
1997 * elf32-m68hc1x.c: Likewise.
1998 * elf32-m68hc1x.h: Likewise.
1999 * elf32-m68k.c: Likewise.
2000 * elf32-ppc.c: Likewise.
2001 * elf32-s390.c: Likewise.
2002 * elf32-sh.c: Likewise.
2003 * elf64-ppc.c: Likewise.
2004 * elf64-s390.c: Likewise.
2005 * elf64-x86-64.c: Likewise.
2006 * elfxx-sparc.c: Likewise.
2007 * elfxx-sparc.h: Likewise.
2008
14aae723
L
20092009-06-18 H.J. Lu <hongjiu.lu@intel.com>
2010
2011 * elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf.
2012 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2013
5e486aa1
NC
20142009-06-18 Nick Clifton <nickc@redhat.com>
2015
2016 * elflink.c (elf_link_sort_relocs): Return early if there are no
2017 relocs to sort.
2018
361dff73
DK
20192009-06-18 Dave Korn <dave.korn.cygwin@gmail.com>
2020
32425da9
NC
2021 Merge cegcc and mingw32ce target name changes from
2022 CeGCC project:
361dff73 2023
32425da9 2024 2007-12-25 Pedro Alves <pedro_alves@portugalmail.pt>
361dff73
DK
2025
2026 * config.bfd: Add arm*-*-cegcc* target.
2027
32425da9 2028 2007-12-17 Pedro Alves <pedro_alves@portugalmail.pt>
361dff73
DK
2029
2030 * config.bfd: Add arm-*-mingw32ce* target.
2031
e03a8ed8
L
20322009-06-17 H.J. Lu <hongjiu.lu@intel.com>
2033
2034 * elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New.
2035 * elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise.
2036 * elf32-i386.c (elf_i386_allocate_dynrelocs): Use it.
2037 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2038
20392009-06-17 H.J. Lu <hongjiu.lu@intel.com>
2040
2041 * elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New.
2042 * elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise.
2043 * elf32-i386.c (elf_i386_check_relocs): Use it.
2044 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2045
20462009-06-17 H.J. Lu <hongjiu.lu@intel.com>
2047
2048 * elf-bfd.h (elf_dyn_relocs): New.
2049
2050 * elf32-i386.c (elf_i386_dyn_relocs): Removed.
2051 (elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with
2052 elf_dyn_relocs.
2053 (elf_i386_copy_indirect_symbol): Likewise.
2054 (elf_i386_check_relocs): Likewise.
2055 (elf_i386_gc_sweep_hook): Likewise.
2056 (elf_i386_allocate_dynrelocs): Likewise.
2057 (elf_i386_readonly_dynrelocs): Likewise.
2058 (elf_i386_size_dynamic_sections): Likewise.
2059
2060 * elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed.
2061 (elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs
2062 with elf_dyn_relocs.
2063 (elf64_x86_64_copy_indirect_symbol): Updated.
2064 (elf64_x86_64_check_relocs): Likewise.
2065 (elf64_x86_64_gc_sweep_hook): Likewise.
2066 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
2067 (elf64_x86_64_allocate_dynrelocs): Likewise.
2068 (elf64_x86_64_readonly_dynrelocs): Likewise.
2069 (elf64_x86_64_size_dynamic_sections): Likewise.
2070
64e77c6d
L
20712009-06-17 H.J. Lu <hongjiu.lu@intel.com>
2072
2073 * elf32-arm.c (create_got_section): Get existing .rela.got
2074 section.
2075 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
2076 * elf32-lm32.c (create_got_section): Likewise.
2077 * elf32-m32r.c (create_got_section): Likewise.
2078 * elf32-ppc.c (ppc_elf_create_got): Likewise.
2079 * elf32-s390.c (create_got_section): Likewise.
2080 * elf32-sh.c (create_got_section): Likewise.
2081 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
2082 * elf64-s390.c (create_got_section): Likewise.
2083 * elfxx-sparc.c (create_got_section): Likewise.
2084
2085 * elflink.c (_bfd_elf_create_got_section): Properly initialize
2086 the GOT size.
2087
d2149d72
L
20882009-06-16 H.J. Lu <hongjiu.lu@intel.com>
2089
2090 * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New.
2091
2092 * elf32-i386.c (elf_i386_local_hash): Removed.
2093 (elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
2094 (elf_i386_get_local_sym_hash): Likewise.
2095
2096 * elf64-x86-64.c (elf64_x86_64_local_hash): Removed.
2097 (elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
2098 (elf64_x86_64_get_local_sym_hash): Likewise.
2099 * elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise.
2100 (get_local_sym_hash): Likewise.
2101
cc3bd654
L
21022009-06-16 H.J. Lu <hongjiu.lu@intel.com>
2103
2104 * elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec,
2105 rel_got_sec and plt_sec.
2106 (elfNN_ia64_relax_section): Updated.
2107 (elfNN_ia64_create_dynamic_sections): Likewise.
2108 (get_got): Likewise.
2109 (allocate_dynrel_entries): Likewise.
2110 (elfNN_ia64_size_dynamic_sections): Likewise.
2111 (set_got_entry): Likewise.
2112 (elfNN_ia64_choose_gp): Likewise.
2113 (elfNN_ia64_relocate_section): Likewise.
2114 (elfNN_ia64_finish_dynamic_symbol): Likewise.
2115 (elfNN_ia64_finish_dynamic_sections): Likewise.
2116
be3e406d
UW
21172009-06-16 Ulrich Weigand <uweigand@de.ibm.com>
2118
2119 * elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
2120 also for calls.
2121
6de2ae4a
L
21222009-06-16 H.J. Lu <hongjiu.lu@intel.com>
2123
2124 * configure.in (elf): Add elf-ifunc.lo.
2125
2126 * configure: Regenerated.
2127 * Makefile.in: Likewise.
2128
2129 * elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt,
2130 srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc.
2131
2132 * elf32-i386.c (elf_i386_link_hash_table): Remove sgot,
2133 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
2134 irelifunc.
2135 (elf_i386_link_hash_table_create): Likewise.
2136 (elf_i386_create_dynamic_sections): Likewise.
2137 (elf_i386_check_relocs): Likewise.
2138 (elf_i386_allocate_dynrelocs): Likewise.
2139 (elf_i386_size_dynamic_sections): Likewise.
2140 (elf_i386_relocate_section): Likewise.
2141 (elf_i386_finish_dynamic_symbol): Likewise.
2142 (elf_i386_finish_dynamic_sections): Likewise.
2143 (elf_i386_create_got_section): Removed.
2144
2145 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot,
2146 sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
2147 irelifunc.
2148 (elf64_x86_64_compute_jump_table_size): Updated.
2149 (elf64_x86_64_link_hash_table_create): Likewise.
2150 (elf64_x86_64_create_dynamic_sections): Likewise.
2151 (elf64_x86_64_check_relocs): Likewise.
2152 (elf64_x86_64_allocate_dynrelocs): Likewise.
2153 (elf64_x86_64_size_dynamic_sections): Likewise.
2154 (elf64_x86_64_relocate_section): Likewise.
2155 (elf64_x86_64_finish_dynamic_symbol): Likewise.
2156 (elf64_x86_64_finish_dynamic_sections): Likewise.
2157 (elf64_x86_64_create_got_section): Removed.
2158
2159 * elflink.c (_bfd_elf_create_got_section): Use log_file_align
2160 for pointer alignment. Set up section pointers.
2161 (_bfd_elf_create_dynamic_sections): Likewise.
2162 (_bfd_elf_create_ifunc_sections): Moved to ...
2163 * elf-ifunc.c: Here. New.
2164
2165 * Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo.
2166 (BFD32_BACKENDS_CFILES): Add elf-ifunc.c.
2167 Run "make dep-am".
2168
81694485
NC
21692009-06-16 Doug Kwan <dougkwan@google.com>
2170
6de2ae4a
L
2171 * elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
2172 to bfd_signed_vma. Cast constant operands which are used in
2173 offset related expressions to bfd_signed_vma type as appropriate.
81694485 2174
6db7e006
MR
21752009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
2176
2177 * elf32-vax.c (elf_vax_plt_sym_val): New function.
2178 (elf_backend_plt_sym_val): Define.
2179
9b90d8fd
MR
21802009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
2181
2182 * elf32-vax.c (elf_vax_reloc_type_class): New function.
2183 (elf_backend_reloc_type_class): Define.
2184
04981bc1
MR
21852009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
2186
2187 * elf32-vax.c (elf_vax_relocate_section): For symbol references
2188 from an executable to a shared library treat R_VAX_PC32
2189 relocations as R_VAX_PLT32 ones.
2190
886815b2
MR
21912009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
2192
2193 * elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
2194 symbols in GOT space calculation.
2195 (elf_vax_relocate_section): Adjust accordingly.
2196
6c4fb25a
MR
21972009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
2198
2199 * elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
2200 include <R11:R2>.
2201
7b6021f1
MR
22022009-06-16 Maciej W. Rozycki <macro@linux-mips.org>
2203
2204 * elf32-vax.c (elf_vax_check_relocs): Handle the visibility
2205 attribute.
2206 (elf_vax_relocate_section): Likewise.
2207
188dbb07
L
22082009-06-15 H.J. Lu <hongjiu.lu@intel.com>
2209
2210 * elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
2211 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2212
048cbda4
L
22132009-06-15 H.J. Lu <hongjiu.lu@intel.com>
2214
2215 * elf32-i386.c (elf_i386_check_relocs): Reformat.
2216 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2217
482c6ce9
L
22182009-06-15 H.J. Lu <hongjiu.lu@intel.com>
2219
2220 * Makefile.am: Run "make dep-am".
2221 * Makefile.in: Regenerated.
2222
eba077f2
L
22232009-06-15 H.J. Lu <hongjiu.lu@intel.com>
2224
2225 * elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
2226 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2227
ec68b083
NC
22282009-06-15 Nick Clifton <nickc@redhat.com>
2229
2230 * po/ru.po: New Russian translation.
2231 * configure.in (ALL_LINGUAS): Add ru.
2232 * configure: Regenerate.
2233
b80ee1aa
L
22342009-06-14 H.J. Lu <hongjiu.lu@intel.com>
2235
2236 * elf32-i386.c: Remove duplicated comments.
2237
44c4ea11
L
22382009-06-14 H.J. Lu <hongjiu.lu@intel.com>
2239
2240 PR ld/10270
2241 * elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
2242 dynamic IFUNC pointer in non-shared object. Use .got.plt
2243 for IFUNC definition in PIE.
2244 (elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
2245 PIE locally.
2246
2247 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
2248 dynamic IFUNC pointer in non-shared object. Use .got.plt
2249 for IFUNC definition in PIE.
2250 (elf64_x86_64_relocate_section): Resolve IFUNC definition in
2251 PIE locally.
2252
8b7e2992
L
22532009-06-13 H.J. Lu <hongjiu.lu@intel.com>
2254
2255 * elf32-i386.c (elf_i386_check_relocs): Properly report
2256 local symbol for unhandled relocation against STT_GNU_IFUNC
2257 symbol.
637fa7af 2258 (elf_i386_relocate_section): Likewise.
8b7e2992 2259 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
637fa7af 2260 (elf64_x86_64_relocate_section): Likewise.
8b7e2992 2261
c25bc9fc
L
22622009-06-13 H.J. Lu <hongjiu.lu@intel.com>
2263
2264 PR ld/10269
2265 * elf32-i386.c: Include "objalloc.h" and "hashtab.h".
2266 (elf_i386_link_hash_table): Add loc_hash_table and
2267 loc_hash_memory.
2268 (elf_i386_local_hash): New.
2269 (elf_i386_local_htab_hash): Likewise.
2270 (elf_i386_local_htab_eq): Likewise.
2271 (elf_i386_get_local_sym_hash): Likewise.
2272 (elf_i386_link_hash_table_free): Likewise.
2273 (elf_i386_allocate_local_dynrelocs): Likewise.
2274 (elf_i386_finish_local_dynamic_symbol): Likewise.
2275 (bfd_elf64_bfd_link_hash_table_free): Likewise.
2276 (elf_i386_link_hash_table_create): Create loc_hash_table and
2277 loc_hash_memory.
2278 (elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
2279 (elf_i386_size_dynamic_sections): Likewise.
2280 (elf_i386_relocate_section): Likewise.
2281 (elf_i386_finish_dynamic_sections): Likewise.
2282 (elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
2283 isn't NULL.
2284
2285 * elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
2286 (elf64_x86_64_link_hash_table): Add loc_hash_table and
2287 loc_hash_memory.
2288 (elf64_x86_64_local_hash): New.
2289 (elf64_x86_64_local_htab_hash): Likewise.
2290 (elf64_x86_64_local_htab_eq): Likewise.
2291 (elf64_x86_64_get_local_sym_hash): Likewise.
2292 (elf64_x86_64_link_hash_table_free): Likewise.
2293 (elf64_x86_64_allocate_local_dynrelocs): Likewise.
2294 (elf64_x86_64_finish_local_dynamic_symbol): Likewise.
2295 (bfd_elf64_bfd_link_hash_table_free): Likewise.
2296 (elf64_x86_64_link_hash_table_create): Create loc_hash_table
2297 and loc_hash_memory.
2298 (elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
2299 symbols.
2300 (elf64_x86_64_size_dynamic_sections): Likewise.
2301 (elf64_x86_64_relocate_section): Likewise.
2302 (elf64_x86_64_finish_dynamic_sections): Likewise.
2303 (elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
2304 sym isn't NULL.
2305
dec9d5df
PB
23062009-06-10 Philip Blundell <philb@gnu.org>
2307
2308 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
2309 elf_sec->this_hdr == NULL.
2310
92bc0e80
TG
23112009-06-12 Tristan Gingold <gingold@adacore.com>
2312
2313 * reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
2314 * bfd-in2.h: Regenerated.
2315 * libbfd.h: Regenerated.
2316
2317 * mach-o.c (FILE_ALIGN): New macro.
2318 (bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
2319 (bfd_mach_o_print_symbol): Ditto.
2320 (bfd_mach_o_scan_write_thread): Adjust type of variable offset.
2321 (bfd_mach_o_get_reloc_upper_bound): New function.
2322 (bfd_mach_o_canonicalize_reloc): Ditto.
2323 (bfd_mach_o_scan_write_relocs): Ditto.
2324 (bfd_mach_o_scan_write_section_32): Remove offset argument.
2325 (bfd_mach_o_scan_write_section_64): Ditto.
2326 (bfd_mach_o_scan_write_segment_32): Write relocs. Fix size of data
2327 written for load command. Do not compute section file offset.
2328 (bfd_mach_o_scan_write_segment_64): Ditto.
2329 (bfd_mach_o_scan_write_symtab): Compute file offset first.
2330 Adjust for bfd_mach_o_asymbol. Move code to convert from BFD to
2331 Mach-O to ...
2332 (bfd_mach_o_mangle_symbols): ... this new function.
046b007d 2333 (bfd_mach_o_write_contents): Be sure to have load commands built.
92bc0e80
TG
2334 Call bfd_mach_o_mangle_symbols.
2335 (bfd_mach_o_build_commands): Adjust for filelen field.
2336 Use FILE_ALIGN macro. Clear section file offset if section is empty.
2337 Do not set symtab file offset anymore here.
2338 (bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
2339 (bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
2340 Set reloc_count and rel_filepos section fields.
2341 (bfd_mach_o_scan_read_section_32): Type of argument offset is now
2342 unsigned int.
2343 (bfd_mach_o_scan_read_section_64): Ditto.
2344 (bfd_mach_o_scan_read_section): Ditto.
2345 (bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
2346 bfd_mach_o_asymbol. Use unsigned int for file offset type.
2347 (bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
2348 Handle weak-ref symbols.
2349 (bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
2350 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
2351 (bfd_mach_o_scan): Remove assignment to removed field.
2352 (bfd_mach_o_mkobject_init): Ditto.
2353 (bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
2354 (bfd_mach_o_bfd_reloc_type_lookup): New macro.
2355 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
2356 (bfd_mach_o_swap_reloc_in): Ditto.
2357 (bfd_mach_o_swap_reloc_out): Ditto.
2358
2359 * mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
2360 (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
2361 (BFD_MACH_O_REFERENCE_FLAG_DEFINED)
2362 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
2363 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
2364 (BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
2365 (BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
2366 (BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
2367 (BFD_MACH_O_N_WEAK_DEF): New macros.
2368 Add comments.
2369 (bfd_mach_o_section_type): Add new enumeration values.
2370 (BFD_MACH_O_S_SELF_MODIFYING_CODE)
2371 (BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
2372 (BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
2373 (BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
2374 macros.
2375 (BFD_MACH_O_GENERIC_RELOC_VANILLA)
2376 (BFD_MACH_O_GENERIC_RELOC_PAIR)
2377 (BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
2378 (BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
2379 (BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
2380 (BFD_MACH_O_RELENT_SIZE): Ditto.
2381 (BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
2382 (BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
2383 (BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
2384 (BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
2385 (BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
2386 (BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
2387 (BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
2388 (BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
2389 (bfd_mach_o_reloc_info): New struct.
2390 (bfd_mach_o_asymbol): New struct.
2391 (bfd_mach_o_symtab_command): The symbols field is now of type
2392 bfd_mach_o_asymbol.
2393 (bfd_mach_o_load_command): The offset and len fields are now of type
2394 unsigned int.
2395 (mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
2396 Add a filelen field. Add comments.
2397 (bfd_mach_o_backend_data): New struct.
2398 (bfd_mach_o_get_backend_data): New macro.
2399 (bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
2400 bfd_mach_o_asymbol.
2401 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
2402 (bfd_mach_o_get_reloc_upper_bound): New prototype.
2403 (bfd_mach_o_canonicalize_reloc): Ditto.
7ee314fa 2404
92bc0e80
TG
2405 * mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
2406 duplicated macro. Now defined to _bfd_generic_is_local_label.
2407 (TARGET_NAME_BACKEND): New macro...
2408 (TARGET_NAME_BACKEND): ... used to name a new variable.
2409 (TARGET_NAME): Define relocs table using bfd_mach_o, reference
2410 Mach-O backend data.
2411
2412 * mach-o-i386.c (i386_howto_table): New variable.
2413 (bfd_mach_o_i386_swap_reloc_in): New function.
2414 (bfd_mach_o_i386_swap_reloc_out): Ditto.
2415 (bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
2416 (bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
2417 (bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
2418 (bfd_mach_o_bfd_reloc_type_lookup)
2419 (bfd_mach_o_bfd_reloc_name_lookup): Ditto.
2420
8c7d38e8
NC
24212009-06-11 Eric Paris <eparis@redhat.com>
2422 Nick Clifton <nickc@redhat.com>
2423
2424 * opncls.c (_maybe_make_executable): New function. Gives execute
2425 permission to an executable bfd that was opened for writing
2426 provided that it is a regular file. Replaces common code found in...
2427 (bfd_close): here and ...
2428 (bfd_close_all_done): here.
2429
f865a31d
AG
24302009-06-11 Anthony Green <green@moxielogic.com>
2431
2432 * reloc.c: Add BFD_RELOC_MOXIE_10_PCREL.
2433 * bfd-in2.h: Rebuilt.
2434 * libbfd.h: Rebuilt.
2435 * elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10
2436 relocation support.
2437 (moxie_reloc_map): Ditto.
2438 Clean up copyright notice.
2439
25b88f33 24402009-06-10 Paul Pluzhnikov <ppluzhnikov@google.com>
7ee314fa 2441
1372b818 2442 * bfd-in2.h: bfd_mmap prototype.
25b88f33
PP
2443 * bfdio.c (bfd_mmap): New function.
2444 * libbfd.h (bfd_iovec): Add bmmap.
1372b818 2445 * cache.c (cache_bmmap): New function.
25b88f33
PP
2446 (cache_iovec): Initialize bmmap member.
2447 * opencls.c (opncls_bmmap): New function.
7ee314fa
AM
2448 (opncls_iovec): Initialize bmmap member.
2449
c2f09c75
TG
24502009-06-09 Tristan Gingold <gingold@adacore.com>
2451
2452 * mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
2453 and stabstr_segment fields.
2454 (mach_o_be_vec, mach_o_le_vec): Removed
2455 (bfd_mach_o_version): New prototype.
2456
2457 * mach-o.c (bfd_mach_o_version): Make this function public.
2458 (mach_o_wide_p): New function.
2459 (bfd_mach_o_wide_p): Ditto.
2460 (bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
2461 weird names.
2462 (bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
2463 Search in the list only if the name starts with a dot.
2464 (bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
2465 test. Check bfd_seek status.
2466 (bfd_mach_o_scan_write_thread): Check bfd_seek status.
2467 (bfd_mach_o_scan_write_section_32): Ditto.
2468 (bfd_mach_o_scan_write_section_64): Ditto.
2469 (bfd_mach_o_scan_write_section): Removed.
2470 (bfd_mach_o_scan_write_segment): Split into ...
2471 (bfd_mach_o_scan_write_segment_32): ... this and ...
2472 (bfd_mach_o_scan_write_segment_64): ... this. Check bfd_seek status.
2473 (bfd_mach_o_scan_write_symtab_symbols): Moved into ...
2474 (bfd_mach_o_scan_write_symtab): ... this. Write symtab from BFD
2475 symbol table. Now returns a boolean.
2476 (bfd_mach_o_write_contents): Set filetype. Check bfd_seek status.
2477 Adjust for status type.
2478 (bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
2479 test. Write symbol table. Numbers the sections.
2480 (bfd_mach_o_read_header): Check bfd_seek status.
2481 Use mach_o_wide_p instead of hard-coded test.
2482 (bfd_mach_o_scan_read_section_32): Check bfd_seek status.
2483 (bfd_mach_o_scan_read_section_64): Ditto.
2484 (bfd_mach_o_scan_read_symtab_symbol): Ditto. Check bfd_seek status.
2485 Use BFD_MACH_O_N_TYPE instead of hard-coded value. Correctly
2486 handled common symbols.
2487 (bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
2488 (bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
2489 (bfd_mach_o_scan_read_dylinker): Ditto.
2490 (bfd_mach_o_scan_read_dylib): Ditto.
2491 (bfd_mach_o_scan_read_thread): Ditto.
2492 (bfd_mach_o_scan_read_symtab): Ditto.
2493 Do not create a section for the stabs.
2494 (bfd_mach_o_scan_read_uuid): Check bfd_seek status.
2495 (bfd_mach_o_scan_read_segment): Ditto.
2496 (bfd_mach_o_scan_read_command): Ditto.
2497 (bfd_mach_o_scan_start_address): Ditto.
2498 (bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
2499 (bfd_mach_o_archive_p): Check bfd_seek status.
2500 (bfd_mach_o_core_fetch_environment): Ditto.
2501
2502 * mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
2503
2a81c24a
L
25042009-06-06 H.J. Lu <hongjiu.lu@intel.com>
2505
2506 * elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
2507 (elf_i386_link_hash_table_create): Initialize irelifunc.
2508 (elf_i386_check_relocs): Updated. Set up irelifunc for
2509 shared objects.
2510 (elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
2511 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
2512 shared objects.
2513 (elf_i386_relocate_section): Likewise.
2514
2515 * elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
2516 (elf64_x86_64_link_hash_table_create): Initialize irelifunc.
2517 (elf64_x86_64_check_relocs): Updated. Set up irelifunc for
2518 shared objects.
2519 (elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
2520 relocation for non-GOT reference of STT_GNU_IFUNC symbol in
2521 shared objects.
2522 (elf64_x86_64_relocate_section): Likewise.
2523
2524 * elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
2525 ...
2526 (_bfd_elf_create_ifunc_sections): This.
2527
c2f09c75 2528 * elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
2a81c24a
L
2529 ...
2530 (_bfd_elf_create_ifunc_sections): This. Create .rel[a].ifunc
2531 for shared objects.
2532
710ab287
L
25332009-06-06 H.J. Lu <hongjiu.lu@intel.com>
2534
2535 * elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
2536 relocation for R_386_32 against STT_GNU_IFUNC symbol when
2537 building shared object. Check info->executable instead of
2538 !info->shared when setting non_got_ref.
2539 (elf_i386_allocate_dynrelocs): Allocate dynamic relocation
2540 for non-GOT reference of STT_GNU_IFUNC symbol in shared
2541 object. Allocate GOT relocation agsinst STT_GNU_IFUNC
2542 symbol if needed.
2543 (elf_i386_relocate_section): Output dynamic relocation for
2544 R_386_32 against STT_GNU_IFUNC symbol to get the real
2545 function address when building shared object.
2546 (elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
2547 relocation for STT_GNU_IFUNC symbol in shared object.
2548
2549 * elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
2550 dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
2551 symbol when building shared object. Check info->executable
2552 instead of !info->shared when setting non_got_ref.
2553 (elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
2554 for non-GOT reference of STT_GNU_IFUNC symbol in shared
2555 library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
2556 if needed.
2557 (elf64_x86_64_relocate_section): Output dynamic relocation
2558 for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
2559 function address when building shared object.
2560 (elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
2561 relocation for STT_GNU_IFUNC symbol in shared object.
2562
9e93c730
JK
25632009-06-06 Jan Kratochvil <jan.kratochvil@redhat.com>
2564
2565 * Makefile.am: Run "make dep-am".
2566 (BFD32_BACKENDS): Add mach-o-i386.lo.
2567 (BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
2568 * Makefile.in: Regenerate.
2569
74681fc4
AM
25702009-06-06 Alan Modra <amodra@bigpond.net.au>
2571
2572 * elf32-spu.c (spu_elf_relocate_section): Match overlay number
2573 when looking for soft-icache stubs.
2574
154a1ee5
TG
25752009-06-05 Tristan Gingold <gingold@adacore.com>
2576
2577 * mach-o.h: Update copyright year.
2578 (bfd_mach_o_mach_header_magic): New enum.
2579 (bfd_mach_o_cpu_subtype): Now an enum.
2580 (BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
2581 (BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
2582 (BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
2583 (bfd_mach_o_load_command): Field type_required is now a boolean.
2584 Reindent prototypes.
2585 (bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
2586 (bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
2587 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
2588 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
2589 (bfd_mach_o_get_symtab_upper_bound): Ditto.
2590 (bfd_mach_o_canonicalize_symtab): Ditto.
2591 (bfd_mach_o_get_symbol_info): Ditto.
2592 (bfd_mach_o_print_symbol): Ditto.
2593 (bfd_mach_o_bfd_print_private_bfd_data): Ditto.
2594 (bfd_mach_o_make_empty_symbol): Ditto.
2595 (bfd_mach_o_write_contents): Ditto.
2596
2597 * mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
2598 bfd_mach_o_mkobject): Defines.
2599 (bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
2600 Do not check with target vector but with flavour.
2601 (struct mach_o_section_name_xlat): New declaration.
2602 (dwarf_section_names_xlat): Ditto.
2603 (text_section_names_xlat): Ditto.
2604 (data_section_names_xlat): Ditto.
2605 (struct mach_o_segment_name_xlat): Ditto.
2606 (segsec_names_xlat): Ditto.
2607 (bfd_mach_o_convert_section_name_to_bfd): New function.
2608 (bfd_mach_o_convert_section_name_to_mach_o): Ditto.
2609 (bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
2610 (bfd_mach_o_bfd_copy_private_section_data): Ditto.
2611 (bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
2612 Accept any input and output flavour. Do not share private data
2613 anymore.
2614 (bfd_mach_o_count_symbols): Add a comment.
2615 (bfd_mach_o_get_symtab_upper_bound): Make it public.
2616 (bfd_mach_o_canonicalize_symtab): Ditto.
2617 (bfd_mach_o_get_symbol_info): Ditto.
2618 (bfd_mach_o_print_symbol): Ditto.
2619 (bfd_mach_o_write_header): Now returns a boolean instead of an int.
2620 Use constants instead of hard-coded values.
2621 (bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
2622 values.
2623 (bfd_mach_o_scan_write_section_64): Ditto.
2624 (bfd_mach_o_scan_write_segment): Ditto.
2625 Do not copy sections anymore.
2626 (bfd_mach_o_write_contents): Make it public.
2627 Remove dead code. Rewrite typeflag assignment.
2628 (bfd_mach_o_build_commands): New function.
2629 (bfd_mach_o_set_section_contents): Ditto.
2630 (bfd_mach_o_make_empty_symbol): Make it public.
2631 (bfd_mach_o_read_header): Make it static.
2632 Convert to bfd_boolean.
2633 Use constants instead of hard-coded values.
2634 (bfd_mach_o_make_bfd_section): Call
2635 bfd_mach_o_convert_section_name_to_bfd to create name.
2636 (bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
2637 values.
2638 (bfd_mach_o_scan_read_section_64): Ditto.
2639 (bfd_mach_o_scan_read_segment): Do not create a bfd section for
2640 a segment anymore. Use constants instead of hard-coded values.
2641 (bfd_mach_o_scan_read_command): Fix style.
2642 (bfd_mach_o_scan): Use constants instead of hard-coded values.
2643 Get rid of BFD_IO_FUNCS.
2644 (bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
2645 (bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
2646 (bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
2647 (bfd_mach_o_object_p): Removed.
2648 (bfd_mach_o_gen_core_p): New function, replaces ...
2649 (bfd_mach_o_core_p): ... deleted.
2650 (bfd_mach_o_bfd_print_private_bfd_data): Make it public.
2651
2652 * mach-o-i386.c: New file.
2653 * config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
2654 * configure.in (TDEFINES): Add mach_o_i386_vec.
2655 * configure: Regenerated.
2656 * targets.c: Add mach_o_i386_vec.
2657
2658 * mach-o.c: Update copyright years.
2659 (BFD_IO_FUNCS): Remove (was not used).
2660 (bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
2661 bfd_mach_o_slurp_extended_name_table,
2662 bfd_mach_o_construct_extended_name_table,
2663 bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
2664 bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
2665 bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
2666 bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
2667 bfd_mach_o_get_section_contents_in_window,
2668 bfd_mach_o_bfd_is_local_label_name,
2669 bfd_mach_o_bfd_is_target_special_symbol,
2670 bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
2671 bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
2672 bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
2673 bfd_mach_o_minisymbol_to_symbol,
2674 bfd_mach_o_bfd_get_relocated_section_contents,
2675 bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
2676 bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
2677 bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
2678 bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
2679 bfd_mach_o_bfd_merge_private_bfd_data,
2680 bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
2681 bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
2682 bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
2683 bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
2684 bfd_mach_o_bfd_copy_private_header_data,
2685 bfd_mach_o_core_file_matches_executable_p): Move these defines ...
2686 * mach-o-target.c: ... here.
2687 Update copyright years.
2688
a1ef399e
AM
26892009-06-04 Alan Modra <amodra@bigpond.net.au>
2690
2691 * dep-in.sed: Don't use \n in replacement part of s command.
2692 * Makefile.am (DEP1): LC_ALL for uniq.
2693 Run "make dep-am".
2694 * Makefile.in: Regenerate.
2695
2e75bb35
L
26962009-06-03 H.J. Lu <hongjiu.lu@intel.com>
2697
2698 * elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
2699 h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
2700 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2701
0018b0a3
L
27022009-06-03 H.J. Lu <hongjiu.lu@intel.com>
2703
2704 * elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
2705 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
2706 (elf_i386_relocate_section): Adjust R_386_GOT32 relocation
2707 against STT_GNU_IFUNC symbols for static executables.
2708 (elf_i386_finish_dynamic_symbol): Load GOT entry with
2709 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
2710
2711 * elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
2712 GOT entry for STT_GNU_IFUNC symbol with pointer equality.
2713 (elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
2714 PLT entry for STT_GNU_IFUNC symbol with pointer equality.
2715
94313f36
RS
27162009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com>
2717
2718 * coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
2719 symbols to be left unimported when linking statically.
2720 * xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
2721 code when linking statically.
2722
7afd84dc
L
27232009-06-02 H.J. Lu <hongjiu.lu@intel.com>
2724
2725 * elf32-i386.c (elf_i386_check_relocs): Increment
2726 got.refcount for R_386_GOT32/R_386_GOTOFF relocations
2727 against STT_GNU_IFUNC symbol.
2728 (elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
2729 local STT_GNU_IFUNC definition is used.
2730 (elf_i386_relocate_section): Handle got.offset != -1 for
2731 R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
2732 symbol.
2733
2734 * elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
2735 got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
2736 relocations against STT_GNU_IFUNC symbol.
2737 (elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
2738 local STT_GNU_IFUNC definition is used.
2739 (elf64_x86_64_relocate_section): Handle got.offset != -1
2740 for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
2741 STT_GNU_IFUNC symbol.
2742
cbe950e9
L
27432009-06-01 H.J. Lu <hongjiu.lu@intel.com>
2744
2745 PR ld/10205
2746 * elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
2747 (elf_i386_reloc_type_lookup): Likewise.
2748 (R_386_tls): Removed.
2749 (R_386_irelative): New.
2750 (R_386_vt_offset): Updated.
2751 (elf_i386_rtype_to_howto): Likewise.
2752 (elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
2753 (elf_i386_link_hash_table_create): Initialize igotplt,
2754 iplt and irelplt.
2755 (elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
2756 (elf_i386_adjust_dynamic_symbol): Likewise.
2757 (elf_i386_allocate_dynrelocs): Likewise.
2758 (elf_i386_relocate_section): Likewise.
2759 (elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
2760 sections.
2761 (elf_i386_finish_dynamic_symbol): When building a static
2762 executable, use .iplt, .igot.plt and .rel.iplt sections for
2763 STT_GNU_IFUNC symbols. Generate R_386_IRELATIVE relocation for
2764 locally defined STT_GNU_IFUNC symbol.
2765
2766 * elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
2767 (x86_64_reloc_map): Likewise.
2768 (R_X86_64_standard): Updated.
2769 (elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
2770 (elf64_x86_64_link_hash_table_create): Initialize igotplt,
2771 iplt and irelplt.
2772 (elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
2773 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
2774 (elf64_x86_64_allocate_dynrelocs): Likewise.
2775 (elf64_x86_64_relocate_section): Likewise.
2776 (elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
2777 sections.
2778 (elf64_x86_64_finish_dynamic_symbol): When building a static
2779 executable, use .iplt, .igot.plt and .rela.iplt sections for
2780 STT_GNU_IFUNC symbols. Generate R_X86_64_IRELATIVE relocation
2781 for locally defined STT_GNU_IFUNC symbol.
2782
2783 * reloc.c (BFD_RELOC_386_IRELATIVE): New.
2784 (BFD_RELOC_X86_64_IRELATIVE): Likewise.
2785
2786 * bfd-in2.h: Regenerated.
2787 * libbfd.h: Likewise.
2788
3aa14d16
L
27892009-06-01 H.J. Lu <hongjiu.lu@intel.com>
2790
2791 * elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
2792 (_bfd_elf_make_ifunc_reloc_section): Removed.
2793 (_bfd_elf_is_ifunc_symbol): Likewise.
2794 (_bfd_elf_create_static_ifunc_sections): New.
2795
2796 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
2797 symbol check to ...
2798 (elf_link_add_object_symbols): Here.
2799 (_bfd_elf_link_hash_hide_symbol): Don't clean plt on
2800 STT_GNU_IFUNC symbol.
2801 (elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
2802 if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
2803 (IFUNC_INFIX): Removed.
2804 (get_ifunc_reloc_section_name): Likewise.
2805 (_bfd_elf_make_ifunc_reloc_section): Likewise.
2806 (_bfd_elf_is_ifunc_symbol): Likewise.
2807 (_bfd_elf_create_static_ifunc_sections): New.
2808
eb4ff4d6
L
28092009-05-29 H.J. Lu <hongjiu.lu@intel.com>
2810
2811 * elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
2812 (create_got_section): Likewise.
2813 (allocate_dynrelocs): Likewise.
2814 (readonly_dynrelocs): Likewise.
2815 (set_tls_module_base): Likewise.
2816 (dtpoff_base): Likewise.
2817 (tpoff): Likewise.
2818 (elf_i386_link_hash_table_create): Updated.
2819 (elf_i386_create_dynamic_sections): Likewise.
2820 (elf_i386_check_relocs): Likewise.
2821 (elf_i386_size_dynamic_sections): Likewise.
2822 (elf_i386_relocate_section): Likewise.
2823
2824 * elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
2825 (create_got_section): Likewise.
2826 (allocate_dynrelocs): Likewise.
2827 (readonly_dynrelocs): Likewise.
2828 (set_tls_module_base): Likewise.
2829 (dtpoff_base): Likewise.
2830 (tpoff): Likewise.
2831 (elf64_x86_64_link_hash_table_create): Updated.
2832 (elf64_x86_64_create_dynamic_sections): Likewise.
2833 (elf64_x86_64_check_relocs): Likewise.
2834 (elf64_x86_64_size_dynamic_sections): Likewise.
2835 (elf64_x86_64_relocate_section): Likewise.
2836
fc579192
NC
28372009-05-28 Nick Clifton <nickc@redhat.com>
2838
2839 * targets.c (_bfd_target_vector): Only include plugin target in
2840 all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
2841
5ebe2858
UW
28422009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
2843
2844 * elf32-spu.c (struct call_info): New member broken_cycle.
2845 (remove_cycle): Instead of physically removing call_info structures
2846 to break call graph cycles, mark them using the broken_cycle flag.
2847 (mark_overlay_section): Respect broken_cycle flag.
2848 (unmark_overlay_section): Likewise.
2849 (collect_lib_sections): Likewise.
2850 (collect_overlays): Likewise.
2851 (sum_stack): Likewise.
2852
34ad4cb0
UW
28532009-05-28 Ulrich Weigand <uweigand@de.ibm.com>
2854
2855 * elf32-spu.c (insert_callee): Accumulate incoming callee->count.
2856 (mark_functions_via_relocs): Initialize callee->count to 1.
2857 (pasted_function): Likewise.
2858 (spu_elf_auto_overlay): Honor call counts when determining number
2859 of stubs required in software i-cache mode.
2860
fc579192
NC
28612009-05-27 Rafael Avila de Espindola <espindola@google.com>
2862
2863 * plugin.c (program_name): Remove.
2864 (plugin_program_name): New.
2865 (bfd_plugin_set_program_name): New.
2866 (try_load_plugin): Use plugin_program_name.
2867 * plugin.h (bfd_plugin_set_program_name): New.
2868
28692009-05-27 Rafael Avila de Espindola <espindola@google.com>
5691d22d
NC
2870
2871 * aclocal.m4: Include ../config/plugins.m4.
2872 * configure.in: Use AC_PLUGINS.
2873 * configure: Regenerate.
2874 * Makefile.in: Regenerate.
2875 * doc/Makefile.in: Regenerate.
2876
c8a1f254
NS
28772009-05-27 Nathan Sidwell <nathan@codesourcery.com>
2878
2879 * elf32-ppc.c (ppc_elf_relax_section): Work with a partial
2880 link.
2881 * bout.c (b_out_bfd_relax_section): Reject relocatable links.
2882 * elf32-m10300.c (mn10300_elf_relax_section): Likewise.
2883 * elf32-avr.c (elf32_avr_relax_section): Likewise.
2884 * elf32-frv.c (elf32_avr_relax_section): Likewise.
2885 * elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
2886 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2887 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2888 * elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
2889 * reloc.c (bfd_generic_relax_section): Likewise.
2890 * reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
2891 * vms.c (vms_bfd_relax_section): Likewise.
2892
68d7e96a
L
28932009-05-26 H.J. Lu <hongjiu.lu@intel.com>
2894
2895 * elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
2896
2897 * elf32-i386.c (is_indirect_symbol): Renamed to ...
2898 * elflink.c (_bfd_elf_is_ifunc_symbol): This.
2899
2900 * elf32-i386.c (allocate_dynrelocs): Updated.
2901 (elf_i386_relocate_section): Likewise.
2902 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2903 (elf64_x86_64_relocate_section): Likewise.
2904
2905 * elf64-x86-64.c (is_indirect_symbol): Removed.
2906
f12e7348
NC
29072009-05-26 Nick Clifton <nickc@redhat.com>
2908
2909 * po/id.po: Updated Indonesian translation.
2910
ce3c775b
NC
29112009-05-26 Rafael Avila de Espindola <espindola@google.com>
2912
2913 * Makefile.am: Run "make dep-am".
2914 (AM_CPPFLAGS): New.
2915 (LIBDL): New.
2916 (ALL_MACHINES): Add cpu-plugin.lo.
2917 (ALL_MACHINES_CFILES): Add cpu-plugin.c.
2918 (BFD32_BACKENDS): Add plugin.lo.
2919 (BFD32_BACKENDS_CFILES): Add plugin.c.
2920 (libbfd_la_LIBADD): Add LIBDL
2921 * archures.c (bfd_architecture): Add bfd_arch_plugin.
2922 (bfd_plugin_arch): Declare.
2923 * bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
2924 * bfd.c (bfd): Add plugin_data.
2925 * config.bfd: Handle the plugin target.
2926 * configure.in: Check for --enable-plugins.
2927 (LT_INIT): Use the dlopen option.
2928 * cpu-plugin.c: New.
2929 * plugin.c: New.
2930 * plugin.h: New.
2931 * targets.c (plugin_vec): Declare.
2932 (_bfd_target_vector): Add plugin_vec.
2933 * Makefile.in: Regenerate.
2934 * bfd-in2.h: Regenerate.
2935 * configure: Regenerate.
2936
9e097a72
AM
29372009-05-26 Alan Modra <amodra@bigpond.net.au>
2938
2939 * dep-in.sed: Don't modify .o to .lo here. Output one filename
2940 per line with all lines having continuation backslash. Prefix
2941 first line with "A", following lines with "B".
2942 * Makefile.am (DEP): Don't use dep.sed here.
2943 (DEP1): Run $MKDEP on single files, modify .o to .lo here. Use
2944 dep.sed here on dependencies, sort and uniq.
2945 * Makefile.in: Regenerate.
2946
d5acff2f
TG
29472009-05-25 Tristan Gingold <gingold@adacore.com>
2948
2949 * makefile.vms: Add verilog.obj to object list OBJS.
2950
5c93f09b
AM
29512009-05-24 Alan Modra <amodra@bigpond.net.au>
2952
107601c8
AM
2953 * bfdio.c (bfd_seek): Formatting. Ensure newly allocated memory
2954 for BFD_IN_MEMORY is cleared.
2955 (bfd_bwrite): Zero excess memory allocated.
5c93f09b 2956
48229727
JB
29572009-05-22 Julian Brown <julian@codesourcery.com>
2958
2959 * elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
2960 macros.
2961 (elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
2962 (elf32_arm_stub_a8_veneer_blx): New stub sequences.
2963 (elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
2964 arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
2965 (elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
2966 (a8_erratum_fix, a8_erratum_reloc): New structs.
2967 (elf32_arm_link_hash_table): Add a8_erratum_fixes,
2968 num_a8_erratum_fixes, fix_cortex_a8 fields.
2969 (elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
2970 (elf32_arm_add_stub): Split into two parts, creating...
2971 (elf32_arm_create_or_find_stub_sec): New function.
2972 (elf32_arm_final_link_relocate): Add forward declaration.
2973 (arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
2974 relocations, multiple relocations per stub.
2975 (find_stub_size_and_template): New (using parts of arm_size_one_stub).
2976 (arm_size_one_stub): Use find_stub_size_and_template.
2977 (a8_reloc_compare): New.
2978 (find_thumb_glue): Add forward declaration.
2979 (cortex_a8_erratum_scan): New.
2980 (elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
2981 (bfd_elf32_arm_set_cortex_a8_fix): New.
2982 (bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
2983 (arm_map_one_stub): Add THUMB32_TYPE support.
2984 (a8_branch_to_stub_data): New.
2985 (make_branch_to_a8_stub): New.
2986 (elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
2987 * bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
2988 (bfd_elf32_arm_set_target_relocs): Add argument for controlling
2989 Cortex-A8 erratum workaround.
2990 * bfd-in2.h: Regenerate.
2991
2b3decb5
AM
29922009-05-22 Alan Modra <amodra@bigpond.net.au>
2993
2994 * Makefile.am: Run "make dep-am".
2995 * Makefile.in: Regenerate.
2996 * po/SRC-POTFILES.in: Regenerate.
2997
930e005c
AM
29982009-05-21 Alan Modra <amodra@bigpond.net.au>
2999
3000 * elflink.c (elf_link_input_bfd): Correct *pindex change in last
3001 commit.
3002
6e0b88f1
AM
30032009-05-21 Alan Modra <amodra@bigpond.net.au>
3004
3005 * elf-bfd.h (struct elf_backend_data
3006 <elf_backend_link_output_symbol_hook>): Return an int.
3007 * elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
3008 symbols on deleted .opd entries.
3009 * elflink.c (elf_link_output_sym): Return without outputting sym
3010 if output_symbol_hook returns 2.
3011 (elf_link_output_extsym): Don't assign h->indx when symbol discarded.
3012 Abort if we must not discard sym.
3013 (elf_link_input_bfd): Similarly, don't set finfo->indices for
3014 local syms.
3015 (bfd_elf_final_link): Adjust elf_link_output_sym calls.
3016 * elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
3017 elf_backend_link_output_symbol_hook return type change.
3018 * elf32-arm.c (output_arch_syminfo): Likewise.
3019 (elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
3020 (elf32_arm_output_arch_local_syms): Likewise.
3021 * elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
3022 * elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
3023 (bfd_score_elf_link_output_symbol_hook): Likewise.
3024 * elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
3025 * elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
3026 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
3027 * elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
3028 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
3029 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
3030 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
3031 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
3032 * elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
3033 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
3034 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
3035
5ef11c02
AM
30362009-05-21 Alan Modra <amodra@bigpond.net.au>
3037
3038 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
3039 out of range .opd symbols.
3040
ebf12fbe
DK
30412009-05-21 Dave Korn <dave.korn.cygwin@gmail.com>
3042
3043 * coffgen.c (coff_print_symbol): Use bfd_fprintf_vma, not
3044 fprintf_vma directly.
3045 * peXXigen.c (pe_print_edata): Likewise.
3046 (pe_print_pdata): Likewise.
3047 (_bfd_XX_print_ce_compressed_pdata): Likewise.
3048 (_bfd_XX_print_private_bfd_data_common): Likewise.
3049
c1711530
DK
30502009-05-19 Dave Korn <dave.korn.cygwin@gmail.com>
3051
3052 * cofflink.c (process_embedded_commands): Ignore "-aligncomm".
3053
22a8f80e 30542009-05-15 Andrew Stubbs <ams@codesourcery.com>
164e7efc 3055 Paul Brook <paul@codesourcery.com>
22a8f80e
PB
3056
3057 * elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
3058 fix discarded sections.
3059
335bd8f2
UW
30602009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
3061
3062 * elf32-spu.c (mark_overlay_section): Move .init and .fini
3063 sections into the software icache.
3064
cdc83fba
UW
30652009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
3066
3067 * elf32-spu.c (build_stub): Always build "compact" sofware
3068 i-cache stubs.
3069
97fc8d84
UW
30702009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
3071
3072 * elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
3073 (spu_elf_setup): Initialize it.
3074 (spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
3075 Update to new-sytle cache manager data structures.
3076 (spu_elf_build_stubs): Generate new-style cache manager data
3077 structures and symbols.
3078 (spu_elf_auto_overlay): Update size computation.
3079
452de53c
UW
30802009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
3081
3082 * elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
3083 segments first amongst the program headers.
3084
d342a8b1
UW
30852009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
3086
3087 * elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
3088 into addresses for relocation types that look at high bits. Remove
3089 special handling of relocation overflow warnings.
3090
cc210763
UW
30912009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
3092
3093 * elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
3094 control flow graph between fragments of a function.
3095
c1ea05bb
UW
30962009-05-14 Ulrich Weigand <uweigand@de.ibm.com>
3097
3098 * elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
3099 generate only a 16-byte .toe section.
3100 (spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
3101
bbb0fc04
AM
31022009-05-14 Alan Modra <amodra@bigpond.net.au>
3103
3104 * elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
3105 (spu_elf_place_overlay_data): ..here. New function.
3106 * elf32-spu.h (spu_elf_place_overlay_data): Declare.
3107
6e6718a3
AJ
31082009-05-13 Andrew Jenner <andrew@codesourcery.com>
3109
3110 * elf32-arm.c: Move sysdep.h to start of file.
3111
77ae44b0
AM
31122009-05-11 Ulrich Weigand <uweigand@de.ibm.com>
3113
3114 * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
3115 start of overlays.
3116 (spu_elf_build_stubs): Don't define __icache_tagbase. Define
3117 __icache_tag_array and __icache_tag_array_size.
3118
51408ec2
AM
31192009-05-11 Masaki Muranaka <monaka@monami-software.com>
3120
3121 * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
3122 ATTRIBUTE_UNUSED.
3123 (bfinfdpic_link_omit_section_dynsym): Likewise.
3124 (elf32_bfinfdpic_finish_dynamic_sections): Likewise.
3125
2468f9c9
PB
31262009-05-05 Paul Brook <paul@codesourcery.com>
3127
3128 * bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
3129 * bfd-in2.h: Regenerate.
3130 * elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
3131 (_arm_elf_section_data): Add text and exidx fields.
3132 (add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
3133 insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
3134 copy_exidx_entry): New functions.
3135 (elf32_arm_write_section): Fixup .ARM.exidx contents.
3136
738a79f6
CL
31372009-05-05 Christophe lyon <christophe.lyon@st.com>
3138
3139 * elf32-arm.c (DEF_STUBS): New helper define.
3140 (DEF_STUB): Likewise.
3141 (stub_def): New type.
3142 (stub_definitions): New array, containing stub template pointers
3143 and sizes.
3144 (arm_size_one_stub): Make use of stub_definitions.
3145
09e2aba4
DK
31462009-05-04 Dave Korn <dave.korn.cygwin@gmail.com>
3147
3148 * elflink.c (find_version_for_sym): Remove from here, ...
3149 * linker.c (bfd_find_version_for_sym): ... rename, replace
3150 here, make public and update all callers.
3151 * bfd-in2.h: Regenerate.
3152
d8045f23
NC
31532009-04-30 Nick Clifton <nickc@redhat.com>
3154
3155 * elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
3156 section pointer.
3157 (struct elf_obj_data): Add has_ifunc_symbols boolean.
3158 * elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
3159 into a STT_GNU_IFUNC symbol type.
3160 (_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
3161 type.
3162 (_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
3163 the binary contains ifunc symbols.
3164 * elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
3165 symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
3166 * elf32-i386.c (is_indirect_function): New function.
3167 (elf_i386_check_relocs): Create an ifunc output section.
3168 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
3169 section if necessary.
3170 (elf_i386_relocate_section): Emit a reloc against an ifunc symbol
3171 if necessary.
3172 (elf_i386_add_symbol_hook): New function. Set the
3173 has_ifunc_symbols field of the elf_obj_data structure if an ifunc
3174 symbol is encountered.
3175 (elf_backend_post_process_headers): Define.
3176 (elf_backend_add_symbol_hook): Define.
3177 (elf_i386_post_process_headers): Rename to
3178 elf_i388_fbsd_post_process_headers.
3179 * elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
3180 (is_indirect_function): New function.
3181 (elf64_x86_64_check_relocs): Create an ifunc output section.
3182 (allocate_dynrelocs): Create dynamic relocs in the ifunc output
3183 section if necessary.
3184 (elf64_x86_64_relocate_section): Emit a reloc against an ifunc
3185 symbol if necessary.
3186 (elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
3187 elf_obj_data structure if an ifunc symbol is encountered.
3188 (elf_backend_post_process_headers): Define.
3189 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
3190 if we have ifunc symbols to handle.
3191 (get_ifunc_reloc_section_name): New function. Computes the name
3192 for an ifunc section.
3193 (_bfd_elf_make_ifunc_reloc_section): New function. Creates a
3194 section to hold ifunc relocs.
3195 * syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
3196 (bfd_print_symbol_vandf): Handle ifunc symbols.
3197 (bfd_decode_symclass): Likewise.
3198 * bfd-in2.h: Regenerate.
3199
96c23d59
JM
32002009-04-30 Joseph Myers <joseph@codesourcery.com>
3201
3202 * elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
3203 MOVW and MOVT relocations in a shared library link.
3204
c067354b
NC
32052009-04-27 Anthony Green <green@moxielogic.com>
3206
3207 * verilog.c: New file.
3208 * Makefile.am (BFD32_LIBS): Add verilog.c.
3209 (BFD32_LIBS_CFILES): Add verilog.c.
3210 (verilog.lo): New build rule.
3211 * Makefile.in: Rebuilt.
3212 * targets.c: Add verilog support.
3213 * bfd.c (tdata union): Add Verilog private data field.
3214 * bfd-in2.h: Regenerate.
3215
325c681d
L
32162009-04-27 H.J. Lu <hongjiu.lu@intel.com>
3217
3218 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
3219 copy pe_opthdr.
3220
ba775898
DK
32212009-04-23 Matthias Klose <doko@ubuntu.com>
3222
2e28a5fc 3223 * peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
ba775898 3224
155d87d7
CL
32252009-04-22 Christophe Lyon <christophe.lyon@st.com>
3226
3227 PR9743
3228 * elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
3229 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
3230 (elf32_arm_size_stubs): Likewise.
3231 (record_thumb_to_arm_glue): Deleted unused function.
3232 (bfd_elf32_arm_process_before_allocation): No longer handle
3233 R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
3234 (elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
3235 R_ARM_JUMP24 and R_ARM_PLT32 relocations.
3236
3e6b1042
DJ
32372009-04-21 Daniel Jacobowitz <dan@codesourcery.com>
3238
3239 * elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
3240 (elf32_arm_write_section): Declare early.
3241 (elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
3242 (arm_allocate_glue_section_space): Exclude empty sections.
3243 (ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
3244 (bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
3245 BFD.
3246 (elf32_arm_output_glue_section, elf32_arm_final_link): New.
3247 (elf32_arm_merge_eabi_attributes): Skip the stub BFD.
3248 (elf32_arm_size_dynamic_sections): Allocate interworking
3249 sections here.
3250 (bfd_elf32_bfd_final_link): Define.
3251
4f360784
L
32522009-04-21 H.J. Lu <hongjiu.lu@intel.com>
3253
3254 * coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
154a1ee5 3255
4f360784
L
3256 * coffcode.h (coff_compute_section_file_positions): Clear
3257 D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
3258
3259 * libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
3260 force_minimum_alignment.
3261
3262 * libcoff.h: Regenerated.
3263
3264 * pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
3265 (PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
3266
3267 * peicode.h (pe_mkobject): Don't set force_minimum_alignment
3268 nor target_subsystem.
3269
3270 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
3271 force_minimum_alignment nor target_subsystem.
3272
e48570bb
DK
32732009-04-21 Kai Tietz <kai.tietz@onevision.com>
3274
3275 * coff-x86_64.c (PEI_HEADERS): Protect includes.
3276 (bfd_pe_print_pdata): Remove #ifdef PE variation.
3277 * pei-x86_64.c (PEI_HEADERS): Define to prevent double
3278 include in coff-x86_64.c of headers.
3279 (PDATA_ROW_SIZE): New define.
3280 (pex_regs[]): New static array.
3281 (pex64_get_runtime_function): New static function.
3282 (pex64_get_unwind_info): Likewise.
3283 (pex64_get_scope_entry): Likewise.
3284 (pex64_xdata_print_uwd_codes): Likewise.
3285 (pex64_get_section_by_rva): Likewise.
3286 (pex64_dump_xdata): Likewise.
3287 (pex64_bfd_print_pdata): Likewise.
3288 (bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
3289 * peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
3290 * libpei.h (_bfd_pex64_print_pdata): Removed declaration.
3291
383c383f 32922009-04-19 Peter O'Gorman <binutils@mlists.thewrittenword.com>
4f360784
L
3293 Alan Modra <amodra@bigpond.net.au>
3294 Dave Korn <dave.korn.cygwin@gmail.com>
383c383f
AM
3295
3296 * peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
3297 long names and non-NUL-terminated strings.
3298
b6b450f1
L
32992009-04-17 H.J. Lu <hongjiu.lu@intel.com>
3300
3301 * bfd-in2.h: Regenerated.
3302
d9118602
L
33032009-04-17 H.J. Lu <hongjiu.lu@intel.com>
3304
3305 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
3306 IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
3307
92dd4511
L
33082009-04-17 H.J. Lu <hongjiu.lu@intel.com>
3309
3310 PR binutils/10074
3311 * coffcode.h (bfd_pei_p): New.
3312
3313 * config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
3314 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
3315 bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
3316 bfd_efi_rtdrv_ia64_vec. Replace bfd_efi_app_ia32_vec,
3317 bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
3318 i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
3319
3320 * configure.in: Remove bfd_efi_bsdrv_ia32_vec,
3321 bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
3322 bfd_efi_rtdrv_x86_64_vec,
3323 bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec. Replace
3324 bfd_efi_ia64_vec with bfd_pei_ia64_vec.
3325 * targets.c: Likewise.
3326
3327 * configure: Regenerated.
3328 * libcoff.h: Likewise.
3329 * Makefile.in: Likewise.
3330
3331 * efi-app-ia32.c: Removed.
3332 * efi-app-x86_64.c: Likewise.
3333 * efi-bsdrv-ia32.c: Likewise.
3334 * efi-bsdrv-ia64.c: Likewise.
3335 * efi-bsdrv-x86_64.c: Likewise.
3336 * efi-rtdrv-ia32.c: Likewise.
3337 * efi-rtdrv-ia64.c: Likewise.
3338 * efi-rtdrv-x86_64.c: Likewise.
3339 * efi-rtdrv-ia32.c: Likewise.
3340
3341 * efi-app-ia64.c: Moved to ...
3342 * pei-ia64.c: This.
3343 (TARGET_SYM): Set to bfd_pei_ia64_vec.
3344 (TARGET_NAME): Set to pei-ia64.
3345
3346 * libpei.h (bfd_target_pei_p): Removed.
3347 (bfd_target_pei_arch): Likewise.
3348 (bfd_target_efi_app_p): Likewise.
3349 (bfd_target_efi_app_arch): Likewise.
3350 (bfd_target_efi_bsdrv_p): Likewise.
3351 (bfd_target_efi_bsdrv_arch): Likewise.
3352 (bfd_target_efi_rtdrv_p): Likewise.
3353 (bfd_target_efi_rtdrv_arch): Likewise.
3354 (bfd_pe_executable_p): Likewise.
3355
3356 * Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
3357 efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
3358 (BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
3359 and efi-rtdrv-ia32.c.
3360 (BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
3361 efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
3362 efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
3363 (BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
3364 efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
3365 efi-rtdrv-x86_64.c. Add pei-ia64.c.
3366 (efi-app-ia64.lo): Removed.
3367 (efi-bsdrv-ia32.lo): Likewise.
3368 (efi-rtdrv-ia32.lo): Likewise.
3369 (efi-app-ia64.lo): Likewise.
3370 (efi-bsdrv-ia64.lo): Likewise.
3371 (efi-rtdrv-ia64.lo): Likewise.
3372 (efi-app-x86_64.lo): Likewise.
3373 (efi-bsdrv-x86_64.lo): Likewise.
3374 (efi-rtdrv-x86_64.lo): Likewise.
3375 (pei-ia64.lo): New.
3376
3377 * peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
3378 with bfd_pei_p.
3379 (arch_type): Removed.
3380 (pe_arch): Likewise.
3381 (pe_bfd_object_p): Just return coff_object_p.
3382
3383 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
3384 bfd_pe_executable_p with bfd_pei_p.
3385
69c5861e
CL
33862009-04-17 Christophe Lyon <christophe.lyon@st.com>
3387
3388 * elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
3389 PLT entries to an undefined symbol when generating a shared
3390 library.
3391
e9cd0660
NC
33922009-04-17 Nick Clifton <nickc@redhat.com>
3393
3394 PR 9909
3395 * coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
3396
3023e3f6
RS
33972009-04-16 Richard Sandiford <r.sandiford@uk.ibm.com>
3398
3399 * aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
3400 * aout-target.h (MY_bfd_define_common_symbol): Likewise.
3401 * aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
3402 * binary.c (binary_bfd_define_common_symbol): Likewise.
3403 * bout.c (b_out_bfd_define_common_symbol): Likewise.
3404 * coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
3405 * coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
3406 * coffcode.h (coff_bfd_define_common_symbol): Likewise.
3407 * elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
3408 * i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
3409 * i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
3410 * ieee.c (ieee_bfd_define_common_symbol): Likewise.
3411 * ihex.c (ihex_bfd_define_common_symbol): Likewise.
3412 * libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
3413 * mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
3414 * mmo.c (mmo_bfd_define_common_symbol): Likewise.
3415 * nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
3416 * oasys.c (oasys_bfd_define_common_symbol): Likewise.
3417 * pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
3418 * ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
3419 * som.c (som_bfd_define_common_symbol): Likewise.
3420 * srec.c (srec_bfd_define_common_symbol): Likewise.
3421 * tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
3422 * versados.c (versados_bfd_define_common_symbol): Likewise.
3423 * vms.c (vms_bfd_define_common_symbol): Likewise.
3424 * xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
3425 * xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
3426 * coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
3427 (pmac_xcoff_vec): Likewise.
3428 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3429 (aix5coff64_vec): Likewise.
3430 * linker.c (bfd_generic_define_common_symbol): New function.
3431 * targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
3432 (_bfd_define_common_symbol): New field.
3433 * libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
3434 * xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
3435 (xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
3436 symbols here.
3437 * bfd-in2.h: Regenerate.
3438 * libbfd.h: Likewise.
3439 * libcoff.h: Likewise.
3440
20135e4c
NC
34412009-04-15 Anthony Green <green@moxielogic.com>
3442
3443 * targets.c: Add moxie support.
3444 * Makefile.am: Ditto.
3445 * Makefile.in: Rebuilt.
3446 * cpu-moxie.c, elf32-moxie.c: New files.
3447 * archures.c: Add moxie support.
3448 * configure.in: Add moxie support.
3449 * configure: Rebuilt.
3450 * config.bfd, archures.c: Add moxie support.
3451 * bfd-in2.h: Rebuilt.
3452
82b5c97a
CL
34532009-04-15 Christophe Lyon <christophe.lyon@st.com>
3454
3455 * elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
3456 branch to an undef weak symbol into a jump to next instruction if
3457 a PLT entry will be created.
3458
0408dee6
DK
34592009-04-14 Dave Korn <dave.korn.cygwin@gmail.com>
3460
3461 * coffgen.c (make_a_section_from_file): Set the backend long
3462 section names enable if long section names found on input.
3463 * coffcode.h: Extend long section names documentation to match.
3464
a0c402a5
L
34652009-04-08 H.J. Lu <hongjiu.lu@intel.com>
3466
3467 * elflink.c (elf_link_add_object_symbols): Warn alternate ELF
3468 machine code.
3469
4d28413b
DD
34702009-04-07 DJ Delorie <dj@redhat.com>
3471
3472 * archures.c: Add bfd_mach_mep_c5.
3473 * bfd-in2.h: Likewise.
3474 * cpu-mep.c: Add bfd_c5_arch.
3475 * elf32-mep.c: Support it.
3476
bb6198d2
L
34772009-04-07 H.J. Lu <hongjiu.lu@intel.com>
3478
3479 * elflink.c (_bfd_elf_section_already_linked): Add `\n' for
3480 info->callbacks->einfo.
3481 * linker.c (_bfd_generic_section_already_linked): Likewise.
3482
bcb012d3
DD
34832009-04-06 DJ Delorie <dj@redhat.com>
3484
3485 * elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
3486
db1fe6e9
L
34872009-04-06 H.J. Lu <hongjiu.lu@intel.com>
3488
3489 * coff-x86_64.c (bfd_pe_print_pdata): Defined to
3490 _bfd_pex64_print_pdata only if PE is defined.
3491
3492 * libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
3493 (_bfd_pex64_print_pdata): This.
3494
3495 * peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
3496 (_bfd_pex64_print_pdata): This. Defined only if COFF_WITH_pex64
3497 is defined.
3498
c7c7219d
KT
34992009-04-05 Kai Tietz <kai.tietz@onevision.com>
3500
3501 * coff-x86_64.c (bfd_pe_print_pdata): Define as
3502 _bfd_pep_print_x64_pdata.
3503 * libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
3504 * peXXigen.c (_bfd_pep_print_x64_pdata): New.
3505
3df502ae
SA
35062009-04-02 Sterling Augustine <sterling@jaw.hq.tensilica.com>
3507
154a1ee5 3508 * elf32-xtensa.c (relax_property_section): Always set r_offset
3df502ae
SA
3509 to zero.
3510
d3626fb0
CL
35112009-04-02 Christophe Lyon <christophe.lyon@st.com>
3512
3513 * elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
3514 elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
3515 branch stubs.
3516 (elf32_arm_stub_type): New enum values for the two new stubs.
3517 (arm_type_of_stub): Make use of the two new stubs.
3518 (arm_size_one_stub): Handle the two new stubs.
3519
fe723c87
MT
35202009-04-01 Matt Thomas <matt@netbsd.org>
3521
3522 * elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
3523 hidden symbols into the GOT or PLT.GOT.
154a1ee5 3524 (elf_vax_relocate_section): Do not emit a PCREL reloc
fe723c87
MT
3525 into a shared object if it is against a hidden symbol.
3526
ee698300
RS
35272009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3528
3529 * xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
3530 and know_contains_shared_object_p.
3531 (xcoff_archive_contains_shared_object_p): Add an "info" parameter.
3532 Cache the result in the archive_info table.
3533 (xcoff_auto_export_p): Add an "info" parameter and update the
3534 call to xcoff_archive_contains_shared_object_p.
3535 (xcoff_mark_auto_exports): Update accordingly.
3536 (xcoff_post_gc_symbol): Likewise.
3537
54e2dbe0
RS
35382009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3539
3540 * xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
3541 rather than C_EXT.
3542
2e470849
RS
35432009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3544
3545 * coff-rs6000.c (member_layout): New structure.
3546 (archive_iterator): Likewise.
3547 (member_layout_init): New function.
3548 (archive_iterator_begin): Likewise.
3549 (archive_iterator_next): Likewise.
3550 (xcoff_write_armap_old): Use the new iterator functions.
3551 (do_shared_object_padding): Delete.
3552 (xcoff_write_armap_big): Use the new iterator functions. Simplify
3553 handling of arch_info.
3554 (xcoff_write_archive_contents_old): Allocate arelt_data in the
3555 first loop rather than the second. Allocate a member header if
3556 there isn't one, then work out the stat information and length
3557 in the first loop too. Use the new iterators for the second loop.
3558 (xcoff_write_archive_contents_big): Likewise.
3559
24c611d1
RS
35602009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3561
3562 * bfd-in.h (bfd_xcoff_split_import_path): Declare.
3563 (bfd_xcoff_set_archive_import_path): Likewise.
3564 * bfd-in2.h: Regenerate.
3565 * xcofflink.c: Include libiberty.h.
3566 (xcoff_archive_info): New structure.
3567 (xcoff_archive_info_hash): New function.
3568 (xcoff_archive_info_eq): Likewise.
3569 (xcoff_get_archive_info): Likewise.
3570 (_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
3571 (bfd_xcoff_split_import_path): New function.
3572 (bfd_xcoff_set_archive_import_path): Likewise.
3573 (xcoff_set_import_path): Move earlier in file.
3574 (xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
3575 object to the the directory part of the bfd's filename. Get the
3576 import path and filename of an archive object from the archive's
3577 xcoff_tdata, initializing it if necessary. Update use of
3578 import_file_id.
3579 (bfd_link_input_bfd): Update use of import_file_id.
3580 (xcoff_write_global_symbol): Likewise.
3581
d286971a
RS
35822009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3583
3584 * xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
3585
35862009-04-01 Richard Sandiford <r.sandiford@uk.ibm.com>
3587
3588 * xcofflink.c (xcoff_link_create_extra_sections): Don't create
3589 a .loader section for relocatable links.
3590 (xcoff_need_ldrel_p): New function.
3591 (xcoff_mark): Use it.
3592 (bfd_xcoff_link_count_reloc): Only count loader relocs if there's
3593 a loader section.
3594 (xcoff_build_ldsym): New function, split out from...
3595 (xcoff_build_ldsyms): ...here. Rename to...
3596 (xcoff_post_gc_symbol): ...this. Only export symbols, and only
3597 call xcoff_build_ldsym, if there's a loader section.
3598 (xcoff_build_loader_section): New function, extracted verbatim from...
3599 (bfd_xcoff_size_dynamic_sections): ...here. Only call it if
3600 there's a loader section. Only add an __rtinit loader symbol
3601 if there's a loader section. Update after above name change.
3602 (xcoff_symbol_section, xcoff_create_ldrel): New functions.
3603 (bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
3604 and xcoff_create_ldrel.
3605 (xcoff_write_global_symbol): Use xcoff_create_ldrel.
3606 (xcoff_reloc_link_order): Likewise, but only call it if there's
3607 a loader section. Use xcoff_symbol_section.
3608 (_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
3609 if there's a loader section.
3610
8707bb87
RS
36112009-04-01 Richard Sandiford <rdsandiford@googlemail.com>
3612
3613 * xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
3614
e780aef2
CL
36152009-04-01 Christophe Lyon <christophe.lyon@st.com>
3616
3617 * elf32-arm.c (group_sections): Rewrite loops for better
3618 readability.
3619
c301e700
DD
36202009-03-30 DJ Delorie <dj@redhat.com>
3621
3622 * elflink.c (elf_link_input_bfd): Don't try to resolve complex
3623 relocs when doing a relocatable link.
3624
3895f852
MM
36252009-03-28 Mark Mitchell <mark@codesourcery.com>
3626
3627 * coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
3628 "ERROR:", in error messages.
3629 * cpu-arm.c (bfd_arm_merge_machines): Likewise.
3630 * elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
3631 * elf32-arm.c (tag_cpu_arch_combine): Likewise.
3632 (elf32_arm_merge_eabi_attributes): Likewise.
3633 (elf32_arm_merge_private_bfd_data): Likewise.
3634
ea882e87
NC
36352009-03-27 Nick Clifton <nickc@redhat.com>
3636
3637 * section.c (bfd_get_section_contents): Detect and handle the case
3638 where a section has the SEC_IN_MEMORY flag set but no actual
3639 contents allocated.
3640
9433b9b1
AM
36412009-03-26 Alan Modra <amodra@bigpond.net.au>
3642
3643 PR 6494
3644 * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
3645 p_filesz and p_memsz are equal. Use p_memsz as the segment size.
3646 (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
3647 if we don't find matching PT_LOAD when copying.
3648
dc1aa734
SR
36492009-03-25 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
3650
3651 * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
3652 the reloc descriptions.
3653
34d3d6b9
HPN
36542009-03-25 Hans-Peter Nilsson <hp@axis.com>
3655
3656 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3657 <R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
3658 <case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
3659
34274ccc
L
36602009-03-24 H.J. Lu <hongjiu.lu@intel.com>
3661
3662 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
3663 (bfd_i386_arch_intel_syntax): Likewise.
3664 (i8086_arch): Likewise.
3665 (bfd_x86_64_arch): Likewise.
3666
019c5a2e
HPN
36672009-03-24 Hans-Peter Nilsson <hp@axis.com>
3668
6718f446
HPN
3669 * elf32-cris.c (cris_elf_relocate_section): <case
3670 R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
3671 symbols for non-allocated sections. Don't check whether to
3672 generate R_CRIS_DTPMOD for non-allocated sections.
3673 (cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
3674 handle relocation GC:ing if applied to non-allocated section.
3675 (cris_elf_check_relocs): Similar.
3676
019c5a2e
HPN
3677 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3678 <R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
3679 when emitting a known TP offset in the GOT.
3680
ffcfec52
AM
36812009-03-23 Alan Modra <amodra@bigpond.net.au>
3682
3683 * elf64-ppc.c (synthetic_opd): Delete.
3684 (compare_symbols): Look for .opd name rather than section match.
3685 (ppc64_elf_get_synthetic_symtab): Likewise.
3686
c6dd29ce
AM
36872009-03-21 Alan Modra <amodra@bigpond.net.au>
3688
3689 * elf32-ppc.c (is_pic_glink_stub): Delete.
3690 (is_nonpic_glink_stub): New function.
3691 (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
3692 than first pic one.
3693 (struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
3694
8c21ca21
AK
36952009-03-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
3696 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
3697
3698 * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
4f360784 3699 macros for visibilty and locality checks.
8c21ca21
AK
3700 (elf_s390_adjust_dynamic_symbol): Likewise.
3701 (allocate_dynrelocs): Likewise.
3702 (elf_s390_relocate_section): Likewise.
3703 (elf_s390_finish_dynamic_symbol): Likewise.
3704 * elf64-s390.c (elf_s390_check_relocs): Likewise.
3705 (elf_s390_adjust_dynamic_symbol): Likewise.
3706 (allocate_dynrelocs): Likewise.
3707 (elf_s390_relocate_section): Likewise.
3708 (elf_s390_finish_dynamic_symbol): Likewise.
3709
156621f3
KT
37102009-03-19 Kai Tietz <kai.tietz@onevision.com>
3711
3712 * bfd-in2.h: Regenerated.
3713 * coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
3714 for debugging sections and map memory read/write dependent on
3715 SEC_COFF_NOREAD.
3716 (styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
3717 without memory read flags set.
3718 * section.c: Add SEC_COFF_NOREAD to section flags.
3719
d1fa68d3
AS
37202009-03-19 Andreas Schwab <schwab@linux-m68k.org>
3721
3722 * elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
3723 for format string.
3724
ad2adbc8
AM
37252009-03-19 Alan Modra <amodra@bigpond.net.au>
3726
3727 * elf32-spu.c (spu_elf_find_overlays): Separate error return from
3728 "no overlays" return. If there are overlays, create overlay
3729 manager entry symbols here, so that..
3730 (spu_elf_build_stubs): ..we don't need to set them up here.
3731 Simplify entry symbol tests.
3732 * elf32-spu.h (spu_elf_find_overlays): Update prototype.
3733
67cc5033
MK
37342009-03-18 Mark Kettenis <kettenis@gnu.org>
3735
d1fa68d3 3736 * elf.c (elfcore_grok_openbsd_procinfo)
67cc5033
MK
3737 (elfcore_grok_openbsd_note): New functions.
3738 (elf_parse_notes): Handle notes from OpenBSD ELF core files.
3739
8d25cc3d
AM
37402009-03-18 Alan Modra <amodra@bigpond.net.au>
3741
3889c459 3742 * vms-hdr.c: Don't include alloca.h.
8d25cc3d
AM
3743 * elf32-m68hc1x.c: Include alloca-conf.h.
3744 * xsym.c: Likewise.
3745 * elf64-hppa.c: Likewise. Remove existing #if's handling alloca.
3746 * som.c: Likewise.
3747 * Makefile.am: Run "make dep-am".
3748 * Makefile.in: Regenerate.
3749
a89e6478
DJ
37502009-03-17 Daniel Jacobowitz <dan@codesourcery.com>
3751
3752 * elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
3753
a7e11ee1
AM
37542009-03-17 Alan Modra <amodra@bigpond.net.au>
3755
3756 * elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
3757 Add compact_stub.
3758 (emum _ovly_flavour): Delete ovly_compact, ovly_none.
3759 * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
3760 ovly_return fields with ovly_entry[2]. Adjust all users.
3761 (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
3762 when soft-icache.
3763 (spu_elf_build_stubs): Likewise.
3764 (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
3765 ovly_flavour changes. Update all callers.
3766 (ovl_stub_size_log2): New function.
3767 (build_stub): Handle compact icache stubs. Use different manager
3768 entry point for stubs in non-icache area.
3769 (spu_elf_size_stubs): Don't allocate space for indirect branch
3770 descriptors.
3771 (spu_elf_build_stubs): And don't built them.
3772
607a83c9
AS
37732009-03-16 Andrew Stubbs <ams@codesourcery.com>
3774
3775 * dwarf2.c (read_section): Always use rawsize, if available.
3776
588f62fc
AM
37772009-03-16 Alan Modra <amodra@bigpond.net.au>
3778
3779 * simple.c (bfd_simple_get_relocated_section_contents): Use larger
3780 of rawsize and size for buffer.
3781
a14c90c1
UW
37822009-03-15 Ulrich Weigand <uweigand@de.ibm.com>
3783
3784 * elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
3785 parameter just because fixed sections fit into local store.
3786 (spu_elf_auto_overlay): Do not declare as "noreturn". Skip
3787 generating overlays if fixed sections plus reserved stack
3788 and heap space fit into local store.
3789
30c665df
AM
37902009-03-15 Alan Modra <amodra@bigpond.net.au>
3791
3792 * elf32-spu.c (build_stub): Correct icache set_id.
3793 (spu_elf_relocate_section): Likewise.
3794
f95942a3
RS
37952009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3796
3797 * xcofflink.c (xcoff_link_check_archive_element): Only free the
3798 symbol table if it was created by the current call.
3799
670562e9
RS
38002009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3801
3802 * xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
3803 class XMC_DS rather than XMC_UA.
3804
b64232cc
RS
38052009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3806
3807 * bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
3808 bfd_boolean export_defineds parameter with an unsigned int
3809 auto_export_flags parameter.
3810 * bfd-in2.h: Regenerate.
3811 * xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
3812 split out from xcoff_build_ldsyms.
3813 (xcoff_covered_by_expall_p): New function.
3814 (xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
3815 but with extra code to handle -bexpfull and -bexpall.
3816 (xcoff_mark_auto_exports): New function.
3817 (xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
3818 a function should be automatically exported.
3819 (bfd_xcoff_size_dynamic_sections): Replace the export_defineds
3820 parameter with an auto_export_flags parameter. Update ldinfo
3821 accordingly. Use xcoff_mark_auto_exports to mark all automatically-
3822 exported symbols.
3823
7d504122
RS
38242009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3825
3826 * xcofflink.c (xcoff_mark_symbol_by_name): New function.
3827 (bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
3828 init and fini functions. Do garbage collection for objects
3829 without an entry point too.
3830
8602d4fe
RS
38312009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3832
3833 * coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
3834 check whether a symbol has csect information.
3835 (coff_print_aux): Likewise.
3836 * coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
3837 information for C_AIX_WEAKEXT too.
3838 (_bfd_xcoff_swap_aux_out): Likewise.
3839 (xcoff_reloc_type_br): Handle defweak symbols too.
3840 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
3841 information for C_AIX_WEAKEXT too.
3842 (_bfd_xcoff64_swap_aux_out): Likewise.
3843 (xcoff64_reloc_type_br): Handle defweak symbols too.
3844 * coffgen.c (coff_print_symbol): Handle auxillary function
3845 information for C_AIX_WEAKEXT too.
3846 * xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
3847 instead of BSF_GLOBAL if the L_WEAK flag is set.
3848 (xcoff_dynamic_definition_p): New function.
3849 (xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
3850 defines h. Don't change h if ldsym isn't the definition. Otherwise,
3851 always take the symbol class from the ldsym. Use weak bfd symbol
3852 types for weak ldsyms.
3853 (xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
3854 Fix the check for whether a definition is from a shared object.
3855 Allow redefinitions of weak symbols.
3856 (xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
3857 (xcoff_keep_symbol_p): Likewise.
3858 (bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
3859 (xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
3860 Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
3861 but mark them as L_WEAK.
3862 (xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
3863 instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
3864
5b49f6dc
RS
38652009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3866
3867 * xcofflink.c (xcoff_mark): When walking the relocations,
3868 only mark the target symbol or the target section, not both.
3869 (xcoff_final_definition_p): New function.
3870 (xcoff_keep_symbol_p): Use it to check whether an external XCOFF
3871 symbol is a valid definition of the associated output symbol.
3872 Use XCOFF_ALLOCATED to stop the same hash table entry having
3873 two output symbols.
3874 (bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
3875 keeping a symbol.
3876 (xcoff_link_input_bfd): Use xcoff_final_definition_p.
3877
c4037431
RS
38782009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3879
3880 * xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
3881 symbols as XMC_XO.
3882
3df13c4a
RS
38832009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3884
3885 * libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
3886 * libcoff.h: Regenerate.
3887 * xcofflink.c (xcoff_link_add_symbols): Record per-symbol
3888 line-number counts in the bfd's lineno_counts field.
3889 Don't keep per-csect line-number counts.
3890 (xcoff_sweep): Don't update per-csect line-number counts.
3891 (bfd_xcoff_size_dynamic_sections): Count the number of line-number
3892 entries in each output section.
3893 (xcoff_link_input_bfd): Get the number of line numbers from
3894 the bfd's lineno_counts field, rather than recalculating it
3895 from scratch. Fix the range check when updating C_BINCL and
3896 C_EINCL symbols.
3897 (_bfd_xcoff_bfd_final_link): Don't count the output line numbers
3898 here. Don't expect csects to have line-number counts.
3899
e450936a
RS
39002009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3901
3902 * libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
3903 * libcoff.h: Regenerate.
3904 * xcofflink.c (xcoff_keep_symbol_p): New function, using the
3905 "skip" logic from xcoff_link_input_bfd.
3906 (bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
3907 objects in a dynamic link, rather than checking whether csectpp
3908 is null. Always allocate debug_index for other objects,
3909 and always go through the loop. Update the type of debug_index
3910 after the change above. Read the auxillary csect information
3911 and use xcoff_keep_symbol_p to decide whether a symbol should
3912 be kept. Set its debug_index to -2 if not.
3913 (xcoff_link_input_bfd): Update the type of debug_index after
3914 the change above and always expect it to be nonnull. Use it to
3915 test whether a symbol should be stripped, rather than making the
3916 decision here. Postpone all symbol creation to the second pass.
3917
47dfb2ca
RS
39182009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3919
3920 * xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
3921 creating a descriptor.
3922 (xcoff_sweep): Don't mark toc_section unless it's needed.
3923 (bfd_xcoff_size_dynamic_sections): Skip the toc_section
3924 when marking every bfd.
3925 (xcoff_link_input_bfd): Skip all TOC anchors.
3926 (xcoff_toc_section_p, xcoff_find_tc0): New functions.
3927 (_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
3928 to -1; call xcoff_find_tc0 instead.
3929
4cc02a02
RS
39302009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3931
3932 * libcoff-in.h (xcoff_section_tdata): Update commentary.
3933 * libcoff.h: Regenerate.
3934 * xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
3935 symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
3936 the previous symbol's csect. Treat last_symndx as an inclusive value
3937 and simplify its handling.
3938 (xcoff_mark): Treat last_symndx as an inclusive value. Only mark
3939 symbols with the right csect. Don't mark rsec when processing
d1fa68d3 3940 relocations against undefined or absolute sections.
4cc02a02
RS
3941 (bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
3942 of bfd_und_section_ptr.
3943 (xcoff_link_input_bfd): Likewise.
3944
858ef0ce
RS
39452009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3946
3947 * coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
3948 against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
3949 flag is set. Assert that all undefined symbols are either
3950 imported or defined by a dynamic object.
3951 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3952 * xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
3953 handling to all relocations. Only set XCOFF_CALLED for function
3954 symbols.
3955 (xcoff_find_function): New function, split out from...
3956 (bfd_xcoff_export_symbol) ...here.
3957 (xcoff_set_import_path): New function, split out from...
3958 (bfd_xcoff_import_symbol): ...here. Remove assertion for old
3959 meaning of XCOFF_CALLED.
3960 (xcoff_mark_symbol): If we mark an undefined and unimported
3961 symbol, find some way of defining it. If the symbol is a function
3962 descriptor, fill in its definition automatically. If the symbol
3963 is a function, mark its descriptor and allocate room for global
3964 linkage code. Otherwise mark the symbol as implicitly imported.
3965 Move the code for creating function descriptors from...
d1fa68d3 3966 (xcoff_build_ldsyms): ...here. Use XCOFF_WAS_UNDEFINED to
858ef0ce
RS
3967 check for symbols that were implicitly defined.
3968 (xcoff_mark): Don't count any dynamic relocations against
3969 function symbols.
3970 (bfd_xcoff_size_dynamic_sections): Save the rtld parameter
3971 in the xcoff link info.
3972 (xcoff_link_input_bfd): Remove handling of undefined and
3973 unexported symbols.
3974
12b2cce9
RS
39752009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3976
3977 * coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
3978 if the target is absolute. Fix comment typo.
3979 (xcoff_ppc_relocate_section): Remove FIXME.
3980 * coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
3981 if the target is absolute.
3982
0e3212ad
RS
39832009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3984
3985 * xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
3986 R_POS and R_NEG relocations against absolute symbols to the
3987 .loader section.
3988
d19d97e9
RS
39892009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3990
3991 * coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
3992 to 2 for bfd_mach_ppc_620.
3993
e5231592
RS
39942009-03-14 Richard Sandiford <r.sandiford@uk.ibm.com>
3995
3996 * config.bfd: Treat AIX 6+ in the same way as AIX 5.
3997 * configure.in: Likewise.
3998 * configure: Regenerate.
3999
3516e984
L
40002009-03-13 H.J. Lu <hongjiu.lu@intel.com>
4001
4002 PR binutils/9945
4003 * elf.c (assign_section_numbers): Generate symbol table if there
4004 is any relocation in output.
4005 (_bfd_elf_compute_section_file_positions): Likewise.
4006
ce98a316
NC
40072009-03-13 Nick Clifton <nickc@redhat.com>
4008
4009 PR 9934
4010 * elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
4011 * elflink.c (elf_link_read_relocs_from_section): Use
4012 NUM_SHDR_ENTRIES. Gracefully handle the case where there are
4013 relocs but no symbol table.
4014 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
4015
c4fb387b
L
40162009-03-12 H.J. Lu <hongjiu.lu@intel.com>
4017
4018 PR ld/9938
4019 * elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
4020 to check ___tls_get_addr.
4021
4022 * elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
4023 strncmp to check __tls_get_addr.
4024
53638231
AS
40252009-03-12 Andrew Stubbs <ams@codesourcery.com>
4026
4027 * dwarf2.c (read_section): Always check the offset, even when the
4028 section has been read before.
4029
09e8c3bf
L
40302009-03-11 H.J. Lu <hongjiu.lu@intel.com>
4031
4032 * elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
4033 comments.
4034
36e4dce6
CD
40352009-03-11 Chris Demetriou <cgd@google.com>
4036
4037 * bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
4038 * bfd-in2.h: Regenerate.
4039 * archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
4040 flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
4041 mode.
4042 (bsd_write_armap): Likewise.
4043 (_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
4044 flag is set, do nothing.
4045 (coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
4046 for timestamp.
4047
9b175a76
UW
40482009-03-11 Ulrich Weigand <uweigand@de.ibm.com>
4049
4050 * elf32-spu.c (find_function_stack_adjust): Handle sf instruction
4051 used to update stack pointer.
4052
f501de17
DA
40532009-03-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4054
4055 PR binutils/9921
4056 * som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
4057 for unknown symbols in absolute section.
4058
d11fd249
NC
40592009-03-06 Nick Clifton <nickc@redhat.com>
4060
4061 * po/es.po: Updated Spanish translation.
4062
8cd931b7
CL
40632009-03-05 Christophe Lyon <christophe.lyon@st.com>
4064
4065 * elf32-arm.c (group_sections): Take next section size into
4066 account before accepting to group it.
4067
5fa9e92f
CL
40682009-03-05 Christophe Lyon <christophe.lyon@st.com>
4069
4070 * elf32-arm.c (arm_type_of_stub): Handle long branches targetting
4071 PLT entries.
4072 (elf32_arm_final_link_relocate): Likewise.
4073
b92997d6
AM
40742009-03-05 Moritz Kroll <Moritz.Kroll@gmx.de>
4075
4076 PR 9923
4077 * peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
4078
727fc41e
AM
40792009-03-04 Alan Modra <amodra@bigpond.net.au>
4080
4081 * reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
4082 * section.c (struct bfd_section): Add has_tls_get_addr_call.
4083 (BFD_FAKE_SECTION): Init new flag.
4084 * ecoff.c (bfd_debug_section): Likewise.
4085 * bfd-in2.h: Regenerate.
4086 * libbfd.h: Regenerate.
4087 * elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
4088 (ppc_elf_reloc_type_lookup): Handle new relocs.
4089 (ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
4090 without marker relocs.
4091 (ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
4092 if section has no old-style calls.
4093 (ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
4094 Don't try to optimize new-style __tls_get_addr call when handling
4095 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
4096 relocs.
4097 * elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
4098 (ppc64_elf_reloc_type_lookup): Handle new relocs.
4099 (ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
4100 without marker relocs.
4101 (ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
4102 if section has no old-style calls. Set toc_ref for new relocs as
4103 appropriate.
4104 (ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
4105 Don't try to optimize new-style __tls_get_addr call when handling
4106 arg setup relocs. Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
4107 relocs.
4108
51dec227
AM
41092009-03-04 Alan Modra <amodra@bigpond.net.au>
4110
4111 PR 6768
4112 * configure.in: Test for ld --as-needed support. Link shared
4113 libbfd against libm.
4114 * configure: Regenerate.
4115
a1f7ca36
AM
41162009-03-03 Alan Modra <amodra@bigpond.net.au>
4117
4118 * Makefile.am: Run "make dep-am".
4119 * Makefile.in: Regenerate.
4120
c3b7224a
NC
41212009-03-02 Qinwei <qinwei@sunnorth.com.cn>
4122
4123 * elf32-score7.c: New file.
4124 * elf32-score.h: New file.
4125 * elf32-score.c: Add code to support score 7. Set score7 as the
4126 default.
4127 * cpu-score.c: Add score7 architecure.
4128 (compatibile): New function.
4129 * Makefile.am: Add rules for building elf32-score7 object.
4130 * Makefile.in: Regenerate.
4131 * configure.in: Add elf32-score7 object to score vectors.
4132 * configure: Regenerate.
4133 * reloc.c: Add score7 relocs.
4134 * archures.c: Add score3 and score7 machine numbers.
4135 * bfd-in2.h: Regenerate.
4136 * libbfd.h: Regenerate.
4137
58e24671
RW
41382009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4139
4140 * configure: Regenerate.
4141
5887528b
DA
41422009-03-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4143
d45b7d74
DA
4144 * elf32-hppa.c (hppa32_elf_local_refcounts): New function.
4145 (elf32_hppa_check_relocs): Use it.
4146
5887528b
DA
4147 * elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
4148 elf64-hppa.c.
4149 (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
4150 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
4151 (elf_hppa_is_dynamic_loader_symbol): Likewise.
4152 (elf_hppa_record_segment_addrs): Likewise.
4153 (elf_hppa_final_link): Likewise.
4154 (elf_hppa_relocate_insn): Likewise.
4155 (elf_hppa_final_link_relocate): Likewise.
4156 (elf64_hppa_relocate_section): Likewise.
4157 * elf64-hppa.c: Insert above.
4158
a03bd320
DA
41592009-02-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4160
4161 * elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
4162 (elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
4163 (elf_hppa_relocate_section): Likewise.
4164 * elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
4165 from struct elf_link_hash_entry. Add count field.
4166 (struct elf64_hppa_dyn_hash_table): Delete.
4167 (struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
4168 (elf64_hppa_hash_table): Rename to hppa_link_hash_table.
4169 (hppa_elf_hash_entry, eh_name): Define.
4170 (elf64_hppa_new_dyn_hash_entry): Delete.
4171 (elf64_hppa_dyn_hash_lookup): Delete.
4172 (elf64_hppa_dyn_hash_traverse): Delete.
4173 (get_dyn_name): Delete.
4174 (elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
4175 of struct elf64_hppa_dyn_hash_entry *.
4176 (elf64_hppa_finalize_dlt, llocate_global_data_dlt,
4177 allocate_global_data_plt, allocate_global_data_stub,
4178 allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
4179 Likewise.
4180 (hppa64_link_hash_newfunc): New.
4181 (elf64_hppa_hash_table_create): Rework.
4182 (count_dyn_reloc): Likewise.
4183 (hppa64_elf_local_refcounts): New.
4184 (elf64_hppa_check_relocs): Rework using standard technique for recording
4185 local DLT, PLT and OPD reference counts.
4186 (elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
4187 elf_link_hash_entry *.
4188 (elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
4189 allocate_global_data_plt, allocate_global_data_stub,
4190 allocate_global_data_opd, allocate_dynrel_entries,
4191 elf64_hppa_adjust_dynamic_symbol,
4192 elf64_hppa_mark_milli_and_exported_functions): Likewise.
4193 (elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
4194 Use hppa_link_hash_table. Rework.
4195 (elf64_hppa_link_output_symbol_hook): Rework.
4196 (elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
4197 elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
4198 elf64_hppa_finish_dynamic_sections): Likewise.
4199
ebe24dd4
CL
42002009-02-26 Christophe Lyon <christophe.lyon@st.com>
4201
4202 * elf32-arm.c (stub_reloc_type): Removed.
4203 (insn_sequence): Renamed reloc_type field to r_type.
4204 (elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
4205 (elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
4206 (elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
4207 (elf32_arm_stub_type): Add new enum entries for the new stubs.
4208 (arm_stub_is_thumb): Catch new stubs.
4209 (arm_type_of_stub): Handle new stubs.
4210 (arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
4211 (bfd_elf32_arm_process_before_allocation): Remove useless
4212 condition.
4213
b9d678e0
L
42142009-02-25 H.J. Lu <hongjiu.lu@intel.com>
4215
4216 * elf.c (elf_find_function): Use is_function_type to check
4217 function symbol.
4218
56fb3749
SA
42192009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com>
4220
4221 * xtensa-modules.c: Revert to previous version 1.11 due
4222 to inadvertant commit.
4223
658ff993
SA
42242009-02-24 Sterling Augustine <sterling@tensilica.com>
4225
4226 * elf32-xtensa.c (text_action_add): Separate test for action
4227 type. Break if saved action is ta_widen_insn at same offset.
4228
cf3eccff
DJ
42292009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
4230
4231 * elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
4232 to elf32_arm_stub_long_branch_any_arm_pic.
4233 (elf32_arm_stub_long_branch_any_thumb_pic): New.
4234 (enum elf32_arm_stub_type, arm_type_of_stub)
4235 (arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
4236 separately.
4237
07d72278
DJ
42382009-02-24 Joseph Myers <joseph@codesourcery.com>
4239
4240 * elf32-arm.c (PREV_SEC): Update comment.
4241 (group_sections): Rename argument to stubs_always_after_branch.
4242 Reverse the list and place stubs at the end of input sections.
4243 Undefine NEXT_SEC.
4244 (elf32_arm_size_stubs): Update to use stubs_always_after_branch.
4245
4e31c731
DJ
42462009-02-23 Daniel Jacobowitz <dan@codesourcery.com>
4247
4248 * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
4249 Fix formatting.
4250 (arm_size_one_stub): Remove unnecessary break.
4251 (arm_map_one_stub): Fix formatting. Return after BFD_FAIL.
4252
42532009-02-23 Christophe Lyon <christophe.lyon@st.com>
461a49ca
DJ
4254
4255 * elf32-arm.c (stub_insn_type): New type.
4256 (stub_reloc_type): Likewise.
4257 (insn_sequence): Likewise.
4258 (elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
4259 (elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
4260 (elf32_arm_stub_long_branch_thumb_only): Likewise.
4261 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
4262 (elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
4263 (elf32_arm_stub_long_branch_any_any_pic): Likewise.
4264 (elf32_arm_stub_hash_entry): Add new helper fields.
4265 (stub_hash_newfunc): Initialize these new fields.
4266 (arm_build_one_stub): Encode Arm and Thumb instructions separately
4267 to take endianness into account.
4268 (arm_size_one_stub): Compute size of stubs using insn_sequence.
4269 (arm_map_one_stub): Code is now more generic, thanks to
4270 insn_sequence.
4271
c2b4a39d
CL
42722009-02-23 Christophe Lyon <christophe.lyon@st.com>
4273
4274 * elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
4275 code.
4276 (elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
4277 (arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
4278 BLX is not available. Fix typo in warning message. Add comments
4279 and improve formatting.
4280 (arm_build_one_stub): Adjust to new
4281 elf32_arm_stub_long_branch_v4t_thumb_arm stub.
4282 (arm_map_one_stub): Likewise.
4283
0c376465 42842009-02-23 Tristan Gingold <gingold@adacore.com>
a60a89d6
TG
4285 Eric Botcazou <ebotcazou@adacore.com>
4286 Douglas B Rupp <rupp@gnat.com>
0c376465
TG
4287
4288 * vms.h: Update copyright year, fix comments, reorder declarations.
4289 (_bfd_save_vms_section): Remove the prototype.
4290 (EGPS_S_V_NO_SHIFT): New constant.
4291 (bfd_vms_set_section_flags): New prototype.
4292 (EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
4293 constants.
4294 (EGSY_S_W_FLAGS): Ditto.
4295 (EGSY_S_V_QUAD_VAL): Ditto.
4296 (ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
4297 (EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
4298 EGST_S_B_NAMLNG): Ditto.
4299 (ESRF_S_B_NAMLNG): Ditto.
4300 (ETIR_S_C_HEADER_SIZE): Ditto.
4301 (EGPS_S_V_ALLOC_64BIT): Ditto.
4302 (DST_S_C_EPILOG): Ditto.
4303 (DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
4304 (DST_S_C_SRC_INCRLNUM_B): Ditto.
4305 (DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
4306 (DST_S_L_PCLINE_UNSLONG): Ditto.
4307 (DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
4308 (DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
4309 (DST_S_C_SOURCE_HEADER_SIZE): Ditto.
4310 (DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
4311 (DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
4312 (DST_S_B_SRC_UNSBYTE): Ditto.
4313 (DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
4314 Add prototypes.
4315 (vms_section, vms_reloc): Remove types.
4316 (hdr_struc): Replaced by ...
4317 (hdr_struct): ... new type.
4318 (EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
4319 (EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
4320 (EMH_DATE_LENGTH): Ditto.
4321 (eom_struc): Replaced by ...
4322 (eom_struct): ... new type.
4323 (EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
4324 (EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
4325 (EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
4326 (EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
4327 (EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
4328 (EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
4329 (EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
4330 (EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
4331 (EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
4332 (EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
4333 (EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
4334 (EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
4335 (EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
4336 (EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
4337 (EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
4338 (DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
4339 (DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
4340 (DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
4341 (DBG_S_C_DMT_PSECT_SIZE): Ditto.
4342 (enum file_type_enum): New type.
4343 (struct location_struct): Removed.
4344 (struct fileinfo, struct srecinfo, struct lineinfo): New types.
4345 (struct funcinfo, struct module): Ditto.
4346 (struct vms_private_data_struct): Update fields.
4347 (struct vms_section_data_struct): New type.
4348
4349 * vms.c: Update copyright year, fix comments,
4350 Fix includes for DECC, add prototypes.
4351 (vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
4352 some initializers.
4353 Use flavour to set is_vax, location_stack is removed.
4354 (struct pair): Declare.
4355 (fill_section_ptr): Initialize variables at declaration.
4356 Add guard to set SECTION_SYM flag, handlde und section.
4357 (vms_fixup_sections): Use struct pair for fill_section_ptr argument.
4358 (_bfd_vms_slurp_object_records): New function, replaces previous
4359 vms_object_p.
4360 (vms_slurp_module): New function.
4361 (vms_slurp_image): Ditto.
4362 (vms_object_p): Complete rewrite.
4363 (vms_mkobject): Use is_vax field to slect architecture.
4364 (free_reloc_stream): New function.
4365 (vms_convert_to_var): Ditto.
4366 (vms_convert_to_var_1): Ditto.
4367 (vms_convert_to_var_unix_filename): Ditto.
4368 (vms_close_and_cleanup): Call free_reloc_stream, convert file to
4369 VAR format on VMS.
4370 (vms_new_section_hook): Set alignment to 0, allocate private data.
4371 (vms_get_section_contents): Load content.
4372 (vms_get_symbol_info): Handle undefined section.
4373 (vms_find_nearest_line): Handle.
4374 (alloc_reloc_stream): New function.
4375 (vms_slurp_reloc_table): Ditto.
4376 (vms_get_reloc_upper_bound): Make it real.
4377 (vms_canonicalize_reloc): Do the real work.
4378 (alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
4379 ALPHA_R_BOH.
4380 (vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
4381 (vms_set_arch_mach): Check arch.
4382 (vms_set_section_contents): Copy the content after allocation.
4383 (vms_alpha_vec): Update object flags.
4384
4385 * vms-tir.c: Update copyright year, fix comments,
4386 add prototypes for new functions.
4387 (dst_define_location): New function.
4388 (dst_restore_location): New function.
4389 (dst_retrieve_location): New function.
4390 (dst_check_allocation): New function.
4391 (image_dump): Call dst_check_allocation.
4392 (image_write_b): Ditto.
4393 (image_write_w): Ditto.
4394 (image_write_l): Ditto.
4395 (image_write_q): Ditto.
4396 (cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
4397 STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
4398 CTL_STKDL.
4399 Call error handler instead of abort if name is not known.
4400 (etir_sta): Add quarter_relocs argument and set it.
4401 Fix cast.
4402 (etir_sto): Ditto.
4403 (etir_opr): Ditto, return FALSE in case of error.
4404 (etir_ctl): Add quarter_relocs argument and set it, fix cast.
4405 Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
4406 (etir_stc): Add quarter_relocs argument and set it, fix cast.
4407 Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
4408 Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
4409 Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
4410 Return FALSE in case of error.
4411 (tir_sta): Change sign of psect.
4412 (tir_ctl): Ditto.
4413 (tir_cmd): Fix cast. Makes tir_table static const.
4414 (etir_cmd): Add quarter_relocs argument, makes etir_table const,
4415 add argument to explain.
4416 (analyze_etir): Initialize maxptr, add quarter_relocs
4417 declaration, move some declarations into inner scopes.
4418 Handle quarter_relocs and STO_IMM.
4419 (_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
4420 (_bfd_vms_slurp_relocs): New function.
4421 (_bfd_vms_decode_relocs): New function.
4422 (sto_imm): Rewritten.
4423 (start_first_etbt_record): New function.
4424 (start_another_etbt_record): Ditto.
4425 (etir_output_check): Ditto.
4426 (defer_reloc_p): Ditto.
4427 (_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
4428 a for-loop. Correctly deals with contents, deals with .vmsdebug,
4429 rewritte relocations handling.
4430 (_bfd_vms_write_tbt): Removed.
4431 (_bfd_vms_write_dbg): Ditto.
4432
4433 * vms-misc.c: Update copyright year, Fix comments.
4434 (_bfd_vms_get_header_values): Use 'size' instead of 'length'.
4435 (maybe_adjust_record_pointer_for_object): New function.
4436 (_bfd_vms_get_first_record): New function, replaces ...
4437 (_bfd_vms_get_record): .. removed.
4438 (_bfd_vms_get_object_record): New function.
4439 (_bfd_vms_get_object_record): New function.
4440 (vms_get_remaining_object_record): New function, replaces ...
4441 (_bfd_vms_get_next_record): ... removed.
4442 (add_new_contents): Removed.
4443 (_bfd_save_vms_section): Removed.
4444 (_bfd_get_vms_section): Removed.
4445 (_bfd_vms_output_flush): Write in VAR format.
4446 (new_symbol): Don't make UND section.
4447
4448 * vms-hdr.c: Update copyright year, update list of record handled.
4449 (_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
4450 (_bfd_vms_write_hdr): Strip vms and unix patches,
4451 add comments, truncate module name at 31 characters,
4452 use constants instead of hard-coded value,
4453 write BFD version instead of a fixed string.
4454 (_bfd_vms_slurp_ihd): New function.
4455 (_bfd_vms_slurp_isd): Ditto.
4456 (_bfd_vms_slurp_ihs): Ditto.
4457 (new_module): Ditto.
4458 (parse_module): Ditto
4459 (build_module_list): Ditto.
4460 (module_find_nearest_line): Ditto.
4461 (_bfd_vms_find_nearest_dst_line): Ditto.
4462 (vms_slurp_debug): Ditto.
4463 (_bfd_vms_slurp_dbg): Ditto.
4464 (_bfd_vms_slurp_tbt): Ditto.
4465 (_bfd_vms_write_dbg): Ditto.
4466 (_bfd_vms_write_tbt): Ditto.
4467
4468 * vms-gsd.c: Update copyright year, update list of records handled.
4469 (EVAX_LITERALS_NAME): New macro.
4470 (evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
4471 (gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
4472 (register_universal_symbol): New function and prototype.
4473 (_bfd_vms_slurp_gsd): Fix indentations and casts,
4474 improve debug messages,
4475 use constants instead of hard-coded value,
4476 fix missing endianness conversion,
4477 handle global symbol (SYMG).
4478 (bfd_vms_set_section_flags): New function.
4479 (_bfd_vms_write_gsd): Don't write .vmsdebug section,
4480 handle section literals,
4481 fix indentation,
4482 handle section bfd and vms flags,
4483 don't output LIB$INITIALIZE symbol,
4484 fix handling of weak symbols,
4485 fix evax vs vax procedure descriptor,
4486 handle absolute symbols.
4487
4488 * reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
4489 BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
4490
4491 * makefile.vms (DEFS): Fix flags for VMS.
4492
4493 * bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
4494
4495 * bfd-in2.h: Regenerated.
4496 * libbfd.h: Regenerated.
4497
47149254
CC
44982009-02-20 Cary Coutant <ccoutant@google.com>
4499
4500 * vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
4501 in struct stat.
4502
6b1cecf3
DK
45032009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
4504
4505 PR gas/7059
4506 * coffcode.h (coff_write_object_contents): Don't let the string
4507 table offset overflow the s_name field when using long section names.
4508
88183869
DK
45092009-18-02 Dave Korn <dave.korn.cygwin@gmail.com>
4510
4511 * coff-alpha.c (alpha_ecoff_backend_data): Initialise fields which
4512 control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
4513 * coff-mips.c (mips_ecoff_backend_data): Likewise.
4514 * coff-rs6000.c (bfd_xcoff_backend_data): Initialise fields which
4515 control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
4516 (bfd_pmac_xcoff_backend_data): Likewise.
4517 * coff64-rs6000.c (bfd_xcoff_backend_data): Likewise.
4518 (bfd_xcoff_aix5_backend_data): Likewise.
4519 (xcoff64_write_object_contents): Delete unused long_section_names
4520 local variable.
4521 * coff-sh.c (bfd_coff_small_swap_table): Initialise long section
4522 name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
4523 struct non-const.
4524 * coffcode.h (documentation): Update to describe long section names.
4525 (COFFLONGSECTIONCATHELPER): New helper macro.
4526 (BLANKOR1TOODD): Likewise.
4527 (COFF_ENABLE_LONG_SECTION_NAMES): Likewise.
4528 (COFF_LONG_SECTION_NAMES_SETTER): Likewise.
4529 (COFF_DEFAULT_LONG_SECTION_NAMES): Likewise.
4530 (bfd_coff_set_long_section_names_allowed): New function.
4531 (bfd_coff_set_long_section_names_disallowed): Likewise.
4532 (struct bfd_coff_backend_data): Add new backend hook function
4533 pointer _bfd_coff_set_long_section_names.
4534 (bfd_coff_set_long_section_names): New backend hook.
4535 (coff_write_object_contents): Only generate long section names if
4536 bfd_coff_long_section_names() indicates they are currently enabled.
4537 (bfd_coff_std_swap_table): Make non-const, and initialise long
4538 section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
4539 (ticoff0_swap_table): Likewise to both.
4540 (ticoff1_swap_table): Again, likewise to both.
4541 * coffgen.c (make_a_section_from_file): Allow long section names
4542 as inputs even if not currently allowed for outputs.
4543 * ecoff.c (_bfd_ecoff_no_long_sections): New function.
4544 * efi-app-ia32.c (COFF_LONG_SECTION_NAMES): Define to 0, not blank.
4545 * efi-app-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
4546 * efi-app-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
4547 * efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
4548 * efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
4549 * efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
4550 * efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES): Likewise.
4551 * efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES): Likewise.
4552 * efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
4553 * pei-arm.c (COFF_LONG_SECTION_NAMES): Likewise.
4554 * pei-i386.c (COFF_LONG_SECTION_NAMES): Likewise.
4555 * pei-mcore.c (COFF_LONG_SECTION_NAMES): Likewise.
4556 * pei-mips.c (COFF_LONG_SECTION_NAMES): Likewise.
4557 * pei-ppc.c (COFF_LONG_SECTION_NAMES): Likewise.
4558 * pei-sh.c (COFF_LONG_SECTION_NAMES): Likewise.
4559 * pei-x86_64.c (COFF_LONG_SECTION_NAMES): Likewise.
4560 * libcoff-in.h: Update copyright year to cause updated copyright
4561 year in generated libcoff.h, and fix typo.
4562 * libcoff.h: Regenerated.
4563 * libecoff.h (ECOFF_NO_LONG_SECTION_NAMES): New macro.
4564 (_bfd_ecoff_no_long_sections): Add prototype.
4565 * libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES): New macro.
4566 * pe-mips.c (COFF_LONG_SECTION_NAMES): Define empty if not already
4567 defined by an including .c file.
4568 * ticoff.h (ticoff0_swap_table): Make non-const, and initialise
4569 long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
4570 (ticoff1_swap_table): Likewise to both.
4571
90d8a22c
CL
45722009-02-18 Christophe Lyon <christophe.lyon@st.com>
4573
4574 * elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
4575 stub. Catch default case error.
4576 (arm_map_one_stub): Add missing Thumb mapping symbol.
4577
12123067
NC
45782009-02-18 Bjoern Haase <bjoern.m.haase@web.de>
4579
4580 PR 9841
4581 * elf32-avr.c: Handle case where no local symbos exist correctly.
4582
fea2b4d6
CL
45832009-02-16 Christophe Lyon <christophe.lyon@st.com>
4584
4585 bfd/
4586 * elf32-arm.c (arm_long_branch_stub,
4587 arm_thumb_v4t_long_branch_stub,
4588 arm_thumb_thumb_long_branch_stub,
4589 arm_thumb_arm_v4t_long_branch_stub,
4590 arm_thumb_arm_v4t_short_branch_stub,
4591 arm_pic_long_branch_stub):
4592 Renamed to elf32_arm_stub_long_branch_any_any,
4593 elf32_arm_stub_long_branch_v4t_arm_thumb,
4594 elf32_arm_stub_long_branch_thumb_only,
4595 elf32_arm_stub_long_branch_v4t_thumb_arm,
4596 elf32_arm_stub_short_branch_v4t_thumb_arm,
4597 elf32_arm_stub_long_branch_any_any_pic.
4598 (arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
4599 arm_thumb_thumb_stub_long_branch,
4600 arm_thumb_arm_v4t_stub_long_branch,
4601 arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
4602 Renamed to arm_stub_long_branch_any_any,
4603 arm_stub_long_branch_v4t_arm_thumb,
4604 arm_stub_long_branch_thumb_only,
4605 arm_stub_long_branch_v4t_thumb_arm,
4606 arm_stub_short_branch_v4t_thumb_arm,
4607 arm_stub_long_branch_any_any_pic.
4608
13e0a874
DA
46092009-02-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4610
4611 * elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
4612 in branch offset check.
4613
3a71aa26
AM
46142009-02-15 Alan Modra <amodra@bigpond.net.au>
4615
4616 * elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
4617 add toc.symndx and toc.add.
4618 (ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
4619 Set up toc.add.
4620 (get_tls_mask): Add toc_addend param, set from toc.add. Adjust all
4621 callers.
4622 (ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
4623 (branch_reloc_hash_match): New function, extracted from..
4624 (ppc64_elf_tls_optimize): ..here.
4625 (ppc64_elf_relocate_section): Properly set addends when optimizing
4626 tls sequences. Avoid unnecessary reading and writing of insns.
4627 Only redo reloc when symbol changed. Bypass symbol checks when
4628 using tlsld_got.
4629 * elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
4630 (branch_reloc_hash_match): New function, extracted from..
4631 (ppc_elf_tls_optimize): ..here.
4632 (ppc_elf_relocate_section): Avoid unnecessary reading of insns.
4633 Don't clear addend on zapped __tls_get_addr reloc.
4634
2c2b4ed4
NC
46352009-02-12 Nick Clifton <nickc@redhat.com>
4636
4637 PR 9827
4638 * elflink.c (bfd_elf_final_link): When counting the relocations,
4639 if the header size has not been set yet then assume that it will
4640 match the output section's reloc type.
4641
453f5985
NS
46422009-02-12 Nathan Sidwell <nathan@codesourcery.com>
4643
4644 * elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
4645 relocatable link.
4646
3209bffa
AM
46472009-02-09 Alan Modra <amodra@bigpond.net.au>
4648
4649 * elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
4650 (find_function): Likewise.
4651 (pasted_function): Don't error if no prior function found.
4652 (discover_functions): Revert 2008-12-10 change. Extend first
4653 function range to start of section.
4654
813c8a3c
DA
46552009-02-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4656
4657 * elf64-hppa.c: Remove PARAMS macro. Replace PTR with void *. Convert
4658 functions to C90.
4659 * elf64-hppa.h: Likewise.
4660
2d0f9ad9
JM
46612009-02-06 Joseph Myers <joseph@codesourcery.com>
4662
4663 * elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
4664 .sbss handling.
4665
50e00962
AM
46662009-02-04 Alan Modra <amodra@bigpond.net.au>
4667
4668 * elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
4669 Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
4670
52b6b6b9
JM
46712009-02-03 Sandip Matte <sandip@rmicorp.com>
4672
4673 * aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
4674 * archures.c (bfd_mach_mips_xlr): Define.
4675 * bfd-in2.h: Regenerate.
4676 * cpu-mips.c (I_xlr): Define.
4677 (arch_info_struct): Add XLR entry.
4678 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
4679 (mips_set_isa_flags): Handle bfd_mach_mips_xlr
4680 (mips_mach_extensions): Add XLR entry.
4681
654c3c9f
EW
46822009-02-03 Eric B. Weddington <eric.weddington@atmel.com>
4683
4684 * elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
4685
31dd3154
JM
46862009-02-03 Carlos O'Donell <carlos@codesourcery.com>
4687
4688 * configure.in: AC_SUBST pdfdir.
d1fa68d3 4689 * Makefile.am: Add install-pdf, install-pdf-am
31dd3154
JM
4690 and install-pdf-recursive targets. Define pdfdir.
4691 * doc/Makefile.am: Define pdf__strip_dir. Add
4692 install-pdf and install-pdf-am targets.
d1fa68d3 4693 * po/Make-in: Add install-pdf target.
31dd3154
JM
4694 * configure: Regenerate.
4695 * Makefile.in: Regenerate
4696 * doc/Makefile.in: Regenerate.
4697
cf869cce
NC
46982009-02-03 Maxim Kuvyrkov <maxim@codesourcery.com>
4699
4700 * bfd-in2.h: Regenerate.
4701 * elf32-m68k.c: Handle 2-slot GOT entries. Rename variables and
4702 fields from n_entries to n_slots where appropriate, update comments.
4703 (HOWTO): Add TLS relocations.
4704 (reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
4705 (enum elf_m68k_got_offset_size): New enum.
4706 (struct elf_m68k_got_entry.type): Move field to ...
4707 (struct elf_m68k_got_entry_key): ... here. Update all uses.
4708 (elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
4709 functions.
4710 (elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
4711 functions.
4712 (struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
4713 fields into n_entries array. Update comments.
4714 (elf_m68k_init_got): Simplify, update all uses.
4715 (elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
4716 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
4717 GOT entries; update name, update all uses.
4718 (ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
4719 (elf_m68k_get_got_entry): Update.
4720 (elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
4721 simplify.
4722 (elf_m68k_remove_got_entry_type): Simplify.
4723 (elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
4724 (elf_m68k_can_merge_gots): Update.
4725 (elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
4726 (struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
4727 GOT entries, simplify.
4728 (elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
4729 (struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
4730 field, remove obsoleted local_n_entries field.
4731 (elf_m68k_partition_multi_got_2): New static function.
4732 (elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
4733 update.
4734 (elf_m68k_remove_got_entry_type): Update.
4735 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
d1fa68d3 4736 (elf_m68k_check_relocs): Handle TLS relocations. Remove unnecessary
cf869cce
NC
4737 update of sgot->size and srelgot->size.
4738 (elf_m68k_gc_sweep_hook): Update.
4739 (elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
4740 (elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
4741 TLS relocations.
4742 * reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
4743 * libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
4744
c1a0a41f
DD
47452009-02-02 DJ Delorie <dj@redhat.com>
4746
4747 * elf32-mep.c (config_names): Regenerate configuration.
4748
72a80a16
AM
47492009-02-02 Alan Modra <amodra@bigpond.net.au>
4750
4751 * elf-bfd.h (bfd_elf_get_str_section): Don't declare.
4752 (bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
4753 * elf.c (bfd_elf_get_str_section): Make static.
4754 (bfd_elf_find_section): Delete.
4755 * libbfd.h: Regenerate.
4756
273f4430
JK
47572009-02-01 Jan Kratochvil <jan.kratochvil@redhat.com>
4758
4759 * elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
4760 (_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
4761
010e5ae2
AM
47622009-01-31 Alan Modra <amodra@bigpond.net.au>
4763
4764 * elflink.c (on_needed_list): New function.
4765 (elf_link_add_object_symbols): Link in --as-needed libs if they
4766 satisfy undefined symbols in other libs.
4767
33a7ffc2
JM
47682009-01-30 Julian Brown <julian@codesourcery.com>
4769
4770 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
4771 EXEC_P or DYNAMIC flags, and skip sections which are being linked
4772 with --just-symbols (-R).
4773
13d72a14
AN
47742009-01-29 Adam Nemet <anemet@caviumnetworks.com>
4775
4776 * dwarf2.c (read_rangelist): Use read_address to read low_pc and
4777 high_pc in order to properly sign-extend VMAs.
4778
d334575b 47792009-01-29 Daniel Jacobowitz <dan@codesourcery.com>
d1fa68d3
AS
4780 Mark Shinwell <shinwell@codesourcery.com>
4781 Catherine Moore <clm@codesourcery.com>
d334575b
JM
4782
4783 * elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
4784
528aeb62
CM
47852009-01-28 Catherine Moore <clm@codesourcery.com>
4786
4787 * elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
4788 SEC_LOAD for dynamic relocation sections.
4789
f6f05983
HPN
47902009-01-27 Hans-Peter Nilsson <hp@axis.com>
4791
4792 * elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
4793 (info)->tls_size, not elf_hash_table (info)->tls_sec->size for
4794 the size of local TLS data.
4795
27cc28f9
AS
47962009-01-27 Andreas Schwab <schwab@suse.de>
4797
4798 * mach-o.c (bfd_mach_o_archive_p): Restrict the number of
4799 architectures in the archive.
4800
b3bf42d8
HPN
48012009-01-27 Hans-Peter Nilsson <hp@axis.com>
4802
f551b6f0
HPN
4803 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
4804 <R_CRIS_32_DTPREL>: Correct relocation value.
4805
b3bf42d8
HPN
4806 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
4807 <R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
4808 symbols with non-default visibility.
4809
9bc4e62b
NS
48102009-01-26 Nathan Sidwell <nathan@codesourcery.com>
4811
4812 * elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
4813 describing the trampolines.
4814 (ppc_elf_relocate_section): Update relocs to describe the
4815 trampolines.
4816
aeaf6540
DA
48172009-01-25 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4818
4819 * elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
4820 branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
4821 and R_PARISC_PCREL12F relocations.
4822
1e8fa21e
AM
48232009-01-24 Alan Modra <amodra@bigpond.net.au>
4824
4825 PR 6022
4826 * elflink.c (find_version_for_sym): New function split out from,
4827 but without export_dynamic test, ..
4828 (_bfd_elf_link_assign_sym_version): ..here.
4829 (_bfd_elf_export_symbol): Use it.
4830
28caa186
AM
48312009-01-23 Alan Modra <amodra@bigpond.net.au>
4832
4833 * elf-bfd.h (struct elf_assign_sym_version_info): Delete.
4834 (struct elf_info_failed, struct elf_find_verdep_info): Move to..
4835 * elflink.c: ..here, somewhat modified.
4836 * elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
4837 _bfd_elf_link_find_version_dependencies,
4838 _bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
4839 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
4840 _bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
4841 declare..
4842 * elflink.c: ..and make static here.
4843 (_bfd_elf_link_find_version_dependencies): Adjust for removal
4844 of output_bfd from struct elf_find_verdep_info.
4845 (_bfd_elf_link_assign_sym_version): Similarly adjust to use
4846 struct elf_info_failed.
4847 (bfd_elf_size_dynamic_sections): Adjust.
4848
be04437d
AM
48492009-01-22 Alan Modra <amodra@bigpond.net.au>
4850
4851 PR 6832
4852 * dwarf2.c (find_line): Don't update stash->sec_info_ptr until
4853 after comp_unit_find_line call.
4854
58f9615c
NC
48552009-01-21 Nick Clifton <nickc@redhat.com>
4856
4857 PR 9769
4858 * vmsutil.c (vms_file_stats_name): Remove use of unsupported
4859 tm_gmtoff field in struct tm.
4860
fb266b8b
AM
48612009-01-21 Alan Modra <amodra@bigpond.net.au>
4862
4863 * elf32-spu.h (struct spu_elf_params): Add non_ia_text.
4864 * elf32-spu.c (mark_overlay_section): Only include .text.ia.*
4865 sections in soft-icache lines unless non_ia_text. Don't add
4866 rodata if doing so would exceed line size.
4867
451ffe63
HPN
48682009-01-19 Hans-Peter Nilsson <hp@axis.com>
4869
4870 * elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
4871 types than bfd_link_hash_indirect, before early return, call
4872 _bfd_elf_link_hash_copy_indirect.
4873
5aa6ff7c
AS
48742009-01-19 Andrew Stubbs <ams@codesourcery.com>
4875
4876 * elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
4877 * elf-bfd.h (elf_backend_data): Add obj_attrs_order.
4878 * elf32-arm.c (elf32_arm_obj_attrs_order): New function.
4879 (elf_backend_obj_attrs_order): New define.
4880 * elfxx-target.h (elf_backend_obj_attrs_order): New define.
4881 (elfNN_bed): Add elf_backend_obj_attrs_order.
4882
3483fe2e
AS
48832009-01-19 Andrew Stubbs <ams@codesourcery.com>
4884
4885 * elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
4886 (obj_attr_size): Likewise.
4887 (write_obj_attribute): Likewise.
4888 (_bfd_elf_copy_obj_attributes): Likewise.
4889 (_bfd_elf_parse_attributes): Likewise.
4890 * elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
4891 (ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
4892 (ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
4893 (ATTR_TYPE_HAS_NO_DEFAULT): New define.
4894 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
4895 with macros.
4896
2d0bb761
AS
48972009-01-19 Andrew Stubbs <ams@codesourcery.com>
4898
4899 * elf-attrs.c (is_default_attr): Support defaultless attributes.
4900 (bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
4901 (bfd_elf_add_obj_attr_string): Likewise.
4902 (bfd_elf_add_obj_attr_int_string): Likewise.
4903 (_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
4904 * elf-bfd.h (struct obj_attribute): Document new flag bit.
4905 * elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
4906 Tag_nodefaults has no default value.
4907 (elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
4908 comment to reflect the new state.
4909
a77e83b7
AM
49102009-01-19 Alan Modra <amodra@bigpond.net.au>
4911
4912 PR 9695
4913 * pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
4914 (some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
4915 (adjust_z_magix): Delete dead code handling QMAGIC.
4916
f6d29e26
KT
49172009-01-16 Kai Tietz <kai.tietz@onevision.com>
4918
4919 * coffcode.h (styp_to_sec_flags): Correct interpretation of
4920 IMAGE_SCN_MEM_DISCARDABLE.
4921
29670fb9
AM
49222009-01-16 Alan Modra <amodra@bigpond.net.au>
4923
4924 * Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
4925 SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
4926 * configure.in (commonbfdlib): Delete.
4927 (SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
4928 (SHARED_LIBADD): Rename from WIN32LIBADD. Add pic libiberty if such
4929 is available, not just for linux.
4930 * po/SRC-POTFILES.in: Regenerate.
4931 * Makefile.in: Regenerate.
4932 * configure: Regenerate.
4933
91e22acd
AS
49342009-01-15 Andrew Stubbs <ams@codesourcery.com>
4935 Julian Brown <julian@codesourcery.com>
4936
4937 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
4938 ARM attributes in ABI 2.07.
4939 * elf32-arm.c (get_secondary_compatible_arch): New function.
4940 (set_secondary_compatible_arch): New function.
4941 (tag_cpu_arch_combine): New function.
4942 (elf32_arm_copy_one_eabi_other_attribute): Delete function.
4943 (elf32_arm_copy_eabi_other_attribute_list): Delete function.
4944 (elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
4945 make it fit with order_01243.
4946 Add support for Tag_also_compatible_with,
4947 Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
4948 Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
4949 Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
4950 Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
4951 Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
4952 Tag_VFP_arch and Tag_ABI_FP_16bit_format.
4953 Rework the way unknown attributes are handled.
4954 Defer errors until all attributes have been processed.
4955
7b86a9fa
AS
49562009-01-15 Andrew Stubbs <ams@codesourcery.com>
4957
4958 * elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
4959 bfd_elf_add_obj_attr_int_string.
4960 Read Tag_compatibility from its new location in the attribute array,
4961 rather than the attribute list.
4962 (_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
4963 bfd_elf_add_obj_attr_int_string.
4964 (_bfd_elf_parse_attributes): Likewise.
4965 (_bfd_elf_merge_object_attributes): There's now only one
4966 Tag_compatibility, and it's in the array, not the list.
4967 * elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
4968 Tag_compatibility.
4969 (bfd_elf_add_obj_attr_compat): Rename to
4970 bfd_elf_add_obj_attr_int_string.
4971 (bfd_elf_add_proc_attr_compat): Rename to
4972 bfd_elf_add_proc_attr_int_string.
4973 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
4974 Tag_compatibility.
4975
01e1a5bc
NC
49762009-01-15 Douglas B Rupp <rupp@gnat.com>
4977
4978 * Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
4979 (BFD32_BACKENDS_CFILES): Add new file vmsutil.c
4980 (vmsutil.lo): Add dependency rule.
4981 * Makefile.in: Regenerate.
4982 * config.bfd (ia64*-*-*vms*): Add case.
4983 * configure.in (bfd_elf64_ia64_vms_vec): Add case.
4984 * configure: Regenerate.
4985 * vmsutil.c: New file.
4986 * vmsutil.h: New file.
4987 * elf-bfd.h (struct bfd_elf_special_section): Change type of
4988 attr to bfd_vma.
4989 * elfxx-ia64.c (elfNN_vms_post_process_headers,
4990 elfNN_vms_section_processing, elfNN_vms_final_write_processing,
4991 elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
4992 elfNN_vms_object_p): New functions
4993 * targets.c (bfd_elf64_ia64_vms_vec): New target.
4994
a33dafc3
L
49952009-01-14 H.J. Lu <hongjiu.lu@intel.com>
4996
4997 PR ld/9727
4998 * elflink.c (elf_gc_sweep): Exclude the group section if the
4999 first member of the section group is excluded.
5000
13c0e967
AM
50012009-01-14 Alan Modra <amodra@bigpond.net.au>
5002
5003 PR 9735
5004 * syms.c (_bfd_stab_section_find_nearest_line): Don't free
5005 saved filename, use bfd_alloc rather than bfd_malloc for it.
5006
460e679b
AM
50072009-01-13 Alan Modra <amodra@bigpond.net.au>
5008
5009 * elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
5010
25076afa
AM
50112009-01-13 Alan Modra <amodra@bigpond.net.au>
5012
5013 * elf32-spu.c (remove_cycles): Always set call->max_depth.
5014
37107878
AM
50152009-01-12 Alan Modra <amodra@bigpond.net.au>
5016
5017 * elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
5018
cd4a7468
AM
50192009-01-12 Alan Modra <amodra@bigpond.net.au>
5020
5021 * elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
5022 num_lines_log2.
5023 (struct got_entry): Add br_addr.
5024 (struct call_info): Add priority.
5025 (struct function_info): Add lr_store and sp_adjust.
5026 (spu_elf_setup): Init line_size_log2 and num_lines_log2.
5027 (spu_elf_find_overlays): For soft-icache, mark any section within cache
5028 area as an overlay, and check that no other overlays exist. Look up
5029 icache overlay manager entry sym.
5030 (BRA_STUBS, BRA, BRASL): Define.
5031 (enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
5032 (needs_ovl_stub): Adjust for soft-icache. Return priority encoded
5033 in branch insn.
5034 (count_stub, build_stub): Support soft-icache.
5035 (build_spuear_stubs, process_stubs): Adjust build_stub call.
5036 (spu_elf_size_stubs): Size soft-icache stubs.
5037 (overlay_index): New function.
5038 (spu_elf_build_stubs): Make static. Support soft-icache.
5039 (spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
5040 (find_function_stack_adjust): Save lr store and stack adjust insn
5041 offsets.
5042 (maybe_insert_function): Adjust find_function_stack_adjust call.
5043 (mark_functions_via_relocs): Retrieve priority.
5044 (remove_cycles): Only warn about pruned arcs when stack_analysis.
5045 (sort_calls): Sort by priority first.
5046 (mark_overlay_section): Ignore .ovl.init.
5047 (sum_stack): Only print when stack_analysis.
5048 (print_one_overlay_section): New function, extracted from..
5049 (spu_elf_auto_overlay): ..here. Support soft-icache overlays.
5050 (spu_elf_stack_analysis): Only print when htab->stack_analysis.
5051 (spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
5052 analysis. Call spu_elf_build_stubs.
5053 (spu_elf_relocate_section): For soft-icache encode overlay index
5054 into addresses.
5055 (spu_elf_output_symbol_hook): Support soft-icache.
5056 (spu_elf_modify_program_headers: Likewise.
37107878 5057
cd4a7468
AM
5058 * elf32-spu.h (struct spu_elf_params): Add lrlive_analysis. Rename
5059 num_regions to num_lines. Add line_size and max_branch.
5060 (enum _ovly_flavour): Add ovly_soft_icache.
5061 (spu_elf_build_stubs): Delete.
5062
80c29487
JK
50632009-01-11 Jan Kratochvil <jan.kratochvil@redhat.com>
5064
5065 * elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
5066 relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
5067
1bc86aea
HPN
50682009-01-07 Hans-Peter Nilsson <hp@axis.com>
5069
5070 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
5071 <case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
5072 the program, the known offset starts at the negative size of the
5073 TLS section.
5074 <case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
5075 Similar.
5076
3baa454d 50772009-01-05 Joel Sherrill <joel.sherrill@oarcorp.com>
75606e85 5078
3baa454d 5079 * config.bfd: Add lm32-*-rtems*.
75606e85 5080
9dbe8890
L
50812009-01-03 H.J. Lu <hongjiu.lu@intel.com>
5082
5083 * coff-ppc.c: Add 2009 to Copyright.
5084 * elf32-cris.c: Likewise.
5085 * elflink.c: Likewise.
5086
0bdf8d40
HPN
50872009-01-03 Hans-Peter Nilsson <hp@axis.com>
5088
5089 * elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
5090 gotplt_index to rela_plt_index. Adjust for R_CRIS_DTPMOD entry.
5091
54ac0771
L
50922009-01-02 H.J. Lu <hongjiu.lu@intel.com>
5093
5094 PR ld/9679
5095 * elflink.c (elf_merge_st_other): New.
5096 (_bfd_elf_merge_symbol): Use it on skipped weak definitions and
5097 hide them if needed.
5098 (elf_link_add_object_symbols): Updated.
5099
d8880531
L
51002009-01-02 H.J. Lu <hongjiu.lu@intel.com>
5101
5102 PR ld/9676
5103 * elflink.c (elf_link_add_object_symbols): Update def_dynamic,
5104 ref_dynamic and dynamic_def fields when setting def_regular
5105 to 1.
5106
b70b5c14
NC
51072009-01-02 Curtis Mackie <curtmackevo@gmail.com>
5108
5109 PR 9682
5110 * coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
5111 literal.
5112
d8880531 5113For older changes see ChangeLog-2008
56882138
AM
5114\f
5115Local Variables:
5116mode: change-log
5117left-margin: 8
5118fill-column: 74
5119version-control: never
5120End:
This page took 0.704698 seconds and 4 git commands to generate.