bfd/
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
ca92cecb
RS
12007-12-15 Richard Sandiford <rsandifo@nildram.co.uk>
2
3 * elf-bfd.h (eh_cie_fde): Add u.cie. Document how u.fde.cie_inf
4 changes when removed == 0.
5 (eh_frame_hdr_info): Add parsed_eh_frames.
6 (_bfd_elf_begin_eh_frame_parsing): Declare.
7 (_bfd_elf_parse_eh_frame): Declare.
8 (_bfd_elf_end_eh_frame_parsing): Declare.
9 * elf-eh-frame.c (_bfd_elf_begin_eh_frame_parsing): New function.
10 (_bfd_elf_parse_eh_frame): New function, split out from
11 _bfd_elf_discard_section_eh_frame. Make a first pass through the
12 buffer to calculate the number of entries and CIEs. Allocate memory
13 for them before the main loop. Replace current extended cie
14 representation with a pair of pointers, one to the local eh_cie_fde
15 and one to the full struct cie. Allocate a separate array of struct
16 cies if not merging. Merge CIEs during the main loop and set up each
17 u.cie.merged field. Point an FDE's cie_inf field directly at the
18 local CIE. Initially assume that all entries should be removed.
19 (_bfd_elf_end_eh_frame_parsing): New function.
20 (_bfd_elf_discard_section_eh_frame): Assume that the section has
21 already been parsed. Use a separate pass to mark entries that
22 need to be kept. Use the u.cie.merged field to track a CIE's
23 group representative.
24 * elflink.c (bfd_elf_discard_info): Call _bfd_elf_parse_eh_frame
25 before _bfd_elf_discard_section_eh_frame. Wrap loop with calls to
26 _bfd_elf_begin_eh_frame_parsing and _bfd_elf_end_eh_frame_parsing.
27
155eaaa0
RS
282007-12-15 Richard Sandiford <rsandifo@nildram.co.uk>
29
30 * elf-bfd.h (eh_cie_fde): Put cie_inf in a union. Add a reloc_index
31 field. Use bitfields for fde_encoding, lsda_encoding and lsda_offset.
32 * elf-eh-frame.c (extra_augmentation_data_bytes): Adjust cie_inf
33 accesses after the above change.
34 (_bfd_elf_eh_frame_section_offset): Likewise.
35 (_bfd_elf_write_section_eh_frame): Likewise.
36 (_bfd_elf_discard_section_eh_frame): Likewise. Set up reloc_index.
37
5241d853
RS
382007-12-15 Richard Sandiford <rsandifo@nildram.co.uk>
39
40 * elf-bfd.h (_bfd_elf_gc_mark_rsec, _bfd_elf_gc_mark_reloc): Declare.
41 (_bfd_elf_gc_mark): Use elf_gc_mark_hook_fn.
42 * elflink.c (init_reloc_cookie, fini_reloc_cookie)
43 (init_reloc_cookie_rels, fini_reloc_cookie_rels): New functions,
44 split out from...
45 (bfd_elf_discard_info): ...here.
46 (init_reloc_cookie_for_section): New function.
47 (fini_reloc_cookie_for_section): Likewise.
48 (_bfd_elf_gc_mark_rsec, _bfd_elf_gc_mark_reloc): New functions,
49 split out from...
50 (_bfd_elf_gc_mark): ...here. Use init_reloc_cookie_for_section
51 and fini_reloc_cookie_for_section.
52
c46082c8
BW
532007-12-12 Bob Wilson <bob.wilson@acm.org>
54
55 * elf32-xtensa.c (elf_xtensa_do_reloc): Update self_address along with
56 address.
57 (print_action_list): Fix name for ta_convert_longcall.
58
8424d8f5
CM
592007-12-11 Catherine Moore <clm@codesourcery.com>
60
61 * elf.c (_bfd_elf_copy_private_symbol_data): Don't copy shndx if
62 the symbol's section is the undefined section.
63
58f0869b
AM
642007-12-11 Alan Modra <amodra@bigpond.net.au>
65
66 * elf.c (elf_fake_sections): Add "warning:" to "..changed to PROGBITS"
67 message.
68
1bbb5f21
BW
692007-12-07 Bob Wilson <bob.wilson@acm.org>
70
71 * elf32-xtensa.c (elf_howto_table): Add R_XTENSA_32_PCREL.
72 (elf_xtensa_reloc_type_lookup): Handle BFD_RELOC_32_PCREL.
73 (elf_xtensa_check_relocs): Use default case for all relocations that
74 need nothing done here.
75 (elf_xtensa_do_reloc): Compute self_address for all relocation types.
76 Handle R_XTENSA_32_PCREL.
77 (elf_xtensa_relocate_section): Check for R_XTENSA_32_PCREL for dynamic
78 symbols.
79 (check_section_ebb_pcrels_fit): Ignore R_XTENSA_32_PCREL relocations.
80
d688b66e
AM
812007-12-05 Alan Modra <amodra@bigpond.net.au>
82
83 * elf32-spu.c (spu_elf_size_stubs): Do consider branches to
84 non-function symbols for overlay stubs.
85
c243ad3b
BW
862007-12-04 Bob Wilson <bob.wilson@acm.org>
87
88 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Create DT_PLTGOT
89 entry for all dynamic objects.
90
b8e22491
AM
912007-12-04 Alan Modra <amodra@bigpond.net.au>
92
93 * elf32-spu.c (spu_elf_size_stubs): Correct section alignment.
94
888cab37
RS
952007-11-30 Richard Sandiford <rsandifo@nildram.co.uk>
96
97 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use the
98 ELF header to choose between 32-bit and 64-bit relocation structures.
99
350cc38d
MS
1002007-11-29 Mark Shinwell <shinwell@codesourcery.com>
101
102 * archures.c (bfd_mach_mips_loongson_2e): New.
103 (bfd_mach_mips_loongson_2f): New.
104 * bfd-in2.h (bfd_mach_mips_loongson_2e): New.
105 (bfd_mach_mips_loongson_2f): New.
106 * cpu-mips.c: Add I_loongson_2e and I_loongson_2f to
107 anonymous enum.
108 (arch_info_struct): Add Loongson-2E and Loongson-2F entries.
109 * elfxx-mips.c (_bfd_elf_mips_mach): Handle Loongson-2E
110 and Loongson-2F flags.
111 (mips_set_isa_flags): Likewise.
112 (mips_mach_extensions): Add Loongson-2E and Loongson-2F
113 entries.
114
39ce1a6a
NC
1152007-11-29 Nick Clifton <nickc@redhat.com>
116
117 PR ld/5398
118 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Do not
119 complain if there is no glue bfd, just return.
120
e23f1610
NC
1212007-11-28 Nick Clifton <nickc@redhat.com>
122
123 * elf-m10300.c (mn10300_elf_relax_section): Extend previous fix to
124 cover forward jumps.
125
fc91707c
NC
1262007-11-21 Nick Clifton <nickc@redhat.com>
127
128 * elf-m10300.c (mn10300_elf_relax_section): Allow for alignment
129 relocs when computing whether instructions can be relaxed.
130
430a16a5
NC
1312007-11-16 Tristan Gingold <gingold@adacore.com>
132
133 * elflink.c (elf_link_output_extsym): Weaken assertion: if
134 --gc-section is set, there may be no TLS segment.
135
cdfeee4f
AM
1362007-11-19 Alan Modra <amodra@bigpond.net.au>
137
138 * elf-bfd.h (bfd_elf_perform_complex_relocation): Update prototype.
139 * elflink.c (bfd_elf_perform_complex_relocation): Return status.
140 Don't print reloc overflow message.
141 * elf32-mep.c (mep_elf_relocate_section): Handle status from
142 bfd_elf_perform_complex_relocation.
143
42554f6a
TS
1442007-11-17 Thiemo Seufer <ths@mips.com>
145
146 * elfxx-mips.c (mips_elf_merge_obj_attributes): Handle -mips32r2
147 -mfp64 attribute.
148
62d7f790
NC
1492007-11-16 Nick Clifton <nickc@redhat.com>
150
151 * elf-m10300.c (mn10300_elf_check_relocs): Fix memory leak and
152 check that bfd_elf_get_elf_syms is only called once.
153
6f610d07
UW
1542007-11-16 Ulrich Weigand <uweigand@de.ibm.com>
155
156 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Set udata.p of
157 synthetic symbol to point to the ELF symbol it was derived from.
158
fed590bb
AM
1592007-11-15 Alan Modra <amodra@bigpond.net.au>
160
161 PR 5328
162 * opncls.c (separate_debug_file_exists): Use fopen/fread
163 rather than open/read and open in binary mode.
164
c224138d
RS
1652007-11-14 Richard Sandiford <richard@codesourcery.com>
166
167 * elfxx-mips.c (mips_got_page_range): New structure.
168 (mips_got_page_entry): Likewise.
169 (mips_got_info): Add page_gotno and got_page_entries fields.
170 (mips_elf_got_per_bfd_arg): Add max_pages field. Delete
171 primary_count and current_count fields.
172 (mips_got_page_entry_hash, mips_got_page_entry_eq): New functions.
173 (mips_elf_pages_for_range, mips_elf_record_got_page_entry): Likewise.
174 (mips_elf_get_got_for_bfd): New function, split out from
175 mips_elf_make_got_per_bfd. Initialize the page_gotno and
176 got_page_entries fields when creating a new GOT structure.
177 (mips_elf_make_got_pages_per_bfd): New function.
178 (mips_elf_merge_got_with): New function, split out from
179 mips_elf_make_got_per_bfd. Merge page entries as well as
180 non-page entries. Use the minimum of max_pages and the sum
181 of the page_gotnos to estimate the number of page entries.
182 (mips_elf_merge_gots): Use the minimum of max_pages and the
183 bfd's page_gotno to estimate the number of page entries.
184 Use the above functions.
185 (mips_elf_multi_got): Add page entries as well as non-page entries
186 to the individual per-bfd GOTs. Initialize got_per_bfd_arg.max_pages.
187 Initialize the page_gotno and got_page_entries fields when creating
188 a new primary GOT. Use the minimum of pages and page_gotno when
189 adding the number of pages entries to local_gotno.
190 (mips_elf_create_got_section): Initialize the page_gotno and
191 got_page_entries fields of the GOT structure.
192 (mips_elf_rel_relocation_p, mips_elf_read_rel_addend)
193 (mips_elf_add_lo16_rel_addend, mips_elf_get_section_contents): New
194 functions, split out from...
195 (_bfd_mips_elf_relocate_section): ...here.
196 (_bfd_mips_elf_check_relocs): Record GOT page entries too.
197 (_bfd_mips_relax_section): Use mips_elf_get_section_contents.
198 (_bfd_mips_elf_always_size_sections): Use the smaller of the
199 loadable_size- and page_gotno-derived estimates.
200
51a0dd31
TS
2012007-11-14 Thiemo Seufer <ths@mips.com>
202
203 * elfxx-mips.c (mips_elf_merge_obj_attributes): Prevent
204 unwanted fallthroughs in case statement.
205
4be8cddc
L
2062007-11-13 H.J. Lu <hongjiu.lu@intel.com>
207
208 PR binutils/5307
209 * peXXigen.c (_bfd_XX_bfd_copy_private_bfd_data_common): Don't
210 copy input subsystem if output is different from input.
211
b5f5fd96
NC
2122007-11-13 Nick Clifton <nickc@redhat.com>
213
214 * elf-m10300.c (mn10300_elf_final_link_relocate): Prevent the
215 accidental termination of DWARF location list entries.
216 (mn10300_elf_relax_delete_bytes): Stop deletion if an align reloc
217 is encountered that is larger than or not a mutliple of the number
218 of bytes being deleted.
219 When adjusting symbols, any symbols inside the region being
220 deleted must be moved to the end of the region.
221 Move align relocs forward if there is room for them after the
222 deletion of the region.
223
0067a569
AM
2242007-11-13 Alan Modra <amodra@bigpond.net.au>
225
226 PR 5233
227 * elf.c (rewrite_elf_program_header): Formatting. Add
228 first_matching_lma and first_suggested_lma booleans and use
229 instead of testing matching_lma and suggested_lma for zero.
230
fa4dfc15
L
2312007-11-12 H.J. Lu <hongjiu.lu@intel.com>
232
233 PR binutils/5299
234 * peicode.h (pe_bfd_object_p): Save and restore previous bfd
235 state when calling coff_object_p.
236
8f39ba8e
AM
2372007-11-12 Alan Modra <amodra@bigpond.net.au>
238
239 * elf.c (_bfd_elf_get_synthetic_symtab): Only bump the symbol
fa4dfc15 240 pointer when we have a valid symbol. Init udata.p to NULL.
8f39ba8e 241
6b60be10
NS
2422007-11-09 Nathan Sidwell <nathan@codesourcery.com>
243
244 * elf-vxworks.c (elf_vxworks_emit_relocs): Don't clobber
245 rel_hash. Move loop inside if test.
246
7a2b07ff
NS
2472007-11-08 Nathan Sidwell <nathan@codesourcery.com>
248
249 * elf-vxworks.h (elf_vxworks_add_dynamic_entries): Declare.
250 (elf_vxworks_finish_dynamic_entry): Declare.
251 * elf-vxworks.c: Include elf/vxworks.h.
252 (elf_vxworks_add_dynamic_entries): New.
253 (elf_vxworks_finish_dynamic_entry): New.
254 * Makefile.am (elf-vxworks.lo): Add dependency.
255 * Makefile.in (elf-vxworks.lo): Add dependency.
256 * elf32-i386.c (elf_i386_size_dynamic_sections,
257 elf_i386_finish_dynamic_sections): Call
258 elf_vxworks_add_dynamic_entries and
259 elf_vxworks_finish_dynamic_entry.
260 * elf32-ppc.c (ppc_elf_size_dynamic_sections,
261 ppc_elf_finish_dynamic_sections): Likewise.
262 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections,
263 sparc_finish_dyn): Likewise.
264 * elf32-sh.c (sh_elf_size_dynamic_sections,
265 sh_elf_finish_dynamic_sections): Likewise.
266 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections,
267 _bfd_mips_elf_finish_dynamic_sections): Likewise.
268 * elf32-arm.c (elf32_arm_size_dynamic_sections,
269 elf32_arm_finish_dynamic_sections): Likewise.
270
b5482f21
NC
2712007-11-07 Olivier Hainque <hainque@adacore.com>
272
273 * bfd/elfxx-mips.c (_bfd_mips_elf_fake_sections): Force
274 SHF_MIPS_NOSTRIP on .debug_frame for Irix.
275
b7fcf6f6
AM
2762007-11-06 Alan Modra <amodra@bigpond.net.au>
277
102890f0
AM
278 * elf64-ppc.c (ppc64_elf_check_relocs): Don't refcount tlsld_got here..
279 (ppc64_elf_gc_sweep_hook): ..or here..
280 (ppc64_elf_tls_optimize): ..or here. Make two passes through the
281 relocs, ensuring that tls_get_addr calls follow gd and ld relocs.
282 (allocate_dynrelocs): Refcount tlsld_got here.
283 (ppc64_elf_size_dynamic_sections): Allocate local got and call
284 allocate_dynrelocs before allocating tlsld_got.
285 (ppc64_elf_relocate_section): Remove check that a tls_get_addr
286 call follows gd and ld relocs.
287
b7fcf6f6
AM
288 * elf32-ppc.c (ppc_elf_check_relocs): Don't refcount tlsld_got here..
289 (ppc_elf_gc_sweep_hook): ..or here..
290 (ppc_elf_tls_optimize): ..or here. Make two passes through the
291 relocs, ensuring that tls_get_addr calls follow gd and ld relocs.
292 (allocate_dynrelocs): Refcount tlsld_got here.
293 (ppc_elf_size_dynamic_sections): Call allocate_dynrelocs before
294 allocating tlsld_got.
295 (ppc_elf_relocate_section): Remove check that a tls_get_addr
296 call follows gd and ld relocs.
297
9ca98086
AM
2982007-11-05 Alan Modra <amodra@bigpond.net.au>
299
300 * merge.c (sec_merge_hash_lookup): Revert last change.
301 (record_section): Likewise.
302 (_bfd_merge_sections): Likewise.
303 (_bfd_merged_section_offset): Properly handle NULL secinfo.
304 (_bfd_add_merge_section): Allocate extra space for a zero
305 terminator on SEC_STRINGS sections.
306
11ec4ba9
DS
3072007-11-05 Danny Smith <dannysmith@users.sourceforge.net>
308
309 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Let .data, .text
310 and .bss section use the default.
311 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
312
e6c6c8f3
JM
3132007-11-01 Joseph Myers <joseph@codesourcery.com>
314
315 * merge.c (sec_merge_hash_lookup): Add parameter sec_end. Check
316 for unterminated strings. All callers changed.
317 (record_section): Add parameter abfd. Give error message for
318 unterminated strings.
319 (_bfd_merge_sections): Update call to record_section.
320 (_bfd_write_merged_section, _bfd_merged_section_offset): Handle
321 NULL secinfo from merge failures.
322
cf4a529b
NC
3232007-10-31 Nick Clifton <nickc@redhat.com>
324
325 * elf-m10300.c (mn10300_elf_relax_delete_bytes): Do not look for
326 align relocs when there are no relocs attached to the section.
327
8f317e31
AM
3282007-10-31 Alan Modra <amodra@bigpond.net.au>
329
330 * elf-bfd.h (bfd_elf_match_symbols_in_sections): Don't declare.
331 * elflink.c (bfd_elf_match_symbols_in_sections): Make static.
332 Remove section name comparisons.
333
569006e5
NC
3342007-10-30 Nick Clifton <nickc@redhat.com>
335
336 * reloc.c (BFD_RELOC_MN10300_ALIGN): Add.
337 * bfd-in2.h: Regenerate.
338 * libbfd.h: Regnerate.
339 * elf-m10300.h: Handle R_MN10300_ALIGN relocs.
340 (mn10300_elf_relax_delete_bytes): Honour R_MN10300_ALIGN relocs.
341 Re-fix off by one error in comparisons.
342
db86b2dc
PA
3432007-10-25 Pedro Alves <pedro_alves@portugalmail.pt>
344
345 * bfd-in.h (STRING_COMMA_LEN): Don't handle NULL STR case.
346 * bfd-in2.h: Regenerate.
347
c6e65352
DJ
3482007-10-25 Daniel Jacobowitz <dan@codesourcery.com>
349
350 * elf32-ppc.c (ppc_elf_merge_obj_attributes): Add support for
351 Tag_GNU_Power_ABI_Vector.
352
7c8b76cc
JM
3532007-10-25 Joseph Myers <joseph@codesourcery.com>
354
355 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Do not add
356 PT_NULL header when not linking.
357
97753bd5
AM
3582007-10-25 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
359
360 * elf.c (elfcore_grok_ppc_vmx): New function.
361 (elfcore_grok_note): Handle NT_PPC_VMX.
362 (elfcore_write_ppc_vmx): New function.
363 * elf-bfd.h (elfcore_write_ppc_vmx): Declare.
364
dd323078
AM
3652007-10-24 Alan Modra <amodra@bigpond.net.au>
366
367 * Makefile.am: Run "make dep-am".
368 * Makefile.in: Regenerate.
369 * po/SRC-POTFILES.in: Regenerate.
370
f94498ff
AM
3712007-10-23 Alan Modra <amodra@bigpond.net.au>
372
373 * elf64-ppc.c (ppc_build_one_stub): Don't duplicate relocs
374 emitted for ".brlt" entries.
375 (toc_adjusting_stub_needed): Don't treat ".fixup" specially here..
376 (ppc64_elf_next_input_section): ..instead do so here.
377
bfff1642
NC
3782007-10-19 Nick Clifton <nickc@redhat.com>
379
380 * config.bfd: Recognise am34-linux-gnu target.
381 * reloc.c: Add BFD_RELOC_MN10300_SYM_DIFF relocation.
382 * bfd-in2.h: Regenerate.
383 * libbfd.h: Regenerate.
384 * elf-m10300.c (elf_mn10300_howto): Add R_MN10300_SYM_DIFF.
385 (mn10300_reloc_map): Likewise.
386 (mn10300_elf_check_relocs): Do not create dynamic relocs for
387 symbol differences or relocations against absolute symbols.
388 (mn10300_elf_final_link_relocate): Likewise.
389 Handle R_MN10300_SYM_DIFF relocs.
390 (mn10300_elf_relocate_section): Fix for creating local copys of
391 dynamic relocs.
392 (mn10300_elf_relax_delete_bytes): Adjust symbols at the end of the
393 region. Adjust the size of function symbols.
394 (mn10300_elf_relax_section): Ignore symbols that are in discarded
395 sections.
396
603b7257
NC
3972007-10-19 Nick Clifton <nickc@redhat.com>
398
399 * elf-m10300.c: Convert to ISO C.
400
13285a1b
AM
4012007-10-18 H.J. Lu <hongjiu.lu@intel.com>
402 Alan Modra <amodra@bigpond.net.au>
403
404 PR ld/4424
405 * config.bfd (targ_selvecs): Add bfd_elf64_alpha_vec for
406 alpha/FreeBSD. Add bfd_elf64_sparc_vec for sparc64/FreeBSD.
407 Add bfd_elf32_i386_vec and bfd_efi_app_ia32_vec for i386/FreeBSD.
408 (targ64_selvecs): Set for i386/FreeBSD.
409 * elf-bfd.h (elf_backend_data): Add relocs_compatible.
410 (_bfd_elf_default_relocs_compatible): Declare.
411 (_bfd_elf_relocs_compatible): Declare.
412 * elfxx-target.h (elf_backend_relocs_compatible): Define.
413 (elfNN_bed): Init new relocs_compatible field.
414 * elflink.c (_bfd_elf_default_relocs_compatible): New function.
415 (_bfd_elf_relocs_compatible): New function.
416 (elf_link_add_object_symbols): Call bed->relocs_compatible.
417 * elf32-i386.c (elf_backend_relocs_compatible): Define.
418 * elf64-alpha.c: Likewise.
419 * elf64-sparc.c: Likewise.
420 * elf64-x86-64.c: Likewise.
421
ae326da8
BW
4222007-10-16 Bob Wilson <bob.wilson@acm.org>
423
424 * elf32-xtensa.c (relax_section): Check for a reference to a discarded
425 DWARF section and anticipate its replacement with the kept section.
426
a3ef2d63
BW
4272007-10-16 Bob Wilson <bob.wilson@acm.org>
428
429 * elf32-xtensa.c (elf_xtensa_discard_info_for_section): Remove
430 unnecessary size variables. Set sec->rawsize.
431 (relax_section, relax_property_section): Likewise.
432
73c5c7a8
BW
4332007-10-16 Bob Wilson <bob.wilson@acm.org>
434
435 * section.c (struct bfd_section): Clarify comment for rawsize field.
436 * bfd-in2.h: Regenerate.
437
1dd2625f
BW
4382007-10-16 Bob Wilson <bob.wilson@acm.org>
439
440 * elflink.c (_bfd_elf_check_kept_section): Use the section rawsize
441 values if they are set.
442
8bc9c892
NC
4432007-10-16 Nick Clifton <nickc@redhat.com>
444
445 PR 5146
446 * configure.in (AC_CHECK_HEADERS): Add alloca.h
447 * configure: Regenerate.
448 * config.in: Regenerate.
449 * som.c: Replace alloca-conf.h inclusion with code recommended in
450 autoconf documentation.
451 * elf64-hppa.c: Likewise.
452
504b7d20
NC
4532007-10-16 Nick Clifton <nickc@redhat.com>
454
455 * configure.in (--enable-elf-stt-common): New configure
456 option. If enabled then the tools can generate symbols with
457 the ELF STT_COMMON type.
458 * config.in: Regenerate.
459 * configure: Regenerate.
460 * elf.c (swap_out_syms): If USE_STT_COMMON is defined then set
461 the type of emitted common symbols to STT_COMMON.
462 * elfcode.h (elf_slurp_symbol_table): Accept STT_COMMON symbol
463 types.
464
b1657152
AM
4652007-10-15 Alan Modra <amodra@bigpond.net.au>
466
467 * coff-arm.c (arm_emit_base_file_entry): Check fwrite return value.
468 Return status. Adjust callers.
469 * coff-mcore.c (mcore_emit_base_file_entry): Likewise.
470 * coff-ppc.c (write_base_file_entry): New function.
471 (coff_ppc_relocate_section): Use it.
472 * elf32-arm.c (find_thumb_glue): Check asprintf return status.
473 (find_arm_glue): Likewise.
474 * vms-misc.c (_bfd_vms_output_flush): Check fwrite return value.
475
4b93929b
NC
4762007-10-12 Nick Clifton <nickc@redhat.com>
477
478 PR 5160
479 * elflink.c (eval_symbol): Remove bufsz variable and use
480 sizeof(symbuf) where necessary.
481
e9deb29d
NC
4822007-10-12 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
483
484 * elf32-cr16.c (elf32_cr16_relax_section): Fix condition check typo.
485
720199d6
DJ
4862007-10-12 Daniel Jacobowitz <dan@codesourcery.com>
487
488 * elfxx-mips.c (mips_elf_sort_hash_table_f): Handle forced
489 local symbols specially.
490 (mips_elf_set_global_got_offset): Skip forced local symbols.
491
971d4640
AM
4922007-10-12 Alan Modra <amodra@bigpond.net.au>
493
494 * elf.c (elfcore_grok_prxfpreg): Fix comment typo.
495
f210dcff
L
4962007-10-10 H.J. Lu <hongjiu.lu@intel.com>
497
498 * elf.c (get_program_header_size): Always add a PT_GNU_RELRO
499 segment for -z relro.
500 (_bfd_elf_map_sections_to_segments): Make a PT_GNU_RELRO
501 segment only when needed.
502
9b7f5d20
BW
5032007-10-05 Bob Wilson <bob.wilson@acm.org>
504
505 * elf32-xtensa.c (relax_section): Call pin_internal_relocs when
506 changing a relocation's offset. Adjust call to translate_reloc. Do
507 not add a fix record for a DIFF reloc. For other relocs, only add a
508 fix record if the translated target is in a different object file;
509 otherwise, just update the relocation. Call pin_internal_relocs when
510 updating a reloc but not when adding a fix record.
511 (translate_reloc): Get the target section from a new argument, not
512 from the relocation. Change check for relaxable sections to an
513 assertion. Compute separate offset adjustments for the base symbol
514 and the addend, and set the new relocation's addend correctly. Return
515 the new target section.
516
768a5a74
BW
5172007-10-05 Bob Wilson <bob.wilson@acm.org>
518
519 * elf32-xtensa.c (elf_xtensa_relocate_section): Remove updates of
520 r_type and howto after calling do_fix_for_relocateable_link and
521 do_fix_for_final_link.
522
03669f1c
BW
5232007-10-05 Bob Wilson <bob.wilson@acm.org>
524
525 * elf32-xtensa.c (removed_by_actions): New.
526 (offset_with_removed_text): Reimplement using removed_by_actions.
527 (offset_with_removed_text_before_fill): Delete.
528 (relax_property_section): Use removed_by_actions. Rearrange logic.
529 (relax_section_symbols): Likewise.
530
0f5f1638
BW
5312007-10-04 Bob Wilson <bob.wilson@acm.org>
532
533 * elf32-xtensa.c (reloc_bfd_fix_struct): Delete target_abfd field.
534 (reloc_bfd_fix_init): Remove target_abfd argument.
535 (relax_section, move_literal): Adjust calls to reloc_bfd_fix_init.
536
1f7a4e42
NC
5372007-10-04 Nick Clifton <nickc@redhat.com>
538
539 PR linker/5099
540 * elf64-x86-64.c (elf64_x86_64_check_relocs): Add missing
541 apostrophe to error message.
542
7fac7ff4
NC
5432007-10-01 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
544
545 * elf32-cr16.c: Fixed DISP8, DISP20 and IMM20 relocations at
546 final relocation phase.
547 Added the below relaxations: IMM32 -> IMM20/IM16 -> IMM4.
548 * reloc.c: Added 3 new relocations: R_CR16_SWITCH8,
549 R_CR16_SWITCH16, R_CR16_SWITCH32.
550 * libbfd.h: Regenerate.
551 * bfd-in2.h: Regenerate.
552
a0c8462f
AM
5532007-09-30 Alan Modra <amodra@bigpond.net.au>
554
555 * elflink.c: Formatting.
556
0f02bbd9
AM
5572007-09-29 Alan Modra <amodra@bigpond.net.au>
558
559 * elflink.c (resolve_symbol): Handle symbols in SEC_MERGE
560 sections. Don't test symbol st_shndx. Don't bother with
561 bfd_link_hash_common symbols. Print longs rather than ints
562 in debug messages.
563 (eval_symbol): Replace "sym" and "advanced" params with "symp".
564 Replace "addr" and "section_offset" params with "dot". Don't
565 cast bfd_vma values to signed, cast them to bfd_signed_vma.
566 (bfd_elf_perform_complex_relocation): Delete "output_bfd", "info",
567 "local_syms" and "local_sections" params. Add "relocation".
568 Delete code calculating relocation value.
569 (evaluate_complex_relocation_symbols): Delete function. Fold into..
570 (elf_link_input_bfd): ..existing code examining relocs.
571 * elf-bfd.h (bfd_elf_perform_complex_relocation): Update prototype.
572 * elf32-mep.c (mep_elf_check_relocs): Delete function.
573 (mep_elf_gc_sweep_hook, mep_elf_gc_mark_hook): Likewise.
574 (mep_elf_object_p): Don't set elf_bad_symtab.
575 (elf_backend_check_relocs): Don't define.
576 (elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook): Likewise.
577 (elf_backend_can_gc_sections, USE_RELA): Likwise.
578 (mep_elf_relocate_section): Move bfd_elf_perform_complex_relocation
579 call after we have calculated reloc value. Delete local sym
580 debug code. Use RELOC_FOR_GLOBAL_SYMBOL. Delete addend
581 adjusting code..
582 (elf_backend_rela_normal): ..instead define this.
583
5582a088
AM
5842007-09-28 Alan Modra <amodra@bigpond.net.au>
585
586 * elf-m10300.c (mn10300_elf_check_relocs): Delete dead code.
587 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
588 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
589 * elf32-bfin.c (bfinfdpic_check_relocs): Likewise.
590 * elf32-cris.c (cris_elf_check_relocs): Likewise.
591 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
592 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
593 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
594 * elf32-frv.c (_frvfdpic_check_discarded_relocs): Likewise.
595 (elf32_frv_check_relocs): Likewise.
596 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
597 * elf32-m32c.c (m32c_elf_check_relocs): Likewise.
598 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
599 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
600 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
601 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
602 * elf32-mt.c (mt_elf_check_relocs): Likewise.
603 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
604 * elf32-sh.c (sh_elf_check_relocs): Likewise.
605 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
606 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
607 * elf32-score.c (_bfd_score_elf_check_relocs): Likewise.
608 (score_elf_local_relocation_p): Likewise.
609 (_bfd_score_elf_relocate_section): Likewise.
610 (score_elf_final_link_relocate): Likewise.
611
d17e0c6e
JB
6122007-09-26 Jan Beulich <jbeulich@novell.com>
613
614 * elf32-i386.c (elf_i386_check_relocs): Revert NULL pointer
615 check for R_386_GNU_VTINHERIT.
616 * elf-m10300.c (mn10300_elf_check_relocs): Check for NULL
617 pointer for R_xxx_GNU_VTENTRY.
618 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
619 * elf32-bfin.c (bfin_check_relocs): Likewise.
620 (bfinfdpic_check_relocs): Likewise.
621 * elf32-cris.c (cris_elf_check_relocs): Likewise.
622 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
623 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
624 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
625 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
626 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
627 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
628 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
629 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
630 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
631 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
632 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
633 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
634 * elf32-s390.c (elf_s390_check_relocs): Likewise.
635 * elf32-score.c (_bfd_score_elf_check_relocs): Likewise.
636 * elf32-sh.c (sh_elf_check_relocs): Likewise.
637 * elf32-v850.c (v850_elf_check_relocs): Likewise.
638 * elf32-vax.c (elf_vax_check_relocs): Likewise.
639 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
640 * elf32-xtensa.c (elf_xtensa_check_relocs): Likewise.
641 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
642 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
643 * elf64-s390.c (elf_s390_check_relocs): Likewise.
644 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
645 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
646 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
647 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
648
8977835c
AM
6492007-09-26 Alan Modra <amodra@bigpond.net.au>
650
651 * elflink.c (set_symbol_value): Add isymbuf and locsymcount
652 params. Change symidx to a size_t. Don't access past end
653 of symbol buffer.
654 (resolve_symbol): Add isymbuf param and use instead of
655 finfo->internal_syms.
656 (eval_symbol, evaluate_complex_relocation_symbols): Likewise.
657 (elf_link_input_bfd): Don't read symbols specially for
658 evaluate_complex_relocation_symbols.
659
06dcabb0
NC
6602007-09-26 Tristan Gingold <gingold@adacore.com>
661
662 * som.c (som_get_reloc_upper_bound): If there are no relocs return
663 enough space to hold a NULL pointer.
664
2e5b2d74
AM
6652007-09-26 Alan Modra <amodra@bigpond.net.au>
666
667 * elf64-ppc.c (ppc_build_one_stub): Correct rel_hdr.sh_size.
668
98e89a7d
AM
6692007-09-25 Alan Modra <amodra@bigpond.net.au>
670
2cb5950e
AM
671 * elf32-spu.c (struct spu_link_hash_table): Add ovly_load_r_symndx.
672 (spu_elf_size_stubs): Count stub relocs.
673 (write_one_stub): Emit relocs on overlay call stubs.
674
98e89a7d
AM
675 * elf32-spu.c (struct spu_link_hash_table): Add "stubs".
676 (spu_elf_link_hash_table_create): Init new field.
677 (spu_elf_size_stubs): Store sorted stub syms in new htab field
678 rather than local var.
679 (spu_elf_build_stubs): Iterate over htab stubs rather than
680 hash traversal.
681 (struct stubarr): Delete.
682 (allocate_spuear_stubs, populate_stubs, write_one_stub): Adjust.
683
e970b90a
DJ
6842007-09-24 Daniel Jacobowitz <dan@codesourcery.com>
685
686 * elf.c (assign_file_positions_for_load_sections): Trust
687 p_align_valid.
688 (copy_elf_program_header): Copy PT_NULL segments.
689
fad9eaf0
AM
6902007-09-24 Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
691
692 * elf32-spu.c (is_indirect_branch): New function.
693 (find_function_stack_adjust): End scan on hitting indirect branch.
694 (sum_stack): Cast %v arg to correct type.
695
10569aeb
L
6962007-09-21 H.J. Lu <hongjiu.lu@intel.com>
697
698 * Makefile.am: Run "make dep-am".
699 * Makefile.in: Regenerated.
700
4ab20029
NC
7012007-09-21 Doug Kwan <dougkwan@google.com>
702
703 * Makefile.am (BFD32_LIBS): Add arange-set.lo.
704 (BFD32_LIBS_CFILES): Add arange-set.c.
705 (SOURCE_HFILES): Add arange-set.h
706 (dwarf2.lo): Add dependency upon arange-set.h.
707 (arange-set.lo): New target.
708 * Makefile.in: Regenerate.
709 * arange-set.c: New file.
710 * arange-set.h: New file.
711 * dwarf2.c: Include arange-set.h.
712 (struct dwarf2_debug) Add new fields comp_unit_count and
713 comp_unit_arange_set.
714 (struct comp_unit) Replace field arange with a new field arange_set.
715 (dwarf2_arange_set_allocate, dwarf2_arange_set_deallocate,
716 dwarf2_combine_arange_value, dwarf2_arange_set_new,
717 dwarf2_arange_set_with_value_new, dwarf2_comp_unit_arange_add): New
718 functions to utilize arange set in dwarf2.c.
719 (arange_add): Formatting change for a line longer than 80 characters.
720 (decode_line_info): Replace call target arange_add with
721 dwarf2_comp_unit_arange_add.
722 (read_rangelist_insert_arange_list,
723 read_rangelist_comp_unit_arange_add): New functions used as callbacks
724 for read_rangelist.
725 (read_rangelist): Change interface to accept a callback and data to
726 allow caller to select the action peformed on a new range list read.
727 (scan_unit_for_symbols): Use new interface of read_rangelist.
fed590bb
AM
728 (parse_comp_unit): Create an arange set for each new comp unit.
729 Use new interface of read_rangelist. Replace call to arange_add
730 with that to dwarf2_comp_unit_arange_add.
4ab20029
NC
731 (comp_unit_contains_address): Replace sequential search with a call to
732 arange_set_lookup_address, which can handles large set efficiently.
733 (stash_copy_local_aranges, stash_maybe_enable_arange_set,
734 stash_find_nearest_line_fast): New functions maintaining and using a
735 valued global arange set for all compilation units to speed up
736 bfd_dwarf2_find_nearest_line.
737 (find_line): Use global arange set. Replace sequential search over all
738 compilation units with a call to stash_find_nearest_line_fast. Add
739 book keeping to count number of compilation units. Replace empty
740 arange list test with a call to arange_set_empty_p.
741
6119d252
NC
7422007-09-21 Olivier Hainque <hainque@adacore.com>
743 Tristan Gingold <gingold@adacore.com>
744
745 * syms.c (_bfd_stab_section_find_nearest_line): Look at the
746 specific SOM sections for stabs if the regular ones are not found.
747 * som.h (struct somdata): Add a line_info field, to be used by
748 som_find_nearest_line.
749 * som.c (som_find_nearest_line): Implement using the bfd stabs
750 function above.
751
b55fd4d4
DJ
7522007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
753
754 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Make sure .got
755 will be output.
756
a69898aa
AM
7572007-09-19 Alan Modra <amodra@bigpond.net.au>
758 Doug Kwan <dougkwan@google.com>
759
760 * bfd-in.h (bfd_hash_insert): Declare.
761 * bfd-in2.h: Regenerate.
762 * hash.c (bfd_hash_insert): New function. Split out from..
763 (bfd_hash_lookup): ..here.
764 * merge.c (sec_merge_hash_lookup): Use bfd_hash_insert.
765
14b1c01e
AM
7662007-09-18 Alan Modra <amodra@bigpond.net.au>
767
768 * elf.c (bfd_section_from_shdr): Check bfd_alloc return.
769 (elfcore_write_note): Check realloc return.
770 * elflink.c (_bfd_elf_link_find_version_dependencies): Check
771 bfd_zalloc return.
772 (_bfd_elf_link_assign_sym_version): Check bfd_malloc return.
773 (elf_link_add_object_symbols): Likewise.
774 (struct hash_codes_info): New.
775 (elf_collect_hash_codes): Return bfd_malloc error.
776 (struct collect_gnu_hash_codes): Add "error".
777 (elf_collect_gnu_hash_codes): Return bfd_malloc error.
778 (bfd_elf_size_dynamic_sections): Check return status of
779 _bfd_elf_link_find_version_dependencies.
780 (bfd_elf_size_dynsym_hash_dynstr): Adjust for elf_collect_hash_codes
781 and elf_collect_gnu_hash_codes changes.
782 (elf_sym_name_compare): Formatting.
783 (elf_fixup_link_order): Use bfd_malloc, not xmalloc.
784
b10a8ae0
L
7852007-09-17 H.J. Lu <hongjiu.lu@intel.com>
786
787 PR binutils/3281
788 PR binutils/5037
789 * elf-bfd.h (elf_obj_tdata): Remove relro.
790
791 * elf.c (get_program_header_size): Check info->relro instead
792 of elf_tdata (abfd)->relro.
793 (_bfd_elf_map_sections_to_segments): Likewise.
794 (assign_file_positions_for_load_sections): Don't set
795 PT_GNU_RELRO segment alignment here.
796 (assign_file_positions_for_non_load_sections): Properly set up
797 PT_GNU_RELRO segment for copying executable/shared library.
798 (rewrite_elf_program_header): Remove PT_GNU_RELRO segment.
799 (copy_elf_program_header): Set p_size and p_size_valid fields for
800 PT_GNU_RELRO segment.
801
041a1845
NC
8022007-09-17 Nick Clifton <nickc@redhat.com>
803
804 * po/fi.po: New Finnish translation.
805 * po/es.po: Updated Spanish translation.
806 * configure.in (ALL_LINGUAS): Add fi.
807 * configure: Regenerate.
808 * po/bfd.pot: Regenerate.
809
0bc43230
AM
8102007-09-15 Nick Clifton <nickc@redhat.com>
811
812 * bfd.c (_bfd_default_error_handler): fflush stdout.
813
3ea6b9a5
AM
8142007-09-14 Alan Modra <amodra@bigpond.net.au>
815
816 * opncls.c (find_separate_debug_file): Ensure bfd_set_error has
817 been called on all error return paths.
818 (bfd_fill_in_gnu_debuglink_section): Use bfd_malloc, not malloc.
819 Clear padding after filename
820
5a1dcb7e
AM
8212007-09-14 Alan Modra <amodra@bigpond.net.au>
822
823 * format.c (bfd_check_format_matches): Record matching targets even
824 when "matching" is NULL to allow bfd_associated_vector matches.
825 Consolidate error return code. Consolidate ok return code. Always
826 restore original target and format on error.
827
bce5e5c9
AM
8282007-09-14 Alan Modra <amodra@bigpond.net.au>
829
830 * configure.in: Delete BFD_HOST_LONG_LONG and bfd checks for
831 long long. Partly revert 2007-07-12 change, so that
832 BFD_HOST_64BIT_LONG and BFD_HOST_64BIT_LONG_LONG are set
833 independent of "void *" size.
834 * configure: Regenerate.
835 * config.in: Regenerate.
836 * Makefile.in: Regenerate.
837
01a3c213
AM
8382007-09-12 Alan Modra <amodra@bigpond.net.au>
839
840 * elf-bfd.h (struct elf_backend_data): Delete elf_backend_sprintf_vma
841 and elf_backend_fprintf_vma.
842 (_bfd_elf_sprintf_vma, _bfd_elf_fprintf_vma): Delete.
843 * elf.c (_bfd_elf_sprintf_vma, _bfd_elf_fprintf_vma): Delete.
844 * elfxx-target.h (elf_backend_sprintf_vma): Don't define.
845 (elf_backend_fprintf_vma): Likewise.
846 (elfNN_bed): Don't init removed fields.
847 * bfd.c (is32bit): New function.
848 (bfd_sprintf_vma, bfd_fprintf_vma): Use the above.
849
8d100c32
KH
8502007-09-11 Nathan Sidwell <nathan@codesourcery.com>
851
852 * archures.c: Add bfd_mach_mcf_isa_c_nodiv,
853 bfd_mach_mcf_isa_c_nodiv_mac & bfd_mach_mcf_isa_c_nodiv_emac.
854 * ieee.c (ieee_write_processor): Update coldfire architecture
855 list.
856 * bfd-in2.h: Rebuilt.
857 * cpu-m68k.c (arch_info_struct): Add isa_c nodiv architectures.
858 (m68k_arch_features): Likewise.
859 * elf32-m68k.c (elf32_m68k_object_p): Add EF_M68K_CF_ISA_C_NODIV.
860 (elf32_m68k_print_private_bfd_data): Likewise.
861
2f629d23
JB
8622007-09-11 Jan Beulich <jbeulich@novell.com>
863
864 * elf64-i386.c (elf64_i386_tls_transition): Remove redundant 'const'.
865 * elf64-x86_64.c (elf64_x86_64_tls_transition): Likewise.
866
2b953679
AM
8672007-09-08 Alan Modra <amodra@bigpond.net.au>
868
869 * elf64-ppc.c (func_desc_adjust): When resolving undefined
870 references to dot-symbols, transfer def_regular and
871 def_dynamic from the descriptor symbol.
872
78b8434d
AM
8732007-09-08 Alan Modra <amodra@bigpond.net.au>
874
875 * config.bfd: Set want64 for spu-*-elf.
876
98ece1b3
AM
8772007-09-08 Alan Modra <amodra@bigpond.net.au>
878
879 PR ld/2864, ld/5006
880 * elf.c (special_sections): Comment typo.
881 (elf_fake_sections): Force SHT_PROGBITS for sections that are
882 SHT_NOBITS if BFD section flags say they have contents.
883
5dff4664
MS
8842007-09-04 Michael Snyder <msnyder@access-company.com>
885
886 * elf32-bfin.c (howto_table): Cut and paste error?
887 Name field of reloc is wrong.
888
b427ea91
AM
8892007-09-04 Alan Modra <amodra@bigpond.net.au>
890
891 * elf32-spu.c (elf_howto_table): Formatting.
892
aff90a5f
L
8932007-09-02 H.J. Lu <hongjiu.lu@intel.com>
894
895 PR ld/4986
896 * dwarf2.c (new_line_sorts_after): Undo the last change.
897 (add_line_info): Only keep the last entry with the same address
898 and end sequence.
899
39934745
L
9002007-08-31 H.J. Lu <hongjiu.lu@intel.com>
901
902 PR ld/4986
903 * dwarf2.c (new_line_sorts_after): Also compare line number.
904
3a4743fe
NC
9052007-08-31 Jesse Michael <jmichael@suse.de>
906
907 * mach-o.c (bfd_mach_o_make_bfd_section): Fix test for non
908 zerofill sections.
909
5c5d6806
BW
9102007-08-28 David Heine <dlheine@tensilica.com>
911
912 * elf32-xtensa.c (compute_ebb_actions): Update removed_bytes when
913 narrowing instructions.
914
7f6a71ff 9152007-08-28 Mark Shinwell <shinwell@codesourcery.com>
39934745 916 Joseph Myers <joseph@codesourcery.com>
7f6a71ff
JM
917
918 * elf32-arm.c (elf32_arm_compare_mapping): Compare first on vma,
919 then on type.
920
0b3e17e9
NC
9212007-08-28 Robert Sebastian Gerus <arachnist@gmail.com>
922
923 * config.bfd: Add support for i[3-7]86-*-dragonfly*.
924 * configure.in: Likewise.
925 * configure: Regenerate.
926
b15fa79e
AM
9272007-08-25 Ulrich Weigand <uweigand@de.ibm.com>
928 Alan Modra <amodra@bigpond.net.au>
929
930 * elf.c (elfcore_grok_spu_note): New function.
931 (elf_parse_notes): Call it.
932
534a31f6
L
9332007-08-24 H.J. Lu <hongjiu.lu@intel.com>
934
935 * elf64-x86-64.c (elf64_x86_64_relocate_section): Adjust
936 indentation.
937
4a6636fb
PA
9382007-08-24 Pedro Alves <pedro_alves@portugalmail.pt>
939
940 * elf.c (elfcore_grok_win32pstatus): Remove HAVE_WIN32_PSTATUS_T
941 guard. Make it host independent.
942 (elfcore_grok_note): Remove HAVE_WIN32_PSTATUS_T guard around
943 NT_WIN32PSTATUS.
944
718175fa
JK
9452007-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
946
82fc7765
JK
947 * elf-bfd.h (struct elf_obj_tdata): New BUILD_ID_SIZE, BUILD_ID.
948 * elf.c (elfcore_read_notes): Split to ...
718175fa
JK
949 (elf_read_notes) ... here ...
950 (elf_parse_notes): ... and here. Check `bfd_get_format (abfd)' with
951 the former subfunctions called only for BFD_CORE.
952 Call ELFOBJ_GROK_GNU_NOTE for BFD_OBJECT files with the owner "GNU".
953 (_bfd_elf_make_section_from_shdr): Call ELF_PARSE_NOTES for SHT_NOTEs.
954 (bfd_section_from_phdr): Update the call for renamed ELFCORE_READ_NOTES.
955 (elfobj_grok_gnu_build_id, elfobj_grok_gnu_note): New functions.
956 Code advisory: Roland McGrath
957
f1187097
DJ
9582007-08-24 Daniel Jacobowitz <dan@codesourcery.com>
959
960 * elf64-mips.c (elf_backend_sign_extend_vma): Define.
961
a30e5f5f
AM
9622007-08-24 Alan Modra <amodra@bigpond.net.au>
963
964 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Warning fix.
965
a351bca6
L
9662007-08-23 H.J. Lu <hongjiu.lu@intel.com>
967
968 * Makefile.am: Run "make dep-am".
969 * Makefile.in: Regenerated.
970
142411ca
L
9712007-08-23 H.J. Lu <hongjiu.lu@intel.com>
972
973 * elf32-i386.c: Include "bfd_stdint.h".
974 (elf_i386_rtype_to_howto): New function.
975 (elf_i386_info_to_howto_rel): Use it.
976 (x86_64_opcode16): New union type.
977 (elf_i386_check_tls_transition): New function.
978 (elf_i386_tls_transition): Updated to check transition and
979 issue an error if a transition isn't supported.
980 (elf_i386_check_relocs): Return FALSE if
981 elf_i386_tls_transition returns FALSE.
982 (elf_i386_gc_sweep_hook): Likewise.
983 (elf_i386_relocate_section): Likewise. Remove BFD_ASSERT
984 on TLS transitions.
985
986 * elf64-x86-64.c: Include "bfd_stdint.h".
987 (x86_64_opcode16): New union type.
988 (x86_64_opcode32): Likewise.
989 (elf64_x86_64_check_tls_transition): New function.
990 (elf64_x86_64_tls_transition): Updated to check transition and
991 issue an error if a transition isn't supported.
992 (elf64_x86_64_check_relocs): Return FALSE if
993 elf64_x86_64_tls_transition returns FALSE.
994 (elf64_x86_64_gc_sweep_hook): Likewise.
995 (elf64_x86_64_relocate_section): Likewise. Remove BFD_ASSERT
996 on TLS transitions.
997
eae50df2
L
9982007-08-22 H.J. Lu <hongjiu.lu@intel.com>
999
1000 * elfxx-ia64.c: Convert to ISO C90 prototypes.
1001 (elfNN_hpux_backend_section_from_bfd_section): Make it static.
1002
9a2e389a
L
10032007-08-22 H.J. Lu <hongjiu.lu@intel.com>
1004
1005 * elf64-x86-64.c: Remove trailing whitespace.
1006 * elfxx-ia64.c: Likewise.
1007
2f3bf80a
L
10082007-08-21 H.J. Lu <hongjiu.lu@intel.com>
1009
1010 * elf32-i386.c (elf_i386_tls_transition): Accept a pointer
1011 to ELF hash entry instead of an integer for local test.
1012 (elf_i386_check_relocs): Updated.
1013 (elf_i386_gc_sweep_hook): Likewise.
1014 (elf_i386_relocate_section): Likewise.
1015
1016 * elf64-x86-64.c (elf64_x86_64_tls_transition): Accept a
1017 pointer to ELF hash entry instead of an integer for local
1018 test.
1019 (elf64_x86_64_check_relocs): Updated.
1020 (elf64_x86_64_gc_sweep_hook): Likewise.
1021 (elf64_x86_64_relocate_section): Likewise.
1022
3bfa9139
L
10232007-08-20 H.J. Lu <hongjiu.lu@intel.com>
1024
1025 * elf32-i386.c (elf_i386_tls_transition): Break long line.
1026 * elf64-x86-64.c (elf64_x86_64_tls_transition): Likewise.
1027
19ec0de7
JK
10282007-08-20 Jan Kratochvil <jan.kratochvil@redhat.com>
1029
1030 * elfxx-target.h [ELF_COMMONPAGESIZE && ELF_MAXPAGESIZE]
1031 (ELF_MINPAGESIZE): Fixed its size guess. Sanity checked its size.
1032 (ELF_COMMONPAGESIZE, ELF_MAXPAGESIZE): Sanity checked their size.
1033
75ea2736
NC
10342007-08-20 Nick Clifton <nickc@redhat.com>
1035
1036 * elflink.c (elf_fixup_link_order): Rewrite conversion of
1037 s->alignment_power into an offset mask in order to avoid a gcc
1038 error message.
1039
7e976ae4
JJ
10402007-08-17 Jakub Jelinek <jakub@redhat.com>
1041
1042 * config.bfd: Handle sparcv*-*-linux-* the same as sparc-*-linux-*.
1043 Change sparc64-*-linux-* to sparc64*-*-linux-*.
1044
e9f27433
AM
10452007-08-17 Alan Modra <amodra@bigpond.net.au>
1046
1047 * po/Make-in: Add --msgid-bugs-address to xgettext invocation.
1048
2b05f1b7
L
10492007-08-16 H.J. Lu <hongjiu.lu@intel.com>
1050
1051 * elf.c: Revert last change.
1052
94b11780
L
10532007-08-16 H.J. Lu <hongjiu.lu@intel.com>
1054
1055 * elf.c (get_segment_type): Change PT_GNU_STACK to PT_GNU_ATTR.
1056 (bfd_section_from_phdr): Likewise.
1057 (get_program_header_size): Likewise. Add a PT_GNU_ATTR segment
1058 if there is an attribute section.
1059 (_bfd_elf_map_sections_to_segments): Likewise.
1060 (IS_SECTION_IN_INPUT_SEGMENT): Likewise.
1061
a3fadc9a
L
10622007-08-14 H.J. Lu <hongjiu.lu@intel.com>
1063
1064 PR ld/4918
1065 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_PC32
1066 on ___tls_get_addr for GD->LE/LD->LE transitions when not
1067 building shared library.
1068
1069 * elf64-x86-64.c (elf64_x86_64_relocate_section): Allow
1070 R_X86_64_PC32 on __tls_get_addr for GD->LE/LD->LE transitions
1071 when not building shared library.
1072
3fec76aa
JK
10732007-08-14 Jan Kratochvil <jan.kratochvil@redhat.com>
1074
1075 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): LOADBASE is now
1076 initialized only on the first PT_LOAD. New variable LOADBASE_SET.
1077 Removed PF_R checking for IA-64 vDSOs as redundant now.
1078 Code advisory: Roland McGrath
1079
8275b357
RS
10802007-08-13 Richard Sandiford <richard@codesourcery.com>
1081
1082 * elfxx-mips.c (mips_elf_link_hash_table): Add computed_got_sizes.
1083 (mips_elf_record_global_got_symbol): Increment local_gotno for
1084 each forced-local symbol.
1085 (_bfd_mips_elf_check_relocs): Pass forced-local call symbols to
1086 mips_elf_record_global_got_symbol for VxWorks too.
1087 (_bfd_mips_elf_always_size_sections): Set computed_got_sizes
1088 to true after computing the GOT size.
1089 (_bfd_mips_elf_hide_symbol): Increase local_gotno whenever
1090 got.offset == 1. Only adjust global_gotno if computed_got_sizes.
1091 For VxWorks, add a local entry when hiding a symbol that needs a
1092 plt but has not been marked as needing a global got entry.
1093 (_bfd_mips_elf_link_hash_table_create): Set computed_got_sizes to
1094 false.
1095
649aeae3
DJ
10962007-08-12 Daniel Jacobowitz <dan@codesourcery.com>
1097
1098 * coffgen.c (coff_get_normalized_symtab): Correct cast.
1099
3dea8fca
AM
11002007-08-13 Alan Modra <amodra@bigpond.net.au>
1101
1102 * elf.c (elf_modify_segment_map): Add remove_empty_load param.
1103 Don't remove empty PT_LOAD header if false.
1104 (_bfd_elf_map_sections_to_segments): If user phdrs, pass false
1105 to elf_modify_segment_map.
1106 (assign_file_positions_for_load_sections): Pass false to
1107 elf_modify_segment_map.
1108
ac2df442
AM
11092007-08-13 Alan Modra <amodra@bigpond.net.au>
1110
1111 * elf64-ppc.c (ADDI_R12_R12, LD_R11_0R2, LD_R2_0R2): Define.
1112 Update stub comments.
1113 (build_plt_stub): Build two variants, one without "addis".
1114 (ppc_build_one_stub): Build stubs without "addis" if possible.
1115 (ppc_size_one_stub): Size new stubs.
1116
2f964f43
RS
11172007-08-11 Richard Sandiford <richard@codesourcery.com>
1118
1119 * config.bfd (sh-*-vxworks): Define targ_underscore to "yes".
1120
6b8f0fd5
MS
11212007-08-09 Michael Snyder <msnyder@access-company.com>
1122
1123 * aoutx.h (aout_get_external_symbols): Return if count is zero.
1124
6d33f217
L
11252007-08-09 H.J. Lu <hongjiu.lu@intel.com>
1126
1127 PR ld/4909
1128 * elf.c (print_segment_map): New function.
1129 (assign_file_positions_for_load_sections): Call print_segment_map
1130 when a section can't be allocated in segment.
1131
c309eac2
JK
11322007-08-09 Jan Kratochvil <jan.kratochvil@redhat.com>
1133
1134 * opncls.c (bfd_openr_iovec): Fix the OPEN parameter macro expansion.
1135
e6902efc
NC
11362007-08-07 Nick Clifton <nickc@redhat.com>
1137
1138 * po/bfd.pot: Updated template.
1139 * po/BLD-POTFILES.in: Regenerate.
1140
d5191d0c
AM
11412007-08-07 Alan Modra <amodra@bigpond.net.au>
1142
1143 * elf.c: (_bfd_elf_make_section_from_phdr): Properly handle
1144 bss segments.
1145
5eda1c47
DJ
11462007-08-06 Daniel Jacobowitz <dan@codesourcery.com>
1147
1148 * Makefile.am (BUILD_HFILES): Clean bfd_stdint.h.
1149 * Makefile.in: Regenerated.
1150
be118e79
DJ
11512007-08-06 Daniel Jacobowitz <dan@codesourcery.com>
1152
1153 * configure.in: Update version to 2.18.50.
1154 * configure: Regenerated.
1155
bd97cb95
DJ
11562007-08-06 Paul Brook <paul@codesourcery.com>
1157
1158 * elf32-arm.c (elf32_arm_link_hash_entry): Add
1159 plt_maybe_thumb_refcount.
1160 (elf32_arm_link_hash_newfunc): Set plt_maybe_thumb_refcount.
1161 (elf32_arm_copy_indirect_symbol): Ditto.
1162 (elf32_arm_adjust_dynamic_symbol): Ditto.
1163 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_THM_JUMP24.
1164 (arm_add_to_rel): Ditto.
1165 (elf32_arm_final_link_relocate): Merge R_ARM_THM_JUMP24 with
1166 R_ARM_THM_CALL. Handle R_ARM_THM_JUMP19 against a PLT stub.
1167 (elf32_arm_gc_sweep_hook): Call check_use_blx. Update plt counts
1168 for R_ARM_THM_JUMP24 and R_ARM_THM_JUMP19.
1169 (elf32_arm_check_relocs): Update plt counts for R_ARM_THM_JUMP24
1170 and R_ARM_THM_JUMP19.
1171 (allocate_dynrelocs): Use plt_maybe_thumb_refcount.
1172 (elf32_arm_finish_dynamic_symbol): Ditto.
1173 (elf32_arm_output_plt_map): Ditto.
1174
c981028a
DJ
11752007-08-06 Daniel Jacobowitz <dan@codesourcery.com>
1176
1177 * elf.c (rewrite_elf_program_header): Handle sections not sorted
1178 by address.
1179 (copy_elf_program_header): Likewise.
1180
f7231afc
L
11812007-08-04 H.J. Lu <hongjiu.lu@intel.com>
1182
1183 * elf-bfd.h (xvec_get_elf_backend_data): Add const.
1184
1185 * elfcode.h (elf_object_p): Use xvec_get_elf_backend_data.
1186 * elfcore.h (elf_core_file_p): Likewise.
1187
bd33be6e
L
11882007-08-02 H.J. Lu <hongjiu.lu@intel.com>
1189
1190 * coffcode.h (ALIGN_SET): Removed.
1191 (ELIFALIGN_SET): Likewise.
1192 (coff_set_alignment_hook): Handle IMAGE_SCN_ALIGN_128BYTES,
1193 IMAGE_SCN_ALIGN_256BYTES, IMAGE_SCN_ALIGN_512BYTES,
1194 IMAGE_SCN_ALIGN_1024BYTES, IMAGE_SCN_ALIGN_2048BYTES,
1195 IMAGE_SCN_ALIGN_4096BYTES and IMAGE_SCN_ALIGN_8192BYTES.
1196
dcf6c779
MS
11972007-08-01 Michael Snyder <msnyder@access-company.com>
1198
9b0ec667
MS
1199 * vms-tir.c (new_section): Fix cut and paste error.
1200
20c6e70e
MS
1201 * aoutx.h (aout_link_add_symbols): Return if count is zero.
1202
dcf6c779
MS
1203 * elf.c (bfd_elf_print_symbol): Macro dereferences pointer, so
1204 pointer must be non-null.
1205
e708816d
NC
12062007-08-01 Tristan Gingold <gingold@adacore.com>
1207
1208 * coffcode.h (coff_sort_func_alent): New function.
1209 (coff_slurp_line_table): Sort line table if not already sorted.
1210
55b581a6
JJ
12112007-08-01 Jakub Jelinek <jakub@redhat.com>
1212
1213 * elf.c (_bfd_elf_map_sections_to_segments): Work around buggy
1214 GCC 3.4.x warning.
1215
ad756e3f
AM
12162007-08-01 Alan Modra <amodra@bigpond.net.au>
1217
1218 * aoutx.h (swap_ext_reloc_in): Set howto to NULL for unknown
1219 r_type.
1220 (swap_std_reloc_in): Likewise.
1221 (aout_link_input_section_std): Likewise. Return with an error
1222 on unexpected relocation type.
1223 (aout_link_input_section_ext): Likewise.
1224
f6e688f7
AM
12252007-08-01 Alan Modra <amodra@bigpond.net.au>
1226
1227 PR4694
1228 * aoutx.h (final_link): Write a zero in first word of
1229 stringtab if no symbols rather than corrupting last byte
1230 of text/data.
1231
1c5265b5
JJ
12322007-07-31 Jakub Jelinek <jakub@redhat.com>
1233
1234 * elf.c (get_program_header_size): Adjacent loadable .note*
1235 sections need just one PT_NOTE segment.
1236 (_bfd_elf_map_sections_to_segments): Likewise.
1237
9ee2139f
MS
12382007-07-30 Michael Snyder <msnyder@access-company.com>
1239
1240 * coffgen.c (_bfd_coff_read_internal_relocs): Revert change of
1241 2007-07-26. Buffer still in use, can't be freed.
1242
c6aa130f
MS
12432007-07-27 Michael Snyder <msnyder@access-company.com>
1244
d63388ff
MS
1245 * cofflink.c (coff_link_add_symbols): Return if count is zero.
1246
50a39e97
MS
1247 * coff-i386.c (coff_i386_rtype_to_howto): Off by one error.
1248
87b32780
MS
1249 * aoutx.h (slurp_symbol_table): Return if count == 0.
1250
9d7038d3
MS
1251 * coffgen.c (_bfd_coff_read_internal_relocs): Return if count is zero.
1252
c6aa130f
MS
1253 * elf32-i386.c (elf_i386_check_relocs): Check for null pointer.
1254
170bfeb9
L
12552007-07-27 H.J. Lu <hongjiu.lu@intel.com>
1256
1257 * config.bfd (x86_64-*-mingw*): Don't include x86_64coff_vec.
1258
507f5898
MS
12592007-07-26 Michael Snyder <msnyder@access-company.com>
1260
1261 * coff-i386.c (coff_i386_rtype_to_howto): Guard against null.
a6626e8c
MS
1262
1263 * linker.c (bfd_section_already_linked_table_insert): Change
1264 return type from void to boolean. Return FALSE on failure.
1265 (_bfd_generic_section_already_linked): Test return value of
1266 bfd_section_already_linked_table_insert, call fatal on error.
1267
1268 * elflink.c (_bfd_elf_section_already_linked): Test return value
1269 of bfd_section_already_linked_table_insert, call fatal on error.
1270
1271 * libbfd-in.h (bfd_section_already_linked_table_insert): Update
1272 return type to bfd_boolean.
1273
1274 * libbfd.h: Regenerate.
1275
36e44abd
AN
12762007-07-26 Adam Nemet <anemet@caviumnetworks.com>
1277
1278 * archive.c (do_slurp_bsd_armap, do_slurp_coff_armap,
1279 bfd_slurp_armap): Improve function comment.
1280
b7fd5ce1
MS
12812007-07-26 Michael Snyder <msnyder@access-company.com>
1282
2d4f3e92
MS
1283 * linker.c (already_linked_newfunc): Check for NULL return from
1284 bfd_hash_allocate.
1285
ac38308c
MS
1286 * coffgen.c (fixup_symbol_value): Guard against null;
1287 bfd_is_com_section will dereference the section pointer.
1288
c82a7c57
MS
1289 * syms.c (bfd_decode_symclass): Guard against NULL, since
1290 bfd_is_com_section dereferences the pointer.
1291
3d7b34d8
MS
1292 * srec.c (srec_scan): Check for EOF (critical because return value
1293 will be used as array index).
1294
44c62d9e
MS
1295 * coffgen.c (_bfd_coff_read_internal_relocs): If internal_relocs
1296 are not to be cached, free the temporary buffer.
1297
078c4bfc
MS
1298 * aoutx.h (slurp_reloc_table): Return TRUE if reloc_size == zero
1299 or count == zero.
1300
814b5378
MS
1301 * tekhex.c (first_phase): Check return value for null.
1302
b7fd5ce1
MS
1303 * elf.c (_bfd_elf_get_synthetic_symtab): Remove meaningless
1304 pointer increment.
1305
b9da616a
AM
13062007-07-26 Alan Modra <amodra@bigpond.net.au>
1307
33774f08
AM
1308 * elflink.c (_bfd_elf_fix_symbol_flags): Remove unnecessary
1309 check on dynobj. Remove bed shadow.
1310
e62071b6
AM
1311 * srec.c (srec_get_section_contents): Return immediately on
1312 count zero. Check that offset and count are within section.
1313 * libbfd.c (_bfd_generic_get_section_contents): Check that
1314 offset + count does not overflow.
1315
b9da616a
AM
1316 * srec.c (srec_canonicalize_symtab): Don't alloc when symcount
1317 is zero. Correct return value on error.
1318 * mmo.c (mmo_canonicalize_symtab): Likewise.
1319 * binary.c (binary_canonicalize_symtab) Correct return on error.
1320
c2c96631
TS
13212007-07-26 Thiemo Seufer <ths@mips.com>
1322
1323 * bfd.c (_bfd_set_gp_value): Use abort instead of BFD_FAIL.
1324
d4947150
AM
13252007-07-26 Alan Modra <amodra@bigpond.net.au>
1326
1327 * reloc.c (bfd_generic_get_relocated_section_contents): Avoid
1328 bfd_canonicalize_reloc call when bfd_get_reloc_upper_bound
1329 says there are no relocs.
1330
bd210d54 13312007-07-26 Doug Kwan <dougkwan@google.com>
d4947150 1332
bd210d54
NC
1333 Speed up bfd_dwarf2_find_line.
1334 * dwarf2.c (struct dwarf2_debug): Add new fields to support function
1335 and variable info hash tables. Add last_comp_unit, info_hash_count,
1336 funcinfo_hash_table, varinfo_hash_table, hash_units_head.
1337 (struct comp_unit): Add prev_unit, cached.
1338 (struct info_list_node, struct info_hash_entry,
1339 struct info_hash_table): New.
1340 (info_hash_table_newfunc, create_info_hash_table,
1341 insert_info_hash_table, lookup_info_hash_table): New functions
1342 implementing function and variable info hash tables.
1343 (scan_unit_for_symbols): Add checks to make sure hash tables are
1344 consistent with compilation units.
1345 (comp_unit_maybe_decode_line_info): New function.
1346 (comp_unit_find_line): Use comp_unit_maybe_decode_line_info.
1347 (reverse_funcinfo_list, reverse_varinfo_list, comp_unit_hash_info,
1348 info_hash_lookup_funcinfo, info_hash_lookup_varinfo,
1349 stash_maybe_update_info_hash_table, stash_verify_info_hash_table,
1350 stash_maybe_enable_info_hash_tables, stash_find_line_fast): New
1351 functions. Make use of info hash tables to speed up
1352 bfd_dwarf2_find_line.
1353 (find_line): Use hash table for faster lookup if it is turned on.
1354 Also add code to maintain bi-directional link in comp units.
1355
353c5574
MS
13562007-07-25 Michael Snyder <msnyder@access-company.com>
1357
1358 * coffgen.c (_bfd_coff_get_external_symbols): Nothing to be done
1359 if size == 0; return and avoid possible null pointer issues.
1360
f08c429c
AM
13612007-07-25 Alan Modra <amodra@bigpond.net.au>
1362
1363 * linker.c (generic_link_add_symbol_list): Warning fix.
1364
d0f16d5e
MS
13652007-07-24 Michael Snyder <msnyder@access-company.com>
1366
f6eea5ae
MS
1367 * opncls.c (bfd_make_writable): Check return from bfd_malloc.
1368
d0f16d5e
MS
1369 * elflink.c (bfd_elf_final_link): Avoid redundant frees -- return
1370 on bfd_malloc error rather than goto error_return.
1371
4d269e42
AM
13722007-07-24 Alan Modra <amodra@bigpond.net.au>
1373
1374 * elflink.c (_bfd_elf_link_just_syms, merge_sections_remove_hook,
1375 _bfd_elf_merge_sections, _bfd_elf_link_hash_newfunc,
1376 _bfd_elf_link_hash_copy_indirect, _bfd_elf_link_hash_hide_symbol,
1377 _bfd_elf_link_hash_table_init, _bfd_elf_link_hash_table_create,
1378 bfd_elf_set_dt_needed_name, bfd_elf_get_dyn_lib_class,
1379 bfd_elf_set_dyn_lib_class, bfd_elf_get_needed_list,
1380 bfd_elf_get_runpath_list, bfd_elf_get_dt_soname,
1381 bfd_elf_get_bfd_needed_list, struct elf_symbuf_symbol,
1382 struct elf_symbuf_head, struct elf_symbol, elf_sort_elf_symbol,
1383 elf_sym_name_compare, elf_create_symbuf,
1384 bfd_elf_match_symbols_in_sections,
1385 _bfd_elf_match_sections_by_type): Move to here..
1386 * elf.c: ..from here.
1387
a26587ba
RS
13882007-07-23 Richard Sandiford <richard@codesourcery.com>
1389
1390 * elflink.c (_bfd_elf_fix_symbol_flags): Only assert the type
1391 of weakdef->root.type if weakdef has no regular definition.
1392
0e53d9da
AN
13932007-07-22 Adam Nemet <anemet@caviumnetworks.com>
1394
1395 * elfxx-mips.c (struct mips_elf_link_hash_table): Add new field
1396 small_data_overflow_reported.
1397 (_bfd_mips_elf_link_hash_table_create): Initialize it.
1398 (_bfd_mips_elf_relocate_section) <bfd_reloc_overflow>: Report
1399 small-data section overflow.
1400
6b33789f
NC
14012007-07-19 Doug Kwan <dougkwan@google.com>
1402
4d269e42
AM
1403 PR binutils/4797
1404 * dwarf2.c: (find_line) Do not dereference functionname_ptr if
1405 do_line is true.
6b33789f 1406
13161072 14072007-07-18 Bob Wilson <bob.wilson@acm.org>
4d269e42 1408
13161072
BW
1409 * elf32-xtensa.c (xtensa_callback_required_dependence): Ignore
1410 non-ELF sections.
4d269e42 1411
e29297b7 14122007-07-18 Bob Wilson <bob.wilson@acm.org>
4d269e42 1413
e29297b7
BW
1414 * elf32-xtensa.c (elf_xtensa_finish_dynamic_sections): Get section
1415 vma and size for dynamic tags from the output sections.
4d269e42 1416
a5d1b3b5
AM
14172007-07-18 Alan Modra <amodra@bigpond.net.au>
1418
1419 * elf-bfd.h (struct sym_sec_cache): Delete "sec". Add "shndx".
1420 * elf.c (bfd_section_from_r_symndx): Don't cache bfd section of
1421 symbol. Instead cache ELF section index. Remove redundant
1422 checks of st_shndx.
1423
d955dada
MF
14242007-07-15 Mike Frysinger <vapier@gentoo.org>
1425
1426 * trad-core.c (NBPG): If not defined, set to getpagesize().
1427
979dc3bc
RM
14282007-07-13 Roland McGrath <roland@redhat.com>
1429
1430 * elf-bfd.h (struct elf_obj_tdata): Revert last change.
1431 Add after_write_object_contents, after_write_object_contents_info.
1432 * elf.c (_bfd_elf_write_object_contents): Revert last change.
1433 Instead, call after_write_object_contents if set.
1434
d2df793a
NC
14352007-07-12 Kai Tietz <kai.tietz@onevision.com>
1436
1437 * bfd-in.h: (BFD_HOST_64BIT_LONG_LONG): New.
1438 (BFD_HOSTPTR_T): Host pointer type for casting a
1439 pointer to an integer type.
1440 (bfd_hostptr_t): The typedef of BFD_HOSTPTR_T.
1441 (sprintf_vma, fprintf_vma): Add support for long long prints.
1442 * bfd-in2.h: Regenerate.
1443 * configure.in: (BFD_HOST_64BIT_LONG_LONG): New.
1444 (BFD_HOSTPTR_T): Host pointer type for casting a
1445 pointer to an integer type. Default is "unsigned long".
1446 (AC_CHECK_SIZEOF(void *)): New.
1447 (host64): Set it if the pointer size is 8.
1448 * configure: Regenerate.
1449 * config.in: Add macro SIZEOF_VOID_P.
1450 * coffcode.h: Replace host ptr type assuming "long" with
1451 bfd_hostptr_t type.
1452 * coffgen.c: Likewise.
1453 * elf-eh-frame.c: Likewise.
1454 * peicode.h: Likewise.
1455
a3a4ddad
L
14562007-07-10 H.J. Lu <hongjiu.lu@intel.com>
1457
1458 * Makefile.in: Regenerated.
1459
329b43c4
L
14602007-07-10 H.J. Lu <hongjiu.lu@intel.com>
1461
1462 PR binutils/4756
1463 * simple.c (bfd_simple_get_relocated_section_content): Don't
1464 apply relocation on executable and shared library.
1465
cfd2c773
NS
14662007-07-10 Nathan Sidwell <nathan@codesourcery.com>
1467
1468 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't eliminate
1469 copy relocs on vxworks.
1470
1489a3a0
AM
14712007-07-10 Alan Modra <amodra@bigpond.net.au>
1472
1473 * elf32-arm.c (elf32_arm_size_info): Init checksum_contents field.
1474 * elf64-alpha.c (alpha_elf_size_info): Likewise.
1475 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1476 * elf64-mips.c (mips_elf64_size_info): Likewise.
1477 * elf64-s390.c (s390_elf64_size_info): Likewise.
1478 * elf64-sparc.c (elf64_sparc_size_info): Likewise.
1479
00cbee0a
L
14802007-07-09 H.J. Lu <hongjiu.lu@intel.com>
1481
1482 * elflink.c (bfd_elf_record_link_assignment): Handle indirect
1483 symbol.
1484 (_bfd_elf_merge_symbol): Properly update normal symbol when
1485 overriding the versioned symbol from a dynamic library.
1486
fd2f25da
RM
14872007-07-09 Roland McGrath <roland@redhat.com>
1488
1489 * elf-bfd.h (struct elf_obj_tdata): Add members
1490 emit_note_gnu_build_id and note_gnu_build_id_sec.
1491 * elf.c (_bfd_id_note_section_size): New global function.
1492 (read_hex, _bfd_elf_write_build_id_section): New static functions.
1493 (_bfd_elf_write_object_contents): Call _bfd_elf_write_build_id_section
1494 if emit_note_gnu_build_id is set.
1495 * Makefile.am (elf.lo): Update dependencies.
1496
1497 * elf-bfd.h (struct elf_size_info): Add checksum_contents hook.
1498 (bfd_elf32_checksum_contents, bfd_elf64_checksum_contents): Declare.
1499 * elfcode.h (elf_checksum_contents): New macro and function.
1500 (NAME(_bfd_elf,size_info)): Initialize checksum_contents hook.
1501
9af2a943
AM
15022007-07-06 Michael Snyder <msnyder@access-company.com>
1503
1504 * elflink.c (elf_link_add_object_symbols): Return via
1505 error_free_vers on "notice" failure.
1506
a93221e5
L
15072007-07-04 H.J. Lu <hongjiu.lu@intel.com>
1508
1509 * peicode.h (pe_bfd_object_p): Don't check PE vs. EFI target
1510 if arch is unknown.
1511
b4928193
NC
15122007-07-04 Nick Clifton <nickc@redhat.com>
1513
1514 Import this patch from an internal tree:
9af2a943 1515
b4928193
NC
1516 2001-07-17 Richard Henderson <rth@redhat.com>
1517
1518 * elf32-mep.c (mep_final_link_relocate) [R_MEP_HI16S]: Correctly
1519 compensate for high bit set in R_MEP_LOW16.
1520
3cfad14c
JM
15212007-07-03 Joseph Myers <joseph@codesourcery.com>
1522
1523 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Copy type from
1524 input attributes if value has been copied.
1525
cd123cb7
NC
15262007-07-03 Nick Clifton <nickc@redhat.com>
1527
1528 * COPYING: Replace with GPLv3 text.
1529 * aix386-core.c: Update copyright notice to refer to GPLv3.
1530 * aix5ppc-core.c, aout0.c, aout32.c, aout64.c, aout-adobe.c,
1531 aout-arm.c, aout-cris.c, aoutf1.h, aout-ns32k.c, aout-sparcle.c,
1532 aout-target.h, aout-tic30.c, aoutx.h, archive64.c, archive.c,
1533 archures.c, armnetbsd.c, bfd.c, bfd-in.h, bfdio.c, bfdwin.c,
1534 binary.c, bout.c, cache.c, cf-i386lynx.c, cf-sparclynx.c,
1535 cisco-core.c, coff64-rs6000.c, coff-alpha.c, coff-apollo.c,
1536 coff-arm.c, coff-aux.c, coffcode.h, coffgen.c, coff-go32.c,
1537 coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c, coff-i960.c,
1538 coff-ia64.c, cofflink.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
1539 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
1540 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
1541 coff-svm68k.c, coffswap.h, coff-tic30.c, coff-tic4x.c,
1542 coff-tic54x.c, coff-tic80.c, coff-u68k.c, coff-w65.c,
1543 coff-we32k.c, coff-x86_64.c, coff-z80.c, coff-z8k.c, corefile.c,
1544 cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c, cpu-bfin.c,
1545 cpu-cr16.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
1546 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
1547 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
1548 cpu-i960.c, cpu-ia64.c, cpu-ia64-opc.c, cpu-ip2k.c, cpu-iq2000.c,
1549 cpu-m10200.c, cpu-m10300.c, cpu-m32c.c, cpu-m32r.c, cpu-m68hc11.c,
1550 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
1551 cpu-mep.c, cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-mt.c,
1552 cpu-ns32k.c, cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c,
1553 cpu-powerpc.c, cpu-rs6000.c, cpu-s390.c, cpu-score.c, cpu-sh.c,
1554 cpu-sparc.c, cpu-spu.c, cpu-tic30.c, cpu-tic4x.c, cpu-tic54x.c,
1555 cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c, cpu-we32k.c,
1556 cpu-xc16x.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z80.c, cpu-z8k.c,
1557 demo64.c, doc/chew.c, dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c,
1558 ecoffswap.h, efi-app-ia32.c, efi-app-ia64.c, efi-app-x86_64.c,
1559 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
1560 elf32-avr.h, elf32-bfin.c, elf32.c, elf32-cr16.c, elf32-cr16c.c,
1561 elf32-cris.c, elf32-crx.c, elf32-d10v.c, elf32-d30v.c,
1562 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
1563 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
1564 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1565 elf32-iq2000.c, elf32-m32c.c, elf32-m32r.c, elf32-m68hc11.c,
1566 elf32-m68hc12.c, elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c,
1567 elf32-m88k.c, elf32-mcore.c, elf32-mep.c, elf32-mips.c,
1568 elf32-msp430.c, elf32-mt.c, elf32-openrisc.c, elf32-or32.c,
1569 elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c, elf32-score.c,
1570 elf32-sh64.c, elf32-sh64-com.c, elf32-sh64.h, elf32-sh.c,
1571 elf32-sh-symbian.c, elf32-sparc.c, elf32-spu.c, elf32-spu.h,
1572 elf32-v850.c, elf32-vax.c, elf32-xc16x.c, elf32-xstormy16.c,
1573 elf32-xtensa.c, elf64-alpha.c, elf64.c, elf64-gen.c, elf64-hppa.c,
1574 elf64-hppa.h, elf64-mips.c, elf64-mmix.c, elf64-ppc.c,
1575 elf64-ppc.h, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
1576 elf64-x86-64.c, elf-attrs.c, elf-bfd.h, elf.c, elfcode.h,
1577 elfcore.h, elf-eh-frame.c, elf-hppa.h, elflink.c, elf-m10200.c,
1578 elf-m10300.c, elfn32-mips.c, elf-strtab.c, elf-vxworks.c,
1579 elf-vxworks.h, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
1580 elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h, epoc-pe-arm.c,
1581 epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c, genlink.h,
1582 hash.c, host-aout.c, hosts/alphavms.h, hp300bsd.c, hp300hpux.c,
1583 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
1584 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
1585 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
1586 libaout.h, libbfd.c, libbfd-in.h, libcoff-in.h, libecoff.h,
1587 libhppa.h, libieee.h, libnlm.h, liboasys.h, libpei.h, libxcoff.h,
1588 linker.c, lynx-core.c, m68k4knetbsd.c, m68klinux.c, m68knetbsd.c,
1589 m88kmach3.c, m88kopenbsd.c, mach-o.c, mach-o.h, mach-o-target.c,
1590 mep-relocs.pl, merge.c, mipsbsd.c, mmo.c, netbsd-core.c, netbsd.h,
1591 newsos3.c, nlm32-alpha.c, nlm32.c, nlm32-i386.c, nlm32-ppc.c,
1592 nlm32-sparc.c, nlm64.c, nlm.c, nlmcode.h, nlmswap.h, nlm-target.h,
1593 ns32k.h, ns32knetbsd.c, oasys.c, opncls.c, osf-core.c,
1594 pc532-mach.c, pdp11.c, pe-arm.c, pe-arm-wince.c, pef.c, pef.h,
1595 pef-traceback.h, pe-i386.c, pei-arm.c, pei-arm-wince.c, peicode.h,
1596 pei-i386.c, pei-mcore.c, pei-mips.c, pei-ppc.c, pei-sh.c,
1597 pei-x86_64.c, pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c,
1598 pe-x86_64.c, peXXigen.c, ppcboot.c, ptrace-core.c, reloc16.c,
1599 reloc.c, riscix.c, rs6000-core.c, sco5-core.c, section.c,
1600 simple.c, som.c, som.h, sparclinux.c, sparclynx.c, sparcnetbsd.c,
1601 srec.c, stabs.c, stab-syms.c, stamp-h.in, sunos.c, syms.c,
1602 sysdep.h, targets.c, targmatch.sed, tekhex.c, ticoff.h,
1603 trad-core.c, vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c,
1604 vms.c, vms-gsd.c, vms.h, vms-hdr.c, vms-misc.c, vms-tir.c,
1605 xcofflink.c, xcoff-target.h, xsym.c, xsym.h, xtensa-isa.c,
1606 xtensa-modules.c: Likewise.
1607 * elf32-sh-relocs.h: Add copyright notice.
1608 * hosts/alphalinux.h, hosts/decstation.h, hosts/delta68.h,
1609 hosts/dpx2.h, hosts/hp300bsd.h, hosts/i386bsd.h,
1610 hosts/i386linux.h, hosts/i386mach3.h, hosts/i386sco.h,
1611 hosts/i860mach3.h, hosts/m68kaux.h, hosts/m68klinux.h,
1612 hosts/m88kmach3.h, hosts/mipsbsd.h, hosts/mipsmach3.h,
1613 hosts/news.h, hosts/news-mips.h, hosts/pc532mach.h,
1614 hosts/riscos.h, hosts/symmetry.h, hosts/tahoe.h, hosts/vaxbsd.h,
1615 hosts/vaxlinux.h, hosts/vaxult2.h, hosts/vaxult.h: Likewise.
1616 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate.
1617
741d6ea8
JM
16182007-07-02 Joseph Myers <joseph@codesourcery.com>
1619
1620 * elfxx-mips.c (mips_elf_calculate_relocation): Handle
1621 R_MIPS_TLS_DTPREL32 and R_MIPS_TLS_DTPREL64.
1622 * elf64-mips.c (mips_elf64_howto_table_rela): Support
1623 R_MIPS_TLS_DTPREL64.
1624
ae351704
AM
16252007-07-02 Alan Modra <amodra@bigpond.net.au>
1626
1627 * Makefile.am: Run "make dep-am".
1628 * Makefile.in: Regenerate.
1629 * aclocal.m4: Regenerate.
1630 * config.in: Regenerate.
1631 * po/SRC-POTFILES.in: Regenerate.
1632 * po/bfd.pot: Regenerate.
1633
3e5484db
AM
16342007-07-02 Alan Modra <amodra@bigpond.net.au>
1635
1636 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Tidy
1637 symsec != NULL tests.
1638
08a40648
AM
16392007-07-02 Alan Modra <amodra@bigpond.net.au>
1640
1641 PR 4712
1642 * elf.c (assign_file_positions_for_load_sections): Adjust lma
1643 by p_vaddr_offset.
1644
86b57e31
L
16452007-06-30 H.J. Lu <hongjiu.lu@intel.com>
1646
1647 * aclocal.m4: Regenerated.
1648 * Makefile.in: Likewise.
1649
34c8bcba
JM
16502007-06-29 Joseph Myers <joseph@codesourcery.com>
1651
1652 * elf32-ppc.c (ppc_elf_merge_obj_attributes): New.
1653 (ppc_elf_merge_private_bfd_data): Call it.
1654
2cf19d5c
JM
16552007-06-29 Joseph Myers <joseph@codesourcery.com>
1656
1657 * elfxx-mips.c (mips_elf_merge_obj_attributes): New.
1658 (_bfd_mips_elf_merge_private_bfd_data): Call it.
1659
104d59d1
JM
16602007-06-29 Joseph Myers <joseph@codesourcery.com>
1661
1662 * elf-attrs.c: New.
1663 * Makefile.am (BFD32_BACKENDS): Add elf-attrs.lo.
1664 (BFD32_BACKENDS_CFILES): Add elf-attrs.c.
1665 (elf-attrs.lo): Generate dependencies.
1666 * Makefile.in: Regenerate.
1667 * configure.in (elf): Add elf-attrs.lo.
1668 * configure: Regenerate.
1669 * elf-bfd.h (struct elf_backend_data): Add entries for object
1670 attributes.
1671 (NUM_KNOWN_OBJ_ATTRIBUTES, obj_attribute, obj_attribute_list,
1672 OBJ_ATTR_PROC, OBJ_ATTR_GNU, OBJ_ATTR_FIRST, OBJ_ATTR_LAST,
1673 Tag_NULL, Tag_File, Tag_Section, Tag_Symbol, Tag_compatibility):
1674 New.
1675 (struct elf_obj_tdata): Add entries for object attributes.
1676 (elf_known_obj_attributes, elf_other_obj_attributes,
1677 elf_known_obj_attributes_proc, elf_other_obj_attributes_proc):
1678 New.
1679 (bfd_elf_obj_attr_size, bfd_elf_set_obj_attr_contents,
1680 bfd_elf_get_obj_attr_int, bfd_elf_add_obj_attr_int,
1681 bfd_elf_add_proc_attr_int, bfd_elf_add_obj_attr_string,
1682 bfd_elf_add_proc_attr_string, bfd_elf_add_obj_attr_compat,
1683 bfd_elf_add_proc_attr_compat, _bfd_elf_attr_strdup,
1684 _bfd_elf_copy_obj_attributes, _bfd_elf_obj_attrs_arg_type,
1685 _bfd_elf_parse_attributes, _bfd_elf_merge_object_attributes): New.
1686 * elf.c (_bfd_elf_copy_private_bfd_data): Copy object attributes.
1687 (bfd_section_from_shdr): Handle attributes sections.
1688 * elflink.c (bfd_elf_final_link): Handle attributes sections.
1689 * elfxx-target.h (elf_backend_obj_attrs_vendor,
1690 elf_backend_obj_attrs_section, elf_backend_obj_attrs_arg_type,
1691 elf_backend_obj_attrs_section_type): New.
1692 (elfNN_bed): Update.
1693 * elf32-arm.c (NUM_KNOWN_ATTRIBUTES, aeabi_attribute,
1694 aeabi_attribute_list): Remove.
1695 (struct elf32_arm_obj_tdata): Remove object attributes fields.
1696 (check_use_blx, bfd_elf32_arm_set_vfp11_fix, using_thumb2,
1697 elf32_arm_copy_private_bfd_data, elf32_arm_merge_eabi_attributes):
1698 Update for new object attributes interfaces.
1699 (uleb128_size, is_default_attr, eabi_attr_size,
1700 elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
1701 elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
1702 elf32_arm_new_eabi_attr, elf32_arm_get_eabi_attr_int,
1703 elf32_arm_add_eabi_attr_int, attr_strdup,
1704 elf32_arm_add_eabi_attr_string, elf32_arm_add_eabi_attr_compat,
1705 copy_eabi_attributes, elf32_arm_parse_attributes): Remove. Moved
1706 to generic code in elf-attrs.c.
1707 (elf32_arm_obj_attrs_arg_type): New.
1708 (elf32_arm_fake_sections): Do not handle .ARM.attributes.
1709 (elf32_arm_section_from_shdr): Do not handle SHT_ARM_ATTRIBUTES.
1710 (bfd_elf32_bfd_final_link): Remove.
1711 (elf_backend_obj_attrs_vendor, elf_backend_obj_attrs_section,
1712 elf_backend_obj_attrs_arg_type,
1713 elf_backend_obj_attrs_section_type): New.
1714 * elf32-bfin.c (bfin_elf_copy_private_bfd_data): Copy object
1715 attributes.
1716 * elf32-frv.c (frv_elf_copy_private_bfd_data): Likewise.
1717 * elf32-iq2000.c (iq2000_elf_copy_private_bfd_data): Likewise.
1718 * elf32-mep.c (mep_elf_copy_private_bfd_data): Likewise.
1719 * elf32-mt.c (mt_elf_copy_private_bfd_data): Likewise.
1720 * elf32-sh.c (sh_elf_copy_private_data): Likewise.
1721 * elf64-sh64.c (sh_elf64_copy_private_data_internal): Likewise.
1722
5ab79981
PB
17232007-06-29 Paul Brook <paul@codesourcery.com>
1724
1725 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Suppress
1726 call veneers for call relocations against undefined symbols.
1727 (elf32_arm_final_link_relocate): Turn call to undefined symbol
1728 into a jump to the next instruction.
1729
c6aa130f 17302007-06-29 Michael Snyder <msnyder@access-company.com>
32e8a950
NC
1731
1732 * bfd.c (bfd_demangle): Plug memory leak (Coverity).
1733
3d3d428f
NC
17342007-06-29 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
1735
1736 * Makefile.am: Add cr16 related entry
1737 * Makefile.in: Regenerate
1738 * archures.c: Add bfd_cr16_arch
1739 * bfd-in2.h: Regenerate
1740 * config.bfd: Add cr16-elf
1741 * configure.in: Add bfd_elf32_cr16_vec
1742 * configure: Regenerate.
1743 * targets.c: Added cr16 related information
1744 * cpu-cr16.c: New file.
1745 * elf32-cr16.c: New file.
1746 * reloc.c: Added cr16 relocs.
1747
c55fe096
AM
17482007-06-29 Alan Modra <amodra@bigpond.net.au>
1749
1750 * elflink.c (_bfd_elf_link_assign_sym_version): Improve error
1751 message for undefined version nodes.
1752 (elf_gc_sweep): Don't warn when zero size sections are
1753 removed.
1754
375de94a
AM
17552007-06-29 Nathan Froyd <froydnj@codesourcery.com>
1756
1757 * elf32-ppc.c (ppc_elf_info_to_howto): Check for invalid relocation
1758 types.
1759
7d3287cb
AM
17602007-06-29 Alan Modra <amodra@bigpond.net.au>
1761
1762 * elf32-spu.c (spu_elf_fake_sections): New function.
1763 (elf_backend_fake_sections): Define.
1764
6a3cd2b4
AM
17652007-06-29 Alan Modra <amodra@bigpond.net.au>
1766
1767 * elf.c (assign_file_positions_for_load_sections): Use elf
1768 section header sh_size rather than bfd section size, simplifying
1769 .tbss handling.
1770
bf988460
AM
17712007-06-29 Alan Modra <amodra@bigpond.net.au>
1772
36fc76ae 1773 PR ld/4701
bf988460
AM
1774 * elf.c (assign_file_positions_for_load_sections): Ensure bss
1775 segments meet gABI alignment requirements. Don't allocate
1776 file space for bss sections in a segment also containing file
1777 or program headers.
1778
60b31e8d
AM
17792007-06-27 Alan Modra <amodra@bigpond.net.au>
1780
cc481421
AM
1781 * bfd.c (struct bfd): Rename "next" to "archive_next".
1782 * archive.c: Rename uses throughout file.
1783 * archive64.c: Likewise.
1784 * coff-rs6000.c: Likewise.
1785 * ecoff.c: Likewise.
1786 * som.c: Likewise.
1787 * bfd-in2.h: Regenerate.
1788
60b31e8d
AM
1789 * elf32-ppc.c (ppc_elf_select_plt_layout): Properly iterate over
1790 input bfds.
58eb693e 1791 * elf32-spu.c (spu_elf_create_sections): Likewise.
60b31e8d 1792
bec42b15
NC
17932007-06-26 H.J. Lu <hongjiu.lu@intel.com>
1794
1795 * dwarf2.c (find_line): New. Contains the duplicated code from:
1796 (_bfd_dwarf2_find_nearest_line): Use it.
1797 (_bfd_dwarf2_find_line): Use it.
1798
3d3e6f9a
JM
17992007-06-26 Joseph Myers <joseph@codesourcery.com>
1800
1801 * elf32-arm.c (copy_eabi_attributes): Copy type of attributes.
1802
b314ec0e
RS
18032007-06-25 Richard Sandiford <richard@codesourcery.com>
1804
1805 * elfxx-mips.c (mips_elf_calculate_relocation): Allow local stubs
1806 to be used for calls from MIPS16 code.
1807
0d4a1476
AS
18082007-06-23 Andreas Schwab <schwab@suse.de>
1809
1810 * configure.in (--with-separate-debug-dir): New option.
1811 * configure: Regenerate.
1812 * Makefile.am (dwarf2.lo): Add rule to pass DEBUGDIR.
1813 * Makefile.in: Regenerate.
1814 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Pass DEBUGDIR to
1815 bfd_follow_gnu_debuglink.
1816 (_bfd_dwarf2_find_line): Likewise.
1817
0d161102
NC
18182007-06-22 Nick Clifton <nickc@redhat.com>
1819
1820 * dwarf2.c: Add support for reading in debug information via a
1821 .gnu_debuglink section:
1822 (struct dwarf2_debug): Add bfd field to record the bfd containing
1823 the debug info.
1824 (parse_comp_unit): Remove ABFD parameter. Instead use the bfd
1825 field in the dwarf2_debug structure.
1826 (_bfd_dwarf2_find_nearest_line): If a debug info section could not
1827 be found in the current bfd call bfd_follow_gnu_debuglink to see
1828 if another file contains the debug information. If it does, open
1829 it and continue.
1830 (_bfd_dwarf2_find_line): Likewise.
1831
293a0124
L
18322007-06-19 H.J. Lu <hongjiu.lu@intel.com>
1833
1834 PR ld/4590
1835 * elfxx-ia64.c (sort_dyn_sym_info): Keep the valid got_offset
1836 when removing duplicated entries.
1837 (get_dyn_sym_info): Initialize the got_offset field to -1.
1838 Update call to sort_dyn_sym_info.
1839 (elfNN_ia64_relocate_section): Call sort_dyn_sym_info to sort
1840 array of addend and remove duplicates.
1841
dc1f3d8a
L
18422007-06-18 H.J. Lu <hongjiu.lu@intel.com>
1843
1844 * libpei.h (_bfd_XXi_final_link_postscript): Remove
1845 duplication.
1846 (bfd_target_pei_p): New.
1847 (bfd_target_pei_arch): New
1848 (bfd_target_efi_p): Likewise.
1849 (bfd_target_efi_arch): New
1850 (bfd_pe_executable_p): Use bfd_target_pei_p and
1851 bfd_target_efi_p.
1852
1853 * peicode.h (arch_type): New enum.
1854 (pe_arch): New function.
1855 (pe_bfd_object_p): Don't match PE/EFI target with EFI/PE file
1856 if there is an EFI/PE target.
1857
79887925
L
18582007-06-14 H.J. Lu <hongjiu.lu@intel.com>
1859
1860 * Makefile.am (ACLOCAL_AMFLAGS): Add -I . -I ../config.
1861
1862 * acinclude.m4: Don't include m4 files. Remove libtool
1863 kludge.
1864
1865 * Makefile.in: Regenerated.
79887925
L
1866 * aclocal.m4: Likewise.
1867 * configure: Likewise.
1868
99ded152
BW
18692007-06-11 Sterling Augustine <sterling@tensilica.com>
1870 Bob Wilson <bob.wilson@acm.org>
bf988460 1871
99ded152
BW
1872 * elf32-xtensa.c (extend_ebb_bounds_forward): Use renamed
1873 XTENSA_PROP_NO_TRANSFORM flag instead of XTENSA_PROP_INSN_NO_TRANSFORM.
1874 (extend_ebb_bounds_backward, compute_text_actions): Likewise.
1875 (compute_ebb_proposed_actions, coalesce_shared_literal): Likewise.
1876 (xtensa_get_property_predef_flags): Likewise.
1877 (compute_removed_literals): Pass new arguments to is_removable_literal.
1878 (is_removable_literal): Add sec, prop_table and ptblsize arguments.
1879 Do not remove literal if the NO_TRANSFORM property flag is set.
bf988460 1880
cbf2cba4
RS
18812007-05-31 Richard Sandiford <rsandifo@nildram.co.uk>
1882
1883 * elfxx-mips.c (mips_elf_initialize_tls_index): When processing a
1884 type (3) single-GOT entry, read tls_type from the hash table entry
1885 rather than the GOT entry.
1886
a9a4c53e
AM
18872007-06-01 Alan Modra <amodra@bigpond.net.au>
1888
1889 * simple.c (bfd_simple_get_relocated_section_contents): Init
1890 input_bfds_tail.
1891
02bf8d82
AM
18922007-05-30 Alan Modra <amodra@bigpond.net.au>
1893
42bb2e33
AM
1894 * elf.c (elf_fake_sections): Adjust test for SHT_NOBITS sections
1895 created by objcopy --only-keep-debug.
1896 (_bfd_elf_init_private_section_data): Only change elf_section_type
1897 if it is SHT_NULL.
1898
02bf8d82
AM
1899 * elf.c (assign_file_positions_for_load_sections): Correct sh_type
1900 to SHT_NOBITS earlier. Base actions in rest of function on sh_type
1901 and sh_flags instead of bfd section flags. Delete voff and code
1902 keeping nobits segments aligned.
1903
4e591bc1
EC
19042007-05-25 Eric Christopher <echristo@apple.com>
1905
1906 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame):
1907 Check that sym_sec isn't NULL before accessing.
1908
37ad9514
SE
19092007-05-24 Steve Ellcey <sje@cup.hp.com>
1910
1911 * Makefile.in: Regnerate.
1912 * configure: Regenerate.
1913 * aclocal.m4: Regenerate.
1914 * doc/Makefile.in: Regenerate.
1915
91a5743d
PB
19162007-05-22 Paul Brook <paul@codesourcery.com>
1917
1918 * elf32-arm.c (output_arch_syminfo): Replace plt_shndx and plt_offset
1919 with sec and sec_shndx.
1920 (elf32_arm_ouput_plt_map_sym): Use them.
1921 (elf32_arm_output_arch_local_syms): Output mapping symbols for
1922 interworking glue.
1923
26079076
PB
19242007-05-18 Paul Brook <paul@codesourcery.com>
1925
1926 * elf32-arm.c (ARM2THUMB_V5_STATIC_GLUE_SIZE): Define.
1927 (a2t1v5_ldr_insn, a2t1v5_ldr_insn): New.
1928 (record_arm_to_thumb_glue): Add v5t non-pic glue.
1929 (elf32_arm_create_thumb_stub): Ditto.
1930
91ac5911
L
19312007-05-16 H.J. Lu <hongjiu.lu@intel.com>
1932 Alan Modra <amodra@bigpond.net.au>
1933
1934 * elflink.c (_bfd_elf_adjust_dynamic_copy): Align dynamic bss
1935 section to the minimum alignment.
1936
027297b7
L
19372007-05-15 H.J. Lu <hongjiu.lu@intel.com>
1938 Alan Modra <amodra@bigpond.net.au>
1939
1940 PR ld/4504
1941 * elf-bfd.h (_bfd_elf_adjust_dynamic_copy): New.
1942 * elflink.c (_bfd_elf_adjust_dynamic_copy): New.
1943
1944 * elf-m10300.c (_bfd_mn10300_elf_adjust_dynamic_symbol): Call
1945 _bfd_elf_adjust_dynamic_copy to adjust for the copy in dynamic
1946 bss section.
1947 * elf32-arm.c (elf32_arm_adjust_dynamic_symbol): Likewise.
1948 * elf32-cris.c (elf_cris_adjust_dynamic_symbol): Likewise.
1949 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
1950 * elf32-i370.c (i370_elf_adjust_dynamic_symbol): Likewise.
1951 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Likewise.
1952 * elf32-m32r.c (m32r_elf_adjust_dynamic_symbol): Likewise.
1953 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Likewise.
1954 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
1955 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1956 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Likewise.
1957 * elf32-vax.c (elf_vax_adjust_dynamic_symbol): Likewise.
1958 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
1959 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
1960 * elf64-sh64.c (sh64_elf64_adjust_dynamic_symbol): Likewise.
1961 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
1962 * elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Likewise.
1963 * elfxx-sparc.c (_bfd_sparc_elf_adjust_dynamic_symbol): Likewise.
1964
5c18022e
RS
19652007-05-15 Richard Sandiford <richard@codesourcery.com>
1966
1967 * elfxx-mips.c (mips_elf_create_local_got_entry): Remove
1968 input_section argument. Create .rela.dyn relocations against
1969 symbol 0 rather than the section symbol.
1970 (mips_elf_local_got_index): Remove input_section argument.
1971 Update call to mips_elf_create_local_got_entry.
1972 (mips_elf_got_page, mips_elf_got16_entry): Likewise.
1973 (mips_elf_calculate_relocation): Update calls to
1974 mips_elf_local_got_index, mips_elf_got16_entry and mips_elf_got_page.
1975
a00a1f35
MS
19762007-05-15 Mark Shinwell <shinwell@codesourcery.com>
1977
1978 * elf32-arm.c (elf32_arm_final_link_relocate): Correctly
1979 handle the Thumb-2 JUMP19 relocation.
1980
0414f35b
AM
19812007-05-15 Alan Modra <amodra@bigpond.net.au>
1982
1983 PR 4479
1984 * elf.c (elf_fake_sections): Don't allow backend to change
1985 SHT_NOBITS if called for strip/objcopy --only-keep-debug.
1986 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove similar
1987 fix from here.
1988
74f2e02b
AM
19892007-05-14 Alan Modra <amodra@bigpond.net.au>
1990
1991 * elf.c (bfd_elf_string_from_elf_section): Return NULL on
1992 invalid shstrndx.
1993 (bfd_elf_get_str_section): Likewise.
1994
f137a54e
AM
19952007-05-12 Alan Modra <amodra@bigpond.net.au>
1996
1997 PR 4497
1998 * elf-eh-frame.c (struct cie): Add "local_personality". Make
1999 "personality" a union.
2000 (cie_eq): Compare local_personality too. Adjust personality
2001 comparison.
2002 (_bfd_elf_discard_section_eh_frame): Check binding on personality
2003 reloc sym to allow for bad symtab. Use stashed local syms rather
2004 than reading personality local sym. Handle discarded sections.
2005
4f4416b5
AM
20062007-05-12 Alan Modra <amodra@bigpond.net.au>
2007
2008 * elf32-spu.c (elf_howto_table): Add howto for R_SPU_ADDR16X.
2009
016687f8
AM
20102007-05-11 Alan Modra <amodra@bigpond.net.au>
2011
2012 * elf32-ppc.h (ppc_elf_select_plt_layout): Update prototype.
2013 (enum ppc_elf_plt_type): Move from..
2014 * elf32-ppc.c: ..here.
2015 (struct ppc_elf_obj_tdata): Add makes_plt_call and has_rel16.
2016 (struct ppc_elf_link_hash_table): Reorder. Add old_bfd. Delete
2017 can_use_new_plt. Make is_vxworks a bitfield.
2018 (ppc_elf_link_hash_table_create): Don't clear is_vxworks (again).
2019 (ppc_elf_check_relocs): Update setting of reloc flags. Set old_bfd.
2020 (ppc_elf_select_plt_layout): Modify parameters. Use bfd reloc
2021 flags to better detect object files needing old bss-style plt.
2022 Allow secure plt to be used without rel16 relocs being detected.
2023 Warn if secure plt request cannot be allowed.
2024
ece5ef60
AM
20252007-05-11 Alan Modra <amodra@bigpond.net.au>
2026
2027 * reloc.c (BFD_RELOC_SPU_PPU32, BFD_RELOC_SPU_PPU64): Define.
2028 * elf-bfd.h (struct elf_backend_data): Change return type of
2029 elf_backend_relocate_section to int.
2030 * elf32-spu.c (elf_howto_table): Add howtos for R_SPU_PPU32 and
2031 R_SPU_PPU64.
2032 (spu_elf_bfd_to_reloc_type): Convert new relocs.
2033 (spu_elf_count_relocs): New function.
2034 (elf_backend_count_relocs): Define.
2035 (spu_elf_relocate_section): Arrange to emit R_SPU_PPU32 and
2036 R_SPU_PPU64 relocs.
2037 * elflink.c (elf_link_input_bfd): Emit relocs if relocate_section
2038 returns 2.
2039 * bfd-in2.h: Regenerate.
2040 * libbfd.h: Regenerate.
2041
d3753b85
RS
20422007-05-10 Richard Sandiford <richard@codesourcery.com>
2043
2044 * elf32-arm.c (elf32_arm_check_relocs): Don't create PLT entries
2045 for R_ARM_ABS12 relocs.
2046 (elf32_arm_finish_dynamic_symbol): Fix the loop that creates
2047 non-shared VxWorks PLT entries.
2048
ef8c95ad
AM
20492007-05-11 Alan Modra <amodra@bigpond.net.au>
2050
2051 PR 4454
2052 * elf-eh-frame.c (struct cie): Make "personality" a bfd_vma.
2053 (_bfd_elf_discard_section_eh_frame): Handle local syms on
2054 personality relocation.
2055
8c252fd9
RS
20562007-05-10 Richard Sandiford <richard@codesourcery.com>
2057
2058 * elf.c (assign_file_positions_for_load_sections): Use p_memsz
2059 rather than p_filesz to calculate the LMA of the end of a segment.
2060
b186458a
JJ
20612007-05-10 Jakub Jelinek <jakub@redhat.com>
2062
2063 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Don't do copyreloc
2064 processing if symbol is defined in the executable.
2065
88571279
AO
20662007-05-10 Alexandre Oliva <aoliva@redhat.com>
2067
2068 * elf32-frv.c (_frvfdpic_check_discarded_relocs): New.
2069 (frvfdpic_elf_discard_info): New.
2070 (elf_backend_discard_info): Define for FDPIC.
2071
2e6030b9
MS
20722007-05-09 Mark Shinwell <shinwell@codesourcery.com>
2073
2074 * elf32-arm.c (bfd_elf32_arm_vfp11_erratum_scan): Don't
2075 attempt to scan if the bfd doesn't correspond to an ELF image.
2076 (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
2077
0d4cc892
AO
20782007-05-08 Alexandre Oliva <aoliva@redhat.com>
2079
2080 * elf32-frv.c (elf32_frv_relocate_section): Discard dynamic relocs
2081 for which _bfd_elf_section_offset returns -1.
2082
d0249648
AM
20832007-05-08 Alan Modra <amodra@bigpond.net.au>
2084
2085 * elf32-spu.c (spu_elf_size_stubs): Use "void *" for psyms.
2086 (mark_functions_via_relocs): Likewise.
2087
1182cb93
AM
20882007-05-07 Alan Modra <amodra@bigpond.net.au>
2089
2090 * elflink.c (bfd_elf_final_link): Correct reloc handling for
2091 elf_backend_count_relocs.
2092 (bfd_elf_discard_info): Print an error if we can't read syms.
2093
b16f296e
AM
20942007-05-07 Alan Modra <amodra@bigpond.net.au>
2095
2096 * elf32-spu.c (spu_elf_reloc_type_lookup): Return NULL on
2097 invalid reloc code.
2098 (spu_elf_gc_mark_hook, spu_elf_section_processing): Delete functions.
2099 (elf_backend_gc_mark_hook, elf_backend_section_processing): Don't
2100 define.
2101
7c928300
AM
21022007-05-07 Alan Modra <amodra@bigpond.net.au>
2103
2104 * elf.c (assign_file_positions_for_load_sections): Don't check
2105 core segment.
2106
fc66a176
L
21072007-05-04 H.J. Lu <hongjiu.lu@intel.com>
2108
2109 * elflink.c (elf_link_sort_relocs): Return if both .rela.dyn
2110 and .rel.dyn aren't present.
2111
3410fea8
NC
21122007-05-04 Nick Clifton <nickc@redhat.com>
2113
2114 * elflink.c (elf_link_sort_relocs): If both .rela.dyn and .rel.dyn
2115 sections are present examine the indirect sections in an attempt
2116 to compute the correct relocation size. If there is any
2117 ambiguity, produce an error and refuse to sort.
2118
7bdca076
SL
21192007-05-03 Sandra Loosemore <sandra@codesourcery.com>
2120
2121 * elf32-arm.c (allocate_dynrelocs): Fix typo in comment.
2122
22184a77
NC
21232007-05-03 Vincent Riviere <vincent.riviere@freesbee.fr>
2124 Nick Clifton <nickc@redhat.com>
2125
2126 PR gas/3041
2127 * aoutx.h (swap_std_reloc_out): Treat relocs against weak symbols
2128 in the same way as relocs against external symbols.
2129
627b32bc
AM
21302007-05-02 Alan Modra <amodra@bigpond.net.au>
2131
2132 * elf.c (assign_file_positions_for_load_sections): Set sh_offset
2133 here. Set sh_type to SHT_NOBITS if we won't be allocating
2134 file space. Don't bump p_memsz for non-alloc sections. Adjust
2135 section-in-segment check.
2136 (assign_file_positions_for_non_load_sections): Don't set sh_offset
2137 here for sections that have already been handled above.
2138
49fa1e15
AM
21392007-04-30 Alan Modra <amodra@bigpond.net.au>
2140
2141 * elf32-spu.c (struct spu_link_hash_table): Add stack_analysis
2142 and emit_stack_syms bitfields.
2143 (get_sym_h): Read all symbols if stack analysis will be done.
2144 (spu_elf_create_sections): Add stack_analysis and emit_stack_syms
2145 params, and stash in hash table.
2146 (is_hint): Split off from..
2147 (is_branch): ..here. Adjust callers.
2148 (spu_elf_size_stubs): Add stack_analysis param. Arrange to read
2149 and keep all syms.
2150 (write_one_stub): Fix mem leak.
2151 (find_function_stack_adjust): New function.
2152 (sort_syms_syms, sort_syms_psecs): New vars.
2153 (sort_syms): New function.
2154 (struct call_info, struct function_info): New.
2155 (struct spu_elf_stack_info): New.
2156 (alloc_stack_info, maybe_insert_function, func_name): New functions.
2157 (is_nop, insns_at_end, check_function_ranges): Likewise.
2158 (find_function, insert_callee, mark_functions_via_relocs): Likewise.
2159 (pasted_function, interesting_section, discover_functions): Likewise.
2160 (mark_non_root, call_graph_traverse, build_call_tree): Likewise.
2161 (sum_stack, spu_elf_stack_analysis, spu_elf_final_link): Likewise.
2162 (bfd_elf32_bfd_final_link): Define.
2163 * elf32-spu.h (struct _spu_elf_section_data): Add stack_info field.
2164 (spu_elf_create_sections, spu_elf_size_stubs): Update prototypes.
2165
9ddf8309
TS
21662007-04-28 Sergey Rogozhkin <rogozhkin@niisi.msk.ru>
2167
2168 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Don't access
2169 memory which we might not own.
2170
95147441
BW
21712007-04-27 Bob Wilson <bob.wilson@acm.org>
2172
2173 * elf32-xtensa.c (elf_xtensa_make_sym_local): Restore deleted function.
2174 (elf_xtensa_hide_symbol, elf_backend_hide_symbol): Likewise.
2175 (elf_xtensa_allocate_dynrelocs): Use elf_xtensa_make_sym_local.
2176
bcc2cc8e
BW
21772007-04-27 Bob Wilson <bob.wilson@acm.org>
2178
2179 * elf32-xtensa.c (xtensa_read_table_entries): Step through table
2180 contents and relocs in parallel.
4e591bc1 2181
f29f96b6
BW
21822007-04-27 Bob Wilson <bob.wilson@acm.org>
2183
2184 * elf32-xtensa.c (relax_property_section): Remove extra irel increment.
2185
2ce18a16
AM
21862007-04-27 Alan Modra <amodra@bigpond.net.au>
2187
2188 * cpu-rs6000.c: Write Mimi's name in ASCII.
2189 * coff-rs6000.c: Likewise.
2190 * rs6000-core.c: Likewise.
2191
eddc20ad
AM
21922007-04-27 Alan Modra <amodra@bigpond.net.au>
2193
2194 * sysdep.h: Include config.h first.
2195 Many files: Include sysdep.h before bfd.h.
2196 * Makefile.am: Run "make dep-am".
2197 * Makefile.in: Regenerate.
2198
495443d4
AM
21992007-04-25 Alan Modra <amodra@bigpond.net.au>
2200
2201 * sysdep.h: Revert last change.
2202
40b1c6c5
NC
22032007-04-24 Nick Clifton <nickc@redhat.com>
2204
2205 * coffcode.h (coff_slurp_reloc_table): Initialise dst.r_offset.
2206 * coff-m68k.c (m68kcoff_rtype_to_howto): Initialize relent.howto.
2207
64be1553
AM
22082007-04-24 Alan Modra <amodra@bigpond.net.au>
2209
2210 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Warn if
2211 eh_frame_hdr table won't be created.
2212
d5efd9fc
AM
22132007-04-24 Alan Modra <amodra@bigpond.net.au>
2214
2215 * acinclude.m4: Include config/stdint.m4.
2216 * configure.in: Invoke GCC_HEADER_STDINT.
2217 * sysdep.h: Don't include ansidecl.h here.
2218 * configure: Regenerate.
2219 * config.in: Regenerate.
2220 * Makefile.in: Regenerate.
2221
9a2e615a
NS
22222007-04-23 Nathan Sidwell <nathan@codesourcery.com>
2223
2224 * archures.c (bfd_mach_mcf_isa_c, bfd_mach_mcf_isa_c_mac,
2225 bfd_mach_mcf_isa_c_emac): New.
2226 * elf32-m68k.c (ISAC_PLT_ENTRY_SIZE, elf_isac_plt0_entry,
2227 elf_isac_plt_entry, elf_isac_plt_info): New.
2228 (elf32_m68k_object_p): Add ISA_C.
2229 (elf32_m68k_print_private_bfd_data): Print ISA_C.
2230 (elf32_m68k_get_plt_info): Detect ISA_C.
2231 * cpu-m68k.c (arch_info): Add ISAC.
2232 (m68k_arch_features): Likewise,
2233 (bfd_m68k_compatible): ISAs B & C are not compatible.
2234
1b0b5b1b
NC
22352007-04-21 Nick Clifton <nickc@redhat.com>
2236
2237 * ecoff.c (_bfd_ecoff_write_armap): Initialise rehash.
2238 (ecoff_link_add_archive_symbols): Likewise.
2239 * coff-m68k.c (m68kcoff_common_addend_rtype_to_howto): Initialise
2240 relent.howto.
2241 * ieee.c (parse_int): Initialise x.
2242 (must_parse_int): Initialise result.
2243 (ieee_slurp_external_symbols): Initialise value.
2244
bd7803a9
AM
22452007-04-21 Alan Modra <amodra@bigpond.net.au>
2246
2247 * config.bfd (spu-*-elf): Delete targ_selvecs.
2248
964597d0
NC
22492007-04-19 Nick Clifton <nickc@redhat.com>
2250
2251 * coffcode.h (coff_rtype_to_howto): Initialise genrel.howto.
2252
01e76792
AM
22532007-04-19 Alan Modra <amodra@bigpond.net.au>
2254
2255 * bfd.c (bfd_demangle): New function.
2256 * Makefile.am: Run "make dep-am".
2257 * Makefile.in: Regenerate.
2258 * bfd-in2.h: Regenerate.
2259
ee5c21a0
DJ
22602007-04-18 Matthias Klose <doko@ubuntu.com>
2261
2262 * Makefile.am (libbfd_la_LDFLAGS): Use bfd soversion.
2263 (bfdver.h): Use the date in non-release builds for the soversion.
2264 * Makefile.in: Regenerate.
2265
fcb93ecf
PB
22662007-04-17 Paul Brook <paul@codesourcery.com>
2267
2268 * elf.c (_bfd_elf_is_function_type): New function.
2269 * elflink.c (_bfd_elf_merge_symbol): Use bed->is_function_type.
2270 (_bfd_elf_dynamic_symbol_p, _bfd_elf_symbol_refs_local_p,
2271 is_global_data_symbol_definition, elf_link_add_object_symbols): Ditto.
2272 * elf-bfd.h (elf_backend_data): Add is_function_type.
2273 (_bfd_elf_is_function_type): Add prototype.
2274 * elfxx-target.h (elf_backend_is_function_type): Add default
2275 definition.
2276 (elfNN_bed): Add elf_backend_is_function_type.
2277 * elf32-arm.c (elf32_arm_is_function_type): New function.
2278 (elf_backend_is_function_type): Define.
2279
5750dcec
DJ
22802007-04-17 Daniel Jacobowitz <dan@codesourcery.com>
2281
2282 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Put
2283 DT_MIPS_RLD_MAP before DT_DEBUG again.
2284
cfbc9945
SE
22852007-04-14 Steve Ellcey <sje@cup.hp.com>
2286
2287 * Makefile.am: Add ACLOCAL_AMFLAGS.
2288 * configure.in: Change macro call order.
2289 * Makefile.in: Regnerate.
2290 * doc/Makefile.in: Regenerate.
2291 * configure: Regenerate.
2292
3fcd97f1
JJ
22932007-04-14 Jakub Jelinek <jakub@redhat.com>
2294
2295 * elflink.c (bfd_elf_final_link): Don't free symbuf for
2296 non-elf input bfds.
2297 (bfd_elf_size_dynamic_sections): Don't access elf_section_data
2298 for non-elf input bfds.
2299
af5978fb
RS
23002007-04-12 Richard Sandiford <richard@codesourcery.com>
2301
2302 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
2303 DT_MIPS_RTLD_MAP for PIEs.
2304
9e3313ae
RS
23052007-04-12 Richard Sandiford <richard@codesourcery.com>
2306
2307 * elfxx-mips.c (mips_elf_calculate_relocation): Set DT_TEXTREL
2308 when creating a __GOTT_BASE__ or __GOTT_INDEX__ relocation
2309 in a read-only section.
2310 (_bfd_mips_elf_check_relocs): Likewise.
2311
1d25768e
BW
23122007-04-12 Bob Wilson <bob.wilson@acm.org>
2313
2314 * elf32-xtensa.c (xtensa_is_insntable_section): New.
2315 (xtensa_is_proptable_section): New.
2316 (elf_xtensa_discard_info_for_section): Handle "full" .xt.prop property
2317 tables with 12-byte entries, as well as tables with 8-byte entries.
2318 Sort the relocations before examining them.
2319 (relax_property_section): Use xtensa_is_proptable_section and
2320 xtensa_is_littable_section. Rewrite code for combining table entries
2321 to be more robust in case of unexpected relocations. Do not set offset
2322 of unused relocations to less than zero.
2323 (xtensa_is_property_section): Use other functions instead of
2324 duplicating section name comparisons.
2325 (xtensa_is_littable_section): Use CONST_STRNEQ for ".gnu.linkonce.p.".
2326 (xtensa_get_property_predef_flags): Use xtensa_is_insntable_section.
4e591bc1 2327
e1e5c0b5 23282007-04-12 Bob Wilson <bob.wilson@acm.org>
4e591bc1 2329
e1e5c0b5
BW
2330 * elf32-xtensa.c (elf_xtensa_gc_mark_hook): Don't follow references
2331 from Xtensa property sections.
4e591bc1 2332
2c67c5f3
AM
23332007-04-12 Alan Modra <amodra@bigpond.net.au>
2334
2335 * elf32-spu.c (needs_ovl_stub): Test that spu_elf_section_data
2336 is non-NULL before dereferencing.
2337
8776bb8a
NS
23382007-04-11 Nathan Sidwell <nathan@codesourcery.com>
2339
2340 * elf-vxworks.c (elf_vxworks_emit_relocs): Remap weakdef PLT slot
2341 relocs too.
2342
4a828aab
RH
23432007-04-10 Richard Henderson <rth@redhat.com>
2344
2345 * elf64-alpha.c (struct alpha_elf_link_hash_table): Add relax_trip.
2346 (elf64_alpha_size_got_sections): Remove unused something_changed local.
2347 (elf64_alpha_size_plt_section): Return void.
2348 (elf64_alpha_size_rela_got_section): Likewise.
4e591bc1 2349 (elf64_alpha_relax_section): Only regenerate got+plt if the
4a828aab
RH
2350 relax_trip counter has changed.
2351
91506736
DJ
23522007-04-09 Daniel Jacobowitz <dan@codesourcery.com>
2353
2354 * Makefile.am (bfdver.h): Do not generate doc/bfdver.texi.
2355 * doc/Makefile.am (DOCFILES): Add bfdver.texi.
2356 (bfdver.texi): New rule.
2357 * Makefile.in, doc/Makefile.in: Regenerated.
2358
da6bcfca
MT
23592007-04-03 Matt Thomas <matt@netbsd.org>
2360
4e591bc1 2361 * elf32-vax.c (elf_vax_relocate_section): Do not emit a PCREL reloc
da6bcfca
MT
2362 in a shared object if it is not in a CODE section or if it is against
2363 a section symbol. This allows DWARF2 to use pcrel format.
2364
9267588c
L
23652007-04-05 H.J. Lu <hongjiu.lu@intel.com>
2366
2367 PR ld/4304
2368 * elflink.c (bfd_elf_final_link): Call einfo callback in
2369 bfd_link_info instead of _bfd_error_handler for DT_TEXTREL
2370 warning.
2371
c1b2796f
AM
23722007-04-05 Alan Modra <amodra@bigpond.net.au>
2373
2374 * elf32-spu.c (spu_elf_output_symbol_hook): New function.
2375 (elf_backend_link_output_symbol_hook): Define.
2376
970ccc77
NC
23772007-04-02 Nick Clifton <nickc@redhat.com>
2378
2379 PR binutils/4292
2380 * bfd.c (bfd_fprintf_vma): Do not print addresses of 32-bit
2381 targets as 64-bit values, even if running on a 64-bit host.
2382 * coffgen.c (coff_print_symbol): Likewise.
2383
1783205a
NC
23842007-03-29 Nick Clifton <nickc@redhat.com>
2385
2386 PR binutils/4110
2387 * elf.c (IS_VALID_GROUP_SECTION_HEADER): New macro.
2388 (setup_group): Use it. Report corrupt group section headers.
2389 (bfd_section_from_shdr): Use new macro. Replace constant 4 with
2390 GRP_ENTRY_SIZE. Cope with NULLs in the group section table.
2391 (elf_fake_section): Replace constant 4 with GRP_ENTRY_SIZE.
2392
2ce859a1
AM
23932007-03-29 Alan Modra <amodra@bigpond.net.au>
2394
2395 PR ld/4267
947844a3
AM
2396 * elflink.c (evaluate_complex_relocation_symbols): Use bfd_vma
2397 for rel->r_info values.
2398 (bfd_elf_perform_complex_relocation): Likewise.
2ce859a1
AM
2399 * elf32-ppc.c (allocate_dynrelocs): Set plt.offset to -1 for
2400 unused entries. Don't clear plt.plist in loop.
2401
39817122
RS
24022007-03-28 Richard Sandiford <richard@codesourcery.com>
2403
2404 * elfxx-sparc.h (_bfd_sparc_elf_link_hash_table): Remove append_rela.
2405 * elfxx-sparc.c (sparc_elf_append_rela_64, sparc_elf_append_rela_32):
2406 Merge into...
2407 (sparc_elf_append_rela): ...this new function.
2408 (SPARC_ELF_APPEND_RELA): Delete.
2409 (_bfd_sparc_elf_link_hash_table_create): Don't initialize
2410 the deleted append_rela field.
2411 (_bfd_sparc_elf_relocate_section): Use sparc_elf_append_rela
2412 instead of SPARC_ELF_APPEND_RELA.
2413 (_bfd_sparc_elf_finish_dynamic_symbol): Likewise. Use the
2414 elf_size_info structure to find the size of a RELA entry and
2415 the associated swap-out function.
2416 (sparc64_finish_dyn, sparc64_finish_dyn): Merge into...
2417 (sparc_finish_dyn): ...this new function.
2418 (_bfd_sparc_elf_finish_dynamic_sections): Update calls accordingly.
2419
4ecceb71
RS
24202007-03-28 Richard Sandiford <richard@codesourcery.com>
2421 Phil Edwards <phil@codesourcery.com>
2422
2423 * doc/bfd.texinfo: Put the contents after the title page rather
2424 than at the end of the document.
2425
d4d2b80b
AS
24262007-03-27 Andreas Schwab <schwab@suse.de>
2427
2428 * elfxx-ia64.c (elf_backend_default_execstack): Define to 0.
2429
831480e9 24302007-03-26 H.J. Lu <hongjiu.lu@intel.com>
5bd8253d
L
2431
2432 * configure: Regenerated.
2433
f4b39977
AM
24342007-03-26 Alan Modra <amodra@bigpond.net.au>
2435
2436 * elf32-spu.c (struct stubarr): Add stub_hash_table and err fields.
2437 (allocate_spuear_stubs): New function.
2438 (spu_elf_size_stubs): Call allocate_spuear_stubs.
2439
157090f7
AM
24402007-03-26 Alan Modra <amodra@bigpond.net.au>
2441
2442 * aout-adobe.c (aout_32_bfd_reloc_name_lookup): Define.
2443 * aout-arm.c (MY_bfd_reloc_name_lookup): Define.
2444 (MY (bfd_reloc_name_lookup)): New function.
2445 * aout-ns32k.c (MY (bfd_reloc_name_lookup)): New function.
2446 * aout-target.h (NAME (aout, reloc_name_lookup)): Declare.
2447 (MY_bfd_reloc_name_lookup): Define.
2448 * aout-tic30.c (tic30_aout_reloc_name_lookup): New function.
2449 (MY_bfd_reloc_name_lookup): Define.
2450 * aoutx.h (NAME (aout, reloc_type_lookup)): Don't declare.
2451 (NAME (aout, reloc_name_lookup)): New function.
2452 * bout.c (b_out_bfd_reloc_name_lookup): New function.
2453 * coff-alpha.c (alpha_bfd_reloc_name_lookup): New function.
2454 (_bfd_ecoff_bfd_reloc_name_lookup): Define.
2455 * coff-arm.c (coff_arm_reloc_name_lookup): New function.
2456 (coff_bfd_reloc_name_lookup): Define.
2457 * coff-i386.c (coff_bfd_reloc_name_lookup): Define.
2458 (coff_i386_reloc_name_lookup): New function.
2459 * coff-i860.c (coff_i860_reloc_name_lookup): New function.
2460 (coff_bfd_reloc_name_lookup): Define.
2461 * coff-i960.c (coff_i960_reloc_name_lookup): New function.
2462 (coff_bfd_reloc_name_lookup): Define.
2463 * coff-m68k.c (m68k_reloc_name_lookup): New function.
2464 (coff_bfd_reloc_name_lookup): Define.
2465 * coff-maxq.c (maxq_reloc_name_lookup): New function.
2466 (coff_bfd_reloc_name_lookup): Define.
2467 * coff-mcore.c (mcore_coff_reloc_name_lookup): New function.
2468 (coff_bfd_reloc_name_lookup): Define.
2469 * coff-mips.c (mips_bfd_reloc_name_lookup): New function.
2470 (_bfd_ecoff_bfd_reloc_name_lookup): Define.
2471 * coff-ppc.c (ppc_coff_reloc_name_lookup): New function.
2472 (coff_bfd_reloc_name_lookup): Define.
2473 * coff-rs6000.c (coff_bfd_reloc_name_lookup): Define.
2474 (_bfd_xcoff_reloc_name_lookup): New function.
2475 (rs6000coff_vec, pmac_xcoff_vec): Init new field.
2476 * coff-sh.c (coff_bfd_reloc_name_lookup): Define.
2477 (sh_coff_reloc_name_lookup): New function.
2478 * coff-sparc.c (coff_sparc_reloc_name_lookup): New function.
2479 (coff_bfd_reloc_name_lookup): Define.
2480 * coff-tic30.c (coff_bfd_reloc_name_lookup): Define.
2481 (tic30_coff_reloc_name_lookup): New function.
2482 * coff-tic4x.c (coff_bfd_reloc_name_lookup): Define.
2483 (tic4x_coff_reloc_name_lookup): New function.
2484 * coff-tic54x.c (coff_bfd_reloc_name_lookup): Define.
2485 (tic54x_coff_reloc_name_lookup): New function.
2486 * coff-x86_64.c (coff_bfd_reloc_name_lookup): Define.
2487 (coff_amd64_reloc_name_lookup): New function.
2488 * coff-z80.c (coff_z80_reloc_name_lookup): New function.
2489 (coff_bfd_reloc_name_lookup): Define.
2490 * coff-z8k.c (coff_z8k_reloc_name_lookup): New function.
2491 (coff_bfd_reloc_name_lookup): Define.
2492 * coff64-rs6000.c (coff_bfd_reloc_name_lookup): Define.
2493 (xcoff64_reloc_name_lookup): New function.
2494 (rs6000coff64_vec, aix5coff64_vec): Init new field.
2495 * coffcode.h (coff_bfd_reloc_name_lookup): Define.
2496 * elf-hppa.h (elf_hppa_reloc_name_lookup): New function.
2497 * elf-m10200.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2498 * elf-m10300.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2499 * elf32-arc.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2500 * elf32-arm.c (elf32_arm_reloc_name_lookup): New function.
2501 (bfd_elf32_bfd_reloc_name_lookup): Define.
2502 * elf32-avr.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2503 * elf32-bfin.c (bfin_bfd_reloc_name_lookup): New function.
2504 (bfd_elf32_bfd_reloc_name_lookup): Define.
2505 * elf32-cr16c.c (elf_cr16c_reloc_name_lookup): New function.
2506 (bfd_elf32_bfd_reloc_name_lookup): Define.
2507 * elf32-cris.c (cris_reloc_name_lookup): New function.
2508 (bfd_elf32_bfd_reloc_name_lookup): Define.
2509 * elf32-crx.c (elf_crx_reloc_name_lookup): New function.
2510 (bfd_elf32_bfd_reloc_name_lookup): Define.
2511 * elf32-d10v.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2512 * elf32-d30v.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2513 * elf32-dlx.c (elf32_dlx_reloc_name_lookup): New function.
2514 (bfd_elf32_bfd_reloc_name_lookup): Define.
2515 * elf32-fr30.c (fr30_reloc_name_lookup): New function.
2516 (bfd_elf32_bfd_reloc_name_lookup): Define.
2517 * elf32-frv.c (frv_reloc_name_lookup): New function.
2518 (bfd_elf32_bfd_reloc_name_lookup): Define.
2519 * elf32-gen.c (bfd_elf32_bfd_reloc_name_lookup): Define.
2520 * elf32-h8300.c (elf32_h8_reloc_name_lookup): New function.
2521 (bfd_elf32_bfd_reloc_name_lookup): Define.
2522 * elf32-hppa.c (bfd_elf32_bfd_reloc_name_lookup): Define.
2523 * elf32-i370.c (i370_elf_reloc_name_lookup): New function.
2524 (bfd_elf32_bfd_reloc_name_lookup): Define.
2525 * elf32-i386.c (elf_i386_reloc_name_lookup): New function.
2526 (bfd_elf32_bfd_reloc_name_lookup): Define.
2527 * elf32-i860.c (elf32_i860_reloc_name_lookup): New function.
2528 (bfd_elf32_bfd_reloc_name_lookup): Define.
2529 * elf32-i960.c (elf32_i960_reloc_name_lookup): New function.
2530 (bfd_elf32_bfd_reloc_name_lookup): Define.
2531 * elf32-ip2k.c (ip2k_reloc_name_lookup): New function.
2532 (bfd_elf32_bfd_reloc_name_lookup): Define.
2533 * elf32-iq2000.c (iq2000_reloc_name_lookup): New function.
2534 (bfd_elf32_bfd_reloc_name_lookup): Define.
2535 * elf32-m32c.c (m32c_reloc_name_lookup): New function.
2536 (bfd_elf32_bfd_reloc_name_lookup): Define.
2537 * elf32-m32r.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2538 * elf32-m68hc11.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2539 * elf32-m68hc12.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2540 * elf32-m68k.c (reloc_name_lookup): New function.
2541 (bfd_elf32_bfd_reloc_name_lookup): Define.
2542 * elf32-m88k.c (bfd_elf32_bfd_reloc_name_lookup): Define.
2543 * elf32-mcore.c (mcore_elf_reloc_name_lookup): New function.
2544 (bfd_elf32_bfd_reloc_name_lookup): Define.
2545 * elf32-mep.c (mep_reloc_name_lookup): New function.
2546 (bfd_elf32_bfd_reloc_name_lookup): Define.
2547 * elf32-mips.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2548 (mips_vxworks_bfd_reloc_name_lookup): Likewise.
2549 (bfd_elf32_bfd_reloc_name_lookup): Define.
2550 * elf32-msp430.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2551 * elf32-mt.c (mt_reloc_name_lookup): New function.
2552 (bfd_elf32_bfd_reloc_name_lookup): Define.
2553 * elf32-openrisc.c (openrisc_reloc_name_lookup): New function.
2554 (bfd_elf32_bfd_reloc_name_lookup): Define.
2555 * elf32-or32.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2556 * elf32-pj.c (pj_elf_reloc_name_lookup): New function.
2557 (bfd_elf32_bfd_reloc_name_lookup): Define.
2558 * elf32-ppc.c (ppc_elf_reloc_name_lookup): New function.
2559 (bfd_elf32_bfd_reloc_name_lookup): Define.
2560 * elf32-s390.c (elf_s390_reloc_name_lookup): New function.
2561 (bfd_elf32_bfd_reloc_name_lookup): Define.
2562 * elf32-score.c (elf32_score_reloc_name_lookup): New function.
2563 (bfd_elf32_bfd_reloc_name_lookup): Define.
2564 * elf32-sh.c (sh_elf_reloc_name_lookup): New function.
2565 (bfd_elf32_bfd_reloc_name_lookup): Define.
2566 * elf32-sparc.c (bfd_elf32_bfd_reloc_name_lookup): Define.
2567 * elf32-spu.c (spu_elf_reloc_name_lookup): New function.
2568 (bfd_elf32_bfd_reloc_name_lookup): Define.
2569 * elf32-v850.c (v850_elf_reloc_name_lookup): New function.
2570 (bfd_elf32_bfd_reloc_name_lookup): Define.
2571 * elf32-vax.c (reloc_name_lookup): New function.
2572 (bfd_elf32_bfd_reloc_name_lookup): Define.
2573 * elf32-xc16x.c (xc16x_reloc_name_lookup): New function.
2574 (bfd_elf32_bfd_reloc_name_lookup): Define.
2575 * elf32-xstormy16.c (xstormy16_reloc_name_lookup): New function.
2576 (bfd_elf32_bfd_reloc_name_lookup): Define.
2577 * elf32-xtensa.c (elf_xtensa_reloc_name_lookup): New function.
2578 (bfd_elf32_bfd_reloc_name_lookup): Define.
2579 * elf64-alpha.c (elf64_alpha_bfd_reloc_name_lookup): New function.
2580 (bfd_elf64_bfd_reloc_name_lookup): Define.
2581 * elf64-gen.c (bfd_elf64_bfd_reloc_name_lookup): Define.
2582 * elf64-hppa.c (bfd_elf64_bfd_reloc_name_lookup): Define.
2583 * elf64-mips.c (bfd_elf64_bfd_reloc_name_lookup): New function.
2584 * elf64-mmix.c (bfd_elf64_bfd_reloc_name_lookup): New function.
2585 * elf64-ppc.c (ppc64_elf_reloc_name_lookup): New function.
2586 (bfd_elf64_bfd_reloc_name_lookup): Define.
2587 * elf64-s390.c (elf_s390_reloc_name_lookup): New function.
2588 (bfd_elf64_bfd_reloc_name_lookup): Define.
2589 * elf64-sh64.c (sh_elf64_reloc_name_lookup): New function.
2590 (bfd_elf64_bfd_reloc_name_lookup): Define.
2591 * elf64-sparc.c (bfd_elf64_bfd_reloc_name_lookup): Define.
2592 * elf64-x86-64.c (elf64_x86_64_reloc_name_lookup): New function.
2593 (bfd_elf64_bfd_reloc_name_lookup): Define.
2594 * elfn32-mips.c (bfd_elf32_bfd_reloc_name_lookup): New function.
2595 * elfxx-ia64.c (elfNN_ia64_reloc_name_lookup): New function.
2596 (bfd_elfNN_bfd_reloc_name_lookup): Define.
2597 * elfxx-sparc.c (_bfd_sparc_elf_reloc_name_lookup): New function.
2598 * elfxx-sparc.h (_bfd_sparc_elf_reloc_name_lookup): Declare.
2599 * i386msdos.c (msdos_bfd_reloc_name_lookup): Define.
2600 * i386os9k.c (aout_32_bfd_reloc_name_lookup): Define.
2601 * ieee.c (ieee_bfd_reloc_name_lookup): Define.
2602 * libaout.h (NAME (aout, reloc_name_lookup)): Declare.
2603 * libbfd-in.h (_bfd_norelocs_bfd_reloc_name_lookup): Declare.
2604 * mipsbsd.c (MY_bfd_reloc_name_lookup): Define.
2605 (MY(reloc_type_lookup)): Rename from MY(reloc_howto_type_lookup).
2606 (MY(reloc_name_lookup)): New function.
2607 * nlm-target.h (nlm_bfd_reloc_name_lookup): Define.
2608 * oasys.c (oasys_bfd_reloc_name_lookup): Define.
2609 * pdp11.c (NAME (aout, reloc_name_lookup)): New function.
2610 * pe-mips.c (coff_mips_reloc_name_lookup): New function.
2611 (coff_bfd_reloc_name_lookup): Define.
2612 * reloc.c (bfd_reloc_name_lookup): New function.
2613 * riscix.c (riscix_reloc_name_lookup): New function.
2614 (MY_bfd_reloc_name_lookup): Define.
2615 * som.c (som_bfd_reloc_name_lookup): New function.
2616 * targets.c (struct bfd_target): Add reloc_name_lookup.
2617 (BFD_JUMP_TABLE_RELOCS): Add NAME##_bfd_reloc_name_lookup.
2618 * versados.c (versados_bfd_reloc_name_lookup): Define.
2619 * vms.c (vms_bfd_reloc_name_lookup): New function.
2620 * bfd-in2.h: Regenerate.
2621 * libbfd.h: Regenerate.
2622
2d82d84d
TS
26232007-03-26 Thiemo Seufer <ths@mips.com>
2624
a5cb1fd7 2625 PR ld/4208
2d82d84d
TS
2626 * elfxx-mips.c (mips_elf_next_relocation): Don't signal an error if no
2627 matching relocation is found.
2628 (_bfd_mips_elf_relocate_section): Only warn about missing relocations.
2629
831480e9 26302007-03-23 H.J. Lu <hongjiu.lu@intel.com>
1a27db7d
L
2631
2632 * configure: Regenerated.
2633
a1ac8190
JM
26342007-03-23 Joseph Myers <joseph@codesourcery.com>
2635
2636 * configure.in: Use ACX_PKGVERSION and ACX_BUGURL.
2637 * configure: Regenerate.
2638
aa7a0635
AM
26392007-03-23 Alan Modra <amodra@bigpond.net.au>
2640
2641 * elf32-spu.c (spu_stub_name): Don't put input section in stub name.
2642 Remove input_sec param. Adjust all calls.
2643 (write_one_stub): Adjust stub symbol.
2644 (needs_ovl_stub): New function, extracted from..
2645 (spu_elf_size_stubs): ..here.
2646 (spu_elf_relocate_section): Use needs_ovl_stub.
2647
e49e529d
JM
26482007-03-22 Joseph Myers <joseph@codesourcery.com>
2649
2650 * Makefile.am (bfdver.h): Only set VERSION_PACKAGE in bfdver.texi
2651 if nonempty.
2652 * configure.in (REPORT_BUGS_TO): Do not use "URL:" prefix.
2653 * Makefile.in, configure, doc/Makefile.in: Regenerate.
2654
831480e9 26552007-03-22 H.J. Lu <hongjiu.lu@intel.com>
50572669
L
2656
2657 PR ld/4210
2658 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the virtual
2659 address and virtual size of the last section for the image
2660 size.
2661
0920dee7
L
26622007-03-22 H.J. Lu <hongjiu.lu@intel.com>
2663
2664 PR ld/4007
2665 * elf.c (assign_file_positions_for_load_sections): Check if
2666 all sections are in the segment.
2667
831480e9 26682007-03-20 H.J. Lu <hongjiu.lu@intel.com>
749b8d9d
L
2669
2670 PR ld/4208
2671 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Report missing
2672 matching LO16 relocation for HI16 relocation.
2673
27e55c4d
PB
26742007-03-20 Paul Brook <paul@codesourcery.com>
2675
2676 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2677 * bfd-in2.h: Regenerate.
2678 * elf32-arm.c (elf32_arm_link_hash_table): Add pic_veneer.
2679 (record_arm_to_thumb_glue): Use globals->pic_veneer.
2680 (elf32_arm_create_thumb_stub): Ditto.
2681 (bfd_elf32_arm_set_target_relocs): Set globals->pic_veneer.
2682
bf21ed78
MS
26832007-03-18 Mark Shinwell <shinwell@codesourcery.com>
2684
2685 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add "bfd *"
2686 argument and extra last argument.
2687 * bfd-in2.h: Regenerate.
2688 * elf32-arm.c (elf32_arm_obj_tdata): Add no_enum_size_warning
2689 member.
2690 (bfd_elf32_arm_set_target_relocs): Add "bfd *" argument and
2691 extra last argument. Set no_enum_size_warning appropriately.
2692 (elf32_arm_merge_eabi_attributes): Improve enum sizes
2693 diagnostic, suppressing it when no_enum_size_warning dictates.
2694
5f6999aa
NC
26952007-03-20 Nick Clifton <nickc@redhat.com>
2696
2697 PR binutils/3535
2698 * elf.c (copy_private_bfd_data): Widen the scope of Solaris
2699 specific conditions that need the program headers to be
2700 rewritten.
2701
831480e9 27022007-03-19 H.J. Lu <hongjiu.lu@intel.com>
d13c9dc6
L
2703
2704 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Store Magic,
2705 MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
2706 SizeOfInitializedData, SizeOfUninitializedData,
2707 AddressOfEntryPoint, BaseOfCode and BaseOfData in internal
2708 extra PE a.out header.
2709 (IMAGE_NT_OPTIONAL_HDR_MAGIC): Defined as 0x10b if not defined.
2710 (IMAGE_NT_OPTIONAL_HDR64_MAGIC): Defined as 0x20b if not
2711 defined.
2712 (IMAGE_NT_OPTIONAL_HDRROM_MAGIC): Defined as 0x107 if not
2713 defined.
2714 (_bfd_XX_print_private_bfd_data_common): Also print Magic,
2715 MajorLinkerVersion, MinorLinkerVersion, SizeOfCode,
2716 SizeOfInitializedData, SizeOfUninitializedData,
2717 AddressOfEntryPoint, BaseOfCode and BaseOfData from internal
2718 extra PE a.out header.
2719
831480e9 27202007-03-18 H.J. Lu <hongjiu.lu@intel.com>
739bb57e
L
2721
2722 * targets.c (_bfd_target_vector): Add bfd_efi_app_x86_64_vec
2723 only if BFD64 is defined.
2724
5384511f
AM
27252007-03-17 Alan Modra <amodra@bigpond.net.au>
2726
2727 * elf32-spu.c (spu_elf_size_stubs): Always use an overlay stub
2728 on setjmp calls.
2729
187b3d5d
L
27302007-03-15 H.J. Lu <hongjiu.lu@intel.com>
2731
2732 * doc/Makefile.in: Regenerated.
2733
c428fa83
L
27342007-03-15 H.J. Lu <hongjiu.lu@intel.com>
2735
2736 * Makefile.am (bfdver.h): Substitute report_bugs_to. Also
2737 create doc/bfdver.texi.
2738 * Makefile.in: Regenerated.
2739
2740 * configure.in (--with-bugurl): New option.
2741 * configure: Regenerated.
2742
2743 * version.h (REPORT_BUGS_TO): New.
2744
d1036acb
L
27452007-03-13 H.J. Lu <hongjiu.lu@intel.com>
2746
2747 PR binutils/3826
2748 * elf-bfd.h (elf_backend_data): Add elf_osabi.
2749 (_bfd_elf_set_osabi): New.
2750
2751 * elf.c (_bfd_elf_set_osabi): New.
2752
2753 * elf32-hppa.c (elf32_hppa_post_process_headers): Removed.
2754 (elf_backend_post_process_headers): Defined with
2755 _bfd_elf_set_osabi.
2756 (ELF_OSABI): Properly defined for each target.
2757
2758 * elf32-i370.c (i370_elf_post_process_headers): Removed.
2759 (ELF_OSABI): Defined.
2760 (elf_backend_post_process_headers): Defined with
2761 _bfd_elf_set_osabi.
2762
2763 * elf32-i386.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
2764 freebsd.
2765 (elf_i386_post_process_headers): Set EI_OSABI with elf_osabi.
2766
2767 * elf32-msp430.c (elf32_msp430_post_process_headers): Removed.
2768 (ELF_OSABI): Defined.
2769 (elf_backend_post_process_headers): Defined with
2770 _bfd_elf_set_osabi.
2771
2772 * elf64-alpha.c (ELF_OSABI): Defined to ELFOSABI_FREEBSD for
2773 freebsd.
2774 (elf64_alpha_fbsd_post_process_headers): Set EI_OSABI with
2775 elf_osabi.
2776
2777 * elf64-hppa.c (elf64_hppa_post_process_headers): Set EI_OSABI
2778 with elf_osabi.
2779 (ELF_OSABI): Properly defined for each target.
2780 (elf_backend_post_process_headers): Defined with
2781 _bfd_elf_set_osabi for Linux.
2782
2783 * elf64-sparc.c (elf64_sparc_fbsd_post_process_headers): Removed.
2784 (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
2785 (elf_backend_post_process_headers): Defined with
2786 _bfd_elf_set_osabi.
2787
2788 * elf64-x86-64.c (elf64_x86_64_fbsd_post_process_headers): Removed.
2789 (ELF_OSABI): Defined to ELFOSABI_FREEBSD for freebsd.
2790 (elf_backend_post_process_headers): Defined with
2791 _bfd_elf_set_osabi.
2792
2793 * elfcode.h (elf_object_p): Match the ELFOSABI_NONE ELF target
2794 with any ELF target of the compatible machine for which we do not
2795 have a specific backend.
2796
2797 * elfxx-ia64.c (elfNN_hpux_post_process_headers): Set EI_OSABI
2798 with elf_osabi.
2799
2800 * elfxx-target.h (ELF_OSABI): Default to ELFOSABI_NONE.
2801 (elfNN_bed): Initialize elf_osabi with ELF_OSABI.
2802
d4c87fc1
AM
28032007-03-08 Alan Modra <amodra@bigpond.net.au>
2804
2805 * elf32-v850.c (v850_elf_link_output_symbol_hook): Clean out
2806 V850_OTHER_* bits.
2807
9c6fc49d
AM
28082007-03-08 Alan Modra <amodra@bigpond.net.au>
2809
2810 * Makefile.am (BFD64_BACKENDS): Add efi-app-x86_64.lo.
2811 (BFD64_BACKENDS_CFILES): Add efi-app-x86_64.c.
2812 Run "make dep-am".
2813 * Makefile.in: Regenerate.
2814 * po/SRC-POTFILES.in: Regenerate.
2815
faed74d6
L
28162007-03-07 H.J. Lu <hongjiu.lu@intel.com>
2817
2818 * config.bfd (x86_64-*-freebsd*): Add bfd_efi_app_x86_64_vec.
2819 (x86_64-*-kfreebsd*-gnu): Likewise.
2820 (x86_64-*-netbsd*): Likewise.
2821 (x86_64-*-openbsd*): Likewise.
2822 (x86_64-*-linux-*): Likewise.
2823
2824 * configure.in: Support bfd_efi_app_x86_64_vec.
2825 * configure: Regenerated.
2826
2827 * efi-app-x86_64.c: New file.
2828
2829 * targets.c (bfd_efi_app_x86_64_vec): New.
2830 (_bfd_target_vector): Add bfd_efi_app_x86_64_vec.
2831
15344ad7
L
28322007-03-07 Kai Tietz <kai.tietz@onevision.com>
2833
2834 * reloc.c (bfd_generic_get_relocated_section_contents): Remove
2835 const for type reloc_howto_type.
2836
ab96bf03
AM
28372007-03-07 Alan Modra <amodra@bigpond.net.au>
2838
2839 PR 3958
2840 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): No error on relocatable link.
2841 (elf_discarded_section): Move..
2842 * bfd-in.h: ..to here.
2843 * bfd-in2.h: Regenerate.
2844 * elflink.c (elf_link_input_bfd): Don't zap relocs against symbols
2845 from discarded sections before relocate_section has done its job.
2846 * reloc.c (bfd_generic_get_relocated_section_contents): Handle
2847 relocs against symbols from discarded sections.
2848 * elf-hppa.h (elf_hppa_howto_table): Set size. Set dst_mask on
2849 SECREL32.
2850 (elf_hppa_relocate_section): Handle relocatable link after setting
2851 sec, sym, h etc. for final link. Squash error messages for
2852 relocatable link. Clear section contents for relocs against
2853 symbols in discarded sections, and zero reloc. Remove existing
2854 zero r_symndx code.
2855 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
2856 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2857 * elf32-arm.c (elf32_arm_relocate_section): Likewise.
2858 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
2859 * elf32-bfin.c (bfinfdpic_relocate_section): Likewise.
2860 (bfin_relocate_section): Likewise.
2861 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
2862 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2863 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
2864 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
2865 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2866 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2867 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
2868 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2869 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2870 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2871 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2872 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
2873 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
2874 * elf32-m32c.c (m32c_elf_relocate_section): Likewise.
2875 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2876 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
2877 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2878 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2879 * elf32-mep.c (mep_elf_relocate_section): Likewise.
2880 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
2881 * elf32-mt.c (mt_elf_relocate_section): Likewise.
2882 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2883 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2884 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2885 * elf32-score.c (_bfd_score_elf_relocate_section): Likewise.
2886 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2887 * elf32-spu.c (spu_elf_relocate_section): Likewise.
2888 * elf32-v850.c (v850_elf_relocate_section): Likewise.
2889 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2890 * elf32-xc16x.c (elf32_xc16x_relocate_section): Likewise.
2891 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2892 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
2893 * elf64-alpha.c (elf64_alpha_relocate_section_r): Likewise.
2894 (elf64_alpha_relocate_section): Likewise.
2895 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
2896 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2897 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2898 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2899 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2900 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2901 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2902 * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Likewise.
2903
2904 * elf32-arm.c (elf32_arm_relocate_section): Always adjust section
2905 symbols for relocatable link. Don't use always-zero st_value.
2906 (elf_backend_rela_normal): Don't define.
2907 * elf32-bfin.c (bfinfdpic_relocate_section): Use
2908 RELOC_FOR_GLOBAL_SYMBOL.
2909 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
2910 * elf32-d10v.c (elf32_d10v_relocate_section): Combine SEC_MERGE
2911 section symbol adjustments with same for relocatable link.
2912 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2913 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Move..
2914 (elf32_m68hc11_check_relocs): ..to here.
2915 * elf32-score.c (score_elf_final_link_relocate): Remove zero
2916 r_symndx code.
2917 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
2918
0e922b77
AM
29192007-03-07 Alan Modra <amodra@bigpond.net.au>
2920
2921 PR 4144
2922 * elf.c (assign_file_positions_for_load_sections): Don't
2923 adjust p_memsz for !SEC_LOAD section vma modulo page size.
2924 Instead, use the same lma based adjustment for SEC_LOAD
2925 sections.
2926
25c6282a
BW
29272007-03-01 Bob Wilson <bob.wilson@acm.org>
2928
2929 * elf32-xtensa.c (analyze_relocations): Zero src_count if not relaxing.
2930 (find_relaxable_sections): Do not increment src_count for unknown
2931 opcodes. Decode only once instead of calling is_l32r_relocation.
2932 (compute_text_actions): Remove unused no_insn_move flag. Assert that
2933 src_next matches src_count in relax_info.
2934
066c2a57
JM
29352007-03-01 Joseph Myers <joseph@codesourcery.com>
2936
2937 * Makefile.am (bfdver.h): Use "." not " " between version number
2938 and date.
2939 * Makefile.in: Regenerate.
2940 * configure.in (PKGVERSION): Default to "(GNU Binutils) ".
2941 * configure: Regenerate.
2942
ed6ba298
NS
29432007-02-28 Nathan Sidwell <nathan@codesourcery.com>
2944
2945 * config.bfd (sh-*-uclinux, sh[12]-*-uclinux): New stanza.
2946
7a8757b3
AM
29472007-02-27 Alan Modra <amodra@bigpond.net.au>
2948
2949 * elf32-spu.h (struct _ovl_stream): Make "start" and "end" const.
2950 * elf32-spu.c (ovl_mgr_pread): Add const to casts.
2951
024b2372
CD
29522007-02-23 Carlos O'Donell <carlos@codesourcery.com>
2953
2954 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Assume 32-bit
2955 DWARF even with 64-bit addresses.
2956 (_bfd_dwarf2_find_nearest_line): Likewise.
2957
cb3ff1e5
NC
29582007-02-23 Nick Clifton <nickc@redhat.com>
2959
2960 PR binutils/3535
2961 * elf.c (copy_private_bfd_data): Always rewrite the program
2962 headers when a Solaris interpreter segment is involved.
2963
6a5bb875
PB
29642007-02-22 Paul Brook <paul@codesourcery.com>
2965
2966 * elflink.c (gc_mark_hook_fn): Remove.
2967 (_bfd_elf_gc_mark): Rename gc_mark_hook_fn to elf_gc_mark_hook_fn.
2968 (bfd_elf_gc_sections): Ditto. Call gc_mark_extra_sections.
2969 * elf-bfd.h (elf_gc_mark_hook_fn): Define.
2970 (elf_backend_data): Add gc_mark_extra_sections.
2971 * elfxx-target.h (elf_backend_gc_mark_extra_sections): Provide default
2972 definition.
2973 (elfNN_bed): Add elf_backend_gc_mark_extra_sections.
2974 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): New function.
2975 (elf_backend_gc_mark_extra_sections): Define.
2976
2889e75b
NC
29772007-02-21 Nick Clifton <nickc@redhat.com>
2978
2979 * elf.c (_bfd_elf_map_sections_to_segments): If the
2980 override_segment_assignment callback is defined then call it.
2981
78859468
AM
29822007-02-21 Alan Modra <amodra@bigpond.net.au>
2983
2984 * elf32-spu.c (spu_elf_size_stubs): Correct order of warning args.
2985
ae0d2616
TS
29862007-02-19 Thiemo Seufer <ths@mips.com>
2987
2988 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): Remove
2989 translation marker from untranslatable strings.
2990
6bfdb61b
AM
29912007-02-19 Alan Modra <amodra@bigpond.net.au>
2992
2993 * elf-bfd.h (struct elf_backend_data): Add default_execstack.
2994 * elflink.c (bfd_elf_size_dynamic_sections): Heed default_execstack.
2995 * elfxx-target.h (elf_backend_default_execstack): Define to 1.
2996 (elfNN_bed): Init new field.
2997 * elf64-ppc.c (elf_backend_default_execstack): Define to 0.
2998
92f01d61
JM
29992007-02-17 Mark Mitchell <mark@codesourcery.com>
3000 Nathan Sidwell <nathan@codesourcery.com>
3001 Vladimir Prus <vladimir@codesourcery.com
3002 Joseph Myers <joseph@codesourcery.com>
3003
3004 * configure.in (--with-pkgversion): New option.
3005 * configure: Regenerate.
3006 * Makefile.am (bfdver.h): Substitute for @bfd_version_package@.
3007 * Makefile.in: Regenerate.
3008 * version.h (BFD_VERSION_STRING): Define using
3009 @bfd_version_package@.
3010
c0e3f241
CD
30112007-02-16 Carlos O'Donell <carlos@codesourcery.com>
3012
3013 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data):
3014 Print EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_XGOT
3015 and EF_MIPS_UCODE.
3016
72f6ea61
AM
30172007-02-15 Alan Modra <amodra@bigpond.net.au>
3018
3019 * libbfd-in.h (_bfd_norelocs_get_reloc_upper_bound): Don't define,
3020 declare.
3021 (_bfd_norelocs_canonicalize_reloc): Likewise.
3022 * libbfd.h: Regenerate.
3023 * libbfd.c (_bfd_norelocs_get_reloc_upper_bound): New function.
3024 (_bfd_norelocs_canonicalize_reloc): Likewise.
3025 * binary.c (binary_bfd_reloc_type_lookup): Don't define.
3026 (binary_get_reloc_upper_bound, binary_canonicalize_reloc): Likewise.
3027 (binary_vec): Use _bfd_norelocs in BFD_JUMP_TABLE_RELOCS.
3028 * ihex.c: Similarly.
3029 * mach-o-target.c: Similarly.
3030 * mach-o.c: Similarly.
3031 * mmo.c: Similarly.
3032 * pef.c: Similarly.
3033 * ppcboot.c: Similarly.
3034 * srec.c: Similarly.
3035 * xsym.c: Similarly.
3036
fab4a87f
L
30372007-02-14 H.J. Lu <hongjiu.lu@intel.com>
3038
3039 PR ld/3953
3040 * elflink.c (_bfd_elf_add_default_symbol): Check warning symbol
3041 when adding default symbol.
3042
e4e0193e
AM
30432007-02-13 Alan Modra <amodra@bigpond.net.au>
3044
3045 * elf64-ppc.c (create_linkage_sections): Use section ".branch_lt"
3046 for branch lookup table.
3047
84f5d08e
AM
30482007-02-12 Alan Modra <amodra@bigpond.net.au>
3049
3050 * elf64-ppc.c (create_linkage_sections): Don't create
3051 .rela.rodata.brlt for --emit-relocs.
3052 (ppc_build_one_stub): Create relocs for brlt --emit-relocs here.
3053 (ppc_size_one_stub): Count them. Simplify test of stub type
3054 when counting stub relocs. Set SEC_RELOC too.
3055 (ppc64_elf_size_stubs): Clear reloc_count and SEC_RELOC.
3056 (ppc64_elf_finish_dynamic_sections): Output brlt relocs.
3057
4aac632e
AM
30582007-02-12 Alan Modra <amodra@bigpond.net.au>
3059
3060 * elflink.c (evaluate_complex_relocation_symbols): Ignore relocs
3061 with a zero symbol index.
3062
8da3dbc5
AM
30632007-02-12 Alan Modra <amodra@bigpond.net.au>
3064
3065 * elflink.c (bfd_elf_discard_info): Tidy setting of "eh".
3066
b31847af
DB
30672007-02-05 Dave Brolley <brolley@redhat.com>
3068 Stan Cox <scox@redhat.com>
3069
3070 PR ld/3972
3071 * elflink.c (elf_link_input_bfd): Always setup finfo->internal_syms.
3072
722b0ff7 30732007-02-05 Dave Brolley <brolley@redhat.com>
e382d174
DB
3074 Richard Sandiford <rsandifo@redhat.com>
3075 Stan Cox <scox@redhat.com>
3076 Nick Clifton <nickc@redhat.com>
3077 DJ Delorie <dj@redhat.com>
3078 Frank Ch. Eigler <fche@redhat.com>
3079 Ben Elliston <bje@redhat.com>
3080 Richard Henderson <rth@redhat.com>
3081
3082 * Makefile.am (ALL_MACHINES): Add cpu-mep.lo.
3083 (ALL_MACHINES_CFILES): Add CPU_MEP.c.
3084 (BFD32_BACKENDS): Add elf32-mep.lo.
3085 (BFD32_BACKENDS_CFILES): Add elf32-mep.c.
3086 (cpu-mep.lo,elf32-mep.lo): New targets.
3087 * archures.c (bfd_arch_mep): New enumerator.
3088 (bfd_mach_mep, bfd_mach_mep_h1): New macros.
3089 (bfd_mep_arch): New external variable.
3090 (bfd_archures_list): Add bfd_mep_arch.
3091 * config.bfd: Support mep-*-elf.
3092 * configure.in: Support bfd_elf32_mep_vec and bfd_elf32_mep_little_vec.
3093 * reloc.c (BFD_RELOC_MEP_*): New relocation numbers.
3094 * targets.c (bfd_elf32_mep_vec,bfd_elf32_mep_little_vec): New extern
3095 declarations.
3096 (_bfd_target_vector): Add bfd_elf32_mep_vec and
3097 bfd_elf32_mep_little_vec.
722b0ff7
DB
3098 * mep-relocs.pl: New file.
3099 * cpu-mep.c: New file.
3100 * elf32-mep.c: New file.
3101 * bfd-in2.h: Regenerate.
e382d174 3102 * po/POTFILES.in: Regenerate.
722b0ff7
DB
3103 * libbfd.h: Regenerate.
3104 * Makefile.in: Regenerate.
3105 * configure: Regenerate.
3106
d9352518
DB
31072007-02-05 Dave Brolley <brolley@redhat.com>
3108
3109 * elflink.c (evaluate_complex_relocation_symbols): Check for
3110 STT_SRELC for global symbols.
3111 (perform_complex_relocations): Renamed to
3112 perform_complex_relocation and now examines only one relocation.
3113 (elf_link_input_bfd): Don't call perform_complex_relocations.
74e880a7 3114 * elf-bfd.h (bfd_elf_perform_complex_relocation_: New prototype.
d9352518
DB
3115 * elf32-mep.c (mep_elf_howto_table): Add R_RELC.
3116 (OD,OS,OU): #undefs corrected to N, S and U repectively.
3117 (mep_reloc_type_lookup): Handle BFD_RELOC_RELC.
3118 (complex_reloc_installation_howto): Removed.
3119 (mep_info_to_howto_rela): Remove special case for r_type==0xff.
3120 (mep_elf_relocate_section): Call bfd_elf_perform_complex_relocation.
3121
d9352518 31222007-02-05 Dave Brolley <brolley@redhat.com>
e382d174
DB
3123 Richard Sandiford <rsandifo@redhat.com>
3124 DJ Delorie <dj@redhat.com>
3125 Graydon Hoare <graydon@redhat.com>
3126 Nick Clifton <nickc@cambridge.redhat.com>
3127 Jeff Holcomb <jeffh@redhat.com>
3128 Frank Ch. Eigler <fche@redhat.com>
3129
3130 * elf-bfd.h (bfd_elf_perform_complex_relocations): New prototype.
3131 * elf.c (swap_out_syms): Handle BSF_RELC and BSF_SRELC.
3132 * elfcode.h (elf_slurp_symbol_table): Handle STT_RELC and STT_SRELC.
3133 * elflink.c (set_symbolValue): New static function.
d9352518
DB
3134 (resolve_symbol): Likewise.
3135 (resolve_section): Likewise.
3136 (undefined_reference): Likewise.
3137 (eval_symbol): Likewise.
3138 (evaluate_complex_relocation_symbols): Likewise.
3139 (put_value): Likewise.
3140 (get_value): Likewise.
e382d174
DB
3141 (decode_complex_addend):
3142 (bfd_elf_perform_complex_relocation): New function.
3143 (elf_link_input_bfd): Call evaluate_complex_relocation_symbols.
3144 * reloc.c (BFD_RELOC_RELC): New relocation number.
3145 * syms.c (BSF_RELC,BSF_SRELC): New macros.
d9352518 3146
f1ab2340 31472007-02-05 Bob Wilson <bob.wilson@acm.org>
74e880a7 3148
f1ab2340
BW
3149 * elf32-xtensa.c (elf_xtensa_make_sym_local): Delete.
3150 (elf_xtensa_hide_symbol, elf_backend_hide_symbol): Delete.
3151 (elf_xtensa_fix_refcounts, elf_xtensa_allocate_plt_size)
3152 (elf_xtensa_allocate_got_size): Replace these with...
3153 (elf_xtensa_allocate_dynrelocs): ...this new function.
3154 (elf_xtensa_size_dynamic_sections): Use it.
74e880a7 3155
e5f131d1 31562007-02-05 Bob Wilson <bob.wilson@acm.org>
74e880a7 3157
e5f131d1
BW
3158 * elf32-xtensa.c (elf_howto_table) <R_XTENSA_GLOB_DAT>
3159 <R_XTENSA_JMP_SLOT, R_XTENSA_RELATIVE, R_XTENSA_PLT, R_XTENSA_DIFF32>:
3160 Set src_mask to zero.
3161 <R_XTENSA_DIFF8, R_XTENSA_DIFF16>: Likewise. Also fix dst_mask.
3162 <R_XTENSA_ASM_EXPAND>: Set pcrel_offset to TRUE.
74e880a7 3163
4608f3d9
BW
31642007-02-02 Bob Wilson <bob.wilson@acm.org>
3165
3166 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Renamed to...
3167 (elf_xtensa_dynamic_symbol_p): ...this.
3168
f0e6fdb2
BW
31692007-02-02 Bob Wilson <bob.wilson@acm.org>
3170
3171 * elf32-xtensa.c (plt_reloc_count): Move into link hash table.
3172 (struct elf_xtensa_link_hash_table): New.
3173 (elf_xtensa_hash_table): New.
3174 (elf_xtensa_link_hash_table_create): New.
3175 (elf_xtensa_check_relocs): Update plt_reloc_count references.
3176 Update arguments to add_extra_plt_sections.
3177 (elf_xtensa_create_dynamic_sections): Record new sections in the hash
3178 table. Update for plt_reloc_count and add_extra_plt_sections.
3179 (add_extra_plt_sections, elf_xtensa_create_plt_entry): Replace dynobj
3180 argument with link info. Update calls to elf_xtensa_get_plt_section
3181 and elf_xtensa_get_gotplt_section.
3182 (elf_xtensa_allocate_local_got_size, elf_xtensa_size_dynamic_sections)
3183 (elf_xtensa_relocate_section, elf_xtensa_finish_dynamic_sections)
3184 (elf_xtensa_discard_info_for_section, shrink_dynamic_reloc_sections)
3185 (relax_property_section): Get sections from the hash table and update
3186 function calls.
3187 (elf_xtensa_get_plt_section, elf_xtensa_get_gotplt_section): Replace
3188 dynobj argument with link info. Get sections for first plt chunk from
3189 the hash table.
3190 (bfd_elf32_bfd_link_hash_table_create): Define.
3191
c15f73f9
JJ
31922007-02-02 Jakub Jelinek <jakub@redhat.com>
3193
3194 * elf-bfd.h (struct elf_obj_tdata): Change symbuf type to void *.
3195 * elf.c (struct elf_symbuf_symbol, struct elf_symbuf_head): New types.
3196 (struct elf_symbol): Change first member into union.
3197 (elf_sort_elf_symbol): Compare pointers to internal syms rather than
3198 internal syms. Only compare st_shndx fields.
3199 (elf_create_symbuf): New function.
3200 (bfd_elf_match_symbols_in_sections): Use it. If symbufs are available
3201 for bfds, use a binary search, otherwise don't qsort symbols
3202 unnecessarily only to select which symbols are for the particular
3203 shndx.
3204
effdf42a
NC
32052007-02-01 Nick Clifton <nickc@redhat.com>
3206
3207 PR ld/3852
3208 * elf.c (_bfd_elf_link_hash_table_init): Initialize all the fields
3209 in the elf_link_hash_table structure.
3210
183e98be
AM
32112007-02-01 Alan Modra <amodra@bigpond.net.au>
3212
3213 * elf-bfd.h (struct elf_backend_data): Add elf_backend_write_core_note.
3214 * elfxx-target.h (elf_backend_write_core_note): Define and use.
3215 * elf.c (elfcore_write_prpsinfo): Call the above. Add support for
3216 32-bit core note on 64-bit target.
3217 (elfcore_write_prstatus): Likewise.
3218 (elfcore_write_lwpstatus): Make note_name const.
3219 (elfcore_write_prfpreg): Likewise.
3220 (elfcore_write_pstatus): Add support for 32-bit core note on 64-bit
3221 target.
3222 * elf32-ppc.c (ppc_elf_write_core_note): New function.
3223 (elf_backend_write_core_note): Define.
3224 * elf64-ppc.c (ppc64_elf_write_core_note): New function.
3225 (elf_backend_write_core_note): Define.
3226
fc523535 32272007-01-31 H.J. Lu <hongjiu.lu@intel.com>
16cecee5
L
3228
3229 * elf32-cris.c (INCLUDED_TARGET_FILE): Removed.
3230 (elf32_bed): Defined for elf32-us-cris.
3231
3232 * elf64-sh64.c (elf64_bed): Defined for Linux.
3233 (INCLUDED_TARGET_FILE): Removed.
3234
3235 * elfxx-target.h (elfNN_bed): Always define. Don't check
3236 INCLUDED_TARGET_FILE.
3237
c9b57b7e
DD
32382007-01-31 DJ Delorie <dj@redhat.com>
3239
3240 * elf-m10300.c (mn10300_elf_relocate_section): Clarify the warning
3241 message for dangerous relocs, special case the common user error.
3242
53020534
L
32432007-01-30 H.J. Lu <hongjiu.lu@intel.com>
3244
3245 * elf.c (copy_elf_program_header): Start from the first section
3246 in a segment and stop when all sections in a segment are
3247 accounted for.
3248
c7b8f16e
JB
32492007-01-29 Julian Brown <julian@codesourcery.com>
3250
3251 * bfd-in2.h: Regenerate.
3252 * bfd-in.h (bfd_arm_vfp11_fix): New enum. Specify how VFP11
3253 instruction scanning should be done.
3254 (bfd_elf32_arm_init_maps, bfd_elf32_arm_vfp11_erratum_scan)
3255 (bfd_elf32_arm_vfp11_fix_veneer_locations): Add prototypes.
3256 (bfd_elf32_arm_set_target_relocs): Add vfp11 fix type argument to
3257 prototype.
3258 * elf-bfd.h (elf_backend_write_section): Add struct bfd_link_info
3259 argument.
3260 * elf32-arm.c (VFP11_ERRATUM_VENEER_SECTION_NAME)
3261 (VFP11_ERRATUM_VENEER_ENTRY_NAME): Define macros.
3262 (elf32_vfp11_erratum_type): New enum.
3263 (elf32_vfp11_erratum_list): New struct. List of veneers or jumps to
3264 veneers.
3265 (_arm_elf_section_data): Add mapsize, erratumcount, erratumlist.
3266 (elf32_arm_link_hash_table): Add vfp11_erratum_glue_size,
3267 vfp11_fix and num_vfp11_fixes fields.
3268 (elf32_arm_link_hash_table_create): Initialise vfp11_fix,
3269 vfp11_erratum_glue_size, num_vfp11_fixes fields.
3270 (VFP11_ERRATUM_VENEER_SIZE): Define. Size of an (ARM) veneer.
3271 (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
3272 glue section.
3273 (elf32_arm_section_map_add): Add an code/data mapping symbol entry
3274 to a section's map.
3275 (record_vfp11_erratum_veneer): Create a single veneer, and its
3276 associated symbols.
3277 (bfd_elf32_arm_add_glue_sections_to_bfd): Add vfp11 erratum glue.
3278 (bfd_elf32_arm_init_maps): Initialise mapping symbol table for input
3279 BFDs.
3280 (bfd_elf32_arm_set_vfp11_fix): Set the type of erratum workaround
3281 required.
3282 (bfd_arm_vfp11_pipe): Define VFP11 instruction pipes.
3283 (bfd_arm_vfp11_regno): Recode a register number from a VFP11 insn.
3284 (bfd_arm_vfp11_write_mask): Update write mask according to coded
3285 register number.
3286 (bfd_arm_vfp11_antidependency): New function.
3287 (bfd_arm_vfp11_insn_decode): Decode a VFP11 insn.
3288 (elf32_arm_compare_mapping): Declare.
3289 (bfd_elf32_arm_vfp11_erratum_scan): Scan the sections of an input
3290 BFD for potential erratum-triggering insns. Record results.
3291 (bfd_elf32_arm_vfp11_fix_veneer_locations): Find out where veneers
3292 and branches to veneers have been placed in virtual memory after
3293 layout.
3294 (bfd_elf32_arm_set_target_relocs): Set vfp11_fix field in global
3295 hash table.
3296 (elf32_arm_output_symbol_hook): Remove.
3297 (elf32_arm_write_section): Output veneers, and branches to veneers.
3298 Use maps from input sections, not output sections, for code
3299 byte-swapping.
3300 * elf32-ppc.c (ppc_elf_write_section): Add dummy link_info argument.
3301 * elf32-score.c (_bfd_score_elf_write_section): Likewise.
3302 * elfxx-mips.c (_bfd_mips_elf_write_section): Likewise.
3303 * elfxx-mips.h (_bfd_mips_elf_write_section): Likewise.
3304
33052007-01-27 H.J. Lu <hongjiu.lu@intel.com>
83d1651b
L
3306
3307 * elf64-hppa.c (elf64_bed): Defined for HPUX and Linux.
b8210914 3308 (INCLUDED_TARGET_FILE): Removed.
83d1651b 3309
914dfb0f
DA
33102007-01-27 Mike Frysinger <vapier@gentoo.org>
3311
3312 * elf32-hppa.c (elf32_bed): Define for hpux, linux and netbsd.
3313 (INCLUDED_TARGET_FILE): Remove.
3314
78eba9b6
DD
33152007-01-25 DJ Delorie <dj@redhat.com>
3316
3317 * elf32-m32c.c (m32c_elf_howto_table): Don't complain about
3318 R_M32C_16 or R_M32C_24 relocs.
3319
64ee10b6
NC
33202007-01-25 Nick Clifton <nickc@redhat.com>
3321
3322 PR binutils/3874
3323 * elf32-avr.c (avr_link_hash_table): Check to make sure that the
3324 hash table was created by elf32_avr_link_hash_table_create before
3325 using it.
3326 (elf32_avr_link_hash_newfunc): New function. Just pass the call
3327 through to _bfd_elf_link_hash_newfunc.
3328 (elf32_avr_link_hash_table_create): Use
3329 elf32_avr_link_hash_newfunc instead of
3330 _bfd_elf_link_hash_newfunc.
3331 (elf32_avr_relocate_section): Check for the hash table pointer
3332 being NULL.
3333 (elf32_avr_relax_section, avr_build_one_stub,
3334 elf32_avr_setup_params, get_local_syms, elf32_avr_size_stubs,
3335 elf32_avr_build_stubs): Likewise.
3336
40b36307
L
33372007-01-16 H.J. Lu <hongjiu.lu@intel.com>
3338
3339 PR ld/3831
3340 * elf-bfd.h (bfd_elf_link_mark_dynamic_symbol): Add an
3341 argument, Elf_Internal_Sym *.
3342
3343 * elflink.c (bfd_elf_link_mark_dynamic_symbol): Mark a data
3344 symbol dynamic if info->dynamic_data is TRUE.
3345 (bfd_elf_record_link_assignment): Updated call to
3346 bfd_elf_record_link_assignment.
3347 (_bfd_elf_merge_symbol): Likewise. Always call
3348 bfd_elf_link_mark_dynamic_symbol.
3349
fc523535 33502007-01-12 H.J. Lu <hongjiu.lu@intel.com>
a454209d
L
3351
3352 * Makefile.am (BFD_LIBS): Removed.
3353 * Makefile.in: Regenerated.
3354
fc523535 33552007-01-11 H.J. Lu <hongjiu.lu@intel.com>
21e40a48
L
3356
3357 PR binutils/3631
3358 * Makefile.am (OFILES): Add @bfd64_libs@.
3359 (libbfd_la_SOURCES): Remove $(BFD64_LIBS_CFILES).
3360 * Makefile.in: Regenerated.
3361
3362 * configure.in (bfd_libs): Replaced by ...
3363 (bfd64_libs): This.
3364 * configure: Regenerated.
3365
59e0647f
NS
33662007-01-11 Nathan Sidwell <nathan@codesourcery.com>
3367
3368 * elf.c (assign_file_positions_for_load_sections): We can
3369 require fewer phdrs than expected.
3370
3bdcfdf4
KH
33712007-01-08 Kazu Hirata <kazu@codesourcery.com>
3372
3373 * archures.c (bfd_mach_cpu32_fido): Rename to bfd_mach_fido.
3374 * bfd-in2.h: Regenerate.
3375 * cpu-m68k.c (arch_info_struct): Use bfd_mach_fido instead of
3376 bfd_mach_cpu32_fido.
3377 (m68k_arch_features): Use fido_a instead of cpu32.
3378 (bfd_m68k_compatible): Reject the combination of Fido and
3379 ColdFire. Accept the combination of CPU32 and Fido with a
3380 warning.
3381 * elf32-m68k.c (elf32_m68k_object_p,
3382 elf32_m68k_merge_private_bfd_data,
3383 elf32_m68k_print_private_bfd_data): Treat Fido as an
3384 architecture by itself.
3385
42037fe5
NC
33862007-01-08 Kai Tietz <kai.tietz@onevision.com>
3387
3388 * config.bfd: Renamed target x86_64-*-mingw64 to x86_64-*-mingw*.
3389
ebe8b991
JJ
33902007-01-05 Jakub Jelinek <jakub@redhat.com>
3391
3392 * texhex.c (first_phase): Don't fall through into the default
3393 case.
3394 (pass_over): Replace abort () calls with return FALSE. Fix
3395 buffer overflow.
3396
b327f31f
AM
33972007-01-04 Jie Zhang <jie.zhang@analog.com>
3398
3399 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't set
3400 SEC_EXCLUDE on zero size .eh_frame.
3401
10a2343e 3402For older changes see ChangeLog-2006
56882138
AM
3403\f
3404Local Variables:
3405mode: change-log
3406left-margin: 8
3407fill-column: 74
3408version-control: never
3409End:
This page took 0.719833 seconds and 4 git commands to generate.