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