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