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