xref: /netbsd/external/gpl3/gdb/dist/bfd/ChangeLog-2009 (revision 48596154)
1377e23a2Schristos2009-12-31  Cary Coutant  <ccoutant@google.com>
2377e23a2Schristos
3377e23a2Schristos	* dwarf2.c (struct line_sequence): New struct.
4377e23a2Schristos	(struct line_info_table): Add num_sequences, remove last_line,
5377e23a2Schristos	add sequences.
6377e23a2Schristos	(add_line_info): Add new sequences as necessary.
7377e23a2Schristos	(compare_sequences): New function.
8377e23a2Schristos	(sort_line_sequences): New function.
9377e23a2Schristos	(decode_line_info): Initialize new fields in line table.
10377e23a2Schristos	Call sort_line_sequences.
11377e23a2Schristos	(lookup_address_in_line_info_table): Binary search for proper
12377e23a2Schristos	sequence.
13377e23a2Schristos
14377e23a2Schristos2009-12-28  Daniel Gutson  <dgutson@codesourcery.com>
15377e23a2Schristos
16377e23a2Schristos	* elf32-arm.c (elf32_arm_final_link_relocate): limits
17377e23a2Schristos	fixed.
18377e23a2Schristos
19377e23a2Schristos2009-12-28  Daniel Gutson  <dgutson@codesourcery.com>
20377e23a2Schristos
21377e23a2Schristos	* elf-attrs.c (_bfd_elf_merge_object_attributes): Error
22377e23a2Schristos	message rephrased.
23377e23a2Schristos
24377e23a2Schristos2009-12-21  Alan Modra  <amodra@gmail.com>
25377e23a2Schristos
26377e23a2Schristos	* elf64-ppc.c: Delete my email address.
27377e23a2Schristos
28377e23a2Schristos2009-12-18  Ulrich Weigand  <uweigand@de.ibm.com>
29377e23a2Schristos
30377e23a2Schristos	* elf.c (elfcore_grok_s390_high_gprs): New function.
31377e23a2Schristos	(elfcore_grok_note): Handle NT_S390_HIGH_GPRS notes.
32377e23a2Schristos	(elfcore_write_s390_high_gprs): New function.
33377e23a2Schristos	(elfcore_write_register_note): Call it.
34377e23a2Schristos
35377e23a2Schristos2009-12-17  Alan Modra  <amodra@bigpond.net.au>
36377e23a2Schristos
37377e23a2Schristos	PR ld/11088
38377e23a2Schristos	* elf32-ppc.c (update_plt_info): Clear sec here when addend is
39377e23a2Schristos	less than 32768..
40377e23a2Schristos	(ppc_elf_check_relocs): ..rather than doing so here.  Ignore new
41377e23a2Schristos	relax relocs.
42377e23a2Schristos	(ppc_elf_gc_sweep_hook): Don't segfault when symbol hiding has
43377e23a2Schristos	removed plt_entry records.
44377e23a2Schristos	(ppc_elf_tls_setup): Handle PIE calls to __tls_get_addr correctly.
45377e23a2Schristos	(ppc_elf_tls_optimize): Likewise.  Also dec __tls_get_addr refcount
46377e23a2Schristos	when optimizing code using new tlsgd and tlsld marker relocs.
47377e23a2Schristos	(ppc_elf_relax_section): Differentiate relaxed PLTREL24 relocs
48377e23a2Schristos	from ADDR24 relocs using plt or glink.  Don't clear the addend
49377e23a2Schristos	for R_PPC_RELAX_PLTREL24.
50377e23a2Schristos	(ppc_elf_relocate_section): Correctly handle addends on relaxed
51377e23a2Schristos	PLTREL24 relocs.
52377e23a2Schristos
53377e23a2Schristos2009-12-17  Alan Modra  <amodra@bigpond.net.au>
54377e23a2Schristos
55377e23a2Schristos	PR ld/11088
56377e23a2Schristos	* elf64-ppc.c (ppc64_elf_gc_sweep_hook): Don't abort if symbol
57377e23a2Schristos	hiding has nulled out plt.plist.
58377e23a2Schristos
59377e23a2Schristos2009-12-15  H.J. Lu  <hongjiu.lu@intel.com>
60377e23a2Schristos
61377e23a2Schristos	* opncls.c (bfd_opnr_iovec): Replace _XXX with XXX_P in
62377e23a2Schristos	parameters.
63377e23a2Schristos
64377e23a2Schristos	* tekhex.c (pass_over): Replace eof with is_eof.
65377e23a2Schristos
66377e23a2Schristos2009-12-15  Tristan Gingold  <gingold@adacore.com>
67377e23a2Schristos
68377e23a2Schristos	* mach-o.h (bfd_mach_o_uuid_command): Remove section field.
69377e23a2Schristos	* mach-o.c (bfd_mach_o_scan_read_uuid): Do not create a section
70377e23a2Schristos	from this command.
71377e23a2Schristos
72377e23a2Schristos2009-12-15  Tristan Gingold  <gingold@adacore.com>
73377e23a2Schristos
74377e23a2Schristos	* mach-o.c (struct mach_o_section_name_xlat): Add flags field.
75377e23a2Schristos	(dwarf_section_names_xlat): Add section flags.
76377e23a2Schristos	(text_section_names_xlat): Ditto.
77377e23a2Schristos	(data_section_names_xlat): Ditto.
78377e23a2Schristos	(bfd_mach_o_convert_section_name_to_bfd): Now return name and section
79377e23a2Schristos	flags by reference.
80377e23a2Schristos	(bfd_mach_o_make_bfd_section): Use section flags when know, otherwise
81377e23a2Schristos	try to guess.
82377e23a2Schristos
83377e23a2Schristos2009-12-14  Doug Kwan  <dougkwan@google.com>
84377e23a2Schristos
85377e23a2Schristos	* opncls.c (bfd_opnr_iovec): Rename parameters to avoid shawdowed
86377e23a2Schristos	variable warnings.
87377e23a2Schristos	* bfd-in2.h: Regnenerate.
88377e23a2Schristos
89377e23a2Schristos2009-12-12  Nick Clifton  <nickc@redhat.com>
90377e23a2Schristos
91377e23a2Schristos	* coff-arm.c (coff_arm_rtype_to_howto): Fix shadowed variable
92377e23a2Schristos	warning.
93377e23a2Schristos
94377e23a2Schristos2009-12-11  Tristan Gingold  <gingold@adacore.com>
95377e23a2Schristos
96377e23a2Schristos	* som.c (bfd_som_set_subsection_attributes)
97377e23a2Schristos	(bfd_section_from_som_symbol, som_reloc_queue_fix): Fix shadowed
98377e23a2Schristos	variable warnings.
99377e23a2Schristos	* cache.c (close_one): Likewise.
100377e23a2Schristos
101377e23a2Schristos2009-12-11  Nick Clifton  <nickc@redhat.com>
102377e23a2Schristos
103377e23a2Schristos	* warning.m4 (GCC_WARN_CFLAGS): Add -Wshadow.
104377e23a2Schristos	* configure: Regenerate.
105377e23a2Schristos	* Makefile.in: Regenerate.
106377e23a2Schristos	* doc/Makefile.in: Regenerate.
107377e23a2Schristos	* aout-arm.c: Fix shadowed variable warnings.
108377e23a2Schristos	* aout-tic30.c: Likewise.
109377e23a2Schristos	* aoutx.h: Likewise.
110377e23a2Schristos	* archive.c: Likewise.
111377e23a2Schristos	* coff-alpha.c: Likewise.
112377e23a2Schristos	* coff-i386.c: Likewise.
113377e23a2Schristos	* coff-x86_64.c: Likewise.
114377e23a2Schristos	* coffgen.c: Likewise.
115377e23a2Schristos	* dwarf2.c: Likewise.
116377e23a2Schristos	* ecoff.c: Likewise.
117377e23a2Schristos	* elf-eh-frame.c: Likewise.
118377e23a2Schristos	* elf-m10300.c: Likewise.
119377e23a2Schristos	* elf.c: Likewise.
120377e23a2Schristos	* elf32-arm.c: Likewise.
121377e23a2Schristos	* elf32-avr.c: Likewise.
122377e23a2Schristos	* elf32-bfin.c: Likewise.
123377e23a2Schristos	* elf32-cr16.c: Likewise.
124377e23a2Schristos	* elf32-i386.c: Likewise.
125377e23a2Schristos	* elf32-ip2k.c: Likewise.
126377e23a2Schristos	* elf32-lm32.c: Likewise.
127377e23a2Schristos	* elf32-m68hc1x.c: Likewise.
128377e23a2Schristos	* elf32-microblaze.c: Likewise.
129377e23a2Schristos	* elf32-ppc.c: Likewise.
130377e23a2Schristos	* elf32-rx.c: Likewise.
131377e23a2Schristos	* elf32-score.c: Likewise.
132377e23a2Schristos	* elf32-score7.c: Likewise.
133377e23a2Schristos	* elf32-sh.c: Likewise.
134377e23a2Schristos	* elf32-spu.c: Likewise.
135377e23a2Schristos	* elf32-v850.c: Likewise.
136377e23a2Schristos	* elf32-xtensa.c: Likewise.
137377e23a2Schristos	* elf64-hppa.c: Likewise.
138377e23a2Schristos	* elf64-ppc.c: Likewise.
139377e23a2Schristos	* elf64-x86-64.c: Likewise.
140377e23a2Schristos	* elflink.c: Likewise.
141377e23a2Schristos	* elfxx-ia64.c: Likewise.
142377e23a2Schristos	* elfxx-mips.c: Likewise.
143377e23a2Schristos	* elfxx-sparc.c: Likewise.
144377e23a2Schristos	* hash.c: Likewise.
145377e23a2Schristos	* ieee.c: Likewise.
146377e23a2Schristos	* libbfd.c: Likewise.
147377e23a2Schristos	* mach-o.c: Likewise.
148377e23a2Schristos	* merge.c: Likewise.
149377e23a2Schristos	* nlm32-sparc.c: Likewise.
150377e23a2Schristos	* oasys.c: Likewise.
151377e23a2Schristos	* opncls.c: Likewise.
152377e23a2Schristos	* pdp11.c: Likewise.
153377e23a2Schristos	* peXXigen.c: Likewise.
154377e23a2Schristos	* pef.c: Likewise.
155377e23a2Schristos	* versados.c: Likewise.
156377e23a2Schristos	* vms-gsd.c: Likewise.
157377e23a2Schristos	* vms-hdr.c: Likewise.
158377e23a2Schristos	* vms-tir.c: Likewise.
159377e23a2Schristos	* vms.c: Likewise.
160377e23a2Schristos	* xcofflink.c: Likewise.
161377e23a2Schristos	* xsym.c: Likewise.
162377e23a2Schristos	* xtensa-isa.c: Likewise.
163377e23a2Schristos
164377e23a2Schristos2009-12-10  Maciej W. Rozycki  <macro@codesourcery.com>
165377e23a2Schristos
166377e23a2Schristos	* elfxx-mips.c (mips_elf_calculate_relocation): Correct handling
167377e23a2Schristos	of undefined symbols.
168377e23a2Schristos
169377e23a2Schristos2009-12-09  Daniel Jacobowitz  <dan@codesourcery.com>
170377e23a2Schristos
171377e23a2Schristos	* elf32-arm.c (elf32_arm_next_input_section): Skip sections without
172377e23a2Schristos	SEC_CODE.
173377e23a2Schristos
174377e23a2Schristos2009-12-08  Alan Modra  <amodra@bigpond.net.au>
175377e23a2Schristos
176377e23a2Schristos	* elf.c (write_zeros): New function.
177377e23a2Schristos	(assign_file_positions_for_load_sections): Allocate file space for
178377e23a2Schristos	NOBITS sections that are followed by PROGBITS sections in a segment.
179377e23a2Schristos
180377e23a2Schristos2009-12-03  Tristan Gingold  <gingold@adacore.com>
181377e23a2Schristos
182377e23a2Schristos	* mach-o.c (bfd_mach_o_make_bfd_section): Force debug flags for
183377e23a2Schristos	all sections of the __DWARF segment.
184377e23a2Schristos
185377e23a2Schristos2009-12-03  Alan Modra  <amodra@bigpond.net.au>
186377e23a2Schristos
187377e23a2Schristos	PR ld/11047
188377e23a2Schristos	* elf32-ppc.c (ppc_elf_relocate_section): Delete __tls_get_addr
189377e23a2Schristos	symbol reference from relocs belonging to calls that are
190377e23a2Schristos	optimized away.
191377e23a2Schristos	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
192377e23a2Schristos
193377e23a2Schristos2009-12-02  Jerker Bäck  <jerker.back@gmail.com>
194377e23a2Schristos
195377e23a2Schristos	PR binutils/11017
196377e23a2Schristos	* coff-i386.h (COFF_PAGE_SIZE): Definition moved to coff/i386.h
197377e23a2Schristos
198377e23a2Schristos2009-11-30  Joseph Myers  <joseph@codesourcery.com>
199377e23a2Schristos
200377e23a2Schristos	* configure: Regenerate.
201377e23a2Schristos
202377e23a2Schristos2009-11-26  Per Øyvind Karlsen <peroyvind@mandriva.org>
203377e23a2Schristos
204377e23a2Schristos	* plugin.c (bfd_plugin_bfd_copy_link_hash_symbol_type): Define.
205377e23a2Schristos
206377e23a2Schristos2009-11-24  Joel Brobecker  <brobecker@adacore.com>
207377e23a2Schristos
208377e23a2Schristos	* acinclude.m4: Add include of ../config/zlib.m4.
209377e23a2Schristos	* configure.in: AM_ZLIB to check for zlib support.
210377e23a2Schristos	* configure: Regenerate.
211377e23a2Schristos
212377e23a2Schristos2009-11-23  Paul Brook  <paul@codesourcery.com>
213377e23a2Schristos
214377e23a2Schristos	* libbfd-in.h (_bfd_generic_copy_link_hash_symbol_type): Add
215377e23a2Schristos	prototype.
216377e23a2Schristos	* elf-bfd.h (_bfd_elf_copy_link_hash_symbol_type): Add prototype.
217377e23a2Schristos	* linker.c (_bfd_generic_copy_link_hash_symbol_type): New function.
218377e23a2Schristos	* elflink.c (_bfd_elf_copy_link_hash_symbol_type): New function.
219377e23a2Schristos	* targets.c (BFD_JUMP_TABLE_LINK, struct bfd_target): Add
220377e23a2Schristos	_copy_link_hash_symbol_type.
221377e23a2Schristos	* coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Add
222377e23a2Schristos	_bfd_generic_copy_link_hash_symbol_type.
223377e23a2Schristos	* coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add
224377e23a2Schristos	_bfd_generic_copy_link_hash_symbol_type.
225377e23a2Schristos	* aout-adobe.c (aout_32_bfd_copy_link_hash_symbol_type): Define.
226377e23a2Schristos	* aout-target.h (MY_bfd_copy_link_hash_symbol_type): Define.
227377e23a2Schristos	* aout-tic30.c (MY_bfd_copy_link_hash_symbol_type): Define.
228377e23a2Schristos	* binary.c (binary_bfd_copy_link_hash_symbol_type): Define.
229377e23a2Schristos	* bout.c (b_out_bfd_copy_link_hash_symbol_type): Define.
230377e23a2Schristos	* coffcode.h (coff_bfd_copy_link_hash_symbol_type): Define.
231377e23a2Schristos	* elfxx-target.h (bfd_elfNN_bfd_copy_link_hash_symbol_type): Define.
232377e23a2Schristos	* i386msdos.c (msdos_bfd_copy_link_hash_symbol_type): Define.
233377e23a2Schristos	* i386os9k.c (os9k_bfd_copy_link_hash_symbol_type): Define.
234377e23a2Schristos	* ieee.c (ieee_bfd_copy_link_hash_symbol_type): Define.
235377e23a2Schristos	* ihex.c (ihex_bfd_copy_link_hash_symbol_type): Define.
236377e23a2Schristos	* libecoff.h (_bfd_ecoff_bfd_copy_link_hash_symbol_type): Define.
237377e23a2Schristos	* mach-o.c (bfd_mach_o_bfd_copy_link_hash_symbol_type): Define.
238377e23a2Schristos	* mmo.c (mmo_bfd_copy_link_hash_symbol_type): Define.
239377e23a2Schristos	* nlm-target.h (nlm_bfd_copy_link_hash_symbol_type): Define.
240377e23a2Schristos	* oasys.c (oasys_bfd_copy_link_hash_symbol_type): Define.
241377e23a2Schristos	* pef.c (bfd_pef_bfd_copy_link_hash_symbol_type): Define.
242377e23a2Schristos	* ppcboot.c (ppcboot_bfd_copy_link_hash_symbol_type): Define.
243377e23a2Schristos	* som.c (som_bfd_copy_link_hash_symbol_type): Define.
244377e23a2Schristos	* srec.c (srec_bfd_copy_link_hash_symbol_type): Define.
245377e23a2Schristos	* tekhex.c (tekhex_bfd_copy_link_hash_symbol_type): Define.
246377e23a2Schristos	* versados.c (versados_bfd_copy_link_hash_symbol_type): Define.
247377e23a2Schristos	* vms.c (vms_bfd_copy_link_hash_symbol_type): Define.
248377e23a2Schristos	* xsym.c (bfd_sym_bfd_copy_link_hash_symbol_type): Define.
249377e23a2Schristos	* bfd-in2.h: Regenerate.
250377e23a2Schristos	* libbfd.h: Regenerate.
251377e23a2Schristos
252377e23a2Schristos2009-11-19  Tristan Gingold  <gingold@adacore.com>
253377e23a2Schristos
254377e23a2Schristos	* coff-rs6000.c (rs6000coff_vec): Use generic routines instead of
255377e23a2Schristos	hard-coded casts.
256377e23a2Schristos	(pmac_xcoff_vec): Ditto.
257377e23a2Schristos	* coff64-rs6000.c (rs6000coff64_vec): Ditto.
258377e23a2Schristos	(aix5coff64_vec): Ditto.
259377e23a2Schristos
260377e23a2Schristos2009-11-18  Alan Modra  <amodra@bigpond.net.au>
261377e23a2Schristos
262377e23a2Schristos	* bfd-in.h (_bfd_elf_ppc_at_tls_transform): Declare.
263377e23a2Schristos	* bfd-in2.h: Regenerate.
264377e23a2Schristos	* elf64-ppc.c (ppc64_elf_relocate_section): Move code for R_PPC64_TLS
265377e23a2Schristos	insn optimisation to..
266377e23a2Schristos	* elf32-ppc.c (_bfd_elf_ppc_at_tls_transform): ..here.  New function.
267377e23a2Schristos	(ppc_elf_relocate_section): Use it.
268377e23a2Schristos
269377e23a2Schristos2009-11-18  Alan Modra  <amodra@bigpond.net.au>
270377e23a2Schristos
271377e23a2Schristos	* targets.c: Don't include alloca-conf.h.
272377e23a2Schristos	(bfd_get_target_info): Don't use alloca.
273377e23a2Schristos
274377e23a2Schristos2009-11-17  H.J. Lu  <hongjiu.lu@intel.com>
275377e23a2Schristos
276377e23a2Schristos	PR ld/10955
277377e23a2Schristos	* elfxx-ia64.c (elfNN_ia64_update_short_info): Also skip ABS
278377e23a2Schristos	sections.
279377e23a2Schristos
280377e23a2Schristos2009-11-17  H.J. Lu  <hongjiu.lu@intel.com>
281377e23a2Schristos
282377e23a2Schristos	PR ld/10955
283377e23a2Schristos	* elfxx-ia64.c (elfNN_ia64_link_hash_table): Update comments.
284377e23a2Schristos	(elfNN_ia64_update_short_info): Remove "->output_section" from
285377e23a2Schristos	ia64_info->max_short_sec and ia64_info->min_short_sec.
286377e23a2Schristos	(elfNN_ia64_choose_gp): Likewise.
287377e23a2Schristos	(elfNN_ia64_relax_section): Pass tsec->output_section to
288377e23a2Schristos	elfNN_ia64_update_short_info.
289377e23a2Schristos
290377e23a2Schristos2009-11-17  H.J. Lu  <hongjiu.lu@intel.com>
291377e23a2Schristos
292377e23a2Schristos	PR ld/10955
293377e23a2Schristos	* elfxx-ia64.c (elfNN_ia64_link_hash_table): Add max_short_sec,
294377e23a2Schristos	max_short_offset, min_short_sec and min_short_offset.
295377e23a2Schristos	(elfNN_ia64_update_short_info): New.
296377e23a2Schristos	(elfNN_ia64_relax_section): Update max_short_sec,
297377e23a2Schristos	max_short_offset, min_short_sec and min_short_offset.
298377e23a2Schristos	(elfNN_ia64_choose_gp): Use min_short_sec/max_short_sec if
299377e23a2Schristos	they are set.
300377e23a2Schristos
301377e23a2Schristos2009-11-17  Paul Brook  <paul@codesourcery.com>
302377e23a2Schristos	    Daniel Jacobowitz  <dan@codesourcery.com>
303377e23a2Schristos
304377e23a2Schristos	* elf32-arm.c (using_thumb_only, arch_has_arm_nop,
305377e23a2Schristos	arch_has_thumb2_nop): Handle TAG_CPU_ARCH_V7E_M.
306377e23a2Schristos	(tag_cpu_arch_combine): Ditto. Correct MAX_TAG_CPU_ARCH test.
307377e23a2Schristos
308377e23a2Schristos2009-11-17  Ulrich Weigand  <uweigand@de.ibm.com>
309377e23a2Schristos
310377e23a2Schristos	* elf32-spu.c (struct spu_link_hash_table): Remove overlay_fixed,
311377e23a2Schristos	reserved, and extra_stack_space members.
312377e23a2Schristos	(spu_elf_auto_overlay): Use auto_overlay_fixed, auto_overlay_reserved,
313377e23a2Schristos	and extra_stack_space members of htab->params instead.
314377e23a2Schristos
315377e23a2Schristos2009-11-17  Tristan Gingold  <gingold@adacore.com>
316377e23a2Schristos
317377e23a2Schristos	* targets.c: Include alloca-conf.h
318377e23a2Schristos
319377e23a2Schristos2009-11-16  Kai Tietz  <kai.tietz@onevision.com>
320377e23a2Schristos
321377e23a2Schristos	* targets.c (bfd_get_target_info): New function.
322377e23a2Schristos	(_bfd_find_arch_match): New function.
323377e23a2Schristos	* bfd-in2.h: Regenerated.
324377e23a2Schristos
325377e23a2Schristos2009-11-12  Nick Clifton  <nickc@redhat.com>
326377e23a2Schristos
327377e23a2Schristos	* po/ru.po: Updates Russian translation.
328377e23a2Schristos
329377e23a2Schristos2009-11-11  Nick Clifton  <nickc@redhat.com>
330377e23a2Schristos
331377e23a2Schristos	* po/id.po: Updated Indonesian translation.
332377e23a2Schristos
333377e23a2Schristos2009-11-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
334377e23a2Schristos
335377e23a2Schristos	* configure.in: Call ACX_LARGEFILE.  Stop calling AC_PLUGINS,
336377e23a2Schristos	AC_SYS_LARGEFILE and checking the Solaris largefile exception.
337377e23a2Schristos	* aclocal.m4: Regenerate.
338377e23a2Schristos	* configure: Regenerate.
339377e23a2Schristos
340377e23a2Schristos2009-11-09  H.J. Lu  <hongjiu.lu@intel.com>
341377e23a2Schristos
342377e23a2Schristos	PR ld/10911
343377e23a2Schristos	* elflink.c (elf_link_output_extsym): Don't return on
344377e23a2Schristos	STT_GNU_IFUNC symbol when stripping.
345377e23a2Schristos
346377e23a2Schristos2009-11-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
347377e23a2Schristos
348377e23a2Schristos	* elf32-hppa.c (elf32_hppa_final_link): Don't sort unwind information
349377e23a2Schristos	in a relocatable link.
350377e23a2Schristos	* elf64-hppa.c (elf_hppa_final_link): Likewise.
351377e23a2Schristos
352377e23a2Schristos2009-11-05  Nick Clifton  <nickc@redhat.com>
353377e23a2Schristos
354377e23a2Schristos	* elflink.c (elf_link_add_object_symbols): Improve error
355377e23a2Schristos	message generated when a symbol is left unresolved because a
356377e23a2Schristos	--no-add-needed command line option has prevented the
357377e23a2Schristos	inclusion of the DSO defining it.
358377e23a2Schristos
359377e23a2Schristos2009-11-03  Alan Modra  <amodra@bigpond.net.au>
360377e23a2Schristos	    Ulrich Weigand  <uweigand@de.ibm.com>
361377e23a2Schristos
362377e23a2Schristos	* elf32-spu.c (mark_functions_via_relocs): Handle non-branch relocs
363377e23a2Schristos	(jump tables or other references to code labels) as well.
364377e23a2Schristos
365377e23a2Schristos2009-11-02  Paul Brook  <paul@codesourcery.com>
366377e23a2Schristos
367377e23a2Schristos	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle VFPv4
368377e23a2Schristos	attributes.
369377e23a2Schristos
370377e23a2Schristos2009-11-02  Alan Modra  <amodra@bigpond.net.au>
371377e23a2Schristos
372377e23a2Schristos	* elflink.c (elf_link_add_object_symbols): Don't force debug
373377e23a2Schristos	symbols local.
374377e23a2Schristos
375377e23a2Schristos2009-10-29  Johan Kristell  <johankri@axis.com>
376377e23a2Schristos
377377e23a2Schristos	* elf32-cris.c (cris_elf_plt_sym_val): New function.
378377e23a2Schristos	(elf_backend_plt_sym_val): Define.
379377e23a2Schristos
380377e23a2Schristos2009-10-27  Kai Tietz  <kai.tietz@onevision.com>
381377e23a2Schristos
382377e23a2Schristos	* peXXigen.c (bfdver.h): Add include.
383377e23a2Schristos	(LINKER_VERSION): Do calculation based on BFD_VERSION.
384377e23a2Schristos
385377e23a2Schristos2009-10-25  Maciej W. Rozycki  <macro@linux-mips.org>
386377e23a2Schristos
387377e23a2Schristos	* elf32-vax.c (elf_vax_relocate_section): Correct assertion.
388377e23a2Schristos
389377e23a2Schristos2009-10-25  Maciej W. Rozycki  <macro@linux-mips.org>
390377e23a2Schristos
391377e23a2Schristos	* elf32-vax.c (elf_vax_plt_entry): Fix formatting.
392377e23a2Schristos
393377e23a2Schristos2009-10-25  Maciej W. Rozycki  <macro@linux-mips.org>
394377e23a2Schristos
395377e23a2Schristos	* elf32-vax.c (elf_vax_relocate_section): Fix a typo.
396377e23a2Schristos
397377e23a2Schristos2009-10-23  Kai Tietz  <kai.tietz@onevision.com>
398377e23a2Schristos
399377e23a2Schristos	* coff-x86_64.c (coff_amd64_rtype_to_howto): Subtract offset
400377e23a2Schristos	of R_AMD64_PCRLONG_<X> relocations from addend.
401377e23a2Schristos
402377e23a2Schristos2009-10-23  Alan Modra  <amodra@bigpond.net.au>
403377e23a2Schristos
404377e23a2Schristos	* plugin.c: Produce empty object if not BFD_SUPPORTS_PLUGINS.
405377e23a2Schristos
406377e23a2Schristos2009-10-20  Alan Modra  <amodra@bigpond.net.au>
407377e23a2Schristos
408377e23a2Schristos	PR binutils/10802
409377e23a2Schristos	* opncls.c (_maybe_make_executable): Make DYNAMIC files executable.
410377e23a2Schristos
411*48596154Schristos2009-10-19  Edgar E. Iglesias  <edgar@axis.com>
412*48596154Schristos	    Hans-Peter Nilsson  <hp@axis.com>
413377e23a2Schristos
414377e23a2Schristos	* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_DTPREL>:
415377e23a2Schristos	Don't subtract the size of the TLS block for non-shared objects
416377e23a2Schristos	from the relocation.
417377e23a2Schristos
418377e23a2Schristos2009-10-17  Arnold Metselaar  <arnold.metselaar@planet.nl>
419377e23a2Schristos
420377e23a2Schristos	* coff-z80.c (z80coff_vec): Allow sections to be of type
421377e23a2Schristos	SEC_CODE or SEC_DATA
422377e23a2Schristos
423377e23a2Schristos2009-10-16  Alan Modra  <amodra@bigpond.net.au>
424377e23a2Schristos
425377e23a2Schristos	PR binutils/10785
426377e23a2Schristos	* coff-alpha.c (alpha_ecoff_get_elt_at_filepos): Don't bfd_alloc
427377e23a2Schristos	bim and bim->buffer.  bfd_malloc instead.
428377e23a2Schristos	* peicode.h (pe_ILF_build_a_bfd): Similarly.
429377e23a2Schristos	(ILF_DATA_SIZE): Don't include bim.
430377e23a2Schristos	* opncls.c (bfd_close): Test bim->buffer non-NULL before freeing.
431377e23a2Schristos
432377e23a2Schristos2009-10-14  Alan Modra  <amodra@bigpond.net.au>
433377e23a2Schristos
434377e23a2Schristos	* aoutx.h (aout_link_check_ar_symbols): Typo fix.
435377e23a2Schristos
436377e23a2Schristos2009-10-13  H.J. Lu  <hongjiu.lu@intel.com>
437377e23a2Schristos
438377e23a2Schristos	PR binutils/10763
439377e23a2Schristos	* elf32-i386.c (elf_i386_finish_dynamic_symbol): Declare plt
440377e23a2Schristos	earlier.
441377e23a2Schristos
442377e23a2Schristos2009-10-13  Alan Modra  <amodra@bigpond.net.au>
443377e23a2Schristos
444377e23a2Schristos	* elflink.c (_bfd_elf_merge_symbol): Revert previous patch.
445377e23a2Schristos
446377e23a2Schristos2009-10-12  Roland McGrath  <roland@frob.com>
447377e23a2Schristos
448377e23a2Schristos	* elflink.c (elf_link_add_object_symbols, _bfd_elf_merge_symbol):
449377e23a2Schristos	Fix %s that should be %B in several message formats.
450377e23a2Schristos
451377e23a2Schristos2009-10-10  Alan Modra  <amodra@bigpond.net.au>
452377e23a2Schristos
453377e23a2Schristos	* cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols for
454377e23a2Schristos	excluded output sections.
455377e23a2Schristos
456377e23a2Schristos2009-10-09  Tristan Gingold  <gingold@adacore.com>
457377e23a2Schristos
458377e23a2Schristos	* mach-o.c (bfd_mach_o_read_command): Handle BFD_MACH_O_LC_RPATH.
459377e23a2Schristos	(bfd_mach_o_bfd_print_private_bfd_data): Ditto.
460377e23a2Schristos
461377e23a2Schristos2009-10-09  Tristan Gingold  <gingold@adacore.com>
462377e23a2Schristos
463377e23a2Schristos	* mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Rename to
464377e23a2Schristos	bfd_mach_o_read_symtab_symbols.
465377e23a2Schristos	(bfd_mach_o_scan_write_thread): Rename to bfd_mach_o_write_thread.
466377e23a2Schristos	(bfd_mach_o_scan_write_relocs): Rename to bfd_mach_o_write_relocs.
467377e23a2Schristos	(bfd_mach_o_scan_write_section_32): Rename to
468377e23a2Schristos	bfd_mach_o_write_section_32.
469377e23a2Schristos	(bfd_mach_o_scan_write_section_64): Rename to
470377e23a2Schristos	bfd_mach_o_write_section_64.
471377e23a2Schristos	(bfd_mach_o_scan_write_segment_32): Rename to
472377e23a2Schristos	bfd_mach_o_write_segment_32.
473377e23a2Schristos	(bfd_mach_o_scan_write_segment_64): Rename to
474377e23a2Schristos	bfd_mach_o_write_segment_64.
475377e23a2Schristos	(bfd_mach_o_scan_write_symtab): Rename to bfd_mach_o_write_symtab.
476377e23a2Schristos	(bfd_mach_o_scan_read_section_32): Rename to
477377e23a2Schristos	bfd_mach_o_read_section_32.
478377e23a2Schristos	(bfd_mach_o_scan_read_section_64): Rename to
479377e23a2Schristos	bfd_mach_o_read_section_64.
480377e23a2Schristos	(bfd_mach_o_scan_read_section): Rename to bfd_mach_o_read_section.
481377e23a2Schristos	(bfd_mach_o_scan_read_symtab_strtab): Rename to
482377e23a2Schristos	bfd_mach_o_read_symtab_strtab.
483377e23a2Schristos	(bfd_mach_o_scan_read_symtab_symbol): Rename to
484377e23a2Schristos	bfd_mach_o_read_symtab_symbol.
485377e23a2Schristos	(bfd_mach_o_scan_read_dysymtab_symbol): Rename to
486377e23a2Schristos	bfd_mach_o_read_dysymtab_symbol.
487377e23a2Schristos	(bfd_mach_o_scan_read_dylinker): Rename to bfd_mach_o_read_dylinker.
488377e23a2Schristos	(bfd_mach_o_scan_read_dylib): Rename to bfd_mach_o_read_dylib.
489377e23a2Schristos	(bfd_mach_o_scan_read_prebound_dylib): Rename to
490377e23a2Schristos	bfd_mach_o_read_prebound_dylib.
491377e23a2Schristos	(bfd_mach_o_scan_read_thread): Rename to bfd_mach_o_read_thread.
492377e23a2Schristos	(bfd_mach_o_scan_read_dysymtab): Rename to bfd_mach_o_read_dysymtab.
493377e23a2Schristos	(bfd_mach_o_scan_read_symtab): Rename to bfd_mach_o_read_symtab.
494377e23a2Schristos	(bfd_mach_o_scan_read_uuid): Rename to bfd_mach_o_read_uuid.
495377e23a2Schristos	(bfd_mach_o_scan_read_linkedit): Rename to bfd_mach_o_read_linkedit.
496377e23a2Schristos	(bfd_mach_o_scan_read_str): Rename to bfd_mach_o_read_str.
497377e23a2Schristos	(bfd_mach_o_scan_read_dyld_info): Rename to bfd_mach_o_read_dyld_info.
498377e23a2Schristos	(bfd_mach_o_scan_read_segment): Rename to bfd_mach_o_read_segment.
499377e23a2Schristos	(bfd_mach_o_scan_read_segment_32): Rename to
500377e23a2Schristos	bfd_mach_o_read_segment_32.
501377e23a2Schristos	(bfd_mach_o_scan_read_segment_64): Rename to
502377e23a2Schristos	bfd_mach_o_read_segment_64.
503377e23a2Schristos	(bfd_mach_o_scan_read_command): Rename to bfd_mach_o_read_command.
504377e23a2Schristos	* mach-o.h (bfd_mach_o_scan_read_dysymtab_symbol): Rename to
505377e23a2Schristos	bfd_mach_o_read_dysymtab_symbol.
506377e23a2Schristos
507377e23a2Schristos2009-10-09  Tristan Gingold  <gingold@adacore.com>
508377e23a2Schristos
509377e23a2Schristos	* mach-o.c (bfd_mach_o_section_get_entry_size): Moved.
510377e23a2Schristos	(bfd_mach_o_section_get_nbr_indirect): Ditto.
511377e23a2Schristos	(bfd_mach_o_get_synthetic_symtab): New function.
512377e23a2Schristos	(bfd_mach_o_print_private_header): Print the number of commands
513377e23a2Schristos	in decimal.
514377e23a2Schristos	* mach-o.h (bfd_mach_o_get_synthetic_symtab): Add prototype.
515377e23a2Schristos	* mach-o-target.c: Do not defined bfd_mach_o_get_synthetic_symtab.
516377e23a2Schristos
517377e23a2Schristos2009-10-08  Tristan Gingold  <gingold@adacore.com>
518377e23a2Schristos
519377e23a2Schristos	* config.bfd: Add bfd_mach_o_i386_vec in x86_64-darwin targ_selvecs.
520377e23a2Schristos
521377e23a2Schristos2009-10-06  H.J. Lu  <hongjiu.lu@intel.com>
522377e23a2Schristos
523377e23a2Schristos	* bfd-in2.h: Regenerated.
524377e23a2Schristos
525377e23a2Schristos2009-10-02  Alan Modra  <amodra@bigpond.net.au>
526377e23a2Schristos
527377e23a2Schristos	* aout-cris.c (N_SHARED_LIB): Don't define.
528377e23a2Schristos	* hp300bsd.c (N_SHARED_LIB): Don't define.
529377e23a2Schristos	* i386bsd.c (N_SHARED_LIB): Don't define.
530377e23a2Schristos	* i386linux.c (N_SHARED_LIB): Don't define.
531377e23a2Schristos	* i386lynx.c (N_SHARED_LIB): Don't define.
532377e23a2Schristos	* m68klinux.c (N_SHARED_LIB): Don't define.
533377e23a2Schristos	* m88kmach3.c (N_SHARED_LIB): Don't define.
534377e23a2Schristos	* mipsbsd.c (N_SHARED_LIB): Don't define.
535377e23a2Schristos	* newsos3.c (N_SHARED_LIB): Don't define.
536377e23a2Schristos	* pc532-mach.c (N_SHARED_LIB): Don't define.
537377e23a2Schristos	* pdp11.c (N_SHARED_LIB): Don't define.
538377e23a2Schristos	* sparclinux.c (N_SHARED_LIB): Don't define.
539377e23a2Schristos	* vaxbsd.c (N_SHARED_LIB): Don't define.
540377e23a2Schristos
541377e23a2Schristos2009-10-01  Dave Korn  <dave.korn.cygwin@gmail.com>
542377e23a2Schristos
543377e23a2Schristos	* cofflink.c (_bfd_coff_generic_relocate_section): Look for the aux
544377e23a2Schristos	symbol for a weak undef in the auxbfd, not the input bfd.
545377e23a2Schristos
546377e23a2Schristos2009-10-01  Ulrich Weigand  <uweigand@de.ibm.com>
547377e23a2Schristos
548377e23a2Schristos	* elf32-spu.c (spu_elf_auto_overlay): Insert icache linker script
549377e23a2Schristos	after .toe instead of before .text section.  Set the LMA of all
550377e23a2Schristos	overlay sections to their icache IA address.
551377e23a2Schristos	(spu_elf_find_overlays): Determine icache set id without reference
552377e23a2Schristos	to the LMA.
553377e23a2Schristos
554377e23a2Schristos2009-09-30  Tristan Gingold  <gingold@adacore.com>
555377e23a2Schristos
556377e23a2Schristos	* configure.com: Use hosts/alphavms.h on both alpha and ia64 VMS.
557377e23a2Schristos
558377e23a2Schristos2009-09-29  H.J. Lu  <hongjiu.lu@intel.com>
559377e23a2Schristos
560377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_append_rela): New.
561377e23a2Schristos	(elf64_x86_64_relocate_section): Use it.
562377e23a2Schristos	(elf64_x86_64_finish_dynamic_symbol): Likewise.
563377e23a2Schristos
564377e23a2Schristos2009-09-29  DJ Delorie  <dj@redhat.com>
565377e23a2Schristos
566377e23a2Schristos	* Makefile.am (ALL_MACHINES): Add cpu-rx.lo.
567377e23a2Schristos	(ALL_MACHINES_CFILES): Add cpu-rx.c.
568377e23a2Schristos	(BFD32_BACKENDS): Add elf32-rx.lo.
569377e23a2Schristos	(BFD32_BACKENDS_CFILES): Add elf32-rx.c.
570377e23a2Schristos	* archures.c (bfd_architecture): Add bfd_arch_rx and bfd_mach_rx.
571377e23a2Schristos	Export bfd_rx_arch.
572377e23a2Schristos	(bfd_archures_list): Add bfd_rx_arch.
573377e23a2Schristos	* config.bfd: Add entry for rx-*-elf.
574377e23a2Schristos	* configure.in: Add entries for bfd_elf32_rx_le_vec and
575377e23a2Schristos	bfd_elf32_rx_be_vec.
576377e23a2Schristos	* reloc.c: Add RX relocations.
577377e23a2Schristos	* targets.c: Add RX target vectors.
578377e23a2Schristos	* Makefile.in: Regenerate.
579377e23a2Schristos	* bfd-in2.h: Regenerate.
580377e23a2Schristos	* configure: Regenerate.
581377e23a2Schristos	* libbfd.h: Regenerate.
582377e23a2Schristos	* cpu-rx.c: New file.
583377e23a2Schristos	* elf32-rx.c: New file.
584377e23a2Schristos
585377e23a2Schristos2009-09-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
586377e23a2Schristos
587377e23a2Schristos	* elf32-cr16.c (elf32_cr16_relocate_section): Removed
588377e23a2Schristos	info->relocatable to fix the ld/testsuites/ld-elf/linkonce1 test case.
589377e23a2Schristos
590377e23a2Schristos2009-09-28  Nick Clifton  <nickc@redhat.com>
591377e23a2Schristos
592377e23a2Schristos	PR 10478: Accepting Solaris binaries.
593377e23a2Schristos	* elf.c (bfd_section_from_shdr): Allow SHN_BEFORE and SHN_AFTER
594377e23a2Schristos	section link values in x86 binaries.
595377e23a2Schristos	* elfcode.h (elf_object_p): Likewise.
596377e23a2Schristos
597377e23a2Schristos2009-09-28  Philippe De Muyter  <phdm@macqel.be>
598377e23a2Schristos
599377e23a2Schristos	* elf32-m68k.c (elf_m68k_final_write_processing): New function.
600377e23a2Schristos	(elf_backend_final_write_processing): Macro defined as above function.
601377e23a2Schristos
602377e23a2Schristos2009-09-25  Martin Thuresson  <martint@google.com>
603377e23a2Schristos
604377e23a2Schristos	Update sources to make alpha and arm targets compile cleanly with
605377e23a2Schristos	-Wc++-compat:
606377e23a2Schristos	* ecoff.c: Add casts.
607377e23a2Schristos	* ecofflink.c: Add casts.
608377e23a2Schristos	* elf64-alpha.c: Add casts.
609377e23a2Schristos	(struct alpha_elf_got_entry, struct alpha_elf_reloc_entry): Move
610377e23a2Schristos	to top level.
611377e23a2Schristos	(SKIP_HOWTO): Use enum name.
612377e23a2Schristos	* elf32-arm.c: Add casts.
613377e23a2Schristos	(elf32_arm_vxworks_bed): Update code to avoid multiple
614377e23a2Schristos	declarations.
615377e23a2Schristos	(struct map_stub): Move to top level.
616377e23a2Schristos
617377e23a2Schristos2009-09-24  H.J. Lu  <hongjiu.lu@intel.com>
618377e23a2Schristos
619377e23a2Schristos	PR ld/10630
620377e23a2Schristos	* elflink.c (elf_link_output_extsym): Turn off visibility on
621377e23a2Schristos	local symbol.
622377e23a2Schristos	(bfd_elf_final_link): Turn off visibility on dynamic local
623377e23a2Schristos	symbol.
624377e23a2Schristos
625377e23a2Schristos2009-09-24  Alan Modra  <amodra@bigpond.net.au>
626377e23a2Schristos
627377e23a2Schristos	PR binutils/10654
628377e23a2Schristos	* dwarf2.c (lookup_address_in_line_info_table): Remove workaround
629377e23a2Schristos	for invalid location lists generated by gcc-2.95 and Intel 6.0 C++.
630377e23a2Schristos	Remove "function" parm, adjust caller.
631377e23a2Schristos
632377e23a2Schristos2009-09-23  Matt Rice  <ratmice@gmail.com>
633377e23a2Schristos
634377e23a2Schristos	* bfd-in.h (bfd_elf_size_dynamic_sections): Add audit and depaudit
635377e23a2Schristos	arguments.
636377e23a2Schristos	* elflink.c (bfd_elf_size_dynamic_sections): Generate DT_AUDIT,
637377e23a2Schristos	DT_DEPAUDIT from audit/depaudit arguments.
638377e23a2Schristos	(elf_finalize_dynstr): Finalize DT_AUDIT and DT_DEPAUDIT strtab entries.
639377e23a2Schristos	(elf_link_add_object_symbols): Set dt_audit target data when finding a
640377e23a2Schristos	DT_AUDIT.
641377e23a2Schristos	* bfd-in2.h: Regenerate.
642377e23a2Schristos	* bfd-elf.h: Add dt_audit to elf_obj_tdata, and elf_dt_audit macro.
643377e23a2Schristos
644377e23a2Schristos2009-09-23  Jie Zhang  <jie.zhang@analog.com>
645377e23a2Schristos
646377e23a2Schristos	* elf32-bfin.c (_bfinfdpic_size_got_plt): Make sure empty
647377e23a2Schristos	.rel.plt and .plt sections are removed.
648377e23a2Schristos	(elf32_bfinfdpic_size_dynamic_sections): Remove empty .dynbss
649377e23a2Schristos	section.  Remove the duplicated removing of empty .rel.plt
650377e23a2Schristos	section.
651377e23a2Schristos
652377e23a2Schristos2009-09-21  Richard Sandiford  <rdsandiford@googlemail.com>
653377e23a2Schristos
654377e23a2Schristos	* elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Extend previous
655377e23a2Schristos	patch to handle the new personality relaxation.
656377e23a2Schristos
657377e23a2Schristos2009-09-21  Richard Sandiford  <rdsandiford@googlemail.com>
658377e23a2Schristos
659377e23a2Schristos	* elf-eh-frame.c (make_pc_relative): New function.
660377e23a2Schristos	(_bfd_elf_write_section_eh_frame): Use it.
661377e23a2Schristos
662377e23a2Schristos2009-09-21  Alan Modra  <amodra@bigpond.net.au>
663377e23a2Schristos
664377e23a2Schristos	* elf32-ppc.c (TLS_GET_ADDR_GLINK_SIZE): Define.
665377e23a2Schristos	(ADD_3_12_2, BEQLR, CMPWI_11_0, LWZ_11_3, LWZ_12_3): Define.
666377e23a2Schristos	(MR_0_3, MR_3_0): Define.
667377e23a2Schristos	(struct ppc_elf_link_hash_table): Add no_tls_get_addr_opt.
668377e23a2Schristos	(ppc_elf_select_plt_layout): Save emit_stub_syms param earlier.
669377e23a2Schristos	(ppc_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
670377e23a2Schristos	table.  Check for presense of __tls_get_addr_opt
671377e23a2Schristos	(allocate_dynrelocs): Increase glink entry size for __tls_get_addr.
672377e23a2Schristos	(ppc_elf_size_dynamic_sections): Add DT_PPC_TLS_OPT tag.
673377e23a2Schristos	(write_glink_stub): Add param p.
674377e23a2Schristos	(ppc_elf_relocate_section): Adjust write_glink_stub call.
675377e23a2Schristos	(ppc_elf_finish_dynamic_symbol): Emit special glink call stub for
676377e23a2Schristos	__tls_get_addr.
677377e23a2Schristos	* elf32-ppc.h (ppc_elf_tls_setup): Update prototype.
678377e23a2Schristos	* elf64-ppc.c (struct ppc_link_hash_table): Add no_tls_get_addr_opt.
679377e23a2Schristos	(ppc64_elf_tls_setup): Add no_tls_get_addr_opt param and save to hash
680377e23a2Schristos	table.  Check for presense of __tls_get_addr_opt.
681377e23a2Schristos	(ppc64_elf_size_dynamic_sections): Add DT_PPC64_TLS_OPT tag.
682377e23a2Schristos	(LD_R11_0R3, LD_R12_0R3, MR_R0_R3, CMPDI_R11_0, ADD_R3_R12_R13,
683377e23a2Schristos	BEQLR, MR_R3_R0, MFLR_R11, STD_R11_0R1, BCTRL, LD_R11_0R1,
684377e23a2Schristos	LD_R2_0R1, MTLR_R11): Define.
685377e23a2Schristos	(build_tls_get_addr_stub): New function.
686377e23a2Schristos	(ppc_build_one_stub): Call it.
687377e23a2Schristos	(ppc_size_one_stub): Add extra size for __tls_get_addr stub.
688377e23a2Schristos	(ppc64_elf_relocate_section): Don't change nop to ld 2,40(1) for
689377e23a2Schristos	__tls_get_addr plt call.
690377e23a2Schristos	* elf64-ppc.h (ppc64_elf_tls_setup): Update prototype.
691377e23a2Schristos
692377e23a2Schristos2009-09-19  Richard Sandiford  <rdsandiford@googlemail.com>
693377e23a2Schristos
694377e23a2Schristos	* elf-bfd.h (eh_cie_fde): Add personality_offset and
695377e23a2Schristos	make_per_encoding_relative to the CIE structure.  Add a padding field.
696377e23a2Schristos	* elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Use 0x70
697377e23a2Schristos	rather than 0xf0 when masking out the base address encoding
698377e23a2Schristos	Record the offset of personality data from the start of the CIE.
699377e23a2Schristos	Remove a repeated elf_backend_can_make_relative_eh_frame check.
700377e23a2Schristos	(find_merged_cie): Take an info argument.  If the personality
701377e23a2Schristos	binds locally, try converting an absolute personality into
702377e23a2Schristos	a local one.
703377e23a2Schristos	(_bfd_elf_discard_section_eh_frame): Use 0x70 rather than 0xf0
704377e23a2Schristos	when masking out the base address encoding.  Update the call to
705377e23a2Schristos	find_merged_cie.
706377e23a2Schristos	(_bfd_elf_eh_frame_section_offset): Discard relocations against
707377e23a2Schristos	the personality data if we are converting into PC-relative form.
708377e23a2Schristos	(_bfd_elf_write_section_eh_frame): Use 0x70 rather than 0xf0
709377e23a2Schristos	when masking out the base address encoding.  Handle
710377e23a2Schristos	make_per_encoding_relative.
711377e23a2Schristos
712377e23a2Schristos2009-09-18  Alan Modra  <amodra@bigpond.net.au>
713377e23a2Schristos
714377e23a2Schristos	PR ld/10406
715377e23a2Schristos	* elf32-ppc.c (ppc_elf_howto_raw): Make R_PPC_EMB_SDAI16 and
716377e23a2Schristos	R_PPC_EMB_SDA2I16 complain_overflow_signed.
717377e23a2Schristos	(create_sdata_sym): Pass info rather than htab.
718377e23a2Schristos	Update all callers.  Ensure symbols are hidden.
719377e23a2Schristos	(ppc_elf_check_relocs): Allow SDAREL16 when shared.
720377e23a2Schristos	(ppc_elf_size_dynamic_sections): When shared, equate _SDA_BASE_ to
721377e23a2Schristos	_GLOBAL_OFFSET_TABLE_.
722377e23a2Schristos	(elf_finish_pointer_linker_section): Don't assume that sdata base
723377e23a2Schristos	symbol is always at 0x8000 offset.  Don't subtract the addend here.
724377e23a2Schristos	(is_static_defined): New function.
725377e23a2Schristos	(ppc_elf_relocate_section): Verify symbol base used in SDA relocs
726377e23a2Schristos	is statically defined.  Clear addend for EMB_SDAI16 and EMB_SDA2I16
727377e23a2Schristos	relocs.  Downgrade error on unexpected section for EMB_SDA2REL
728377e23a2Schristos	reloc symbols to a warning.
729377e23a2Schristos
730377e23a2Schristos2009-09-18  Nick Clifton  <nickc@redhat.com>
731377e23a2Schristos
732377e23a2Schristos	* po/es.po: Updated Spanish translation.
733377e23a2Schristos	* po/vi.po: Updated Vietnamese translation.
734377e23a2Schristos
735377e23a2Schristos2009-09-18  Alan Modra  <amodra@bigpond.net.au>
736377e23a2Schristos
737377e23a2Schristos	* elf64-ppc.c (follow_link, elf_follow_link, ppc_follow_link): New
738377e23a2Schristos	functions.  Use throughout.
739377e23a2Schristos	(ppc64_elf_copy_indirect_symbol): Set direct symbol "oh" field
740377e23a2Schristos	from indirect symbol.
741377e23a2Schristos	(lookup_fdh): Rename from get_fdh.  Follow indirect sym links.
742377e23a2Schristos	(add_symbol_adjust): Simplify.
743377e23a2Schristos	(defined_code_entry, defined_func_desc): New functions.
744377e23a2Schristos	(ppc64_elf_gc_keep): Follow indirect sym links.  Use defined_code_entry.
745377e23a2Schristos	(ppc64_elf_gc_mark_dynamic_ref): Use defined_func_desc and
746377e23a2Schristos	defined_code_entry to follow indirect sym links.
747377e23a2Schristos	(ppc64_elf_gc_mark_hook, func_desc_adjust): Likewise.
748377e23a2Schristos	(ppc_type_of_stub): Follow indirect sym links.
749377e23a2Schristos	(toc_adjusting_stub_needed): Likewise.
750377e23a2Schristos	(ppc_build_one_stub): Likewise.  Make undefined dot-symbols weak
751377e23a2Schristos	rather than defining them at stub.
752377e23a2Schristos	(ppc64_elf_relocate_section): Rewrite call test to avoid multiple
753377e23a2Schristos	assignments in test.
754377e23a2Schristos
755377e23a2Schristos2009-09-16  Tristan Gingold  <gingold@adacore.com>
756377e23a2Schristos
757377e23a2Schristos	* mach-o.h (bfd_mach_o_filetype): Add new constants from darwin10.
758377e23a2Schristos	Reindent.
759377e23a2Schristos	* mach-o.c (bfd_mach_o_cpu_name): Reindent.
760377e23a2Schristos	(bfd_mach_o_filetype_name): Complete with new constants.  Reindent.
761377e23a2Schristos	(bfd_mach_o_print_private_header): Use fputs instead of fprintf
762377e23a2Schristos	when possible to avoid warnings.
763377e23a2Schristos	(bfd_mach_o_print_section_map): Ditto.
764377e23a2Schristos	(bfd_mach_o_section_get_entry_size): New function.
765377e23a2Schristos	(bfd_mach_o_section_get_nbr_indirect): Simplify using the newly
766377e23a2Schristos	added function.
767377e23a2Schristos	(bfd_mach_o_print_dysymtab): Print address of indirect symbols.
768377e23a2Schristos
769377e23a2Schristos2009-09-14  Nick Clifton  <nickc@redhat.com>
770377e23a2Schristos
771377e23a2Schristos	* po/fi.po: Updated Finnish translation.
772377e23a2Schristos
773377e23a2Schristos2009-09-11  Nick Clifton  <nickc@redhat.com>
774377e23a2Schristos
775377e23a2Schristos	* po/bfd.pot: Updated by the Translation project.
776377e23a2Schristos
777377e23a2Schristos2009-09-11  Philippe De Muyter  <phdm@macqel.be>
778377e23a2Schristos
779377e23a2Schristos	* binary.c (binary_object_p): Remove bfd_external_binary_architecture
780377e23a2Schristos	hack.  objcopy `-B' (`--binary-architecture') option is now handled
781377e23a2Schristos	in a generic way.
782377e23a2Schristos
783377e23a2Schristos2009-09-11  Nick Clifton  <nickc@redhat.com>
784377e23a2Schristos
785377e23a2Schristos	* rs6000-core.c (read_hdr): Fix typo in recent C++ compatibility
786377e23a2Schristos	changes.
787377e23a2Schristos
788377e23a2Schristos2009-09-11  Jie Zhang  <jie.zhang@analog.com>
789377e23a2Schristos
790377e23a2Schristos	* elf32-bfin.c (bfinfdpic_relocs_info_find): Just return
791377e23a2Schristos	NULL if `ht' is NULL.
792377e23a2Schristos
793377e23a2Schristos2009-09-09  Martin Thuresson  <martin@mtme.org>
794377e23a2Schristos
795377e23a2Schristos	Update sources to compile cleanly with -Wc++-compat:
796377e23a2Schristos	* aoutx.h: Add casts.
797377e23a2Schristos	* archive.c: Add casts.
798377e23a2Schristos	* archive64.c: Add casts.
799377e23a2Schristos	* archures.c: Add casts.
800377e23a2Schristos	* bfd-in2.h: Regenerated.
801377e23a2Schristos	* bfd.c: Add casts. (enum bfd_direction): Move out to top level.
802377e23a2Schristos	* bfdio.c: Add casts.
803377e23a2Schristos	* binary.c: Add casts.
804377e23a2Schristos	* cache.c (cache_bseek,cache_bread_1,cache_bwrite): Updated
805377e23a2Schristos	parameter to use enum value instead of int.
806377e23a2Schristos	* coffcode.h: Add casts.
807377e23a2Schristos	* coffgen.c: Add casts.
808377e23a2Schristos	* cofflink.c: Add casts.
809377e23a2Schristos	* compress.c: Add casts.
810377e23a2Schristos	* dwarf1.c: Add casts.
811377e23a2Schristos	* dwarf2.c: Add casts. (struct dwarf2_debug): Rename member bfd to
812377e23a2Schristos	bfd_ptr. Update code to use new name.
813377e23a2Schristos	* elf-attrs.c: Add casts.
814377e23a2Schristos	* elf-bfd.h (elf_link_virtual_table_entry): Gives name to
815377e23a2Schristos	anonymous struct. (union gotplt_union, struct
816377e23a2Schristos	elf_link_virtual_table_entry): Move to top level.
817377e23a2Schristos	* elf-eh-frame.c: Add casts.
818377e23a2Schristos	* elf-strtab.c: Add casts.
819377e23a2Schristos	* elf.c: Add casts. (_bfd_elm_make_Section_from_phdr): Change
820377e23a2Schristos	argument name from typename to type_name.
821377e23a2Schristos	* elf32-i386.c: Add casts.
822377e23a2Schristos	* elf64-x86-64.c: Add casts.
823377e23a2Schristos	* elfcode.h: Add casts.
824377e23a2Schristos	* elfcore.h: Add casts.
825377e23a2Schristos	* elflink.c: Add casts.
826377e23a2Schristos	* format.c: Add casts.
827377e23a2Schristos	* hash.c: Add casts.
828377e23a2Schristos	* ihex.c: Add casts.
829377e23a2Schristos	* libaout.h (enum aout_subformat, enum aout_magic): Move to top
830377e23a2Schristos	level.
831377e23a2Schristos	* libbfd.c: Add casts.
832377e23a2Schristos	* linker.c: Add casts.
833377e23a2Schristos	* merge.c: Add casts.
834377e23a2Schristos	* opncls.c: Add casts.
835377e23a2Schristos	* peXXigen.c: Add casts.
836377e23a2Schristos	* peicode.h: Add casts.
837377e23a2Schristos	* reloc.c: Add casts.
838377e23a2Schristos	* section.c: Add casts.
839377e23a2Schristos	* simple.c: Add casts.
840377e23a2Schristos	* srec.c: Add casts.
841377e23a2Schristos	* stabs.c: Add casts.
842377e23a2Schristos	* syms.c: Add casts.
843377e23a2Schristos	* targets.c: Add casts.
844377e23a2Schristos	* tekhex.c: Add casts.
845377e23a2Schristos	* verilog.c: Add casts.
846377e23a2Schristos
847377e23a2Schristos2009-09-09  Paolo Bonzini  <bonzini@gnu.org>
848377e23a2Schristos
849377e23a2Schristos	* configure: Regenerate.
850377e23a2Schristos
851377e23a2Schristos2009-09-09  Daniel Jacobowitz  <dan@codesourcery.com>
852377e23a2Schristos
853377e23a2Schristos	* elf32-arm.c (elf32_arm_final_link_relocate): Set sym_flags
854377e23a2Schristos	for the mode of target PLT entries.
855377e23a2Schristos	(allocate_dynrelocs): Only adjust symbol type if setting its
856377e23a2Schristos	value.
857377e23a2Schristos
858377e23a2Schristos2009-09-09  Paolo Bonzini  <bonzini@gnu.org>
859377e23a2Schristos
860377e23a2Schristos	* configure: Regenerate.
861377e23a2Schristos
862377e23a2Schristos2009-09-09  Nick Clifton  <nickc@redhat.com>
863377e23a2Schristos
864377e23a2Schristos	PR 10478:
865377e23a2Schristos	* elf.c (bfd_section_from_shdr): Do not reject sparc binaries with
866377e23a2Schristos	section headers containing sh_link values of SHN_BEFORE or
867377e23a2Schristos	SHN_AFTER.
868377e23a2Schristos	* elfcode.h (elf_object_p): Likewise.
869377e23a2Schristos
870377e23a2Schristos2009-09-09  Tristan Gingold  <gingold@adacore.com>
871377e23a2Schristos
872377e23a2Schristos	Handle DYLD_INFO introduced by Darwin10.
873377e23a2Schristos	* mach-o.h (bfd_mach_o_load_command_type): Add
874377e23a2Schristos	BFD_MACH_O_LC_DYLD_INFO.
875377e23a2Schristos	(bfd_mach_o_dyld_info_command): New type.
876377e23a2Schristos	(bfd_mach_o_load_command): Add dyld_info field.
877377e23a2Schristos	* mach-o.c (bfd_mach_o_scan_read_str): Reduce size of buf.
878377e23a2Schristos	(bfd_mach_o_scan_read_dyld_info): New function.
879377e23a2Schristos	(bfd_mach_o_scan_read_command): Handle BFD_MACH_O_LC_DYLD_INFO.
880377e23a2Schristos	(bfd_mach_o_bfd_print_private_bfd_data): Ditto.
881377e23a2Schristos	(bfd_mach_o_load_command_name): AddB FD_MACH_O_LC_DYLD_INFO.
882377e23a2Schristos	(bfd_mach_o_print_dyld_info): New function.
883377e23a2Schristos
884377e23a2Schristos2009-09-09  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
885377e23a2Schristos
886377e23a2Schristos	* elf32-cr16.c (elf32_cr16_relocate_section): Add code to discard the
887377e23a2Schristos	linkonce or linker script discarded section.
888377e23a2Schristos
889377e23a2Schristos2009-09-09  Alan Modra  <amodra@bigpond.net.au>
890377e23a2Schristos
891377e23a2Schristos	* elf32-xtensa.c (elf_xtensa_relax_section): Delete -r check.
892377e23a2Schristos
893377e23a2Schristos2009-09-07  Andreas Schwab  <schwab@linux-m68k.org>
894377e23a2Schristos
895377e23a2Schristos	* elf32-m68k.c (rtype_to_howto): If the reloc index is out of
896377e23a2Schristos	range call the bfd error hander and use R_68K_NONE instead.
897377e23a2Schristos
898377e23a2Schristos2009-09-07  Tristan Gingold  <gingold@adacore.com>
899377e23a2Schristos
900377e23a2Schristos	* po/SRC-POTFILES.in: Regenerate.
901377e23a2Schristos	* po/bfd.pot: Regenerate.
902377e23a2Schristos
903377e23a2Schristos	* bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
904377e23a2Schristos	BFD_HAVE_SYS_STAT_TYPE_MEMBER): Moved to gas/acinclude.m4
905377e23a2Schristos	* configure.in: Move tests for tm_gmtoff, st_mtim.tv_sec and
906377e23a2Schristos	st_mtim.tv_nsec to gas/configure.in
907377e23a2Schristos	(bfd_elf64_ia64_vms_vec): Remove vmsutil.lo
908377e23a2Schristos	* configure: Regenerate.
909377e23a2Schristos	* config.in: Regenerate.
910377e23a2Schristos	* vmsutil.c: Moved to gas/config/te-vms.c
911377e23a2Schristos	* vmsutil.h: Removed.
912377e23a2Schristos	* Makefile.am (BFD32_BACKENDS_CFILES): Remove vmsutil.c
913377e23a2Schristos	(BFD32_BACKENDS): Remove vmsutil.lo
914377e23a2Schristos	* Makefile.in: Regenerate.
915377e23a2Schristos
916377e23a2Schristos2009-09-05  Eli Zaretskii  <eliz@gnu.org>
917377e23a2Schristos
918377e23a2Schristos	* coffcode.h: Include libiberty.h.
919377e23a2Schristos
920377e23a2Schristos2009-09-05  Martin Thuresson  <martin@mtme.org>
921377e23a2Schristos
922377e23a2Schristos	* coff-arm.c (coff_arm_relocate_section)
923377e23a2Schristos	(record_thumb_to_arm_glue, bfd_arm_process_before_allocation):
924377e23a2Schristos	Change member name class to symbol_class.
925377e23a2Schristos	* coff-i960.c (coff_i960_relocate_section) Rename variable
926377e23a2Schristos	class to class_val. Change member name class to symbol_class.
927377e23a2Schristos	* coff-rs6000.c (_bfd_xcoff_swap_aux_in)
928377e23a2Schristos	(_bfd_xcoff_swap_aux_out): Rename arguments class to in_class.
929377e23a2Schristos	* coff-stgo32.c (adjust_aux_in_post)
930377e23a2Schristos	(adjust_aux_out_pre, adjust_aux_out_post): Rename arguments class
931377e23a2Schristos	to in_class.
932377e23a2Schristos	* coff64-rs6000.c (_bfd_xcoff64_swap_aux_in)
933377e23a2Schristos	(_bfd_xcoff64_swap_aux_out): Rename arguments class to in_class.
934377e23a2Schristos	* coffcode.h (coff_pointerize_aux_hook): Rename variable class
935377e23a2Schristos	to n_sclass.
936377e23a2Schristos	* coffgen.c (coff_write_symbol, coff_pointerize_aux): Rename
937377e23a2Schristos	variables named class to n_sclass. (coff_write_symbols): Rename
938377e23a2Schristos	variable class to sym_class. (bfd_coff_set_symbol_class): Rename
939377e23a2Schristos	argument class to symbol_class.
940377e23a2Schristos	* cofflink.c (_bfd_coff_link_hash_newfunc)
941377e23a2Schristos	(coff_link_add_symbols, _bfd_coff_link_input_bfd)
942377e23a2Schristos	(_bfd_coff_write_global_sym, _bfd_coff_generic_relocate_section):
943377e23a2Schristos	Update code to use renamed members.
944377e23a2Schristos	* coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Rename
945377e23a2Schristos	argument class to in_class.
946377e23a2Schristos	* libcoff-in.h (struct coff_link_hash_entry, struct
947377e23a2Schristos	coff_debug_merge_type) Renamed members class to symbol_class and
948377e23a2Schristos	type_class.
949377e23a2Schristos	* libcoff.h Regenerated.
950377e23a2Schristos	* peXXigen.c: (_bfd_XXi_swap_aux_in, _bfd_XXi_swap_aux_out):
951377e23a2Schristos	Rename argument class to in_class.
952377e23a2Schristos	* pef.c (bfd_pef_parse_imported_symbol): Update code to use
953377e23a2Schristos	renamed members.
954377e23a2Schristos	* pef.h (struct bfd_pef_imported_symbol): Changed name of
955377e23a2Schristos	member class to symbol_class.
956377e23a2Schristos
957377e23a2Schristos2009-09-04  H.J. Lu  <hongjiu.lu@intel.com>
958377e23a2Schristos
959377e23a2Schristos	* configure: Regenerated.
960377e23a2Schristos
961377e23a2Schristos2009-09-04  Tristan Gingold  <gingold@adacore.com>
962377e23a2Schristos
963377e23a2Schristos	* configure.in: Bump version to 2.20.51
964377e23a2Schristos
965377e23a2Schristos2009-09-04  Alan Modra  <amodra@bigpond.net.au>
966377e23a2Schristos
967377e23a2Schristos	* elf32-spu.c (spu_elf_relocate_section): Correct 2009-07-24 logic.
968377e23a2Schristos
969377e23a2Schristos2009-09-04  Jie Zhang  <jie.zhang@analog.com>
970377e23a2Schristos
971377e23a2Schristos	* elf32-bfin.c (elf32_bfinfdpic_create_dynamic_sections): Always
972377e23a2Schristos	create .rela.bss.
973377e23a2Schristos	(elf32_bfinfdpic_size_dynamic_sections): Set SEC_EXCLUDE flag
974377e23a2Schristos	for empty .rela.bss and .rel.plt sections.
975377e23a2Schristos
976377e23a2Schristos2009-09-03  Adam Nemet  <anemet@caviumnetworks.com>
977377e23a2Schristos
978377e23a2Schristos	* elfxx-mips.c (mips_elf_calculate_relocation): Don't relocate
979377e23a2Schristos	R_MIPS_JALR unless symbol resolves locally.
980377e23a2Schristos
981377e23a2Schristos2009-09-03  Adam Nemet  <anemet@caviumnetworks.com>
982377e23a2Schristos
983377e23a2Schristos	* elfxx-mips.c (_bfd_mips_elf_check_relocs): Don't set
984377e23a2Schristos	has_static_relocs for R_MIPS_JALR.
985377e23a2Schristos
986377e23a2Schristos2009-09-03  Maciej W. Rozycki  <macro@codesourcery.com>
987377e23a2Schristos
988377e23a2Schristos	* elf64-mips.c (mips_elf64_howto_table_rela): Add support for
989377e23a2Schristos	R_MIPS_TLS_DTPMOD64 and R_MIPS_TLS_TPREL64, replacing the
990377e23a2Schristos	respective stubs.
991377e23a2Schristos
992377e23a2Schristos2009-09-01  H.J. Lu  <hongjiu.lu@intel.com>
993377e23a2Schristos
994377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Declare
995377e23a2Schristos	plt earlier.
996377e23a2Schristos
997377e23a2Schristos2009-09-01  Tristan Gingold  <gingold@adacore.com>
998377e23a2Schristos
999377e23a2Schristos	* makefile.vms: Ported to Itanium VMS.  Remove useless variable and
1000377e23a2Schristos	dependencies.  Reindent.
1001377e23a2Schristos	* configure.com: Ported to Itanium VMS.  Now generates a build.com
1002377e23a2Schristos	to build without make.  Add messages but make edit silent.
1003377e23a2Schristos	* hosts/alphavms.h: Add a prototype for stpcpy.
1004377e23a2Schristos	* vms.c: Add a missing include for Alpha VMS.
1005377e23a2Schristos	* elfxx-ia64.c (ELF_OSABI): Define for OpenVMS.
1006377e23a2Schristos
1007377e23a2Schristos2009-08-31  Jan Beulich  <jbeulich@novell.com>
1008377e23a2Schristos
1009377e23a2Schristos	* elf-bfd.h (bfd_elf_get_default_section_type): Declare.
1010377e23a2Schristos	* elf.c (bfd_elf_get_default_section_type): New.
1011377e23a2Schristos	(elf_fake_sections): Use bfd_elf_get_default_section_type.
1012377e23a2Schristos
1013377e23a2Schristos2009-08-30  H.J. Lu  <hongjiu.lu@intel.com>
1014377e23a2Schristos
1015377e23a2Schristos	* elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert the
1016377e23a2Schristos	accidental checkin.
1017377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Likwise.
1018377e23a2Schristos
1019377e23a2Schristos2009-08-30  Alan Modra  <amodra@bigpond.net.au>
1020377e23a2Schristos
1021377e23a2Schristos	PR ld/10569
1022377e23a2Schristos	* bfd.c (bfd_emul_get_maxpagesize): Don't abort.
1023377e23a2Schristos	(bfd_emul_get_commonpagesize): Likewise.
1024377e23a2Schristos
1025377e23a2Schristos2009-08-29  Martin Thuresson  <martin@mtme.org>
1026377e23a2Schristos
1027377e23a2Schristos	* elf32-arm.c (struct stub_def): Rename member template to
1028377e23a2Schristos	template_sequence. (arm_build_one_stub,
1029377e23a2Schristos	find_stub_size_and_template, arm_size_one_stub, arm_map_one_stub):
1030377e23a2Schristos	Rename variable template to template_sequence.
1031377e23a2Schristos	* elfxx-ia64.c (elfNN_ia64_relax_br, elfNN_ia64_relax_brl):
1032377e23a2Schristos	Rename variable template to template_val.
1033377e23a2Schristos	* aoutx.h (NAME (aout, make_empty_symbol)): Rename variable
1034377e23a2Schristos	new to new_symbol.
1035377e23a2Schristos	* coffgen.c (coff_make_empty_symbol)
1036377e23a2Schristos	(coff_bfd_make_debug_symbol): Rename variable new to new_symbol.
1037377e23a2Schristos	* cpu-ia64-opc.c (ext_reg, ins_imms_scaled): Rename variable
1038377e23a2Schristos	new to new_insn.
1039377e23a2Schristos	* ecoff.c (_bfd_ecoff_make_empty_symbol): Rename variable new
1040377e23a2Schristos	to new_symbol.
1041377e23a2Schristos	* elf32-m68k.c (elf_m68k_get_got_entry_type): Rename argument
1042377e23a2Schristos	new to new_reloc.
1043377e23a2Schristos	* hash.c (bfd_hash_lookup): Rename variable new to new_string.
1044377e23a2Schristos	* ieee.c (ieee_make_empty_symbol): Rename variable new to
1045377e23a2Schristos	new_symbol.
1046377e23a2Schristos	* linker.c (bfd_new_link_order): Rename variable new to
1047377e23a2Schristos	new_lo.
1048377e23a2Schristos	* mach-o.c (bfd_mach_o_sizeof_headers): Rename variable new to
1049377e23a2Schristos	symbol.
1050377e23a2Schristos	* oasys.c (oasys_make_empty_symbol): Rename variable new to
1051377e23a2Schristos	new_symbol_type.
1052377e23a2Schristos	* pdp11.c (NAME (aout, make_empty_symbol)): Rename variable
1053377e23a2Schristos	new to new_symbol_type.
1054377e23a2Schristos	* plugin.c (bfd_plugin_make_empty_symbol): Rename variable new
1055377e23a2Schristos	to new_symbol.
1056377e23a2Schristos	* rs6000-core.c (CoreHdr, VmInfo): Rename union member new to
1057377e23a2Schristos	new_dump.
1058377e23a2Schristos	(read_hdr, rs6000coff_core_p)
1059377e23a2Schristos	(rs6000coff_core_file_matches_executable_p)
1060377e23a2Schristos	(rs6000coff_core_file_failing_command)
1061377e23a2Schristos	(rs6000coff_core_file_failing_signal): Updated function to use new
1062377e23a2Schristos	union member name.
1063377e23a2Schristos	* som.c (som_make_empty_symbol): Rename variable new to
1064377e23a2Schristos	new_symbol_type.
1065377e23a2Schristos	* syms.c (_bfd_generic_make_empty_symbol): Rename variable new
1066377e23a2Schristos	to new_symbol.
1067377e23a2Schristos	* tekhex.c (first_phase, tekhex_make_empty_symbol): Rename
1068377e23a2Schristos	variable new to new_symbol.
1069377e23a2Schristos
1070377e23a2Schristos2009-08-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1071377e23a2Schristos
1072377e23a2Schristos	* acinclude.m4 (AM_INSTALL_LIBBFD): Call AM_SUBST_NOTMAKE for
1073377e23a2Schristos	bfdlibdir and bfdincludedir.
1074377e23a2Schristos	* Makefile.am (bfdlibdir, bfdincludedir): Move definition ...
1075377e23a2Schristos	[INSTALL_LIBBFD]: ... here, ...
1076377e23a2Schristos	[INSTALL_LIBBFD]: ... and empty overrides here.
1077377e23a2Schristos	[!INSTALL_LIBBFD]: (rpath_bfdlibdir): New variable.
1078377e23a2Schristos	[!INSTALL_LIBBFD] (libbfd_la_LDFLAGS): Use it.
1079377e23a2Schristos	* Makefile.in: Regenerate.
1080377e23a2Schristos	* configure: Regenerate.
1081377e23a2Schristos
1082377e23a2Schristos2009-08-26  Maxim Kuvyrkov  <maxim@codesourcery.com>
1083377e23a2Schristos
1084377e23a2Schristos	* elf32-m68k.c: Rewrite initialization of GOT entries for TLS
1085377e23a2Schristos	relocations.  Rewrite output of dynamic TLS relocations.
1086377e23a2Schristos	(DTP_OFFSET, TP_OFFSET): New constants.
1087377e23a2Schristos	(dtpoff_base): Update.
1088377e23a2Schristos	(tpoff): Rename to tpoff_base, update.
1089377e23a2Schristos	(elf_m68k_init_got_entry_static, elf_m68k_init_got_entry_local_shared):
1090377e23a2Schristos	New functions.  Move code from elf_m68k_relocate_section here.
1091377e23a2Schristos	(elf_m68k_relocate_section): Update.
1092377e23a2Schristos	(elf_m68k_finish_dynamic_symbol): Fix handling of local TLS symbols.
1093377e23a2Schristos
1094377e23a2Schristos2009-08-26  Maxim Kuvyrkov  <maxim@codesourcery.com>
1095377e23a2Schristos
1096377e23a2Schristos	* elf32-m68k.c (elf_m68k_copy_indirect_symbol): Propagate
1097377e23a2Schristos	non_got_ref value.
1098377e23a2Schristos	(elf_m68k_check_relocs): Handle dynamic TLS relocations.
1099377e23a2Schristos	Handle non_got_ref field.
1100377e23a2Schristos	(elf_m68k_adjust_dynamic_symbol): Handle non_got_ref field.
1101377e23a2Schristos
1102377e23a2Schristos2009-08-26  Alan Modra  <amodra@bigpond.net.au>
1103377e23a2Schristos
1104377e23a2Schristos	PR ld/10518
1105377e23a2Schristos	* linker.c (bfd_find_version_for_sym): Revert warning.
1106377e23a2Schristos
1107377e23a2Schristos2009-08-26  Alan Modra  <amodra@bigpond.net.au>
1108377e23a2Schristos
1109377e23a2Schristos	PR ld/10518
1110377e23a2Schristos	* linker.c (bfd_find_version_for_sym): Override a "*" match by any
1111377e23a2Schristos	other wildcard match.  Warn on multiple wildcard matches.
1112377e23a2Schristos
1113377e23a2Schristos2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1114377e23a2Schristos
1115377e23a2Schristos	* Makefile.am (libbfd_la_LDFLAGS): Initialize early, to allow
1116377e23a2Schristos	appending.
1117377e23a2Schristos	[INSTALL_LIBBFD] (bfdlib_LTLIBRARIES, bfdinclude_HEADERS): Set
1118377e23a2Schristos	only in this condition.
1119377e23a2Schristos	[!INSTALL_LIBBFD] (noinst_LTLIBRARIES, libbfd_la_LDFLAGS): New,
1120377e23a2Schristos	to build but not install libbfd.la in this condition.
1121377e23a2Schristos	(install-bfdlibLTLIBRARIES, uninstall-bfdlibLTLIBRARIES)
1122377e23a2Schristos	(install_libbfd, install_libbfd): Remove.
1123377e23a2Schristos	* Makefile.in: Regenerate.
1124377e23a2Schristos	* doc/Makefile.am (AM_CPPFLAGS): Renamed from ...
1125377e23a2Schristos	(INCLUDES): ... this.
1126377e23a2Schristos	($(MKDOC)): Adjust.
1127377e23a2Schristos	* doc/Makefile.in: Regenerate.
1128377e23a2Schristos
1129377e23a2Schristos	* Makefile.am (AUTOMAKE_OPTIONS): Remove cygnus, instead use
1130377e23a2Schristos	no-dist and foreign.
1131377e23a2Schristos	(EXTRA_libbfd_la_SOURCES): New, list $(CFILES) to allow
1132377e23a2Schristos	dependency tracking to work for them.
1133377e23a2Schristos	(targets.lo, archures.lo, dwarf.lo): Rewrite to
1134377e23a2Schristos	use automake dependency tracking mechanism.
1135377e23a2Schristos	(MKDEP, DEP, DEP1, dep.sed, dep, dep-in, dep-am): Remove.
1136377e23a2Schristos	(mkdep section): Remove.
1137377e23a2Schristos	(BUILT_SOURCES): New, list $(BUILD_HFILES).
1138377e23a2Schristos	* Makefile.in: Regenerate.
1139377e23a2Schristos	* po/SRC-POTFILES.in, po/bfd.pot: Regenerate.
1140377e23a2Schristos
1141377e23a2Schristos	* Makefile.am (datarootdir, docdir, htmldor, pdfdir)
1142377e23a2Schristos	(install-pdf, install-pdf-recursive, install-html)
1143377e23a2Schristos	(install-html-recursive): Remove.
1144377e23a2Schristos	* Makefile.in: Regenerate.
1145377e23a2Schristos
1146377e23a2Schristos	* Makefile.in: Regenerate.
1147377e23a2Schristos	* aclocal.m4: Likewise.
1148377e23a2Schristos	* config.in: Likewise.
1149377e23a2Schristos	* configure: Likewise.
1150377e23a2Schristos
1151377e23a2Schristos2009-08-21  Daniel Gutson  <dgutson@codesourcery.com>
1152377e23a2Schristos
1153377e23a2Schristos	* elf32-arm.c (arch_has_thumb2_nop): New function.
1154377e23a2Schristos	(arch_has_arm_nop): New function.
1155377e23a2Schristos	(elf32_arm_final_link_relocate): NOP opcodes changed.
1156377e23a2Schristos
1157377e23a2Schristos2009-08-16  Doug Evans  <dje@google.com>
1158377e23a2Schristos
1159377e23a2Schristos	* opncls.c (bfd_close): Until BFD_IN_MEMORY has an iovec,
1160377e23a2Schristos	at least don't leak memory.
1161377e23a2Schristos
1162377e23a2Schristos2009-08-13  DJ Delorie  <dj@redhat.com>
1163377e23a2Schristos
1164377e23a2Schristos	* elf32-m32c.c (m32c_elf_relax_delete_bytes): Adjust symbol sizes
1165377e23a2Schristos	if needed.
1166377e23a2Schristos
1167377e23a2Schristos2009-08-12  Nick Clifton  <nickc@redhat.com>
1168377e23a2Schristos
1169377e23a2Schristos	* po/fi.po: Updated Finnish translation.
1170377e23a2Schristos
1171377e23a2Schristos2009-08-11  Bernd Schmidt  <bernd.schmidt@analog.com>
1172377e23a2Schristos
1173377e23a2Schristos	Merge some FRV FDPIC changes into the Blackfin code.
1174377e23a2Schristos	* elf32-bfin.c (struct bfinfdpic_elf_link_hash_table): Add pointer to
1175377e23a2Schristos	summary reloc information.
1176377e23a2Schristos	(bfinfdpic_dynamic_got_plt_info): New.
1177377e23a2Schristos	(_bfin_create_got_section): Create the PLT section here.
1178377e23a2Schristos	(elf32_bfinfdpic_create_dynamic_sections): Not here.
1179377e23a2Schristos	(_bfinfdpic_count_nontls_entries): Move out of...
1180377e23a2Schristos	(_bfinfdpic_count_got_plt_entries): ... here.
1181377e23a2Schristos	(_bfinfdpic_count_relocs_fixups): Likewise.
1182377e23a2Schristos	(_bfinfdpic_reset_got_plt_entries): New.
1183377e23a2Schristos	(_bfinfdpic_size_got_plt): Move out of...
1184377e23a2Schristos	(elf32_bfinfdpic_size_dynamic_sections): ... here.
1185377e23a2Schristos	(bfinfdpic_relocate_section): Be careful not to call
1186377e23a2Schristos	_bfinfdpic_add_rofixup or _bfinfdpic_add_dyn_reloc for deleted relocs.
1187377e23a2Schristos	(bfinfdpic_check_discarded_relocs, bfinfdpic_elf_discard_info):
1188377e23a2Schristos	New functions.
1189377e23a2Schristos	(elf_backend_discard_info): Define for FD-PIC.
1190377e23a2Schristos
1191377e23a2Schristos2009-08-11  Alan Modra  <amodra@bigpond.net.au>
1192377e23a2Schristos
1193377e23a2Schristos	* elflink.c: Add FIXMEs for some places that require octets_per_byte
1194377e23a2Schristos	adjustments.
1195377e23a2Schristos	* elf-eh-frame.c: Likewise.
1196377e23a2Schristos	* merge.c: Likewise.
1197377e23a2Schristos
1198377e23a2Schristos2009-08-11  Alan Modra  <amodra@bigpond.net.au>
1199377e23a2Schristos
1200377e23a2Schristos	* configure.in:  Remove elf-ifunc.lo from common ELF files.  Add
1201377e23a2Schristos	to x86 and x86_64 configurations.
1202377e23a2Schristos	* configure: Regenerate.
1203377e23a2Schristos
1204377e23a2Schristos2009-08-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1205377e23a2Schristos
1206377e23a2Schristos	Stop using bfd_usrdata in libbfd.
1207377e23a2Schristos	* coff-stgo32.c (bfd_coff_go32stub): Remove.
1208377e23a2Schristos	(stub_bytes, comment): Replace STUBSIZE by GO32_STUBSIZE.
1209377e23a2Schristos	(adjust_filehdr_in_post): Declare the abfd parameter as unused.
1210377e23a2Schristos	Replace STUBSIZE by GO32_STUBSIZE.  Save now the stub in
1211377e23a2Schristos	filehdr_dst->u.go32.stub.  New comment with the reason.
1212377e23a2Schristos	(adjust_filehdr_out_pre): Replace STUBSIZE by GO32_STUBSIZE.
1213377e23a2Schristos	Substitute the removed macro bfd_coff_go32stub.
1214377e23a2Schristos	(adjust_filehdr_out_post, adjust_scnhdr_in_post, adjust_scnhdr_out_pre)
1215377e23a2Schristos	(adjust_scnhdr_out_post, adjust_aux_in_post, adjust_aux_out_pre)
1216377e23a2Schristos	(adjust_aux_out_post): Replace STUBSIZE by GO32_STUBSIZE.
1217377e23a2Schristos	(create_go32_stub, go32_stubbed_coff_bfd_copy_private_bfd_data):
1218377e23a2Schristos	Replace STUBSIZE by GO32_STUBSIZE.  Substitute the removed macro
1219377e23a2Schristos	bfd_coff_go32stub.
1220377e23a2Schristos	* coffcode.h (coff_mkobject_hook): Initialize coff->go32stub.
1221377e23a2Schristos	* libcoff-in.h (coff_data_type): New field go32stub.
1222377e23a2Schristos	* libcoff.h: Regenerated.
1223377e23a2Schristos
1224377e23a2Schristos2009-08-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1225377e23a2Schristos
1226377e23a2Schristos	Fix go32 stub preservation by objcopy.
1227377e23a2Schristos	* coff-stgo32.c (adjust_filehdr_in_post): Use bfd_malloc.
1228377e23a2Schristos	(go32_stubbed_coff_bfd_copy_private_bfd_data): Optionally allocate OBFD
1229377e23a2Schristos	go32stub.
1230377e23a2Schristos
1231377e23a2Schristos2009-08-10  Nathan Sidwell  <nathan@codesourcery.com>
1232377e23a2Schristos
1233377e23a2Schristos	* elf32-arm.c (elf32_arm_size_stubs): Don't die on undefined local
1234377e23a2Schristos	symbols.
1235377e23a2Schristos	(elf32_arm_final_link_relocate): Treat local undefined symbols the
1236377e23a2Schristos	same as global undefined symbols.
1237377e23a2Schristos	(elf32_arm_relocate_section): Give an error for local undefined
1238377e23a2Schristos	non-weak symbols, unless the reloc will not use the symbol.
1239377e23a2Schristos
1240377e23a2Schristos2009-08-10  Nathan Sidwell  <nathan@codesourcery.com>
1241377e23a2Schristos
1242377e23a2Schristos	* elf32-ppc.c (shared_stub_entry, stub_entry): Use r12, not r11.
1243377e23a2Schristos	(ppc_elf_relax_section): Use symbol index to distinguish
1244377e23a2Schristos	relocatable stubs.
1245377e23a2Schristos
1246377e23a2Schristos2009-08-10  Alan Modra  <amodra@bigpond.net.au>
1247377e23a2Schristos
1248377e23a2Schristos	* elf32-ppc.c (ppc_elf_relax_section): Ignore non-code sections.
1249377e23a2Schristos
1250377e23a2Schristos2009-08-10  Alan Modra  <amodra@bigpond.net.au>
1251377e23a2Schristos
1252377e23a2Schristos	* elflink.c (_bfd_elf_adjust_dynamic_symbol): Don't clear plt
1253377e23a2Schristos	info for STT_GNU_IFUNC.
1254377e23a2Schristos	* elf32-ppc.c (ppc_elf_check_relocs): Count a needed plt entry
1255377e23a2Schristos	on got refs in case the symbol turns out to be ifunc.
1256377e23a2Schristos	(ppc_elf_gc_sweep_hook): Similarly.
1257377e23a2Schristos	(ppc_elf_adjust_dynamic_symbol): Adjust assertion.
1258377e23a2Schristos	(allocate_dynrelocs): Don't specially allocate got relocs for ifunc.
1259377e23a2Schristos	(ppc_elf_size_dynamic_sections): Likewise.
1260377e23a2Schristos	(ppc_elf_relocate_section): Likewise.
1261377e23a2Schristos
1262377e23a2Schristos2009-08-09  Bernd Schmidt  <bernd.schmidt@analog.com>
1263377e23a2Schristos
1264377e23a2Schristos	From Mike Frysinger <michael.frysinger@analog.com>
1265377e23a2Schristos	* elf32-bfin.c (bfin_howto_table, bfin_reloc_map, bfin_check_relocs,
1266377e23a2Schristos	bfin_final_link_relocate, bfin_relocate_section, bfin_gc_sweep_hook,
1267377e23a2Schristos	_bfinfdpic_emit_got_relocs_plt_entries, bfinfdpic_relocate_section,
1268377e23a2Schristos	bfinfdpic_gc_sweep_hook, bfinfdpic_check_relocs,
1269377e23a2Schristos	bfin_finish_dynamic_symbol, bfd_bfin_elf32_create_embedded_relocs):
1270377e23a2Schristos	Adjust to match the renamed reloc definitions.
1271377e23a2Schristos
1272377e23a2Schristos2009-08-08  Alan Modra  <amodra@bigpond.net.au>
1273377e23a2Schristos
1274377e23a2Schristos	PR 10494
1275377e23a2Schristos	* elf.c (_bfd_elf_make_section_from_shdr): When setting up section
1276377e23a2Schristos	LMAs, use ELF_IS_SECTION_IN_SEGMENT to match sections with headers.
1277377e23a2Schristos
1278377e23a2Schristos2009-08-07  Tom Tromey  <tromey@redhat.com>
1279377e23a2Schristos
1280377e23a2Schristos	* elf32-microblaze.c (microblaze_elf_check_relocs): Avoid strict
1281377e23a2Schristos	aliasing error.
1282377e23a2Schristos
1283377e23a2Schristos2009-08-06  Michael Eager <eager@eagercon.com>
1284377e23a2Schristos
1285377e23a2Schristos	* Makefile.am: Add cpu-microblaze.{lo,c}, elf32-microblaze.{lo,c}.
1286377e23a2Schristos	* Makefile.in: Regenerate.
1287377e23a2Schristos	* archures.c: Add bfd_arch_microblaze.
1288377e23a2Schristos	* bfd-in2.h: Regenerate.
1289377e23a2Schristos	* config.bfd: Add microblaze target.
1290377e23a2Schristos	* configure.in: Add bfd_elf32_microblaze_vec target.
1291377e23a2Schristos	* configure: Regenerate.
1292377e23a2Schristos	* cpu-microblaze.c: New.
1293377e23a2Schristos	* elf32-microblaze.c: New.
1294377e23a2Schristos	* libbfd-in.h: Add prototype _bfd_dwarf2_fixup_section_debug_loc().
1295377e23a2Schristos	* libbfd.h: Regenerate.
1296377e23a2Schristos	* reloc.c: Add MICROBLAZE relocations.
1297377e23a2Schristos	* section.c: Add struct relax_table and relax_count to section.
1298377e23a2Schristos	* targets.c: Add bfd_elf32_microblaze_vec.
1299377e23a2Schristos
1300377e23a2Schristos2009-08-06  Jakub Jelinek  <jakub@redhat.com>
1301377e23a2Schristos	    Alan Modra  <amodra@bigpond.net.au>
1302377e23a2Schristos
1303377e23a2Schristos	PR binutils/10492
1304377e23a2Schristos	* elf.c (sym_is_global): Return true even for BSF_GNU_UNIQUE
1305377e23a2Schristos	symbols.
1306377e23a2Schristos	* elf32-mips.c (mips_elf_sym_is_global): Likewise.
1307377e23a2Schristos	* elfn32-mips.c (mips_elf_sym_is_global): Likewise.
1308377e23a2Schristos
1309377e23a2Schristos2009-08-06  Nathan Sidwell  <nathan@codesourcery.com>
1310377e23a2Schristos
1311377e23a2Schristos	* elf32-arm.c (elf32_arm_size_stubs): Call layout_sections_again
1312377e23a2Schristos	at least once when fixing cortex-a8.
1313377e23a2Schristos
1314377e23a2Schristos2009-08-05  Chao-ying Fu  <fu@mips.com>
1315377e23a2Schristos
1316377e23a2Schristos	* elf32-mips.c (mips_reloc_map): Add BFD_RELOC_MIPS_JALR.
1317377e23a2Schristos	* elfxx-mips.c (JAL_TO_BAL_P): New define to transform JAL to BAL
1318377e23a2Schristos	for CPUs.  It is true for RM9000.
1319377e23a2Schristos	(JALR_TO_BAL_P): New define to transform JALR to BAL.  It is true
1320377e23a2Schristos	for all CPUs.
1321377e23a2Schristos	(mips_elf_perform_relocation): Use JAL_TO_BAL_P and JALR_TO_BAL_P
1322377e23a2Schristos	to guard the transformation.
1323377e23a2Schristos
1324377e23a2Schristos2009-08-05  Trevor Smigiel  <Trevor_Smigiel@playstation.sony.com>
1325377e23a2Schristos
1326377e23a2Schristos	* elf32-spu.h (spu_elf_params): Add member emit_fixups.
1327377e23a2Schristos	(spu_elf_size_sections): Declare prototype.
1328377e23a2Schristos	* elf32-spu.c (spu_link_hash_table): Add member sfixup.
1329377e23a2Schristos	(FIXUP_RECORD_SIZE, FIXUP_GET, FIXUP_PUT): New macros.
1330377e23a2Schristos	(spu_elf_emit_fixup): New function.
1331377e23a2Schristos	(spu_elf_relocate_section): Emit fixup for each SPU_ADDR32.
1332377e23a2Schristos	(spu_elf_size_sections): New function.
1333377e23a2Schristos
1334377e23a2Schristos2009-08-05  Nathan Sidwell  <nathan@codesourcery.com>
1335377e23a2Schristos
1336377e23a2Schristos	* elf32-arm.c (elf32_arm_stub_type): Add arm_stub_a8_veneer_lwm.
1337377e23a2Schristos	(arm_build_one_stub): Build a8 veneers as a separate pass.
1338377e23a2Schristos	(cortex_a8_erratum_scan): Add prev_num_a8_fixes and stub_changed_p
1339377e23a2Schristos	parameters.  Use them to check if we create a different a8 fixup
1340377e23a2Schristos	than the previous pass.
1341377e23a2Schristos	(elf32_arm_size_stubs): Move scope of stub_changed and
1342377e23a2Schristos	prev_num_a8_fixes into main loop.
1343377e23a2Schristos	(elf32_arm_build_stubs): Build a8 veneers in a second pass.
1344377e23a2Schristos
1345377e23a2Schristos2009-08-04  Alan Modra  <amodra@bigpond.net.au>
1346377e23a2Schristos
1347377e23a2Schristos	* elf32-ppc.c (ppc_elf_relax_section): Correct conditions under
1348377e23a2Schristos	which find_plt_ent is called.  Delete redundant code.
1349377e23a2Schristos
1350377e23a2Schristos2009-08-03  H.J. Lu  <hongjiu.lu@intel.com>
1351377e23a2Schristos
1352377e23a2Schristos	PR binutils/10363
1353377e23a2Schristos	* elf.c (bfd_elf_string_from_elf_section): Return NULL on
1354377e23a2Schristos	invalid string offset.
1355377e23a2Schristos
1356377e23a2Schristos2009-08-03  H.J. Lu  <hongjiu.lu@intel.com>
1357377e23a2Schristos
1358377e23a2Schristos	PR ld/10433
1359377e23a2Schristos	* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Set got
1360377e23a2Schristos	to htab->init_got_offset and plt to htab->init_plt_offset
1361377e23a2Schristos	when discarding space for dynamic relocations.
1362377e23a2Schristos
1363377e23a2Schristos2009-08-03  Alan Modra  <amodra@bigpond.net.au>
1364377e23a2Schristos
1365377e23a2Schristos	* elf32-ppc.c (struct plt_entry): Revise comments.
1366377e23a2Schristos	(ppc_elf_check_relocs): Don't create needless plt_entry info
1367377e23a2Schristos	for non-pie executables.  Don't test info->pie when info->shared
1368377e23a2Schristos	already covers that case.
1369377e23a2Schristos	(ppc_elf_gc_sweep_hook): Adjust for above change.
1370377e23a2Schristos	(add_stub_sym): Don't test info->pie when info->shared tested.
1371377e23a2Schristos	(allocate_dynrelocs, ppc_elf_size_dynamic_sections): Likewise.
1372377e23a2Schristos	(write_glink_stub, ppc_elf_finish_dynamic_symbol): Likewise.
1373377e23a2Schristos	(ppc_elf_relax_section): Adjust find_plt_ent arguments.
1374377e23a2Schristos	(ppc_elf_relocate_section): Likewise.
1375377e23a2Schristos
1376377e23a2Schristos2009-08-03  Alan Modra  <amodra@bigpond.net.au>
1377377e23a2Schristos
1378377e23a2Schristos	* elf32-ppc.c (ppc_elf_check_relocs): Always add a plt ref count
1379377e23a2Schristos	for local ifunc symbols in non-pie executables, regardless of
1380377e23a2Schristos	reloc type.  Don't specially create ifunc dyn relocs.  Tidy ifunc
1381377e23a2Schristos	code so that it's obvious that we only do anything special for
1382377e23a2Schristos	local ifunc syms.
1383377e23a2Schristos	(ppc_elf_gc_sweep_hook): Adjust to suit check_relocs changes.
1384377e23a2Schristos	(allocate_dynrelocs): Correct comment for syms defined in plt.
1385377e23a2Schristos	Don't specially allocate ifunc dyn relocs.
1386377e23a2Schristos	(ppc_elf_relax_section): Relax branches to ifunc plt entries too.
1387377e23a2Schristos	(ppc_elf_relocate_section): Set "relocation" value for ifunc
1388377e23a2Schristos	syms in non-pie executables.  No specially allocated dyn relocs
1389377e23a2Schristos	for ifunc to write.  Allow for local sym on R_PPC_RELAX32_PLT.
1390377e23a2Schristos	(ppc_elf_finish_dynamic_symbol): Set value of ifunc symbols in
1391377e23a2Schristos	a non-pie executable.
1392377e23a2Schristos
1393377e23a2Schristos2009-08-02  H.J. Lu  <hongjiu.lu@intel.com>
1394377e23a2Schristos	    Jakub Jelinek  <jakub@redhat.com>
1395377e23a2Schristos
1396377e23a2Schristos	PR ld/6443
1397377e23a2Schristos	* elf32-i386.c (elf_i386_tls_transition): Check executable
1398377e23a2Schristos	instead of shared for TLS when building PIE.
1399377e23a2Schristos	(elf_i386_check_relocs): Likewise.
1400377e23a2Schristos	(elf_i386_allocate_dynrelocs): Likewise.
1401377e23a2Schristos	(elf_i386_relocate_section): Likewise.
1402377e23a2Schristos
1403377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_tls_transition): Check executable
1404377e23a2Schristos	instead of shared for TLS when building PIE.
1405377e23a2Schristos	(elf64_x86_64_check_relocs): Likewise.
1406377e23a2Schristos	(elf64_x86_64_allocate_dynrelocs): Likewise.
1407377e23a2Schristos	(elf64_x86_64_relocate_section): Likewise.
1408377e23a2Schristos
1409377e23a2Schristos2009-07-31  Anthony Green  <green@moxielogic.com>
1410377e23a2Schristos
1411377e23a2Schristos	* config.bfd (targ_cpu): Add moxie-uclinux support.
1412377e23a2Schristos
1413377e23a2Schristos2009-07-31  Hans-Peter Nilsson  <hp@bitrange.com>
1414377e23a2Schristos
1415377e23a2Schristos	* linker.c (fix_syms): Consider SEC_LOAD when choosing section.
1416377e23a2Schristos
1417377e23a2Schristos2009-07-30  Alan Modra  <amodra@bigpond.net.au>
1418377e23a2Schristos
1419377e23a2Schristos	* elf32-ppc.c (ppc_elf_check_relocs): Always set up sections
1420377e23a2Schristos	used by indirect function support.  Count dynamic relocs for
1421377e23a2Schristos	ifunc syms.
1422377e23a2Schristos	(ppc_elf_adjust_dynamic_symbol): Tweak for ifunc.
1423377e23a2Schristos	(allocate_dynrelocs): Allocate all non-dynamic ifunc plt entries
1424377e23a2Schristos	in iplt and their relocs in reliplt.  Don't make ifunc syms
1425377e23a2Schristos	dynamic.  Allocate got entry relocs for non-dynamic ifunc in
1426377e23a2Schristos	reliplt.  Handle other dynamic relocs for ifunc.
1427377e23a2Schristos	(ppc_elf_size_dynamic_sections): Alloc dyn relocs for static
1428377e23a2Schristos	ifunc in reliplt, likewise relocs for got against local ifunc.
1429377e23a2Schristos	Typo fix on reliplt size adjust.
1430377e23a2Schristos	(ppc_elf_relocate_section): Don't use plt scheme of allocating
1431377e23a2Schristos	relocs 1-1 with entries for iplt, instead just add using
1432377e23a2Schristos	reloc_count.  Write got relocs and dyn relocs for ifunc to reliplt.
1433377e23a2Schristos	Error on invalid ifunc dyn relocs.
1434377e23a2Schristos	(ppc_elf_finish_dynamic_symbol): Adjust for non-dynamic ifunc plt
1435377e23a2Schristos	in iplt/reliplt.
1436377e23a2Schristos	* elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_JMP_IREL,
1437377e23a2Schristos	R_PPC64_REL16, R_PPC64_REL16_LO, R_PPC64_REL16_HI, R_PPC64_REL16_HA.
1438377e23a2Schristos	(ppc64_elf_reloc_type_lookup): Handle new relocs.
1439377e23a2Schristos	(ppc64_elf_check_relocs): Likewise.  Count dyn relocs for ifunc.
1440377e23a2Schristos	(allocate_dynrelocs): As for elf32-ppc.c above.
1441377e23a2Schristos	(ppc64_elf_size_dynamic_sections): Likewise.
1442377e23a2Schristos	(ppc_build_one_stub): Put non-dynamic ifunc plt call stubs in iplt,
1443377e23a2Schristos	and their relocs in reliplt.  Use R_PPC64_JMP_IREL.
1444377e23a2Schristos	(ppc_size_one_stub): Similarly.
1445377e23a2Schristos	(ppc64_elf_relocate_section): As for elf32-ppc.c above.  Handle new
1446377e23a2Schristos	relocs too.
1447377e23a2Schristos	(ppc64_elf_finish_dynamic_symbol): As for elf32-ppc.c above.
1448377e23a2Schristos
1449377e23a2Schristos2009-07-29  Hans-Peter Nilsson  <hp@bitrange.com>
1450377e23a2Schristos
1451377e23a2Schristos	* elf64-mmix.c (mmix_elf_relax_section): Revert 2009-05-27
1452377e23a2Schristos	change.  Add note to head comment.
1453377e23a2Schristos
1454377e23a2Schristos2009-07-28  Jan Beulich  <jbeulich@novell.com>
1455377e23a2Schristos
1456377e23a2Schristos	* archive.c (get_extended_arelt_filename): Remove redundant
1457377e23a2Schristos	range check on index.
1458377e23a2Schristos
1459377e23a2Schristos2009-07-27  Doug Kwan  <dougkwan@google.com>
1460377e23a2Schristos
1461377e23a2Schristos	* elf32-arm.c (stub_hash_newfunc): Initialize field output_name.
1462377e23a2Schristos
1463377e23a2Schristos2009-07-27  H.J. Lu  <hongjiu.lu@intel.com>
1464377e23a2Schristos
1465377e23a2Schristos	* archures.c bfd_*_arch): Sorted.
1466377e23a2Schristos	(bfd_archures_list): Likewise.
1467377e23a2Schristos
1468377e23a2Schristos2009-07-27  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
1469377e23a2Schristos
1470377e23a2Schristos	* elf32-cr16.c (elf_cr16_final_link_relocate): Add code to handle
1471377e23a2Schristos	to R_cr16_NUM32 relocation.
1472377e23a2Schristos
1473377e23a2Schristos2009-07-26  Michael Eager  <eager@eagercon.com>
1474377e23a2Schristos
1475377e23a2Schristos	* archures.c: Add bfd_mach_ppc_405
1476377e23a2Schristos	* bfd-in2.h: Same.
1477377e23a2Schristos
1478377e23a2Schristos2009-07-25  H.J. Lu  <hongjiu.lu@intel.com>
1479377e23a2Schristos
1480377e23a2Schristos	* cpu-i386.c (bfd_x86_64_arch): Fix comment typos.
1481377e23a2Schristos	* cpu-l1om.c (bfd_l1om_arch): Likewise.
1482377e23a2Schristos
1483377e23a2Schristos2009-07-25  H.J. Lu  <hongjiu.lu@intel.com>
1484377e23a2Schristos
1485377e23a2Schristos	* archures.c (bfd_architecture): Add bfd_arch_l1om.
1486377e23a2Schristos	(bfd_l1om_arch): New.
1487377e23a2Schristos	(bfd_archures_list): Add &bfd_l1om_arch.
1488377e23a2Schristos	* bfd-in2.h: Regenerated.
1489377e23a2Schristos
1490377e23a2Schristos	* config.bfd (targ64_selvecs): Add bfd_elf64_l1om_vec if
1491377e23a2Schristos	bfd_elf64_x86_64_vec is supported.  Add bfd_elf64_l1om_freebsd_vec
1492377e23a2Schristos	if bfd_elf64_x86_64_freebsd_vec is supported.
1493377e23a2Schristos	(targ_selvecs): Likewise.
1494377e23a2Schristos
1495377e23a2Schristos	* configure.in: Support bfd_elf64_l1om_vec and
1496377e23a2Schristos	bfd_elf64_l1om_freebsd_vec.
1497377e23a2Schristos	* configure: Regenerated.
1498377e23a2Schristos
1499377e23a2Schristos	* cpu-l1om.c: New.
1500377e23a2Schristos
1501377e23a2Schristos	* elf64-x86-64.c (elf64_l1om_elf_object_p): New.
1502377e23a2Schristos	(bfd_elf64_l1om_vec): Likewise.
1503377e23a2Schristos	(bfd_elf64_l1om_freebsd_vec): Likewise.
1504377e23a2Schristos
1505377e23a2Schristos	* Makefile.am (ALL_MACHINES): Add cpu-l1om.lo.
1506377e23a2Schristos	(ALL_MACHINES_CFILES): Add cpu-l1om.c.
1507377e23a2Schristos	* Makefile.in: Regenerated.
1508377e23a2Schristos
1509377e23a2Schristos	* targets.c (bfd_elf64_l1om_vec): New.
1510377e23a2Schristos	(bfd_elf64_l1om_freebsd_vec): Likewise.
1511377e23a2Schristos	(_bfd_target_vector): Add bfd_elf64_l1om_vec and
1512377e23a2Schristos	bfd_elf64_l1om_freebsd_vec.
1513377e23a2Schristos
1514377e23a2Schristos2009-07-24  Trevor Smigiel  <Trevor_Smigiel@playstation.sony.com>
1515377e23a2Schristos	    Alan Modra  <amodra@bigpond.net.au>
1516377e23a2Schristos
1517377e23a2Schristos	* reloc.c (BFD_RELOC_SPU_ADD_PIC): Define.
1518377e23a2Schristos	* bfd-in2.h: Regenerate.
1519377e23a2Schristos	* libbfd.h: Regenerate.
1520377e23a2Schristos	* elf32-spu.c (elf_howto_table): Add entries SPU_ADD_PIC.
1521377e23a2Schristos	(spu_elf_bfd_to_reloc_type): Handle SPU_ADD_PIC.
1522377e23a2Schristos	(spu_elf_relocate_section): Patch instructions marked by SPU_ADD_PIC.
1523377e23a2Schristos
1524377e23a2Schristos2009-07-23  H.J. Lu  <hongjiu.lu@intel.com>
1525377e23a2Schristos
1526377e23a2Schristos	PR ld/10434
1527377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_check_relocs): Check executable
1528377e23a2Schristos	instead of shared for R_X86_64_TPOFF32.
1529377e23a2Schristos	(elf64_x86_64_relocate_section): Likewise.
1530377e23a2Schristos
1531377e23a2Schristos2009-07-23  Ulrich Drepper  <drepper@redhat.com>
1532377e23a2Schristos
1533377e23a2Schristos	* elf-bfd.h (struct elf_link_hash_entry): Add unique_global field.
1534377e23a2Schristos	* elf.c (swap_out_syms): Set binding to STB_GNU_UNIQUE for symbols
1535377e23a2Schristos	with the BSF_GNU_UNIQUE flag bit set.
1536377e23a2Schristos	* elfcode.h (elf_slurp_symbol_table): Set the BSF_GNU_UNIQUE flag
1537377e23a2Schristos	for symbols with STB_GNU_UNIQUE binding.
1538377e23a2Schristos	* elflink.c (_bfd_elf_merge_symbol): Set unique_global for symbols
1539377e23a2Schristos	with the STB_GNU_UNIQUE binding.
1540377e23a2Schristos	(elf_link_add_object_symbols): Set the BSF_GNU_UNIQUE flag for
1541377e23a2Schristos	symbols with STB_GNU_UNIQUE binding.  Set STB_GNU_UNIQUE for
1542377e23a2Schristos	symbols with the unique_global field set.
1543377e23a2Schristos	(elf_link_output_extsym): Set unique_global field for symbols with
1544377e23a2Schristos	the STB_GNU_UNIQUE binding.
1545377e23a2Schristos	* syms.c (struct bfd_symbol): Define BSF_GNU_UNIQUE flag bit.
1546377e23a2Schristos	(bfd_print_symbol_vandf): Print a 'u' character for BSF_GNU_UNIQUE
1547377e23a2Schristos	symbols.
1548377e23a2Schristos	(bfd_decode_symclass): Return a 'u' character for BSF_GNU_UNIQUE
1549377e23a2Schristos	symbols.
1550377e23a2Schristos	* bfd-in2.h: Regenerate.
1551377e23a2Schristos
1552377e23a2Schristos2009-07-22  H.J. Lu  <hongjiu.lu@intel.com>
1553377e23a2Schristos
1554377e23a2Schristos	* elflink.c (elf_link_output_extsym): Revert the last change.
1555377e23a2Schristos
1556377e23a2Schristos2009-07-22  H.J. Lu  <hongjiu.lu@intel.com>
1557377e23a2Schristos
1558377e23a2Schristos	PR ld/10433
1559377e23a2Schristos	* elflink.c (elf_link_output_extsym): Special case ifunc syms
1560377e23a2Schristos	when ref_regular, not def_regular.
1561377e23a2Schristos
1562377e23a2Schristos2009-07-21  H.J. Lu  <hongjiu.lu@intel.com>
1563377e23a2Schristos
1564377e23a2Schristos	PR ld/10426
1565377e23a2Schristos	* elflink.c (elf_link_add_object_symbols): Turn an IFUNC symbol
1566377e23a2Schristos	from a DSO into a normal FUNC symbol.
1567377e23a2Schristos	(elf_link_output_extsym): Turn an undefined IFUNC symbol into
1568377e23a2Schristos	a normal FUNC symbol.
1569377e23a2Schristos
1570377e23a2Schristos2009-07-17  Chao-ying Fu  <fu@mips.com>
1571377e23a2Schristos
1572377e23a2Schristos	* elfxx-mips.c (LOAD_INTERLOCKS_P): New define.
1573377e23a2Schristos	(_bfd_mips_elf_size_dynamic_sections): For CPUs without load
1574377e23a2Schristos	interlocking, the last PLT entry needs a nop in the branch delay slot.
1575377e23a2Schristos	(_bfd_mips_elf_finish_dynamic_symbol): For CPUs with load itnerlocking,
1576377e23a2Schristos	output the last two PLT entries in reverse order.
1577377e23a2Schristos
1578377e23a2Schristos2009-07-16  H.J. Lu  <hongjiu.lu@intel.com>
1579377e23a2Schristos
1580377e23a2Schristos	* elf32-i386.c (elf_i386_relocate_section): Don't get local
1581377e23a2Schristos	STT_GNU_IFUNC symbol for relocatable link.
1582377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1583377e23a2Schristos
1584377e23a2Schristos2009-07-10  H.J. Lu  <hongjiu.lu@intel.com>
1585377e23a2Schristos
1586377e23a2Schristos	* bfdio.c (bfd_iovec): Add comments for bmmap.
1587377e23a2Schristos	* bfd-in2.h: Regenerated.
1588377e23a2Schristos
1589377e23a2Schristos2009-07-10  H.J. Lu  <hongjiu.lu@intel.com>
1590377e23a2Schristos
1591377e23a2Schristos	* Makefile.am: Run "make dep-am".
1592377e23a2Schristos	* Makefile.in: Regenerated.
1593377e23a2Schristos
1594377e23a2Schristos2009-07-10  Doug Kwan  <dougkwan@google.com>
1595377e23a2Schristos
1596377e23a2Schristos	* elf32-arm.c (stub_hash_newfunc): Initialize fields
1597377e23a2Schristos	target_addend and orig_insn.
1598377e23a2Schristos
1599377e23a2Schristos2009-07-10  Tom Tromey  <tromey@redhat.com>
1600377e23a2Schristos
1601377e23a2Schristos	* Makefile.am (dwarf2.lo): Use dwarf2.h, not elf/dwarf2.h.
1602377e23a2Schristos	(elf-eh-frame.lo): Likewise.
1603377e23a2Schristos	(elf32-bfin.lo): Likewise.
1604377e23a2Schristos	(elf32-frv.lo): Likewise.
1605377e23a2Schristos	(elf32-xc16x.lo): Likewise.
1606377e23a2Schristos	* Makefile.in: Rebuild.
1607377e23a2Schristos	* dwarf2.c: Included dwarf.h, not elf/dwarf2.h.
1608377e23a2Schristos	* elf-eh-frame.c: Likewise.
1609377e23a2Schristos	* elf32-bfin.c: Likewise.
1610377e23a2Schristos	* elf32-frv.c: Likewise.
1611377e23a2Schristos	* elf32-xc16x.c: Likewise.
1612377e23a2Schristos
1613377e23a2Schristos2009-07-10  Julian Brown  <julian@codesourcery.com>
1614377e23a2Schristos
1615377e23a2Schristos	* elf32-arm.c (arm_build_one_stub): Use the hash entry of the
1616377e23a2Schristos	symbol a stub entry is derived from, not the entry for the stub
1617377e23a2Schristos	itself, in call to elf32_arm_final_link_relocate.
1618377e23a2Schristos
1619377e23a2Schristos2009-07-10  H.J. Lu  <hongjiu.lu@intel.com>
1620377e23a2Schristos
1621377e23a2Schristos	* elf.c (_bfd_elf_get_synthetic_symtab): Remove leading zeros
1622377e23a2Schristos	when reporting  addends.
1623377e23a2Schristos
1624377e23a2Schristos2009-07-10  Alan Modra  <amodra@bigpond.net.au>
1625377e23a2Schristos
1626377e23a2Schristos	* elf32-spu.c (spu_elf_size_stubs): Do set up soft-icache manager
1627377e23a2Schristos	data even when no stubs.
1628377e23a2Schristos	(spu_elf_place_overlay_data, spu_elf_build_stubs): Adjust.
1629377e23a2Schristos
1630377e23a2Schristos2009-07-10  Alan Modra  <amodra@bigpond.net.au>
1631377e23a2Schristos
1632377e23a2Schristos	* elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_IRELATIVE.
1633377e23a2Schristos	(ppc_elf_get_synthetic_symtab): Report addend.
1634377e23a2Schristos	(PLT_IFUNC): Define.
1635377e23a2Schristos	(struct ppc_elf_link_hash_table): Add iplt and reliplt.
1636377e23a2Schristos	(ppc_elf_create_glink): New function.
1637377e23a2Schristos	(ppc_elf_create_dynamic_sections): Use it.
1638377e23a2Schristos	(ppc_elf_add_symbol_hook): Set has_ifunc_symbols.
1639377e23a2Schristos	(update_local_sym_info): Allocate space for local_plt array.
1640377e23a2Schristos	Don't bump local_got_refcounts for PLT_IFUNC.  Return local_plt
1641377e23a2Schristos	entry pointer.
1642377e23a2Schristos	(is_branch_reloc): New function.
1643377e23a2Schristos	(ppc_elf_check_relocs): Handle STT_GNU_IFUNC symbols.
1644377e23a2Schristos	(ppc_elf_gc_sweep_hook): Likewise.
1645377e23a2Schristos	(ppc_elf_adjust_dynamic_symbol): Likewise.
1646377e23a2Schristos	(allocate_dynrelocs): Likewise.
1647377e23a2Schristos	(ppc_elf_size_dynamic_sections): Likewise.
1648377e23a2Schristos	(ppc_elf_relocate_section): Likewise.
1649377e23a2Schristos	(branch_reloc_hash_match): Use is_branch_reloc.
1650377e23a2Schristos	(ppc_elf_tls_optimize): Adjust for local_plt.
1651377e23a2Schristos	(write_glink_stub): New function, extracted from..
1652377e23a2Schristos	(ppc_elf_finish_dynamic_symbol): ..here.  Handle STT_GNU_IFUNC.
1653377e23a2Schristos	(ppc_elf_finish_dynamic_sections): Only write plt resolver and
1654377e23a2Schristos	branch table when dynamic.
1655377e23a2Schristos	(elf_backend_post_process_headers): Define.
1656377e23a2Schristos	* elf64-ppc.c (elf_backend_post_process_headers): Define.
1657377e23a2Schristos	(ppc64_elf_howto_raw): Add R_PPC64_IRELATIVE.
1658377e23a2Schristos	(ppc64_elf_get_synthetic_symtab): Report addend.
1659377e23a2Schristos	(struct ppc_stub_hash_entry): Add plt_ent.
1660377e23a2Schristos	(PLT_IFUNC): Define.
1661377e23a2Schristos	(struct ppc_link_hash_table): Add iplt and reliplt.
1662377e23a2Schristos	(create_linkage_sections): Make .iplt and .rela.iplt sections.
1663377e23a2Schristos	(ppc64_elf_add_symbol_hook): Set has_ifunc_symbols.
1664377e23a2Schristos	(update_local_sym_info): Allocate space for local_plt array.
1665377e23a2Schristos	Don't bump local_got_ents for PLT_IFUNC.  Return local_plt
1666377e23a2Schristos	entry pointer.
1667377e23a2Schristos	(update_plt_info): Pass pointer to plt_entry rather than sym hash,
1668377e23a2Schristos	and don't change hash flags here.
1669377e23a2Schristos	(is_branch_reloc): New function.
1670377e23a2Schristos	(ppc64_elf_check_relocs): Handle STT_GNU_IFUNC.
1671377e23a2Schristos	(ppc64_elf_gc_sweep_hook): Likewise.
1672377e23a2Schristos	(ppc64_elf_adjust_dynamic_symbol): Likewise.
1673377e23a2Schristos	(allocate_dynrelocs): Likewise.
1674377e23a2Schristos	(ppc64_elf_size_dynamic_sections): Likewise.
1675377e23a2Schristos	(ppc_build_one_stub, ppc_size_one_stub): Likewise.
1676377e23a2Schristos	(ppc64_elf_size_stubs): Likewise.
1677377e23a2Schristos	(ppc64_elf_relocate_section): Likewise.
1678377e23a2Schristos	(get_sym_h): Adjust for local_plt.
1679377e23a2Schristos	(branch_reloc_hash_match): Use is_branch_reloc.
1680377e23a2Schristos	(ppc_type_of_stub): Pass plt_entry pointer and handle ifunc.
1681377e23a2Schristos	(ppc64_elf_toc): Ignore SEC_EXCLUDE sections.
1682377e23a2Schristos
1683377e23a2Schristos2009-07-10  Alan Modra  <amodra@bigpond.net.au>
1684377e23a2Schristos
1685377e23a2Schristos	* elf.c (_bfd_elf_get_synthetic_symtab): Report addends.
1686377e23a2Schristos
1687377e23a2Schristos2009-07-10  Alan Modra  <amodra@bigpond.net.au>
1688377e23a2Schristos
1689377e23a2Schristos	* elf-bfd.h (struct elf_link_hash_entry): Clarify ref_regular
1690377e23a2Schristos	and ref_regular_nonweak comment.
1691377e23a2Schristos	* elflink.c (elf_link_output_extsym): Special case ifunc syms
1692377e23a2Schristos	when def_regular, not ref_regular.
1693377e23a2Schristos	(elf_link_add_object_symbols): Don't set needs_plt on ifunc syms,..
1694377e23a2Schristos	* elf32-i386.c (elf_i386_check_relocs): ..set it here instead..
1695377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_check_relocs): ..and here.
1696377e23a2Schristos
1697377e23a2Schristos2009-07-09  Alan Modra  <amodra@bigpond.net.au>
1698377e23a2Schristos
1699377e23a2Schristos	* elf32-spu.c (mark_functions_via_relocs): Init broken_cycle field
1700377e23a2Schristos	of malloc'd struct call_info.
1701377e23a2Schristos	(pasted_function): Likewise, priority too.
1702377e23a2Schristos
1703377e23a2Schristos2009-07-07  Alan Modra  <amodra@bigpond.net.au>
1704377e23a2Schristos
1705377e23a2Schristos	* elf32-spu.c (spu_elf_auto_overlay): Take into account section
1706377e23a2Schristos	alignment when packing sections into overlays.
1707377e23a2Schristos
1708377e23a2Schristos2009-07-03  Cary Coutant  <ccoutant@google.com>
1709377e23a2Schristos
1710377e23a2Schristos	* dwarf2.c (decode_line_info): Ignore DW_LNE_set_discriminator.
1711377e23a2Schristos
1712377e23a2Schristos2009-07-03  Dave Korn  <dave.korn.cygwin@gmail.com>
1713377e23a2Schristos
1714377e23a2Schristos	* coffcode.h (sec_to_styp_flags):  Partially revert (functional
1715377e23a2Schristos	changes only) earlier patch:-
1716377e23a2Schristos
1717377e23a2Schristos2009-06-25  Kai Tietz  <kai.tietz@onevision.com>
1718377e23a2Schristos
1719377e23a2Schristos	* coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
1720377e23a2Schristos	give .debug and .reloc data characteristics.
1721377e23a2Schristos	(DOT_RELOC): New define for .reloc section string.
1722377e23a2Schristos	(coff_write_object_contents): Use DOT_RELOC instead of string.
1723377e23a2Schristos
1724377e23a2Schristos2009-07-02  Tom Tromey  <tromey@redhat.com>
1725377e23a2Schristos
1726377e23a2Schristos	* aoutx.h (aout_get_external_symbols): Declare 'amt' locally.
1727377e23a2Schristos	* bfdwin.c (bfd_free_window): Cast to unsigned long.
1728377e23a2Schristos
1729377e23a2Schristos2009-07-01  Nick Clifton  <nickc@redhat.com>
1730377e23a2Schristos
1731377e23a2Schristos	* elf-m10300.c: Remove trailing white space.
1732377e23a2Schristos	* reloc.c: Likewise.
1733377e23a2Schristos
1734377e23a2Schristos2009-07-01  Douglas B Rupp  <rupp@gnat.com>
1735377e23a2Schristos
1736377e23a2Schristos	* bfd.m4 (BFD_HAVE_TIME_TYPE_MEMBER,
1737377e23a2Schristos	BFD_HAVE_SYS_STAT_TYPE_MEMBER): New config functions.
1738377e23a2Schristos	* configure.in: Use them.
1739377e23a2Schristos	* configure: Regenerate.
1740377e23a2Schristos	* config.in: Regenerate.
1741377e23a2Schristos	* vmsutil.c: Include sysdep.h, remove ansidecl.h.
1742377e23a2Schristos	#define _BSD_SOURCE. Add comments.
1743377e23a2Schristos	(vms_file_stats_name): Calculate creation date based on available
1744377e23a2Schristos	runtime data. Return 1 for version instead of 0.
1745377e23a2Schristos
1746377e23a2Schristos2009-07-01  Nick Clifton  <nickc@redhat.com>
1747377e23a2Schristos
1748377e23a2Schristos	PR 10072
1749377e23a2Schristos	* elf32-arm.c (elf32_arm_final_link_relocate): Add code to handle
1750377e23a2Schristos	to R_ARM_THM_PC8 relocation.
1751377e23a2Schristos
1752377e23a2Schristos2009-06-29  Nick Clifton  <nickc@redhat.com>
1753377e23a2Schristos
1754377e23a2Schristos	* elf-m10300.c (mn10300_elf_relax_section): Allow for the
1755377e23a2Schristos	different uses of the relocations addend when a symbol is in a
1756377e23a2Schristos	merged section.
1757377e23a2Schristos
1758377e23a2Schristos2009-06-27  H.J. Lu  <hongjiu.lu@intel.com>
1759377e23a2Schristos
1760377e23a2Schristos	PR ld/10337
1761377e23a2Schristos	* elf.c (bfd_section_from_shdr): Don't change sh_link for
1762377e23a2Schristos	SHT_REL/SHT_RELA sections on executable nor shared library.
1763377e23a2Schristos	Treat SHT_REL/SHT_RELA sections with sh_link set to SHN_UNDEF
1764377e23a2Schristos	as a normal section.
1765377e23a2Schristos
1766377e23a2Schristos2009-06-25  Nick Clifton  <nickc@redhat.com>
1767377e23a2Schristos
1768377e23a2Schristos	* elf-m10300.c (mn10300_elf_relax_section): Handle non-section
1769377e23a2Schristos	symbols with SEC_MERGE flag.
1770377e23a2Schristos
1771377e23a2Schristos2009-06-25  Kai Tietz  <kai.tietz@onevision.com>
1772377e23a2Schristos
1773377e23a2Schristos	* coffcode.h (sec_to_styp_flags): Set discardable for .reloc and
1774377e23a2Schristos	give .debug and .reloc data characteristics.
1775377e23a2Schristos	(DOT_RELOC): New define for .reloc section string.
1776377e23a2Schristos	(coff_write_object_contents): Use DOT_RELOC instead of string.
1777377e23a2Schristos
1778377e23a2Schristos2009-06-25  Tristan Gingold  <gingold@adacore.com>
1779377e23a2Schristos
1780377e23a2Schristos	* mach-o-target.c (bfd_mach_o_get_dynamic_symtab_upper_bound)
1781377e23a2Schristos	(bfd_mach_o_canonicalize_dynamic_symtab)
1782377e23a2Schristos	(bfd_mach_o_get_synthetic_symtab): Defines.
1783377e23a2Schristos	(TARGET_NAME_BACKEND): Add bfd_mach_o_print_thread entry.
1784377e23a2Schristos	(TARGET_NAME): Use Mach-O specific functions for dynamic.
1785377e23a2Schristos
1786377e23a2Schristos	* mach-o-i386.c (bfd_mach_o_i386_swap_reloc_in): Fix howto indexes
1787377e23a2Schristos	for scattered relocations.
1788377e23a2Schristos	(bfd_mach_o_i386_print_thread): New function.
1789377e23a2Schristos	(bfd_mach_o_print_thread): Define.
1790377e23a2Schristos
1791377e23a2Schristos	* mach-o.c (text_section_names_xlat): Add an entry for __const.
1792377e23a2Schristos	(bfd_mach_o_canonicalize_one_reloc, bfd_mach_o_canonicalize_relocs):
1793377e23a2Schristos	New functions extracted from ...
1794377e23a2Schristos	(bfd_mach_o_canonicalize_reloc): ... This.  Simplified.
1795377e23a2Schristos	(bfd_mach_o_get_dynamic_reloc_upper_bound): New function.
1796377e23a2Schristos	(bfd_mach_o_canonicalize_dynamic_reloc): New function.
1797377e23a2Schristos	(bfd_mach_o_i386_flavour_string): Adjusted after enum renaming.
1798377e23a2Schristos	(bfd_mach_o_ppc_flavour_string): Reindentation.  Add 64 bits cases.
1799377e23a2Schristos	(bfd_mach_o_scan_read_dylinker): Do not create a section anymore.
1800377e23a2Schristos	Set name_str field.
1801377e23a2Schristos	(bfd_mach_o_scan_read_dylib): Ditto.
1802377e23a2Schristos	(bfd_mach_o_scan_read_thread): Set mdata at declaration.  Add comments,
1803377e23a2Schristos	reindent.
1804377e23a2Schristos	(bfd_mach_o_scan_read_dysymtab): Set mdata at declaration.  Correctly
1805377e23a2Schristos	decode isym and flags on little endian targets.  Set dysymtab field.
1806377e23a2Schristos	(bfd_mach_o_scan_start_address): Adjust for enum names.
1807377e23a2Schristos	(bfd_mach_o_lookup_section): Do not look for segments anymore.
1808377e23a2Schristos	(bfd_mach_o_print_section): Display bfd section name.
1809377e23a2Schristos	(bfd_mach_o_print_segment): Display none if no name.
1810377e23a2Schristos	(bfd_mach_o_print_dysymtab): Display next index for local, external
1811377e23a2Schristos	and undefined symbols.
1812377e23a2Schristos	(bfd_mach_o_bfd_print_private_bfd_data): Adjust code by using name_str.
1813377e23a2Schristos	Display dylinker name. Display thread and unixthread commands content.
1814377e23a2Schristos	(bfd_mach_o_print_thread): New macro.
1815377e23a2Schristos
1816377e23a2Schristos	* mach-o.h (bfd_mach_o_mach_header_magic): Align numbers.
1817377e23a2Schristos	(bfd_mach_o_ppc_thread_flavour): Ditto.
1818377e23a2Schristos	(bfd_mach_o_i386_thread_flavour): Ditto.
1819377e23a2Schristos	(BFD_MACH_O_PPC_THREAD_STATE_NONE): New enum.
1820377e23a2Schristos	(BFD_MACH_O_x86_THREAD_STATE_NONE): Replaces
1821377e23a2Schristos	BFD_MACH_O_THREAD_STATE_NONE.
1822377e23a2Schristos	(bfd_mach_o_segment_command): Remove segment field.
1823377e23a2Schristos	(bfd_mach_o_thread_flavour): Field offset is now unsigned long.
1824377e23a2Schristos	(bfd_mach_o_dylinker_command): Remove section field, add name_str.
1825377e23a2Schristos	(bfd_mach_o_prebound_dylib_command): Ditto.
1826377e23a2Schristos	(bfd_mach_o_dylib_command): Ditto.
1827377e23a2Schristos	(bfd_mach_o_prebound_dylib_command): Remove section field.
1828377e23a2Schristos	(mach_o_data_struct): Add dysymtab field.
1829377e23a2Schristos	(bfd_mach_o_backend_data): Add _bfd_mach_o_print_thread field.
1830377e23a2Schristos	(bfd_mach_o_get_reloc_upper_bound, bfd_mach_o_canonicalize_reloc)
1831377e23a2Schristos	(bfd_mach_o_build_commands): Remove parameter names and attributes.
1832377e23a2Schristos	(bfd_mach_o_get_dynamic_reloc_upper_bound)
1833377e23a2Schristos	(bfd_mach_o_canonicalize_dynamic_reloc): New prototypes.
1834377e23a2Schristos
1835377e23a2Schristos2009-06-25  Rafael Avila de Espindola  <espindola@google.com>
1836377e23a2Schristos
1837377e23a2Schristos	* plugin.c (load_plugin): Use stat and S_ISREG instead of the d_type
1838377e23a2Schristos	field of struct dirent.
1839377e23a2Schristos
1840377e23a2Schristos2009-06-23  Tristan Gingold  <gingold@adacore.com>
1841377e23a2Schristos
1842377e23a2Schristos	* vms.c (vms_get_synthetic_symtab): Remove duplicate definition
1843377e23a2Schristos	of this macro.  Fix indentation.
1844377e23a2Schristos
1845377e23a2Schristos2009-06-22  Christophe Lyon  <christophe.lyon@st.com>
1846377e23a2Schristos
1847377e23a2Schristos	* elf32-arm.c (elf32_arm_size_stubs): Use PLT address as
1848377e23a2Schristos	destination for defined dynamic symbols when deciding whether to
1849377e23a2Schristos	insert a stub or not.
1850377e23a2Schristos	(allocate_dynrelocs): Make sure functions are not marked as Thumb
1851377e23a2Schristos	when actually accessed through a PLT, even when generating a
1852377e23a2Schristos	shared lib.
1853377e23a2Schristos
1854377e23a2Schristos2009-06-22  Tristan Gingold  <gingold@adacore.com>
1855377e23a2Schristos
1856377e23a2Schristos	* mach-o.c (bfd_mach_o_canonicalize_reloc): Append a sentinel to
1857377e23a2Schristos	the relocs array.
1858377e23a2Schristos
1859377e23a2Schristos2009-06-22  Alan Modra  <amodra@bigpond.net.au>
1860377e23a2Schristos
1861377e23a2Schristos	* elf32-ppc.c (ppc_elf_check_relocs): Handle R_PPC_RELAX* in switch.
1862377e23a2Schristos	* elf32-v850.c (v850_elf_relocate_section): Warning fix.
1863377e23a2Schristos
1864377e23a2Schristos2009-06-22  Alan Modra  <amodra@bigpond.net.au>
1865377e23a2Schristos
1866377e23a2Schristos	* elf64-ppc.c (ppc64_elf_edit_opd): Avoid gcc warning.
1867377e23a2Schristos
1868377e23a2Schristos2009-06-19  H.J. Lu  <hongjiu.lu@intel.com>
1869377e23a2Schristos
1870377e23a2Schristos	* elflink.c (elf_link_add_object_symbols): Avoid warning
1871377e23a2Schristos	from -Wjump-misses-init in gcc 4.5.0.
1872377e23a2Schristos
1873377e23a2Schristos2009-06-19  H.J. Lu  <hongjiu.lu@intel.com>
1874377e23a2Schristos
1875377e23a2Schristos	* elf32-i386.c (elf_i386_check_relocs): Properly check local
1876377e23a2Schristos	symbol on error.
1877377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
1878377e23a2Schristos
1879377e23a2Schristos2009-06-19  H.J. Lu  <hongjiu.lu@intel.com>
1880377e23a2Schristos
1881377e23a2Schristos	* elf32-i386.c (elf_i386_tls_transition): Add a parameter,
1882377e23a2Schristos	r_symndx.  Report local symbol name on error.
1883377e23a2Schristos	(elf_i386_check_relocs): Updated.  Report local symbol name on
1884377e23a2Schristos	error.
1885377e23a2Schristos	(elf_i386_gc_sweep_hook): Updated.
1886377e23a2Schristos	(elf_i386_relocate_section): Likewise.
1887377e23a2Schristos
1888377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_tls_transition): Add a parameter,
1889377e23a2Schristos	r_symndx.  Report local symbol name on error.
1890377e23a2Schristos	(elf64_x86_64_check_relocs): Updated.  Report local symbol name
1891377e23a2Schristos	on error.
1892377e23a2Schristos	(elf64_x86_64_gc_sweep_hook): Updated.
1893377e23a2Schristos	(elf64_x86_64_relocate_section): Likewise.
1894377e23a2Schristos
1895377e23a2Schristos2009-06-19  Tristan Gingold  <gingold@adacore.com>
1896377e23a2Schristos
1897377e23a2Schristos	* mach-o.c (bfd_mach_o_print_private_header): Fix format character.
1898377e23a2Schristos
1899377e23a2Schristos2009-06-19  Tristan Gingold  <gingold@adacore.com>
1900377e23a2Schristos
1901377e23a2Schristos	* mach-o.c (bfd_mach_o_scan_read_symtab_symbols): Add prototype.
1902377e23a2Schristos	(bfd_mach_o_version): Use bfd_mach_o_get_data instead of direct access.
1903377e23a2Schristos	(bfd_mach_o_valid): Ditto.
1904377e23a2Schristos	(bfd_mach_o_wide_p): Ditto.
1905377e23a2Schristos	(bfd_mach_o_canonicalize_reloc): Ditto.
1906377e23a2Schristos	(bfd_mach_o_build_commands): Ditto.
1907377e23a2Schristos	(bfd_mach_o_scan_read_thread): Ditto.
1908377e23a2Schristos	(bfd_mach_o_flatten_sections): Ditto.
1909377e23a2Schristos	(bfd_mach_o_scan_start_address): Ditto.
1910377e23a2Schristos	(bfd_mach_o_lookup_section): Ditto.
1911377e23a2Schristos	(bfd_mach_o_core_fetch_environment): Ditto.
1912377e23a2Schristos	(bfd_mach_o_write_contents): Ditto.  Handle reexport_dylib.
1913377e23a2Schristos	(bfd_mach_o_scan_write_relocs): Adjust for bfd_mach_o_get_data.
1914377e23a2Schristos	(bfd_mach_o_scan_write_symtab): Ditto.
1915377e23a2Schristos	Use macros instead of hard-coded values.
1916377e23a2Schristos	(bfd_mach_o_scan_read_symtab_symbol): Make the function static.
1917377e23a2Schristos	Use bfd_mach_o_get_data instead of direct access.  Use macros
1918377e23a2Schristos	instead of hard-coded values.
1919377e23a2Schristos	(bfd_mach_o_scan_read_symtab_strtab): Make the function static.
1920377e23a2Schristos	Remove sym argument and get section from mdata.
1921377e23a2Schristos	Move code into the else branch.
1922377e23a2Schristos	(bfd_mach_o_scan_read_symtab_symbols): Make the function static.
1923377e23a2Schristos	Remove sym argument and get section from mdata.  Adjust code.
1924377e23a2Schristos	(bfd_mach_o_scan_read_dylib): Move assertion into the created
1925377e23a2Schristos	switch (which replaces consecutive if statements).
1926377e23a2Schristos	(bfd_mach_o_scan_read_dysymtab): Rename seg to cmd.  Load
1927377e23a2Schristos	module table, table of content, indirect symbols and external
1928377e23a2Schristos	referenced symbols.
1929377e23a2Schristos	(bfd_mach_o_scan_read_symtab): Renames seg to symtab.  Set symtab
1930377e23a2Schristos	field.
1931377e23a2Schristos	(bfd_mach_o_scan_read_linkedit): New function.
1932377e23a2Schristos	(bfd_mach_o_scan_read_str): Ditto.
1933377e23a2Schristos	(bfd_mach_o_count_symbols): Simplify the code by using the symtab
1934377e23a2Schristos	field of mdata.
1935377e23a2Schristos	(bfd_mach_o_get_symtab_upper_bound): Remove check as
1936377e23a2Schristos	bfd_mach_o_count_symbols never returns an error.
1937377e23a2Schristos	(bfd_mach_o_canonicalize_symtab): Simplify the code by using the
1938377e23a2Schristos	symtab field (there might be only one symtab).
1939377e23a2Schristos	(bfd_mach_o_scan_read_command): Handle reexported dylib.
1940377e23a2Schristos	Handle sub frameworks, sub umbrella, sub library and sub client.
1941377e23a2Schristos	Read code signature and segment split info commands.
1942377e23a2Schristos	(bfd_mach_o_scan): Reindent.
1943377e23a2Schristos	(bfd_mach_o_xlat_name): New type.
1944377e23a2Schristos	(bfd_mach_o_print_flags): New function.
1945377e23a2Schristos	(bfd_mach_o_get_name): Ditto.
1946377e23a2Schristos	(bfd_mach_o_cpu_name): New variable.
1947377e23a2Schristos	(bfd_mach_o_filetype_name, bfd_mach_o_header_flags_name)
1948377e23a2Schristos	(bfd_mach_o_section_type_name)
1949377e23a2Schristos	(bfd_mach_o_section_attribute_name)
1950377e23a2Schristos	(bfd_mach_o_load_command_name): New variables.
1951377e23a2Schristos	(bfd_mach_o_print_private_header): New function.
1952377e23a2Schristos	(bfd_mach_o_print_section_map): New function extracted from
1953377e23a2Schristos	bfd_mach_o_print_private_bfd_data.
1954377e23a2Schristos	(bfd_mach_o_print_section): Ditto.  Print more infos.
1955377e23a2Schristos	(bfd_mach_o_print_segment): Ditto.
1956377e23a2Schristos	(bfd_mach_o_print_dysymtab): Ditto.
1957377e23a2Schristos	(bfd_mach_o_bfd_print_private_bfd_data): Reworked.  Handle
1958377e23a2Schristos	load weak dylib, reexport dylib and id dylib.
1959377e23a2Schristos	Handle code signature and segment_split info.
1960377e23a2Schristos	Handle sub frameworks, sub umbrella, sub library and sub client.
1961377e23a2Schristos	(bfd_mach_o_section_get_nbr_indirect): New function.
1962377e23a2Schristos
1963377e23a2Schristos	* mach-o.h (BFD_MACH_O_REFERENCE_MASK): New macro.  Add comment.
1964377e23a2Schristos	(bfd_mach_o_header_flags): New enum to define header flags.
1965377e23a2Schristos	(bfd_mach_o_section_attribute): New enum to replace ...
1966377e23a2Schristos	(BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
1967377e23a2Schristos	BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
1968377e23a2Schristos	BFD_MACH_O_S_SELF_MODIFYING_CODE, BFD_MACH_O_S_ATTR_LIVE_SUPPORT,
1969377e23a2Schristos	BFD_MACH_O_S_ATTR_NO_DEAD_STRIP, BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS,
1970377e23a2Schristos	BFD_MACH_O_S_ATTR_NO_TOC, BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): ...
1971377e23a2Schristos	these removed macros.
1972377e23a2Schristos	(BFD_MACH_O_NLIST_SIZE, BFD_MACH_O_NLIST_64_SIZE): New macros.
1973377e23a2Schristos	(bfd_mach_o_dylib_module): New type.
1974377e23a2Schristos	(BFD_MACH_O_DYLIB_MODULE_SIZE, BFD_MACH_O_DYLIB_MODULE_64_SIZE): New
1975377e23a2Schristos	macros.
1976377e23a2Schristos	(bfd_mach_o_dylib_table_of_content): New type.
1977377e23a2Schristos	(BFD_MACH_O_TABLE_OF_CONTENT_SIZE): New macro.
1978377e23a2Schristos	(bfd_mach_o_dylib_reference): New type.
1979377e23a2Schristos	(BFD_MACH_O_REFERENCE_SIZE): New macro.
1980377e23a2Schristos	(bfd_mach_o_dysymtab_command): Add fields for loaded and decoded
1981377e23a2Schristos	modules, toc, references and indirect syms.
1982377e23a2Schristos	(BFD_MACH_O_INDIRECT_SYMBOL_SIZE): New macro.
1983377e23a2Schristos	(bfd_mach_o_dylinker_command): Remove cmd and cmdsize fields (were
1984377e23a2Schristos	unused).  Add comment.
1985377e23a2Schristos	(bfd_mach_o_dylib_command): Ditto.
1986377e23a2Schristos	(bfd_mach_o_prebound_dylib_command): Ditto.
1987377e23a2Schristos	(bfd_mach_o_linkedit_command): New type.
1988377e23a2Schristos	(bfd_mach_o_str_command): New type.
1989377e23a2Schristos	(bfd_mach_o_load_command): Add linkedit and str fields.
1990377e23a2Schristos	(mach_o_data_struct): Add symtab field.
1991377e23a2Schristos	(bfd_get_mach_o_data): Renamed to ...
1992377e23a2Schristos	(bfd_mach_o_get_data): ... this new macro.
1993377e23a2Schristos	(bfd_mach_o_scan_read_symtab_symbol,
1994377e23a2Schristos	bfd_mach_o_scan_read_symtab_strtab,
1995377e23a2Schristos	bfd_mach_o_scan_read_symtab_symbols): Prototypes removed.
1996377e23a2Schristos
1997377e23a2Schristos	* mach-o-i386.c (bfd_mach_o_i386_mkobject): Use bfd_mach_o_get_data
1998377e23a2Schristos	instead of direct access.
1999377e23a2Schristos
2000377e23a2Schristos2009-06-19  Alan Modra  <amodra@bigpond.net.au>
2001377e23a2Schristos
2002377e23a2Schristos	* elf32-ppc.c (ppc_elf_check_relocs): Allow local symbols for
2003377e23a2Schristos	R_PPC_PLTREL24 relocs.
2004377e23a2Schristos	(ppc_elf_relocate_section): Likewise.
2005377e23a2Schristos
2006377e23a2Schristos2009-06-19  Alan Modra  <amodra@bigpond.net.au>
2007377e23a2Schristos
2008377e23a2Schristos	* elf32-ppc.c (find_plt_ent): Pass pointer to plist rather than
2009377e23a2Schristos	pointer to sym hash.  Update all uses.
2010377e23a2Schristos	(update_plt_info): Likewise.  Don't check addend here.
2011377e23a2Schristos
2012377e23a2Schristos2009-06-18  H.J. Lu  <hongjiu.lu@intel.com>
2013377e23a2Schristos
2014377e23a2Schristos	* elf32-i386.c (elf_i386_check_relocs): Remove isymbuf and use
2015377e23a2Schristos	bfd_sym_from_r_symndx.
2016377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2017377e23a2Schristos
2018377e23a2Schristos2009-06-18  Alan Modra  <amodra@bigpond.net.au>
2019377e23a2Schristos
2020377e23a2Schristos	* elf-bfd.h (struct sym_sec_cache): Delete.
2021377e23a2Schristos	(struct sym_cache): New.
2022377e23a2Schristos	(bfd_section_from_r_symndx): Delete prototype.
2023377e23a2Schristos	(bfd_sym_from_r_symndx): Define prototype.
2024377e23a2Schristos	* elf.c (bfd_section_from_r_symndx): Delete, replace with..
2025377e23a2Schristos	(bfd_sym_from_r_symndx): ..new function.
2026377e23a2Schristos	* elf32-arm.c: Update all uses of struct sym_sec_cache and
2027377e23a2Schristos	bfd_section_from_r_symndx to new struct and function.
2028377e23a2Schristos	* elf32-bfin.c: Likewise.
2029377e23a2Schristos	* elf32-hppa.c: Likewise.
2030377e23a2Schristos	* elf32-i386.c: Likewise.
2031377e23a2Schristos	* elf32-m32r.c: Likewise.
2032377e23a2Schristos	* elf32-m68hc1x.c: Likewise.
2033377e23a2Schristos	* elf32-m68hc1x.h: Likewise.
2034377e23a2Schristos	* elf32-m68k.c: Likewise.
2035377e23a2Schristos	* elf32-ppc.c: Likewise.
2036377e23a2Schristos	* elf32-s390.c: Likewise.
2037377e23a2Schristos	* elf32-sh.c: Likewise.
2038377e23a2Schristos	* elf64-ppc.c: Likewise.
2039377e23a2Schristos	* elf64-s390.c: Likewise.
2040377e23a2Schristos	* elf64-x86-64.c: Likewise.
2041377e23a2Schristos	* elfxx-sparc.c: Likewise.
2042377e23a2Schristos	* elfxx-sparc.h: Likewise.
2043377e23a2Schristos
2044377e23a2Schristos2009-06-18  H.J. Lu  <hongjiu.lu@intel.com>
2045377e23a2Schristos
2046377e23a2Schristos	* elf32-i386.c (elf_i386_check_relocs): Cache or free isymbuf.
2047377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2048377e23a2Schristos
2049377e23a2Schristos2009-06-18  Nick Clifton  <nickc@redhat.com>
2050377e23a2Schristos
2051377e23a2Schristos	* elflink.c (elf_link_sort_relocs): Return early if there are no
2052377e23a2Schristos	relocs to sort.
2053377e23a2Schristos
2054377e23a2Schristos2009-06-18  Dave Korn  <dave.korn.cygwin@gmail.com>
2055377e23a2Schristos
2056377e23a2Schristos	Merge cegcc and mingw32ce target name changes from
2057377e23a2Schristos	CeGCC project:
2058377e23a2Schristos
2059377e23a2Schristos	2007-12-25  Pedro Alves  <pedro_alves@portugalmail.pt>
2060377e23a2Schristos
2061377e23a2Schristos	* config.bfd: Add arm*-*-cegcc* target.
2062377e23a2Schristos
2063377e23a2Schristos	2007-12-17  Pedro Alves  <pedro_alves@portugalmail.pt>
2064377e23a2Schristos
2065377e23a2Schristos	* config.bfd: Add arm-*-mingw32ce* target.
2066377e23a2Schristos
2067377e23a2Schristos2009-06-17  H.J. Lu  <hongjiu.lu@intel.com>
2068377e23a2Schristos
2069377e23a2Schristos	* elf-bfd.h (_bfd_elf_allocate_ifunc_dyn_relocs): New.
2070377e23a2Schristos	* elf-ifunc.c (_bfd_elf_allocate_ifunc_dyn_relocs): Likewise.
2071377e23a2Schristos	* elf32-i386.c (elf_i386_allocate_dynrelocs): Use it.
2072377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2073377e23a2Schristos
2074377e23a2Schristos2009-06-17  H.J. Lu  <hongjiu.lu@intel.com>
2075377e23a2Schristos
2076377e23a2Schristos	* elf-bfd.h (_bfd_elf_create_ifunc_dyn_reloc): New.
2077377e23a2Schristos	* elf-ifunc.c (_bfd_elf_create_ifunc_dyn_reloc): Likewise.
2078377e23a2Schristos	* elf32-i386.c (elf_i386_check_relocs): Use it.
2079377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2080377e23a2Schristos
2081377e23a2Schristos2009-06-17  H.J. Lu  <hongjiu.lu@intel.com>
2082377e23a2Schristos
2083377e23a2Schristos	* elf-bfd.h (elf_dyn_relocs): New.
2084377e23a2Schristos
2085377e23a2Schristos	* elf32-i386.c (elf_i386_dyn_relocs): Removed.
2086377e23a2Schristos	(elf_i386_link_hash_entry): Replace elf_i386_dyn_relocs with
2087377e23a2Schristos	elf_dyn_relocs.
2088377e23a2Schristos	(elf_i386_copy_indirect_symbol): Likewise.
2089377e23a2Schristos	(elf_i386_check_relocs): Likewise.
2090377e23a2Schristos	(elf_i386_gc_sweep_hook): Likewise.
2091377e23a2Schristos	(elf_i386_allocate_dynrelocs): Likewise.
2092377e23a2Schristos	(elf_i386_readonly_dynrelocs): Likewise.
2093377e23a2Schristos	(elf_i386_size_dynamic_sections): Likewise.
2094377e23a2Schristos
2095377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_dyn_relocs): Removed.
2096377e23a2Schristos	(elf64_x86_64_link_hash_entry): Replace elf64_x86_64_dyn_relocs
2097377e23a2Schristos	with elf_dyn_relocs.
2098377e23a2Schristos	(elf64_x86_64_copy_indirect_symbol): Updated.
2099377e23a2Schristos	(elf64_x86_64_check_relocs): Likewise.
2100377e23a2Schristos	(elf64_x86_64_gc_sweep_hook): Likewise.
2101377e23a2Schristos	(elf64_x86_64_adjust_dynamic_symbol): Likewise.
2102377e23a2Schristos	(elf64_x86_64_allocate_dynrelocs): Likewise.
2103377e23a2Schristos	(elf64_x86_64_readonly_dynrelocs): Likewise.
2104377e23a2Schristos	(elf64_x86_64_size_dynamic_sections): Likewise.
2105377e23a2Schristos
2106377e23a2Schristos2009-06-17  H.J. Lu  <hongjiu.lu@intel.com>
2107377e23a2Schristos
2108377e23a2Schristos	* elf32-arm.c (create_got_section): Get existing .rela.got
2109377e23a2Schristos	section.
2110377e23a2Schristos	* elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
2111377e23a2Schristos	* elf32-lm32.c (create_got_section): Likewise.
2112377e23a2Schristos	* elf32-m32r.c (create_got_section): Likewise.
2113377e23a2Schristos	* elf32-ppc.c (ppc_elf_create_got): Likewise.
2114377e23a2Schristos	* elf32-s390.c (create_got_section): Likewise.
2115377e23a2Schristos	* elf32-sh.c (create_got_section): Likewise.
2116377e23a2Schristos	* elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
2117377e23a2Schristos	* elf64-s390.c (create_got_section): Likewise.
2118377e23a2Schristos	* elfxx-sparc.c (create_got_section): Likewise.
2119377e23a2Schristos
2120377e23a2Schristos	* elflink.c (_bfd_elf_create_got_section): Properly initialize
2121377e23a2Schristos	the GOT size.
2122377e23a2Schristos
2123377e23a2Schristos2009-06-16  H.J. Lu  <hongjiu.lu@intel.com>
2124377e23a2Schristos
2125377e23a2Schristos	* elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): New.
2126377e23a2Schristos
2127377e23a2Schristos	* elf32-i386.c (elf_i386_local_hash): Removed.
2128377e23a2Schristos	(elf_i386_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
2129377e23a2Schristos	(elf_i386_get_local_sym_hash): Likewise.
2130377e23a2Schristos
2131377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_local_hash): Removed.
2132377e23a2Schristos	(elf64_x86_64_local_htab_hash): Use ELF_LOCAL_SYMBOL_HASH.
2133377e23a2Schristos	(elf64_x86_64_get_local_sym_hash): Likewise.
2134377e23a2Schristos	* elfxx-ia64.c (elfNN_ia64_local_htab_hash): Likewise.
2135377e23a2Schristos	(get_local_sym_hash): Likewise.
2136377e23a2Schristos
2137377e23a2Schristos2009-06-16  H.J. Lu  <hongjiu.lu@intel.com>
2138377e23a2Schristos
2139377e23a2Schristos	* elfxx-ia64.c (elfNN_ia64_link_hash_table): Remove got_sec,
2140377e23a2Schristos	rel_got_sec and plt_sec.
2141377e23a2Schristos	(elfNN_ia64_relax_section): Updated.
2142377e23a2Schristos	(elfNN_ia64_create_dynamic_sections): Likewise.
2143377e23a2Schristos	(get_got): Likewise.
2144377e23a2Schristos	(allocate_dynrel_entries): Likewise.
2145377e23a2Schristos	(elfNN_ia64_size_dynamic_sections): Likewise.
2146377e23a2Schristos	(set_got_entry): Likewise.
2147377e23a2Schristos	(elfNN_ia64_choose_gp): Likewise.
2148377e23a2Schristos	(elfNN_ia64_relocate_section): Likewise.
2149377e23a2Schristos	(elfNN_ia64_finish_dynamic_symbol): Likewise.
2150377e23a2Schristos	(elfNN_ia64_finish_dynamic_sections): Likewise.
2151377e23a2Schristos
2152377e23a2Schristos2009-06-16  Ulrich Weigand  <uweigand@de.ibm.com>
2153377e23a2Schristos
2154377e23a2Schristos	* elf32-spu.c (needs_ovl_stub): Respect .brinfo lrlive bits
2155377e23a2Schristos	also for calls.
2156377e23a2Schristos
2157377e23a2Schristos2009-06-16  H.J. Lu  <hongjiu.lu@intel.com>
2158377e23a2Schristos
2159377e23a2Schristos	* configure.in (elf): Add elf-ifunc.lo.
2160377e23a2Schristos
2161377e23a2Schristos	* configure: Regenerated.
2162377e23a2Schristos	* Makefile.in: Likewise.
2163377e23a2Schristos
2164377e23a2Schristos	* elf-bfd.h (elf_link_hash_table): Add sgot, sgotplt,
2165377e23a2Schristos	srelgot, splt, srelplt, igotplt, iplt, irelplt and irelifunc.
2166377e23a2Schristos
2167377e23a2Schristos	* elf32-i386.c (elf_i386_link_hash_table): Remove sgot,
2168377e23a2Schristos	sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
2169377e23a2Schristos	irelifunc.
2170377e23a2Schristos	(elf_i386_link_hash_table_create): Likewise.
2171377e23a2Schristos	(elf_i386_create_dynamic_sections): Likewise.
2172377e23a2Schristos	(elf_i386_check_relocs): Likewise.
2173377e23a2Schristos	(elf_i386_allocate_dynrelocs): Likewise.
2174377e23a2Schristos	(elf_i386_size_dynamic_sections): Likewise.
2175377e23a2Schristos	(elf_i386_relocate_section): Likewise.
2176377e23a2Schristos	(elf_i386_finish_dynamic_symbol): Likewise.
2177377e23a2Schristos	(elf_i386_finish_dynamic_sections): Likewise.
2178377e23a2Schristos	(elf_i386_create_got_section): Removed.
2179377e23a2Schristos
2180377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_link_hash_table): Remove sgot,
2181377e23a2Schristos	sgotplt, srelgot, splt, srelplt, igotplt, iplt, irelplt and
2182377e23a2Schristos	irelifunc.
2183377e23a2Schristos	(elf64_x86_64_compute_jump_table_size): Updated.
2184377e23a2Schristos	(elf64_x86_64_link_hash_table_create): Likewise.
2185377e23a2Schristos	(elf64_x86_64_create_dynamic_sections): Likewise.
2186377e23a2Schristos	(elf64_x86_64_check_relocs): Likewise.
2187377e23a2Schristos	(elf64_x86_64_allocate_dynrelocs): Likewise.
2188377e23a2Schristos	(elf64_x86_64_size_dynamic_sections): Likewise.
2189377e23a2Schristos	(elf64_x86_64_relocate_section): Likewise.
2190377e23a2Schristos	(elf64_x86_64_finish_dynamic_symbol): Likewise.
2191377e23a2Schristos	(elf64_x86_64_finish_dynamic_sections): Likewise.
2192377e23a2Schristos	(elf64_x86_64_create_got_section): Removed.
2193377e23a2Schristos
2194377e23a2Schristos	* elflink.c (_bfd_elf_create_got_section): Use log_file_align
2195377e23a2Schristos	for pointer alignment.  Set up section pointers.
2196377e23a2Schristos	(_bfd_elf_create_dynamic_sections): Likewise.
2197377e23a2Schristos	(_bfd_elf_create_ifunc_sections): Moved to ...
2198377e23a2Schristos	* elf-ifunc.c: Here.  New.
2199377e23a2Schristos
2200377e23a2Schristos	* Makefile.am (BFD32_BACKENDS): Add elf-ifunc.lo.
2201377e23a2Schristos	(BFD32_BACKENDS_CFILES): Add elf-ifunc.c.
2202377e23a2Schristos	Run "make dep-am".
2203377e23a2Schristos
2204377e23a2Schristos2009-06-16  Doug Kwan  <dougkwan@google.com>
2205377e23a2Schristos
2206377e23a2Schristos	* elf32-arm.c (cortex_a8_erratum_scan): Change type of offset
2207377e23a2Schristos	to bfd_signed_vma.  Cast constant operands which are used in
2208377e23a2Schristos	offset related expressions to bfd_signed_vma type as appropriate.
2209377e23a2Schristos
2210377e23a2Schristos2009-06-16  Maciej W. Rozycki  <macro@linux-mips.org>
2211377e23a2Schristos
2212377e23a2Schristos	* elf32-vax.c (elf_vax_plt_sym_val): New function.
2213377e23a2Schristos	(elf_backend_plt_sym_val): Define.
2214377e23a2Schristos
2215377e23a2Schristos2009-06-16  Maciej W. Rozycki  <macro@linux-mips.org>
2216377e23a2Schristos
2217377e23a2Schristos	* elf32-vax.c (elf_vax_reloc_type_class): New function.
2218377e23a2Schristos	(elf_backend_reloc_type_class): Define.
2219377e23a2Schristos
2220377e23a2Schristos2009-06-16  Maciej W. Rozycki  <macro@linux-mips.org>
2221377e23a2Schristos
2222377e23a2Schristos	* elf32-vax.c (elf_vax_relocate_section): For symbol references
2223377e23a2Schristos	from an executable to a shared library treat R_VAX_PC32
2224377e23a2Schristos	relocations as R_VAX_PLT32 ones.
2225377e23a2Schristos
2226377e23a2Schristos2009-06-16  Maciej W. Rozycki  <macro@linux-mips.org>
2227377e23a2Schristos
2228377e23a2Schristos	* elf32-vax.c (elf_vax_instantiate_got_entries): Skip local
2229377e23a2Schristos	symbols in GOT space calculation.
2230377e23a2Schristos	(elf_vax_relocate_section): Adjust accordingly.
2231377e23a2Schristos
2232377e23a2Schristos2009-06-16  Maciej W. Rozycki  <macro@linux-mips.org>
2233377e23a2Schristos
2234377e23a2Schristos	* elf32-vax.c (elf_vax_plt_entry): Set the entry mask to
2235377e23a2Schristos	include <R11:R2>.
2236377e23a2Schristos
2237377e23a2Schristos2009-06-16  Maciej W. Rozycki  <macro@linux-mips.org>
2238377e23a2Schristos
2239377e23a2Schristos	* elf32-vax.c (elf_vax_check_relocs): Handle the visibility
2240377e23a2Schristos	attribute.
2241377e23a2Schristos	(elf_vax_relocate_section): Likewise.
2242377e23a2Schristos
2243377e23a2Schristos2009-06-15  H.J. Lu  <hongjiu.lu@intel.com>
2244377e23a2Schristos
2245377e23a2Schristos	* elf32-i386.c (elf_i386_allocate_dynrelocs): Update comments.
2246377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2247377e23a2Schristos
2248377e23a2Schristos2009-06-15  H.J. Lu  <hongjiu.lu@intel.com>
2249377e23a2Schristos
2250377e23a2Schristos	* elf32-i386.c (elf_i386_check_relocs): Reformat.
2251377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
2252377e23a2Schristos
2253377e23a2Schristos2009-06-15  H.J. Lu  <hongjiu.lu@intel.com>
2254377e23a2Schristos
2255377e23a2Schristos	* Makefile.am: Run "make dep-am".
2256377e23a2Schristos	* Makefile.in: Regenerated.
2257377e23a2Schristos
2258377e23a2Schristos2009-06-15  H.J. Lu  <hongjiu.lu@intel.com>
2259377e23a2Schristos
2260377e23a2Schristos	* elf32-i386.c (elf_i386_allocate_dynrelocs): Fix a typo.
2261377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2262377e23a2Schristos
2263377e23a2Schristos2009-06-15  Nick Clifton  <nickc@redhat.com>
2264377e23a2Schristos
2265377e23a2Schristos	* po/ru.po: New Russian translation.
2266377e23a2Schristos	* configure.in (ALL_LINGUAS): Add ru.
2267377e23a2Schristos	* configure: Regenerate.
2268377e23a2Schristos
2269377e23a2Schristos2009-06-14  H.J. Lu  <hongjiu.lu@intel.com>
2270377e23a2Schristos
2271377e23a2Schristos	* elf32-i386.c: Remove duplicated comments.
2272377e23a2Schristos
2273377e23a2Schristos2009-06-14  H.J. Lu  <hongjiu.lu@intel.com>
2274377e23a2Schristos
2275377e23a2Schristos	PR ld/10270
2276377e23a2Schristos	* elf32-i386.c (elf_i386_allocate_dynrelocs): Disallow
2277377e23a2Schristos	dynamic IFUNC pointer in non-shared object.  Use .got.plt
2278377e23a2Schristos	for IFUNC definition in PIE.
2279377e23a2Schristos	(elf_i386_allocate_dynrelocs): Resolve IFUNC definition in
2280377e23a2Schristos	PIE locally.
2281377e23a2Schristos
2282377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Disallow
2283377e23a2Schristos	dynamic IFUNC pointer in non-shared object.  Use .got.plt
2284377e23a2Schristos	for IFUNC definition in PIE.
2285377e23a2Schristos	(elf64_x86_64_relocate_section): Resolve IFUNC definition in
2286377e23a2Schristos	PIE locally.
2287377e23a2Schristos
2288377e23a2Schristos2009-06-13  H.J. Lu  <hongjiu.lu@intel.com>
2289377e23a2Schristos
2290377e23a2Schristos	* elf32-i386.c (elf_i386_check_relocs): Properly report
2291377e23a2Schristos	local symbol for unhandled relocation against STT_GNU_IFUNC
2292377e23a2Schristos	symbol.
2293377e23a2Schristos	(elf_i386_relocate_section): Likewise.
2294377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_check_relocs):  Likewise.
2295377e23a2Schristos	(elf64_x86_64_relocate_section): Likewise.
2296377e23a2Schristos
2297377e23a2Schristos2009-06-13  H.J. Lu  <hongjiu.lu@intel.com>
2298377e23a2Schristos
2299377e23a2Schristos	PR ld/10269
2300377e23a2Schristos	* elf32-i386.c: Include "objalloc.h" and "hashtab.h".
2301377e23a2Schristos	(elf_i386_link_hash_table): Add loc_hash_table and
2302377e23a2Schristos	loc_hash_memory.
2303377e23a2Schristos	(elf_i386_local_hash): New.
2304377e23a2Schristos	(elf_i386_local_htab_hash): Likewise.
2305377e23a2Schristos	(elf_i386_local_htab_eq): Likewise.
2306377e23a2Schristos	(elf_i386_get_local_sym_hash): Likewise.
2307377e23a2Schristos	(elf_i386_link_hash_table_free): Likewise.
2308377e23a2Schristos	(elf_i386_allocate_local_dynrelocs): Likewise.
2309377e23a2Schristos	(elf_i386_finish_local_dynamic_symbol): Likewise.
2310377e23a2Schristos	(bfd_elf64_bfd_link_hash_table_free): Likewise.
2311377e23a2Schristos	(elf_i386_link_hash_table_create): Create loc_hash_table and
2312377e23a2Schristos	loc_hash_memory.
2313377e23a2Schristos	(elf_i386_check_relocs): Handle local STT_GNU_IFUNC symbols.
2314377e23a2Schristos	(elf_i386_size_dynamic_sections): Likewise.
2315377e23a2Schristos	(elf_i386_relocate_section): Likewise.
2316377e23a2Schristos	(elf_i386_finish_dynamic_sections): Likewise.
2317377e23a2Schristos	(elf_i386_finish_dynamic_symbol): Check _DYNAMIC only if sym
2318377e23a2Schristos	isn't NULL.
2319377e23a2Schristos
2320377e23a2Schristos	* elf64-x86-64.c: Include "objalloc.h" and "hashtab.h".
2321377e23a2Schristos	(elf64_x86_64_link_hash_table): Add loc_hash_table and
2322377e23a2Schristos	loc_hash_memory.
2323377e23a2Schristos	(elf64_x86_64_local_hash): New.
2324377e23a2Schristos	(elf64_x86_64_local_htab_hash): Likewise.
2325377e23a2Schristos	(elf64_x86_64_local_htab_eq): Likewise.
2326377e23a2Schristos	(elf64_x86_64_get_local_sym_hash): Likewise.
2327377e23a2Schristos	(elf64_x86_64_link_hash_table_free): Likewise.
2328377e23a2Schristos	(elf64_x86_64_allocate_local_dynrelocs): Likewise.
2329377e23a2Schristos	(elf64_x86_64_finish_local_dynamic_symbol): Likewise.
2330377e23a2Schristos	(bfd_elf64_bfd_link_hash_table_free): Likewise.
2331377e23a2Schristos	(elf64_x86_64_link_hash_table_create): Create loc_hash_table
2332377e23a2Schristos	and loc_hash_memory.
2333377e23a2Schristos	(elf64_x86_64_check_relocs): Handle local STT_GNU_IFUNC
2334377e23a2Schristos	symbols.
2335377e23a2Schristos	(elf64_x86_64_size_dynamic_sections): Likewise.
2336377e23a2Schristos	(elf64_x86_64_relocate_section): Likewise.
2337377e23a2Schristos	(elf64_x86_64_finish_dynamic_sections): Likewise.
2338377e23a2Schristos	(elf64_x86_64_finish_dynamic_symbol): Check _DYNAMIC only if
2339377e23a2Schristos	sym isn't NULL.
2340377e23a2Schristos
2341377e23a2Schristos2009-06-10  Philip Blundell  <philb@gnu.org>
2342377e23a2Schristos
2343377e23a2Schristos	* elf32-arm.c (elf32_arm_fix_exidx_coverage): Avoid crash if
2344377e23a2Schristos	elf_sec->this_hdr == NULL.
2345377e23a2Schristos
2346377e23a2Schristos2009-06-12  Tristan Gingold  <gingold@adacore.com>
2347377e23a2Schristos
2348377e23a2Schristos	* reloc.c: Add BFD_RELOC_MACH_O_SECTDIFF and BFD_RELOC_MACH_O_PAIR.
2349377e23a2Schristos	* bfd-in2.h: Regenerated.
2350377e23a2Schristos	* libbfd.h: Regenerated.
2351377e23a2Schristos
2352377e23a2Schristos	* mach-o.c (FILE_ALIGN): New macro.
2353377e23a2Schristos	(bfd_mach_o_canonicalize_symtab): Adjust for bfd_mach_o_asymbol.
2354377e23a2Schristos	(bfd_mach_o_print_symbol): Ditto.
2355377e23a2Schristos	(bfd_mach_o_scan_write_thread): Adjust type of variable offset.
2356377e23a2Schristos	(bfd_mach_o_get_reloc_upper_bound): New function.
2357377e23a2Schristos	(bfd_mach_o_canonicalize_reloc): Ditto.
2358377e23a2Schristos	(bfd_mach_o_scan_write_relocs): Ditto.
2359377e23a2Schristos	(bfd_mach_o_scan_write_section_32): Remove offset argument.
2360377e23a2Schristos	(bfd_mach_o_scan_write_section_64): Ditto.
2361377e23a2Schristos	(bfd_mach_o_scan_write_segment_32): Write relocs.  Fix size of data
2362377e23a2Schristos	written for load command.  Do not compute section file offset.
2363377e23a2Schristos	(bfd_mach_o_scan_write_segment_64): Ditto.
2364377e23a2Schristos	(bfd_mach_o_scan_write_symtab): Compute file offset first.
2365377e23a2Schristos	Adjust for bfd_mach_o_asymbol.  Move code to convert from BFD to
2366377e23a2Schristos	Mach-O to ...
2367377e23a2Schristos	(bfd_mach_o_mangle_symbols): ... this new function.
2368377e23a2Schristos	(bfd_mach_o_write_contents): Be sure to have load commands built.
2369377e23a2Schristos	Call bfd_mach_o_mangle_symbols.
2370377e23a2Schristos	(bfd_mach_o_build_commands): Adjust for filelen field.
2371377e23a2Schristos	Use FILE_ALIGN macro.  Clear section file offset if section is empty.
2372377e23a2Schristos	Do not set symtab file offset anymore here.
2373377e23a2Schristos	(bfd_mach_o_make_empty_symbol): Allocate a bfd_mach_o_asymbol.
2374377e23a2Schristos	(bfd_mach_o_make_bfd_section): Set SEC_RELOC if has reloc.
2375377e23a2Schristos	Set reloc_count and rel_filepos section fields.
2376377e23a2Schristos	(bfd_mach_o_scan_read_section_32): Type of argument offset is now
2377377e23a2Schristos	unsigned int.
2378377e23a2Schristos	(bfd_mach_o_scan_read_section_64): Ditto.
2379377e23a2Schristos	(bfd_mach_o_scan_read_section): Ditto.
2380377e23a2Schristos	(bfd_mach_o_scan_read_symtab_symbol): Typr of argument s is now
2381377e23a2Schristos	bfd_mach_o_asymbol.  Use unsigned int for file offset type.
2382377e23a2Schristos	(bfd_mach_o_scan_read_symtab_symbol): Adjust for bfd_mach_o_asymbol.
2383377e23a2Schristos	Handle weak-ref symbols.
2384377e23a2Schristos	(bfd_mach_o_scan_read_symtab_symbols): Adjust for bfd_mach_o_asymbol.
2385377e23a2Schristos	(bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
2386377e23a2Schristos	(bfd_mach_o_scan): Remove assignment to removed field.
2387377e23a2Schristos	(bfd_mach_o_mkobject_init): Ditto.
2388377e23a2Schristos	(bfd_mach_o_bfd_print_private_bfd_data): Adjust printf formatter.
2389377e23a2Schristos	(bfd_mach_o_bfd_reloc_type_lookup): New macro.
2390377e23a2Schristos	(bfd_mach_o_bfd_reloc_name_lookup): Ditto.
2391377e23a2Schristos	(bfd_mach_o_swap_reloc_in): Ditto.
2392377e23a2Schristos	(bfd_mach_o_swap_reloc_out): Ditto.
2393377e23a2Schristos
2394377e23a2Schristos	* mach-o.h (BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_NON_LAZY)
2395377e23a2Schristos	(BFD_MACH_O_REFERENCE_FLAG_UNDEFINED_LAZY)
2396377e23a2Schristos	(BFD_MACH_O_REFERENCE_FLAG_DEFINED)
2397377e23a2Schristos	(BFD_MACH_O_REFERENCE_FLAG_PRIVATE_DEFINED)
2398377e23a2Schristos	(BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_NON_LAZY)
2399377e23a2Schristos	(BFD_MACH_O_REFERENCE_FLAG_PRIVATE_UNDEFINED_LAZY)
2400377e23a2Schristos	(BFD_MACH_O_REFERENCED_DYNAMICALLY, BFD_MACH_O_N_DESC_DISCARDED)
2401377e23a2Schristos	(BFD_MACH_O_N_NO_DEAD_STRIP, BFD_MACH_O_N_WEAK_REF)
2402377e23a2Schristos	(BFD_MACH_O_N_WEAK_DEF): New macros.
2403377e23a2Schristos	Add comments.
2404377e23a2Schristos	(bfd_mach_o_section_type): Add new enumeration values.
2405377e23a2Schristos	(BFD_MACH_O_S_SELF_MODIFYING_CODE)
2406377e23a2Schristos	(BFD_MACH_O_S_ATTR_LIVE_SUPPORT)
2407377e23a2Schristos	(BFD_MACH_O_S_ATTR_NO_DEAD_STRIP)
2408377e23a2Schristos	(BFD_MACH_O_S_ATTR_STRIP_STATIC_SYMS, BFD_MACH_O_S_ATTR_NO_TOC): New
2409377e23a2Schristos	macros.
2410377e23a2Schristos	(BFD_MACH_O_GENERIC_RELOC_VANILLA)
2411377e23a2Schristos	(BFD_MACH_O_GENERIC_RELOC_PAIR)
2412377e23a2Schristos	(BFD_MACH_O_GENERIC_RELOC_SECTDIFF)
2413377e23a2Schristos	(BFD_MACH_O_GENERIC_RELOC_PB_LA_PTR)
2414377e23a2Schristos	(BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF): Ditto.
2415377e23a2Schristos	(BFD_MACH_O_RELENT_SIZE): Ditto.
2416377e23a2Schristos	(BFD_MACH_O_R_PCREL, BFD_MACH_O_GET_R_LENGTH)
2417377e23a2Schristos	(BFD_MACH_O_R_EXTERN, BFD_MACH_O_GET_R_TYPE)
2418377e23a2Schristos	(BFD_MACH_O_GET_R_SYMBOLNUM, BFD_MACH_O_SET_R_LENGTH)
2419377e23a2Schristos	(BFD_MACH_O_SET_R_TYPE, BFD_MACH_O_SET_R_SYMBOLNUM): Ditto.
2420377e23a2Schristos	(BFD_MACH_O_SR_SCATTERED, BFD_MACH_O_SR_PCREL)
2421377e23a2Schristos	(BFD_MACH_O_GET_SR_LENGTH, BFD_MACH_O_GET_SR_TYPE)
2422377e23a2Schristos	(BFD_MACH_O_GET_SR_ADDRESS, BFD_MACH_O_SET_SR_LENGTH)
2423377e23a2Schristos	(BFD_MACH_O_SET_SR_TYPE, BFD_MACH_O_SET_SR_ADDRESS): Ditto.
2424377e23a2Schristos	(bfd_mach_o_reloc_info): New struct.
2425377e23a2Schristos	(bfd_mach_o_asymbol): New struct.
2426377e23a2Schristos	(bfd_mach_o_symtab_command): The symbols field is now of type
2427377e23a2Schristos	bfd_mach_o_asymbol.
2428377e23a2Schristos	(bfd_mach_o_load_command): The offset and len fields are now of type
2429377e23a2Schristos	unsigned int.
2430377e23a2Schristos	(mach_o_data_struct): Remove symbols, nsymbols and ibfd fields.
2431377e23a2Schristos	Add a filelen field.  Add comments.
2432377e23a2Schristos	(bfd_mach_o_backend_data): New struct.
2433377e23a2Schristos	(bfd_mach_o_get_backend_data): New macro.
2434377e23a2Schristos	(bfd_mach_o_scan_read_symtab_symbol): Parameter symbol now of type
2435377e23a2Schristos	bfd_mach_o_asymbol.
2436377e23a2Schristos	(bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
2437377e23a2Schristos	(bfd_mach_o_get_reloc_upper_bound): New prototype.
2438377e23a2Schristos	(bfd_mach_o_canonicalize_reloc): Ditto.
2439377e23a2Schristos
2440377e23a2Schristos	* mach-o-target.c (bfd_mach_o_bfd_is_local_label_name): Remove
2441377e23a2Schristos	duplicated macro.  Now defined to _bfd_generic_is_local_label.
2442377e23a2Schristos	(TARGET_NAME_BACKEND): New macro...
2443377e23a2Schristos	(TARGET_NAME_BACKEND): ... used to name a new variable.
2444377e23a2Schristos	(TARGET_NAME): Define relocs table using bfd_mach_o, reference
2445377e23a2Schristos	Mach-O backend data.
2446377e23a2Schristos
2447377e23a2Schristos	* mach-o-i386.c (i386_howto_table): New variable.
2448377e23a2Schristos	(bfd_mach_o_i386_swap_reloc_in): New function.
2449377e23a2Schristos	(bfd_mach_o_i386_swap_reloc_out): Ditto.
2450377e23a2Schristos	(bfd_mach_o_i386_bfd_reloc_type_lookup): Ditto.
2451377e23a2Schristos	(bfd_mach_o_i386_bfd_reloc_name_lookup): Ditto.
2452377e23a2Schristos	(bfd_mach_o_swap_reloc_in, bfd_mach_o_swap_reloc_out): New macros.
2453377e23a2Schristos	(bfd_mach_o_bfd_reloc_type_lookup)
2454377e23a2Schristos	(bfd_mach_o_bfd_reloc_name_lookup): Ditto.
2455377e23a2Schristos
2456377e23a2Schristos2009-06-11  Eric Paris  <eparis@redhat.com>
2457377e23a2Schristos	    Nick Clifton  <nickc@redhat.com>
2458377e23a2Schristos
2459377e23a2Schristos	* opncls.c (_maybe_make_executable): New function.  Gives execute
2460377e23a2Schristos	permission to an executable bfd that was opened for writing
2461377e23a2Schristos	provided that it is a regular file.  Replaces common code found in...
2462377e23a2Schristos	(bfd_close): here and ...
2463377e23a2Schristos	(bfd_close_all_done): here.
2464377e23a2Schristos
2465377e23a2Schristos2009-06-11  Anthony Green  <green@moxielogic.com>
2466377e23a2Schristos
2467377e23a2Schristos	* reloc.c: Add BFD_RELOC_MOXIE_10_PCREL.
2468377e23a2Schristos	* bfd-in2.h: Rebuilt.
2469377e23a2Schristos	* libbfd.h: Rebuilt.
2470377e23a2Schristos	* elf32-moxie.c (moxie_elf_howto_table): Add R_MOXIE_PCREL10
2471377e23a2Schristos	relocation support.
2472377e23a2Schristos	(moxie_reloc_map): Ditto.
2473377e23a2Schristos	Clean up copyright notice.
2474377e23a2Schristos
2475377e23a2Schristos2009-06-10  Paul Pluzhnikov  <ppluzhnikov@google.com>
2476377e23a2Schristos
2477377e23a2Schristos	* bfd-in2.h: bfd_mmap prototype.
2478377e23a2Schristos	* bfdio.c (bfd_mmap): New function.
2479377e23a2Schristos	* libbfd.h (bfd_iovec): Add bmmap.
2480377e23a2Schristos	* cache.c (cache_bmmap): New function.
2481377e23a2Schristos	(cache_iovec): Initialize bmmap member.
2482377e23a2Schristos	* opencls.c (opncls_bmmap): New function.
2483377e23a2Schristos	(opncls_iovec): Initialize bmmap member.
2484377e23a2Schristos
2485377e23a2Schristos2009-06-09  Tristan Gingold  <gingold@adacore.com>
2486377e23a2Schristos
2487377e23a2Schristos	* mach-o.h (bfd_mach_o_symtab_command): Remove stabs_segment
2488377e23a2Schristos	and stabstr_segment fields.
2489377e23a2Schristos	(mach_o_be_vec, mach_o_le_vec): Removed
2490377e23a2Schristos	(bfd_mach_o_version): New prototype.
2491377e23a2Schristos
2492377e23a2Schristos	* mach-o.c (bfd_mach_o_version): Make this function public.
2493377e23a2Schristos	(mach_o_wide_p): New function.
2494377e23a2Schristos	(bfd_mach_o_wide_p): Ditto.
2495377e23a2Schristos	(bfd_mach_o_convert_section_name_to_bfd): Add prefix only for
2496377e23a2Schristos	weird names.
2497377e23a2Schristos	(bfd_mach_o_convert_section_name_to_mach_o): Fix typo in comment.
2498377e23a2Schristos	Search in the list only if the name starts with a dot.
2499377e23a2Schristos	(bfd_mach_o_write_header): Use mach_o_wide_p instead of hard-coded
2500377e23a2Schristos	test.  Check bfd_seek status.
2501377e23a2Schristos	(bfd_mach_o_scan_write_thread): Check bfd_seek status.
2502377e23a2Schristos	(bfd_mach_o_scan_write_section_32): Ditto.
2503377e23a2Schristos	(bfd_mach_o_scan_write_section_64): Ditto.
2504377e23a2Schristos	(bfd_mach_o_scan_write_section): Removed.
2505377e23a2Schristos	(bfd_mach_o_scan_write_segment): Split into ...
2506377e23a2Schristos	(bfd_mach_o_scan_write_segment_32): ... this and ...
2507377e23a2Schristos	(bfd_mach_o_scan_write_segment_64): ... this.  Check bfd_seek status.
2508377e23a2Schristos	(bfd_mach_o_scan_write_symtab_symbols): Moved into ...
2509377e23a2Schristos	(bfd_mach_o_scan_write_symtab): ... this.  Write symtab from BFD
2510377e23a2Schristos	symbol table.  Now returns a boolean.
2511377e23a2Schristos	(bfd_mach_o_write_contents): Set filetype.  Check bfd_seek status.
2512377e23a2Schristos	Adjust for status type.
2513377e23a2Schristos	(bfd_mach_o_build_commands): Use mach_o_wide_p instead of hard-coded
2514377e23a2Schristos	test.  Write symbol table.  Numbers the sections.
2515377e23a2Schristos	(bfd_mach_o_read_header): Check bfd_seek status.
2516377e23a2Schristos	Use mach_o_wide_p instead of hard-coded test.
2517377e23a2Schristos	(bfd_mach_o_scan_read_section_32): Check bfd_seek status.
2518377e23a2Schristos	(bfd_mach_o_scan_read_section_64): Ditto.
2519377e23a2Schristos	(bfd_mach_o_scan_read_symtab_symbol): Ditto.  Check bfd_seek status.
2520377e23a2Schristos	Use BFD_MACH_O_N_TYPE instead of hard-coded value.  Correctly
2521377e23a2Schristos	handled common symbols.
2522377e23a2Schristos	(bfd_mach_o_scan_read_symtab_strtab): Check bfd_seek status.
2523377e23a2Schristos	(bfd_mach_o_scan_read_dysymtab_symbol): Ditto.
2524377e23a2Schristos	(bfd_mach_o_scan_read_dylinker): Ditto.
2525377e23a2Schristos	(bfd_mach_o_scan_read_dylib): Ditto.
2526377e23a2Schristos	(bfd_mach_o_scan_read_thread): Ditto.
2527377e23a2Schristos	(bfd_mach_o_scan_read_symtab): Ditto.
2528377e23a2Schristos	Do not create a section for the stabs.
2529377e23a2Schristos	(bfd_mach_o_scan_read_uuid): Check bfd_seek status.
2530377e23a2Schristos	(bfd_mach_o_scan_read_segment): Ditto.
2531377e23a2Schristos	(bfd_mach_o_scan_read_command): Ditto.
2532377e23a2Schristos	(bfd_mach_o_scan_start_address): Ditto.
2533377e23a2Schristos	(bfd_mach_o_scan): Use mach_o_wide_p instead of hard-coded test.
2534377e23a2Schristos	(bfd_mach_o_archive_p): Check bfd_seek status.
2535377e23a2Schristos	(bfd_mach_o_core_fetch_environment): Ditto.
2536377e23a2Schristos
2537377e23a2Schristos	* mach-o-i386.c (bfd_mach_o_i386_mkobject): Don't set filetype.
2538377e23a2Schristos
2539377e23a2Schristos2009-06-06  H.J. Lu  <hongjiu.lu@intel.com>
2540377e23a2Schristos
2541377e23a2Schristos	* elf32-i386.c (elf_i386_link_hash_table): Add irelifunc.
2542377e23a2Schristos	(elf_i386_link_hash_table_create): Initialize irelifunc.
2543377e23a2Schristos	(elf_i386_check_relocs): Updated.  Set up irelifunc for
2544377e23a2Schristos	shared objects.
2545377e23a2Schristos	(elf_i386_allocate_dynrelocs): Use irelifunc for dynamic
2546377e23a2Schristos	relocation for non-GOT reference of STT_GNU_IFUNC symbol in
2547377e23a2Schristos	shared objects.
2548377e23a2Schristos	(elf_i386_relocate_section): Likewise.
2549377e23a2Schristos
2550377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_link_hash_table): Add irelifunc.
2551377e23a2Schristos	(elf64_x86_64_link_hash_table_create): Initialize irelifunc.
2552377e23a2Schristos	(elf64_x86_64_check_relocs): Updated.  Set up irelifunc for
2553377e23a2Schristos	shared objects.
2554377e23a2Schristos	(elf64_x86_64_allocate_dynrelocs): Use irelifunc for dynamic
2555377e23a2Schristos	relocation for non-GOT reference of STT_GNU_IFUNC symbol in
2556377e23a2Schristos	shared objects.
2557377e23a2Schristos	(elf64_x86_64_relocate_section): Likewise.
2558377e23a2Schristos
2559377e23a2Schristos	* elf-bfd.h (_bfd_elf_create_static_ifunc_sections): Renamed to
2560377e23a2Schristos	...
2561377e23a2Schristos	(_bfd_elf_create_ifunc_sections): This.
2562377e23a2Schristos
2563377e23a2Schristos	* elflink.c (_bfd_elf_create_static_ifunc_sections): Renamed to
2564377e23a2Schristos	...
2565377e23a2Schristos	(_bfd_elf_create_ifunc_sections): This.  Create .rel[a].ifunc
2566377e23a2Schristos	for shared objects.
2567377e23a2Schristos
2568377e23a2Schristos2009-06-06  H.J. Lu  <hongjiu.lu@intel.com>
2569377e23a2Schristos
2570377e23a2Schristos	* elf32-i386.c (elf_i386_check_relocs): Make room for dynamic
2571377e23a2Schristos	relocation for R_386_32 against STT_GNU_IFUNC symbol when
2572377e23a2Schristos	building shared object.  Check info->executable instead of
2573377e23a2Schristos	!info->shared when setting non_got_ref.
2574377e23a2Schristos	(elf_i386_allocate_dynrelocs): Allocate dynamic relocation
2575377e23a2Schristos	for non-GOT reference of STT_GNU_IFUNC symbol in shared
2576377e23a2Schristos	object. Allocate GOT relocation agsinst STT_GNU_IFUNC
2577377e23a2Schristos	symbol if needed.
2578377e23a2Schristos	(elf_i386_relocate_section): Output dynamic relocation for
2579377e23a2Schristos	R_386_32 against STT_GNU_IFUNC symbol to get the real
2580377e23a2Schristos	function address when building shared object.
2581377e23a2Schristos	(elf_i386_finish_dynamic_symbol): Output R_386_GLOB_DAT
2582377e23a2Schristos	relocation for STT_GNU_IFUNC symbol in shared object.
2583377e23a2Schristos
2584377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_check_relocs): Make room for
2585377e23a2Schristos	dynamic relocation for R_X86_64_64 against STT_GNU_IFUNC
2586377e23a2Schristos	symbol when building shared object.  Check info->executable
2587377e23a2Schristos	instead of !info->shared when setting non_got_ref.
2588377e23a2Schristos	(elf64_x86_64_allocate_dynrelocs): Allocate dynamic relocation
2589377e23a2Schristos	for non-GOT reference of STT_GNU_IFUNC symbol in shared
2590377e23a2Schristos	library. Allocate GOT relocation agsinst STT_GNU_IFUNC symbol
2591377e23a2Schristos	if needed.
2592377e23a2Schristos	(elf64_x86_64_relocate_section): Output dynamic relocation
2593377e23a2Schristos	for R_X86_64_64 against STT_GNU_IFUNC symbol to get the real
2594377e23a2Schristos	function address when building shared object.
2595377e23a2Schristos	(elf64_x86_64_finish_dynamic_symbol): Output R_X86_64_GLOB_DAT
2596377e23a2Schristos	relocation for STT_GNU_IFUNC symbol in shared object.
2597377e23a2Schristos
2598377e23a2Schristos2009-06-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
2599377e23a2Schristos
2600377e23a2Schristos	* Makefile.am: Run "make dep-am".
2601377e23a2Schristos	(BFD32_BACKENDS): Add mach-o-i386.lo.
2602377e23a2Schristos	(BFD32_BACKENDS_CFILES): Add mach-o-i386.c.
2603377e23a2Schristos	* Makefile.in: Regenerate.
2604377e23a2Schristos
2605377e23a2Schristos2009-06-06  Alan Modra  <amodra@bigpond.net.au>
2606377e23a2Schristos
2607377e23a2Schristos	* elf32-spu.c (spu_elf_relocate_section): Match overlay number
2608377e23a2Schristos	when looking for soft-icache stubs.
2609377e23a2Schristos
2610377e23a2Schristos2009-06-05  Tristan Gingold  <gingold@adacore.com>
2611377e23a2Schristos
2612377e23a2Schristos	* mach-o.h: Update copyright year.
2613377e23a2Schristos	(bfd_mach_o_mach_header_magic): New enum.
2614377e23a2Schristos	(bfd_mach_o_cpu_subtype): Now an enum.
2615377e23a2Schristos	(BFD_MACH_O_HEADER_SIZE, BFD_MACH_O_HEADER_64_SIZE): New macros.
2616377e23a2Schristos	(BFD_MACH_O_SECTION_SIZE, BFD_MACH_O_SECTION_64_SIZE): Ditto.
2617377e23a2Schristos	(BFD_MACH_O_LC_SEGMENT_SIZE, BFD_MACH_O_LC_SEGMENT_64_SIZE): Ditto.
2618377e23a2Schristos	(bfd_mach_o_load_command): Field type_required is now a boolean.
2619377e23a2Schristos	Reindent prototypes.
2620377e23a2Schristos	(bfd_mach_o_object_p, bfd_mach_o_core_p): Remove.
2621377e23a2Schristos	(bfd_mach_o_bfd_copy_private_symbol_data): Add a prototype.
2622377e23a2Schristos	(bfd_mach_o_bfd_copy_private_section_data): Ditto.
2623377e23a2Schristos	(bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
2624377e23a2Schristos	(bfd_mach_o_get_symtab_upper_bound): Ditto.
2625377e23a2Schristos	(bfd_mach_o_canonicalize_symtab): Ditto.
2626377e23a2Schristos	(bfd_mach_o_get_symbol_info): Ditto.
2627377e23a2Schristos	(bfd_mach_o_print_symbol): Ditto.
2628377e23a2Schristos	(bfd_mach_o_bfd_print_private_bfd_data): Ditto.
2629377e23a2Schristos	(bfd_mach_o_make_empty_symbol): Ditto.
2630377e23a2Schristos	(bfd_mach_o_write_contents): Ditto.
2631377e23a2Schristos
2632377e23a2Schristos	* mach-o.c (bfd_mach_o_object_p, bfd_mach_o_core_p,
2633377e23a2Schristos	bfd_mach_o_mkobject): Defines.
2634377e23a2Schristos	(bfd_mach_o_valid): Returns FALSE/TRUE instead of 0/1.
2635377e23a2Schristos	Do not check with target vector but with flavour.
2636377e23a2Schristos	(struct mach_o_section_name_xlat): New declaration.
2637377e23a2Schristos	(dwarf_section_names_xlat): Ditto.
2638377e23a2Schristos	(text_section_names_xlat): Ditto.
2639377e23a2Schristos	(data_section_names_xlat): Ditto.
2640377e23a2Schristos	(struct mach_o_segment_name_xlat): Ditto.
2641377e23a2Schristos	(segsec_names_xlat): Ditto.
2642377e23a2Schristos	(bfd_mach_o_convert_section_name_to_bfd): New function.
2643377e23a2Schristos	(bfd_mach_o_convert_section_name_to_mach_o): Ditto.
2644377e23a2Schristos	(bfd_mach_o_bfd_copy_private_symbol_data): Make it public.
2645377e23a2Schristos	(bfd_mach_o_bfd_copy_private_section_data): Ditto.
2646377e23a2Schristos	(bfd_mach_o_bfd_copy_private_bfd_data): Ditto.
2647377e23a2Schristos	Accept any input and output flavour.  Do not share private data
2648377e23a2Schristos	anymore.
2649377e23a2Schristos	(bfd_mach_o_count_symbols): Add a comment.
2650377e23a2Schristos	(bfd_mach_o_get_symtab_upper_bound): Make it public.
2651377e23a2Schristos	(bfd_mach_o_canonicalize_symtab): Ditto.
2652377e23a2Schristos	(bfd_mach_o_get_symbol_info): Ditto.
2653377e23a2Schristos	(bfd_mach_o_print_symbol): Ditto.
2654377e23a2Schristos	(bfd_mach_o_write_header): Now returns a boolean instead of an int.
2655377e23a2Schristos	Use constants instead of hard-coded values.
2656377e23a2Schristos	(bfd_mach_o_scan_write_section_32): Use constants instead of hard-coded
2657377e23a2Schristos	values.
2658377e23a2Schristos	(bfd_mach_o_scan_write_section_64): Ditto.
2659377e23a2Schristos	(bfd_mach_o_scan_write_segment): Ditto.
2660377e23a2Schristos	Do not copy sections anymore.
2661377e23a2Schristos	(bfd_mach_o_write_contents): Make it public.
2662377e23a2Schristos	Remove dead code.  Rewrite typeflag assignment.
2663377e23a2Schristos	(bfd_mach_o_build_commands): New function.
2664377e23a2Schristos	(bfd_mach_o_set_section_contents): Ditto.
2665377e23a2Schristos	(bfd_mach_o_make_empty_symbol): Make it public.
2666377e23a2Schristos	(bfd_mach_o_read_header): Make it static.
2667377e23a2Schristos	Convert to bfd_boolean.
2668377e23a2Schristos	Use constants instead of hard-coded values.
2669377e23a2Schristos	(bfd_mach_o_make_bfd_section): Call
2670377e23a2Schristos	bfd_mach_o_convert_section_name_to_bfd to create name.
2671377e23a2Schristos	(bfd_mach_o_scan_read_section_32): Use constants instead of hard-coded
2672377e23a2Schristos	values.
2673377e23a2Schristos	(bfd_mach_o_scan_read_section_64): Ditto.
2674377e23a2Schristos	(bfd_mach_o_scan_read_segment): Do not create a bfd section for
2675377e23a2Schristos	a segment anymore.  Use constants instead of hard-coded values.
2676377e23a2Schristos	(bfd_mach_o_scan_read_command): Fix style.
2677377e23a2Schristos	(bfd_mach_o_scan): Use constants instead of hard-coded values.
2678377e23a2Schristos	Get rid of BFD_IO_FUNCS.
2679377e23a2Schristos	(bfd_mach_o_mkobject_init): Renamed from bfd_mach_o_mkobject.
2680377e23a2Schristos	(bfd_mach_o_header_p): Created from bfd_mach_o_object_p.
2681377e23a2Schristos	(bfd_mach_o_gen_object_p): New function, replaces bfd_mach_o_object_p.
2682377e23a2Schristos	(bfd_mach_o_object_p): Removed.
2683377e23a2Schristos	(bfd_mach_o_gen_core_p): New function, replaces ...
2684377e23a2Schristos	(bfd_mach_o_core_p): ... deleted.
2685377e23a2Schristos	(bfd_mach_o_bfd_print_private_bfd_data): Make it public.
2686377e23a2Schristos
2687377e23a2Schristos	* mach-o-i386.c: New file.
2688377e23a2Schristos	* config.bfd: Use mach_o_i386_vec as targ_defvec for ix86-darwin.
2689377e23a2Schristos	* configure.in (TDEFINES): Add mach_o_i386_vec.
2690377e23a2Schristos	* configure: Regenerated.
2691377e23a2Schristos	* targets.c: Add mach_o_i386_vec.
2692377e23a2Schristos
2693377e23a2Schristos	* mach-o.c: Update copyright years.
2694377e23a2Schristos	(BFD_IO_FUNCS): Remove (was not used).
2695377e23a2Schristos	(bfd_mach_o_mkarchive, bfd_mach_o_read_ar_hdr, bfd_mach_o_slurp_armap
2696377e23a2Schristos	bfd_mach_o_slurp_extended_name_table,
2697377e23a2Schristos	bfd_mach_o_construct_extended_name_table,
2698377e23a2Schristos	bfd_mach_o_truncate_arname, bfd_mach_o_write_armap,
2699377e23a2Schristos	bfd_mach_o_get_elt_at_index, bfd_mach_o_generic_stat_arch_elt,
2700377e23a2Schristos	bfd_mach_o_update_armap_timestamp, bfd_mach_o_close_and_cleanup,
2701377e23a2Schristos	bfd_mach_o_bfd_free_cached_info, bfd_mach_o_new_section_hook,
2702377e23a2Schristos	bfd_mach_o_get_section_contents_in_window,
2703377e23a2Schristos	bfd_mach_o_bfd_is_local_label_name,
2704377e23a2Schristos	bfd_mach_o_bfd_is_target_special_symbol,
2705377e23a2Schristos	bfd_mach_o_bfd_is_local_label_name, bfd_mach_o_get_lineno,
2706377e23a2Schristos	bfd_mach_o_find_nearest_line, bfd_mach_o_find_inliner_info,
2707377e23a2Schristos	bfd_mach_o_bfd_make_debug_symbol, bfd_mach_o_read_minisymbols,
2708377e23a2Schristos	bfd_mach_o_minisymbol_to_symbol,
2709377e23a2Schristos	bfd_mach_o_bfd_get_relocated_section_contents,
2710377e23a2Schristos	bfd_mach_o_bfd_relax_section, bfd_mach_o_bfd_link_hash_table_create,
2711377e23a2Schristos	bfd_mach_o_bfd_link_hash_table_free, bfd_mach_o_bfd_link_add_symbols,
2712377e23a2Schristos	bfd_mach_o_bfd_link_just_syms, bfd_mach_o_bfd_final_link,
2713377e23a2Schristos	bfd_mach_o_bfd_link_split_section, bfd_mach_o_set_arch_mach,
2714377e23a2Schristos	bfd_mach_o_bfd_merge_private_bfd_data,
2715377e23a2Schristos	bfd_mach_o_bfd_set_private_flags, bfd_mach_o_get_section_contents,
2716377e23a2Schristos	bfd_mach_o_bfd_gc_sections, bfd_mach_o_bfd_merge_sections,
2717377e23a2Schristos	bfd_mach_o_bfd_is_group_section, bfd_mach_o_bfd_discard_group,
2718377e23a2Schristos	bfd_mach_o_section_already_linked, bfd_mach_o_bfd_define_common_symbol,
2719377e23a2Schristos	bfd_mach_o_bfd_copy_private_header_data,
2720377e23a2Schristos	bfd_mach_o_core_file_matches_executable_p): Move these defines ...
2721377e23a2Schristos	* mach-o-target.c: ... here.
2722377e23a2Schristos	Update copyright years.
2723377e23a2Schristos
2724377e23a2Schristos2009-06-04  Alan Modra  <amodra@bigpond.net.au>
2725377e23a2Schristos
2726377e23a2Schristos	* dep-in.sed: Don't use \n in replacement part of s command.
2727377e23a2Schristos	* Makefile.am (DEP1): LC_ALL for uniq.
2728377e23a2Schristos	Run "make dep-am".
2729377e23a2Schristos	* Makefile.in: Regenerate.
2730377e23a2Schristos
2731377e23a2Schristos2009-06-03  H.J. Lu  <hongjiu.lu@intel.com>
2732377e23a2Schristos
2733377e23a2Schristos	* elf32-i386.c (elf_i386_allocate_dynrelocs): Remove check of
2734377e23a2Schristos	h->plt.refcount > 0 on STT_GNU_IFUNC symbol.
2735377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Likewise.
2736377e23a2Schristos
2737377e23a2Schristos2009-06-03  H.J. Lu  <hongjiu.lu@intel.com>
2738377e23a2Schristos
2739377e23a2Schristos	* elf32-i386.c (elf_i386_allocate_dynrelocs): Allocate
2740377e23a2Schristos	GOT entry for STT_GNU_IFUNC symbol with pointer equality.
2741377e23a2Schristos	(elf_i386_relocate_section): Adjust R_386_GOT32 relocation
2742377e23a2Schristos	against STT_GNU_IFUNC symbols for static executables.
2743377e23a2Schristos	(elf_i386_finish_dynamic_symbol): Load GOT entry with
2744377e23a2Schristos	PLT entry for STT_GNU_IFUNC symbol with pointer equality.
2745377e23a2Schristos
2746377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_allocate_dynrelocs): Allocate
2747377e23a2Schristos	GOT entry for STT_GNU_IFUNC symbol with pointer equality.
2748377e23a2Schristos	(elf64_x86_64_finish_dynamic_symbol): Load GOT entry with
2749377e23a2Schristos	PLT entry for STT_GNU_IFUNC symbol with pointer equality.
2750377e23a2Schristos
2751377e23a2Schristos2009-06-02  Richard Sandiford  <r.sandiford@uk.ibm.com>
2752377e23a2Schristos
2753377e23a2Schristos	* coff-rs6000.c (xcoff_ppc_relocate_section): Allow undefined
2754377e23a2Schristos	symbols to be left unimported when linking statically.
2755377e23a2Schristos	* xcofflink.c (xcoff_link_add_symbols): Ignore global linkage
2756377e23a2Schristos	code when linking statically.
2757377e23a2Schristos
2758377e23a2Schristos2009-06-02  H.J. Lu  <hongjiu.lu@intel.com>
2759377e23a2Schristos
2760377e23a2Schristos	* elf32-i386.c (elf_i386_check_relocs): Increment
2761377e23a2Schristos	got.refcount for R_386_GOT32/R_386_GOTOFF relocations
2762377e23a2Schristos	against STT_GNU_IFUNC symbol.
2763377e23a2Schristos	(elf_i386_allocate_dynrelocs): Set got.refcount to 0 if
2764377e23a2Schristos	local STT_GNU_IFUNC definition is used.
2765377e23a2Schristos	(elf_i386_relocate_section): Handle got.offset != -1 for
2766377e23a2Schristos	R_386_GOT32/R_386_GOTOFF relocations against STT_GNU_IFUNC
2767377e23a2Schristos	symbol.
2768377e23a2Schristos
2769377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_check_relocs): Increment
2770377e23a2Schristos	got.refcount for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64
2771377e23a2Schristos	relocations against STT_GNU_IFUNC symbol.
2772377e23a2Schristos	(elf64_x86_64_allocate_dynrelocs): Set got.refcount to 0 if
2773377e23a2Schristos	local STT_GNU_IFUNC definition is used.
2774377e23a2Schristos	(elf64_x86_64_relocate_section): Handle got.offset != -1
2775377e23a2Schristos	for R_X86_64_GOTPCREL/R_X86_64_GOTPCREL64 relocations against
2776377e23a2Schristos	STT_GNU_IFUNC symbol.
2777377e23a2Schristos
2778377e23a2Schristos2009-06-01  H.J. Lu  <hongjiu.lu@intel.com>
2779377e23a2Schristos
2780377e23a2Schristos	PR ld/10205
2781377e23a2Schristos	* elf32-i386.c (elf_howto_table): Add R_386_IRELATIVE.
2782377e23a2Schristos	(elf_i386_reloc_type_lookup): Likewise.
2783377e23a2Schristos	(R_386_tls): Removed.
2784377e23a2Schristos	(R_386_irelative): New.
2785377e23a2Schristos	(R_386_vt_offset): Updated.
2786377e23a2Schristos	(elf_i386_rtype_to_howto): Likewise.
2787377e23a2Schristos	(elf_i386_link_hash_table): Add igotplt, iplt and irelplt.
2788377e23a2Schristos	(elf_i386_link_hash_table_create): Initialize igotplt,
2789377e23a2Schristos	iplt and irelplt.
2790377e23a2Schristos	(elf_i386_check_relocs): Handle STT_GNU_IFUNC symbol first.
2791377e23a2Schristos	(elf_i386_adjust_dynamic_symbol): Likewise.
2792377e23a2Schristos	(elf_i386_allocate_dynrelocs): Likewise.
2793377e23a2Schristos	(elf_i386_relocate_section): Likewise.
2794377e23a2Schristos	(elf_i386_size_dynamic_sections): Set up .iplt and .igot.plt
2795377e23a2Schristos	sections.
2796377e23a2Schristos	(elf_i386_finish_dynamic_symbol): When building a static
2797377e23a2Schristos	executable, use .iplt, .igot.plt and .rel.iplt sections for
2798377e23a2Schristos	STT_GNU_IFUNC symbols.  Generate R_386_IRELATIVE relocation for
2799377e23a2Schristos	locally defined STT_GNU_IFUNC symbol.
2800377e23a2Schristos
2801377e23a2Schristos	* elf64-x86-64.c (x86_64_elf_howto): Add R_X86_64_IRELATIVE.
2802377e23a2Schristos	(x86_64_reloc_map): Likewise.
2803377e23a2Schristos	(R_X86_64_standard): Updated.
2804377e23a2Schristos	(elf64_x86_64_link_hash_table): Add igotplt, iplt and irelplt.
2805377e23a2Schristos	(elf64_x86_64_link_hash_table_create): Initialize igotplt,
2806377e23a2Schristos	iplt and irelplt.
2807377e23a2Schristos	(elf64_x86_64_check_relocs): Handle STT_GNU_IFUNC symbol first.
2808377e23a2Schristos	(elf64_x86_64_adjust_dynamic_symbol): Likewise.
2809377e23a2Schristos	(elf64_x86_64_allocate_dynrelocs): Likewise.
2810377e23a2Schristos	(elf64_x86_64_relocate_section): Likewise.
2811377e23a2Schristos	(elf64_x86_64_size_dynamic_sections): Set up .iplt and .igot.plt
2812377e23a2Schristos	sections.
2813377e23a2Schristos	(elf64_x86_64_finish_dynamic_symbol): When building a static
2814377e23a2Schristos	executable, use .iplt, .igot.plt and .rela.iplt sections for
2815377e23a2Schristos	STT_GNU_IFUNC symbols.  Generate R_X86_64_IRELATIVE relocation
2816377e23a2Schristos	for locally defined STT_GNU_IFUNC symbol.
2817377e23a2Schristos
2818377e23a2Schristos	* reloc.c (BFD_RELOC_386_IRELATIVE): New.
2819377e23a2Schristos	(BFD_RELOC_X86_64_IRELATIVE): Likewise.
2820377e23a2Schristos
2821377e23a2Schristos	* bfd-in2.h: Regenerated.
2822377e23a2Schristos	* libbfd.h: Likewise.
2823377e23a2Schristos
2824377e23a2Schristos2009-06-01  H.J. Lu  <hongjiu.lu@intel.com>
2825377e23a2Schristos
2826377e23a2Schristos	* elf-bfd.h (struct bfd_elf_section_data): Remove indirect_relocs.
2827377e23a2Schristos	(_bfd_elf_make_ifunc_reloc_section): Removed.
2828377e23a2Schristos	(_bfd_elf_is_ifunc_symbol): Likewise.
2829377e23a2Schristos	(_bfd_elf_create_static_ifunc_sections): New.
2830377e23a2Schristos
2831377e23a2Schristos	* elflink.c (_bfd_elf_adjust_dynamic_symbol): Move STT_GNU_IFUNC
2832377e23a2Schristos	symbol check to ...
2833377e23a2Schristos	(elf_link_add_object_symbols): Here.
2834377e23a2Schristos	(_bfd_elf_link_hash_hide_symbol): Don't clean plt on
2835377e23a2Schristos	STT_GNU_IFUNC symbol.
2836377e23a2Schristos	(elf_link_output_extsym): Call elf_backend_finish_dynamic_symbol
2837377e23a2Schristos	if a STT_GNU_IFUNC symbol is referenced in a non-shared object.
2838377e23a2Schristos	(IFUNC_INFIX): Removed.
2839377e23a2Schristos	(get_ifunc_reloc_section_name): Likewise.
2840377e23a2Schristos	(_bfd_elf_make_ifunc_reloc_section): Likewise.
2841377e23a2Schristos	(_bfd_elf_is_ifunc_symbol): Likewise.
2842377e23a2Schristos	(_bfd_elf_create_static_ifunc_sections): New.
2843377e23a2Schristos
2844377e23a2Schristos2009-05-29  H.J. Lu  <hongjiu.lu@intel.com>
2845377e23a2Schristos
2846377e23a2Schristos	* elf32-i386.c (link_hash_newfunc): Add elf_i386_ prefix.
2847377e23a2Schristos	(create_got_section): Likewise.
2848377e23a2Schristos	(allocate_dynrelocs): Likewise.
2849377e23a2Schristos	(readonly_dynrelocs): Likewise.
2850377e23a2Schristos	(set_tls_module_base): Likewise.
2851377e23a2Schristos	(dtpoff_base): Likewise.
2852377e23a2Schristos	(tpoff): Likewise.
2853377e23a2Schristos	(elf_i386_link_hash_table_create): Updated.
2854377e23a2Schristos	(elf_i386_create_dynamic_sections): Likewise.
2855377e23a2Schristos	(elf_i386_check_relocs): Likewise.
2856377e23a2Schristos	(elf_i386_size_dynamic_sections): Likewise.
2857377e23a2Schristos	(elf_i386_relocate_section): Likewise.
2858377e23a2Schristos
2859377e23a2Schristos	* elf64-x86-64.c (link_hash_newfunc): Add elf64_x86_64_ prefix.
2860377e23a2Schristos	(create_got_section): Likewise.
2861377e23a2Schristos	(allocate_dynrelocs): Likewise.
2862377e23a2Schristos	(readonly_dynrelocs): Likewise.
2863377e23a2Schristos	(set_tls_module_base): Likewise.
2864377e23a2Schristos	(dtpoff_base): Likewise.
2865377e23a2Schristos	(tpoff): Likewise.
2866377e23a2Schristos	(elf64_x86_64_link_hash_table_create): Updated.
2867377e23a2Schristos	(elf64_x86_64_create_dynamic_sections): Likewise.
2868377e23a2Schristos	(elf64_x86_64_check_relocs): Likewise.
2869377e23a2Schristos	(elf64_x86_64_size_dynamic_sections): Likewise.
2870377e23a2Schristos	(elf64_x86_64_relocate_section): Likewise.
2871377e23a2Schristos
2872377e23a2Schristos2009-05-28  Nick Clifton  <nickc@redhat.com>
2873377e23a2Schristos
2874377e23a2Schristos	* targets.c (_bfd_target_vector): Only include plugin target in
2875377e23a2Schristos	all-targets build if BFD_SUPPORTS_PLUGINS is non-zero.
2876377e23a2Schristos
2877377e23a2Schristos2009-05-28  Ulrich Weigand  <uweigand@de.ibm.com>
2878377e23a2Schristos
2879377e23a2Schristos	* elf32-spu.c (struct call_info): New member broken_cycle.
2880377e23a2Schristos	(remove_cycle): Instead of physically removing call_info structures
2881377e23a2Schristos	to break call graph cycles, mark them using the broken_cycle flag.
2882377e23a2Schristos	(mark_overlay_section): Respect broken_cycle flag.
2883377e23a2Schristos	(unmark_overlay_section): Likewise.
2884377e23a2Schristos	(collect_lib_sections): Likewise.
2885377e23a2Schristos	(collect_overlays): Likewise.
2886377e23a2Schristos	(sum_stack): Likewise.
2887377e23a2Schristos
2888377e23a2Schristos2009-05-28  Ulrich Weigand  <uweigand@de.ibm.com>
2889377e23a2Schristos
2890377e23a2Schristos	* elf32-spu.c (insert_callee): Accumulate incoming callee->count.
2891377e23a2Schristos	(mark_functions_via_relocs): Initialize callee->count to 1.
2892377e23a2Schristos	(pasted_function): Likewise.
2893377e23a2Schristos	(spu_elf_auto_overlay): Honor call counts when determining number
2894377e23a2Schristos	of stubs required in software i-cache mode.
2895377e23a2Schristos
2896377e23a2Schristos2009-05-27  Rafael Avila de Espindola  <espindola@google.com>
2897377e23a2Schristos
2898377e23a2Schristos	* plugin.c (program_name): Remove.
2899377e23a2Schristos	(plugin_program_name): New.
2900377e23a2Schristos	(bfd_plugin_set_program_name): New.
2901377e23a2Schristos	(try_load_plugin): Use plugin_program_name.
2902377e23a2Schristos	* plugin.h (bfd_plugin_set_program_name): New.
2903377e23a2Schristos
2904377e23a2Schristos2009-05-27  Rafael Avila de Espindola  <espindola@google.com>
2905377e23a2Schristos
2906377e23a2Schristos	* aclocal.m4: Include ../config/plugins.m4.
2907377e23a2Schristos	* configure.in: Use AC_PLUGINS.
2908377e23a2Schristos	* configure: Regenerate.
2909377e23a2Schristos	* Makefile.in: Regenerate.
2910377e23a2Schristos	* doc/Makefile.in: Regenerate.
2911377e23a2Schristos
2912377e23a2Schristos2009-05-27  Nathan Sidwell  <nathan@codesourcery.com>
2913377e23a2Schristos
2914377e23a2Schristos	* elf32-ppc.c (ppc_elf_relax_section): Work with a partial
2915377e23a2Schristos	link.
2916377e23a2Schristos	* bout.c (b_out_bfd_relax_section): Reject relocatable links.
2917377e23a2Schristos	* elf32-m10300.c (mn10300_elf_relax_section): Likewise.
2918377e23a2Schristos	* elf32-avr.c (elf32_avr_relax_section): Likewise.
2919377e23a2Schristos	* elf32-frv.c (elf32_avr_relax_section): Likewise.
2920377e23a2Schristos	* elf32-xtensa.c (elf_xtensa_relax_section): Likewise.
2921377e23a2Schristos	* elf64-mmix.c (mmix_elf_relax_section): Likewise.
2922377e23a2Schristos	* elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2923377e23a2Schristos	* elfxx-sparc.c (_bfd_sparc_elf_relax_section): Likewise.
2924377e23a2Schristos	* reloc.c (bfd_generic_relax_section): Likewise.
2925377e23a2Schristos	* reloc16.c (bfd_coff_reloc16_relax_section): Likewise.
2926377e23a2Schristos	* vms.c (vms_bfd_relax_section): Likewise.
2927377e23a2Schristos
2928377e23a2Schristos2009-05-26  H.J. Lu  <hongjiu.lu@intel.com>
2929377e23a2Schristos
2930377e23a2Schristos	* elf-bfd.h (_bfd_elf_is_ifunc_symbol): New.
2931377e23a2Schristos
2932377e23a2Schristos	* elf32-i386.c (is_indirect_symbol): Renamed to ...
2933377e23a2Schristos	* elflink.c (_bfd_elf_is_ifunc_symbol): This.
2934377e23a2Schristos
2935377e23a2Schristos	* elf32-i386.c (allocate_dynrelocs): Updated.
2936377e23a2Schristos	(elf_i386_relocate_section): Likewise.
2937377e23a2Schristos	* elf64-x86-64.c (allocate_dynrelocs): Likewise.
2938377e23a2Schristos	(elf64_x86_64_relocate_section): Likewise.
2939377e23a2Schristos
2940377e23a2Schristos	* elf64-x86-64.c (is_indirect_symbol): Removed.
2941377e23a2Schristos
2942377e23a2Schristos2009-05-26  Nick Clifton  <nickc@redhat.com>
2943377e23a2Schristos
2944377e23a2Schristos	* po/id.po: Updated Indonesian translation.
2945377e23a2Schristos
2946377e23a2Schristos2009-05-26  Rafael Avila de Espindola  <espindola@google.com>
2947377e23a2Schristos
2948377e23a2Schristos	* Makefile.am: Run "make dep-am".
2949377e23a2Schristos	(AM_CPPFLAGS): New.
2950377e23a2Schristos	(LIBDL): New.
2951377e23a2Schristos	(ALL_MACHINES): Add cpu-plugin.lo.
2952377e23a2Schristos	(ALL_MACHINES_CFILES): Add cpu-plugin.c.
2953377e23a2Schristos	(BFD32_BACKENDS): Add plugin.lo.
2954377e23a2Schristos	(BFD32_BACKENDS_CFILES): Add plugin.c.
2955377e23a2Schristos	(libbfd_la_LIBADD): Add LIBDL
2956377e23a2Schristos	* archures.c (bfd_architecture): Add bfd_arch_plugin.
2957377e23a2Schristos	(bfd_plugin_arch): Declare.
2958377e23a2Schristos	* bfd-in.h (BFD_SUPPORTS_PLUGINS): New.
2959377e23a2Schristos	* bfd.c (bfd): Add plugin_data.
2960377e23a2Schristos	* config.bfd: Handle the plugin target.
2961377e23a2Schristos	* configure.in: Check for --enable-plugins.
2962377e23a2Schristos	(LT_INIT): Use the dlopen option.
2963377e23a2Schristos	* cpu-plugin.c: New.
2964377e23a2Schristos	* plugin.c: New.
2965377e23a2Schristos	* plugin.h: New.
2966377e23a2Schristos	* targets.c (plugin_vec): Declare.
2967377e23a2Schristos	(_bfd_target_vector): Add plugin_vec.
2968377e23a2Schristos	* Makefile.in: Regenerate.
2969377e23a2Schristos	* bfd-in2.h: Regenerate.
2970377e23a2Schristos	* configure: Regenerate.
2971377e23a2Schristos
2972377e23a2Schristos2009-05-26  Alan Modra  <amodra@bigpond.net.au>
2973377e23a2Schristos
2974377e23a2Schristos	* dep-in.sed: Don't modify .o to .lo here.  Output one filename
2975377e23a2Schristos	per line with all lines having continuation backslash.  Prefix
2976377e23a2Schristos	first line with "A", following lines with "B".
2977377e23a2Schristos	* Makefile.am (DEP): Don't use dep.sed here.
2978377e23a2Schristos	(DEP1): Run $MKDEP on single files, modify .o to .lo here.  Use
2979377e23a2Schristos	dep.sed here on dependencies, sort and uniq.
2980377e23a2Schristos	* Makefile.in: Regenerate.
2981377e23a2Schristos
2982377e23a2Schristos2009-05-25  Tristan Gingold  <gingold@adacore.com>
2983377e23a2Schristos
2984377e23a2Schristos	* makefile.vms: Add verilog.obj to object list OBJS.
2985377e23a2Schristos
2986377e23a2Schristos2009-05-24  Alan Modra  <amodra@bigpond.net.au>
2987377e23a2Schristos
2988377e23a2Schristos	* bfdio.c (bfd_seek): Formatting.  Ensure newly allocated memory
2989377e23a2Schristos	for BFD_IN_MEMORY is cleared.
2990377e23a2Schristos	(bfd_bwrite): Zero excess memory allocated.
2991377e23a2Schristos
2992377e23a2Schristos2009-05-22  Julian Brown  <julian@codesourcery.com>
2993377e23a2Schristos
2994377e23a2Schristos	* elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN): New
2995377e23a2Schristos	macros.
2996377e23a2Schristos	(elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
2997377e23a2Schristos	(elf32_arm_stub_a8_veneer_blx): New stub sequences.
2998377e23a2Schristos	(elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
2999377e23a2Schristos	arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
3000377e23a2Schristos	(elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
3001377e23a2Schristos	(a8_erratum_fix, a8_erratum_reloc): New structs.
3002377e23a2Schristos	(elf32_arm_link_hash_table): Add a8_erratum_fixes,
3003377e23a2Schristos	num_a8_erratum_fixes, fix_cortex_a8 fields.
3004377e23a2Schristos	(elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
3005377e23a2Schristos	(elf32_arm_add_stub): Split into two parts, creating...
3006377e23a2Schristos	(elf32_arm_create_or_find_stub_sec): New function.
3007377e23a2Schristos	(elf32_arm_final_link_relocate): Add forward declaration.
3008377e23a2Schristos	(arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
3009377e23a2Schristos	relocations, multiple relocations per stub.
3010377e23a2Schristos	(find_stub_size_and_template): New (using parts of arm_size_one_stub).
3011377e23a2Schristos	(arm_size_one_stub): Use find_stub_size_and_template.
3012377e23a2Schristos	(a8_reloc_compare): New.
3013377e23a2Schristos	(find_thumb_glue): Add forward declaration.
3014377e23a2Schristos	(cortex_a8_erratum_scan): New.
3015377e23a2Schristos	(elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
3016377e23a2Schristos	(bfd_elf32_arm_set_cortex_a8_fix): New.
3017377e23a2Schristos	(bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
3018377e23a2Schristos	(arm_map_one_stub): Add THUMB32_TYPE support.
3019377e23a2Schristos	(a8_branch_to_stub_data): New.
3020377e23a2Schristos	(make_branch_to_a8_stub): New.
3021377e23a2Schristos	(elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
3022377e23a2Schristos	* bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
3023377e23a2Schristos	(bfd_elf32_arm_set_target_relocs): Add argument for controlling
3024377e23a2Schristos	Cortex-A8 erratum workaround.
3025377e23a2Schristos	* bfd-in2.h: Regenerate.
3026377e23a2Schristos
3027377e23a2Schristos2009-05-22  Alan Modra  <amodra@bigpond.net.au>
3028377e23a2Schristos
3029377e23a2Schristos	* Makefile.am: Run "make dep-am".
3030377e23a2Schristos	* Makefile.in: Regenerate.
3031377e23a2Schristos	* po/SRC-POTFILES.in: Regenerate.
3032377e23a2Schristos
3033377e23a2Schristos2009-05-21  Alan Modra  <amodra@bigpond.net.au>
3034377e23a2Schristos
3035377e23a2Schristos	* elflink.c (elf_link_input_bfd): Correct *pindex change in last
3036377e23a2Schristos	commit.
3037377e23a2Schristos
3038377e23a2Schristos2009-05-21  Alan Modra  <amodra@bigpond.net.au>
3039377e23a2Schristos
3040377e23a2Schristos	* elf-bfd.h (struct elf_backend_data
3041377e23a2Schristos	<elf_backend_link_output_symbol_hook>): Return an int.
3042377e23a2Schristos	* elf64-ppc.c (ppc64_elf_output_symbol_hook): Return 2 to drop
3043377e23a2Schristos	symbols on deleted .opd entries.
3044377e23a2Schristos	* elflink.c (elf_link_output_sym): Return without outputting sym
3045377e23a2Schristos	if output_symbol_hook returns 2.
3046377e23a2Schristos	(elf_link_output_extsym): Don't assign h->indx when symbol discarded.
3047377e23a2Schristos	Abort if we must not discard sym.
3048377e23a2Schristos	(elf_link_input_bfd): Similarly, don't set finfo->indices for
3049377e23a2Schristos	local syms.
3050377e23a2Schristos	(bfd_elf_final_link): Adjust elf_link_output_sym calls.
3051377e23a2Schristos	* elf-vxworks.c (elf_vxworks_link_output_symbol_hook): Adjust for
3052377e23a2Schristos	elf_backend_link_output_symbol_hook return type change.
3053377e23a2Schristos	* elf32-arm.c (output_arch_syminfo): Likewise.
3054377e23a2Schristos	(elf32_arm_output_map_sym, elf32_arm_output_stub_sym): Likewise.
3055377e23a2Schristos	(elf32_arm_output_arch_local_syms): Likewise.
3056377e23a2Schristos	* elf32-cr16c.c (elf32_cr16c_link_output_symbol_hook): Likewise.
3057377e23a2Schristos	* elf32-score.c (s3_bfd_score_elf_link_output_symbol_hook): Likewise.
3058377e23a2Schristos	(bfd_score_elf_link_output_symbol_hook): Likewise.
3059377e23a2Schristos	* elf32-score.h (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
3060377e23a2Schristos	* elf32-score7.c (s7_bfd_score_elf_link_output_symbol_hook): Likewise.
3061377e23a2Schristos	* elf32-sh64.c (sh64_elf_link_output_symbol_hook): Likewise.
3062377e23a2Schristos	* elf32-spu.c (spu_elf_output_symbol_hook): Likewise.
3063377e23a2Schristos	* elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
3064377e23a2Schristos	* elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
3065377e23a2Schristos	* elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
3066377e23a2Schristos	* elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
3067377e23a2Schristos	* elf64-sparc.c (elf64_sparc_output_arch_syms): Likewise.
3068377e23a2Schristos	* elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
3069377e23a2Schristos	* elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
3070377e23a2Schristos
3071377e23a2Schristos2009-05-21  Alan Modra  <amodra@bigpond.net.au>
3072377e23a2Schristos
3073377e23a2Schristos	* elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't segfault on
3074377e23a2Schristos	out of range .opd symbols.
3075377e23a2Schristos
3076377e23a2Schristos2009-05-21  Dave Korn  <dave.korn.cygwin@gmail.com>
3077377e23a2Schristos
3078377e23a2Schristos	* coffgen.c (coff_print_symbol):  Use bfd_fprintf_vma, not
3079377e23a2Schristos	fprintf_vma directly.
3080377e23a2Schristos	* peXXigen.c (pe_print_edata):  Likewise.
3081377e23a2Schristos	(pe_print_pdata):  Likewise.
3082377e23a2Schristos	(_bfd_XX_print_ce_compressed_pdata):  Likewise.
3083377e23a2Schristos	(_bfd_XX_print_private_bfd_data_common):  Likewise.
3084377e23a2Schristos
3085377e23a2Schristos2009-05-19  Dave Korn  <dave.korn.cygwin@gmail.com>
3086377e23a2Schristos
3087377e23a2Schristos	* cofflink.c (process_embedded_commands):  Ignore "-aligncomm".
3088377e23a2Schristos
3089377e23a2Schristos2009-05-15  Andrew Stubbs  <ams@codesourcery.com>
3090377e23a2Schristos	    Paul Brook  <paul@codesourcery.com>
3091377e23a2Schristos
3092377e23a2Schristos	* elf32-arm.c (elf32_arm_fix_exidx_coverage): Don't attempt to
3093377e23a2Schristos	fix discarded sections.
3094377e23a2Schristos
3095377e23a2Schristos2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
3096377e23a2Schristos
3097377e23a2Schristos	* elf32-spu.c (mark_overlay_section): Move .init and .fini
3098377e23a2Schristos	sections into the software icache.
3099377e23a2Schristos
3100377e23a2Schristos2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
3101377e23a2Schristos
3102377e23a2Schristos	* elf32-spu.c (build_stub): Always build "compact" sofware
3103377e23a2Schristos	i-cache stubs.
3104377e23a2Schristos
3105377e23a2Schristos2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
3106377e23a2Schristos
3107377e23a2Schristos	* elf32-spu.c (struct spu_link_hash_table): Add fromelem_size_log2.
3108377e23a2Schristos	(spu_elf_setup): Initialize it.
3109377e23a2Schristos	(spu_elf_size_stubs): Move .ovtab into .bss for software i-cache.
3110377e23a2Schristos	Update to new-sytle cache manager data structures.
3111377e23a2Schristos	(spu_elf_build_stubs): Generate new-style cache manager data
3112377e23a2Schristos	structures and symbols.
3113377e23a2Schristos	(spu_elf_auto_overlay): Update size computation.
3114377e23a2Schristos
3115377e23a2Schristos2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
3116377e23a2Schristos
3117377e23a2Schristos	* elf32-spu.c (spu_elf_modify_segment_map): Move all PF_OVERLAY
3118377e23a2Schristos	segments first amongst the program headers.
3119377e23a2Schristos
3120377e23a2Schristos2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
3121377e23a2Schristos
3122377e23a2Schristos	* elf32-spu.c (spu_elf_relocate_section): Only encode overlay index
3123377e23a2Schristos	into addresses for relocation types that look at high bits.  Remove
3124377e23a2Schristos	special handling of relocation overflow warnings.
3125377e23a2Schristos
3126377e23a2Schristos2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
3127377e23a2Schristos
3128377e23a2Schristos	* elf32-spu.c (mark_functions_via_relocs): Handle cycles in the
3129377e23a2Schristos	control flow graph between fragments of a function.
3130377e23a2Schristos
3131377e23a2Schristos2009-05-14  Ulrich Weigand  <uweigand@de.ibm.com>
3132377e23a2Schristos
3133377e23a2Schristos	* elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
3134377e23a2Schristos	generate only a 16-byte .toe section.
3135377e23a2Schristos	(spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
3136377e23a2Schristos
3137377e23a2Schristos2009-05-14  Alan Modra  <amodra@bigpond.net.au>
3138377e23a2Schristos
3139377e23a2Schristos	* elf32-spu.c (spu_elf_size_stubs): Split out section placement to..
3140377e23a2Schristos	(spu_elf_place_overlay_data): ..here.  New function.
3141377e23a2Schristos	* elf32-spu.h (spu_elf_place_overlay_data): Declare.
3142377e23a2Schristos
3143377e23a2Schristos2009-05-13  Andrew Jenner  <andrew@codesourcery.com>
3144377e23a2Schristos
3145377e23a2Schristos	* elf32-arm.c: Move sysdep.h to start of file.
3146377e23a2Schristos
3147377e23a2Schristos2009-05-11  Ulrich Weigand  <uweigand@de.ibm.com>
3148377e23a2Schristos
3149377e23a2Schristos	* elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
3150377e23a2Schristos	start of overlays.
3151377e23a2Schristos	(spu_elf_build_stubs): Don't define __icache_tagbase.  Define
3152377e23a2Schristos	__icache_tag_array and __icache_tag_array_size.
3153377e23a2Schristos
3154377e23a2Schristos2009-05-11  Masaki Muranaka  <monaka@monami-software.com>
3155377e23a2Schristos
3156377e23a2Schristos	* elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
3157377e23a2Schristos	ATTRIBUTE_UNUSED.
3158377e23a2Schristos	(bfinfdpic_link_omit_section_dynsym): Likewise.
3159377e23a2Schristos	(elf32_bfinfdpic_finish_dynamic_sections): Likewise.
3160377e23a2Schristos
3161377e23a2Schristos2009-05-05  Paul Brook  <paul@codesourcery.com>
3162377e23a2Schristos
3163377e23a2Schristos	* bfd-in.h (elf32_arm_fix_exidx_coverage): Add prototype.
3164377e23a2Schristos	* bfd-in2.h: Regenerate.
3165377e23a2Schristos	* elf32-arm.c (arm_unwind_edit_type, arm_unwind_table_edit): Define.
3166377e23a2Schristos	(_arm_elf_section_data): Add text and exidx fields.
3167377e23a2Schristos	(add_unwind_table_edit, get_arm_elf_section_data, adjust_exidx_size,
3168377e23a2Schristos	insert_cantunwind_after, elf32_arm_fix_exidx_coverage, offset_prel31,
3169377e23a2Schristos	copy_exidx_entry): New functions.
3170377e23a2Schristos	(elf32_arm_write_section): Fixup .ARM.exidx contents.
3171377e23a2Schristos
3172377e23a2Schristos2009-05-05  Christophe lyon  <christophe.lyon@st.com>
3173377e23a2Schristos
3174377e23a2Schristos	* elf32-arm.c (DEF_STUBS): New helper define.
3175377e23a2Schristos	(DEF_STUB): Likewise.
3176377e23a2Schristos	(stub_def): New type.
3177377e23a2Schristos	(stub_definitions): New array, containing stub template pointers
3178377e23a2Schristos	and sizes.
3179377e23a2Schristos	(arm_size_one_stub): Make use of stub_definitions.
3180377e23a2Schristos
3181377e23a2Schristos2009-05-04  Dave Korn  <dave.korn.cygwin@gmail.com>
3182377e23a2Schristos
3183377e23a2Schristos	* elflink.c (find_version_for_sym):  Remove from here, ...
3184377e23a2Schristos	* linker.c (bfd_find_version_for_sym):  ... rename, replace
3185377e23a2Schristos	here, make public and update all callers.
3186377e23a2Schristos	* bfd-in2.h:  Regenerate.
3187377e23a2Schristos
3188377e23a2Schristos2009-04-30  Nick Clifton  <nickc@redhat.com>
3189377e23a2Schristos
3190377e23a2Schristos	* elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs
3191377e23a2Schristos	section pointer.
3192377e23a2Schristos	(struct elf_obj_data): Add has_ifunc_symbols boolean.
3193377e23a2Schristos	* elf.c (swap_out_syms): Convert BSF_GNU_INDIRECT_FUNCTION flags
3194377e23a2Schristos	into a STT_GNU_IFUNC symbol type.
3195377e23a2Schristos	(_bfd_elf_is_function_type): Accept STT_GNU_IFUNC as a function
3196377e23a2Schristos	type.
3197377e23a2Schristos	(_bfd_elf_set_osabi): Set the osasbi field to ELFOSABI_LINUX if
3198377e23a2Schristos	the binary contains ifunc symbols.
3199377e23a2Schristos	* elfcode.h (elf_slurp_symbol_table): Translate the STT_GNU_IFUNC
3200377e23a2Schristos	symbol type into a BSF_GNU_INDIRECT_FUNCTION flag.
3201377e23a2Schristos	* elf32-i386.c (is_indirect_function): New function.
3202377e23a2Schristos	(elf_i386_check_relocs): Create an ifunc output section.
3203377e23a2Schristos	(allocate_dynrelocs): Create dynamic relocs in the ifunc output
3204377e23a2Schristos	section if necessary.
3205377e23a2Schristos	(elf_i386_relocate_section): Emit a reloc against an ifunc symbol
3206377e23a2Schristos	if necessary.
3207377e23a2Schristos	(elf_i386_add_symbol_hook): New function. Set the
3208377e23a2Schristos	has_ifunc_symbols field of the elf_obj_data structure if an ifunc
3209377e23a2Schristos	symbol is encountered.
3210377e23a2Schristos	(elf_backend_post_process_headers): Define.
3211377e23a2Schristos	(elf_backend_add_symbol_hook): Define.
3212377e23a2Schristos	(elf_i386_post_process_headers): Rename to
3213377e23a2Schristos	elf_i388_fbsd_post_process_headers.
3214377e23a2Schristos	* elf64-x86_64.c (IS_X86_64_PCREL_TYPE): New macro.
3215377e23a2Schristos	(is_indirect_function): New function.
3216377e23a2Schristos	(elf64_x86_64_check_relocs): Create an ifunc output section.
3217377e23a2Schristos	(allocate_dynrelocs): Create dynamic relocs in the ifunc output
3218377e23a2Schristos	section if necessary.
3219377e23a2Schristos	(elf64_x86_64_relocate_section): Emit a reloc against an ifunc
3220377e23a2Schristos	symbol if necessary.
3221377e23a2Schristos	(elf_i386_add_symbol_hook): Set the has_ifunc_symbols field of the
3222377e23a2Schristos	elf_obj_data structure if an ifunc symbol is encountered.
3223377e23a2Schristos	(elf_backend_post_process_headers): Define.
3224377e23a2Schristos	* elflink.c (_bfd_elf_adjust_dynamic_symbol): Always create a PLT
3225377e23a2Schristos	if we have ifunc symbols to handle.
3226377e23a2Schristos	(get_ifunc_reloc_section_name): New function.  Computes the name
3227377e23a2Schristos	for an ifunc section.
3228377e23a2Schristos	(_bfd_elf_make_ifunc_reloc_section): New function.  Creates a
3229377e23a2Schristos	section to hold ifunc relocs.
3230377e23a2Schristos	* syms.c (BSF_GNU_INDIRECT_FUNCTION): Define.
3231377e23a2Schristos	(bfd_print_symbol_vandf): Handle ifunc symbols.
3232377e23a2Schristos	(bfd_decode_symclass): Likewise.
3233377e23a2Schristos	* bfd-in2.h: Regenerate.
3234377e23a2Schristos
3235377e23a2Schristos2009-04-30  Joseph Myers  <joseph@codesourcery.com>
3236377e23a2Schristos
3237377e23a2Schristos	* elf32-arm.c (elf32_arm_check_relocs): Give errors for absolute
3238377e23a2Schristos	MOVW and MOVT relocations in a shared library link.
3239377e23a2Schristos
3240377e23a2Schristos2009-04-27  Anthony Green  <green@moxielogic.com>
3241377e23a2Schristos
3242377e23a2Schristos	* verilog.c: New file.
3243377e23a2Schristos	* Makefile.am (BFD32_LIBS): Add verilog.c.
3244377e23a2Schristos	(BFD32_LIBS_CFILES): Add verilog.c.
3245377e23a2Schristos	(verilog.lo): New build rule.
3246377e23a2Schristos	* Makefile.in: Rebuilt.
3247377e23a2Schristos	* targets.c: Add verilog support.
3248377e23a2Schristos	* bfd.c (tdata union): Add Verilog private data field.
3249377e23a2Schristos	* bfd-in2.h: Regenerate.
3250377e23a2Schristos
3251377e23a2Schristos2009-04-27  H.J. Lu  <hongjiu.lu@intel.com>
3252377e23a2Schristos
3253377e23a2Schristos	* peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
3254377e23a2Schristos	copy pe_opthdr.
3255377e23a2Schristos
3256377e23a2Schristos2009-04-23  Matthias Klose  <doko@ubuntu.com>
3257377e23a2Schristos
3258377e23a2Schristos	* peXXigen.c (_bfd_XXi_swap_sym_in): Initialize `name'.
3259377e23a2Schristos
3260377e23a2Schristos2009-04-22  Christophe Lyon  <christophe.lyon@st.com>
3261377e23a2Schristos
3262377e23a2Schristos	PR9743
3263377e23a2Schristos	* elf32-arm.c (arm_type_of_stub): Handle R_ARM_THM_JUMP24,
3264377e23a2Schristos	R_ARM_JUMP24 and R_ARM_PLT32 relocations.
3265377e23a2Schristos	(elf32_arm_size_stubs): Likewise.
3266377e23a2Schristos	(record_thumb_to_arm_glue): Deleted unused function.
3267377e23a2Schristos	(bfd_elf32_arm_process_before_allocation): No longer handle
3268377e23a2Schristos	R_ARM_THM_JUMP24, R_ARM_JUMP24 and R_ARM_PLT32 relocations here.
3269377e23a2Schristos	(elf32_arm_final_link_relocate): Handle R_ARM_THM_JUMP24,
3270377e23a2Schristos	R_ARM_JUMP24 and R_ARM_PLT32 relocations.
3271377e23a2Schristos
3272377e23a2Schristos2009-04-21  Daniel Jacobowitz  <dan@codesourcery.com>
3273377e23a2Schristos
3274377e23a2Schristos	* elf32-arm.c (INTERWORK_FLAG): Check BFD_LINKER_CREATED.
3275377e23a2Schristos	(elf32_arm_write_section): Declare early.
3276377e23a2Schristos	(elf32_arm_size_stubs): Skip non-stub sections in the stub BFD.
3277377e23a2Schristos	(arm_allocate_glue_section_space): Exclude empty sections.
3278377e23a2Schristos	(ARM_GLUE_SECTION_FLAGS): Add SEC_LINKER_CREATED.
3279377e23a2Schristos	(bfd_elf32_arm_add_glue_sections_to_bfd): Do not skip the stub
3280377e23a2Schristos	BFD.
3281377e23a2Schristos	(elf32_arm_output_glue_section, elf32_arm_final_link): New.
3282377e23a2Schristos	(elf32_arm_merge_eabi_attributes): Skip the stub BFD.
3283377e23a2Schristos	(elf32_arm_size_dynamic_sections): Allocate interworking
3284377e23a2Schristos	sections here.
3285377e23a2Schristos	(bfd_elf32_bfd_final_link): Define.
3286377e23a2Schristos
3287377e23a2Schristos2009-04-21  H.J. Lu  <hongjiu.lu@intel.com>
3288377e23a2Schristos
3289377e23a2Schristos	* coff-ia64.c (COFF_PAGE_SIZE): Changed to 8K.
3290377e23a2Schristos
3291377e23a2Schristos	* coffcode.h (coff_compute_section_file_positions): Clear
3292377e23a2Schristos	D_PAGED if PE section alignment is smaller than COFF_PAGE_SIZE.
3293377e23a2Schristos
3294377e23a2Schristos	* libcoff-in.h (pe_tdata): Remove force_minimum_alignment and
3295377e23a2Schristos	force_minimum_alignment.
3296377e23a2Schristos
3297377e23a2Schristos	* libcoff.h: Regenerated.
3298377e23a2Schristos
3299377e23a2Schristos	* pei-ia64.c (PEI_TARGET_SUBSYSTEM): Removed.
3300377e23a2Schristos	(PEI_FORCE_MINIMUM_ALIGNMENT): Likewise.
3301377e23a2Schristos
3302377e23a2Schristos	* peicode.h (pe_mkobject): Don't set force_minimum_alignment
3303377e23a2Schristos	nor target_subsystem.
3304377e23a2Schristos
3305377e23a2Schristos	* peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't check
3306377e23a2Schristos	force_minimum_alignment nor target_subsystem.
3307377e23a2Schristos
3308377e23a2Schristos2009-04-21  Kai Tietz  <kai.tietz@onevision.com>
3309377e23a2Schristos
3310377e23a2Schristos	* coff-x86_64.c (PEI_HEADERS): Protect includes.
3311377e23a2Schristos	(bfd_pe_print_pdata): Remove #ifdef PE variation.
3312377e23a2Schristos	* pei-x86_64.c (PEI_HEADERS): Define to prevent double
3313377e23a2Schristos	include in coff-x86_64.c of headers.
3314377e23a2Schristos	(PDATA_ROW_SIZE): New define.
3315377e23a2Schristos	(pex_regs[]): New static array.
3316377e23a2Schristos	(pex64_get_runtime_function): New static function.
3317377e23a2Schristos	(pex64_get_unwind_info): Likewise.
3318377e23a2Schristos	(pex64_get_scope_entry): Likewise.
3319377e23a2Schristos	(pex64_xdata_print_uwd_codes): Likewise.
3320377e23a2Schristos	(pex64_get_section_by_rva): Likewise.
3321377e23a2Schristos	(pex64_dump_xdata): Likewise.
3322377e23a2Schristos	(pex64_bfd_print_pdata): Likewise.
3323377e23a2Schristos	(bfd_pe_print_pdata): Define as pex64_bfd_print_pdata.
3324377e23a2Schristos	* peXXigen.c (_bfd_pex64_print_pdata): Removed implementation.
3325377e23a2Schristos	* libpei.h (_bfd_pex64_print_pdata): Removed declaration.
3326377e23a2Schristos
3327377e23a2Schristos2009-04-19  Peter O'Gorman  <binutils@mlists.thewrittenword.com>
3328377e23a2Schristos	    Alan Modra  <amodra@bigpond.net.au>
3329377e23a2Schristos	    Dave Korn  <dave.korn.cygwin@gmail.com>
3330377e23a2Schristos
3331377e23a2Schristos	* peXXigen.c (_bfd_XXi_swap_sym_in): Fix name handling w.r.t
3332377e23a2Schristos	long names and non-NUL-terminated strings.
3333377e23a2Schristos
3334377e23a2Schristos2009-04-17  H.J. Lu  <hongjiu.lu@intel.com>
3335377e23a2Schristos
3336377e23a2Schristos	* bfd-in2.h: Regenerated.
3337377e23a2Schristos
3338377e23a2Schristos2009-04-17  H.J. Lu  <hongjiu.lu@intel.com>
3339377e23a2Schristos
3340377e23a2Schristos	* peXXigen.c (_bfd_XX_print_private_bfd_data_common): Replace
3341377e23a2Schristos	IMAGE_SUBSYSTEM_EFI_ROM with IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER.
3342377e23a2Schristos
3343377e23a2Schristos2009-04-17  H.J. Lu  <hongjiu.lu@intel.com>
3344377e23a2Schristos
3345377e23a2Schristos	PR binutils/10074
3346377e23a2Schristos	* coffcode.h (bfd_pei_p): New.
3347377e23a2Schristos
3348377e23a2Schristos	* config.bfd: Remove bfd_efi_bsdrv_ia32_vec,
3349377e23a2Schristos	bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
3350377e23a2Schristos	bfd_efi_rtdrv_x86_64_vec, bfd_efi_bsdrv_ia64_vec and
3351377e23a2Schristos	bfd_efi_rtdrv_ia64_vec.  Replace bfd_efi_app_ia32_vec,
3352377e23a2Schristos	bfd_efi_app_x86_64_vec and bfd_efi_app_ia64_vec with
3353377e23a2Schristos	i386pei_vec, x86_64pei_vec and bfd_pei_ia64_vec, respectively.
3354377e23a2Schristos
3355377e23a2Schristos	* configure.in: Remove bfd_efi_bsdrv_ia32_vec,
3356377e23a2Schristos	bfd_efi_rtdrv_ia32_vec, bfd_efi_bsdrv_x86_64_vec,
3357377e23a2Schristos	bfd_efi_rtdrv_x86_64_vec,
3358377e23a2Schristos	bfd_efi_bsdrv_ia64_vec and bfd_efi_rtdrv_ia64_vec.  Replace
3359377e23a2Schristos	bfd_efi_ia64_vec with bfd_pei_ia64_vec.
3360377e23a2Schristos	* targets.c: Likewise.
3361377e23a2Schristos
3362377e23a2Schristos	* configure: Regenerated.
3363377e23a2Schristos	* libcoff.h: Likewise.
3364377e23a2Schristos	* Makefile.in: Likewise.
3365377e23a2Schristos
3366377e23a2Schristos	* efi-app-ia32.c: Removed.
3367377e23a2Schristos	* efi-app-x86_64.c: Likewise.
3368377e23a2Schristos	* efi-bsdrv-ia32.c: Likewise.
3369377e23a2Schristos	* efi-bsdrv-ia64.c: Likewise.
3370377e23a2Schristos	* efi-bsdrv-x86_64.c: Likewise.
3371377e23a2Schristos	* efi-rtdrv-ia32.c: Likewise.
3372377e23a2Schristos	* efi-rtdrv-ia64.c: Likewise.
3373377e23a2Schristos	* efi-rtdrv-x86_64.c: Likewise.
3374377e23a2Schristos	* efi-rtdrv-ia32.c: Likewise.
3375377e23a2Schristos
3376377e23a2Schristos	* efi-app-ia64.c: Moved to ...
3377377e23a2Schristos	* pei-ia64.c: This.
3378377e23a2Schristos	(TARGET_SYM): Set to bfd_pei_ia64_vec.
3379377e23a2Schristos	(TARGET_NAME): Set to pei-ia64.
3380377e23a2Schristos
3381377e23a2Schristos	* libpei.h (bfd_target_pei_p): Removed.
3382377e23a2Schristos	(bfd_target_pei_arch): Likewise.
3383377e23a2Schristos	(bfd_target_efi_app_p): Likewise.
3384377e23a2Schristos	(bfd_target_efi_app_arch): Likewise.
3385377e23a2Schristos	(bfd_target_efi_bsdrv_p): Likewise.
3386377e23a2Schristos	(bfd_target_efi_bsdrv_arch): Likewise.
3387377e23a2Schristos	(bfd_target_efi_rtdrv_p): Likewise.
3388377e23a2Schristos	(bfd_target_efi_rtdrv_arch): Likewise.
3389377e23a2Schristos	(bfd_pe_executable_p): Likewise.
3390377e23a2Schristos
3391377e23a2Schristos	* Makefile.am (BFD32_BACKENDS): Remove efi-app-ia32.lo,
3392377e23a2Schristos	efi-bsdrv-ia32.lo and efi-rtdrv-ia32.lo.
3393377e23a2Schristos	(BFD32_BACKENDS_CFILES): Remove efi-app-ia32.c, efi-bsdrv-ia32.c
3394377e23a2Schristos	and efi-rtdrv-ia32.c.
3395377e23a2Schristos	(BFD64_BACKENDS): Remove efi-app-ia64.lo, efi-bsdrv-ia64.lo,
3396377e23a2Schristos	efi-rtdrv-ia64.lo, efi-app-x86_64.lo, efi-bsdrv-x86_64.lo and
3397377e23a2Schristos	efi-rtdrv-x86_64.lo. Add pei-ia64.lo.
3398377e23a2Schristos	(BFD64_BACKENDS_CFILES): Remove efi-app-ia64.c, efi-bsdrv-ia64.c,
3399377e23a2Schristos	efi-rtdrv-ia64.c, efi-app-x86_64.c, efi-bsdrv-x86_64.c and
3400377e23a2Schristos	efi-rtdrv-x86_64.c. Add pei-ia64.c.
3401377e23a2Schristos	(efi-app-ia64.lo): Removed.
3402377e23a2Schristos	(efi-bsdrv-ia32.lo): Likewise.
3403377e23a2Schristos	(efi-rtdrv-ia32.lo): Likewise.
3404377e23a2Schristos	(efi-app-ia64.lo): Likewise.
3405377e23a2Schristos	(efi-bsdrv-ia64.lo): Likewise.
3406377e23a2Schristos	(efi-rtdrv-ia64.lo): Likewise.
3407377e23a2Schristos	(efi-app-x86_64.lo): Likewise.
3408377e23a2Schristos	(efi-bsdrv-x86_64.lo): Likewise.
3409377e23a2Schristos	(efi-rtdrv-x86_64.lo): Likewise.
3410377e23a2Schristos	(pei-ia64.lo): New.
3411377e23a2Schristos
3412377e23a2Schristos	* peicode.h (coff_swap_scnhdr_in): Replace bfd_pe_executable_p
3413377e23a2Schristos	with bfd_pei_p.
3414377e23a2Schristos	(arch_type): Removed.
3415377e23a2Schristos	(pe_arch): Likewise.
3416377e23a2Schristos	(pe_bfd_object_p): Just return coff_object_p.
3417377e23a2Schristos
3418377e23a2Schristos	* peXXigen.c (_bfd_XXi_swap_scnhdr_out): Replace
3419377e23a2Schristos	bfd_pe_executable_p with bfd_pei_p.
3420377e23a2Schristos
3421377e23a2Schristos2009-04-17  Christophe Lyon  <christophe.lyon@st.com>
3422377e23a2Schristos
3423377e23a2Schristos	* elf32-arm.c (elf32_arm_size_stubs): Handle long branches through
3424377e23a2Schristos	PLT entries to an undefined symbol when generating a shared
3425377e23a2Schristos	library.
3426377e23a2Schristos
3427377e23a2Schristos2009-04-17  Nick Clifton  <nickc@redhat.com>
3428377e23a2Schristos
3429377e23a2Schristos	PR 9909
3430377e23a2Schristos	* coffcode.h (handle_COMDAT): Allow for external COMDAT symbols.
3431377e23a2Schristos
3432377e23a2Schristos2009-04-16  Richard Sandiford  <r.sandiford@uk.ibm.com>
3433377e23a2Schristos
3434377e23a2Schristos	* aout-adobe.c (aout_32_bfd_define_common_symbol): Define.
3435377e23a2Schristos	* aout-target.h (MY_bfd_define_common_symbol): Likewise.
3436377e23a2Schristos	* aout-tic30.c (MY_bfd_define_common_symbol): Likewise.
3437377e23a2Schristos	* binary.c (binary_bfd_define_common_symbol): Likewise.
3438377e23a2Schristos	* bout.c (b_out_bfd_define_common_symbol): Likewise.
3439377e23a2Schristos	* coff-alpha.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
3440377e23a2Schristos	* coff-mips.c (_bfd_ecoff_bfd_define_common_symbol): Likewise.
3441377e23a2Schristos	* coffcode.h (coff_bfd_define_common_symbol): Likewise.
3442377e23a2Schristos	* elfxx-target.h (bfd_elfNN_bfd_define_common_symbol): Likewise.
3443377e23a2Schristos	* i386msdos.c (msdos_bfd_define_common_symbol): Likewise.
3444377e23a2Schristos	* i386os9k.c (os9k_bfd_define_common_symbol): Likewise.
3445377e23a2Schristos	* ieee.c (ieee_bfd_define_common_symbol): Likewise.
3446377e23a2Schristos	* ihex.c (ihex_bfd_define_common_symbol): Likewise.
3447377e23a2Schristos	* libbfd-in.h (_bfd_nolink_bfd_define_common_symbol): Likewise.
3448377e23a2Schristos	* mach-o.c (bfd_mach_o_bfd_define_common_symbol): Likewise.
3449377e23a2Schristos	* mmo.c (mmo_bfd_define_common_symbol): Likewise.
3450377e23a2Schristos	* nlm-target.h (nlm_bfd_define_common_symbol): Likewise.
3451377e23a2Schristos	* oasys.c (oasys_bfd_define_common_symbol): Likewise.
3452377e23a2Schristos	* pef.c (bfd_pef_bfd_define_common_symbol): Likewise.
3453377e23a2Schristos	* ppcboot.c (ppcboot_bfd_define_common_symbol): Likewise.
3454377e23a2Schristos	* som.c (som_bfd_define_common_symbol): Likewise.
3455377e23a2Schristos	* srec.c (srec_bfd_define_common_symbol): Likewise.
3456377e23a2Schristos	* tekhex.c (tekhex_bfd_define_common_symbol): Likewise.
3457377e23a2Schristos	* versados.c (versados_bfd_define_common_symbol): Likewise.
3458377e23a2Schristos	* vms.c (vms_bfd_define_common_symbol): Likewise.
3459377e23a2Schristos	* xcoff-target.h (_bfd_xcoff_bfd_define_common_symbol): Likewise.
3460377e23a2Schristos	* xsym.c (bfd_sym_bfd_define_common_symbol): Likewise.
3461377e23a2Schristos	* coff-rs6000.c (rs6000coff_vec): Add _bfd_xcoff_define_common_symbol.
3462377e23a2Schristos	(pmac_xcoff_vec): Likewise.
3463377e23a2Schristos	* coff64-rs6000.c (rs6000coff64_vec): Likewise.
3464377e23a2Schristos	(aix5coff64_vec): Likewise.
3465377e23a2Schristos	* linker.c (bfd_generic_define_common_symbol): New function.
3466377e23a2Schristos	* targets.c (BFD_JUMP_TABLE_LINK): Add NAME##_bfd_define_common_symbol.
3467377e23a2Schristos	(_bfd_define_common_symbol): New field.
3468377e23a2Schristos	* libcoff-in.h (_bfd_xcoff_define_common_symbol): Declare.
3469377e23a2Schristos	* xcofflink.c (_bfd_xcoff_define_common_symbol): New function.
3470377e23a2Schristos	(xcoff_build_ldsyms): Don't set XCOFF_DEF_REGULAR for common
3471377e23a2Schristos	symbols here.
3472377e23a2Schristos	* bfd-in2.h: Regenerate.
3473377e23a2Schristos	* libbfd.h: Likewise.
3474377e23a2Schristos	* libcoff.h: Likewise.
3475377e23a2Schristos
3476377e23a2Schristos2009-04-15  Anthony Green  <green@moxielogic.com>
3477377e23a2Schristos
3478377e23a2Schristos	* targets.c: Add moxie support.
3479377e23a2Schristos	* Makefile.am: Ditto.
3480377e23a2Schristos	* Makefile.in: Rebuilt.
3481377e23a2Schristos	* cpu-moxie.c, elf32-moxie.c: New files.
3482377e23a2Schristos	* archures.c: Add moxie support.
3483377e23a2Schristos	* configure.in: Add moxie support.
3484377e23a2Schristos	* configure: Rebuilt.
3485377e23a2Schristos	* config.bfd, archures.c: Add moxie support.
3486377e23a2Schristos	* bfd-in2.h: Rebuilt.
3487377e23a2Schristos
3488377e23a2Schristos2009-04-15  Christophe Lyon  <christophe.lyon@st.com>
3489377e23a2Schristos
3490377e23a2Schristos	* elf32-arm.c (elf32_arm_final_link_relocate): Don't convert ARM
3491377e23a2Schristos	branch to an undef weak symbol into a jump to next instruction if
3492377e23a2Schristos	a PLT entry will be created.
3493377e23a2Schristos
3494377e23a2Schristos2009-04-14  Dave Korn  <dave.korn.cygwin@gmail.com>
3495377e23a2Schristos
3496377e23a2Schristos	* coffgen.c (make_a_section_from_file):  Set the backend long
3497377e23a2Schristos	section names enable if long section names found on input.
3498377e23a2Schristos	* coffcode.h:  Extend long section names documentation to match.
3499377e23a2Schristos
3500377e23a2Schristos2009-04-08  H.J. Lu  <hongjiu.lu@intel.com>
3501377e23a2Schristos
3502377e23a2Schristos	* elflink.c (elf_link_add_object_symbols): Warn alternate ELF
3503377e23a2Schristos	machine code.
3504377e23a2Schristos
3505377e23a2Schristos2009-04-07  DJ Delorie  <dj@redhat.com>
3506377e23a2Schristos
3507377e23a2Schristos	* archures.c: Add bfd_mach_mep_c5.
3508377e23a2Schristos	* bfd-in2.h: Likewise.
3509377e23a2Schristos	* cpu-mep.c: Add bfd_c5_arch.
3510377e23a2Schristos	* elf32-mep.c: Support it.
3511377e23a2Schristos
3512377e23a2Schristos2009-04-07  H.J. Lu  <hongjiu.lu@intel.com>
3513377e23a2Schristos
3514377e23a2Schristos	* elflink.c (_bfd_elf_section_already_linked): Add `\n' for
3515377e23a2Schristos	info->callbacks->einfo.
3516377e23a2Schristos	* linker.c (_bfd_generic_section_already_linked): Likewise.
3517377e23a2Schristos
3518377e23a2Schristos2009-04-06  DJ Delorie  <dj@redhat.com>
3519377e23a2Schristos
3520377e23a2Schristos	* elf32-h8300.c (elf32_h8_relax_section): Relax MOVA opcodes.
3521377e23a2Schristos
3522377e23a2Schristos2009-04-06  H.J. Lu  <hongjiu.lu@intel.com>
3523377e23a2Schristos
3524377e23a2Schristos	* coff-x86_64.c (bfd_pe_print_pdata): Defined to
3525377e23a2Schristos	_bfd_pex64_print_pdata only if PE is defined.
3526377e23a2Schristos
3527377e23a2Schristos	* libpei.h (_bfd_pep_print_x64_pdata): Renamed to ...
3528377e23a2Schristos	(_bfd_pex64_print_pdata): This.
3529377e23a2Schristos
3530377e23a2Schristos	* peXXigen.c (_bfd_pep_print_x64_pdata): Renamed to ...
3531377e23a2Schristos	(_bfd_pex64_print_pdata): This.  Defined only if COFF_WITH_pex64
3532377e23a2Schristos	is defined.
3533377e23a2Schristos
3534377e23a2Schristos2009-04-05  Kai Tietz  <kai.tietz@onevision.com>
3535377e23a2Schristos
3536377e23a2Schristos	* coff-x86_64.c (bfd_pe_print_pdata): Define as
3537377e23a2Schristos	_bfd_pep_print_x64_pdata.
3538377e23a2Schristos	* libpei.h (_bfd_pep_print_x64_pdata): Add prototype.
3539377e23a2Schristos	* peXXigen.c (_bfd_pep_print_x64_pdata): New.
3540377e23a2Schristos
3541377e23a2Schristos2009-04-02  Sterling Augustine  <sterling@jaw.hq.tensilica.com>
3542377e23a2Schristos
3543377e23a2Schristos	* elf32-xtensa.c (relax_property_section): Always set r_offset
3544377e23a2Schristos	to zero.
3545377e23a2Schristos
3546377e23a2Schristos2009-04-02  Christophe Lyon  <christophe.lyon@st.com>
3547377e23a2Schristos
3548377e23a2Schristos	* elf32-arm.c (elf32_arm_stub_long_branch_v4t_thumb_thumb,
3549377e23a2Schristos	elf32_arm_stub_long_branch_v4t_thumb_thumb_pic): Two new long
3550377e23a2Schristos	branch stubs.
3551377e23a2Schristos	(elf32_arm_stub_type): New enum values for the two new stubs.
3552377e23a2Schristos	(arm_type_of_stub): Make use of the two new stubs.
3553377e23a2Schristos	(arm_size_one_stub): Handle the two new stubs.
3554377e23a2Schristos
3555377e23a2Schristos2009-04-01  Matt Thomas  <matt@netbsd.org>
3556377e23a2Schristos
3557377e23a2Schristos	* elf32-vax.c (elf_vax_check_relocs): Do not put relocations against
3558377e23a2Schristos	hidden symbols into the GOT or PLT.GOT.
3559377e23a2Schristos	(elf_vax_relocate_section): Do not emit a PCREL reloc
3560377e23a2Schristos	into a shared object if it is against a hidden symbol.
3561377e23a2Schristos
3562377e23a2Schristos2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
3563377e23a2Schristos
3564377e23a2Schristos	* xcofflink.c (xcoff_archive_info): Add contains_shared_object_p
3565377e23a2Schristos	and know_contains_shared_object_p.
3566377e23a2Schristos	(xcoff_archive_contains_shared_object_p): Add an "info" parameter.
3567377e23a2Schristos	Cache the result in the archive_info table.
3568377e23a2Schristos	(xcoff_auto_export_p): Add an "info" parameter and update the
3569377e23a2Schristos	call to xcoff_archive_contains_shared_object_p.
3570377e23a2Schristos	(xcoff_mark_auto_exports): Update accordingly.
3571377e23a2Schristos	(xcoff_post_gc_symbol): Likewise.
3572377e23a2Schristos
3573377e23a2Schristos2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
3574377e23a2Schristos
3575377e23a2Schristos	* xcofflink.c (bfd_link_input_bfd): Treat __rtinit as C_HIDEXT
3576377e23a2Schristos	rather than C_EXT.
3577377e23a2Schristos
3578377e23a2Schristos2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
3579377e23a2Schristos
3580377e23a2Schristos	* coff-rs6000.c (member_layout): New structure.
3581377e23a2Schristos	(archive_iterator): Likewise.
3582377e23a2Schristos	(member_layout_init): New function.
3583377e23a2Schristos	(archive_iterator_begin): Likewise.
3584377e23a2Schristos	(archive_iterator_next): Likewise.
3585377e23a2Schristos	(xcoff_write_armap_old): Use the new iterator functions.
3586377e23a2Schristos	(do_shared_object_padding): Delete.
3587377e23a2Schristos	(xcoff_write_armap_big): Use the new iterator functions.  Simplify
3588377e23a2Schristos	handling of arch_info.
3589377e23a2Schristos	(xcoff_write_archive_contents_old): Allocate arelt_data in the
3590377e23a2Schristos	first loop rather than the second.  Allocate a member header if
3591377e23a2Schristos	there isn't one, then work out the stat information and length
3592377e23a2Schristos	in the first loop too.  Use the new iterators for the second loop.
3593377e23a2Schristos	(xcoff_write_archive_contents_big): Likewise.
3594377e23a2Schristos
3595377e23a2Schristos2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
3596377e23a2Schristos
3597377e23a2Schristos	* bfd-in.h (bfd_xcoff_split_import_path): Declare.
3598377e23a2Schristos	(bfd_xcoff_set_archive_import_path): Likewise.
3599377e23a2Schristos	* bfd-in2.h: Regenerate.
3600377e23a2Schristos	* xcofflink.c: Include libiberty.h.
3601377e23a2Schristos	(xcoff_archive_info): New structure.
3602377e23a2Schristos	(xcoff_archive_info_hash): New function.
3603377e23a2Schristos	(xcoff_archive_info_eq): Likewise.
3604377e23a2Schristos	(xcoff_get_archive_info): Likewise.
3605377e23a2Schristos	(_bfd_xcoff_bfd_link_hash_table_create): Initialize archive_info.
3606377e23a2Schristos	(bfd_xcoff_split_import_path): New function.
3607377e23a2Schristos	(bfd_xcoff_set_archive_import_path): Likewise.
3608377e23a2Schristos	(xcoff_set_import_path): Move earlier in file.
3609377e23a2Schristos	(xcoff_link_add_dynamic_symbols): Set the import path of a non-archive
3610*48596154Schristos	object to the directory part of the bfd's filename.  Get the
3611377e23a2Schristos	import path and filename of an archive object from the archive's
3612377e23a2Schristos	xcoff_tdata, initializing it if necessary.  Update use of
3613377e23a2Schristos	import_file_id.
3614377e23a2Schristos	(bfd_link_input_bfd): Update use of import_file_id.
3615377e23a2Schristos	(xcoff_write_global_symbol): Likewise.
3616377e23a2Schristos
3617377e23a2Schristos2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
3618377e23a2Schristos
3619377e23a2Schristos	* xcofflink.c (xcoff_link_hash_table): Moved from include/coff/xcoff.h.
3620377e23a2Schristos
3621377e23a2Schristos2009-04-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
3622377e23a2Schristos
3623377e23a2Schristos	* xcofflink.c (xcoff_link_create_extra_sections): Don't create
3624377e23a2Schristos	a .loader section for relocatable links.
3625377e23a2Schristos	(xcoff_need_ldrel_p): New function.
3626377e23a2Schristos	(xcoff_mark): Use it.
3627377e23a2Schristos	(bfd_xcoff_link_count_reloc): Only count loader relocs if there's
3628377e23a2Schristos	a loader section.
3629377e23a2Schristos	(xcoff_build_ldsym): New function, split out from...
3630377e23a2Schristos	(xcoff_build_ldsyms): ...here.  Rename to...
3631377e23a2Schristos	(xcoff_post_gc_symbol): ...this.  Only export symbols, and only
3632377e23a2Schristos	call xcoff_build_ldsym, if there's a loader section.
3633377e23a2Schristos	(xcoff_build_loader_section): New function, extracted verbatim from...
3634377e23a2Schristos	(bfd_xcoff_size_dynamic_sections): ...here.  Only call it if
3635377e23a2Schristos	there's a loader section.  Only add an __rtinit loader symbol
3636377e23a2Schristos	if there's a loader section.  Update after above name change.
3637377e23a2Schristos	(xcoff_symbol_section, xcoff_create_ldrel): New functions.
3638377e23a2Schristos	(bfd_link_input_bfd): Use xcoff_need_ldrel_p, xcoff_symbol_section
3639377e23a2Schristos	and xcoff_create_ldrel.
3640377e23a2Schristos	(xcoff_write_global_symbol): Use xcoff_create_ldrel.
3641377e23a2Schristos	(xcoff_reloc_link_order): Likewise, but only call it if there's
3642377e23a2Schristos	a loader section.  Use xcoff_symbol_section.
3643377e23a2Schristos	(_bfd_xcoff_bfd_final_link): Only use fdinfo.ldrel and fdinfo.ldsym
3644377e23a2Schristos	if there's a loader section.
3645377e23a2Schristos
3646377e23a2Schristos2009-04-01  Richard Sandiford  <rdsandiford@googlemail.com>
3647377e23a2Schristos
3648377e23a2Schristos	* xcofflink.c (bfd_link_input_bfd): Fix buffer overrun.
3649377e23a2Schristos
3650377e23a2Schristos2009-04-01  Christophe Lyon  <christophe.lyon@st.com>
3651377e23a2Schristos
3652377e23a2Schristos	* elf32-arm.c (group_sections): Rewrite loops for better
3653377e23a2Schristos	readability.
3654377e23a2Schristos
3655377e23a2Schristos2009-03-30  DJ Delorie  <dj@redhat.com>
3656377e23a2Schristos
3657377e23a2Schristos	* elflink.c (elf_link_input_bfd): Don't try to resolve complex
3658377e23a2Schristos	relocs when doing a relocatable link.
3659377e23a2Schristos
3660377e23a2Schristos2009-03-28  Mark Mitchell  <mark@codesourcery.com>
3661377e23a2Schristos
3662377e23a2Schristos	* coff-arm.c (coff_arm_merge_private_bfd_data): Use "error:", not
3663377e23a2Schristos	"ERROR:", in error messages.
3664377e23a2Schristos	* cpu-arm.c (bfd_arm_merge_machines): Likewise.
3665377e23a2Schristos	* elf-attrs.c (_bfd_elf_merge_object_attributes): Likewise.
3666377e23a2Schristos	* elf32-arm.c (tag_cpu_arch_combine): Likewise.
3667377e23a2Schristos	(elf32_arm_merge_eabi_attributes): Likewise.
3668377e23a2Schristos	(elf32_arm_merge_private_bfd_data): Likewise.
3669377e23a2Schristos
3670377e23a2Schristos2009-03-27  Nick Clifton  <nickc@redhat.com>
3671377e23a2Schristos
3672377e23a2Schristos	* section.c (bfd_get_section_contents): Detect and handle the case
3673377e23a2Schristos	where a section has the SEC_IN_MEMORY flag set but no actual
3674377e23a2Schristos	contents allocated.
3675377e23a2Schristos
3676377e23a2Schristos2009-03-26  Alan Modra  <amodra@bigpond.net.au>
3677377e23a2Schristos
3678377e23a2Schristos	PR 6494
3679377e23a2Schristos	* elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO
3680377e23a2Schristos	p_filesz and p_memsz are equal.  Use p_memsz as the segment size.
3681377e23a2Schristos	(assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO
3682377e23a2Schristos	if we don't find matching PT_LOAD when copying.
3683377e23a2Schristos
3684377e23a2Schristos2009-03-25  M R Swami Reddy <MR.Swami.Reddy@nsc.com>
3685377e23a2Schristos
3686377e23a2Schristos	* elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of
3687377e23a2Schristos	the reloc descriptions.
3688377e23a2Schristos
3689377e23a2Schristos2009-03-25  Hans-Peter Nilsson  <hp@axis.com>
3690377e23a2Schristos
3691377e23a2Schristos	* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3692377e23a2Schristos	<R_CRIS_16_GOT_GD, case R_CRIS_32_GOT_GD>: Handle COMMON symbols.
3693377e23a2Schristos	<case R_CRIS_16_TPREL, R_CRIS_32_TPREL>: Ditto.
3694377e23a2Schristos
3695377e23a2Schristos2009-03-24  H.J. Lu  <hongjiu.lu@intel.com>
3696377e23a2Schristos
3697377e23a2Schristos	* cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static.
3698377e23a2Schristos	(bfd_i386_arch_intel_syntax): Likewise.
3699377e23a2Schristos	(i8086_arch): Likewise.
3700377e23a2Schristos	(bfd_x86_64_arch): Likewise.
3701377e23a2Schristos
3702377e23a2Schristos2009-03-24  Hans-Peter Nilsson  <hp@axis.com>
3703377e23a2Schristos
3704377e23a2Schristos	* elf32-cris.c (cris_elf_relocate_section): <case
3705377e23a2Schristos	R_CRIS_16_DTPREL, R_CRIS_32_DTPREL>: Allow use of non-local
3706377e23a2Schristos	symbols for non-allocated sections.  Don't check whether to
3707377e23a2Schristos	generate R_CRIS_DTPMOD for non-allocated sections.
3708377e23a2Schristos	(cris_elf_gc_sweep_hook) <case R_CRIS_32_DTPREL>: Don't
3709377e23a2Schristos	handle relocation GC:ing if applied to non-allocated section.
3710377e23a2Schristos	(cris_elf_check_relocs): Similar.
3711377e23a2Schristos
3712377e23a2Schristos	* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
3713377e23a2Schristos	<R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: Don't include the TLS size
3714377e23a2Schristos	when emitting a known TP offset in the GOT.
3715377e23a2Schristos
3716377e23a2Schristos2009-03-23  Alan Modra  <amodra@bigpond.net.au>
3717377e23a2Schristos
3718377e23a2Schristos	* elf64-ppc.c (synthetic_opd): Delete.
3719377e23a2Schristos	(compare_symbols): Look for .opd name rather than section match.
3720377e23a2Schristos	(ppc64_elf_get_synthetic_symtab): Likewise.
3721377e23a2Schristos
3722377e23a2Schristos2009-03-21  Alan Modra  <amodra@bigpond.net.au>
3723377e23a2Schristos
3724377e23a2Schristos	* elf32-ppc.c (is_pic_glink_stub): Delete.
3725377e23a2Schristos	(is_nonpic_glink_stub): New function.
3726377e23a2Schristos	(ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather
3727377e23a2Schristos	than first pic one.
3728377e23a2Schristos	(struct ppc_elf_link_hash_table <glink_pltresolve>): Comment fix.
3729377e23a2Schristos
3730377e23a2Schristos2009-03-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3731377e23a2Schristos	    Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
3732377e23a2Schristos
3733377e23a2Schristos	* elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_*
3734377e23a2Schristos	macros for visibilty and locality checks.
3735377e23a2Schristos	(elf_s390_adjust_dynamic_symbol): Likewise.
3736377e23a2Schristos	(allocate_dynrelocs): Likewise.
3737377e23a2Schristos	(elf_s390_relocate_section): Likewise.
3738377e23a2Schristos	(elf_s390_finish_dynamic_symbol): Likewise.
3739377e23a2Schristos	* elf64-s390.c (elf_s390_check_relocs): Likewise.
3740377e23a2Schristos	(elf_s390_adjust_dynamic_symbol): Likewise.
3741377e23a2Schristos	(allocate_dynrelocs): Likewise.
3742377e23a2Schristos	(elf_s390_relocate_section): Likewise.
3743377e23a2Schristos	(elf_s390_finish_dynamic_symbol): Likewise.
3744377e23a2Schristos
3745377e23a2Schristos2009-03-19  Kai Tietz  <kai.tietz@onevision.com>
3746377e23a2Schristos
3747377e23a2Schristos	* bfd-in2.h: Regenerated.
3748377e23a2Schristos	* coffcode.h (sec_to_styp_flags): For pe-coff add SEC_READONLY
3749377e23a2Schristos	for debugging sections and map memory read/write dependent on
3750377e23a2Schristos	SEC_COFF_NOREAD.
3751377e23a2Schristos	(styp_to_sec_flags): Set SEC_COFF_NOREAD for sections
3752377e23a2Schristos	without memory read flags set.
3753377e23a2Schristos	* section.c: Add SEC_COFF_NOREAD to section flags.
3754377e23a2Schristos
3755377e23a2Schristos2009-03-19  Andreas Schwab  <schwab@linux-m68k.org>
3756377e23a2Schristos
3757377e23a2Schristos	* elf32-hppa.c (final_link_relocate): Cast bfd_vma values to long
3758377e23a2Schristos	for format string.
3759377e23a2Schristos
3760377e23a2Schristos2009-03-19  Alan Modra  <amodra@bigpond.net.au>
3761377e23a2Schristos
3762377e23a2Schristos	* elf32-spu.c (spu_elf_find_overlays): Separate error return from
3763377e23a2Schristos	"no overlays" return.  If there are overlays, create overlay
3764377e23a2Schristos	manager entry symbols here, so that..
3765377e23a2Schristos	(spu_elf_build_stubs): ..we don't need to set them up here.
3766377e23a2Schristos	Simplify entry symbol tests.
3767377e23a2Schristos	* elf32-spu.h (spu_elf_find_overlays): Update prototype.
3768377e23a2Schristos
3769377e23a2Schristos2009-03-18  Mark Kettenis  <kettenis@gnu.org>
3770377e23a2Schristos
3771377e23a2Schristos	* elf.c (elfcore_grok_openbsd_procinfo)
3772377e23a2Schristos	(elfcore_grok_openbsd_note): New functions.
3773377e23a2Schristos	(elf_parse_notes): Handle notes from OpenBSD ELF core files.
3774377e23a2Schristos
3775377e23a2Schristos2009-03-18  Alan Modra  <amodra@bigpond.net.au>
3776377e23a2Schristos
3777377e23a2Schristos	* vms-hdr.c: Don't include alloca.h.
3778377e23a2Schristos	* elf32-m68hc1x.c: Include alloca-conf.h.
3779377e23a2Schristos	* xsym.c: Likewise.
3780377e23a2Schristos	* elf64-hppa.c: Likewise.  Remove existing #if's handling alloca.
3781377e23a2Schristos	* som.c: Likewise.
3782377e23a2Schristos	* Makefile.am: Run "make dep-am".
3783377e23a2Schristos	* Makefile.in: Regenerate.
3784377e23a2Schristos
3785377e23a2Schristos2009-03-17  Daniel Jacobowitz  <dan@codesourcery.com>
3786377e23a2Schristos
3787377e23a2Schristos	* elf32-arm.c (elf32_arm_check_relocs): Correct symbian_p test.
3788377e23a2Schristos
3789377e23a2Schristos2009-03-17  Alan Modra  <amodra@bigpond.net.au>
3790377e23a2Schristos
3791377e23a2Schristos	* elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
3792377e23a2Schristos	Add compact_stub.
3793377e23a2Schristos	(emum _ovly_flavour): Delete ovly_compact, ovly_none.
3794377e23a2Schristos	* elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
3795377e23a2Schristos	ovly_return fields with ovly_entry[2].  Adjust all users.
3796377e23a2Schristos	(spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
3797377e23a2Schristos	when soft-icache.
3798377e23a2Schristos	(spu_elf_build_stubs): Likewise.
3799377e23a2Schristos	(ovl_stub_size): Change arg to spu_elf_params pointer.  Adjust for
3800377e23a2Schristos	ovly_flavour changes.  Update all callers.
3801377e23a2Schristos	(ovl_stub_size_log2): New function.
3802377e23a2Schristos	(build_stub): Handle compact icache stubs.  Use different manager
3803377e23a2Schristos	entry point for stubs in non-icache area.
3804377e23a2Schristos	(spu_elf_size_stubs): Don't allocate space for indirect branch
3805377e23a2Schristos	descriptors.
3806377e23a2Schristos	(spu_elf_build_stubs): And don't built them.
3807377e23a2Schristos
3808377e23a2Schristos2009-03-16  Andrew Stubbs  <ams@codesourcery.com>
3809377e23a2Schristos
3810377e23a2Schristos	* dwarf2.c (read_section): Always use rawsize, if available.
3811377e23a2Schristos
3812377e23a2Schristos2009-03-16  Alan Modra  <amodra@bigpond.net.au>
3813377e23a2Schristos
3814377e23a2Schristos	* simple.c (bfd_simple_get_relocated_section_contents): Use larger
3815377e23a2Schristos	of rawsize and size for buffer.
3816377e23a2Schristos
3817377e23a2Schristos2009-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
3818377e23a2Schristos
3819377e23a2Schristos	* elf32-spu.c (spu_elf_check_vma): Do not reset auto_overlay
3820377e23a2Schristos	parameter just because fixed sections fit into local store.
3821377e23a2Schristos	(spu_elf_auto_overlay): Do not declare as "noreturn".  Skip
3822377e23a2Schristos	generating overlays if fixed sections plus reserved stack
3823377e23a2Schristos	and heap space fit into local store.
3824377e23a2Schristos
3825377e23a2Schristos2009-03-15  Alan Modra  <amodra@bigpond.net.au>
3826377e23a2Schristos
3827377e23a2Schristos	* elf32-spu.c (build_stub): Correct icache set_id.
3828377e23a2Schristos	(spu_elf_relocate_section): Likewise.
3829377e23a2Schristos
3830377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3831377e23a2Schristos
3832377e23a2Schristos	* xcofflink.c (xcoff_link_check_archive_element): Only free the
3833377e23a2Schristos	symbol table if it was created by the current call.
3834377e23a2Schristos
3835377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3836377e23a2Schristos
3837377e23a2Schristos	* xcofflink.c (xcoff_build_ldsyms): Give imported descriptors
3838377e23a2Schristos	class XMC_DS rather than XMC_UA.
3839377e23a2Schristos
3840377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3841377e23a2Schristos
3842377e23a2Schristos	* bfd-in.h (bfd_xcoff_size_dynamic_sections): Replace the
3843377e23a2Schristos	bfd_boolean export_defineds parameter with an unsigned int
3844377e23a2Schristos	auto_export_flags parameter.
3845377e23a2Schristos	* bfd-in2.h: Regenerate.
3846377e23a2Schristos	* xcofflink.c (xcoff_archive_contains_shared_object_p): New function,
3847377e23a2Schristos	split out from xcoff_build_ldsyms.
3848377e23a2Schristos	(xcoff_covered_by_expall_p): New function.
3849377e23a2Schristos	(xcoff_auto_export_p): New function, split out from xcoff_build_ldsyms
3850377e23a2Schristos	but with extra code to handle -bexpfull and -bexpall.
3851377e23a2Schristos	(xcoff_mark_auto_exports): New function.
3852377e23a2Schristos	(xcoff_build_ldsyms): Use xcoff_auto_export_p to decide whether
3853377e23a2Schristos	a function should be automatically exported.
3854377e23a2Schristos	(bfd_xcoff_size_dynamic_sections): Replace the export_defineds
3855377e23a2Schristos	parameter with an auto_export_flags parameter.  Update ldinfo
3856377e23a2Schristos	accordingly.  Use xcoff_mark_auto_exports to mark all automatically-
3857377e23a2Schristos	exported symbols.
3858377e23a2Schristos
3859377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3860377e23a2Schristos
3861377e23a2Schristos	* xcofflink.c (xcoff_mark_symbol_by_name): New function.
3862377e23a2Schristos	(bfd_xcoff_size_dynamic_sections): Use it to mark the entry,
3863377e23a2Schristos	init and fini functions.  Do garbage collection for objects
3864377e23a2Schristos	without an entry point too.
3865377e23a2Schristos
3866377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3867377e23a2Schristos
3868377e23a2Schristos	* coffcode.h (coff_pointerize_aux_hook): Update CSECT_SYM_P to
3869377e23a2Schristos	check whether a symbol has csect information.
3870377e23a2Schristos	(coff_print_aux): Likewise.
3871377e23a2Schristos	* coff-rs6000.c (_bfd_xcoff_swap_aux_in): Handle auxillary csect
3872377e23a2Schristos	information for C_AIX_WEAKEXT too.
3873377e23a2Schristos	(_bfd_xcoff_swap_aux_out): Likewise.
3874377e23a2Schristos	(xcoff_reloc_type_br): Handle defweak symbols too.
3875377e23a2Schristos	* coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Handle auxillary csect
3876377e23a2Schristos	information for C_AIX_WEAKEXT too.
3877377e23a2Schristos	(_bfd_xcoff64_swap_aux_out): Likewise.
3878377e23a2Schristos	(xcoff64_reloc_type_br): Handle defweak symbols too.
3879377e23a2Schristos	* coffgen.c (coff_print_symbol): Handle auxillary function
3880377e23a2Schristos	information for C_AIX_WEAKEXT too.
3881377e23a2Schristos	* xcofflink.c (_bfd_xcoff_canonicalize_dynamic_symtab): Set BSF_WEAK
3882377e23a2Schristos	instead of BSF_GLOBAL if the L_WEAK flag is set.
3883377e23a2Schristos	(xcoff_dynamic_definition_p): New function.
3884377e23a2Schristos	(xcoff_link_add_dynamic_symbols): Use it to decide whether ldsym
3885377e23a2Schristos	defines h.  Don't change h if ldsym isn't the definition.  Otherwise,
3886377e23a2Schristos	always take the symbol class from the ldsym.  Use weak bfd symbol
3887377e23a2Schristos	types for weak ldsyms.
3888377e23a2Schristos	(xcoff_link_add_symbols): Use CSECT_SYM_P and EXTERN_SYM_P.
3889377e23a2Schristos	Fix the check for whether a definition is from a shared object.
3890377e23a2Schristos	Allow redefinitions of weak symbols.
3891377e23a2Schristos	(xcoff_link_check_ar_symbols): Use EXTERN_SYM_P.
3892377e23a2Schristos	(xcoff_keep_symbol_p): Likewise.
3893377e23a2Schristos	(bfd_xcoff_size_dynamic_sections): Use CSECT_SYM_P.
3894377e23a2Schristos	(xcoff_link_input_bfd): Use CSECT_SYM_P and EXTERN_SYM_P.
3895377e23a2Schristos	Add .loader entries for C_AIX_WEAKEXT as well as C_EXT symbols,
3896377e23a2Schristos	but mark them as L_WEAK.
3897377e23a2Schristos	(xcoff_write_global_symbol): Treat weak symbols as C_AIX_WEAKEXT
3898377e23a2Schristos	instead of C_EXT if C_AIX_WEAKEXT == C_WEAKEXT.
3899377e23a2Schristos
3900377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3901377e23a2Schristos
3902377e23a2Schristos	* xcofflink.c (xcoff_mark): When walking the relocations,
3903377e23a2Schristos	only mark the target symbol or the target section, not both.
3904377e23a2Schristos	(xcoff_final_definition_p): New function.
3905377e23a2Schristos	(xcoff_keep_symbol_p): Use it to check whether an external XCOFF
3906377e23a2Schristos	symbol is a valid definition of the associated output symbol.
3907377e23a2Schristos	Use XCOFF_ALLOCATED to stop the same hash table entry having
3908377e23a2Schristos	two output symbols.
3909377e23a2Schristos	(bfd_xcoff_size_dynamic_sections): Set XCOFF_ALLOCATED when
3910377e23a2Schristos	keeping a symbol.
3911377e23a2Schristos	(xcoff_link_input_bfd): Use xcoff_final_definition_p.
3912377e23a2Schristos
3913377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3914377e23a2Schristos
3915377e23a2Schristos	* xcofflink.c (bfd_xcoff_import_symbol): Treat imported absolute
3916377e23a2Schristos	symbols as XMC_XO.
3917377e23a2Schristos
3918377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3919377e23a2Schristos
3920377e23a2Schristos	* libcoff-in.h (xcoff_tdata): Add a lineno_counts field.
3921377e23a2Schristos	* libcoff.h: Regenerate.
3922377e23a2Schristos	* xcofflink.c (xcoff_link_add_symbols): Record per-symbol
3923377e23a2Schristos	line-number counts in the bfd's lineno_counts field.
3924377e23a2Schristos	Don't keep per-csect line-number counts.
3925377e23a2Schristos	(xcoff_sweep): Don't update per-csect line-number counts.
3926377e23a2Schristos	(bfd_xcoff_size_dynamic_sections): Count the number of line-number
3927377e23a2Schristos	entries in each output section.
3928377e23a2Schristos	(xcoff_link_input_bfd): Get the number of line numbers from
3929377e23a2Schristos	the bfd's lineno_counts field, rather than recalculating it
3930377e23a2Schristos	from scratch.  Fix the range check when updating C_BINCL and
3931377e23a2Schristos	C_EINCL symbols.
3932377e23a2Schristos	(_bfd_xcoff_bfd_final_link): Don't count the output line numbers
3933377e23a2Schristos	here.  Don't expect csects to have line-number counts.
3934377e23a2Schristos
3935377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3936377e23a2Schristos
3937377e23a2Schristos	* libcoff-in.h (xcoff_tdata): Change debug_indices to a signed long.
3938377e23a2Schristos	* libcoff.h: Regenerate.
3939377e23a2Schristos	* xcofflink.c (xcoff_keep_symbol_p): New function, using the
3940377e23a2Schristos	"skip" logic from xcoff_link_input_bfd.
3941377e23a2Schristos	(bfd_xcoff_size_dynamic_sections): Explicitly skip dynamic
3942377e23a2Schristos	objects in a dynamic link, rather than checking whether csectpp
3943377e23a2Schristos	is null.  Always allocate debug_index for other objects,
3944377e23a2Schristos	and always go through the loop.  Update the type of debug_index
3945377e23a2Schristos	after the change above.  Read the auxillary csect information
3946377e23a2Schristos	and use xcoff_keep_symbol_p to decide whether a symbol should
3947377e23a2Schristos	be kept.  Set its debug_index to -2 if not.
3948377e23a2Schristos	(xcoff_link_input_bfd): Update the type of debug_index after
3949377e23a2Schristos	the change above and always expect it to be nonnull.  Use it to
3950377e23a2Schristos	test whether a symbol should be stripped, rather than making the
3951377e23a2Schristos	decision here.  Postpone all symbol creation to the second pass.
3952377e23a2Schristos
3953377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3954377e23a2Schristos
3955377e23a2Schristos	* xcofflink.c: (xcoff_mark_symbol): Mark the TOC section when
3956377e23a2Schristos	creating a descriptor.
3957377e23a2Schristos	(xcoff_sweep): Don't mark toc_section unless it's needed.
3958377e23a2Schristos	(bfd_xcoff_size_dynamic_sections): Skip the toc_section
3959377e23a2Schristos	when marking every bfd.
3960377e23a2Schristos	(xcoff_link_input_bfd): Skip all TOC anchors.
3961377e23a2Schristos	(xcoff_toc_section_p, xcoff_find_tc0): New functions.
3962377e23a2Schristos	(_bfd_xcoff_bfd_final_link): Don't set the output bfd's TOC anchor
3963377e23a2Schristos	to -1; call xcoff_find_tc0 instead.
3964377e23a2Schristos
3965377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3966377e23a2Schristos
3967377e23a2Schristos	* libcoff-in.h (xcoff_section_tdata): Update commentary.
3968377e23a2Schristos	* libcoff.h: Regenerate.
3969377e23a2Schristos	* xcofflink.c (xcoff_link_add_symbols): Set the csect of XTY_ER
3970377e23a2Schristos	symbols to bfd_und_section_ptr or bfd_abs_section_ptr, rather than
3971377e23a2Schristos	the previous symbol's csect.  Treat last_symndx as an inclusive value
3972377e23a2Schristos	and simplify its handling.
3973377e23a2Schristos	(xcoff_mark): Treat last_symndx as an inclusive value.  Only mark
3974377e23a2Schristos	symbols with the right csect.  Don't mark rsec when processing
3975377e23a2Schristos	relocations against undefined or absolute sections.
3976377e23a2Schristos	(bfd_xcoff_size_dynamic_sections): Don't check the SEC_MARK flag
3977377e23a2Schristos	of bfd_und_section_ptr.
3978377e23a2Schristos	(xcoff_link_input_bfd): Likewise.
3979377e23a2Schristos
3980377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
3981377e23a2Schristos
3982377e23a2Schristos	* coff-rs6000.c (xcoff_ppc_relocate_section): Report relocations
3983377e23a2Schristos	against undefined symbols if the symbol's XCOFF_WAS_UNDEFINED
3984377e23a2Schristos	flag is set.  Assert that all undefined symbols are either
3985377e23a2Schristos	imported or defined by a dynamic object.
3986377e23a2Schristos	* coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3987377e23a2Schristos	* xcofflink.c (xcoff_link_add_symbols): Extend function-symbol
3988377e23a2Schristos	handling to all relocations.  Only set XCOFF_CALLED for function
3989377e23a2Schristos	symbols.
3990377e23a2Schristos	(xcoff_find_function): New function, split out from...
3991377e23a2Schristos	(bfd_xcoff_export_symbol) ...here.
3992377e23a2Schristos	(xcoff_set_import_path): New function, split out from...
3993377e23a2Schristos	(bfd_xcoff_import_symbol): ...here.  Remove assertion for old
3994377e23a2Schristos	meaning of XCOFF_CALLED.
3995377e23a2Schristos	(xcoff_mark_symbol): If we mark an undefined and unimported
3996377e23a2Schristos	symbol, find some way of defining it.  If the symbol is a function
3997377e23a2Schristos	descriptor, fill in its definition automatically.  If the symbol
3998377e23a2Schristos	is a function, mark its descriptor and allocate room for global
3999377e23a2Schristos	linkage code.  Otherwise mark the symbol as implicitly imported.
4000377e23a2Schristos	Move the code for creating function descriptors from...
4001377e23a2Schristos	(xcoff_build_ldsyms): ...here.  Use XCOFF_WAS_UNDEFINED to
4002377e23a2Schristos	check for symbols that were implicitly defined.
4003377e23a2Schristos	(xcoff_mark): Don't count any dynamic relocations against
4004377e23a2Schristos	function symbols.
4005377e23a2Schristos	(bfd_xcoff_size_dynamic_sections): Save the rtld parameter
4006377e23a2Schristos	in the xcoff link info.
4007377e23a2Schristos	(xcoff_link_input_bfd): Remove handling of undefined and
4008377e23a2Schristos	unexported symbols.
4009377e23a2Schristos
4010377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
4011377e23a2Schristos
4012377e23a2Schristos	* coff-rs6000.c (xcoff_reloc_type_br): Make the branch absolute
4013377e23a2Schristos	if the target is absolute.  Fix comment typo.
4014377e23a2Schristos	(xcoff_ppc_relocate_section): Remove FIXME.
4015377e23a2Schristos	* coff64-rs6000.c (xcoff64_reloc_type_br): Make the branch absolute
4016377e23a2Schristos	if the target is absolute.
4017377e23a2Schristos
4018377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
4019377e23a2Schristos
4020377e23a2Schristos	* xcofflink.c (xcoff_mark, xcoff_link_input_bfd): Don't copy
4021377e23a2Schristos	R_POS and R_NEG relocations against absolute symbols to the
4022377e23a2Schristos	.loader section.
4023377e23a2Schristos
4024377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
4025377e23a2Schristos
4026377e23a2Schristos	* coff64-rs6000.c (xcoff64_write_object_contents): Set the cputype
4027377e23a2Schristos	to 2 for bfd_mach_ppc_620.
4028377e23a2Schristos
4029377e23a2Schristos2009-03-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
4030377e23a2Schristos
4031377e23a2Schristos	* config.bfd: Treat AIX 6+ in the same way as AIX 5.
4032377e23a2Schristos	* configure.in: Likewise.
4033377e23a2Schristos	* configure: Regenerate.
4034377e23a2Schristos
4035377e23a2Schristos2009-03-13  H.J. Lu  <hongjiu.lu@intel.com>
4036377e23a2Schristos
4037377e23a2Schristos	PR binutils/9945
4038377e23a2Schristos	* elf.c (assign_section_numbers): Generate symbol table if there
4039377e23a2Schristos	is any relocation in output.
4040377e23a2Schristos	(_bfd_elf_compute_section_file_positions): Likewise.
4041377e23a2Schristos
4042377e23a2Schristos2009-03-13  Nick Clifton  <nickc@redhat.com>
4043377e23a2Schristos
4044377e23a2Schristos	PR 9934
4045377e23a2Schristos	* elf-bfd.h (NUM_SHDR_ENTRIES): Cope with an empty section.
4046377e23a2Schristos	* elflink.c (elf_link_read_relocs_from_section): Use
4047377e23a2Schristos	NUM_SHDR_ENTRIES.  Gracefully handle the case where there are
4048377e23a2Schristos	relocs but no symbol table.
4049377e23a2Schristos	* elf32-arm.c (elf32_arm_check_relocs): Likewise.
4050377e23a2Schristos
4051377e23a2Schristos2009-03-12  H.J. Lu  <hongjiu.lu@intel.com>
4052377e23a2Schristos
4053377e23a2Schristos	PR ld/9938
4054377e23a2Schristos	* elf32-i386.c (elf_i386_check_tls_transition): Use strncmp
4055377e23a2Schristos	to check ___tls_get_addr.
4056377e23a2Schristos
4057377e23a2Schristos	* elf64-x86-64.c (elf64_x86_64_check_tls_transition): Use
4058377e23a2Schristos	strncmp to check __tls_get_addr.
4059377e23a2Schristos
4060377e23a2Schristos2009-03-12  Andrew Stubbs  <ams@codesourcery.com>
4061377e23a2Schristos
4062377e23a2Schristos	* dwarf2.c (read_section): Always check the offset, even when the
4063377e23a2Schristos	section has been read before.
4064377e23a2Schristos
4065377e23a2Schristos2009-03-11  H.J. Lu  <hongjiu.lu@intel.com>
4066377e23a2Schristos
4067377e23a2Schristos	* elf32-i386.c (elf_i386_check_tls_transition): Fix a typo in
4068377e23a2Schristos	comments.
4069377e23a2Schristos
4070377e23a2Schristos2009-03-11  Chris Demetriou  <cgd@google.com>
4071377e23a2Schristos
4072377e23a2Schristos	* bfd.c (BFD_DETERMINISTIC_OUTPUT): New flag.
4073377e23a2Schristos	* bfd-in2.h: Regenerate.
4074377e23a2Schristos	* archive.c (bfd_ar_hdr_from_filesystem): If BFD_DETERMINISTIC_OUTPUT
4075377e23a2Schristos	flag is set, use 0 for uid, gid, and timestamp, and use 0644 for file
4076377e23a2Schristos	mode.
4077377e23a2Schristos	(bsd_write_armap): Likewise.
4078377e23a2Schristos	(_bfd_archive_bsd_update_armap_timestamp): If BFD_DETERMINISTIC_OUTPUT
4079377e23a2Schristos	flag is set, do nothing.
4080377e23a2Schristos	(coff_write_armap): If BFD_DETERMINISTIC_OUTPUT flag is set, use 0
4081377e23a2Schristos	for timestamp.
4082377e23a2Schristos
4083377e23a2Schristos2009-03-11  Ulrich Weigand  <uweigand@de.ibm.com>
4084377e23a2Schristos
4085377e23a2Schristos	* elf32-spu.c (find_function_stack_adjust): Handle sf instruction
4086377e23a2Schristos	used to update stack pointer.
4087377e23a2Schristos
4088377e23a2Schristos2009-03-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4089377e23a2Schristos
4090377e23a2Schristos	PR binutils/9921
4091377e23a2Schristos	* som.c (som_bfd_derive_misc_symbol_info): Set symbol type ST_ABSOLUTE
4092377e23a2Schristos	for unknown symbols in absolute section.
4093377e23a2Schristos
4094377e23a2Schristos2009-03-06  Nick Clifton  <nickc@redhat.com>
4095377e23a2Schristos
4096377e23a2Schristos	* po/es.po: Updated Spanish translation.
4097377e23a2Schristos
4098377e23a2Schristos2009-03-05  Christophe Lyon  <christophe.lyon@st.com>
4099377e23a2Schristos
4100377e23a2Schristos	* elf32-arm.c (group_sections): Take next section size into
4101377e23a2Schristos	account before accepting to group it.
4102377e23a2Schristos
4103377e23a2Schristos2009-03-05  Christophe Lyon  <christophe.lyon@st.com>
4104377e23a2Schristos
4105377e23a2Schristos	* elf32-arm.c (arm_type_of_stub): Handle long branches targetting
4106377e23a2Schristos	PLT entries.
4107377e23a2Schristos	(elf32_arm_final_link_relocate): Likewise.
4108377e23a2Schristos
4109377e23a2Schristos2009-03-05  Moritz Kroll  <Moritz.Kroll@gmx.de>
4110377e23a2Schristos
4111377e23a2Schristos	PR 9923
4112377e23a2Schristos	* peXXigen.c (_bfd_XXi_final_link_postscript): Check h->root.type.
4113377e23a2Schristos
4114377e23a2Schristos2009-03-04  Alan Modra  <amodra@bigpond.net.au>
4115377e23a2Schristos
4116377e23a2Schristos	* reloc.c (BFD_RELOC_PPC_TLSGD, BFD_RELOC_PPC_TLSLD): New.
4117377e23a2Schristos	* section.c (struct bfd_section): Add has_tls_get_addr_call.
4118377e23a2Schristos	(BFD_FAKE_SECTION): Init new flag.
4119377e23a2Schristos	* ecoff.c (bfd_debug_section): Likewise.
4120377e23a2Schristos	* bfd-in2.h: Regenerate.
4121377e23a2Schristos	* libbfd.h: Regenerate.
4122377e23a2Schristos	* elf32-ppc.c (ppc_elf_howto_raw): Add R_PPC_TLSGD and R_PPC_TLSLD.
4123377e23a2Schristos	(ppc_elf_reloc_type_lookup): Handle new relocs.
4124377e23a2Schristos	(ppc_elf_check_relocs): Set has_tls_get_addr_call on finding such
4125377e23a2Schristos	without marker relocs.
4126377e23a2Schristos	(ppc_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
4127377e23a2Schristos	if section has no old-style calls.
4128377e23a2Schristos	(ppc_elf_relocate_section): Set tls_mask for non-tls relocs too.
4129377e23a2Schristos	Don't try to optimize new-style __tls_get_addr call when handling
4130377e23a2Schristos	arg setup relocs.  Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
4131377e23a2Schristos	relocs.
4132377e23a2Schristos	* elf64-ppc.c (ppc64_elf_howto_raw): Add R_PPC64_TLSGD, R_PPC64_TLSLD.
4133377e23a2Schristos	(ppc64_elf_reloc_type_lookup): Handle new relocs.
4134377e23a2Schristos	(ppc64_elf_check_relocs): Set has_tls_get_addr_call on finding such
4135377e23a2Schristos	without marker relocs.
4136377e23a2Schristos	(ppc64_elf_tls_optimize): Allow out-of-order __tls_get_addr relocs
4137377e23a2Schristos	if section has no old-style calls.  Set toc_ref for new relocs as
4138377e23a2Schristos	appropriate.
4139377e23a2Schristos	(ppc64_elf_relocate_section): Set tls_mask for non-tls relocs too.
4140377e23a2Schristos	Don't try to optimize new-style __tls_get_addr call when handling
4141377e23a2Schristos	arg setup relocs.  Instead do so for R_PPC_TLSGD and R_PPC_TLSLD
4142377e23a2Schristos	relocs.
4143377e23a2Schristos
4144377e23a2Schristos2009-03-04  Alan Modra  <amodra@bigpond.net.au>
4145377e23a2Schristos
4146377e23a2Schristos	PR 6768
4147377e23a2Schristos	* configure.in: Test for ld --as-needed support.  Link shared
4148377e23a2Schristos	libbfd against libm.
4149377e23a2Schristos	* configure: Regenerate.
4150377e23a2Schristos
4151377e23a2Schristos2009-03-03  Alan Modra  <amodra@bigpond.net.au>
4152377e23a2Schristos
4153377e23a2Schristos	* Makefile.am: Run "make dep-am".
4154377e23a2Schristos	* Makefile.in: Regenerate.
4155377e23a2Schristos
4156377e23a2Schristos2009-03-02  Qinwei  <qinwei@sunnorth.com.cn>
4157377e23a2Schristos
4158377e23a2Schristos	* elf32-score7.c: New file.
4159377e23a2Schristos	* elf32-score.h: New file.
4160377e23a2Schristos	* elf32-score.c: Add code to support score 7.  Set score7 as the
4161377e23a2Schristos	default.
4162377e23a2Schristos	* cpu-score.c: Add score7 architecure.
4163377e23a2Schristos	(compatibile): New function.
4164377e23a2Schristos	* Makefile.am: Add rules for building elf32-score7 object.
4165377e23a2Schristos	* Makefile.in: Regenerate.
4166377e23a2Schristos	* configure.in: Add elf32-score7 object to score vectors.
4167377e23a2Schristos	* configure: Regenerate.
4168377e23a2Schristos	* reloc.c: Add score7 relocs.
4169377e23a2Schristos	* archures.c: Add score3 and score7 machine numbers.
4170377e23a2Schristos	* bfd-in2.h: Regenerate.
4171377e23a2Schristos	* libbfd.h: Regenerate.
4172377e23a2Schristos
4173377e23a2Schristos2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4174377e23a2Schristos
4175377e23a2Schristos	* configure: Regenerate.
4176377e23a2Schristos
4177377e23a2Schristos2009-03-01  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4178377e23a2Schristos
4179377e23a2Schristos	* elf32-hppa.c (hppa32_elf_local_refcounts): New function.
4180377e23a2Schristos	(elf32_hppa_check_relocs): Use it.
4181377e23a2Schristos
4182377e23a2Schristos	* elf_hppa_add_symbol_hook (elf_hppa_add_symbol_hook): Move to
4183377e23a2Schristos	elf64-hppa.c.
4184377e23a2Schristos	(elf_hppa_unmark_useless_dynamic_symbols): Likewise.
4185377e23a2Schristos	(elf_hppa_remark_useless_dynamic_symbols): Likewise.
4186377e23a2Schristos	(elf_hppa_is_dynamic_loader_symbol): Likewise.
4187377e23a2Schristos	(elf_hppa_record_segment_addrs): Likewise.
4188377e23a2Schristos	(elf_hppa_final_link): Likewise.
4189377e23a2Schristos	(elf_hppa_relocate_insn): Likewise.
4190377e23a2Schristos	(elf_hppa_final_link_relocate): Likewise.
4191377e23a2Schristos	(elf64_hppa_relocate_section): Likewise.
4192377e23a2Schristos	* elf64-hppa.c: Insert above.
4193377e23a2Schristos
4194377e23a2Schristos2009-02-28  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4195377e23a2Schristos
4196377e23a2Schristos	* elf-hppa.h (elf_hppa_final_link): Use elf_hppa_final_link.
4197377e23a2Schristos	(elf_hppa_final_link_relocate ): Rewrite eliminating dynamic hash table.
4198377e23a2Schristos	(elf_hppa_relocate_section): Likewise.
4199377e23a2Schristos	* elf64-hppa.c (struct elf64_hppa_link_hash_entry): Change to derive
4200377e23a2Schristos	from struct elf_link_hash_entry.  Add count field.
4201377e23a2Schristos	(struct elf64_hppa_dyn_hash_table): Delete.
4202377e23a2Schristos	(struct elf64_hppa_link_hash_table): Delete dyn_hash_table field.
4203377e23a2Schristos	(elf64_hppa_hash_table): Rename to hppa_link_hash_table.
4204377e23a2Schristos	(hppa_elf_hash_entry, eh_name): Define.
4205377e23a2Schristos	(elf64_hppa_new_dyn_hash_entry): Delete.
4206377e23a2Schristos	(elf64_hppa_dyn_hash_lookup): Delete.
4207377e23a2Schristos	(elf64_hppa_dyn_hash_traverse): Delete.
4208377e23a2Schristos	(get_dyn_name): Delete.
4209377e23a2Schristos	(elf64_hppa_finalize_opd): Use struct elf_link_hash_entry * instead
4210377e23a2Schristos	of struct elf64_hppa_dyn_hash_entry *.
4211377e23a2Schristos	(elf64_hppa_finalize_dlt, llocate_global_data_dlt,
4212377e23a2Schristos	allocate_global_data_plt, allocate_global_data_stub,
4213377e23a2Schristos	allocate_global_data_opd, count_dyn_reloc, allocate_dynrel_entries):
4214377e23a2Schristos	Likewise.
4215377e23a2Schristos	(hppa64_link_hash_newfunc): New.
4216377e23a2Schristos	(elf64_hppa_hash_table_create): Rework.
4217377e23a2Schristos	(count_dyn_reloc): Likewise.
4218377e23a2Schristos	(hppa64_elf_local_refcounts): New.
4219377e23a2Schristos	(elf64_hppa_check_relocs): Rework using standard technique for recording
4220377e23a2Schristos	local DLT, PLT and OPD reference counts.
4221377e23a2Schristos	(elf64_hppa_dynamic_symbol_p): Revise using "eh" for struct
4222377e23a2Schristos	elf_link_hash_entry *.
4223377e23a2Schristos	(elf64_hppa_mark_exported_functions, allocate_global_data_dlt,
4224377e23a2Schristos	allocate_global_data_plt, allocate_global_data_stub,
4225377e23a2Schristos	allocate_global_data_opd, allocate_dynrel_entries,
4226377e23a2Schristos	elf64_hppa_adjust_dynamic_symbol,
4227377e23a2Schristos	elf64_hppa_mark_milli_and_exported_functions): Likewise.
4228377e23a2Schristos	(elf64_hppa_create_dynamic_sections, elf64_hppa_size_dynamic_sections):
4229377e23a2Schristos	Use hppa_link_hash_table.  Rework.
4230377e23a2Schristos	(elf64_hppa_link_output_symbol_hook): Rework.
4231377e23a2Schristos	(elf64_hppa_finish_dynamic_symbol, elf64_hppa_finalize_opd,
4232377e23a2Schristos	elf64_hppa_finalize_dlt, elf64_hppa_finalize_dynreloc,
4233377e23a2Schristos	elf64_hppa_finish_dynamic_sections): Likewise.
4234377e23a2Schristos
4235377e23a2Schristos2009-02-26  Christophe Lyon  <christophe.lyon@st.com>
4236377e23a2Schristos
4237377e23a2Schristos	* elf32-arm.c (stub_reloc_type): Removed.
4238377e23a2Schristos	(insn_sequence): Renamed reloc_type field to r_type.
4239377e23a2Schristos	(elf32_arm_stub_long_branch_v4t_arm_thumb_pic): New stub.
4240377e23a2Schristos	(elf32_arm_stub_long_branch_v4t_thumb_arm_pic): Likewise.
4241377e23a2Schristos	(elf32_arm_stub_long_branch_thumb_only_pic): Likewise.
4242377e23a2Schristos	(elf32_arm_stub_type): Add new enum entries for the new stubs.
4243377e23a2Schristos	(arm_stub_is_thumb): Catch new stubs.
4244377e23a2Schristos	(arm_type_of_stub): Handle new stubs.
4245377e23a2Schristos	(arm_size_one_stub): Use ARRAY_SIZE. Handle new stubs.
4246377e23a2Schristos	(bfd_elf32_arm_process_before_allocation): Remove useless
4247377e23a2Schristos	condition.
4248377e23a2Schristos
4249377e23a2Schristos2009-02-25  H.J. Lu  <hongjiu.lu@intel.com>
4250377e23a2Schristos
4251377e23a2Schristos	* elf.c (elf_find_function): Use is_function_type to check
4252377e23a2Schristos	function symbol.
4253377e23a2Schristos
4254377e23a2Schristos2009-02-24  Sterling Augustine  <sterling@jaw.hq.tensilica.com>
4255377e23a2Schristos
4256377e23a2Schristos	* xtensa-modules.c: Revert to previous version 1.11 due
4257377e23a2Schristos	to inadvertant commit.
4258377e23a2Schristos
4259377e23a2Schristos2009-02-24  Sterling Augustine  <sterling@tensilica.com>
4260377e23a2Schristos
4261377e23a2Schristos	* elf32-xtensa.c (text_action_add): Separate test for action
4262377e23a2Schristos	type.  Break if saved action is ta_widen_insn at same offset.
4263377e23a2Schristos
4264377e23a2Schristos2009-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
4265377e23a2Schristos
4266377e23a2Schristos	* elf32-arm.c (elf32_arm_stub_long_branch_any_any_pic): Rename
4267377e23a2Schristos	to elf32_arm_stub_long_branch_any_arm_pic.
4268377e23a2Schristos	(elf32_arm_stub_long_branch_any_thumb_pic): New.
4269377e23a2Schristos	(enum elf32_arm_stub_type, arm_type_of_stub)
4270377e23a2Schristos	(arm_size_one_stub): Handle any to ARM PIC and any to Thumb PIC
4271377e23a2Schristos	separately.
4272377e23a2Schristos
4273377e23a2Schristos2009-02-24  Joseph Myers  <joseph@codesourcery.com>
4274377e23a2Schristos
4275377e23a2Schristos	* elf32-arm.c (PREV_SEC): Update comment.
4276377e23a2Schristos	(group_sections): Rename argument to stubs_always_after_branch.
4277377e23a2Schristos	Reverse the list and place stubs at the end of input sections.
4278377e23a2Schristos	Undefine NEXT_SEC.
4279377e23a2Schristos	(elf32_arm_size_stubs): Update to use stubs_always_after_branch.
4280377e23a2Schristos
4281377e23a2Schristos2009-02-23  Daniel Jacobowitz  <dan@codesourcery.com>
4282377e23a2Schristos
4283377e23a2Schristos	* elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
4284377e23a2Schristos	Fix formatting.
4285377e23a2Schristos	(arm_size_one_stub): Remove unnecessary break.
4286377e23a2Schristos	(arm_map_one_stub): Fix formatting.  Return after BFD_FAIL.
4287377e23a2Schristos
4288377e23a2Schristos2009-02-23  Christophe Lyon  <christophe.lyon@st.com>
4289377e23a2Schristos
4290377e23a2Schristos	* elf32-arm.c (stub_insn_type): New type.
4291377e23a2Schristos	(stub_reloc_type): Likewise.
4292377e23a2Schristos	(insn_sequence): Likewise.
4293377e23a2Schristos	(elf32_arm_stub_long_branch_any_any): Encode using insn_sequence.
4294377e23a2Schristos	(elf32_arm_stub_long_branch_v4t_arm_thumb): Likewise.
4295377e23a2Schristos	(elf32_arm_stub_long_branch_thumb_only): Likewise.
4296377e23a2Schristos	(elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
4297377e23a2Schristos	(elf32_arm_stub_short_branch_v4t_thumb_arm): Likewise.
4298377e23a2Schristos	(elf32_arm_stub_long_branch_any_any_pic): Likewise.
4299377e23a2Schristos	(elf32_arm_stub_hash_entry): Add new helper fields.
4300377e23a2Schristos	(stub_hash_newfunc): Initialize these new fields.
4301377e23a2Schristos	(arm_build_one_stub): Encode Arm and Thumb instructions separately
4302377e23a2Schristos	to take endianness into account.
4303377e23a2Schristos	(arm_size_one_stub): Compute size of stubs using insn_sequence.
4304377e23a2Schristos	(arm_map_one_stub): Code is now more generic, thanks to
4305377e23a2Schristos	insn_sequence.
4306377e23a2Schristos
4307377e23a2Schristos2009-02-23  Christophe Lyon  <christophe.lyon@st.com>
4308377e23a2Schristos
4309377e23a2Schristos	* elf32-arm.c (elf32_arm_stub_long_branch_thumb_only): Fix stub
4310377e23a2Schristos	code.
4311377e23a2Schristos	(elf32_arm_stub_long_branch_v4t_thumb_arm): Likewise.
4312377e23a2Schristos	(arm_type_of_stub): Use Thumb-only long branch stub (non-PIC) when
4313377e23a2Schristos	BLX is not available. Fix typo in warning message. Add comments
4314377e23a2Schristos	and improve formatting.
4315377e23a2Schristos	(arm_build_one_stub): Adjust to new
4316377e23a2Schristos	elf32_arm_stub_long_branch_v4t_thumb_arm stub.
4317377e23a2Schristos	(arm_map_one_stub): Likewise.
4318377e23a2Schristos
4319377e23a2Schristos2009-02-23  Tristan Gingold  <gingold@adacore.com>
4320377e23a2Schristos	    Eric Botcazou  <ebotcazou@adacore.com>
4321377e23a2Schristos	    Douglas B Rupp  <rupp@gnat.com>
4322377e23a2Schristos
4323377e23a2Schristos	* vms.h: Update copyright year, fix comments, reorder declarations.
4324377e23a2Schristos	(_bfd_save_vms_section): Remove the prototype.
4325377e23a2Schristos	(EGPS_S_V_NO_SHIFT): New constant.
4326377e23a2Schristos	(bfd_vms_set_section_flags): New prototype.
4327377e23a2Schristos	(EGPS_S_B_ALIGN, EGPS_S_W_FLAGS, EGPS_S_L_ALLOC, EGPS_S_B_NAMLNG): New
4328377e23a2Schristos	constants.
4329377e23a2Schristos	(EGSY_S_W_FLAGS): Ditto.
4330377e23a2Schristos	(EGSY_S_V_QUAD_VAL): Ditto.
4331377e23a2Schristos	(ESDF_S_L_VALUE, ESDF_S_L_PSINDX, ESDF_S_B_NAMLNG): Ditto.
4332377e23a2Schristos	(EGST_S_W_FLAGS, EGST_S_Q_LP_1, EGST_S_Q_LP_2, EGST_S_L_PSINDX,
4333377e23a2Schristos	EGST_S_B_NAMLNG): Ditto.
4334377e23a2Schristos	(ESRF_S_B_NAMLNG): Ditto.
4335377e23a2Schristos	(ETIR_S_C_HEADER_SIZE): Ditto.
4336377e23a2Schristos	(EGPS_S_V_ALLOC_64BIT): Ditto.
4337377e23a2Schristos	(DST_S_C_EPILOG): Ditto.
4338377e23a2Schristos	(DST_S_C_SRC_SETLNUM_L, DST_S_C_SRC_SETLNUM_W) : Ditto.
4339377e23a2Schristos	(DST_S_C_SRC_INCRLNUM_B): Ditto.
4340377e23a2Schristos	(DST_S_B_PCLINE_UNSBYTE, DST_S_W_PCLINE_UNSWORD): Ditto.
4341377e23a2Schristos	(DST_S_L_PCLINE_UNSLONG): Ditto.
4342377e23a2Schristos	(DST_S_B_MODBEG_NAME, DST_S_L_RTNBEG_ADDRESS) : Ditto
4343377e23a2Schristos	(DST_S_B_RTNBEG_NAME, DST_S_L_RTNEND_SIZE): Ditto
4344377e23a2Schristos	(DST_S_C_SOURCE_HEADER_SIZE): Ditto.
4345377e23a2Schristos	(DST_S_B_SRC_DF_LENGTH, DST_S_W_SRC_DF_FILEID): Ditto.
4346377e23a2Schristos	(DST_S_B_SRC_DF_FILENAME, DST_S_B_SRC_UNSBYTE): Ditto.
4347377e23a2Schristos	(DST_S_B_SRC_UNSBYTE): Ditto.
4348377e23a2Schristos	(DST_S_W_SRC_UNSWORD, DST_S_L_SRC_UNSLONG): Ditto.
4349377e23a2Schristos	Add prototypes.
4350377e23a2Schristos	(vms_section, vms_reloc): Remove types.
4351377e23a2Schristos	(hdr_struc): Replaced by ...
4352377e23a2Schristos	(hdr_struct): ... new type.
4353377e23a2Schristos	(EMH_S_W_HDRTYP, EMH_S_B_STRLVL, EMH_S_L_ARCH1): New constants.
4354377e23a2Schristos	(EMH_S_L_ARCH2, EMH_S_L_RECSIZ, EMH_S_B_NAMLNG): Ditto.
4355377e23a2Schristos	(EMH_DATE_LENGTH): Ditto.
4356377e23a2Schristos	(eom_struc): Replaced by ...
4357377e23a2Schristos	(eom_struct): ... new type.
4358377e23a2Schristos	(EEOM_S_L_TOTAL_LPS, EEOM_S_W_COMCOD, EEOM_S_B_TFRFLG): New constants.
4359377e23a2Schristos	(EEOM_S_L_PSINDX, EEOM_S_L_TFRADR): Ditto.
4360377e23a2Schristos	(EIHD_S_K_MAJORID, EIHD_S_K_MINORID, EIHD_S_K_EXE): Ditto.
4361377e23a2Schristos	(EIHD_S_L_SIZE, EIHD_S_L_ISDOFF, EIHD_S_L_SYMDBGOFF): Ditto.
4362377e23a2Schristos	(EIHD_S_Q_SYMVVA, EIHD_S_L_IMGTYPE): Ditto.
4363377e23a2Schristos	(EISD_S_L_EISDSIZE, EISD_S_L_SECSIZE, EISD_S_Q_VIR_ADDR): Ditto.
4364377e23a2Schristos	(EISD_S_L_FLAGS, EISD_S_L_VBN, EISD_S_R_CONTROL): Ditto.
4365377e23a2Schristos	(EISD_S_L_IDENT, EISD_S_T_GBLNAM): Ditto.
4366377e23a2Schristos	(EISD_S_M_GBL, EISD_S_M_CRF, EISD_S_M_DZRO, EISD_S_M_WRT): Ditto.
4367377e23a2Schristos	(EISD_S_M_INITALCODE, EISD_S_M_BASED, EISD_S_M_FIXUPVEC): Ditto.
4368377e23a2Schristos	(EISD_S_M_RESIDENT, EISD_S_M_VECTOR, EISD_S_M_PROTECT): Ditto.
4369377e23a2Schristos	(EISD_S_M_LASTCLU, EISD_S_M_EXE, EISD_S_M_NONSHRADR): Ditto.
4370377e23a2Schristos	(EISD_S_M_QUAD_LENGTH, EISD_S_M_ALLOC_64BIT): Ditto.
4371377e23a2Schristos	(EIHS_S_L_DSTVBN, EIHS_S_L_DSTSIZE, EIHS_S_L_GSTVBN): Ditto.
4372377e23a2Schristos	(EIHS_S_L_GSTSIZE, EIHS_S_L_DMTVBN, EIHS_S_L_DMTBYTES): Ditto.
4373377e23a2Schristos	(DBG_S_L_DMT_MODBEG, DBG_S_L_DST_SIZE): Ditto.
4374377e23a2Schristos	(DBG_S_W_DMT_PSECT_COUNT, DBG_S_C_DMT_HEADER_SIZE): Ditto.
4375377e23a2Schristos	(DBG_S_L_DMT_PSECT_START, DBG_S_L_DMT_PSECT_LENGTH)
4376377e23a2Schristos	(DBG_S_C_DMT_PSECT_SIZE): Ditto.
4377377e23a2Schristos	(enum file_type_enum): New type.
4378377e23a2Schristos	(struct location_struct): Removed.
4379377e23a2Schristos	(struct fileinfo, struct srecinfo, struct lineinfo): New types.
4380377e23a2Schristos	(struct funcinfo, struct module): Ditto.
4381377e23a2Schristos	(struct vms_private_data_struct): Update fields.
4382377e23a2Schristos	(struct vms_section_data_struct): New type.
4383377e23a2Schristos
4384377e23a2Schristos	* vms.c: Update copyright year, fix comments,
4385377e23a2Schristos	Fix includes for DECC, add prototypes.
4386377e23a2Schristos	(vms_initialize): Use bfd_alloc instead of bfd_zalloc and remove
4387377e23a2Schristos	some initializers.
4388377e23a2Schristos	Use flavour to set is_vax, location_stack is removed.
4389377e23a2Schristos	(struct pair): Declare.
4390377e23a2Schristos	(fill_section_ptr): Initialize variables at declaration.
4391377e23a2Schristos	Add guard to set SECTION_SYM flag, handlde und section.
4392377e23a2Schristos	(vms_fixup_sections): Use struct pair for fill_section_ptr argument.
4393377e23a2Schristos	(_bfd_vms_slurp_object_records): New function, replaces previous
4394377e23a2Schristos	vms_object_p.
4395377e23a2Schristos	(vms_slurp_module): New function.
4396377e23a2Schristos	(vms_slurp_image): Ditto.
4397377e23a2Schristos	(vms_object_p): Complete rewrite.
4398377e23a2Schristos	(vms_mkobject): Use is_vax field to slect architecture.
4399377e23a2Schristos	(free_reloc_stream): New function.
4400377e23a2Schristos	(vms_convert_to_var): Ditto.
4401377e23a2Schristos	(vms_convert_to_var_1): Ditto.
4402377e23a2Schristos	(vms_convert_to_var_unix_filename): Ditto.
4403377e23a2Schristos	(vms_close_and_cleanup): Call free_reloc_stream, convert file to
4404377e23a2Schristos	VAR format on VMS.
4405377e23a2Schristos	(vms_new_section_hook): Set alignment to 0, allocate private data.
4406377e23a2Schristos	(vms_get_section_contents): Load content.
4407377e23a2Schristos	(vms_get_symbol_info): Handle undefined section.
4408377e23a2Schristos	(vms_find_nearest_line): Handle.
4409377e23a2Schristos	(alloc_reloc_stream): New function.
4410377e23a2Schristos	(vms_slurp_reloc_table): Ditto.
4411377e23a2Schristos	(vms_get_reloc_upper_bound): Make it real.
4412377e23a2Schristos	(vms_canonicalize_reloc): Do the real work.
4413377e23a2Schristos	(alpha_howto_table): Add ALPHA_R_NOP, ALPHA_R_BSR, ALPHA_R_LDA,
4414377e23a2Schristos	ALPHA_R_BOH.
4415377e23a2Schristos	(vms_bfd_reloc_type_lookup): Handle NOP, BSR, LDA and BOH.
4416377e23a2Schristos	(vms_set_arch_mach): Check arch.
4417377e23a2Schristos	(vms_set_section_contents): Copy the content after allocation.
4418377e23a2Schristos	(vms_alpha_vec): Update object flags.
4419377e23a2Schristos
4420377e23a2Schristos	* vms-tir.c: Update copyright year, fix comments,
4421377e23a2Schristos	add prototypes for new functions.
4422377e23a2Schristos	(dst_define_location): New function.
4423377e23a2Schristos	(dst_restore_location): New function.
4424377e23a2Schristos	(dst_retrieve_location): New function.
4425377e23a2Schristos	(dst_check_allocation): New function.
4426377e23a2Schristos	(image_dump): Call dst_check_allocation.
4427377e23a2Schristos	(image_write_b): Ditto.
4428377e23a2Schristos	(image_write_w): Ditto.
4429377e23a2Schristos	(image_write_l): Ditto.
4430377e23a2Schristos	(image_write_q): Ditto.
4431377e23a2Schristos	(cmd_name): Handle STA_LW, STA_QW, STO_OFF, STO_IMM, STO_IMMR, STO_LW,
4432377e23a2Schristos	STO_QW, OPR_ADD, CTL_SETRB, STC_LP_PSB, CTL_DFLOC, CTL_STLOC,
4433377e23a2Schristos	CTL_STKDL.
4434377e23a2Schristos	Call error handler instead of abort if name is not known.
4435377e23a2Schristos	(etir_sta): Add quarter_relocs argument and set it.
4436377e23a2Schristos	Fix cast.
4437377e23a2Schristos	(etir_sto): Ditto.
4438377e23a2Schristos	(etir_opr): Ditto, return FALSE in case of error.
4439377e23a2Schristos	(etir_ctl): Add quarter_relocs argument and set it, fix cast.
4440377e23a2Schristos	Fix CTL_DFLOC, CTL_STLOC, CTL_STKDL.
4441377e23a2Schristos	(etir_stc): Add quarter_relocs argument and set it, fix cast.
4442377e23a2Schristos	Fix STC_LP, STC_LP_PSB, STC_GBL and STC_CGA.
4443377e23a2Schristos	Handle STC_LP_PSB, STC_BSR_GBL, STC_LDA_GBL, STC_BOH_GBL.
4444377e23a2Schristos	Move STC_NOP_PS, STC_BSR_PS, STC_LDA_PS, STC_BOH_PS, STC_NBH_PS.
4445377e23a2Schristos	Return FALSE in case of error.
4446377e23a2Schristos	(tir_sta): Change sign of psect.
4447377e23a2Schristos	(tir_ctl): Ditto.
4448377e23a2Schristos	(tir_cmd): Fix cast. Makes tir_table static const.
4449377e23a2Schristos	(etir_cmd): Add quarter_relocs argument, makes etir_table const,
4450377e23a2Schristos	add argument to explain.
4451377e23a2Schristos	(analyze_etir): Initialize maxptr, add quarter_relocs
4452377e23a2Schristos	declaration, move some declarations into inner scopes.
4453377e23a2Schristos	Handle quarter_relocs and STO_IMM.
4454377e23a2Schristos	(_bfd_vms_slurp_tir): Use constant instead of hard-coded values.
4455377e23a2Schristos	(_bfd_vms_slurp_relocs): New function.
4456377e23a2Schristos	(_bfd_vms_decode_relocs): New function.
4457377e23a2Schristos	(sto_imm): Rewritten.
4458377e23a2Schristos	(start_first_etbt_record): New function.
4459377e23a2Schristos	(start_another_etbt_record): Ditto.
4460377e23a2Schristos	(etir_output_check): Ditto.
4461377e23a2Schristos	(defer_reloc_p): Ditto.
4462377e23a2Schristos	(_bfd_vms_write_tir): Remove nextoffset, convert a while-loop to
4463377e23a2Schristos	a for-loop.  Correctly deals with contents, deals with .vmsdebug,
4464377e23a2Schristos	rewritte relocations handling.
4465377e23a2Schristos	(_bfd_vms_write_tbt): Removed.
4466377e23a2Schristos	(_bfd_vms_write_dbg): Ditto.
4467377e23a2Schristos
4468377e23a2Schristos	* vms-misc.c: Update copyright year, Fix comments.
4469377e23a2Schristos	(_bfd_vms_get_header_values): Use 'size' instead of 'length'.
4470377e23a2Schristos	(maybe_adjust_record_pointer_for_object): New function.
4471377e23a2Schristos	(_bfd_vms_get_first_record): New function, replaces ...
4472377e23a2Schristos	(_bfd_vms_get_record): ..  removed.
4473377e23a2Schristos	(_bfd_vms_get_object_record): New function.
4474377e23a2Schristos	(_bfd_vms_get_object_record): New function.
4475377e23a2Schristos	(vms_get_remaining_object_record): New function, replaces ...
4476377e23a2Schristos	(_bfd_vms_get_next_record): ... removed.
4477377e23a2Schristos	(add_new_contents): Removed.
4478377e23a2Schristos	(_bfd_save_vms_section): Removed.
4479377e23a2Schristos	(_bfd_get_vms_section): Removed.
4480377e23a2Schristos	(_bfd_vms_output_flush): Write in VAR format.
4481377e23a2Schristos	(new_symbol): Don't make UND section.
4482377e23a2Schristos
4483377e23a2Schristos	* vms-hdr.c: Update copyright year, update list of record handled.
4484377e23a2Schristos	(_bfd_vms_slurp_hdr): rec_length renamed to rec_size.
4485377e23a2Schristos	(_bfd_vms_write_hdr): Strip vms and unix patches,
4486377e23a2Schristos	add comments, truncate module name at 31 characters,
4487377e23a2Schristos	use constants instead of hard-coded value,
4488377e23a2Schristos	write BFD version instead of a fixed string.
4489377e23a2Schristos	(_bfd_vms_slurp_ihd): New function.
4490377e23a2Schristos	(_bfd_vms_slurp_isd): Ditto.
4491377e23a2Schristos	(_bfd_vms_slurp_ihs): Ditto.
4492377e23a2Schristos	(new_module): Ditto.
4493377e23a2Schristos	(parse_module): Ditto
4494377e23a2Schristos	(build_module_list): Ditto.
4495377e23a2Schristos	(module_find_nearest_line): Ditto.
4496377e23a2Schristos	(_bfd_vms_find_nearest_dst_line): Ditto.
4497377e23a2Schristos	(vms_slurp_debug): Ditto.
4498377e23a2Schristos	(_bfd_vms_slurp_dbg): Ditto.
4499377e23a2Schristos	(_bfd_vms_slurp_tbt): Ditto.
4500377e23a2Schristos	(_bfd_vms_write_dbg): Ditto.
4501377e23a2Schristos	(_bfd_vms_write_tbt): Ditto.
4502377e23a2Schristos
4503377e23a2Schristos	* vms-gsd.c: Update copyright year, update list of records handled.
4504377e23a2Schristos	(EVAX_LITERALS_NAME): New macro.
4505377e23a2Schristos	(evax_section_flags): Add an entry for EVAX_LITERALS_NAME.
4506377e23a2Schristos	(gpsflagdesc, gsyflagdesc): Moved out of _bfd_vms_slurp_gsd.
4507377e23a2Schristos	(register_universal_symbol): New function and prototype.
4508377e23a2Schristos	(_bfd_vms_slurp_gsd): Fix indentations and casts,
4509377e23a2Schristos	improve debug messages,
4510377e23a2Schristos	use constants instead of hard-coded value,
4511377e23a2Schristos	fix missing endianness conversion,
4512377e23a2Schristos	handle global symbol (SYMG).
4513377e23a2Schristos	(bfd_vms_set_section_flags): New function.
4514377e23a2Schristos	(_bfd_vms_write_gsd): Don't write .vmsdebug section,
4515377e23a2Schristos	handle section literals,
4516377e23a2Schristos	fix indentation,
4517377e23a2Schristos	handle section bfd and vms flags,
4518377e23a2Schristos	don't output LIB$INITIALIZE symbol,
4519377e23a2Schristos	fix handling of weak symbols,
4520377e23a2Schristos	fix evax vs vax procedure descriptor,
4521377e23a2Schristos	handle absolute symbols.
4522377e23a2Schristos
4523377e23a2Schristos	* reloc.c (BFD_RELOC_ALPHA_NOP, BFD_RELOC_ALPHA_BSR,
4524377e23a2Schristos	BFD_RELOC_ALPHA_LDA, BFD_RELOC_ALPHA_BOH): New relocations.
4525377e23a2Schristos
4526377e23a2Schristos	* makefile.vms (DEFS): Fix flags for VMS.
4527377e23a2Schristos
4528377e23a2Schristos	* bfdio.c (real_fopen): Handle multiple VMS fopen attributes.
4529377e23a2Schristos
4530377e23a2Schristos	* bfd-in2.h: Regenerated.
4531377e23a2Schristos	* libbfd.h: Regenerated.
4532377e23a2Schristos
4533377e23a2Schristos2009-02-20  Cary Coutant  <ccoutant@google.com>
4534377e23a2Schristos
4535377e23a2Schristos	* vmsutil.c (vms_file_stats_name): Fix incorrect use of st_mtime
4536377e23a2Schristos	in struct stat.
4537377e23a2Schristos
4538377e23a2Schristos2009-18-02  Dave Korn  <dave.korn.cygwin@gmail.com>
4539377e23a2Schristos
4540377e23a2Schristos	PR gas/7059
4541377e23a2Schristos	* coffcode.h (coff_write_object_contents):  Don't let the string
4542377e23a2Schristos	table offset overflow the s_name field when using long section names.
4543377e23a2Schristos
4544377e23a2Schristos2009-18-02  Dave Korn  <dave.korn.cygwin@gmail.com>
4545377e23a2Schristos
4546377e23a2Schristos	* coff-alpha.c (alpha_ecoff_backend_data):  Initialise fields which
4547377e23a2Schristos	control long section name handling with ECOFF_NO_LONG_SECTION_NAMES.
4548377e23a2Schristos	* coff-mips.c (mips_ecoff_backend_data):  Likewise.
4549377e23a2Schristos	* coff-rs6000.c (bfd_xcoff_backend_data):  Initialise fields which
4550377e23a2Schristos	control long section name handling with XCOFF_NO_LONG_SECTION_NAMES.
4551377e23a2Schristos	(bfd_pmac_xcoff_backend_data):  Likewise.
4552377e23a2Schristos	* coff64-rs6000.c (bfd_xcoff_backend_data):  Likewise.
4553377e23a2Schristos	(bfd_xcoff_aix5_backend_data):  Likewise.
4554377e23a2Schristos	(xcoff64_write_object_contents):  Delete unused long_section_names
4555377e23a2Schristos	local variable.
4556377e23a2Schristos	* coff-sh.c (bfd_coff_small_swap_table):  Initialise long section
4557377e23a2Schristos	name members using COFF_DEFAULT_LONG_SECTION_NAMES and make entire
4558377e23a2Schristos	struct non-const.
4559377e23a2Schristos	* coffcode.h (documentation):  Update to describe long section names.
4560377e23a2Schristos	(COFFLONGSECTIONCATHELPER):  New helper macro.
4561377e23a2Schristos	(BLANKOR1TOODD):  Likewise.
4562377e23a2Schristos	(COFF_ENABLE_LONG_SECTION_NAMES):  Likewise.
4563377e23a2Schristos	(COFF_LONG_SECTION_NAMES_SETTER):  Likewise.
4564377e23a2Schristos	(COFF_DEFAULT_LONG_SECTION_NAMES):  Likewise.
4565377e23a2Schristos	(bfd_coff_set_long_section_names_allowed):  New function.
4566377e23a2Schristos	(bfd_coff_set_long_section_names_disallowed):  Likewise.
4567377e23a2Schristos	(struct bfd_coff_backend_data):  Add new backend hook function
4568377e23a2Schristos	pointer _bfd_coff_set_long_section_names.
4569377e23a2Schristos	(bfd_coff_set_long_section_names):  New backend hook.
4570377e23a2Schristos	(coff_write_object_contents):  Only generate long section names if
4571377e23a2Schristos	bfd_coff_long_section_names() indicates they are currently enabled.
4572377e23a2Schristos	(bfd_coff_std_swap_table):  Make non-const, and initialise long
4573377e23a2Schristos	section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
4574377e23a2Schristos	(ticoff0_swap_table):  Likewise to both.
4575377e23a2Schristos	(ticoff1_swap_table):  Again, likewise to both.
4576377e23a2Schristos	* coffgen.c (make_a_section_from_file):  Allow long section names
4577377e23a2Schristos	as inputs even if not currently allowed for outputs.
4578377e23a2Schristos	* ecoff.c (_bfd_ecoff_no_long_sections):  New function.
4579377e23a2Schristos	* efi-app-ia32.c (COFF_LONG_SECTION_NAMES):  Define to 0, not blank.
4580377e23a2Schristos	* efi-app-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4581377e23a2Schristos	* efi-app-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4582377e23a2Schristos	* efi-bsdrv-ia32.c (COFF_LONG_SECTION_NAMES):  Likewise.
4583377e23a2Schristos	* efi-bsdrv-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4584377e23a2Schristos	* efi-bsdrv-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4585377e23a2Schristos	* efi-rtdrv-ia32.c (COFF_LONG_SECTION_NAMES):  Likewise.
4586377e23a2Schristos	* efi-rtdrv-ia64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4587377e23a2Schristos	* efi-rtdrv-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4588377e23a2Schristos	* pei-arm.c (COFF_LONG_SECTION_NAMES):  Likewise.
4589377e23a2Schristos	* pei-i386.c (COFF_LONG_SECTION_NAMES):  Likewise.
4590377e23a2Schristos	* pei-mcore.c (COFF_LONG_SECTION_NAMES):  Likewise.
4591377e23a2Schristos	* pei-mips.c (COFF_LONG_SECTION_NAMES):  Likewise.
4592377e23a2Schristos	* pei-ppc.c (COFF_LONG_SECTION_NAMES):  Likewise.
4593377e23a2Schristos	* pei-sh.c (COFF_LONG_SECTION_NAMES):  Likewise.
4594377e23a2Schristos	* pei-x86_64.c (COFF_LONG_SECTION_NAMES):  Likewise.
4595377e23a2Schristos	* libcoff-in.h:  Update copyright year to cause updated copyright
4596377e23a2Schristos	year in generated libcoff.h, and fix typo.
4597377e23a2Schristos	* libcoff.h:  Regenerated.
4598377e23a2Schristos	* libecoff.h (ECOFF_NO_LONG_SECTION_NAMES):  New macro.
4599377e23a2Schristos	(_bfd_ecoff_no_long_sections):  Add prototype.
4600377e23a2Schristos	* libxcoff.h (XCOFF_NO_LONG_SECTION_NAMES):  New macro.
4601377e23a2Schristos	* pe-mips.c (COFF_LONG_SECTION_NAMES):  Define empty if not already
4602377e23a2Schristos	defined by an including .c file.
4603377e23a2Schristos	* ticoff.h (ticoff0_swap_table):  Make non-const, and initialise
4604377e23a2Schristos	long section name fields using COFF_DEFAULT_LONG_SECTION_NAMES.
4605377e23a2Schristos	(ticoff1_swap_table):  Likewise to both.
4606377e23a2Schristos
4607377e23a2Schristos2009-02-18  Christophe Lyon  <christophe.lyon@st.com>
4608377e23a2Schristos
4609377e23a2Schristos	* elf32-arm.c (arm_build_one_stub): Fix relocation target for pic
4610377e23a2Schristos	stub. Catch default case error.
4611377e23a2Schristos	(arm_map_one_stub): Add missing Thumb mapping symbol.
4612377e23a2Schristos
4613377e23a2Schristos2009-02-18  Bjoern Haase  <bjoern.m.haase@web.de>
4614377e23a2Schristos
4615377e23a2Schristos	PR 9841
4616377e23a2Schristos	* elf32-avr.c: Handle case where no local symbos exist correctly.
4617377e23a2Schristos
4618377e23a2Schristos2009-02-16  Christophe Lyon  <christophe.lyon@st.com>
4619377e23a2Schristos
4620377e23a2Schristos	bfd/
4621377e23a2Schristos	* elf32-arm.c (arm_long_branch_stub,
4622377e23a2Schristos	arm_thumb_v4t_long_branch_stub,
4623377e23a2Schristos	arm_thumb_thumb_long_branch_stub,
4624377e23a2Schristos	arm_thumb_arm_v4t_long_branch_stub,
4625377e23a2Schristos	arm_thumb_arm_v4t_short_branch_stub,
4626377e23a2Schristos	arm_pic_long_branch_stub):
4627377e23a2Schristos	Renamed to elf32_arm_stub_long_branch_any_any,
4628377e23a2Schristos	elf32_arm_stub_long_branch_v4t_arm_thumb,
4629377e23a2Schristos	elf32_arm_stub_long_branch_thumb_only,
4630377e23a2Schristos	elf32_arm_stub_long_branch_v4t_thumb_arm,
4631377e23a2Schristos	elf32_arm_stub_short_branch_v4t_thumb_arm,
4632377e23a2Schristos	elf32_arm_stub_long_branch_any_any_pic.
4633377e23a2Schristos	(arm_stub_long_branch, arm_thumb_v4t_stub_long_branch,
4634377e23a2Schristos	arm_thumb_thumb_stub_long_branch,
4635377e23a2Schristos	arm_thumb_arm_v4t_stub_long_branch,
4636377e23a2Schristos	arm_thumb_arm_v4t_stub_short_branch, arm_stub_pic_long_branch):
4637377e23a2Schristos	Renamed to arm_stub_long_branch_any_any,
4638377e23a2Schristos	arm_stub_long_branch_v4t_arm_thumb,
4639377e23a2Schristos	arm_stub_long_branch_thumb_only,
4640377e23a2Schristos	arm_stub_long_branch_v4t_thumb_arm,
4641377e23a2Schristos	arm_stub_short_branch_v4t_thumb_arm,
4642377e23a2Schristos	arm_stub_long_branch_any_any_pic.
4643377e23a2Schristos
4644377e23a2Schristos2009-02-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4645377e23a2Schristos
4646377e23a2Schristos	* elf-hppa.h (elf_hppa_final_link_relocate): Correct addend value used
4647377e23a2Schristos	in branch offset check.
4648377e23a2Schristos
4649377e23a2Schristos2009-02-15  Alan Modra  <amodra@bigpond.net.au>
4650377e23a2Schristos
4651377e23a2Schristos	* elf64-ppc.c (struct _ppc64_elf_section_data): Delete t_symndx,
4652377e23a2Schristos	add toc.symndx and toc.add.
4653377e23a2Schristos	(ppc64_elf_check_relocs): Don't set htab->tls_get_addr here.
4654377e23a2Schristos	Set up toc.add.
4655377e23a2Schristos	(get_tls_mask): Add toc_addend param, set from toc.add.  Adjust all
4656377e23a2Schristos	callers.
4657377e23a2Schristos	(ppc64_elf_tls_setup): Set htab->tls_get_addr and tls_get_addr_fd.
4658377e23a2Schristos	(branch_reloc_hash_match): New function, extracted from..
4659377e23a2Schristos	(ppc64_elf_tls_optimize): ..here.
4660377e23a2Schristos	(ppc64_elf_relocate_section): Properly set addends when optimizing
4661377e23a2Schristos	tls sequences.  Avoid unnecessary reading and writing of insns.
4662377e23a2Schristos	Only redo reloc when symbol changed.  Bypass symbol checks when
4663377e23a2Schristos	using tlsld_got.
4664377e23a2Schristos	* elf32-ppc.c (ppc_elf_tls_setup): Correct comment.
4665377e23a2Schristos	(branch_reloc_hash_match): New function, extracted from..
4666377e23a2Schristos	(ppc_elf_tls_optimize): ..here.
4667377e23a2Schristos	(ppc_elf_relocate_section): Avoid unnecessary reading of insns.
4668377e23a2Schristos	Don't clear addend on zapped __tls_get_addr reloc.
4669377e23a2Schristos
4670377e23a2Schristos2009-02-12  Nick Clifton  <nickc@redhat.com>
4671377e23a2Schristos
4672377e23a2Schristos	PR 9827
4673377e23a2Schristos	* elflink.c (bfd_elf_final_link): When counting the relocations,
4674377e23a2Schristos	if the header size has not been set yet then assume that it will
4675377e23a2Schristos	match the output section's reloc type.
4676377e23a2Schristos
4677377e23a2Schristos2009-02-12  Nathan Sidwell  <nathan@codesourcery.com>
4678377e23a2Schristos
4679377e23a2Schristos	* elf32-mips.c (mips_elf_final_gp): Don't add 0x4000 offset for
4680377e23a2Schristos	relocatable link.
4681377e23a2Schristos
4682377e23a2Schristos2009-02-09  Alan Modra  <amodra@bigpond.net.au>
4683377e23a2Schristos
4684377e23a2Schristos	* elf32-spu.c (spu_elf_find_overlays): Call bfd_set_error on errors.
4685377e23a2Schristos	(find_function): Likewise.
4686377e23a2Schristos	(pasted_function): Don't error if no prior function found.
4687377e23a2Schristos	(discover_functions): Revert 2008-12-10 change.  Extend first
4688377e23a2Schristos	function range to start of section.
4689377e23a2Schristos
4690377e23a2Schristos2009-02-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4691377e23a2Schristos
4692377e23a2Schristos	* elf64-hppa.c: Remove PARAMS macro.  Replace PTR with void *.  Convert
4693377e23a2Schristos	functions to C90.
4694377e23a2Schristos	* elf64-hppa.h: Likewise.
4695377e23a2Schristos
4696377e23a2Schristos2009-02-06  Joseph Myers  <joseph@codesourcery.com>
4697377e23a2Schristos
4698377e23a2Schristos	* elfxx-mips.c (_bfd_mips_elf_section_processing): Remove special
4699377e23a2Schristos	.sbss handling.
4700377e23a2Schristos
4701377e23a2Schristos2009-02-04  Alan Modra  <amodra@bigpond.net.au>
4702377e23a2Schristos
4703377e23a2Schristos	* elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
4704377e23a2Schristos	Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
4705377e23a2Schristos
4706377e23a2Schristos2009-02-03  Sandip Matte  <sandip@rmicorp.com>
4707377e23a2Schristos
4708377e23a2Schristos	* aoutx.h (NAME (aout, machine_type)): Handle bfd_mach_mips_xlr.
4709377e23a2Schristos	* archures.c (bfd_mach_mips_xlr): Define.
4710377e23a2Schristos	* bfd-in2.h: Regenerate.
4711377e23a2Schristos	* cpu-mips.c (I_xlr): Define.
4712377e23a2Schristos	(arch_info_struct): Add XLR entry.
4713377e23a2Schristos	* elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_XLR.
4714377e23a2Schristos	(mips_set_isa_flags): Handle bfd_mach_mips_xlr
4715377e23a2Schristos	(mips_mach_extensions): Add XLR entry.
4716377e23a2Schristos
4717377e23a2Schristos2009-02-03  Eric B. Weddington  <eric.weddington@atmel.com>
4718377e23a2Schristos
4719377e23a2Schristos	* elf32-avr.c (avr_final_link_relocate): Allow avr25 to wraparound.
4720377e23a2Schristos
4721377e23a2Schristos2009-02-03  Carlos O'Donell  <carlos@codesourcery.com>
4722377e23a2Schristos
4723377e23a2Schristos	* configure.in: AC_SUBST pdfdir.
4724377e23a2Schristos	* Makefile.am: Add install-pdf, install-pdf-am
4725377e23a2Schristos	and install-pdf-recursive targets. Define pdfdir.
4726377e23a2Schristos	* doc/Makefile.am: Define pdf__strip_dir. Add
4727377e23a2Schristos	install-pdf and install-pdf-am targets.
4728377e23a2Schristos	* po/Make-in: Add install-pdf target.
4729377e23a2Schristos	* configure: Regenerate.
4730377e23a2Schristos	* Makefile.in: Regenerate
4731377e23a2Schristos	* doc/Makefile.in: Regenerate.
4732377e23a2Schristos
4733377e23a2Schristos2009-02-03  Maxim Kuvyrkov  <maxim@codesourcery.com>
4734377e23a2Schristos
4735377e23a2Schristos	* bfd-in2.h: Regenerate.
4736377e23a2Schristos	* elf32-m68k.c: Handle 2-slot GOT entries.  Rename variables and
4737377e23a2Schristos	fields from n_entries to n_slots where appropriate, update comments.
4738377e23a2Schristos	(HOWTO): Add TLS relocations.
4739377e23a2Schristos	(reloc_map): Map BFD_RELOC_68K_TLS_* to R_68K_TLS_*.
4740377e23a2Schristos	(enum elf_m68k_got_offset_size): New enum.
4741377e23a2Schristos	(struct elf_m68k_got_entry.type): Move field to ...
4742377e23a2Schristos	(struct elf_m68k_got_entry_key): ... here.  Update all uses.
4743377e23a2Schristos	(elf_m68k_reloc_got_type, elf_m68k_reloc_got_offset_size): New static
4744377e23a2Schristos	functions.
4745377e23a2Schristos	(elf_m68k_reloc_got_n_entries, elf_m68k_reloc_tls_p): New static
4746377e23a2Schristos	functions.
4747377e23a2Schristos	(struct elf_m68k_got): merge rel_8o_n_entries and rel_8o_16o_n_entries
4748377e23a2Schristos	fields into n_entries array.  Update comments.
4749377e23a2Schristos	(elf_m68k_init_got): Simplify, update all uses.
4750377e23a2Schristos	(elf_m68k_init_got_entry_key): Handle R_68K_TLS_LDM32 reloc, update.
4751377e23a2Schristos	(ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT): Adjust to handle 2-slot
4752377e23a2Schristos	GOT entries; update name, update all uses.
4753377e23a2Schristos	(ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): Ditto.
4754377e23a2Schristos	(elf_m68k_get_got_entry): Update.
4755377e23a2Schristos	(elf_m68k_update_got_entry_type): Rewrite to handle TLS GOT entries,
4756377e23a2Schristos	simplify.
4757377e23a2Schristos	(elf_m68k_remove_got_entry_type): Simplify.
4758377e23a2Schristos	(elf_m68k_add_entry_to_got, elf_m68k_can_merge_gots_1): Update.
4759377e23a2Schristos	(elf_m68k_can_merge_gots): Update.
4760377e23a2Schristos	(elf_m68k_merge_gots_1, elf_m68k_merge_gots): Update.
4761377e23a2Schristos	(struct elf_m68k_finalize_got_offsets_arg): Rewrite to handle 2-slot
4762377e23a2Schristos	GOT entries, simplify.
4763377e23a2Schristos	(elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Same.
4764377e23a2Schristos	(struct elf_m68k_partition_multi_got_arg): Add slots_relas_diff
4765377e23a2Schristos	field, remove obsoleted local_n_entries field.
4766377e23a2Schristos	(elf_m68k_partition_multi_got_2): New static function.
4767377e23a2Schristos	(elf_m68k_partition_multi_got_1, elf_m68k_partition_multi_got): Use it;
4768377e23a2Schristos	update.
4769377e23a2Schristos	(elf_m68k_remove_got_entry_type): Update.
4770377e23a2Schristos	(elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
4771377e23a2Schristos	(elf_m68k_check_relocs): Handle TLS relocations.  Remove unnecessary
4772377e23a2Schristos	update of sgot->size and srelgot->size.
4773377e23a2Schristos	(elf_m68k_gc_sweep_hook): Update.
4774377e23a2Schristos	(elf_m68k_install_rela, dtpoff_base, tpoff): New static functions.
4775377e23a2Schristos	(elf_m68k_relocate_section, elf_m68k_finish_dynamic_symbol): Handle
4776377e23a2Schristos	TLS relocations.
4777377e23a2Schristos	* reloc.c (BFD_RELOC_68K_TLS_*): Declare TLS relocations.
4778377e23a2Schristos	* libbfd.h (bfd_reloc_code_real_names): Add BFD_RELOC_68K_TLS_*.
4779377e23a2Schristos
4780377e23a2Schristos2009-02-02  DJ Delorie  <dj@redhat.com>
4781377e23a2Schristos
4782377e23a2Schristos	* elf32-mep.c (config_names): Regenerate configuration.
4783377e23a2Schristos
4784377e23a2Schristos2009-02-02  Alan Modra  <amodra@bigpond.net.au>
4785377e23a2Schristos
4786377e23a2Schristos	* elf-bfd.h (bfd_elf_get_str_section): Don't declare.
4787377e23a2Schristos	(bfd_elf_find_section, _sh_elf_set_mach_from_flags): Likewise.
4788377e23a2Schristos	* elf.c (bfd_elf_get_str_section): Make static.
4789377e23a2Schristos	(bfd_elf_find_section): Delete.
4790377e23a2Schristos	* libbfd.h: Regenerate.
4791377e23a2Schristos
4792377e23a2Schristos2009-02-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
4793377e23a2Schristos
4794377e23a2Schristos	* elf-eh-frame.c (REQUIRE_CLEARED_RELOCS) Remove.
4795377e23a2Schristos	(_bfd_elf_parse_eh_frame): Do not check relocations for removed FDEs.
4796377e23a2Schristos
4797377e23a2Schristos2009-01-31  Alan Modra  <amodra@bigpond.net.au>
4798377e23a2Schristos
4799377e23a2Schristos	* elflink.c (on_needed_list): New function.
4800377e23a2Schristos	(elf_link_add_object_symbols): Link in --as-needed libs if they
4801377e23a2Schristos	satisfy undefined symbols in other libs.
4802377e23a2Schristos
4803377e23a2Schristos2009-01-30  Julian Brown  <julian@codesourcery.com>
4804377e23a2Schristos
4805377e23a2Schristos	* elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Skip BFDs with
4806377e23a2Schristos	EXEC_P or DYNAMIC flags, and skip sections which are being linked
4807377e23a2Schristos	with --just-symbols (-R).
4808377e23a2Schristos
4809377e23a2Schristos2009-01-29  Adam Nemet  <anemet@caviumnetworks.com>
4810377e23a2Schristos
4811377e23a2Schristos	* dwarf2.c (read_rangelist): Use read_address to read low_pc and
4812377e23a2Schristos	high_pc in order to properly sign-extend VMAs.
4813377e23a2Schristos
4814377e23a2Schristos2009-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
4815377e23a2Schristos	    Mark Shinwell  <shinwell@codesourcery.com>
4816377e23a2Schristos	    Catherine Moore  <clm@codesourcery.com>
4817377e23a2Schristos
4818377e23a2Schristos	* elf-attrs.c, elflink.c, elfxx-mips.c: Correct typos in comments.
4819377e23a2Schristos
4820377e23a2Schristos2009-01-28  Catherine Moore <clm@codesourcery.com>
4821377e23a2Schristos
4822377e23a2Schristos	* elf32-arm.c (elf32_arm_check_relocs): Set SEC_ALLOC and
4823377e23a2Schristos	SEC_LOAD for dynamic relocation sections.
4824377e23a2Schristos
4825377e23a2Schristos2009-01-27  Hans-Peter Nilsson  <hp@axis.com>
4826377e23a2Schristos
4827377e23a2Schristos	* elf32-cris.c (cris_elf_relocate_section): Use elf_hash_table
4828377e23a2Schristos	(info)->tls_size, not elf_hash_table (info)->tls_sec->size for
4829377e23a2Schristos	the size of local TLS data.
4830377e23a2Schristos
4831377e23a2Schristos2009-01-27  Andreas Schwab  <schwab@suse.de>
4832377e23a2Schristos
4833377e23a2Schristos	* mach-o.c (bfd_mach_o_archive_p): Restrict the number of
4834377e23a2Schristos	architectures in the archive.
4835377e23a2Schristos
4836377e23a2Schristos2009-01-27  Hans-Peter Nilsson  <hp@axis.com>
4837377e23a2Schristos
4838377e23a2Schristos	* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
4839377e23a2Schristos	<R_CRIS_32_DTPREL>: Correct relocation value.
4840377e23a2Schristos
4841377e23a2Schristos	* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_8>
4842377e23a2Schristos	<R_CRIS_16, R_CRIS_32>: Don't call BFD_ASSERT for weak undefined
4843377e23a2Schristos	symbols with non-default visibility.
4844377e23a2Schristos
4845377e23a2Schristos2009-01-26  Nathan Sidwell  <nathan@codesourcery.com>
4846377e23a2Schristos
4847377e23a2Schristos	* elf32-ppc.c (ppc_elf_relax_section): Add space for relocs
4848377e23a2Schristos	describing the trampolines.
4849377e23a2Schristos	(ppc_elf_relocate_section): Update relocs to describe the
4850377e23a2Schristos	trampolines.
4851377e23a2Schristos
4852377e23a2Schristos2009-01-25  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4853377e23a2Schristos
4854377e23a2Schristos	* elf-hppa.h (elf_hppa_final_link_relocate): Add check to ensure that
4855377e23a2Schristos	branch targets can be reached for R_PARISC_PCREL22F, R_PARISC_PCREL17F
4856377e23a2Schristos	and R_PARISC_PCREL12F relocations.
4857377e23a2Schristos
4858377e23a2Schristos2009-01-24  Alan Modra  <amodra@bigpond.net.au>
4859377e23a2Schristos
4860377e23a2Schristos	PR 6022
4861377e23a2Schristos	* elflink.c (find_version_for_sym): New function split out from,
4862377e23a2Schristos	but without export_dynamic test, ..
4863377e23a2Schristos	(_bfd_elf_link_assign_sym_version): ..here.
4864377e23a2Schristos	(_bfd_elf_export_symbol): Use it.
4865377e23a2Schristos
4866377e23a2Schristos2009-01-23  Alan Modra  <amodra@bigpond.net.au>
4867377e23a2Schristos
4868377e23a2Schristos	* elf-bfd.h (struct elf_assign_sym_version_info): Delete.
4869377e23a2Schristos	(struct elf_info_failed, struct elf_find_verdep_info): Move to..
4870377e23a2Schristos	* elflink.c: ..here, somewhat modified.
4871377e23a2Schristos	* elf-bfd.h (_bfd_elf_add_default_symbol, _bfd_elf_export_symbol,
4872377e23a2Schristos	_bfd_elf_link_find_version_dependencies,
4873377e23a2Schristos	_bfd_elf_link_assign_sym_version, _bfd_elf_link_size_reloc_section,
4874377e23a2Schristos	_bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
4875377e23a2Schristos	_bfd_elf_link_sec_merge_syms, bfd_elf_link_mark_dynamic_symbol): Don't
4876377e23a2Schristos	declare..
4877377e23a2Schristos	* elflink.c: ..and make static here.
4878377e23a2Schristos	(_bfd_elf_link_find_version_dependencies): Adjust for removal
4879377e23a2Schristos	of output_bfd from struct elf_find_verdep_info.
4880377e23a2Schristos	(_bfd_elf_link_assign_sym_version): Similarly adjust to use
4881377e23a2Schristos	struct elf_info_failed.
4882377e23a2Schristos	(bfd_elf_size_dynamic_sections): Adjust.
4883377e23a2Schristos
4884377e23a2Schristos2009-01-22  Alan Modra  <amodra@bigpond.net.au>
4885377e23a2Schristos
4886377e23a2Schristos	PR 6832
4887377e23a2Schristos	* dwarf2.c (find_line): Don't update stash->sec_info_ptr until
4888377e23a2Schristos	after comp_unit_find_line call.
4889377e23a2Schristos
4890377e23a2Schristos2009-01-21  Nick Clifton  <nickc@redhat.com>
4891377e23a2Schristos
4892377e23a2Schristos	PR 9769
4893377e23a2Schristos	* vmsutil.c (vms_file_stats_name): Remove use of unsupported
4894377e23a2Schristos	tm_gmtoff field in struct tm.
4895377e23a2Schristos
4896377e23a2Schristos2009-01-21  Alan Modra  <amodra@bigpond.net.au>
4897377e23a2Schristos
4898377e23a2Schristos	* elf32-spu.h (struct spu_elf_params): Add non_ia_text.
4899377e23a2Schristos	* elf32-spu.c (mark_overlay_section): Only include .text.ia.*
4900377e23a2Schristos	sections in soft-icache lines unless non_ia_text.  Don't add
4901377e23a2Schristos	rodata if doing so would exceed line size.
4902377e23a2Schristos
4903377e23a2Schristos2009-01-19  Hans-Peter Nilsson  <hp@axis.com>
4904377e23a2Schristos
4905377e23a2Schristos	* elf32-cris.c (elf_cris_copy_indirect_symbol): For other symbol
4906377e23a2Schristos	types than bfd_link_hash_indirect, before early return, call
4907377e23a2Schristos	_bfd_elf_link_hash_copy_indirect.
4908377e23a2Schristos
4909377e23a2Schristos2009-01-19  Andrew Stubbs  <ams@codesourcery.com>
4910377e23a2Schristos
4911377e23a2Schristos	* elf-attrs.c (vendor_set_obj_attr_contents): Support tag ordering.
4912377e23a2Schristos	* elf-bfd.h (elf_backend_data): Add obj_attrs_order.
4913377e23a2Schristos	* elf32-arm.c (elf32_arm_obj_attrs_order): New function.
4914377e23a2Schristos	(elf_backend_obj_attrs_order): New define.
4915377e23a2Schristos	* elfxx-target.h (elf_backend_obj_attrs_order): New define.
4916377e23a2Schristos	(elfNN_bed): Add elf_backend_obj_attrs_order.
4917377e23a2Schristos
4918377e23a2Schristos2009-01-19  Andrew Stubbs  <ams@codesourcery.com>
4919377e23a2Schristos
4920377e23a2Schristos	* elf-attrs.c (is_default_attr): Substitute magic numbers with macros.
4921377e23a2Schristos	(obj_attr_size): Likewise.
4922377e23a2Schristos	(write_obj_attribute): Likewise.
4923377e23a2Schristos	(_bfd_elf_copy_obj_attributes): Likewise.
4924377e23a2Schristos	(_bfd_elf_parse_attributes): Likewise.
4925377e23a2Schristos	* elf-bfd.h (ATTR_TYPE_FLAG_INT_VAL): New define.
4926377e23a2Schristos	(ATTR_TYPE_FLAG_STR_VAL, ATTR_TYPE_FLAG_NO_DEFAULT): New defines.
4927377e23a2Schristos	(ATTR_TYPE_HAS_INT_VAL, ATTR_TYPE_HAS_STR_VAL): New defines.
4928377e23a2Schristos	(ATTR_TYPE_HAS_NO_DEFAULT): New define.
4929377e23a2Schristos	* elf32-arm.c (elf32_arm_obj_attrs_arg_type): Replace magic numbers
4930377e23a2Schristos	with macros.
4931377e23a2Schristos
4932377e23a2Schristos2009-01-19  Andrew Stubbs  <ams@codesourcery.com>
4933377e23a2Schristos
4934377e23a2Schristos	* elf-attrs.c (is_default_attr): Support defaultless attributes.
4935377e23a2Schristos	(bfd_elf_add_obj_attr_int): Get type from _bfd_elf_obj_attrs_arg_type.
4936377e23a2Schristos	(bfd_elf_add_obj_attr_string): Likewise.
4937377e23a2Schristos	(bfd_elf_add_obj_attr_int_string): Likewise.
4938377e23a2Schristos	(_bfd_elf_parse_attributes): Allow for unknown flag bits in type.
4939377e23a2Schristos	* elf-bfd.h (struct obj_attribute): Document new flag bit.
4940377e23a2Schristos	* elf32-arm.c (elf32_arm_obj_attrs_arg_type): Specify that
4941377e23a2Schristos	Tag_nodefaults has no default value.
4942377e23a2Schristos	(elf32_arm_merge_eabi_attributes): Modify the Tag_nodefaults
4943377e23a2Schristos	comment to reflect the new state.
4944377e23a2Schristos
4945377e23a2Schristos2009-01-19  Alan Modra  <amodra@bigpond.net.au>
4946377e23a2Schristos
4947377e23a2Schristos	PR 9695
4948377e23a2Schristos	* pdp11.c (N_BADMAG): True for anything but OMAGIC, NMAGIC, ZMAGIC.
4949377e23a2Schristos	(some_aout_object_p): Delete dead code handling QMAGIC and BMAGIC.
4950377e23a2Schristos	(adjust_z_magix): Delete dead code handling QMAGIC.
4951377e23a2Schristos
4952377e23a2Schristos2009-01-16  Kai Tietz  <kai.tietz@onevision.com>
4953377e23a2Schristos
4954377e23a2Schristos	* coffcode.h (styp_to_sec_flags): Correct interpretation of
4955377e23a2Schristos	IMAGE_SCN_MEM_DISCARDABLE.
4956377e23a2Schristos
4957377e23a2Schristos2009-01-16  Alan Modra  <amodra@bigpond.net.au>
4958377e23a2Schristos
4959377e23a2Schristos	* Makefile.am (libbfd_la_LIBADD, libbfd_la_LDFLAGS): Substitute
4960377e23a2Schristos	SHARED_LIBADD and SHARED_LDFLAGS rather than WIN32LIBADD, WIN32LDFLAGS.
4961377e23a2Schristos	* configure.in (commonbfdlib): Delete.
4962377e23a2Schristos	(SHARED_LDFLAGS): Rename from WIN32LDFLAGS/
4963377e23a2Schristos	(SHARED_LIBADD): Rename from WIN32LIBADD.  Add pic libiberty if such
4964377e23a2Schristos	is available, not just for linux.
4965377e23a2Schristos	* po/SRC-POTFILES.in: Regenerate.
4966377e23a2Schristos	* Makefile.in: Regenerate.
4967377e23a2Schristos	* configure: Regenerate.
4968377e23a2Schristos
4969377e23a2Schristos2009-01-15  Andrew Stubbs  <ams@codesourcery.com>
4970377e23a2Schristos	    Julian Brown   <julian@codesourcery.com>
4971377e23a2Schristos
4972377e23a2Schristos	* elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 71 to include all known
4973377e23a2Schristos	ARM attributes in ABI 2.07.
4974377e23a2Schristos	* elf32-arm.c (get_secondary_compatible_arch): New function.
4975377e23a2Schristos	(set_secondary_compatible_arch): New function.
4976377e23a2Schristos	(tag_cpu_arch_combine): New function.
4977377e23a2Schristos	(elf32_arm_copy_one_eabi_other_attribute): Delete function.
4978377e23a2Schristos	(elf32_arm_copy_eabi_other_attribute_list): Delete function.
4979377e23a2Schristos	(elf32_arm_merge_eabi_attributes): Rename order_312 to order_021 to
4980377e23a2Schristos	make it fit with order_01243.
4981377e23a2Schristos	Add support for Tag_also_compatible_with,
4982377e23a2Schristos	Tag_CPU_unaligned_access, Tag_T2EE_use, Tag_Virtualization_use,
4983377e23a2Schristos	Tag_MPextension_use, Tag_nodefaults and Tag_conformance.
4984377e23a2Schristos	Improve/tidy up support for Tag_CPU_raw_name, Tag_CPU_name,
4985377e23a2Schristos	Tag_CPU_arch, Tag_ABI_HardFP_use, Tag_VFP_HP_extension,
4986377e23a2Schristos	Tag_ABI_FP_denormal, Tag_ABI_PCS_GOT_use, Tag_ABI_align8_needed,
4987377e23a2Schristos	Tag_VFP_arch and Tag_ABI_FP_16bit_format.
4988377e23a2Schristos	Rework the way unknown attributes are handled.
4989377e23a2Schristos	Defer errors until all attributes have been processed.
4990377e23a2Schristos
4991377e23a2Schristos2009-01-15  Andrew Stubbs  <ams@codesourcery.com>
4992377e23a2Schristos
4993377e23a2Schristos	* elf-attrs.c (bfd_elf_add_obj_attr_compat): Rename to
4994377e23a2Schristos	bfd_elf_add_obj_attr_int_string.
4995377e23a2Schristos	Read Tag_compatibility from its new location in the attribute array,
4996377e23a2Schristos	rather than the attribute list.
4997377e23a2Schristos	(_bfd_elf_copy_obj_attributes): bfd_elf_add_obj_attr_compat ->
4998377e23a2Schristos	bfd_elf_add_obj_attr_int_string.
4999377e23a2Schristos	(_bfd_elf_parse_attributes): Likewise.
5000377e23a2Schristos	(_bfd_elf_merge_object_attributes): There's now only one
5001377e23a2Schristos	Tag_compatibility, and it's in the array, not the list.
5002377e23a2Schristos	* elf-bfd.h (NUM_KNOWN_OBJ_ATTRIBUTES): Set to 33 to include
5003377e23a2Schristos	Tag_compatibility.
5004377e23a2Schristos	(bfd_elf_add_obj_attr_compat): Rename to
5005377e23a2Schristos	bfd_elf_add_obj_attr_int_string.
5006377e23a2Schristos	(bfd_elf_add_proc_attr_compat): Rename to
5007377e23a2Schristos	bfd_elf_add_proc_attr_int_string.
5008377e23a2Schristos	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Explicitly don't handle
5009377e23a2Schristos	Tag_compatibility.
5010377e23a2Schristos
5011377e23a2Schristos2009-01-15  Douglas B Rupp  <rupp@gnat.com>
5012377e23a2Schristos
5013377e23a2Schristos	* Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo
5014377e23a2Schristos	(BFD32_BACKENDS_CFILES): Add new file vmsutil.c
5015377e23a2Schristos	(vmsutil.lo): Add dependency rule.
5016377e23a2Schristos	* Makefile.in: Regenerate.
5017377e23a2Schristos	* config.bfd (ia64*-*-*vms*): Add case.
5018377e23a2Schristos	* configure.in (bfd_elf64_ia64_vms_vec): Add case.
5019377e23a2Schristos	* configure: Regenerate.
5020377e23a2Schristos	* vmsutil.c: New file.
5021377e23a2Schristos	* vmsutil.h: New file.
5022377e23a2Schristos	* elf-bfd.h (struct bfd_elf_special_section): Change type of
5023377e23a2Schristos	attr to bfd_vma.
5024377e23a2Schristos	* elfxx-ia64.c (elfNN_vms_post_process_headers,
5025377e23a2Schristos	elfNN_vms_section_processing, elfNN_vms_final_write_processing,
5026377e23a2Schristos	elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr,
5027377e23a2Schristos	elfNN_vms_object_p): New functions
5028377e23a2Schristos	* targets.c (bfd_elf64_ia64_vms_vec): New target.
5029377e23a2Schristos
5030377e23a2Schristos2009-01-14  H.J. Lu  <hongjiu.lu@intel.com>
5031377e23a2Schristos
5032377e23a2Schristos	PR ld/9727
5033377e23a2Schristos	* elflink.c (elf_gc_sweep): Exclude the group section if the
5034377e23a2Schristos	first member of the section group is excluded.
5035377e23a2Schristos
5036377e23a2Schristos2009-01-14  Alan Modra  <amodra@bigpond.net.au>
5037377e23a2Schristos
5038377e23a2Schristos	PR 9735
5039377e23a2Schristos	* syms.c (_bfd_stab_section_find_nearest_line): Don't free
5040377e23a2Schristos	saved filename, use bfd_alloc rather than bfd_malloc for it.
5041377e23a2Schristos
5042377e23a2Schristos2009-01-13  Alan Modra  <amodra@bigpond.net.au>
5043377e23a2Schristos
5044377e23a2Schristos	* elf32-spu.c (spu_elf_build_stubs): Make __icache_base absolute.
5045377e23a2Schristos
5046377e23a2Schristos2009-01-13  Alan Modra  <amodra@bigpond.net.au>
5047377e23a2Schristos
5048377e23a2Schristos	* elf32-spu.c (remove_cycles): Always set call->max_depth.
5049377e23a2Schristos
5050377e23a2Schristos2009-01-12  Alan Modra  <amodra@bigpond.net.au>
5051377e23a2Schristos
5052377e23a2Schristos	* elf32-spu.c (spu_elf_auto_overlay): Correct vma mask.
5053377e23a2Schristos
5054377e23a2Schristos2009-01-12  Alan Modra  <amodra@bigpond.net.au>
5055377e23a2Schristos
5056377e23a2Schristos	* elf32-spu.c (struct spu_link_hash_table): Add init, line_size_log2,
5057377e23a2Schristos	num_lines_log2.
5058377e23a2Schristos	(struct got_entry): Add br_addr.
5059377e23a2Schristos	(struct call_info): Add priority.
5060377e23a2Schristos	(struct function_info): Add lr_store and sp_adjust.
5061377e23a2Schristos	(spu_elf_setup): Init line_size_log2 and num_lines_log2.
5062377e23a2Schristos	(spu_elf_find_overlays): For soft-icache, mark any section within cache
5063377e23a2Schristos	area as an overlay, and check that no other overlays exist.  Look up
5064377e23a2Schristos	icache overlay manager entry sym.
5065377e23a2Schristos	(BRA_STUBS, BRA, BRASL): Define.
5066377e23a2Schristos	(enum _stub_type): Replace ovl_stub with call_ovl_stub and br*_ovl_stub.
5067377e23a2Schristos	(needs_ovl_stub): Adjust for soft-icache.  Return priority encoded
5068377e23a2Schristos	in branch insn.
5069377e23a2Schristos	(count_stub, build_stub): Support soft-icache.
5070377e23a2Schristos	(build_spuear_stubs, process_stubs): Adjust build_stub call.
5071377e23a2Schristos	(spu_elf_size_stubs): Size soft-icache stubs.
5072377e23a2Schristos	(overlay_index): New function.
5073377e23a2Schristos	(spu_elf_build_stubs): Make static.  Support soft-icache.
5074377e23a2Schristos	(spu_elf_check_vma): Don't turn off auto_overlay if soft-icache.
5075377e23a2Schristos	(find_function_stack_adjust): Save lr store and stack adjust insn
5076377e23a2Schristos	offsets.
5077377e23a2Schristos	(maybe_insert_function): Adjust find_function_stack_adjust call.
5078377e23a2Schristos	(mark_functions_via_relocs): Retrieve priority.
5079377e23a2Schristos	(remove_cycles): Only warn about pruned arcs when stack_analysis.
5080377e23a2Schristos	(sort_calls): Sort by priority first.
5081377e23a2Schristos	(mark_overlay_section): Ignore .ovl.init.
5082377e23a2Schristos	(sum_stack): Only print when stack_analysis.
5083377e23a2Schristos	(print_one_overlay_section): New function, extracted from..
5084377e23a2Schristos	(spu_elf_auto_overlay): ..here.  Support soft-icache overlays.
5085377e23a2Schristos	(spu_elf_stack_analysis): Only print when htab->stack_analysis.
5086377e23a2Schristos	(spu_elf_final_link): Call spu_elf_stack_analysis for lrlive
5087377e23a2Schristos	analysis.  Call spu_elf_build_stubs.
5088377e23a2Schristos	(spu_elf_relocate_section): For soft-icache encode overlay index
5089377e23a2Schristos	into addresses.
5090377e23a2Schristos	(spu_elf_output_symbol_hook): Support soft-icache.
5091377e23a2Schristos	(spu_elf_modify_program_headers: Likewise.
5092377e23a2Schristos
5093377e23a2Schristos	* elf32-spu.h (struct spu_elf_params): Add lrlive_analysis.  Rename
5094377e23a2Schristos	num_regions to num_lines.  Add line_size and max_branch.
5095377e23a2Schristos	(enum _ovly_flavour): Add ovly_soft_icache.
5096377e23a2Schristos	(spu_elf_build_stubs): Delete.
5097377e23a2Schristos
5098377e23a2Schristos2009-01-11  Jan Kratochvil  <jan.kratochvil@redhat.com>
5099377e23a2Schristos
5100377e23a2Schristos	* elflink.c (_bfd_elf_section_already_linked): Handle g++-3.4
5101377e23a2Schristos	relocations in `.gnu.linkonce.r.*' referencing its `.gnu.linkonce.t.*'.
5102377e23a2Schristos
5103377e23a2Schristos2009-01-07  Hans-Peter Nilsson  <hp@axis.com>
5104377e23a2Schristos
5105377e23a2Schristos	* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GD>
5106377e23a2Schristos	<case R_CRIS_16_GOT_GD, R_CRIS_32_GOT_GD>: For a symbol defined in
5107377e23a2Schristos	the program, the known offset starts at the negative size of the
5108377e23a2Schristos	TLS section.
5109377e23a2Schristos	<case R_CRIS_32_IE, R_CRIS_32_GOT_TPREL, R_CRIS_16_GOT_TPREL>:
5110377e23a2Schristos	Similar.
5111377e23a2Schristos
5112377e23a2Schristos2009-01-05  Joel Sherrill <joel.sherrill@oarcorp.com>
5113377e23a2Schristos
5114377e23a2Schristos	* config.bfd: Add lm32-*-rtems*.
5115377e23a2Schristos
5116377e23a2Schristos2009-01-03  H.J. Lu  <hongjiu.lu@intel.com>
5117377e23a2Schristos
5118377e23a2Schristos	* coff-ppc.c: Add 2009 to Copyright.
5119377e23a2Schristos	* elf32-cris.c: Likewise.
5120377e23a2Schristos	* elflink.c: Likewise.
5121377e23a2Schristos
5122377e23a2Schristos2009-01-03  Hans-Peter Nilsson  <hp@axis.com>
5123377e23a2Schristos
5124377e23a2Schristos	* elf32-cris.c (elf_cris_finish_dynamic_symbol): Rename
5125377e23a2Schristos	gotplt_index to rela_plt_index.  Adjust for R_CRIS_DTPMOD entry.
5126377e23a2Schristos
5127377e23a2Schristos2009-01-02  H.J. Lu  <hongjiu.lu@intel.com>
5128377e23a2Schristos
5129377e23a2Schristos	PR ld/9679
5130377e23a2Schristos	* elflink.c (elf_merge_st_other): New.
5131377e23a2Schristos	(_bfd_elf_merge_symbol): Use it on skipped weak definitions and
5132377e23a2Schristos	hide them if needed.
5133377e23a2Schristos	(elf_link_add_object_symbols): Updated.
5134377e23a2Schristos
5135377e23a2Schristos2009-01-02  H.J. Lu  <hongjiu.lu@intel.com>
5136377e23a2Schristos
5137377e23a2Schristos	PR ld/9676
5138377e23a2Schristos	* elflink.c (elf_link_add_object_symbols): Update def_dynamic,
5139377e23a2Schristos	ref_dynamic and dynamic_def fields when setting def_regular
5140377e23a2Schristos	to 1.
5141377e23a2Schristos
5142377e23a2Schristos2009-01-02  Curtis Mackie  <curtmackevo@gmail.com>
5143377e23a2Schristos
5144377e23a2Schristos	PR 9682
5145377e23a2Schristos	* coff-ppc.c (dump_toc): Fix up calls to fprintf without a string
5146377e23a2Schristos	literal.
5147377e23a2Schristos
5148377e23a2SchristosFor older changes see ChangeLog-2008
5149377e23a2Schristos
5150*48596154SchristosCopyright (C) 2009 Free Software Foundation, Inc.
5151*48596154Schristos
5152*48596154SchristosCopying and distribution of this file, with or without modification,
5153*48596154Schristosare permitted in any medium without royalty provided the copyright
5154*48596154Schristosnotice and this notice are preserved.
5155*48596154Schristos
5156377e23a2SchristosLocal Variables:
5157377e23a2Schristosmode: change-log
5158377e23a2Schristosleft-margin: 8
5159377e23a2Schristosfill-column: 74
5160377e23a2Schristosversion-control: never
5161377e23a2SchristosEnd:
5162