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