2005-07-14 Kelley Cook <kcook@gcc.gnu.org>
[binutils.git] / bfd / ChangeLog
0 / 8827 (  0%)
CommitLineData
12005-07-13 Steve Ellcey <sje@cup.hp.com>
2
3 * bfd.m4 (BFD_NEED_DECLARATION): Remove.
4
52005-07-12 Alan Modra <amodra@bigpond.net.au>
6
7 * elf64-ppc.c (ppc64_elf_relocate_section): Don't use a plt stub
8 when !can_plt_call.
9
102005-07-12 Alan Modra <amodra@bigpond.net.au>
11
12 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Warning fix.
13
142005-07-12 Alan Modra <amodra@bigpond.net.au>
15
16 * elf32-ppc.c (ppc_elf_set_sdata_syms): Correct __sbss_start value.
17
182005-07-11 H.J. Lu <hongjiu.lu@intel.com>
19
20 * elflink.c (_bfd_elf_symbol_refs_local_p): Revert the last
21 change.
22
232005-07-08 Paul Koning <pkoning@equallogic.com>
24
25 * dwarf2.c (read_address): Check sign_extend_vma to handle targets
26 where addresses are sign extended.
27
282005-07-08 Ralf Corsepius <ralf.corsepius@rtems.org>
29
30 * config.bfd: Mark i960-*-rtems*, or32-*-rtems* as obsolete.
31 Mark a29k-*rtems*, hppa*-*-rtems*, *-go32-rtems*,
32 i[3-7]86*-*-rtemscoff*, mips*el-*-rtems*, powerpcle-*-rtems*,
33 sparc*-*-rtemsaout* as removed
34
352005-07-08 Alan Modra <amodra@bigpond.net.au>
36
37 * elf-hppa.h (elf_hppa_final_link): Use gp val of zero when none
38 of the usual sections are found.
39 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Tidy.
40 Strip .dynbss if it is zero size.
41 * elf32-arm.c (elf32_arm_size_dynamic_sections): Likewise.
42 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
43 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
44 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise, and
45 .dynsbss.
46 (i370_elf_finish_dynamic_sections): Don't attempt to write .got
47 when it is zero size.
48 * elf32-i386.c (elf_i386_size_dynamic_sections): Correct handling
49 of .dynbss and zero size sections.
50 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Strip .dynbss if
51 it is zero size.
52 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Tidy. Strip
53 .dynbss if zero size.
54 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise, .dynsbss
55 too.
56 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
57 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
58 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
59 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Tidy. Strip
60 .plt.* and .got.plt.* if zero size.
61 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Tidy. Strip
62 .got* and .dynbss if zero size.
63 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Tidy. Strip
64 * elf64-ppc.c (create_linkage_sections): Create branch lookup table
65 in .data.rel.ro.brlt or .rodata.brlt, and similarly for associated
66 reloc section.
67 (create_got_section): Always create new .got and .rela.got sections.
68 (ppc64_elf_size_dynamic_sections): Tidy. Strip .dynbss if zero size.
69 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
70 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
71 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Handle
72 dynamic bss sections correctly.
73 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Tidy.
74 * elfxx-sparc.c (_bfd_sparc_elf_size_dynamic_sections): Tidy. Strip
75 .dynbss if zero size.
76
772005-07-08 Ben Elliston <bje@au.ibm.com>
78
79 * elf32-xtensa.c: Include <stdarg.h> unconditionally, not only
80 when ANSI_PROTOTYPES is defined. Remove #ifdef logic.
81
822005-07-07 H.J. Lu <hongjiu.lu@intel.com>
83
84 * elf-bfd.h (elf_backend_data): Add special_sections.
85
86 * elf.c (_bfd_elf_get_sec_type_attr): Check special_sections
87 first.
88
89 * elf32-arm.c (elf_backend_get_sec_type_attr): Removed.
90 (elf_backend_special_sections): New. Defined.
91 * elf32-m32r.c: Likewise.
92 * elf32-m68hc11.c: Likewise.
93 * elf32-m68hc12.c: Likewise.
94 * elf32-mcore.c: Likewise.
95 * elf32-sh64.c: Likewise.
96 * elf32-v850.c: Likewise.
97 * elf32-xtensa.c: Likewise.
98 * elf64-alpha.c: Likewise.
99 * elf64-hppa.c: Likewise.
100 * elf64-ppc.c: Likewise.
101 * elf64-sh64.c: Likewise.
102 * elfxx-ia64.c: Likewise.
103 * elfxx-mips.c: Likewise.
104 * elfxx-mips.h: Likewise.
105
106 * elfxx-target.h (elf_backend_special_sections): New.
107 (elfNN_bed): Initialize special_sections.
108
1092005-07-07 Bob Wilson <bob.wilson@acm.org>
110
111 * xtensa-modules.c: Update tables with Xtensa MMU features.
112
1132005-07-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
114
115 * elf32-xtensa.c (vsprint_msg): Add format attribute. Fix
116 format bugs.
117 * vms.h (_bfd_vms_debug): Add format attribute.
118 (_bfd_vms_debug, _bfd_hexdump): Fix typos.
119
1202005-07-07 H.J. Lu <hongjiu.lu@intel.com>
121
122 PR 975
123 * elflink.c (_bfd_elf_symbol_refs_local_p): Only undefined
124 symbol with default visibility is local.
125
1262005-07-07 Ben Elliston <bje@gnu.org>
127
128 * config.bfd: Mark m68*-*-rtemscoff as obsolete.
129
1302005-07-06 H.J. Lu <hongjiu.lu@intel.com>
131
132 * dwarf2.c (varinfo): Add addr.
133 (lookup_symbol_in_variable_table): Also check addr.
134 (scan_unit_for_symbols): Set addr for variable.
135 (comp_unit_find_line): Updated.
136
1372005-07-06 Nick Clifton <nickc@redhat.com>
138
139 * coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error
140 message if an unknown reloc is encountered.
141 (alpha_relocate_section): Likewise.
142
143 * ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc
144 with a missing howto field.
145
1462005-07-06 Alan Modra <amodra@bigpond.net.au>
147
148 * po/SRC-POTFILES.in: Add cpu-ms1.c, elf32-ms1.c, elf-vxworks.c,
149 elfxx-sparc.c.
150
1512005-07-05 Paul Brook <paul@codesourcery.com>
152
153 * elf32-ppc.c (ppc_elf_vxworks_special_sections): Remove.
154 (ppc_elf_vxworks_get_sec_type_attr): New function.
155 (elf_backend_special_sections): Remove vxwords definition.
156 (elf_backend_get_sec_type_attr): Define for vxworks.
157
1582005-07-05 Nick Clifton <nickc@redhat.com>
159
160 * elf64-ppc.c (ppc64_elf_info_to_howto): Fix typo.
161
1622005-07-05 Paul Brook <paul@codesourcery.com>
163
164 * config.bfd: Add separate case for ppc-vxworks.
165 * configure: Regenerate.
166 * configure.in: Include elf-vxworks.lo on ppc targets.
167 * elf-vxworks.c (elf_vxworks_final_write_processing): Handle
168 .rela.plt.unloaded.
169 * elf32-ppc.c: Add VxWorks target vec. Include elf-vxworks.h.
170 (PLT_ENTRY_SIZE, PLT_INITIAL_ENTRY_SIZE, PLT_SLOT_SIZE): Remove.
171 (VXWORKS_PLT_ENTRY_SIZE, ppc_elf_vxworks_plt_entry,
172 ppc_elf_vxworks_pic_plt_entry, VXWORKS_PLT_INITIAL_ENTRY_SIZE,
173 ppc_elf_vxworks_plt0_entry, ppc_elf_vxworks_pic_plt0_entry,
174 VXWORKS_PLT_NON_JMP_SLOT_RELOCS, VXWORKS_PLTRESOLVE_RELOCS,
175 VXWORKS_PLTRESOLVE_RELOCS_SHLIB): New.
176 (ppc_elf_link_hash_table): Add srelplt2, sgotplt, hgot, hplt,
177 is_vxworks, plt_entry_size, plt_slot_size, plt_initial_entry_size.
178 (ppc_elf_link_hash_table_create): Initialize hadtab plt fields.
179 (ppc_elf_create_got): Create .got.plt for VxWorks.
180 (ppc_elf_create_dynamic_sections): Create unloaded plt relocation
181 section for VxWorks.
182 (ppc_elf_select_plt_layout): Handle VxWorks plt format.
183 (allocate_got): VxWorks does not need a got header.
184 (allocate_dynrelocs): Handle VxWorks plt format.
185 (ppc_elf_size_dynamic_sections): Save _G_O_T_ and _P_L_T_ symbols for
186 VxWorks. Handle VxWorks plt/got.
187 (ppc_elf_finish_dynamic_sections): Fill in VxWorks plt.
188 (ppc_elf_vxworks_special_sections): New.
189 (ppc_elf_vxworks_link_hash_table_create,
190 ppc_elf_vxworks_add_symbol_hook,
191 elf_i386_vxworks_link_output_symbol_hook,
192 ppc_elf_vxworks_final_write_processing): New functions.
193 * targets.c (bfd_elf32_powerpc_vxworks_vec): Declare.
194 (_bfd_target_vector): Use it.
195
1962005-07-05 Jakub Jelinek <jakub@redhat.com>
197
198 * libbfd-in.h (struct artdata): Add extended_names_size field.
199 * libbfd.h: Rebuilt.
200 * coff-rs600.c (_bfd_xcoff_archive_p): Don't clear fields in freshly
201 allocated object by bfd_zalloc.
202 * coff64-rs6000.c (xcoff64_archive_p): Likewise.
203 * ecoff.c (_bfd_ecoff_archive_p): Likewise.
204 * archive.c (_bfd_generic_mkarchive, bfd_generic_archive_p): Likewise.
205 (get_extended_arelt_filename): Fail if index is bigger or equal to
206 extended_names_size.
207 (_bfd_generic_read_ar_hdr_mag): Don't set bfd_error_malformed_archive,
208 get_extended_arelt_filename already did that.
209 (_bfd_slurp_extended_name_table): Initialize extended_names_size field.
210 Allocate one extra byte and clear it, in case extended names table
211 is not terminated.
212
213 * libbfd-in.h (bfd_malloc2, bfd_realloc2, bfd_zmalloc2, bfd_alloc2,
214 bfd_zalloc2): New prototypes.
215 * bfd-in.h (HALF_BFD_SIZE_TYPE): Define.
216 * libbfd.c (bfd_malloc2, bfd_realloc2, bfd_zmalloc2): New functions.
217 * opncls.c (bfd_alloc2, bfd_zalloc2): New functions.
218 * elf.c (bfd_elf_get_elf_syms, setup_group, assign_section_numbers,
219 elf_map_symbols, map_sections_to_segments,
220 assign_file_positions_for_segments, copy_private_bfd_data,
221 swap_out_syms, _bfd_elf_slurp_version_tables): Use bfd_*alloc2
222 where appropriate.
223 * bfd-in2.h: Rebuilt.
224 * libbfd.h: Rebuilt.
225
226 * elf.c (_bfd_elf_print_private_bfd_data): Don't crash on bogus
227 verdef or verneed section.
228 (_bfd_elf_slurp_version_tables): Handle corrupt verdef and/or
229 verneed sections gracefully.
230 * elfxx-sparc.c (_bfd_sparc_elf_info_to_howto_ptr): Don't crash on
231 bogus relocation values.
232 * elf64-ppc.c (ppc64_elf_info_to_howto): Likewise.
233 * elf64-s390.c (elf_s390_info_to_howto): Likewise.
234 * elf32-s390.c (elf_s390_info_to_howto): Likewise.
235 * elf64-x86-64.c (elf64_x86_64_info_to_howto): Likewise.
236 * elfxx-ia64.c (lookup_howto): Likewise.
237
238 * elf.c (bfd_elf_get_str_section): Allocate an extra byte after
239 the end of strtab and clear it.
240 (elf_read): Remove.
241
2422005-07-05 Nick Clifton <nickc@redhat.com>
243
244 * po/vi.po: New Vietnamese translation.
245 * configure.in (ALL_LINGUAS): Add vi.
246 * configure: Regenerate.
247
2482005-07-05 Peter S. Mazinger <ps.m@gmx.net>
249
250 * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
251 touchup logic like i386/ppc.
252
2532005-07-05 Alan Modra <amodra@bigpond.net.au>
254
255 * elf.c (special_sections): Move const qualifier.
256 (special_sections_b..special_sections_t): Likewise.
257 * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
258 const.
259 (elf32_arm_symbian_special_sections): Move const qualifier.
260 * elf32-m32r.c: Similarly.
261 * elf32-m68hc11.c: Similarly.
262 * elf32-m68hc12.c: Similarly.
263 * elf32-mcore.c: Similarly.
264 * elf32-ppc.c: Similarly.
265 * elf32-sh64.c: Similarly.
266 * elf32-v850.c: Similarly.
267 * elf32-xtensa.c: Similarly.
268 * elf64-alpha.c: Similarly.
269 * elf64-hppa.c: Similarly.
270 * elf64-ppc.c: Similarly.
271 * elf64-sh64.c: Similarly.
272 * elfxx-ia64.c: Similarly.
273 * elfxx-mips.c: Similarly.
274
2752005-07-04 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
276
277 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
278 info->executable instead of !info->shared where appropriate.
279
2802005-07-04 Alan Modra <amodra@bigpond.net.au>
281
282 PR 1042
283 * elf.c (assign_file_positions_for_segments): Remove excluded
284 sections from the segment map.
285
2862005-07-04 Alan Modra <amodra@bigpond.net.au>
287
288 PR 1004
289 * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete
290 special_sections.
291 (_bfd_elf_get_special_section): Declare.
292 (bfd_elf_special_section): Update prototype.
293 * elf.c (special_sections): Remove unused outer entries.
294 (get_special_section): Delete.
295 (_bfd_elf_get_special_section): New function.
296 (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update
297 special_sections indexing.
298 (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
299 * elf32-arm.c (symbian_special_sections_d): Delete.
300 (symbian_special_sections_g, symbian_special_sections_h): Delete.
301 (symbian_special_sections_i, symbian_special_sections_f): Delete.
302 (symbian_special_sections_p): Delete.
303 (elf32_arm_symbian_special_sections): Merge above to here.
304 (elf32_arm_symbian_get_sec_type_attr): New function.
305 (elf_backend_special_sections): Don't define.
306 (elf_backend_get_sec_type_attr): Define.
307 * elf32-m32r.c: Similarly to elf32-arm.c.
308 * elf32-m68hc11.c: Likewise.
309 * elf32-m68hc12.c: Likewise.
310 * elf32-mcore.c: Likewise.
311 * elf32-sh64.c: Likewise.
312 * elf32-v850.c: Likewise.
313 * elf32-xtensa.c: Likewise.
314 * elf64-alpha.c: Likewise.
315 * elf64-hppa.c: Likewise.
316 * elf64-ppc.c: Likewise.
317 * elf64-sh64.c: Likewise.
318 * elfxx-ia64.c: Likewise.
319 * elfxx-mips.c: Likewise.
320 * elf32-ppc.c: Likewise.
321 (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable.
322 * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
323 (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
324 (elf_backend_get_sec_type_attr): Define.
325 * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
326 (elf_backend_special_sections): Don't define.
327 (elfNN_bed): Update.
328
3292005-07-01 Nick Clifton <nickc@redhat.com>
330
331 * cpu-d10v.c: Update to ISO C90 style function declarations and
332 fix formatting.
333 * cpu-d30v.c: Likewsie.
334 * cpu-i370.c: Likewsie.
335 * cpu-xstormy16.c: Likewsie.
336 * elf32-arc.c: Likewsie.
337 * elf32-d10v.c: Likewsie.
338 * elf32-d30v.c: Likewsie.
339 * elf32-dlx.c: Likewsie.
340 * elf32-i370.c: Likewsie.
341 * elf32-i960.c: Likewsie.
342 * elf32-ip2k.c: Likewsie.
343 * elf32-m32r.c: Likewsie.
344 * elf32-mcore.c: Likewsie.
345 * elf32-openrisc.c: Likewsie.
346 * elf32-or32.c: Likewsie.
347 * elf32-pj.c: Likewsie.
348 * elf32-v850.c: Likewsie.
349 * elf32-xstormy16.c: Likewsie.
350
3512005-07-01 Alan Modra <amodra@bigpond.net.au>
352
353 * elf64-alpha.c (elf64_alpha_create_got_section): Always create
354 a new .got section.
355 (elf64_alpha_create_dynamic_sections): Always make new sections
356 by using bfd_make_section_anyway_with_flags. Check that .got not
357 already created.
358 (elf64_alpha_check_relocs): Delete "got_created". Use tdata->gotobj
359 instead.
360
3612005-06-30 Alan Modra <amodra@bigpond.net.au>
362
363 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
364 _SDA_BASE_ and _SDA2_BASE_ symbols.
365 * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define
366 sym if not def_regular.
367 (_bfd_elf_provide_section_bound_symbols): Similarly.
368
3692005-06-30 Ben Elliston <bje@gnu.org>
370
371 * config.bfd: Mark as obsolete:
372 m68*-apollo-*
373 m68*-apple-aux*
374 m68*-bull-sysv*
375
3762005-06-29 Alan Modra <amodra@bigpond.net.au>
377
378 * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
379 .eh_frame specially..
380 (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
381 Don't recheck sections we have already marked.
382 (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
383 * section.c (struct bfd_section): Add gc_mark_from_eh.
384 (STD_SECTION): Adjust.
385 * ecoff.c (bfd_debug_section): Adjust.
386 * bfd-in2.h: Regenerate.
387
3882005-06-29 Alan Modra <amodra@bigpond.net.au>
389
390 * elflink.c (elf_gc_sweep): Do not refcount on sections that have
391 not been processed by check_relocs.
392
3932005-06-29 Paul Brook <paul@codesourcery.com>
394
395 * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
396 * bfd-in2.h: Regenerate.
397 * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
398 relative.
399 * elflink.c (bfd_elf_set_symbol): Add section argument.
400 (_bfd_elf_provide_symbol): Ditto.
401 (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
402
4032005-06-27 Carlos O'Donell <carlos@systemhalted.org>
404
405 * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
406 Use bh_root, and hh.
407 (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
408 (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
409 (struct elf32_hppa_link_hash_table): Use etab and bstab.
410 (stub_hash_newfunc): Use hh.
411 (hppa_link_hash_newfunc): Use hsh_cache.
412 (elf32_hppa_link_hash_table_create): Use etab, and bstab.
413 (elf32_hppa_link_hash_table_free): Use bstab.
414 (hppa_stub_name): Use eh.
415 (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
416 (hppa_add_stub): Use bstab.
417 (hppa_type_of_stub): Use eh.
418 (hppa_build_one_stub): Use hh and bh_root.
419 (elf32_hppa_copy_indirect_symbol): Use hdh_next.
420 (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
421 (elf32_hppa_gc_sweep_hook): Use hdh_next.
422 (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
423 (allocate_plt_static): Use etab.
424 (allocate_dynrelocs): Use etab, and hdh_next.
425 (readonly_dynrelocs): Use hdh_next.
426 (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
427 (get_local_syms): Use eh, bstab, and hh.
428 (elf32_hppa_size_stubs): Use eh, bstab, and hh.
429 (elf32_hppa_set_gp): Use etab.
430 (elf32_hppa_build_stubs): Use bstab.
431 (final_link_relocate): Use eh, bh_root.
432 (elf32_hppa_relocate_section): Use elf, etab.
433 (elf32_hppa_finish_dynamic_sections): Use etab.
434
4352005-06-27 H.J. Lu <hongjiu.lu@intel.com>
436
437 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
438 the extra `;'.
439
4402005-06-21 Carlos O'Donell <carlos@systemhalted.org>
441
442 * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
443 (hppa_stub_hash_entry): Define.
444 (stub_hash_newfunc): Rename variables.
445 (hppa_link_hash_newfunc): Likewise.
446 (elf32_hppa_link_hash_table_free): Likewise.
447 (hppa_stub_name): Likewise.
448 (hppa_get_stub_entry): Likewise.
449 (hppa_add_stub): Likewise.
450 (hppa_type_of_stub): Likewise.
451 (hppa_build_one_stub): Likewise.
452 (hppa_size_one_stub): Likewise.
453 (elf32_hppa_create_dynamic_sections): Likewise.
454 (elf32_hppa_copy_indirect_symbol): Likewise.
455 (elf32_hppa_check_relocs): Likewise.
456 (elf32_hppa_gc_mark_hook): Likewise.
457 (elf32_hppa_gc_sweep_hook): Likewise.
458 (elf32_hppa_grok_psinfo): Likewise.
459 (elf32_hppa_hide_symbol): Likewise.
460 (elf32_hppa_adjust_dynamic_symbol): Likewise.
461 (allocate_dynrelocs): Likewise.
462 (clobber_millicode_symbols): Likewise.
463 (readonly_dynrelocs): Likewise.
464 (elf32_hppa_size_dynamic_sections): Likewise.
465 (get_local_syms): Likewise.
466 (elf32_hppa_size_stubs): Likewise.
467 (hppa_record_segment_addr): Likewise.
468 (final_link_relocate): Likewise.
469 (elf32_hppa_relocate_section): Likewise.
470 (elf32_hppa_finish_dynamic_symbol): Likewise.
471
4722005-06-20 H.J. Lu <hongjiu.lu@intel.com>
473
474 PR 1025
475 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
476 symbol.
477 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
478 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
479 * elf32-cris.c (cris_elf_check_relocs): Likewise.
480 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
481 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
482 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
483 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
484 * elf32-i370.c (i370_elf_check_relocs): Likewise.
485 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
486 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
487 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
488 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
489 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
490 * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
491 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
492 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
493 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
494 * elf32-s390.c (elf_s390_check_relocs): Likewise.
495 * elf32-sh.c (sh_elf_check_relocs): Likewise.
496 * elf32-v850.c (v850_elf_check_relocs): Likewise.
497 * elf32-vax.c (elf_vax_check_relocs): Likewise.
498 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
499 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
500 * elf64-s390.c (elf_s390_check_relocs): Likewise.
501 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
502 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
503 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
504
5052005-06-20 H.J. Lu <hongjiu.lu@intel.com>
506
507 PR 1022
508 * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
509 symbol.
510
5112005-06-20 H.J. Lu <hongjiu.lu@intel.com>
512
513 PR 1025
514 * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
515 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
516
5172005-06-18 H.J. Lu <hongjiu.lu@intel.com>
518
519 * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
520 BFD_RELOC_X86_64_GOTPC32.
521 * bfd-in2.h: Regenerated.
522
5232005-06-17 Jakub Jelinek <jakub@redhat.com>
524
525 * elf.c (bfd_section_from_shdr): Kill bogus warning.
526
527 * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
528 symbol, relocation, group or versym sections.
529
530 * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
531 is NULL.
532 * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
533 doesn't point into the section.
534
5352005-06-17 Jan Beulich <jbeulich@novell.com>
536
537 * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
538 and BFD_RELOC_X86_64_GOTPC32.
539 * libbfd.h (bfd_reloc_code_real_names): Likewise.
540 * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
541 R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
542 (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
543 and R_X86_64_GOTPC32.
544 (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
545 (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
546 R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
547 (elf64_x86_64_relocate_section): Likewise.
548 (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
549
5502005-06-15 Mark Kettenis <kettenis@gnu.org>
551
552 * archive.c: Include "libiberty.h".
553
5542005-06-15 Nick Clifton <nickc@redhat.com>
555
556 * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
557 produced by the GreenHills toolchain can be assimilated.
558
5592005-06-14 Steve Ellcey <sje@cup.hp.com>
560
561 * som.c (som_find_inliner_info): New.
562
5632005-06-14 H.J. Lu <hongjiu.lu@intel.com>
564
565 * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
566
5672005-06-14 Jakub Jelinek <jakub@redhat.com>
568
569 * elf.c (bfd_section_from_shdr): Fail if name is NULL.
570 Prevent endless recursion on broken objects.
571
572 * archive.c (do_slurp_coff_armap): Check for overflows.
573
5742005-06-10 Daniel Jacobowitz <dan@codesourcery.com>
575
576 * elfcode.h (elf_write_relocs): Do nothing if there are no
577 relocations.
578
5792005-06-10 Alan Modra <amodra@bigpond.net.au>
580
581 * dwarf2.c (decode_line_info): Revert last change. Instead set
582 initial low_pc to -1 to avoid need to test whether loc_pc has
583 been set.
584
5852005-06-09 Christopher Faylor <cgf@timesys.com>
586
587 * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
588 either SEC_ALLOC OR SEC_LOAD.
589
5902005-06-09 Christopher Faylor <cgf@timesys.com>
591
592 * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
593 section header. Do not add STYP_NOLOAD since it does not appear to be
594 a valid PE flag.
595
5962005-06-09 H.J. Lu <hongjiu.lu@intel.com>
597
598 PR 1000
599 * dwarf2.c (lookup_address_in_line_info_table): Restore code
600 handling NULL function info, removed with 2005-04-03 change.
601
6022005-06-08 Mark Mitchell <mark@codesourcery.com>
603
604 * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
605
6062005-06-09 Alan Modra <amodra@bigpond.net.au>
607
608 * elflink.c (elf_mark_used_section): Delete.
609 (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
610 * reloc.c (bfd_mark_used_section): New function.
611 (bfd_generic_gc_sections): Call bfd_mark_used_section.
612
6132005-06-08 Alan Modra <amodra@bigpond.net.au>
614
615 * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
616 (bfd_fdopenr): Same.
617
6182005-06-07 Mark Mitchell <mark@codesourcery.com>
619
620 * opncls.c (bfd_fdopenr): Add missing break statements.
621
6222005-06-07 Mark Mitchell <mark@codesourcery.com>
623
624 * opncls.c (bfd_fopen): New API.
625 (bfd_openr): Use it.
626 (bfd_fdopenr): Likewise.
627 * bfd-in2.h: Regenerated.
628
6292005-06-07 Aldy Hernandez <aldyh@redhat.com>
630 Michael Snyder <msnyder@redhat.com>
631 Stan Cox <scox@redhat.com>
632
633 * Makefile.am (ALL_MACHINES): Add ms1 support.
634 (ALL_MACHINES_CFILES): Same.
635 (BFD32_BACKENDS): Same.
636 (BFD32_BACKENDS_CFILES): Same.
637
638 * Makefile.in: Regenerate.
639
640 * archures.c (bfd_architecture): Add ms1 entries.
641 Externalize bfd_ms1_arch.
642 (bfd_archures_list): Add bfd_ms1_arch.
643
644 * bfd-in2.h: Regenerate.
645
646 * cpu-ms1.c: New file.
647
648 * elf32-ms1.c: New file.
649
650 * targets.c: Define extern of bfd_elf32_ms1_vec.
651 Add bfd_elf32_ms1_vec to _bfd_target_vector.
652
653 * configure.in: Add bfd_elf32_ms1_vec case.
654
655 * configure: Regenerate.
656
657 * config.bfd: Add ms1-*-elf to table.
658
6592005-06-07 Zack Weinberg <zack@codesourcery.com>
660
661 * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
662
6632005-06-07 Alan Modra <amodra@bigpond.net.au>
664
665 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
666 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
667
6682005-06-06 H.J. Lu <hongjiu.lu@intel.com>
669
670 PR 990
671 * bfd.c (bfd_find_line): New.
672
673 * dwarf2.c (comp_unit): Add variable_table.
674 (funcinfo): Add file, line, and sec.
675 (varinfo): New.
676 (lookup_symbol_in_function_table): New.
677 (lookup_symbol_in_variable_table): New.
678 (scan_unit_for_functions): Renamed to ...
679 (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
680 DW_TAG_variable.
681 (comp_unit_find_nearest_line): Updated.
682 (comp_unit_find_line): New.
683 (_bfd_dwarf2_find_line): New.
684
685 * elf-bfd.h (_bfd_elf_find_line): New.
686 (_bfd_generic_find_line): New. Defined.
687
688 * elf.c (_bfd_elf_find_line): New.
689
690 * libbfd-in.h (_bfd_dwarf2_find_line): New.
691 (_bfd_generic_find_line): New.
692
693 * bfd-in2.h: Regenerated.
694 * libbfd.h: Likewise.
695
696 * libbfd.c (_bfd_generic_find_line): New.
697
698 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
699 with _bfd_generic_find_line.
700 (bfd_target): Add _bfd_find_line.
701
7022005-06-06 H.J. Lu <hongjiu.lu@intel.com>
703
704 * dwarf2.c (decode_line_info): Properly set low_pc.
705
7062005-06-06 Alan Modra <amodra@bigpond.net.au>
707
708 * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
709 case, include addend when indexing .opd section map.
710 (ppc64_elf_edit_opd): Add no_opd_opt param. Do nothing besides
711 clear opd_adjust array if no_opd_opt set. Tidy code.
712 Ignore zero size .opd. Check bfd_alloc return value.
713 (ppc_stub_name): Return immediately on bfd_malloc fail.
714 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
715
7162005-06-04 H.J. Lu <hongjiu.lu@intel.com>
717
718 * dwarf2.c (comp_unit): Fix a typo in comment.
719
7202005-06-03 Jan-Benedict Glaw <jbglaw@lug-owl.de>
721
722 * elf32-vax.c (rtype_to_howto): Remove PARAMS.
723 (reloc_type_lookup): Dito.
724 (elf_vax_discard_copies): Dito.
725 (elf_vax_instantiate_got_entries): Dito.
726 (elf_vax_link_hash_traverse): Dito.
727 (elf_vax_link_hash_newfunc): Dito.
728 (elf_vax_link_hash_table_create): Dito.
729 (elf32_vax_set_private_flags): Dito.
730 (elf32_vax_merge_private_bfd_data): Dito.
731 (elf32_vax_print_private_bfd_data): Dito.
732 (elf_vax_check_relocs): Dito.
733 (elf_vax_gc_mark_hook): Dito.
734 (elf_vax_gc_sweep_hook): Dito.
735 (elf_vax_size_dynamic_sections): Dito.
736 (elf_vax_discard_copies): Dito.
737 (elf_vax_instantiate_got_entries): Dito.
738 (elf_vax_relocate_section): Dito.
739 (elf_vax_finish_dynamic_symbol): Dito.
740 (elf_vax_finish_dynamic_sections): Dito.
741 (elf_vax_hash_table): Break-up of line isn't needed.
742 (elf_vax_check_relocs): Remove leading whitespace
743 (elf_vax_relocate_section): Remove redundant whitespace
744 (elf_vax_link_hash_newfunc): Don't cast NULL.
745 (elf_vax_link_hash_table_create): Dito.
746 * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
747
7482005-06-03 Alan Modra <amodra@bigpond.net.au>
749
750 PR 568
751 * configure.in: Bump version
752 * configure: Regenerate.
753 * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
754 discarded section sym refs and kill linker output.
755 * simple.c (simple_dummy_einfo): New function.
756 (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
757
758 * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
759 for all reloc types.
760
7612005-06-02 Alan Modra <amodra@bigpond.net.au>
762
763 * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
764 restrictive of func code and func descr for undefined syms as well
765 as defined.
766
7672005-05-31 Jim Blandy <jimb@redhat.com>
768
769 * Makefile.am: Regenerate dependencies with 'make dep-am'.
770 * Makefile.in: Regenerate.
771
7722005-05-31 Richard Henderson <rth@redhat.com>
773
774 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
775 (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
776 (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
777 (elf64_alpha_want_plt): Update to match.
778 (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
779 (elf64_alpha_relax_with_lituse): Likewise. Handle JSRDIRECT.
780
7812005-05-31 Zack Weinberg <zack@codesourcery.com>
782
783 * elf32-arm.c (elf32_arm_reloc_type_lookup)
784 (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
785 Use ISO C90 function declaration style.
786
7872005-05-31 James E Wilson <wilson@specifixinc.com>
788
789 * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
790 header PF_R flag on PT_LOAD segments.
791
7922005-05-30 Richard Henderson <rth@redhat.com>
793
794 * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
795 the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
796
7972005-05-29 Richard Henderson <rth@redhat.com>
798
799 * configure.in (--enable-secureplt): New.
800 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
801 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
802 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
803 (elf64_alpha_use_secureplt): New.
804 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
805 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
806 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
807 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
808 (struct alpha_elf_link_hash_entry): Add plt_offset.
809 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
810 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
811 (PLT_ENTRY_WORD3): Remove.
812 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
813 on .plt and create .got.plt.
814 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
815 (get_got_entry): Initialize plt_offset.
816 (elf64_alpha_want_plt): New.
817 (elf64_alpha_check_relocs): Use it.
818 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
819 plt entries here.
820 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
821 error as user error.
822 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
823 got subsection.
824 (elf64_alpha_size_plt_section): Size .got.plt section.
825 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
826 plt entries used.
827 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
828 Add PLTRO DYNAMIC entry.
829 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
830 (elf64_alpha_finish_dynamic_sections): Likewise.
831
8322005-05-28 David Daney <ddaney@avtrex.com>
833
834 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
835 calculation of DT_RELSZ to occur after all dynamic relocations
836 are created.
837
8382005-05-28 Eli Zaretskii <eliz@gnu.org>
839
840 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
841 * config.in, configure: Regenerate.
842
8432005-05-26 Mark Kettenis <kettenis@gnu.org>
844 Maciej W. Rozycki <macro@linux-mips.org>
845
846 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
847 stop processing of options if one of invalid size is
848 encountered.
849 (_bfd_mips_elf_section_from_shdr): Likewise.
850 (_bfd_mips_elf_fake_sections): Reset the type of empty special
851 sections.
852
8532005-05-26 Richard Henderson <rth@redhat.com>
854
855 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
856 plt_old_section, plt_old_value.
857 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
858 (elf64_alpha_size_plt_section_1): Don't use it.
859
8602005-05-26 Jakub Jelinek <jakub@redhat.com>
861
862 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
863 first shdr has sh_size == 0. Fail if e_shnum is large to cause
864 arithmetic overflow when allocating the i_shdr array.
865 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
866
8672005-05-25 Richard Henderson <rth@redhat.com>
868
869 * elf64-alpha.c: Update all function definitions to ISO C. Remove
870 all function prototypes; rearrange functions into def-use order.
871
8722005-05-25 Richard Henderson <rth@redhat.com>
873
874 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
875 in the presence of deleting elements.
876 (elf64_alpha_size_got_sections): Zero dead got section size.
877
8782005-05-23 Fred Fish <fnf@specifixinc.com>
879
880 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
881 (struct funcinfo): Add caller_func, caller_file, caller_line.
882 tag, and nesting_level members.
883 (lookup_address_in_function_table): Change first passed parameter
884 from "struct funcinfo *" to "struct comp_unit *".
885 (lookup_address_in_function_table): Dereference unit to find function
886 table.
887 (lookup_address_in_function_table): Traverse the function list to
888 create a chain of inlined functions back to the first non inlined
889 function.
890 (scan_unit_for_functions): Remember tag and nesting level. Handle
891 DW_AT_call_file and DW_AT_call_line.
892 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
893 call to pass unit pointer instead of function table pointer. For
894 inlined functions, save pointer to the inliner chain.
895 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
896 (_bfd_dwarf2_find_inliner_info): New function that returns information
897 from the inliner chain after a call to bfd_find_nearest_line.
898
899 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
900 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
901 NAME##_find_inliner_info.
902 (bfd_target): Add _bfd_find_inliner_info.
903 * bfd-in2.h: Regenerate.
904
905 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
906 macro that always returns bfd_false.
907 (_bfd_dwarf2_find_inliner_info): Declare.
908 * libbfd.h: Regenerate.
909
910 * elf32-arm.c (elf32_arm_find_inliner_info): New function
911 that calls _bfd_dwarf2_find_inliner_info.
912 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
913
914 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
915 that calls _bfd_dwarf2_find_inliner_info.
916 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
917 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
918 _bfd_mips_elf_find_inliner_info.
919 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
920 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
921
922 * elf.c (_bfd_elf_find_inliner_info): New function that calls
923 _bfd_dwarf2_find_inliner_info.
924 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
925 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
926 _bfd_elf_find_inliner_info.
927
928 * coffgen.c (coff_find_inliner_info): New function that
929 calls _bfd_dwarf2_find_inliner_info.
930 * libcoff-in.h (coff_find_inliner_info): Declare.
931 * libcoff.h: Regenerate.
932 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
933 (pmac_xcoff_vec) Ditto.
934 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
935 (aix5coff64_vec): Ditto.
936
937 * aout-target.h (MY_find_inliner_info): Define as
938 _bfd_nosymbols_find_inliner_info.
939 * aout-tic30.c (MY_find_inliner_info): Ditto.
940 * binary.c (binary_find_inliner_info): Ditto.
941 * i386msdos.c (msdos_find_inliner_info): Ditto.
942 * ihex.c (ihex_find_inliner_info): Ditto.
943 * libaout.h (aout_32_find_inliner_info): Ditto.
944 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
945 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
946 * mmo.c (mmo_find_inliner_info): Ditto.
947 * nlm-target.h (nlm_find_inliner_info): Ditto.
948 * pef.c (bfd_pef_find_inliner_info): Ditto.
949 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
950 * srec.c (srec_find_inliner_info): Ditto.
951 * tekhex.c (tekhex_find_inliner_info): Ditto.
952 * versados.c (versados_find_inliner_info): Ditto.
953 * xsym.c (bfd_sym_find_inliner_info): Ditto.
954
955 * ieee.c (ieee_find_inliner_info): New function that always
956 returns FALSE.
957 * oasys.c (oasys_find_inliner_info): Ditto.
958 * vms.c (vms_find_inliner_info): Ditto.
959
9602005-05-24 Alan Modra <amodra@bigpond.net.au>
961
962 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
963 force old plt layout.
964
9652005-05-22 Richard Henderson <rth@redhat.com>
966
967 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
968 sections.
969 (elf64_alpha_check_relocs): Likewise.
970 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
971 non-allocated sections.
972
9732005-05-22 Richard Henderson <rth@redhat.com>
974
975 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
976 undefweak to use zero register. Call elf64_alpha_relax_got_load
977 if not all uses removed.
978 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
979 (elf64_alpha_relax_section): Handle undefweak symbols.
980 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
981 (elf64_alpha_size_rela_got_1): Likewise.
982 (elf64_alpha_relocate_section): Likewise.
983
9842005-05-22 Richard Henderson <rth@redhat.com>
985
986 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
987 on SEC_CODE sections.
988
9892005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
990
991 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
992 unsigned int *.
993 (som_write_space_strings): Change type of tmp_space and p to char *.
994 (som_write_symbol_strings): Likewise. Also change type of comp to
995 char *comp[4].
996 (som_begin_writing): Change type of strings_size to unsigned int.
997 (som_finish_writing): Likewise.
998 (som_slurp_reloc_table): Change type of external_relocs to unsigned
999 char *.
1000 * som.h (struct som_section_data_struct): Change type of reloc_stream
1001 field to unsigned char *.
1002
10032005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
1004
1005 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
1006 copy relocations for VxWorks.
1007
10082005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
1009
1010 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
1011 has_sda_refs.
1012 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
1013 (ppc_elf_check_relocs): Set has_sda_refs.
1014 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
1015 copy relocations. Use has_sda_refs to place variables in .sbss.
1016 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
1017 .sbss.
1018
10192005-05-20 Bob Wilson <bob.wilson@acm.org>
1020
1021 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
1022 xtensa_default_isa is initialized.
1023
10242005-05-20 Alan Modra <amodra@bigpond.net.au>
1025
1026 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
1027 for second and subsequent list entries. Only allocate multiple
1028 glink stubs when shared or pie.
1029 (ppc_elf_finish_dynamic_symbol): Break out early when only one
1030 glink stub is needed.
1031
10322005-05-19 Zack Weinberg <zack@codesourcery.com>
1033
1034 * Makefile.am: Have 'all' depend on 'info'.
1035 * Makefile.in: Regenerate.
1036
10372005-05-19 Alan Modra <amodra@bigpond.net.au>
1038
1039 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
1040 init_offset. Add init_got_refcount, init_plt_refcount,
1041 init_got_offset and init_plt_offset.
1042 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
1043 (_bfd_elf_link_hash_hide_symbol): Likewise.
1044 (_bfd_elf_link_hash_table_init): Likewise.
1045 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1046 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1047 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
1048 (bfd_elf_size_dynamic_sections): Likewise.
1049 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
1050 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
1051 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
1052 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
1053 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
1054 (struct plt_entry): New.
1055 (ppc_elf_link_hash_table_create): Set new init_plt fields.
1056 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
1057 use _bfd_elf_link_hash_copy_indirect.
1058 (update_plt_info, find_plt_ent): New functions.
1059 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
1060 and adjust for use of plt list rather than refcount.
1061 (ppc_elf_gc_sweep_hook): Likewise.
1062 (ppc_elf_tls_optimize): Likewise.
1063 (ppc_elf_adjust_dynamic_symbol): Likewise.
1064 (allocate_dynrelocs): Likewise.
1065 (ppc_elf_relax_section): Likewise.
1066 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
1067 when performing a relocatable link.
1068 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
1069 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
1070 pic resolver stub.
1071
10722005-05-19 Alan Modra <amodra@bigpond.net.au>
1073
1074 * elf.c (assign_file_positions_for_segments): Use maximum of
1075 maxpagesize and section alignment when adjusting initial
1076 segment offset and section offsets.
1077
10782005-05-18 Zack Weinberg <zack@codesourcery.com>
1079
1080 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
1081 unconditional.
1082
10832005-05-18 H.J. Lu <hongjiu.lu@intel.com>
1084
1085 * elf.c (group_signature): Undo the last change. Check if the
1086 symbol table section is correct.
1087
10882005-05-17 Zack Weinberg <zack@codesourcery.com>
1089
1090 * elf32-arm.c: Wherever possible, use official reloc names
1091 from AAELF.
1092 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
1093 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
1094 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
1095 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
1096 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
1097 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
1098 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
1099 Add many new relocations from AAELF.
1100 (elf32_arm_howto_from_type): Update to match.
1101 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
1102 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
1103 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
1104 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
1105 (elf32_arm_final_link_relocate): Add support for
1106 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
1107 case entries redundant with default.
1108
1109 * reloc.c: Reorganize ARM relocations. Add Thumb
1110 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
1111 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
1112 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
1113 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
1114 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
1115 * bfd-in2.h, libbfd.h: Regenerate.
1116
11172005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
1118
1119 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
1120 elf_shstrtab.
1121 * format.c (bfd_check_format_matches): Set output_has_begun
1122 for both_direction.
1123 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
1124 special case for both_direction.
1125
11262005-05-17 Nick Clifton <nickc@redhat.com>
1127
1128 * elf.c (group_signature): Check for a group section which is
1129 actually a (corrupt) symbol table section in disguise and prevent
1130 an infinite loop from occurring.
1131
11322005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1133
1134 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
1135 2005-02-16.
1136
11372005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1138
1139 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
1140 predicate on slot 0 only if slot 0 isn't br.
1141
11422005-05-17 H.J. Lu <hongjiu.lu@intel.com>
1143
1144 PR 797
1145 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
1146 empty sdynbss section.
1147 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
1148
11492005-05-17 Tavis Ormandy <taviso@gentoo.org>
1150
1151 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
1152 dynamic sections.
1153
11542005-05-17 Alan Modra <amodra@bigpond.net.au>
1155
1156 * elf32-ppc.c (LIS_11. LIS_12): Define.
1157 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
1158 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
1159 for --data-plt when building non-pie executables.
1160
11612005-05-17 Nick Clifton <nickc@redhat.com>
1162
1163 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
1164 the situation where a symbols's section is not known but a section
1165 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
1166 OS.
1167
1168 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
1169 the presence of a symbol table to just before the symbol table is
1170 actually used.
1171
11722005-05-16 H.J. Lu <hongjiu.lu@intel.com>
1173
1174 PR 834
1175 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
1176 (elfNN_ia64_relax_section): Use it.
1177
11782005-05-14 Mark Kettenis <kettenis@gnu.org>
1179
1180 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
1181 of basename.
1182
11832005-05-14 Alan Modra <amodra@bigpond.net.au>
1184
1185 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
1186 not DT_PPC_GLINK.
1187 (ppc_elf_finish_dynamic_sections): Likewise.
1188
11892005-05-13 Fred Fish <fnf@specifixinc.com>
1190
1191 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
1192 * libbfd.h: Rebuilt.
1193
11942005-05-13 Bob Wilson <bob.wilson@acm.org>
1195
1196 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
1197 periods in linkonce_kind values.
1198
11992005-05-12 H.J. Lu <hongjiu.lu@intel.com>
1200
1201 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
1202 against protected function when building executable.
1203
12042005-05-12 Alan Modra <amodra@bigpond.net.au>
1205
1206 * elf32-ppc.c (LWZU_0_X_11): Delete.
1207 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
1208 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
1209 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
1210 table.
1211 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
1212 table.
1213 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
1214 Generate .glink branch table and updated stubs.
1215
12162005-05-11 Alan Modra <amodra@bigpond.net.au>
1217
1218 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
1219 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
1220 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
1221 (CROR_151515, CROR_313131): Delete.
1222 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
1223 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
1224 LWZU_0_X_11): Define.
1225 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
1226 and R_PPC_REL16_HA entries.
1227 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
1228 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
1229 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
1230 new_plt, and old_plt.
1231 (ppc_elf_create_dynamic_sections): Create .glink section.
1232 (ppc_elf_check_relocs): Set new_plt and old_plt.
1233 (ppc_elf_select_plt_layout): New function.
1234 (ppc_elf_tls_setup): Set plt output section elf type and flags.
1235 (allocate_got): Handle differences between old and new got layout.
1236 (allocate_dynrelocs): Likewise for plt.
1237 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
1238 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
1239 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
1240 destination of R_PPC_PLTREL24 relocs.
1241 (ppc_elf_relocate_section): Handle new relocs and changed destination
1242 of R_PPC_PLTREL24.
1243 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
1244 differences in layout.
1245 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
1246 put a blrl in new got. Write glink contents.
1247 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
1248 * libbfd.h: Regenerate.
1249 * bfd-in2.h: Regenerate.
1250
12512005-05-11 Andreas Schwab <schwab@suse.de>
1252
1253 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
1254 warning.
1255
12562005-05-10 H.J. Lu <hongjiu.lu@intel.com>
1257
1258 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
1259 section if SEC_ALLOC isn't set.
1260
12612005-05-09 Kelley Cook <kcook@gcc.gnu.org>
1262
1263 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
1264 * acinclude.m4: Don't sinclude accross.m4.
1265 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
1266
12672005-05-09 Alan Modra <amodra@bigpond.net.au>
1268
1269 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
1270 (ppc64_elf_add_symbol_hook): Set has_dotsym.
1271 (ppc64_elf_check_directives): Only process syms when has_dotsym.
1272 (func_desc_adjust): Hide fake function descriptors when function
1273 code entry is defined.
1274 (adjust_opd_syms): Adjust for deleted_section becoming union field.
1275
12762005-05-09 Alan Modra <amodra@bigpond.net.au>
1277
1278 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
1279
12802005-05-08 Dave Korn <dave.korn@artimi.com>
1281
1282 * coff-tic80.c: Undefine _CONST after system headers to prevent
1283 clash with tic80-specific definition in include/coff/tic80.h
1284
12852005-05-08 H.J. Lu <hongjiu.lu@intel.com>
1286
1287 PR 939
1288 * elflink.c (elf_link_output_extsym): Use output_bfd if
1289 h->root.u.def.section is bfd_abs_section_ptr when reporting
1290 error.
1291
12922005-05-07 H.J. Lu <hongjiu.lu@intel.com>
1293
1294 * elf-bfd.h (elf_backend_data): Update special_sections to
1295 array of pointer to bfd_elf_special_section.
1296 * elf.c (special_sections): Likewise.
1297 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
1298 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1299 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1300 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1301 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1302 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
1303 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1304 * elf32-v850.c (v850_elf_special_sections): Likewise.
1305 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1306 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1307 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1308 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1309 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1310 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1311 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1312 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
1313
1314 * elf.c (get_special_section): Updated.
1315
13162005-05-07 Alan Modra <amodra@bigpond.net.au>
1317
1318 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
1319 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
1320 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
1321 got_symbol_offset.
1322 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
1323 * elf32-frv.c (_frv_create_got_section): Likewise.
1324 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
1325 (elf_backend_got_symbol_offset): Don't define.
1326 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
1327 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
1328 and got_gap.
1329 (ppc_elf_create_got): Tidy.
1330 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
1331 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
1332 (ppc_elf_gc_sweep_hook): Likewise.
1333 (ppc_elf_relocate_section): Likewise.
1334 (ppc_elf_finish_dynamic_symbol): Likewise.
1335 (allocate_got): New function.
1336 (allocate_dynrelocs): Use allocate_got.
1337 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
1338 so that local got can refcount it. Set got_header_size.
1339 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
1340 coded 4.
1341 (ppc_elf_finish_dynamic_sections): Likewise.
1342 (elf_backend_got_symbol_offset): Don't define.
1343 (elf_backend_got_header_size): Ditto.
1344
13452005-05-05 Steve Ellcey <sje@cup.hp.com>
1346
1347 * configure.in (ACX_HEADER_STRING): New.
1348 * configure: Regenerate.
1349 * config.in: Regenerate.
1350 * sysdep.h (STRING_WITH_STRINGS): Use.
1351
13522005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1353
1354 * elf.c (_bfd_elf_close_and_cleanup): Only call
1355 _bfd_dwarf2_cleanup_debug_info on bfd_object.
1356
13572005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1358
1359 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
1360 "__bss_start" instead of "_edata" as fallback.
1361
13622005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1363
1364 * bfd-in2.h: Regenerated.
1365
13662005-05-05 Paul Brook <paul@codesourcery.com>
1367
1368 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
1369 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
1370 elf-vxworks.lo.
1371 * configure: Regenerate.
1372 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
1373 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
1374 (elf32-i386.lo): Depend on elf-vxworks.h.
1375 (elf-vxworks.lo): New rule.
1376 * Makefile.in: Regenerate.
1377 * elf-bfd.h (elf_backend_data): Update type of
1378 elf_backend_emit_relocs.
1379 (_bfd_elf_link_output_relocs): Update prototype.
1380 * elflink.c (_bfd_elf_link_output_relocs): Always use
1381 bed->elf_backend_emit_relocs when outputting relocations.
1382 * elfxx-target.h (elf_backend_emit_relocs): Default to
1383 _bfd_elf_link_output_relocs.
1384 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
1385 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
1386 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
1387 (elf_i386_plt0_entry): Remove padding.
1388 (elf_i386_pic_plt0_entry): Ditto.
1389 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
1390 (PLT_NON_JUMP_SLOT_RELOCS): Define.
1391 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
1392 plt0_pad_byte fields.
1393 (elf_i386_link_hash_table_create): Zero them.
1394 (elf_i386_create_dynamic_sections): Create static relocation section.
1395 (allocate_dynrelocs): Allocate space for static PLT relocations.
1396 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
1397 symbols. Give PLT symbols function type. Don't strip PLT sections
1398 if we have exported symbols from them.
1399 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
1400 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
1401 VxWorks.
1402 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
1403 Add relocation for GOT location. Fill in PLT static relocations.
1404 (elf_i386_vxworks_link_hash_table_create): New function.
1405 (elf_i386_vxworks_link_output_symbol_hook): New function.
1406 * elf-vxworks.h: New file.
1407
14082005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1409
1410 * section.c (bfd_make_section_anyway_with_flags): New.
1411 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
1412 (bfd_make_section_with_flags): New.
1413 (bfd_make_section): Call bfd_make_section_with_flags.
1414
1415 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
1416 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
1417 instead of bfd_make_section/bfd_make_section and don't call
1418 bfd_set_section_flags.
1419 (mn10300_elf_check_relocs): Likewise.
1420 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
1421 * elf32-arm.c (create_got_section): Likewise.
1422 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
1423 (elf32_arm_check_relocs): Likewise.
1424 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1425 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
1426 (_frv_create_got_section): Likewise.
1427 (elf32_frvfdpic_create_dynamic_sections): Likewise.
1428 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1429 (elf32_hppa_check_relocs): Likewise.
1430 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
1431 (i370_elf_check_relocs): Likewise.
1432 * elf32-i386.c (create_got_section): Likewise.
1433 (elf_i386_check_relocs): Likewise.
1434 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
1435 (create_got_section): Likewise.
1436 (m32r_elf_create_dynamic_sections): Likewise.
1437 (m32r_elf_check_relocs): Likewise.
1438 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1439 * elf32-ppc.c (ppc_elf_create_got): Likewise.
1440 (ppc_elf_create_dynamic_sections): Likewise.
1441 (ppc_elf_add_symbol_hook): Likewise.
1442 (ppc_elf_check_relocs): Likewise.
1443 * elf32-s390.c (create_got_section): Likewise.
1444 (elf_s390_check_relocs): Likewise.
1445 * elf32-sh.c (create_got_section): Likewise.
1446 (sh_elf_create_dynamic_sections): Likewise.
1447 (sh_elf_check_relocs): Likewise.
1448 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1449 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1450 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1451 (add_extra_plt_sections): Likewise.
1452 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1453 (elf64_alpha_create_got_section): Likewise.
1454 (elf64_alpha_create_dynamic_sections): Likewise.
1455 (elf64_alpha_check_relocs): Likewise.
1456 * elf64-hppa.c (get_reloc_section): Likewise.
1457 (get_opd): Likewise.
1458 (get_plt): Likewise.
1459 (get_dlt): Likewise.
1460 (get_stub): Likewise.
1461 (elf64_hppa_create_dynamic_sectionso): Likewise.
1462 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
1463 * elf64-ppc.c (create_linkage_sections): Likewise.
1464 (ppc64_elf_check_relocs): Likewise.
1465 * elf64-s390.c (create_got_section): Likewise.
1466 (elf_s390_check_relocs): Likewise.
1467 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1468 (sh64_elf64_create_dynamic_sections): Likewise.
1469 * elf64-x86-64.c (create_got_section): Likewise.
1470 (elf64_x86_64_check_relocs): Likewise.
1471 * elflink.c (_bfd_elf_create_got_section): Likewise.
1472 (_bfd_elf_link_create_dynamic_sections): Likewise.
1473 (elf_link_add_object_symbols): Likewise.
1474 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1475 (elfNN_ia64_create_dynamic_sections): Likewise.
1476 (get_fptr): Likewise.
1477 (get_pltoff): Likewise.
1478 (get_reloc_section): Likewise.
1479 (elfNN_ia64_object_p): Likewise.
1480 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
1481 (mips_elf_create_compact_rel_section): Likewise.
1482 (mips_elf_create_got_section): Likewise.
1483 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1484 * elfxx-sparc.c (create_got_section): Likewise.
1485 (_bfd_sparc_elf_check_relocs): Likewise.
1486
1487 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
1488 on linker created sections.
1489
14902005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1491
1492 PR 882
1493 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
1494 script on executable.
1495
14962005-05-05 John Levon <levon@movementarian.org>
1497
1498 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
1499 allocated memory before returning.
1500 (decode_line_info): Likewise.
1501 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
1502 allocated by functions in this file.
1503 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
1504 * elf.c (_bfd_elf_close_and_cleanup): Call
1505 _bfd_dwarf2_cleanup_debug_info.
1506
15072005-05-05 Hans-Peter Nilsson <hp@axis.com>
1508
1509 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
1510 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
1511 * configure, config.in, Makefile.in: Regenerate.
1512 * sysdep.h (stpcpy): Revert last change.
1513
15142005-05-05 Hans-Peter Nilsson <hp@axis.com>
1515
1516 * sysdep.h (stpcpy): Wrap declaration in parentheses.
1517
15182005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1519
1520 * elfxx-ia64.c (ARCH_SIZE): New.
1521 (LOG_SECTION_ALIGN): Likewise.
1522 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
1523 align relocation sections.
1524 (get_fptr): Likewise.
1525 (get_reloc_section): Likewise.
1526 (elfNN_ia64_tprel_base): Likewise.
1527 (elfNN_ia64_check_relocs): Support 32bit relocations.
1528 (allocate_global_fptr_got): Likewise.
1529 (allocate_dynrel_entries): Likewise.
1530 (set_got_entry): Likewise.
1531 (set_pltoff_entry): Likewise.
1532 (elfNN_ia64_relocate_section): Likewise.
1533
15342005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1535
1536 * configure.in: Add AC_CHECK_DECLS(stpcpy).
1537 * configure: Regenerate.
1538 * config.in: Likewise.
1539
1540 * sysdep.h (stpcpy): New.
1541
15422005-05-04 Nick Clifton <nickc@redhat.com>
1543
1544 * Update the address and phone number of the FSF organization in
1545 the GPL notices in the following files:
1546 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
1547 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
1548 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
1549 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
1550 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
1551 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
1552 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
1553 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
1554 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
1555 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
1556 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
1557 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
1558 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
1559 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
1560 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
1561 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
1562 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
1563 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
1564 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
1565 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
1566 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
1567 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
1568 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
1569 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
1570 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
1571 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
1572 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
1573 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
1574 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
1575 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
1576 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
1577 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
1578 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
1579 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1580 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
1581 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
1582 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
1583 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
1584 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
1585 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
1586 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
1587 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
1588 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
1589 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
1590 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
1591 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
1592 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
1593 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
1594 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
1595 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
1596 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
1597 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
1598 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
1599 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
1600 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
1601 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
1602 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
1603 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
1604 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
1605 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
1606 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
1607 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
1608 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
1609 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
1610 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
1611 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
1612 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
1613 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
1614 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
1615 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
1616 hosts/alphavms.h
1617
16182005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1619
1620 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
1621 * bfd-in2.h: Regenerated.
1622
1623 * elflink.c (bfd_elf_set_symbol): New.
1624 (_bfd_elf_provide_symbol): Call it.
1625 (_bfd_elf_provide_section_bound_symbols): New.
1626
16272005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1628
1629 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
1630 at the end, if a strong definition has already been seen.
1631
16322005-05-04 Alan Modra <amodra@bigpond.net.au>
1633
1634 * section.c (struct bfd_section): Replace link_order_head and
1635 link_order_tail with map_head and map_tail union.
1636 (STD_SECTION): Update.
1637 (_bfd_strip_section_from_output): Delete.
1638 * aoutx.h: Update throughout for above changes.
1639 * coff-ppc.c: Likewise.
1640 * cofflink.c: Likewise.
1641 * ecoff.c: Likewise.
1642 * elf-eh-frame.c: Likewise.
1643 * elf-m10300.c: Likewise.
1644 * elf.c: Likewise.
1645 * elf32-arm.c: Likewise.
1646 * elf32-cris.c: Likewise.
1647 * elf32-hppa.c: Likewise.
1648 * elf32-i386.c: Likewise.
1649 * elf32-m32r.c: Likewise.
1650 * elf32-m68hc1x.c: Likewise.
1651 * elf32-m68k.c: Likewise.
1652 * elf32-ppc.c: Likewise.
1653 * elf32-s390.c: Likewise.
1654 * elf32-sh.c: Likewise.
1655 * elf32-vax.c: Likewise.
1656 * elf32-xtensa.c: Likewise.
1657 * elf64-alpha.c: Likewise.
1658 * elf64-hppa.c: Likewise.
1659 * elf64-ppc.c: Likewise.
1660 * elf64-s390.c: Likewise.
1661 * elf64-sh64.c: Likewise.
1662 * elf64-x86-64.c: Likewise.
1663 * elflink.c: Likewise.
1664 * elfxx-ia64.c: Likewise.
1665 * elfxx-mips.c: Likewise.
1666 * elfxx-sparc.c: Likewise.
1667 * linker.c: Likewise.
1668 * merge.c: Likewise.
1669 * pdp11.c: Likewise.
1670 * xcofflink.c: Likewise.
1671 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
1672 out from bfd_elf_size_dynamic_sections.
1673 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
1674 * bfd-in2.h: Regenerate.
1675
16762005-05-04 Alan Modra <amodra@bigpond.net.au>
1677
1678 * section.c (bfd_section_list_remove): Don't clear s->next.
1679 (bfd_section_list_append): Always init s->prev.
1680 (bfd_section_list_prepend): Define.
1681 (bfd_section_list_insert_after): Minor optimization.
1682 (bfd_section_removed_from_list): Rewrite.
1683 * elf.c (assign_section_numbers): Simplify list traversal now that
1684 bfd_section_list_remove doesn't destroy removed section next ptr.
1685 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1686 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
1687 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
1688 * bfd-in2.h: Regenerate.
1689
16902005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1691
1692 * bfd.c (bfd): Remove section_tail and add section_last.
1693 (bfd_preserve): Likewise.
1694 (bfd_preserve_save): Likewise.
1695 (bfd_preserve_restore): Likewise.
1696 * opncls.c (_bfd_new_bfd): Likewise.
1697
1698 * coffcode.h (coff_compute_section_file_positions): Updated.
1699 (coff_compute_section_file_positions): Likewise.
1700 * elf.c (assign_section_numbers): Likewise.
1701 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1702 * elf64-mmix.c (mmix_elf_final_link): Likewise.
1703 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
1704 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1705 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1706 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1707
1708 * ecoff.c (bfd_debug_section): Initialize prev.
1709
1710 * section.c (bfd_section): Add prev.
1711 (bfd_section_list_remove): Updated.
1712 (bfd_section_list_append): New.
1713 (bfd_section_list_insert_after): New.
1714 (bfd_section_list_insert_before): New.
1715 (bfd_section_list_insert): Removed.
1716 (bfd_section_removed_from_list): Updated.
1717 (STD_SECTION): Initialize prev.
1718 (bfd_section_init): Updated.
1719 (bfd_section_list_clear): Updated.
1720
1721 * bfd-in2.h: Regenerated.
1722
17232005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1724
1725 * elf.c (_bfd_elf_new_section_hook): Don't call
1726 _bfd_elf_get_sec_type_attr on sections from input files.
1727
17282005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1729
1730 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
1731 hash table size 16699 instead of bfd_hash_table_init.
1732
17332005-05-01 Paul Brook <paul@codesourcery.com>
1734
1735 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
1736 definition has already been seen.
1737
17382005-05-01 Paul Brook <paul@codesourcery.com>
1739
1740 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
1741 R_ARM_PLT32 the same as R_ARM_PC24.
1742 (arm_add_to_rel): Ditto.
1743
17442005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
1745
1746 * config.bfd: Add h8300*-*-rtemscoff.
1747 Switch h8300*-*-rtems* to elf.
1748
17492005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
1750
1751 * aclocal.m4, Makefile.in: Regnerated.
1752
17532005-04-28 Paul Brook <paul@codesourcery.com>
1754
1755 Merge changes only applied to Makefile.in.
1756 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
1757 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1758 (elfxx-sparc.lo): New rule.
1759 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1760 (elf64-sparc.lo): Likewise.
1761
17622005-04-28 Julian Brown <julian@codesourcery.com>
1763
1764 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
1765 import.
1766
17672005-04-27 H.J. Lu <hongjiu.lu@intel.com>
1768
1769 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
1770
1771 * elf.c (bfd_elf_sym_name): Updated.
1772 (group_signature): Likewise.
1773 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1774 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
1775 (ppc64_elf_edit_toc): Likewise.
1776 (ppc64_elf_relocate_section): Likewise.
1777 * elfcode.h (elf_slurp_symbol_table): Likewise.
1778 * elflink.c (elf_link_input_bfd): Likewise.
1779
1780 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
1781 bfd_elf_sym_name to get local symbol name when reporting errors.
1782
17832005-04-27 Nick Clifton <nickc@redhat.com>
1784
1785 * elflink.c (elf_link_input_bfd): Handle the case where a badly
1786 formatted input file results in a reloc which has no associated
1787 global symbol.
1788
17892005-04-26 Jerome Guitton <guitton@gnat.com>
1790
1791 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
1792
17932005-04-25 David S. Miller <davem@davemloft.net>
1794
1795 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
1796 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
1797 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
1798 Likewise.
1799
18002005-04-25 H.J. Lu <hongjiu.lu@intel.com>
1801
1802 PR 858
1803 * elflink.c (elf_link_input_bfd): Make non-debugging reference
1804 to discarded section an error.
1805
18062005-04-21 Jerome Guitton <guitton@gnat.com>
1807
1808 * configure.in: Replace BFD_NEED_DECLARATION checks by the
1809 corresponding AC_CHECK_DECLS.
1810 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
1811 HAVE_DECL_*.
1812 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
1813 * configure: Regenerate.
1814 * config.in: Ditto.
1815
18162005-04-21 Andreas Schwab <schwab@suse.de>
1817
1818 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
1819 unsigned from type of dynamic_interpreter.
1820 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
1821 casts again.
1822
1823 * elf.c (assign_section_numbers): Fix comment.
1824
18252005-04-21 Jerome Guitton <guitton@gnat.com>
1826
1827 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
1828 for struct som_exec_auxhdr fields.
1829
18302005-04-21 Nick Clifton <nickc@redhat.com>
1831
1832 * aout-adobe.c: Convert to ISO C and fix formatting.
1833 * aout-arm.c: Convert to ISO C and fix formatting.
1834 * aout-cris.c: Convert to ISO C and fix formatting.
1835 * aout-ns32k.c: Convert to ISO C and fix formatting.
1836 * aout-tic30.c: Convert to ISO C and fix formatting.
1837 * coffcode.h: Convert to ISO C and fix formatting.
1838 * coffswap.h: Convert to ISO C and fix formatting.
1839 * i386aout.c: Convert to ISO C and fix formatting.
1840 * libaout.h: Convert to ISO C and fix formatting.
1841 * libcoff-in.h: Convert to ISO C and fix formatting.
1842 * libcoff.h: Convert to ISO C and fix formatting.
1843 * libecoff.h: Convert to ISO C and fix formatting.
1844 * libnlm.h: Convert to ISO C and fix formatting.
1845 * libpei.h: Convert to ISO C and fix formatting.
1846 * libxcoff.h: Convert to ISO C and fix formatting.
1847 * nlm-target.h: Convert to ISO C and fix formatting.
1848 * nlm.c: Convert to ISO C and fix formatting.
1849 * nlm32-alpha.c: Convert to ISO C and fix formatting.
1850 * nlm32-i386.c: Convert to ISO C and fix formatting.
1851 * nlm32-ppc.c: Convert to ISO C and fix formatting.
1852 * nlm32-sparc.c: Convert to ISO C and fix formatting.
1853 * nlmcode.h: Convert to ISO C and fix formatting.
1854 * nlmswap.h: Convert to ISO C and fix formatting.
1855 * pe-mips.c: Convert to ISO C and fix formatting.
1856 * peXXigen.c: Convert to ISO C and fix formatting.
1857 * peicode.h: Convert to ISO C and fix formatting.
1858 * vms-gsd.c: Convert to ISO C and fix formatting.
1859 * vms-hdr.c: Convert to ISO C and fix formatting.
1860 * vms-misc.c: Convert to ISO C and fix formatting.
1861 * vms-tir.c: Convert to ISO C and fix formatting.
1862 * vms.c: Convert to ISO C and fix formatting.
1863 * vms.h: Convert to ISO C and fix formatting.
1864
1865 * coffgen.c (coff_print_symbol): Restore correct formatting of
1866 output.
1867
18682005-04-20 David S. Miller <davem@davemloft.net>
1869
1870 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
1871 (_bfd_sparc_elf_link_hash_table_create): Likewise.
1872 (allocate_dynrelocs): Likewise.
1873
18742005-04-20 Jerome Guitton <guitton@gnat.com>
1875
1876 * configure.in: Fix the check for basename declaration. Add check
1877 for declarations of ftello, ftello64, fseeko, fseeko64.
1878 * configure: Regenerate.
1879 * config.in: Ditto.
1880 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
1881
18822005-04-19 David S. Miller <davem@davemloft.net>
1883
1884 * elfxx-sparc.c: New file.
1885 * elfxx-sparc.h: New file.
1886 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
1887 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1888 (elfxx-sparc.lo): New rule.
1889 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1890 (elf64-sparc.lo): Likewise.
1891 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
1892 (bfd_elf64_sparc_vec): Likewise.
1893 * configure: Regenerate.
1894 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
1895 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
1896 which is more consistent with elf32-sparc.c
1897
18982005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
1899
1900 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
1901 (mips_elf_create_local_got_entry): Check h->root.forced_local.
1902
19032005-04-19 Alan Modra <amodra@bigpond.net.au>
1904
1905 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
1906 dynamic relocs in non-SEC_ALLOC sections.
1907 (ppc_elf_gc_sweep_hook): Likewise.
1908 (ppc_elf_relax_section): Likewise.
1909 (ppc_elf_relocate_section): Likewise.
1910
19112005-04-18 Nick Clifton <nickc@redhat.com>
1912
1913 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
1914 assigning a value to return_value.
1915
19162005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1917
1918 PR 855
1919 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
1920 created group data.
1921
19222005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1923
1924 PR 855
1925 * elf.c (setup_group): Properly handle zero group count.
1926
19272005-04-17 Mark Kettenis <kettenis@gnu.org>
1928
1929 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
1930 (som_is_subspace, compare_subspaces, som_compute_checksum)
1931 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
1932 protoypes.
1933 (hppa_som_reloc, compare_syms, compare_subspaces)
1934 (som_print_symbol, som_get_section_contents)
1935 (som_set_section_contents): Remove space after 'void *'.
1936 (som_bfd_print_private_bfd_data): Use %lx to print longs.
1937 (som_bfd_merge_private_bfd_data)
1938 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
1939 defines.
1940
19412004-04-15 Julian Brown <julian@codesourcery.com>
1942
1943 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1944 * bfd-in2.h: Regenerate.
1945 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
1946 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
1947 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
1948 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
1949 relocations if requested to.
1950 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
1951 use_blx rather than symbian_p.
1952 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
1953 use_blx is in effect.
1954 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
1955 for SymbianOS.
1956
19572005-04-15 Nick Clifton <nickc@redhat.com>
1958
1959 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
1960 values.
1961
19622005-04-15 Alan Modra <amodra@bigpond.net.au>
1963
1964 PR ld/815
1965 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
1966 used as a list pointer.
1967
19682005-04-14 Alan Modra <amodra@bigpond.net.au>
1969
1970 * Makefile.am (NO_WERROR): Define.
1971 * warning.m4: New file
1972 * acinclude.m4: Include warning.m4.
1973 * configure.in: Invoke AM_BINUTILS_WARNINGS.
1974 * Makefile.in: Regenerate.
1975 * configure: Regenerate.
1976
19772005-04-14 Alan Modra <amodra@bigpond.net.au>
1978
1979 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
1980 Write trailing padding.
1981
1982 * merge.c (merge_strings): Round up section size for alignment.
1983
19842005-04-14 David S. Miller <davem@davemloft.net>
1985
1986 Add TLS support for 64-bit Sparc ELF.
1987 * elf64-sparc.c (sparc64_elf_dyn_relocs,
1988 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
1989 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
1990 sparc64_elf_hash_entry, sparc64_elf_tdata,
1991 sparc64_elf_local_got_tls_type): New defines.
1992 (sparc64_elf_mkobject): New function.
1993 (sparc64_elf_link_hash_table): Add members for dynamic linker
1994 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
1995 uion to track TLS GOT references. Add sym_sec to cache
1996 mappings from local sym to section.
1997 (link_hash_newfunc): New function.
1998 (sparc64_elf_bfd_link_hash_table_create): Rename to
1999 sparc64_elf_link_hash_table_create for consistency.
2000 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
2001 (sparc64_elf_create_dynamic_sections): Initialize new section
2002 members of sparc64_elf_link_hash_table. Only init srelbss
2003 if not-shared.
2004 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
2005 New functions.
2006 (SPARC_NOP): Define.
2007 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
2008 sparc64_elf_plt_ptr_offset): Delete.
2009 (sparc64_plt_entry_build): New function to build PLT entries
2010 gradually instread of all at once at the end of linking.
2011 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
2012 local vars. Get them from sparc64_elf_hash_table instead.
2013 Check early on if r_symndx is in bounds. Handle TLS transitions.
2014 Account for TLS GOT references and DF_STATIC_TLS, as needed.
2015 For TLS relocs, record the tls_type in either
2016 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
2017 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
2018 to the __tls_get_addr symbol. For PLT relocs, track references
2019 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
2020 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
2021 symbol references, count the number of relocations needed for
2022 that symbol. For default switch case, don't error, this lets
2023 the TLS relocs not explicitly handled by this function get
2024 accepted.
2025 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
2026 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
2027 it from sparc64_elf_hash_table. Store the real PLT offset
2028 in h->plt.offset, and build PLT entries one at a time. Also
2029 get .dynbss section pointer from htab.
2030 (allocate_dynrelocs, readonly_dynrelocs,
2031 sparc64_omit_section_dynsym): New functions.
2032 (sparc64_elf_omit_section_dynsym): Use these new functions as
2033 helpers.
2034 (dtpoff_base, tpoff): New functions.
2035 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
2036 locals, get them from sparc64_elf_hash_table. Handle TLS
2037 relocations and refcounting in main relocation loop.
2038 (sparc64_elf_finish_dynamic_symbol): Use
2039 sparc64_elf_link_hash_table. Build PLT entries as we see
2040 them. Handle TLS GOT relocations.
2041 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
2042 from sparc64_elf_hash_table. Initialize only PLT header
2043 not all entries since we not build PLT entries one by one.
2044 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
2045 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
2046 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
2047
20482005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
2049
2050 * elflink.c (elf_link_input_bfd): Update check for removed
2051 sections.
2052
20532005-04-12 Alan Modra <amodra@bigpond.net.au>
2054
2055 * Makefile.am: Run "make dep-am".
2056 * Makefile.in: Regenerate.
2057 * aclocal.m4: Regenerate.
2058 * libcoff.h: Regenerate.
2059
20602005-04-11 H.J. Lu <hongjiu.lu@intel.com>
2061
2062 * linker.c (_bfd_generic_link_output_symbols): Also check if
2063 the output section of an input section has been removed from
2064 the output file.
2065
2066 * section.c (bfd_section_list_remove): Clear the next field
2067 of the removed section.
2068 (bfd_section_removed_from_list): New.
2069 * bfd-in2.h: Regenerated.
2070
20712005-04-11 David S. Miller <davem@davemloft.net>
2072
2073 * elf32-sparc.c (elf32_sparc_relocate_section,
2074 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
2075 R_SPARC_TLS_LE_{HIX22,LOX10}.
2076 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
2077 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
2078 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
2079 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
2080
20812005-04-11 H.J. Lu <hongjiu.lu@intel.com>
2082
2083 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
2084
20852005-04-11 Nick Clifton <nickc@redhat.com>
2086
2087 * aout-target.h: Convert to ISO C.
2088 * aoutf1.h: Convert to ISO C.
2089 * aoutx.h: Convert to ISO C.
2090 * bout.c: Convert to ISO C.
2091 * dwarf1.c: Convert to ISO C.
2092 * ecoffswap.h: Convert to ISO C.
2093 * freebsd.h: Convert to ISO C.
2094 * genlink.h: Convert to ISO C.
2095 * ieee.c: Convert to ISO C.
2096 * ihex.c: Convert to ISO C.
2097 * libcoff-in.h: Convert to ISO C.
2098 * mach-o.c: Convert to ISO C.
2099 * mach-o.h: Convert to ISO C.
2100 * netbsd.h: Convert to ISO C.
2101 * ns32k.h: Convert to ISO C.
2102 * ns32knetbsd.c: Convert to ISO C.
2103 * oasys.c: Convert to ISO C.
2104 * pdp11.c: Convert to ISO C.
2105 * pef-traceback.h: Convert to ISO C.
2106 * pef.c: Convert to ISO C.
2107 * pef.h: Convert to ISO C.
2108 * riscix.c: Convert to ISO C.
2109 * som.c: Convert to ISO C.
2110 * som.h: Convert to ISO C.
2111 * srec.c: Convert to ISO C.
2112 * stabs.c: Convert to ISO C.
2113 * sunos.c: Convert to ISO C.
2114 * tekhex.c: Convert to ISO C.
2115 * versados.c: Convert to ISO C.
2116 * version.h: Convert to ISO C.
2117 * xcoff-target.h: Convert to ISO C.
2118 * xcofflink.c: Convert to ISO C.
2119 * xsym.c: Convert to ISO C.
2120 * xsym.h: Convert to ISO C.
2121
21222005-04-08 Paul Brook <paul@codesourcery.com>
2123
2124 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
2125 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
2126 (ARM2THUMB_PIC_GLUE_SIZE): Define.
2127 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
2128 (elf32_arm_to_thumb_stub): Create PIC stubs.
2129 (record_arm_to_thumb_glue): Use different stub size for relocatable
2130 images.
2131
21322005-04-05 Alan Modra <amodra@bigpond.net.au>
2133
2134 * elf64-ppc.c (dec_dynrel_count): New function split out from
2135 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
2136 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
2137 (ppc64_elf_tls_optimize): Likewise.
2138
21392005-04-05 Mark Kettenis <kettenis@gnu.org>
2140
2141 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
2142 CORE_WCOOKIE_OFFSET.
2143 (SPARC64_WCOOKIE_OFFSET): New.
2144 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
2145
21462005-04-05 Nick Clifton <nickc@redhat.com>
2147
2148 * po/rw.po: New translation: Kinyarwanda
2149 * configure.in (ALL_LINGUAS): Add rw
2150 * configure: Regenerate.
2151
21522005-04-05 Richard Sandiford <rsandifo@redhat.com>
2153
2154 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
2155 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
2156 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
2157 section flags.
2158 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
2159 to check for SHT_MIPS_OPTIONS sections.
2160 (_bfd_mips_elf_set_section_contents): Likewise.
2161
21622005-04-04 Eric Christopher <echristo@redhat.com>
2163
2164 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
2165 Clean up gp handling code.
2166
21672005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2168
2169 * elf.c (bfd_elf_set_group_contents): Ignore linker created
2170 group section.
2171 (assign_section_numbers): Accept link_info. Check SHT_GROUP
2172 sections for relocatable files only. Remove the linker created
2173 group sections.
2174 (_bfd_elf_compute_section_file_positions): Pass link_info to
2175 assign_section_numbers.
2176
2177 * elfxx-ia64.c (elfNN_ia64_object_p): New.
2178 (elf_backend_object_p): Defined.
2179
21802005-04-04 H.J. Lu <hongjiu.lu@intel.com>
2181
2182 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
2183
21842005-04-03 Fred Fish <fnf@specifixinc.com>
2185
2186 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
2187 dwarf_ranges_size members.
2188 (struct comp_unit): Add base_address member.
2189 (struct funcinfo): Replace low/high members with an arange.
2190 (arange_add): Replace incoming "unit" parameter with "abfd" and
2191 "first_arange" pointers. Reorganize/rewrite function body.
2192 (decode_line_info): Change arange_add call to pass bfd and arange
2193 pointers.
2194 (lookup_address_in_line_info_table): Use arange list instead of
2195 individual low/high members. Walk function's arange list to find
2196 lowest PC in list, to test for overlapping functions.
2197 (read_debug_ranges): New function, reads the debug_ranges section.
2198 (lookup_address_in_function_table): Use arange list instead of
2199 individual low/high members. Rewrite to find smallest range that
2200 matches.
2201 (read_rangelist): Read a given rangelist from debug_ranges.
2202 (scan_unit_for_functions): Use arange list instead of individual
2203 low/high members. Handle a DW_AT_ranges attribute.
2204 (parse_comp_unit): Use arange list instead of individual low/high
2205 members. Save comp unit base address. Handle a DW_AT_ranges
2206 attribute.
2207
22082005-04-01 H.J. Lu <hongjiu.lu@intel.com>
2209
2210 * elf.c (assign_section_numbers): Really use the kept section.
2211
22122005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2213
2214 * elf-bfd.h (_bfd_elf_check_kept_section): New.
2215
2216 * elf.c (assign_section_numbers): When sh_link points to a
2217 discarded section, call _bfd_elf_check_kept_section to see if
2218 the kept section can be used. Otherwise reject sh_link
2219 pointing to discarded section.
2220
2221 * elflink.c (_bfd_elf_check_kept_section): New.
2222 (elf_link_input_bfd): Use it.
2223
22242005-04-01 Alan Modra <amodra@bigpond.net.au>
2225
2226 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
2227 that we no longer need.
2228
22292005-04-01 Alan Modra <amodra@bigpond.net.au>
2230
2231 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
2232 rather than 0.
2233 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
2234
22352005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2236
2237 * elf.c (assign_section_numbers): Fix a typo.
2238
22392005-03-31 H.J. Lu <hongjiu.lu@intel.com>
2240
2241 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
2242 error message.
2243 (_bfd_elf_section_already_linked): Likewise.
2244
22452005-03-31 Jerome Guitton <guitton@gnat.com>
2246
2247 * config.in: Regenerate.
2248
22492005-03-31 Jerome Guitton <guitton@gnat.com>
2250
2251 * config.in (HAVE_DECL_BASENAME): New configure macro.
2252 * configure.in: Check for basename.
2253 * configure: Regenerate.
2254
22552005-03-30 Julian Brown <julian@codesourcery.com>
2256
2257 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
2258 bfd_elf32_is_arm_mapping_symbol_name.
2259 * bfd-in2.h: Regenerate.
2260 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
2261 bfd_elf32_is_arm_mapping_symbol_name.
2262 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
2263 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
2264 (arm_elf_find_function): Likewise.
2265 (elf32_arm_output_symbol_hook): Likewise.
2266
22672005-03-30 Julian Brown <julian@codesourcery.com>
2268
2269 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
2270 * bfd-in2.h: Regenerate.
2271 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
2272 bfd_elf32_is_arm_mapping_symbol_name.
2273 (elf32_arm_output_symbol_hook): Likewise.
2274 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
2275 mapping symbols.
2276 (is_arm_mapping_symbol_name): Function moved from here...
2277 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
2278 and made global.
2279
22802005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2281
2282 * configure.in: Check for ffs decl and alphabetize.
2283 * config.in: Regenerate.
2284 * configure: Regenerate.
2285 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
2286
22872005-03-29 Fred Fish <fnf@specifixinc.com>
2288
2289 * dwarf2.c (struct comp_unit): Fix typo.
2290 (scan_unit_for_functions): Remove unused local variable "name"
2291 and dead code that set it.
2292
22932005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2294 Phil Blundell <philb@gnu.org>
2295
2296 * bfd-in2.h, libbfd.h: Regenerated.
2297 * reloc.c: Add ARM TLS relocations.
2298 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
2299 relocations.
2300 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
2301 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
2302 (elf32_arm_tls_ie32_howto): New.
2303 (elf32_arm_howto_from_type): Support TLS relocations.
2304 (elf32_arm_reloc_map): Likewise.
2305 (elf32_arm_reloc_type_lookup): Likewise.
2306 (TCB_SIZE): Define.
2307 (struct elf32_arm_obj_tdata): New.
2308 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
2309 (elf32_arm_mkobject): New function.
2310 (struct elf32_arm_relocs_copied): Add pc_count.
2311 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
2312 (GOT_TLS_IE): Define.
2313 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
2314 (elf32_arm_link_hash_newfunc): Initialize tls_type.
2315 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
2316 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
2317 (dtpoff_base, tpoff): New functions.
2318 (elf32_arm_final_link_relocate): Handle TLS relocations.
2319 (IS_ARM_TLS_RELOC): Define.
2320 (elf32_arm_relocate_section): Warn about TLS mismatches.
2321 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
2322 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
2323 TLS relocations and pc_count.
2324 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
2325 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
2326 calls.
2327 (elf32_arm_size_dynamic_sections): Handle TLS.
2328 (elf32_arm_finish_dynamic_symbol): Likewise.
2329 (bfd_elf32_mkobject): Define.
2330
23312005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2332
2333 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
2334 relocation types. Don't count relocations which will use a PLT.
2335
23362005-03-29 Joel Brobecker <brobecker@gnat.com>
2337
2338 * elf.c (elfcore_grok_nto_status): Print tid as long.
2339 (elfcore_grok_nto_regs): Likewise.
2340
23412005-03-29 Joel Brobecker <brobecker@gnat.com>
2342
2343 * irix-core.c: Remove some unnecessary prototypes.
2344
23452005-03-28 Joel Brobecker <brobecker@adacore.com>
2346
2347 * irix-core.c: Convert to ISO C.
2348
23492005-03-28 Joel Brobecker <brobecker@adacore.com>
2350
2351 * irix-core.c (do_sections): Replace + by | in expression.
2352 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
2353 to unused parameters to avoid a compiler warning.
2354
23552005-03-28 Mark Kettenis <kettenis@gnu.org>
2356
2357 * netbsd-core.c: Convert to ISO C. Fix formatting.
2358
23592005-03-24 Eric Christopher <echristo@redhat.com>
2360
2361 * elfxx-mips.c: Revert previous patch.
2362
23632005-03-24 Nick Clifton <nickc@redhat.com>
2364
2365 * targets.c (_bfd_target_vector): Only include the
2366 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
2367 all targets enabled.
2368
23692005-03-24 James E Wilson <wilson@specifixinc.com>
2370
2371 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
2372 (BFD64_BACKENDS): Add elf32-ia64.lo.
2373 * Makefile.in: Regenerate.
2374
23752005-03-23 Eric Christopher <echristo@redhat.com>
2376
2377 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
2378 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
2379 after emitting relocation.
2380 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
2381 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
2382 and readonly_reloc.
2383
23842005-03-23 Mike Frysinger <vapier@gentoo.org>
2385 Nick Clifton <nickc@redhat.com>
2386
2387 * config.bfd: Accept any C library to accompany a GNU Linux
2388 implementation, not just the GNU C library.
2389 * configure.in: Likewise.
2390 * configure: Regenerate.
2391
23922005-03-22 H.J. Lu <hongjiu.lu@intel.com>
2393
2394 * bfd-in.h (_bfd_elf_provide_symbol): New.
2395 * bfd-in2.h: Regenerated.
2396
2397 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
2398 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
2399 of set_linker_sym.
2400
2401 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
2402 from elf32-ppc.c.
2403
24042005-03-22 Hans-Peter Nilsson <hp@axis.com>
2405
2406 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
2407
24082005-03-22 Bob Wilson <bob.wilson@acm.org>
2409
2410 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
2411 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
2412 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
2413 (xtensa_opcode_decode): Rearrange code.
2414
24152005-03-22 Nick Clifton <nickc@redhat.com>
2416
2417 * binary.c: Convert to ISO C90 formatting.
2418 * coff-arm.c: Convert to ISO C90 formatting.
2419 * coffgen.c: Convert to ISO C90 formatting.
2420 * elf32-gen.c: Convert to ISO C90 formatting.
2421 * elf64-gen.c: Convert to ISO C90 formatting.
2422 * hash.c: Convert to ISO C90 formatting.
2423 * ieee.c: Convert to ISO C90 formatting.
2424
24252005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2426
2427 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
2428 unresolved symbols in R_ARM_NONE relocations.
2429
24302005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2431
2432 * elf32-arm.c (elf32_arm_final_link_relocate): Add
2433 UNRESOLVED_RELOC_P argument. Set it appropriately.
2434 (elf32_arm_relocate_section): Update call to
2435 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
2436 unresolved_reloc instead.
2437
24382005-03-23 Alan Modra <amodra@bigpond.net.au>
2439
2440 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
2441 .gnu.warning.* sections.
2442
24432005-03-22 Alan Modra <amodra@bigpond.net.au>
2444
2445 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
2446 written_address_p.
2447 (ppc_elf_create_linker_section): Don't try to reuse existing section.
2448 (elf_create_pointer_linker_section): Delete info parm. Don't make
2449 h dynamic. Don't set written_address_p.
2450 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
2451 (bfd_put_ptr): Delete.
2452 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
2453 Always write section contents. Assert global sym is def_regular.
2454 Use offset bottom bit as a written flag.
2455 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
2456 calls.
2457
24582005-03-22 Alan Modra <amodra@bigpond.net.au>
2459
2460 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
2461 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
2462 and end syms.
2463
24642005-03-21 Nick Clifton <nickc@redhat.com>
2465
2466 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
2467 targets.
2468 (t2a1_bx_pc_insn): Likewise.
2469 (t2a2_noop_insn): Likewise.
2470 (t2a3_b_insn): Likewise.
2471 (t2a1_push_insn): Likewise.
2472 (t2a2_ldr_insn): Likewise.
2473 (t2a3_mov_insn): Likewise.
2474 (t2a4_bx_insn): Likewise.
2475 (t2a5_pop_insn): Likewise.
2476 (t2a6_bx_insn): Likewise.
2477 (coff_arm_relocate_section): Only declare the high_address
2478 variable for non WINCE targets.
2479
24802005-03-22 Alan Modra <amodra@bigpond.net.au>
2481
2482 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
2483 SEC_LINKER_CREATED. Attach to dynobj.
2484 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
2485
24862005-03-21 Alan Modra <amodra@bigpond.net.au>
2487
2488 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
2489 sym_offset. Add name, bss_name, sym_name, sym_val.
2490 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
2491 Add sdata array of elf_linker_section_t.
2492 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
2493 (enum elf_linker_section_enum): Delete.
2494 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
2495 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
2496 the special sections are needed. Adjust htab->sdata refs.
2497 Ensure dynobj is set in sreloc code.
2498 (ppc_elf_size_dynamic_sections): Strip sdata sections.
2499 (ppc_elf_set_sdata_syms): New function.
2500 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
2501 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
2502 sym_val instead of sym_hash.
2503 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
2504
25052005-03-21 Alan Modra <amodra@bigpond.net.au>
2506
2507 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
2508 (ppc_elf_merge_private_bfd_data): Likewise.
2509
25102005-03-21 Alan Modra <amodra@bigpond.net.au>
2511
2512 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
2513 (ppc_elf_create_linker_section): Don't create rel_section.
2514 (elf_create_pointer_linker_section): Don't size relocs.
2515 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
2516 Don't generate relocs.
2517 (ppc_elf_relocate_section): Adjust calls to
2518 elf_finish_pointer_linker_section.
2519
25202005-03-21 Alan Modra <amodra@bigpond.net.au>
2521
2522 * elf32-ppc.c (is_ppc_elf_target): New function.
2523 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
2524 for bfd_target_elf_flavour. Do this test before endian check.
2525 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
2526 (ppc_elf_size_dynamic_sections): Likewise.
2527
25282005-03-20 H.J. Lu <hongjiu.lu@intel.com>
2529
2530 * elf-bfd.h (elf_backend_data): Add int to
2531 elf_backend_section_from_shdr.
2532 (bfd_elf_section_data): Update comment for this_idx.
2533 (_bfd_elf_make_section_from_shdr): Add int.
2534 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2535
2536 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
2537 and use it to set this_idx in bfd_elf_section_data.
2538 (bfd_section_from_shdr): Pass shindex to
2539 _bfd_elf_make_section_from_shdr.
2540 (_bfd_elf_section_from_bfd_section): Use this_idx in
2541 bfd_elf_section_data to find section index.
2542
2543 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
2544 index and pass it to _bfd_elf_make_section_from_shdr.
2545 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
2546 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2547 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2548 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2549 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2550 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2551 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
2552 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2553 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2554
25552005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
2556 Ross Ridge <rridge@csclub.uwaterloo.ca>
2557
2558 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
2559 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
2560 cases. Add comment.
2561
25622005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2563
2564 * elflink.c (elf_mark_used_section): Remove check for special
2565 sections.
2566
25672005-03-18 Andreas Schwab <schwab@suse.de>
2568
2569 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
2570 from bfd_vma to ia64_insn, remove broken cast.
2571
25722005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
2573
2574 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
2575 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
2576 elf_m68k_finish_dynamic_sections): Use it.
2577
25782005-03-17 Paul Brook <paul@codesourcery.com>
2579 Dan Jacobowitz <dan@codesourcery.com>
2580 Mark Mitchell <mark@codesourcery.com>
2581
2582 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
2583 (elf32_arm_additional_program_headers): Likewise.
2584 (elf_backend_modify_segment_map): Define.
2585 (elf_backend_additional_program_headers): Likewise.
2586 (elf32_arm_symbian_modify_segment_map): Use
2587 elf32_arm_modify_segment_map.
2588
25892005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2590
2591 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
2592 for special sections.
2593
25942005-03-18 Alan Modra <amodra@bigpond.net.au>
2595
2596 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
2597 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
2598 section_sym_count param, and return number of section symbols.
2599 (bfd_elf_size_dynamic_sections): Clear section symbol area of
2600 .dynsym contents. Don't bother calling swap_symbol_out on the
2601 first all-zero dynsym.
2602 (elf_mark_used_section): Formatting. Avoid twiddling flags in
2603 special sections like bfd_abs_section.
2604 (bfd_elf_gc_sections): Spelling fix.
2605
26062005-03-16 Fred Fish <fnf@specifixinc.com>
2607
2608 PR binutils/790
2609 * dwarf2.c (read_indirect_string): Fix apparent typo, check
2610 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
2611
26122005-03-16 H.J. Lu <hongjiu.lu@intel.com>
2613
2614 * elflink.c (elf_mark_used_section): New.
2615 (bfd_elf_gc_sections): Call elf_gc_mark_section for
2616 non-relocatable link if we don't do GC.
2617
26182005-03-16 Nick Clifton <nickc@redhat.com>
2619 Ben Elliston <bje@au.ibm.com>
2620
2621 * configure.in (werror): New switch: Add -Werror to the
2622 compiler command line. Enabled by default. Disable via
2623 --disable-werror.
2624 * configure: Regenerate.
2625
26262005-03-16 Nick Clifton <nickc@redhat.com>
2627
2628 * ecoff.c: Convert to ISO C90 formatting.
2629
26302005-03-16 Alan Modra <amodra@bigpond.net.au>
2631
2632 * elf32-ppc.c: Divide file into general and linker specific
2633 functions. Sort linker functions into roughly the order in which
2634 they are called by the ELF linker code.
2635
26362005-03-16 Alan Modra <amodra@bigpond.net.au>
2637
2638 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
2639 on section. Correct comment, and add FIXME.
2640 (ppc_elf_additional_program_headers): Don't bump header count for
2641 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
2642 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
2643 do allocate memory if they need it.
2644
26452005-03-15 Mikkel Krautz <krautz@gmail.com>
2646
2647 * config.bfd (x86_64-elf): Add target.
2648
26492005-03-15 Alan Modra <amodra@bigpond.net.au>
2650
2651 * po/es.po: Commit new Spanish translation.
2652
26532005-03-14 H.J. Lu <hongjiu.lu@intel.com>
2654
2655 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
2656 for global symbol when reporting overflow.
2657
26582005-03-11 Jakub Jelinek <jakub@redhat.com>
2659
2660 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
2661 * libbfd.h: Rebuilt.
2662 * archive.c (_bfd_ar_spacepad): New function.
2663 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
2664 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
2665 coff_write_armap): Use it.
2666 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
2667 uid/gid support.
2668 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
2669
26702005-03-10 Mark Kettenis <kettenis@gnu.org>
2671
2672 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
2673 has_table to the start of the function.
2674
26752005-03-10 Ben Elliston <bje@au.ibm.com>
2676
2677 * archive.c: Include hashtab.h.
2678 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
2679 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
2680 (hash_file_ptr): New function.
2681 (eq_file_ptr): Likewise.
2682 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
2683 * libbfd-in.h: Include hashtab.h.
2684 (struct artdata): Change `cache' member type to htab_t.
2685 * libbfd.h: Rebuild.
2686
26872005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
2688
2689 * configure.in: Bump version to 2.16.90.
2690 * configure: Regenerated.
2691
26922005-03-07 Jakub Jelinek <jakub@redhat.com>
2693
2694 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
2695 close is a function like macro in system headers.
2696
26972005-03-07 Alan Modra <amodra@bigpond.net.au>
2698
2699 PR ld/778
2700 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
2701 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
2702
27032005-03-06 Alan Modra <amodra@bigpond.net.au>
2704
2705 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
2706
27072005-03-05 Alan Modra <amodra@bigpond.net.au>
2708
2709 * po/bfd.pot: Regenerate.
2710
27112005-03-05 Alan Modra <amodra@bigpond.net.au>
2712
2713 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
2714 with is_func.
2715 (func_desc_adjust): Force dot-syms local in executables as well
2716 as shared libs.
2717
27182005-03-04 David Daney <ddaney@avtrex.com>
2719
2720 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
2721 '__gnu_local_gp' symbol used by gas -mno-shared.
2722
27232005-03-03 H.J. Lu <hongjiu.lu@intel.com>
2724
2725 * elf-bfd.h (elf_backend_data): Add "const char *" to
2726 elf_backend_section_from_phdr.
2727
2728 * elf.c (bfd_section_from_phdr): Pass "proc" to the
2729 elf_backend_section_from_phdr hook.
2730
27312005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
2732 Joseph Myers <joseph@codesourcery.com>
2733
2734 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
2735 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
2736 and tls_ldm_offset.
2737 (struct mips_elf_got_per_bfd_arg): Add global_count.
2738 (struct mips_elf_count_tls_arg): New.
2739 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
2740 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
2741 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
2742 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
2743 (TLS_RELOC_P): Define.
2744 (TP_OFFSET, DTP_OFFSET): Define.
2745 (dtprel_base, tprel_base): New functions.
2746 (mips_elf_link_hash_newfunc): Initialize tls_type.
2747 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
2748 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
2749 TLS entries.
2750 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
2751 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
2752 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
2753 (mips_tls_got_index): New functions.
2754 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
2755 arguments. Pass them to mips_elf_create_local_got_entry. Use
2756 mips_tls_got_index.
2757 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
2758 Handle TLS entries.
2759 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
2760 mips_elf_create_local_got_entry.
2761 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
2762 arguments. Handle TLS entries.
2763 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
2764 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
2765 TLS entries.
2766 (mips_elf_record_global_got_symbol): Likewise.
2767 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
2768 Count TLS entries.
2769 (mips_elf_merge_gots): Handle TLS entries when merging.
2770 (mips_elf_initialize_tls_index): New function.
2771 (mips_elf_set_global_got_offset): Handle TLS entries.
2772 (mips_elf_adjust_gp): Handle TLS.
2773 (mips_elf_multi_got): Remove redundant call to
2774 mips_elf_resolve_final_got_entries. Initialize global_count.
2775 Correct a comment. Initialize new TLS members of mips_got_info.
2776 Assign TLS GOT indexes for new GOTs.
2777 (mips_elf_create_got_section): Initialize new TLS members of
2778 mips_got_info.
2779 (mips_elf_calculate_relocation): Handle TLS relocs.
2780 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
2781 functions.
2782 (_bfd_mips_elf_always_size_sections): Handle TLS.
2783 (_bfd_mips_elf_size_dynamic_sections): Likewise.
2784 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
2785 changed functions.
2786 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
2787 (_bfd_mips_elf_hide_symbol): Handle TLS.
2788 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
2789 (mips_reloc_map): Add TLS relocs.
2790 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
2791 * elf64-mips.c (mips_elf64_howto_table_rel)
2792 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
2793 * reloc.c: Define new MIPS TLS relocations.
2794 * libbfd.h, bfd-in2.h: Regenerated.
2795
27962005-03-02 Jan Beulich <jbeulich@novell.com>
2797
2798 * Makefile.am: Add dependency of cache.o on libiberty.h.
2799 * cache.c: Include libiberty.h.
2800 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
2801
28022005-03-01 Zack Weinberg <zack@codesourcery.com>
2803
2804 * elf.c (bfd_section_from_shdr <default case>): Call
2805 elf_backend_section_from_shdr hook unconditionally, and return
2806 what it returns.
2807 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
2808 * elfxx-target.h (elf_backend_section_from_shdr)
2809 (elf_backend_section_from_phdr): Default to
2810 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
2811 respectively.
2812
28132005-03-01 Alan Modra <amodra@bigpond.net.au>
2814
2815 * targets.h: Typo fix.
2816 * bfd-in2.h: Regenerate.
2817
2818 * bout.c (b_out_write_object_contents): Don't use sizeof on host
2819 structs to size on-disk structures.
2820 (b_out_set_section_contents): Size the external struct, not the
2821 internal one for on-disk size.
2822 (b_out_sizeof_headers): Likewise.
2823
28242005-03-01 Alan Modra <amodra@bigpond.net.au>
2825
2826 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
2827 entry points with the func descriptor as well as undefweak.
2828
28292005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
2830
2831 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
2832 present when IMPORT_NAME_UNDOECRATE is used.
2833
28342005-02-28 H.J. Lu <hongjiu.lu@intel.com>
2835
2836 PR 757
2837 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
2838 int.
2839
2840 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
2841 to _bfd_elf_merge_symbol.
2842
2843 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
2844 unsigned int to return the alignment of the old common symbol
2845 in the dynamic object.
2846 (_bfd_elf_add_default_symbol): Pass NULL to
2847 _bfd_elf_merge_symbol.
2848 (elf_link_add_object_symbols): Pass &old_alignment to
2849 _bfd_elf_merge_symbol. Get the alignment of the new common
2850 symbol in the dynamic object.
2851
28522005-02-24 Ben Elliston <bje@au.ibm.com>
2853
2854 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
2855 * format.c (bfd_check_format_matches): Likewise.
2856 * archive.c (BFD_GNU960_ARMAG): Likewise.
2857 (bfd_generic_archive_p): Likewise.
2858 (_bfd_write_archive_contents): Likewise.
2859
28602005-02-24 H.J. Lu <hongjiu.lu@intel.com>
2861
2862 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
2863 * configure: Regenerate.
2864
28652005-02-24 Julian Brown <julian@sirius.codesourcery.com>
2866
2867 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
2868 COMDAT group sections to have default visibility.
2869
28702005-02-24 Alan Modra <amodra@bigpond.net.au>
2871
2872 * coffcode.h (coff_print_aux): Warning fix.
2873 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
2874 instead of section pointer to identify.
2875 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
2876 the correct size buffer for local sym mangling too.
2877 (h8300_bfd_link_add_symbols): Likewise.
2878 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
2879 warning.
2880 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
2881 * elf32-xtensa.c (literal_value_hash): Warning fix.
2882 * versados.c (process_otr): Warning fix.
2883 (versados_canonicalize_reloc): Likewise.
2884 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
2885 * vms.c (fill_section_ptr): Warning fix.
2886
28872005-02-23 H.J. Lu <hongjiu.lu@intel.com>
2888
2889 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
2890 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
2891
28922005-02-23 Nick Clifton <nickc@redhat.com>
2893
2894 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
2895 the relvaddr field of the Elf32_crinfo structure.
2896
2897 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
2898 variables that are passed by reference to
2899 m68hc11_get_relocation_value in case that function does not
2900 initialise them.
2901
2902 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
2903 return statements and replace with a single return at the end of
2904 the function. This helps pacify the flow analysis code in gcc 4.0.
2905
2906 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
2907 strtab to avoid compile time warning.
2908
29092005-02-23 Ben Elliston <bje@au.ibm.com>
2910
2911 * opncls.c (bfd_zalloc): Document this function.
2912
29132005-02-21 H.J. Lu <hongjiu.lu@intel.com>
2914
2915 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
2916 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
2917 Replace SEC_SHARED with SEC_COFF_SHARED.
2918 (styp_to_sec_flags): Likewise.
2919
2920 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
2921 (TARGET_LITTLE_SYM): Likewise.
2922
2923 * section.c (SEC_ARCH_BIT_0): Removed.
2924 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
2925 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
2926 (SEC_SHARED): Renamed to ...
2927 (SEC_COFF_SHARED): This.
2928 (SEC_BLOCK): Renamed to ...
2929 (SEC_TIC54X_BLOCK): This.
2930 (SEC_CLINK): Renamed to ...
2931 (SEC_TIC54X_CLINK): This.
2932 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
2933 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
2934 end.
2935 * bfd-in2.h: Regenerated.
2936
29372005-02-21 Fred Fish <fnf@specifixinc.com>
2938
2939 * dwarf2.c (find_abstract_instance_name): Call recursively
2940 to handle a DW_AT_specification.
2941
29422005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2943
2944 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
2945 mips_elf_create_dynamic_relocation,
2946 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
2947 Remove #if 0'd code.
2948
29492005-02-21 Alan Modra <amodra@bigpond.net.au>
2950
2951 * Makefile.am: Run "make dep-am"
2952 * Makefile.in: Regenerate.
2953
29542005-02-21 Alan Modra <amodra@bigpond.net.au>
2955
2956 * coffgen.c (bfd_coff_get_comdat_section): Check that
2957 coff_section_data isn't NULL.
2958
29592005-02-21 Alan Modra <amodra@bigpond.net.au>
2960
2961 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
2962 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
2963 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
2964 useless assignments.
2965 (xcoff_write_archive_contents_big): Likewise.
2966 (_bfd_xcoff_put_ldsymbol_name): Likewise.
2967 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
2968 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
2969 * cofflink.c (process_embedded_commands): Warning fixes.
2970 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
2971 Warning fixes.
2972 * dwarf2.c: Warning fixes.
2973 * elf-bfd.h: Likewise.
2974 * elf-eh-frame.c: Likewise.
2975 * elf-strtab.c: Likewise.
2976 * elf.c: Likewise.
2977 * elf32-m68k.c: Likewise.
2978 * elf32-ppc.c: Likewise.
2979 * elf32-sh-symbian.c: Likewise.
2980 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
2981 * elf64-sh64.c: Likewise.
2982 * peicode.h: Likewise.
2983 * elf64-mmix.c: Warning fixes.
2984 * elfcode.h: Likewise.
2985 * elfxx-mips.c: Likewise.
2986 * libbfd-in.h: Likewise.
2987 * libbfd.c: Likewise.
2988 * mach-o.c: Likewise.
2989 * merge.c: Likewise.
2990 * mmo.c: Likewise.
2991 * opncls.c: Likewise.
2992 * pef.c: Likewise.
2993 * srec.c: Likewise.
2994 * vms-hdr.c: Likewise.
2995 * vms-tir.c: Likewise.
2996 * xtensa-isa.c: Likewise.
2997 * xtensa-modules.c: Likewise.
2998 * xsym.c: Likewise.
2999 (pstrcmp): Use correct choice of string lengths. Fix return value.
3000 (bfd_sym_module_name): Correct string length.
3001 * bfd-in2.h: Regenerate.
3002 * libbfd.h: Regenerate.
3003
30042005-02-17 Alexandre Oliva <aoliva@redhat.com>
3005
3006 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
3007 uninitialized check_segment[1] in TLSMOFF case.
3008 Reported by Alan Modra.
3009 (elf32_frv_relocate_section): Improve errors and warnings.
3010
30112005-02-17 Alan Modra <amodra@bigpond.net.au>
3012
3013 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
3014
30152005-02-16 Alan Modra <amodra@bigpond.net.au>
3016
3017 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
3018 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
3019 * pef.c (bfd_pef_scan): Don't ignore return value of
3020 bfd_pef_scan_start_address.
3021 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
3022 bfd_mach_o_scan_start_address.
3023 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
3024 * elfxx-mips.c: Remove unnecessary prototypes.
3025 (sort_dynamic_relocs_64): Abort if not BFD64.
3026
30272005-02-16 Alan Modra <amodra@bigpond.net.au>
3028
3029 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
3030 Skip toc reloc adjust if reloc_count is zero.
3031
30322005-02-15 Nigel Stephens <nigel@mips.com>
3033 Maciej W. Rozycki <macro@mips.com>
3034
3035 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3036 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3037 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3038 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3039 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3040 dst_mask.
3041 (mips16_gprel_reloc): Remove bit shuffling; call
3042 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3043 and _bfd_mips16_elf_reloc_shuffle() instead.
3044 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3045 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3046 relocs.
3047 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
3048 elf_mips16_howto_table_rel.
3049 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
3050 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
3051 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3052 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
3053 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3054 dst_mask.
3055 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
3056 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
3057 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
3058 placeholders.
3059 (mips16_gprel_reloc): Remove bit shuffling; call
3060 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3061 and _bfd_mips16_elf_reloc_shuffle() instead.
3062 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3063 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3064 relocs.
3065 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
3066 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
3067 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
3068 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
3069 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
3070 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
3071 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
3072 dst_mask.
3073 (mips16_gprel_reloc): Remove bit shuffling; call
3074 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
3075 and _bfd_mips16_elf_reloc_shuffle() instead.
3076 (mips16_reloc_map): New reloc map for MIPS16 relocs.
3077 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
3078 relocs.
3079 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
3080 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
3081 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
3082 handle bit shuffling for MIPS16 relocs.
3083 (_bfd_mips16_elf_reloc_shuffle): Likewise.
3084 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
3085 and _bfd_mips16_elf_reloc_shuffle().
3086 (_bfd_mips_elf_generic_reloc): Likewise.
3087 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
3088 and R_MIPS16_LO16.
3089 (mips_elf_obtain_contents): Remove bit shuffling.
3090 (mips_elf_perform_relocation): Likewise; call
3091 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
3092 instead.
3093 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
3094 and R_MIPS16_LO16.
3095 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
3096 (_bfd_mips16_elf_reloc_shuffle): Likewise.
3097 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
3098 (BFD_RELOC_MIPS16_HI16_S): Likewise.
3099 (BFD_RELOC_MIPS16_LO16): Likewise.
3100 * bfd-in2.h: Regenerate.
3101 * libbfd.h: Regenerate.
3102
31032005-02-15 Jan Beulich <jbeulich@novell.com>
3104
3105 * elfxx-ia64.c (ia64_howto_table): Correct strings for
3106 R_IA64_DTPMOD64[LM]SB.
3107
31082005-02-14 H.J. Lu <hongjiu.lu@intel.com>
3109
3110 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
3111 backward branch in the same section.
3112 (elfNN_ia64_relocate_section): Inform users that the input
3113 section is too big to relax br instruction when overflow
3114 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
3115 and R_IA64_PCREL21F.
3116
31172005-02-14 Orjan Friberg <orjanf@axis.com>
3118
3119 * elfcore.h (elf_core_file_p): Move the call to
3120 elf_backend_object_p to allow the correct machine to be set before
3121 processing the program headers.
3122
31232005-02-14 Nick Clifton <nickc@redhat.com>
3124
3125 PR binutils/716
3126 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
3127 aware flag from the input bfd to the output bfd.
3128
31292005-02-11 Maciej W. Rozycki <macro@mips.com>
3130
3131 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
3132 R_MIPS_LITERAL relocations for external symbols.
3133 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
3134 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
3135
31362005-02-11 H.J. Lu <hongjiu.lu@intel.com>
3137
3138 * bfd-in2.h: Rebuilt.
3139
31402005-02-11 Paul Brook <paul@codesourcery.com>
3141
3142 * elf-bfd.h (struct elf_link_hash_table): Add
3143 is_relocatable_executable.
3144 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
3145 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
3146 symbols in relocatable executables.
3147 (bfd_elf_record_link_assignment): Create dynamic section symbols in
3148 relocatable executables.
3149 (_bfd_elf_link_renumber_dynsyms): Ditto.
3150 (bfd_elf_final_link): Ditto.
3151 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
3152 relocations into relocatable executables.
3153 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
3154 executables. Also copy absolute relocations.
3155 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
3156 in relocatable executables.
3157 (allocate_dynrelocs): Copy relocations for relocatable executables.
3158 Output dynamic symbols for symbols defined in linker scripts.
3159
31602005-02-11 Nick Clifton <nickc@redhat.com>
3161
3162 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
3163 to avoid a compile time warning.
3164
3165 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
3166 BFD_ASSERT.
3167
3168 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
3169 inclusion of coffcode.h so that it is actually picked up.
3170
3171 * coffcode.h (coff_std_swap_table): Add an unused attribute in
3172 case it is not used.
3173
3174 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
3175 structure and macro.
3176
3177 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
3178 array.
3179
3180 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
3181 to protect the declaration of this array.
3182
3183 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
3184 Avoid call to memcpy with a size of 0.
3185
31862005-02-12 Alan Modra <amodra@bigpond.net.au>
3187
3188 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
3189 old-style branches to undefined dot-symbols which will be
3190 satisfied by a plt call.
3191
31922005-02-11 Alan Modra <amodra@bigpond.net.au>
3193
3194 * elf64-ppc.c (move_plt_plist): New function, extracted from..
3195 (ppc64_elf_copy_indirect_symbol): ..here.
3196 (func_desc_adjust): Use move_plt_plist.
3197
31982005-02-10 Paul Brook <paul@codesourcery.com>
3199
3200 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
3201
32022005-02-10 Paul Brook <paul@codesourcery.com>
3203
3204 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
3205 symbols local.
3206 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
3207 (elf_link_renumber_local_hash_table_dynsyms): New function.
3208 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
3209
32102005-02-10 Jakub Jelinek <jakub@redhat.com>
3211
3212 * bfd-in.h (BFD_LINKER_CREATED): Define.
3213 * bfd-in2.h: Rebuilt.
3214 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
3215 BFD_LINKER_CREATED bfds when determining input bfds without
3216 .note.GNU-stack section.
3217
32182005-02-10 Maciej W. Rozycki <macro@mips.com>
3219
3220 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
3221 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
3222 relocations against external symbols unchanged.
3223
32242005-02-08 Paul Brook <paul@codesourcery.com>
3225
3226 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
3227 sections.
3228
32292005-02-08 Hans-Peter Nilsson <hp@axis.com>
3230
3231 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
3232 prefix here.
3233
32342005-02-07 Maciej W. Rozycki <macro@mips.com>
3235
3236 * elf64-mips.c: Fix formatting throughout.
3237
32382005-02-07 Maciej W. Rozycki <macro@mips.com>
3239
3240 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
3241
32422005-02-07 Alexandre Oliva <aoliva@redhat.com>
3243
3244 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
3245 *ABS*/*UND* sections.
3246 (elf32_frv_relocate_section): Move zero-addend-required error...
3247 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
3248 missing needed TLS section.
3249
32502005-02-07 Hans-Peter Nilsson <hp@axis.com>
3251
3252 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
3253 being the last symbol.
3254 (aout_link_add_symbols): Just return TRUE if a warning
3255 symbol was last.
3256
32572005-02-07 Maciej W. Rozycki <macro@mips.com>
3258
3259 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
3260 R_MIPS_GPREL32 relocations against external symbols.
3261 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
3262 comment.
3263
32642005-02-07 Alan Modra <amodra@bigpond.net.au>
3265
3266 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
3267 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
3268 elf_string_from_elf_strtab.
3269 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
3270 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
3271 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
3272 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
3273 looking at cached symtab info first, before iterating over headers.
3274 For SHT_REL and SHT_RELA, load dynsymtab if needed.
3275 * elfcode.h (elf_object_p): Don't load section header stringtab
3276 specially.
3277
32782005-02-06 H.J. Lu <hongjiu.lu@intel.com>
3279
3280 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
3281 against protected function when building shared library.
3282
3283 PR 584
3284 * elf64-x86-64.c (is_32bit_relative_branch): New.
3285 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
3286 protected function symbol when building shared library for
3287 32bit relative branch instruction.
3288
32892005-02-06 Alan Modra <amodra@bigpond.net.au>
3290
3291 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
3292 syms when doing a relocatable link.
3293 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
3294 at u.def.section.
3295 (ppc64_elf_tls_setup): Likewise.
3296 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
3297
32982005-02-04 Alan Modra <amodra@bigpond.net.au>
3299
3300 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
3301 (link_hash_newfunc): Clear all locals using memset.
3302 (make_fdh): Remove flags param. Always create fake func desc
3303 weak. Link the descriptor with the code entry sym.
3304 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
3305 (add_symbol_adjust): Adjust make_fdh call.
3306 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
3307 descriptor to strong undefined if code entry is strong.
3308
33092005-02-04 Alan Modra <amodra@bigpond.net.au>
3310
3311 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
3312 lookup here. Set to new before calling bfd_link_repair_undef_list.
3313 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
3314
33152005-02-03 Alan Modra <amodra@bigpond.net.au>
3316
3317 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
3318
33192005-02-03 Alan Modra <amodra@bigpond.net.au>
3320
3321 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
3322 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
3323 before the as-needed lib was loaded. Abort on unexpected refs.
3324
33252005-02-02 Alan Modra <amodra@bigpond.net.au>
3326
3327 * elflink.c (elf_smash_syms): Expand comments.
3328 (elf_link_add_object_symbols): Only call elf_smash_syms for
3329 as-needed dynamic objects.
3330
3331 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
3332 everything, just the field specific to ia64.
3333 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
3334
33352005-02-01 Alan Modra <amodra@bigpond.net.au>
3336
3337 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
3338 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
3339 undefined syms.
3340 (struct add_symbol_adjust_data): New.
3341 (add_symbol_adjust): Make an undefweak func desc for old ABI
3342 objects to link with --as-needed shared libs. Return fail status.
3343 Don't adjust old ABI func entry sym to weak if func desc syms
3344 isn't defined.
3345 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
3346 and return status.
3347
33482005-02-01 Hans-Peter Nilsson <hp@axis.com>
3349
3350 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
3351 for clarity.
3352
33532005-02-01 Alan Modra <amodra@bigpond.net.au>
3354
3355 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
3356 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
3357 remove anything but new and undefweak.
3358 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
3359 existing _DYNAMIC.
3360 (_bfd_elf_create_dynamic_sections): Formatting.
3361 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
3362 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
3363 (struct elf_smash_data): New.
3364 (elf_smash_syms): New function.
3365 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
3366 unneeded dynamic objects to loaded list.
3367 (elf_link_output_extsym): Don't handle as-needed here. Strip
3368 bfd_link_hash_new symbols.
3369 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3370 delref when dynindx is already -1.
3371 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
3372 symbols.
3373 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
3374
33752005-02-01 Ben Elliston <bje@au.ibm.com>
3376
3377 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
3378
33792005-02-01 Ben Elliston <bje@au.ibm.com>
3380
3381 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
3382 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
3383 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
3384 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
3385 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
3386 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
3387 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
3388 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
3389 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
3390 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
3391 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
3392 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
3393 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
3394 throughout. Similarly, collapse #if 1'd code.
3395
33962005-02-01 Ben Elliston <bje@au.ibm.com>
3397
3398 * elf-bfd.h (bfd_elf_discard_group): Remove.
3399 * elf.c (bfd_elf_discard_group): Likewise.
3400 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
3401
34022005-01-31 Richard Sandiford <rsandifo@redhat.com>
3403
3404 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
3405 (_bfd_elf_eh_frame_address_size): Declare.
3406 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
3407 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
3408 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
3409 (elf_backend_eh_frame_address_size): Define.
3410 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
3411 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
3412 size from the new backend hook.
3413 (_bfd_elf_write_section_eh_frame): Likewise.
3414 (_bfd_elf_eh_frame_address_size): New function.
3415
34162005-01-31 Andrew Cagney <cagney@gnu.org>
3417
3418 * configure: Regenerate to track ../gettext.m4.
3419
34202005-01-31 Mark Mitchell <mark@codesourcery.com>
3421
3422 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
3423 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
3424
34252005-01-31 Nick Clifton <nickc@redhat.com>
3426
3427 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
3428 sparc-lynxos, vax-vms) be obsolete.
3429
34302005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
3431
3432 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
3433 * elf32-arm.c (ELF_MINPAGESIZE): Define.
3434 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
3435 * elfcode.h (elf_object_p): Use minpagesize instead of
3436 maxpagesize.
3437 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
3438 (elfNN_bed): Include ELF_MINPAGESIZE.
3439
34402005-01-28 Julian Brown <julian@codesourcery.com>
3441
3442 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3443 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3444 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
3445 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
3446 passing flag value from ld. Set flag value in global hash table entry.
3447 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
3448 relocation.
3449
34502005-01-27 Andrew Cagney <cagney@gnu.org>
3451
3452 * configure: Regenerate to track ../gettext.m4 change.
3453
34542005-01-25 Mark Mitchell <mark@codesourcery.com>
3455
3456 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
3457 SymbianOS.
3458
34592005-01-25 Alexandre Oliva <aoliva@redhat.com>
3460
3461 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
3462 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
3463 for TLSMOFF.
3464 * reloc.c: Add R_FRV_TLSMOFF.
3465 * elf32-frv.c (elf32_frv_howto_table): Likewise.
3466 (frv_reloc_map, frv_reloc_type_lookup): Map it.
3467 (elf32_frv_relocate_section): Handle it.
3468 (elf32_frv_check_relocs): Likewise.
3469 * libbfd.h, bfd-in2.h: Rebuilt.
3470 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
3471 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
3472 when given an undefweak TLS symbol. Fix constant TLS PLT entries
3473 such that they return the constant in gr9.
3474 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
3475 symbols.
3476 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
3477 too, such that they shrink on relaxation.
3478 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
3479 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
3480 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
3481 if we can guarantee the use of 16-bit constants.
3482 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
3483 Introduce TLS support for FR-V FDPIC.
3484 * reloc.c: Add TLS relocations.
3485 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
3486 (elf32_frv_rel_tlsdesc_value_howto): New.
3487 (elf32_frv_rel_tlsoff_howto): New.
3488 (frv_reloc_map): Add new mappings.
3489 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
3490 reloc information.
3491 (frvfdpic_dynamic_got_plt_info): New.
3492 (frvfdpic_plt_tls_ret_offset): New.
3493 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
3494 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
3495 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
3496 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
3497 section as local.
3498 (struct frvfdpic_relocs_info): Add TLS fields.
3499 (frvfdpic_relocs_info_hash): Warning clean up.
3500 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
3501 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
3502 (FRVFDPIC_TLS_BIAS): Define.
3503 (tls_biased_base): New.
3504 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
3505 relocations.
3506 (frv_reloc_type_lookup): Likewise.
3507 (frvfdpic_info_to_howto_rel): Likewise.
3508 (elf32_frv_relocate_section): Likewise.
3509 (_frv_create_got_section): Create the PLT section here.
3510 (elf32_frvfdpic_create_dynamic_sections): Not here.
3511 (_frvfdpic_count_nontls_entries): Move out of...
3512 (_frvfdpic_count_got_plt_entries): ... here.
3513 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
3514 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
3515 support.
3516 (_frvfdpic_relax_tls_entries): New.
3517 (_frvfdpic_compute_got_alloc_data): Add TLS support.
3518 (_frvfdpic_get_tlsdesc_entry): New.
3519 (_frvfdpic_assign_got_entries): Add TLS support.
3520 (_frvfdpic_assign_plt_entries): Likewise.
3521 (_frvfdpic_reset_got_plt_entries): New.
3522 (_frvfdpic_size_got_plt): Move out of...
3523 (elf32_frvfdpic_size_dynamic_sections): ... here.
3524 (_frvfdpic_relax_got_plt_entries): New.
3525 (elf32_frvfdpic_relax_section): New.
3526 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
3527 (elf32_frv_check_relocs): Add TLS support.
3528 (bfd_elf32_bfd_relax_section): Define for FDPIC.
3529 * libbfd.h, bfd-in2.h: Rebuilt.
3530
35312005-01-25 Alan Modra <amodra@bigpond.net.au>
3532
3533 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
3534 loadable reloc sections.
3535 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
3536 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
3537
35382005-01-25 Alan Modra <amodra@bigpond.net.au>
3539
3540 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
3541 sections immediately when linking shared libs. Instead, wait until
3542 we know a lib is needed.
3543 (_bfd_elf_link_create_dynstrtab): Extract from..
3544 (_bfd_elf_link_create_dynamic_sections_): ..here.
3545 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
3546 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
3547 for non-existent .dynamic.
3548 (elf_link_output_extsym): Don't complain about undefined symbols
3549 in as-needed dynamic libs that aren't actually linked.
3550
35512005-01-24 Andrew Cagney <cagney@gnu.org>
3552
3553 * configure: Regenerate, ../gettext.m4 was updated.
3554
35552005-01-21 Ben Elliston <bje@au.ibm.com>
3556
3557 * aout-encap.c: Remove unused file.
3558
35592005-01-19 H.J. Lu <hongjiu.lu@intel.com>
3560
3561 PR 679
3562 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
3563 non-function symbols are local.
3564 (_bfd_elf_symbol_refs_local_p): Likewise.
3565
35662005-01-18 Alan Modra <amodra@bigpond.net.au>
3567
3568 * bfd.c (bfd_link_just_syms): Add abfd param.
3569 * bfd-in2.h: Regenerate.
3570
35712005-01-17 Richard Sandiford <rsandifo@redhat.com>
3572
3573 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
3574 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
3575 instructions. If the amount of padding is known, reduce the size
3576 of the CIE or FDE by that amount.
3577
35782005-01-17 Richard Sandiford <rsandifo@redhat.com>
3579
3580 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
3581 augmentation_size. Use bfd_signed_vmas for data_align.
3582 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
3583 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
3584 functions. Don't read past the end of the enclosing CIE or FDE.
3585 (skip_bytes): New utility function.
3586 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
3587 sanity checking.
3588 (_bfd_elf_write_section_eh_frame): Use new functions.
3589
35902005-01-17 Richard Sandiford <rsandifo@redhat.com>
3591
3592 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
3593 assert-style REQUIRE() macro to handle sanity checks.
3594
35952005-01-17 H.J. Lu <hongjiu.lu@intel.com>
3596
3597 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
3598 (comp_unit): Here.
3599 (read_unsigned_leb128): Removed.
3600 (read_signed_leb128): Removed.
3601 (find_abstract_instance_name): Updated.
3602 (parse_comp_unit): Accept info_ptr_unit.
3603 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
3604 comp unit and pass it to parse_comp_unit.
3605
3606 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
3607 (read_signed_leb128): Moved to ...
3608 * libbfd.c: Here.
3609
3610 * libbfd-in.h (read_unsigned_leb128): New prototype.
3611 (read_signed_leb128): Likewise.
3612 * libbfd.h: Regenerated.
3613
36142005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
3615 Nick Clifton <nickc@redhat.com>
3616
3617 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
3618 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
3619 arch_sh4a_nofpu_up in order to match the external names and make the
3620 testsuite's job easier.
3621 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
3622 names.
3623 * bfd-in2.h: Regenerate.
3624
36252005-01-15 Andrew Cagney <cagney@gnu.org>
3626
3627 * bfd.m4: New file.
3628 * acinclude.m4: Move BFD_NEED_DECLARATION,
3629 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
3630 the new file bfd.m4. Include ../bfd/bfd.m4.
3631 * configure: Re-generate.
3632
36332005-01-12 Alan Modra <amodra@bigpond.net.au>
3634
3635 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
3636 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
3637 reaching PLT.
3638 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
3639 R_PPC_RELAX32PC_PLT.
3640
36412005-01-11 Alan Modra <amodra@bigpond.net.au>
3642
3643 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
3644 symbols.
3645 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
3646 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
3647 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
3648 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
3649 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
3650 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
3651 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
3652 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3653 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3654 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
3655 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
3656 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
3657 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3658 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3659
36602005-01-11 Alan Modra <amodra@bigpond.net.au>
3661
3662 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
3663 .dynsbss flags.
3664
36652005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
3666
3667 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
3668 * bfd-in2.h: Regenerate.
3669 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
3670 to support these new machine values.
3671 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
3672 the maxq10.
3673 (bfd_maxq_arch): Update values for the maxq20.
3674
36752005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
3676
3677 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
3678 non-shared object, do not reserve space in .plt and .rela.plt for
3679 regular symbols neither defined nor referenced in shared objects.
3680
36812005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3682
3683 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
3684 to zero the structure.
3685 (create_got_section): Use BFD_ASSERT instead of abort.
3686 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
3687 'srelgot' fields.
3688 (create_got_section): New function.
3689 (sparc64_elf_create_dynamic_sections): Likewise.
3690 (sparc64_elf_check_relocs): Invoke create_got_section instead of
3691 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
3692 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
3693 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
3694 (sparc64_elf_finish_dynamic_symbol): Likewise.
3695 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
3696 (elf_backend_create_dynamic_sections): Define to
3697 sparc64_elf_create_dynamic_sections.
3698
36992005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3700
3701 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
3702 (elf_backend_omit_section_dynsym): Define to it.
3703 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
3704 (elf_backend_omit_section_dynsym): Define to it.
3705
37062005-01-07 Jakub Jelinek <jakub@redhat.com>
3707
3708 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
3709 PT_DYNAMIC segment, unless .dynamic.
3710
37112005-01-06 Paul Brook <paul@codesourcery.com>
3712
3713 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
3714 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
3715 * configure: Regenerate.
3716 * elf32-arm.c: Add VxWorks target bfd.
3717 (USE_REL): Remove.
3718 (elf32_arm_link_hash_table): Add use_rel.
3719 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
3720 elf32_arm_relocate_section): Replace USE_REL with runtime check.
3721 Correct offset calculation for RELA case.
3722 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
3723 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
3724 (elf32_arm_vxworks_link_hash_table_create): New function.
3725 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
3726 (bfd_elf32_littlearm_vxworks_vec): Ditto.
3727 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
3728
37292005-01-06 Alan Modra <amodra@bigpond.net.au>
3730
3731 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
3732 multi_toc_needed.
3733 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
3734 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
3735 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
3736 (ppc64_elf_next_toc_section): Heed no_multi_toc.
3737 (ppc64_elf_reinit_toc): Set multi_toc_needed.
3738 (toc_adjusting_stub_needed): Rewrite.
3739 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
3740 toc tests. Adjust for toc_adjusting_stub_needed changes.
3741 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
3742 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
3743 * section.c: Expand comment on backend bits.
3744 * bfd-in2.h: Regenerate.
3745 * libbfd.h: Regenerate.
3746
37472005-01-06 Alan Modra <amodra@bigpond.net.au>
3748
3749 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
3750 toc adjusting stub, do not test source section flags.
3751
37522005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
3753
3754 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
3755 from STABS debugging sections again.
3756
37572005-01-05 Fred Fish <fnf@specifixinc.com>
3758
3759 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
3760 (find_abstract_instance_name): New function.
3761 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
3762 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
3763 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
3764
37652004-12-31 Paul Brook <paul@copdesourcery.com>
3766
3767 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
3768
37692004-12-31 Alan Modra <amodra@bigpond.net.au>
3770
3771 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
3772 Commit missing changes from 2004-12-22.
3773 * bfd-in2.h: Regenerate.
3774
37752004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
3776
3777 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
3778
37792004-12-21 Kris Warkentin <kewarken@qnx.com>
3780
3781 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
3782 Add 'base' argument for constructing register sections. Reformat.
3783 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
3784 gp and fp regs. Reformat.
3785
37862004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
3787
3788 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
3789 * bfd-in2.h: Regenerate.
3790 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
3791 (avr_reloc_map): Likewise.
3792 (avr_final_link_relocate): Likewise.
3793
37942004-12-22 Alan Modra <amodra@bigpond.net.au>
3795
3796 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
3797 as-needed dynamic libs as undefined.
3798 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
3799 libs when finding they are needed.
3800
38012004-12-20 Alan Modra <amodra@bigpond.net.au>
3802
3803 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
3804 (opd_entry_value): Use opd_relocs if available.
3805 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
3806 copy .opd relocations to opd_relocs.
3807 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
3808
38092004-12-16 Richard Sandiford <rsandifo@redhat.com>
3810
3811 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
3812 * elf32-v850.c (v850_elf_howto_table): Add entry for
3813 R_V850_LO16_SPLIT_OFFSET.
3814 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
3815 (v850_elf_perform_lo16_relocation): New function, extracted from...
3816 (v850_elf_perform_relocation): ...here. Use it to handle
3817 R_V850_LO16_SPLIT_OFFSET.
3818 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
3819 R_V850_LO16_SPLIT_OFFSET.
3820 * libbfd.h, bfd-in2.h: Regenerate.
3821
38222004-12-14 P.J. Darcy <darcypj@us.ibm.com>
3823
3824 * config.bfd: Add s390x-ibm-tpf support.
3825
38262004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
3827
3828 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
3829 to prototype, to make hash info available.
3830 Prevent wrapped symbols from being adjusted twice.
3831
38322004-12-14 Richard Sandiford <rsandifo@redhat.com>
3833
3834 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
3835 overflow for calls to undefined weak symbols.
3836
38372004-12-11 Alan Modra <amodra@bigpond.net.au>
3838
3839 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
3840 canonical sections syms have a name.
3841
38422004-12-11 Alan Modra <amodra@bigpond.net.au>
3843
3844 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
3845 have been adjusted for output.
3846 (ppc64_elf_relocate_section): Mark sections with reloc_done.
3847
38482004-12-10 Alan Modra <amodra@bigpond.net.au>
3849
3850 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
3851 add symtab_hdr param.
3852 (group_signature): Update calls.
3853 * elf-bfd.h (bfd_elf_sym_name): Update.
3854 * elf32-ppc.c (ppc_elf_relocate_section): Update.
3855 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
3856 (ppc64_elf_relocate_section): Update.
3857 * elflink.c (elf_link_input_bfd): Update.
3858
38592004-12-10 Jakub Jelinek <jakub@redhat.com>
3860
3861 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
3862 st_shndx on STT_SECTION sections.
3863
38642004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
3865
3866 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
3867 ELF section symbols.
3868
38692004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
3870
3871 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
3872 return a real value, unless it is a PLT symbol.
3873 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
3874 bal if possible.
3875
3876 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
3877 R_MIPS_JALR entry to 0.
3878
3879 * archures.c: Define bfd_mach_mips9000.
3880 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
3881 (mips_set_isa_flags): Handle bfd_mach_mips9000.
3882 * cpu-mips.c (I_mips9000): Define.
3883 (arch_info_struct): Add case for bfd_mach_mips9000.
3884 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
3885 * bfd-in2.h: Regenerate.
3886
38872004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
3888
3889 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
3890 overflow.
3891
38922004-12-07 Ben Elliston <bje@gnu.org>
3893
3894 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
3895
38962004-12-06 Daniel Jacobowitz <dan@debian.org>
3897
3898 Suggested by Fergal Daly <fergal@esatclear.ie>:
3899 * simple.c (simple_dummy_multiple_definition): New function.
3900 (bfd_simple_get_relocated_section_contents): Use it.
3901
39022004-12-03 Jan Beulich <jbeulich@novell.com>
3903
3904 * elf.c (elf_find_function): Don't use the last file symbol ever,
3905 seen, but the last one seen prior to the symbol being reported.
3906 Don't report a filename at all for global symbols when that might
3907 be ambiguous/wrong.
3908
39092004-12-01 Paul Brook <paul@codesourcery.com>
3910
3911 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
3912 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
3913 version.
3914
39152004-12-01 Paul Brook <paul@codesourcery.com>
3916
3917 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
3918 sections undefined.
3919
39202004-11-30 Paul Brook <paul@codesourcery.com>
3921
3922 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
3923 no_pipeline_knowledge
3924 (elf32_arm_link_hash_table_create): Ditto.
3925 (bfd_elf32_arm_process_before_allocation): Ditto.
3926 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
3927 handling.
3928 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
3929 prototype.
3930 * bfd-in2.h: Regenerate.
3931
39322004-11-30 Randolph Chung <tausq@debian.org>
3933
3934 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
3935 (elf32_hppa_grok_psinfo): New function.
3936 (elf_backend_grok_prstatus): Define.
3937 (elf_backend_grok_psinfo): Define.
3938
39392004-11-24 H.J. Lu <hongjiu.lu@intel.com>
3940
3941 PR 574:
3942 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
3943
39442004-11-24 Paul Brook <paul@codesourcery.com>
3945
3946 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
3947
39482004-11-24 Paul Brook <paul@codesourcery.com>
3949
3950 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
3951 (elf32_arm_swap_symbol_out): New function.
3952 (elf32_arm_size_info): Add.
3953 (elf_backend_size_info): Define.
3954
39552004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3956
3957 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
3958 make_bfd_asection.
3959
39602004-11-19 Alan Modra <amodra@bigpond.net.au>
3961
3962 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
3963 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
3964 * nlmcode.h (nlm_write_object_contents): Warning fix.
3965
39662004-11-18 Bob Wilson <bob.wilson@acm.org>
3967
3968 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
3969
39702004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3971
3972 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
3973 (elf32_arm_plt_thumb_stub): New.
3974 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
3975 and plt_got_offset.
3976 (elf32_arm_link_hash_traverse): Fix typo.
3977 (elf32_arm_link_hash_table): Add obfd.
3978 (elf32_arm_link_hash_newfunc): Initialize new fields.
3979 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
3980 (elf32_arm_link_hash_table_create): Initialize obfd.
3981 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
3982 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
3983 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
3984 interworking BFD is not dynamic.
3985 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
3986 not emit glue for PLT references.
3987 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
3988 emit glue for PLT references. Support the Thumb PLT prefix.
3989 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
3990 plt_thumb_refcount.
3991 (elf32_arm_check_relocs): Likewise.
3992 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
3993 plt_thumb_refcount.
3994 (allocate_dynrelocs): Handle Thumb PLT references.
3995 (elf32_arm_finish_dynamic_symbol): Likewise.
3996 (elf32_arm_symbol_processing): New function.
3997 (elf_backend_symbol_processing): Define.
3998
39992004-11-16 Richard Sandiford <rsandifo@redhat.com>
4000
4001 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
4002 add_fde_encoding. Remove need_relative.
4003 * elf-eh-frame.c (extra_augmentation_string_bytes)
4004 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
4005 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
4006 in cases where the CIE has no existing 'R' augmentation. Use
4007 size_of_output_cie_fde when assigning offsets. Use the final offset
4008 as the new section size.
4009 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
4010 Account for any extra augmentation bytes in the returned offset.
4011 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
4012 moved before being modified. Pad growing entries with DW_CFA_nops.
4013 Add 'z' and 'R' augmentations as directed by add_augmentation_size
4014 and add_fde_encoding.
4015
40162004-11-15 Mark Mitchell <mark@codesourcery.com>
4017
4018 * elf32-arm.c (elf32_arm_relocate_section): Use
4019 arm_real_reloc_type.
4020
40212004-11-16 Richard Sandiford <rsandifo@redhat.com>
4022
4023 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
4024 for discard relocations; don't add an R_MIPS_NONE to the main body
4025 of .rel.dyn.
4026
40272004-11-04 Paul Brook <paul@codesourcery.com>
4028
4029 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
4030 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
4031 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
4032 default version definition for unversioned symbols.
4033 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
4034 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
4035 _bfd_elf_slurp_version_tables. Set default version for unversioned
4036 imported symbols.
4037
40382004-11-15 Paul Brook <paul@codesourcery.com>
4039
4040 * elflink.c (elf_link_add_object_symbols): Don't assume version
4041 indices are consecutive.
4042
40432004-11-14 Richard Sandiford <rsandifo@redhat.com>
4044
4045 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
4046 composite relocations against the personality data.
4047
40482004-11-13 Paul Brook <paul@codesourcery.com>
4049
4050 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
4051 R_ARM_PREL31 relocations to PLT entries.
4052 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
4053 (elf32_arm_check_relocs): Ditto.
4054
40552004-11-12 Bob Wilson <bob.wilson@acm.org>
4056
4057 * xtensa-isa.c (xtensa_interface_class_id): New.
4058
40592004-11-11 Bob Wilson <bob.wilson@acm.org>
4060
4061 * elf32-xtensa.c (property_table_compare): Remove assertion about
4062 entries with the same address and non-zero size.
4063 (xtensa_read_table_entries): Report such entries as errors.
4064
40652004-11-11 Mark Mitchell <mark@codesourcery.com>
4066
4067 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
4068 R_ARM_RELATIVE on Symbian OS.
4069
40702004-11-09 Mark Mitchell <mark@codesourcery.com>
4071
4072 * som.c (som_bfd_print_private_bfd_data): New function.
4073 (som_object_setup): Save the auxiliary header. Don't assume that
4074 zero is an invalid entry point for a shared library.
4075 (som_object_p): Allocate the auxiliary header on the heap.
4076
4077 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
4078 declaration.
4079 (elf32_arm_symbian_modify_segment_map): Likewise.
4080
40812004-11-09 Daniel Jacobowitz <dan@debian.org>
4082
4083 From David Poole <daveml@mbuf.com>:
4084 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
4085 (elf32_arm_size_dynamic_sections): Call it.
4086
40872004-11-09 Alan Modra <amodra@bigpond.net.au>
4088
4089 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
4090 (ALL_MACHINES_CFILES): Fix typo.
4091 * Makefile.in: Regenerate.
4092 * po/SRC-POTFILES.in: Regenerate.
4093
40942004-11-08 Mark Mitchell <mark@codesourcery.com>
4095
4096 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
4097 R_ARM_RELATIVE relocation for Symbian OS, mention the section
4098 symbol in the relocation.
4099
41002004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
4101 Vineet Sharma <vineets@noida.hcltech.com>
4102
4103 * coff-maxq.c: New File.
4104 * cpu-maxq.c: New File.
4105 * coffcode.h: Likewise.
4106 * config.bfd: Likewise.
4107 * configure.in (maxqcoff_vec): New target vector.
4108 * Makefile.am: Add support for maxq target.
4109 * configure.in: Likewise.
4110 * archures.c:. Likewise.
4111 * targets.c: Likewise.
4112 * bfd_in2.h : Regenerated.
4113 * Makefile.in: Regenerated.
4114 * configure: Regenerated.
4115 * doc/Makefile.in: Regenerated.
4116
41172004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
4118
4119 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
4120 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
4121 C_NT_WEAK aux entries.
4122 (_bfd_coff_generic_relocate_section): Handle undefined
4123 aliases.
4124
41252004-11-07 Andreas Schwab <schwab@suse.de>
4126
4127 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
4128 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
4129 non-default visibility.
4130
41312004-11-01 Mark Mitchell <mark@codesourcery.com>
4132
4133 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
4134 D_PAGED.
4135 (elf32_arm_symbian_modify_segment_map): Don't
4136 reset includes_filehdr and includes_phdrs here.
4137
41382004-11-04 Daniel Jacobowitz <dan@debian.org>
4139
4140 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
4141 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
4142 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
4143 dependency.
4144 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
4145 to a new removed list. Remove normal configuration stanzas.
4146 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
4147 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
4148 elfarm-nabi.lo with elf32-arm.lo.
4149 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
4150 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
4151 * elf32-arm.h: Remove.
4152 * elfarm-oabi.c: Remove.
4153 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
4154 and bfd_elf32_littlearm_oabi_vec.
4155 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
4156
41572004-11-04 Hans-Peter Nilsson <hp@axis.com>
4158
4159 * config.bfd: Support crisv32-*-* like cris-*-*.
4160 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
4161 (bfd_mach_cris_v10_v32): New macros.
4162 * cpu-cris.c: Tweak formatting.
4163 (get_compatible): New function.
4164 (N): New macro.
4165 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
4166 bfd_arch_info_type:s.
4167 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
4168 get_compatible for member compatible and link bfd_cris_arch_v32 as
4169 next.
4170 * elf32-cris.c (cris_elf_pcrel_reloc)
4171 (cris_elf_set_mach_from_flags): New functions.
4172 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
4173 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
4174 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
4175 numbers for bfd_mach_cris_v32.
4176 (PLT_ENTRY_SIZE_V32): New macro.
4177 (elf_cris_plt0_entry): Drop last comma in initializer.
4178 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
4179 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
4180 PLT initializers.
4181 (cris_elf_relocate_section): Change all "%B(%A)" messages to
4182 "%B, section %A".
4183 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
4184 (elf_cris_finish_dynamic_sections): Similar.
4185 (elf_cris_adjust_dynamic_symbol): Similar.
4186 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
4187 section %A".
4188 <switch with PIC relocs>: Emit error and return FALSE for
4189 bfd_mach_cris_v10_v32.
4190 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4191 Emit warning when generating textrel reloc.
4192 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
4193 (cris_elf_final_write_processing): Set flags according to mach.
4194 (cris_elf_print_private_bfd_data): Display
4195 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
4196 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
4197 new_flags. Don't call cris_elf_final_write_processing. Don't
4198 look at the actual elf header flags at all; use
4199 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
4200 in bfd_get_mach for ibfd and obfd and handle merging of compatible
4201 objects.
4202 (bfd_elf32_bfd_copy_private_bfd_data): Define.
4203 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
4204 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
4205 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
4206 * bfd-in2.h, libbfd.h: Regenerate.
4207
42082004-11-04 Alan Modra <amodra@bigpond.net.au>
4209
4210 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
4211 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
4212 comment.
4213 (struct adjust_toc_info): New.
4214 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
4215
42162004-11-03 Bob Wilson <bob.wilson@acm.org>
4217
4218 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
4219 if there are no segments.
4220
42212004-11-02 Daniel Jacobowitz <dan@debian.org>
4222
4223 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
4224
42252004-11-02 Nick Clifton <nickc@redhat.com>
4226
4227 * elf32-iq2000.c: Convert to ISO C90 formatting.
4228
42292004-11-02 Hans-Peter Nilsson <hp@axis.com>
4230
4231 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
4232
42332004-10-28 H.J. Lu <hongjiu.lu@intel.com>
4234
4235 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
4236 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
4237 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
4238
42392004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4240
4241 * elf32-sh.c (tpoff): Take alignment into account.
4242
42432004-10-28 Nick Clifton <nickc@redhat.com>
4244
4245 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
4246 performing a relocatable link.
4247 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
4248 for MIPS ports under Irix.
4249
42502004-10-27 Richard Earnshaw <rearnsha@arm.com>
4251
4252 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
4253 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
4254 (elf32_arm_final_link_relocate): Ditto.
4255 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
4256 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
4257 (elf32_arm_adjust_dynamic_symbol): Ditto.
4258 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
4259 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
4260 (elf32_arm_r_howto): ... To here.
4261 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
4262
42632004-10-26 H.J. Lu <hongjiu.lu@intel.com>
4264
4265 PR 475
4266 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
4267 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
4268 and R_IA64_SECREL64LSB.
4269
42702004-10-26 Paul Brook <paul@codesourcery.com>
4271
4272 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
4273 (bfd_elf_size_dynamic_sections): Create default version definition.
4274 (elf_link_output_extsym): Adjust for default symbol version.
4275
42762004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4277
4278 * mmo.c: Adjust to ISO C.
4279
4280 * mmo.c (mmo_write_section_description): New function broken out
4281 of mmo_internal_write_section.
4282 (mmo_internal_write_section): For each of .text and .data, call
4283 mmo_write_section_description before outputting contents if it has
4284 nontrivially deducible vma or contents.
4285 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
4286 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
4287 symbols if found within the .data address range.
4288
42892004-10-24 Daniel Jacobowitz <dan@debian.org>
4290
4291 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
4292
42932004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4294
4295 * mmo.c (File Layout): Correct place of misplaced blurb about
4296 special data.
4297
42982004-10-22 Mark Kettenis <kettenis@gnu.org>
4299
4300 * config.bfd: Add mips64*-*-openbsd.
4301
43022004-10-21 Bob Wilson <bob.wilson@acm.org>
4303
4304 * elf32-xtensa.c (ebb_propose_action): Put declarations before
4305 statements.
4306
43072004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4308
4309 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
4310 * configure: Regenerate.
4311
43122004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4313
4314 PR 463
4315 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
4316 to linker reloc_overflow callback.
4317 (aout_link_input_section_ext): Likewise.
4318 (aout_link_reloc_link_order): Likewise.
4319 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4320 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4321 Likewise.
4322 (alpha_relocate_section): Likewise.
4323 * coff-arm.c (coff_arm_relocate_section): Likewise.
4324 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
4325 * coff-h8500.c (extra_case): Likewise.
4326 * coff-i960.c (coff_i960_relocate_section): Likewise.
4327 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4328 * coff-mips.c (mips_relocate_section): Likewise.
4329 * coff-or32.c (coff_or32_relocate_section): Likewise.
4330 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4331 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
4332 * coff-sh.c (sh_relocate_section): Likewise.
4333 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4334 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
4335 * coff-z8k.c (extra_case): Likewise.
4336 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
4337 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
4338 (_bfd_coff_generic_relocate_section): Likewise.
4339 * ecoff.c (ecoff_reloc_link_order): Likewise.
4340 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4341 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4342 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4343 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4344 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4345 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
4346 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4347 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
4348 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4349 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4350 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4351 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4352 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4353 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4354 * elf32-i386.c (elf_i386_relocate_section): Likewise.
4355 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4356 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4357 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
4358 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4359 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
4360 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4361 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4362 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
4363 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4364 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4365 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4366 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4367 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4368 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4369 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4370 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4371 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4372 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
4373 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4374 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4375 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4376 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4377 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4378 * elflink.c (elf_reloc_link_order): Likewise.
4379 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4380 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4381 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
4382 * linker.c (_bfd_generic_reloc_link_order): Likewise.
4383 * pdp11.c (pdp11_aout_link_input_section): Likewise.
4384 (aout_link_reloc_link_order): Likewise.
4385 * reloc.c (bfd_generic_get_relocated_section_contents):
4386 Likewise.
4387 * xcofflink.c (xcoff_reloc_link_order): Likewise.
4388 * simple.c (simple_dummy_reloc_overflow): Updated.
4389
43902004-10-20 Andreas Schwab <schwab@suse.de>
4391
4392 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
4393 (elf_backend_plt_sym_val): Define.
4394
43952004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
4396
4397 * config.bfd: Set targ_underscore=yes for PE COFF targets
4398
43992004-10-19 Alan Modra <amodra@bigpond.net.au>
4400
4401 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
4402 (ppc64_elf_edit_opd): Likewise.
4403
44042004-10-18 Mark Mitchell <mark@codesourcery.com>
4405
4406 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
4407 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
4408 set SEC_ALLOC and SEC_LOAD.
4409
44102004-10-18 Nick Clifton <nickc@redhat.com>
4411
4412 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
4413 'name' for relocs against both local and global symbols.
4414
44152004-10-16 Daniel Jacobowitz <dan@debian.org>
4416
4417 * bfd-in2.h: Regenerate.
4418 * bfd.c (struct bfd): Add no_export.
4419 * elflink.c (elf_link_add_object_symbols): Handle no_export.
4420
44212004-10-15 Alan Modra <amodra@bigpond.net.au>
4422
4423 * config.bfd: Whitespace cleanup.
4424 * Makefile.am: Run "make dep-am"
4425 * Makefile.in: Regenerate.
4426
44272004-10-15 Jakub Jelinek <jakub@redhat.com>
4428
4429 * elflink.c (struct already_linked_section): Removed.
4430 (try_match_symbols_in_sections, already_linked): Removed.
4431 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
4432 prefix of section names when finding already_linked_table
4433 chain. Compare section names. Instead of calling already_linked,
4434 do it inline and only for sections in the same already_linked_list.
4435
44362004-10-15 Alan Modra <amodra@bigpond.net.au>
4437
4438 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
4439 parameter. If called after _bfd_elf_write_section_eh_frame,
4440 don't allow a -2 return unless need_* bit is already set, and
4441 handle offsets adjusted for output_offset.
4442 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
4443 * elf.c (_bfd_elf_section_offset): Update call.
4444
44452004-10-13 H.J. Lu <hongjiu.lu@intel.com>
4446
4447 PR 440
4448 * coffcode.h (coff_compute_section_file_positions): Cast to
4449 bfd_vma when computing page alignment.
4450
44512004-10-13 Mark Mitchell <mark@codesourcery.com>
4452
4453 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4454 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
4455
44562004-10-12 Mark Mitchell <mark@codesourcery.com>
4457
4458 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
4459 relocations use a virtual address, not a section offset.
4460
44612004-10-12 Bob Wilson <bob.wilson@acm.org>
4462
4463 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
4464 (narrow_instruction, widen_instruction): Remove unnecessary calls to
4465 xtensa_format_encode.
4466 (ebb_propose_action): Inline call to ebb_add_proposed_action.
4467 (ebb_add_proposed_action): Delete.
4468
44692004-10-12 Bob Wilson <bob.wilson@acm.org>
4470
4471 * elf32-xtensa.c: Use ISO C90 formatting.
4472
44732004-10-12 Paul Brook <paul@codesourcery.com>
4474
4475 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
4476 message.
4477
44782004-10-12 Paul Brook <paul@codesourcery.com>
4479
4480 * elf32-arm.h: Support EABI version 4 objects.
4481
44822004-10-12 Alan Modra <amodra@bigpond.net.au>
4483
4484 PR 325
4485 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
4486 Don't mark as default.
4487 (bfd_x86_64_arch): Don't mark as default.
4488
44892004-10-12 Alan Modra <amodra@bigpond.net.au>
4490
4491 * elflink.c (enum action_discarded): New.
4492 (elf_section_complain_discarded): Delete.
4493 (elf_action_discarded): New function subsuming the above and also
4494 controlling reloc behaviour.
4495 (elf_link_input_bfd): Use it.
4496
44972004-10-11 Jakub Jelinek <jakub@redhat.com>
4498
4499 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
4500 (special_sections): Add .gnu.liblist and .gnu.conflict.
4501 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
4502
45032004-10-11 Alan Modra <amodra@bigpond.net.au>
4504
4505 PR 233
4506 * elflink.c (elf_link_input_bfd): Try harder to support
4507 relocations against symbols in removed linkonce sections.
4508
45092004-10-11 Alan Modra <amodra@bigpond.net.au>
4510
4511 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
4512
4513 PR 354
4514 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
4515 sections do not reference symbols in non-SEC_ALLOC sections.
4516
45172004-10-11 Alan Modra <amodra@bigpond.net.au>
4518
4519 PR 437
4520 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
4521 (_bfd_elf_link_omit_section_dynsym): Formatting.
4522
45232004-10-10 Alan Modra <amodra@bigpond.net.au>
4524
4525 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
4526 * libbfd.h: Regnerate.
4527 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
4528 * elf32-frv.c: Likewise.
4529 * elf32-m32r.c: Likewise.
4530 * elf32-ppc.c: Likewise.
4531 * elf64-hppa.c: Likewise.
4532 * elfxx-ia64.c: Likewise.
4533 * opncls.c: Likewise.
4534
45352004-10-10 Alan Modra <amodra@bigpond.net.au>
4536
4537 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
4538 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
4539 offsets stored in struct eh_cie_fde entries before doing other
4540 work.
4541
4542 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
4543 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
4544 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
4545 setting offsets for removed CIEs. Don't set "sec", instead set
4546 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
4547 CIE in hdr_info. Only set make_relative and make_lsda_relative
4548 for CIEs. Use pointers rather than array indices.
4549 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
4550 make_lsda_relative, need_* on cie_inf for FDEs.
4551 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
4552 section output_offset. Delete cie_offset, instead use cie_inf
4553 pointer to CIE entry. Use need_relative and need_lsda_relative on
4554 CIE entry for FDEs. Use pointers rather than array indices.
4555
45562004-10-09 Alan Modra <amodra@bigpond.net.au>
4557
4558 * coff-rs6000.c (rs6000coff_vec): Add initializer for
4559 bfd_is_target_special_symbol.
4560 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4561 * som.c (som_bfd_is_target_special_symbol): Define.
4562
45632004-10-08 Nick Clifton <nickc@redhat.com>
4564
4565 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
4566 * configure: Regenerate.
4567 * bfd-in2.h: Regenerate.
4568 * syms.c (bfd_is_target_special_symbol): New interface function.
4569 Returns true when a symbol should be considered to be special.
4570 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
4571 the symbol jump table.
4572 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
4573 Return true iff the symbol is a mapping symbol.
4574 (bfd_elf32_bfd_is_target_special_symbol): Define.
4575 * elfxx-target.h: Provide a default definition for
4576 bfd_is_target_special_symbol.
4577 * aout-target.h: Likewise.
4578 * aout-tic30.c: Likewise.
4579 * binary.c: Likewise.
4580 * coffcode.h: Likewise.
4581 * i386msdos.c: Likewise.
4582 * ieee.c: Likewise.
4583 * ihex.c: Likewise.
4584 * libaout.h: Likewise.
4585 * libbfd-in.h: Likewise
4586 * libecoff.h: Likewise.
4587 * mach-o.c: Likewise.
4588 * mmo.c: Likewise.
4589 * nlm-target.h: Likewise.
4590 * oasys.c: Likewise.
4591 * pef.c: Likewise.
4592 * ppcboot.c: Likewise.
4593 * srec.c: Likewise.
4594 * tekhex.c: Likewise.
4595 * versados.c: Likewise.
4596 * vms.c: Likewise.
4597 * xcoff-target.h: Likewise.
4598 * xsym.c: Likewise.
4599 * libbfd.h: Regenerate.
4600
46012004-10-08 Daniel Jacobowitz <dan@debian.org>
4602
4603 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
4604 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
4605 (elf_backend_section_from_shdr): Define.
4606
46072004-10-08 Alan Modra <amodra@bigpond.net.au>
4608
4609 * syms.c (bfd_is_local_label): Return false for file symbols.
4610
46112004-10-07 Bob Wilson <bob.wilson@acm.org>
4612 David Heine <dlheine@tensilica.com>
4613
4614 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
4615 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
4616 (elf32xtensa_no_literal_movement): New global variable.
4617 (elf_howto_table): Add entries for new relocations.
4618 (elf_xtensa_reloc_type_lookup): Handle new relocations.
4619 (property_table_compare): When addresses are equal, compare sizes and
4620 various property flags.
4621 (property_table_matches): New.
4622 (xtensa_read_table_entries): Extend to read new property tables. Add
4623 output_addr parameter to indicate that output addresses should be used.
4624 Use bfd_get_section_limit.
4625 (elf_xtensa_find_property_entry): New.
4626 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
4627 (elf_xtensa_check_relocs): Handle new relocations.
4628 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
4629 relocations. Use new xtensa-isa.h functions.
4630 (build_encoding_error_message): Remove encode_result parameter. Add
4631 new target_address parameter used to detect alignment errors.
4632 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
4633 error handling. Use new is_operand_relocation function.
4634 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
4635 Use underbar macro for error messages. Formatting.
4636 (get_const16_opcode): New.
4637 (get_l32r_opcode): Add a separate flag for initialization.
4638 (get_relocation_opnd): Operand number is no longer explicit in the
4639 relocation. Change to decode the opcode and analyze its operands.
4640 (get_relocation_slot): New.
4641 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
4642 Use new xtensa-isa.h functions to handle multislot instructions.
4643 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
4644 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
4645 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
4646 check_loop_aligned, check_branch_target_aligned_address, narrowable,
4647 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
4648 get_single_format, init_op_single_format_table): New.
4649 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
4650 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
4651 (contract_asm_expansion): Add error_message parameter and pass it to
4652 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
4653 with R_XTENSA_SLOT0_OP.
4654 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
4655 instructions. Use new xtensa-isa.h functions.
4656 (r_reloc struct): Add new virtual_offset field.
4657 (r_reloc_init): Add contents and content_length parameters. Set
4658 virtual_offset field to zero. Add contents to target_offset field for
4659 partial_inplace relocations.
4660 (r_reloc_is_defined): Check for null.
4661 (print_r_reloc): New debug function.
4662 (source_reloc struct): Replace xtensa_operand field with pair of the
4663 opcode and the operand position. Add is_abs_literal field.
4664 (init_source_reloc): Specify operand by opcode/position pair. Set
4665 is_abs_literal field.
4666 (source_reloc_compare): When target_offsets are equal, compare other
4667 fields to make sorting predictable.
4668 (literal_value struct): Add is_abs_literal field.
4669 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
4670 (init_literal_value): New.
4671 (is_same_value): Replace with ...
4672 (literal_value_equal): ... this function. Add comparisons of
4673 virtual_offset and is_abs_literal fields.
4674 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
4675 failure. Initialize has_last_loc field.
4676 (value_map_hash_table_delete): New.
4677 (hash_literal_value): Rename to ...
4678 (literal_value_hash): ... this. Include is_abs_literal flag and
4679 virtual_offset field in the hash value.
4680 (get_cached_value): Rename to ...
4681 (value_map_get_cached_value): ... this. Update calls to
4682 literal_value_hash and literal_value_equal.
4683 (add_value_map): Check for allocation failure. Update calls to
4684 value_map_get_cached_value and literal_value_hash.
4685 (text_action, text_action_list, text_action_t): New types.
4686 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
4687 text_action_add, text_action_add_literal, offset_with_removed_text,
4688 offset_with_removed_text_before_fill, find_insn_action,
4689 print_action_list, print_removed_literals): New.
4690 (offset_with_removed_literals): Delete.
4691 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
4692 fix_array, fix_array_count, allocated_relocs, relocs_count, and
4693 allocated_relocs_count fields.
4694 (init_xtensa_relax_info): Initialize new fields.
4695 (reloc_bfd_fix struct): Add new translated field.
4696 (reloc_bfd_fix_init): Add translated parameter and use it to set the
4697 translated field.
4698 (fix_compare, cache_fix_array): New.
4699 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
4700 section via get_xtensa_relax_info. Use cache_fix_array to set up
4701 sorted fix_array and use bsearch instead of linear search.
4702 (section_cache_t): New struct.
4703 (init_section_cache, section_cache_section, clear_section_cache): New.
4704 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
4705 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
4706 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
4707 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
4708 New.
4709 (retrieve_contents): Use bfd_get_section_limit.
4710 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
4711 to compute_removed_literals. Free value_map_hash_table when no longer
4712 needed.
4713 (analyze_relocations): Check is_relaxable_asm_section flag. Call
4714 compute_text_actions for all sections.
4715 (find_relaxable_sections): Mark sections as relaxable if they contain
4716 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
4717 call. Increment relax_info src_count field only for appropriate
4718 relocation types. Remove is_literal_section check.
4719 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
4720 r_reloc_init and find_associated_l32r_irel. Check
4721 is_relaxable_asm_section flag. Handle L32R instructions with absolute
4722 literals. Pass is_abs_literal flag to init_source_reloc.
4723 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
4724 CONST16 instructions. Adjust calls to r_reloc_init and
4725 pcrel_reloc_fits. Handle weak symbols conservatively.
4726 (find_associated_l32r_irel): Add bfd parameter and pass it to
4727 is_l32r_relocation.
4728 (compute_text_actions, compute_ebb_proposed_actions,
4729 compute_ebb_actions, check_section_ebb_pcrels_fit,
4730 check_section_ebb_reduces, text_action_add_proposed,
4731 compute_fill_extra_space): New.
4732 (remove_literals): Replace with ...
4733 (compute_removed_literals): ... this function. Call
4734 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
4735 Call xtensa_read_table_entries to get the property table. Skip
4736 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
4737 is_removable_literal, remove_dead_literal, and
4738 identify_literal_placement functions.
4739 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
4740 instead of linear search.
4741 (is_removable_literal, remove_dead_literal,
4742 identify_literal_placement): New.
4743 (relocations_reach): Update check for literal not referenced by any
4744 PC-relative relocations. Adjust call to pcrel_reloc_fits.
4745 (coalesce_shared_literal, move_shared_literal): New.
4746 (relax_section): Use bfd_get_section_limit. Call
4747 translate_section_fixes. Update calls to r_reloc_init and
4748 offset_with_removed_text. Check new is_relaxable_asm_section flag.
4749 Add call to pin_internal_relocs. Add special handling for
4750 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
4751 info to calculate new addend_displacement variable. Replace code for
4752 deleting literals with more general code to perform the actions
4753 determined by the action_list for the section.
4754 (translate_section_fixes, translate_reloc_bfd_fix): New.
4755 (translate_reloc): Check new is_relaxable_asm_section flag. Call
4756 find_removed_literal only if is_operand_relocation. Update call to
4757 offset_with_removed_text. Use new target_offset and removed_bytes
4758 variables.
4759 (move_literal): New.
4760 (relax_property_section): Use bfd_get_section_limit. Set new
4761 is_full_prop_section flag and handle new property tables. Update calls
4762 to r_reloc_init and offset_with_removed_text. Check
4763 is_relaxable_asm_section flag. Handle expansion of zero-sized
4764 unreachable entries, with use of offset_with_removed_text_before_fill.
4765 For relocatable links, combine entries only for literal tables.
4766 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
4767 calls to offset_with_removed_text. Translate st_size field for
4768 function symbols.
4769 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
4770 failure. Add contents parameter. Update call to get_bfd_fix. Update
4771 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
4772 R_XTENSA_ASM_EXPAND relocs.
4773 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
4774 call to get_bfd_fix. Include offset from contents for partial_inplace
4775 relocations.
4776 (is_reloc_sym_weak): New.
4777 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
4778 (prop_sec_len): New.
4779 (xtensa_is_property_section): Handle new property sections.
4780 (is_literal_section): Delete.
4781 (internal_reloc_compare): When r_offset matches, compare r_info and
4782 r_addend to make sorting predictable.
4783 (internal_reloc_matches): New.
4784 (xtensa_get_property_section_name): Handle new property sections.
4785 (xtensa_get_property_predef_flags): New.
4786 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
4787 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
4788 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
4789 (xtisa_errno, xtisa_error_msg): New variables.
4790 (xtensa_isa_errno, xtensa_isa_error_msg): New.
4791 (xtensa_insnbuf_alloc): Add error handling.
4792 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
4793 use xtensa_format_decode. Add error handling.
4794 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
4795 instruction length to find the number of bytes to copy.
4796 (xtensa_isa_init): Add error handling. Replace calls to
4797 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
4798 tables in the xtensa_modules structure.
4799 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
4800 xtensa_extend_isa): Delete.
4801 (xtensa_isa_free): Change to only free lookup tables.
4802 (opname_lookup_compare): Replace with ...
4803 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
4804 (xtensa_insn_maxlength): Rename to ...
4805 (xtensa_isa_maxlength): ... this.
4806 (xtensa_insn_length): Delete.
4807 (xtensa_insn_length_from_first_byte): Replace with ...
4808 (xtensa_isa_length_from_chars): ... this function.
4809 (xtensa_num_opcodes): Rename to ...
4810 (xtensa_isa_num_opcodes): ... this.
4811 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
4812 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
4813 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
4814 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
4815 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
4816 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
4817 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
4818 (xtensa_opcode_lookup): Add error handling.
4819 (xtensa_decode_insn): Replace with ...
4820 (xtensa_opcode_decode): ... this function, with new format and
4821 slot parameters. Add error handling.
4822 (xtensa_encode_insn): Replace with ...
4823 (xtensa_opcode_encode): ... this function, which does the encoding via
4824 one of the entries in the "encode_fns" array. Add error handling.
4825 (xtensa_opcode_name): Add error handling.
4826 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
4827 xtensa_opcode_is_call): New.
4828 (xtensa_num_operands): Replace with ...
4829 (xtensa_opcode_num_operands): ... this function. Add error handling.
4830 (xtensa_opcode_num_stateOperands,
4831 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
4832 xtensa_opcode_funcUnit_use, xtensa_operand_name,
4833 xtensa_operand_is_visible): New.
4834 (xtensa_get_operand, xtensa_operand_kind): Delete.
4835 (xtensa_operand_inout): Add error handling and special-case for
4836 "sout" operands.
4837 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
4838 operate on one slot of an instruction. Added error handling.
4839 (xtensa_operand_encode): Handle default operands with no encoding
4840 functions. Check for success by comparing against decoded value.
4841 Add error handling.
4842 (xtensa_operand_decode): Handle default operands. Return decoded value
4843 through argument pointer. Add error handling.
4844 (xtensa_operand_is_register, xtensa_operand_regfile,
4845 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
4846 (xtensa_operand_isPCRelative): Rename to ...
4847 (xtensa_operand_is_PCrelative): ... this. Add error handling.
4848 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
4849 through argument pointer. Add error handling.
4850 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
4851 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
4852 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
4853 xtensa_regfile_shortname, xtensa_regfile_view_parent,
4854 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
4855 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
4856 xtensa_state_is_exported, xtensa_sysreg_lookup,
4857 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
4858 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
4859 xtensa_interface_num_bits, xtensa_interface_inout,
4860 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
4861 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
4862 * xtensa-modules.c: Rewrite to use new data structures.
4863 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
4864 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
4865 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
4866 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
4867 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
4868 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
4869 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
4870 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
4871 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
4872 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
4873 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
4874 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
4875 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
4876 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
4877 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
4878 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
4879 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
4880 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
4881 * Makefile.in: Regenerate.
4882 * bfd-in2.h: Likewise.
4883 * libbfd.h: Likewise.
4884
48852004-10-07 Richard Sandiford <rsandifo@redhat.com>
4886
4887 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
4888 against the absolute section.
4889 (mips_elf64_write_rela): Likewise.
4890
48912004-10-07 Jan Beulich <jbeulich@novell.com>
4892
4893 * elf.c (elf_find_function): Don't generally check for matching
4894 section, just for non-file symbols. Remove redunant comparison
4895 for the latter.
4896 * elf32-arm.h (arm_elf_find_function): Likewise.
4897
48982004-10-07 Jeff Baker <jbaker@qnx.com>
4899
4900 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
4901 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
4902 was specified.
4903
49042004-10-04 Roland McGrath <roland@redhat.com>
4905
4906 * hash.c (bfd_hash_set_default_size): Use const for table.
4907 Use size_t instead of int for variable compared to sizeof results.
4908
49092004-10-05 Alan Modra <amodra@bigpond.net.au>
4910
4911 PR 425
4912 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
4913
49142004-10-01 Paul Brook <paul@codesourcery.com>
4915
4916 * elf32-arm.h (elf32_arm_fake_sections,
4917 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
4918 functions.
4919 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
4920
49212004-10-01 Alan Modra <amodra@bigpond.net.au>
4922
4923 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
4924 need_lsda_relative.
4925 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
4926 need_relative or need_lsda_relative if we are processing an
4927 offset for a reloc on a FDE initial loc or LSDA field
4928 respectively.
4929 (_bfd_elf_write_section_eh_frame): Test need_relative and
4930 need_lsda_relative in place of corresponding make_* field
4931 when deciding to use pc-relative encodings.
4932
49332004-09-30 Paul Brook <paul@codesourcery.com>
4934
4935 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
4936 target2 relocation type.
4937
49382004-09-30 H.J. Lu <hongjiu.lu@intel.com>
4939
4940 PR 414
4941 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
4942
49432004-09-30 Paul Brook <paul@codesourcery.com>
4944
4945 * reloc.c: Add BFD_RELOC_ARM_SMI.
4946 * bfd-in2.h: Regenerate.
4947 * libbfd.h: Ditto.
4948
49492004-09-24 Alan Modra <amodra@bigpond.net.au>
4950
4951 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
4952 vma and output offset to address.
4953 * simple.c (simple_save_output_info): Only set output section
4954 and offset for debug sections, or those not already set up by
4955 the linker.
4956 (bfd_simple_get_relocated_section_contents): Update comment.
4957
49582004-09-24 Alan Modra <amodra@bigpond.net.au>
4959
4960 * elf.c (IS_LOADED): Delete.
4961 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
4962 Restore SEC_HAS_CONTENTS test to the one place it was used prior
4963 to 2004-09-22.
4964
49652004-09-23 Alan Modra <amodra@bigpond.net.au>
4966
4967 PR gas/396
4968 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
4969 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
4970 redundant assignment of EM_SPARC.
4971
49722004-09-22 Brian Ford <ford@vss.fsi.com>
4973
4974 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
4975 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
4976 constants.
4977 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4978
49792004-09-22 Alan Modra <amodra@bigpond.net.au>
4980
4981 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
4982 (elf_backend_modify_segment_map): Don't define.
4983
49842004-09-22 Alan Modra <amodra@bigpond.net.au>
4985
4986 * elf.c (IS_LOADED): Define.
4987 (assign_file_positions_for_segments): Don't round up file offset of
4988 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
4989 Delete code handling link script adjustment of lma. Do the adjust
4990 in later code handling similar ajustments. Remove dead code error
4991 check. Warn if section lma would require a negative offset
4992 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
4993 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
4994 update voff in section loop. Change voff in segment loop to be an
4995 adjustment on top of "off". Set sec->filepos and update "off" later.
4996 Test for loadable sections consistently using IS_LOADED. Similarly,
4997 test for alloc-only sections other than .tbss consistently.
4998 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
4999 Tidy PT_NOTE handling. Use %B and %A in error messages.
5000 (assign_file_positions_except_relocs): Use %B in error message.
5001
50022004-09-17 H.J. Lu <hongjiu.lu@intel.com>
5003
5004 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
5005 (CONFIG_STATUS_DEPENDENCIES): New.
5006 (Makefile): Removed.
5007 (config.status): Likewise.
5008 * Makefile.in: Regenerated.
5009
50102004-09-17 Paul Brook <paul@codesourcery.com>
5011
5012 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
5013 (bfd_elf32_arm_process_before_allocation): Update prototype.
5014 * bfd-in2.h: Regenerate.
5015 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
5016 (elf32_arm_link_hash_table_create): Set it.
5017 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
5018 (bfd_elf32_arm_set_target_relocs): New function.
5019 (arm_real_reloc_type): New function.
5020 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
5021 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
5022 (elf32_arm_gc_sweep_hook): Ditto.
5023 (elf32_arm_check_relocs): Ditto.
5024 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
5025 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
5026 R_ARM_GOT_TARGET2.
5027 (elf32_arm_got_prel): New variable.
5028 (elf32_arm_howto_from_type): New function.
5029 (elf32_arm_info_to_howto): Use it.
5030 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
5031 BFD_RELOC_ARM_TARGET2.
5032 * libbfd.h: Regenerate.
5033 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
5034
50352004-09-17 Alan Modra <amodra@bigpond.net.au>
5036
5037 * ecoff.c: Update u.undef.next refs.
5038 * elf64-ppc.c: Likewise.
5039 * elflink.c: Likewise.
5040 * linker.c: Likewise.
5041 * xcofflink.c: Likewise.
5042
5043 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
5044 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
5045 fields to indirect struct.
5046 * elf-m10300.c: Update u.weakdef refs.
5047 * elf32-arm.h: Likewise.
5048 * elf32-cris.c: Likewise.
5049 * elf32-frv.c: Likewise.
5050 * elf32-hppa.c: Likewise.
5051 * elf32-i370.c: Likewise.
5052 * elf32-i386.c: Likewise.
5053 * elf32-m32r.c: Likewise.
5054 * elf32-m68k.c: Likewise.
5055 * elf32-ppc.c: Likewise.
5056 * elf32-s390.c: Likewise.
5057 * elf32-sh.c: Likewise.
5058 * elf32-sparc.c: Likewise.
5059 * elf32-vax.c: Likewise.
5060 * elf32-xtensa.c: Likewise.
5061 * elf64-alpha.c: Likewise.
5062 * elf64-hppa.c: Likewise.
5063 * elf64-ppc.c: Likewise.
5064 * elf64-s390.c: Likewise.
5065 * elf64-sh64.c: Likewise.
5066 * elf64-sparc.c: Likewise.
5067 * elf64-x86-64.c: Likewise.
5068 * elfxx-ia64.c: Likewise.
5069 * elfxx-mips.c: Likewise.
5070 * elflink.c: Likewise. Also u.elf_hash_value.
5071 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
5072 indirection.
5073 (elf_gc_smash_unused_vtentry_relocs): Likewise.
5074 (bfd_elf_gc_record_vtinherit): Alloc vtable.
5075 (bfd_elf_gc_record_vtentry): Likewise.
5076 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
5077
50782004-09-17 Alan Modra <amodra@bigpond.net.au>
5079
5080 * Makefile.am: Run "make dep-am".
5081 * Makefile.in: Regenerate.
5082 * bfd-in2.h: Regenerate.
5083 * po/SRC-POTFILES.in: Regenerate.
5084 * po/bfd.pot: Regenerate.
5085
50862004-09-16 Alan Modra <amodra@bigpond.net.au>
5087
5088 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
5089 with bitfields. Make "type" and "other" bitfields too.
5090 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
5091 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
5092 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
5093 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
5094 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
5095 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
5096 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
5097 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
5098 * elf-hppa.h: Update all uses of elf_link_hash_flags.
5099 * elf-m10300.c: Likewise.
5100 * elf.c: Likewise.
5101 * elf32-arm.h: Likewise.
5102 * elf32-cris.c: Likewise.
5103 * elf32-frv.c: Likewise.
5104 * elf32-hppa.c: Likewise.
5105 * elf32-i370.c: Likewise.
5106 * elf32-i386.c: Likewise.
5107 * elf32-m32r.c: Likewise.
5108 * elf32-m68k.c: Likewise.
5109 * elf32-ppc.c: Likewise.
5110 * elf32-s390.c: Likewise.
5111 * elf32-sh-symbian.c: Likewise.
5112 * elf32-sh.c: Likewise.
5113 * elf32-sh64.c: Likewise.
5114 * elf32-sparc.c: Likewise.
5115 * elf32-vax.c: Likewise.
5116 * elf32-xtensa.c: Likewise.
5117 * elf64-alpha.c: Likewise.
5118 * elf64-hppa.c: Likewise.
5119 * elf64-ppc.c: Likewise.
5120 * elf64-s390.c: Likewise.
5121 * elf64-sh64.c: Likewise.
5122 * elf64-sparc.c: Likewise.
5123 * elf64-x86-64.c: Likewise.
5124 * elflink.c: Likewise.
5125 * elfxx-ia64.c: Likewise.
5126 * elfxx-mips.c: Likewise.
5127 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
5128 * configure: Regenerate.
5129 * aclocal.m4: Regenerate.
5130
51312004-09-16 Alan Modra <amodra@bigpond.net.au>
5132
5133 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
5134 around uses of R_ARM_TARGET1.
5135 (elf32_arm_check_relocs): Likewise.
5136
51372004-09-13 Paul Brook <paul@codesourcery.com>
5138
5139 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
5140 prototype.
5141 * bfd-in2.h: Regenerate.
5142 * libbfd.h: Regenerate.
5143 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
5144 (elf32_arm_link_hash_table_create): Set target1_is_rel.
5145 (bfd_elf32_arm_process_before_allocation): Ditto.
5146 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
5147 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
5148 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
5149 * reloc.c: Ditto.
5150
51512004-09-10 Joel Brobecker <brobecker@gnat.com>
5152
5153 * hpux-core.c (thread_section_p): New function.
5154 (hpux_core_core_file_p): Fix computation of offset in call
5155 to bfd_seek. Create a ".reg" section from an arbitrary
5156 ".reg/<id>" section if none was created after having read
5157 all sections.
5158
51592004-09-11 Andreas Schwab <schwab@suse.de>
5160
5161 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
5162 * aclocal.m4: Rebuild.
5163 * configure: Rebuild.
5164
51652004-09-10 Joel Brobecker <brobecker@gnat.com>
5166
5167 * section.c (bfd_sections_find_if): Fix parameter name in
5168 comment to match code.
5169
51702004-09-10 Alan Modra <amodra@bigpond.net.au>
5171
5172 * elf.c (assign_file_positions_except_relocs): Assign relocs
5173 stored in a bfd section.
5174
51752004-09-08 Hans-Peter Nilsson <hp@axis.com>
5176
5177 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
5178 h->gotplt_refcount to 0, not -1.
5179
51802004-09-07 Hans-Peter Nilsson <hp@axis.com>
5181
5182 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
5183 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
5184 symname.
5185 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
5186 handle symbol visibility here.
5187
51882004-09-07 Alan Modra <amodra@bigpond.net.au>
5189
5190 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
5191 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
5192 callers.
5193 (ppc_stub_name): Remove trailing "+0" on stub name.
5194 (create_linkage_sections): Create relocations for
5195 branch lookup table when --emit-relocs as well as when --shared.
5196 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
5197 relbrlt test. For --emit-stub-syms, always output a sym even when
5198 one already exists on a plt call stub. Put stub type in the stub
5199 symbol name.
5200 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
5201 test.
5202 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
5203 reloc_count in stub sections. Adjust relbrlt test.
5204 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
5205 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
5206 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
5207 for relocs against discarded symbols. Fix comments.
5208
52092004-09-06 Mark Mitchell <mark@codesourcery.com>
5210
5211 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
5212 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
5213 from ...
5214 (map_sections_to_segments): ... here. Use it. Assign a file
5215 position to the .dynamic section if it is not loadable, but part
5216 of the PT_DYNAMIC segment.
5217 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
5218 offsets, not VMAs, for the BPABI. Do not fill in the header in
5219 the .got.plt section for the BPABI.
5220 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
5221 PT_DYNAMIC segment.
5222 (elf_backend_want_got_plt): Define to zero for Symbian OS.
5223
52242004-09-06 Nick Clifton <nickc@redhat.com>
5225
5226 * elflink.c (elf_link_add_object_symbols): Set the error code to
5227 bfd_error_wrong_format when the input format does not match the
5228 output format.
5229
52302004-09-06 Alan Modra <amodra@bigpond.net.au>
5231
5232 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
5233 (ppc64_elf_check_directives): ..here.
5234 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
5235 before accessing ppc64_elf_tdata.
5236 (ppc64_elf_finish_dynamic_sections): And here too.
5237
52382004-09-04 Alan Modra <amodra@bigpond.net.au>
5239
5240 * bfd.c (_bfd_default_error_handler): Correct loop exit.
5241
52422004-09-03 Mark Mitchell <mark@codesourcery.com>
5243
5244 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
5245 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
5246 (bfd_elf32_littlearm_symbian_vec): Likewise.
5247 * configure: Regenerated.
5248 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
5249 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
5250 (PLT_ENTRY_SIZE): Likewise.
5251 (bfd_vma_elf32_arm_symbian_plt_entry): New
5252 variable.
5253 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
5254 and symbian_p.
5255 (create_got_section): Don't create sections when generating BPABI
5256 objects.
5257 (elf32_arm_create_dynamic_sections): Tidy.
5258 (elf32_arm_link_hash_table_create): Set plt_header_size,
5259 plt_entry_size, and symbian_p.
5260 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
5261 generating BPABI objects.
5262 (allocate_dynrelocs): Use htab->plt_header_size, not
5263 PLT_HEADER_SIZE. Do not add to .got.plt when
5264 generating BPABI objects.
5265 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
5266 * elfarm-nabi.c: Add SymbianOS target vectors.
5267 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
5268 (_bfd_elf_link_create_dynamic_sections): Likewise.
5269 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
5270 (elfNN_bed): Use it.
5271 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
5272 (bfd_elf32_littlearm_symbian_vec): Likewise.
5273 (_bfd_target_vector): Add them.
5274
52752004-09-03 Nick Clifton <nickc@redhat.com>
5276
5277 PR 360
5278 * coffcode.h (handle_COMDAT): Replace abort with an warning
5279 message and allow the scan to continue.
5280
52812004-09-02 Alan Modra <amodra@bigpond.net.au>
5282
5283 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
5284 in when reading relocs, not our sorted syms. Remove unnecessary
5285 var.
5286
52872004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
5288
5289 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
5290
52912004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
5292
5293 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
5294 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
5295 replace uses of *_alias with *_noncanonical.
5296 * aclocal.m4: Rebuild with aclocal 1.4p6.
5297 * Makefile.in: Rebuild with automake 1.4p6.
5298 * doc/Makefile.in: Rebuild with automake 1.4p6.
5299 * configure.in: Autoupdate with autoupdate 2.59.
5300 * config.in: Regenerate with autoheader 2.59.
5301 * configure: Regnerate with autoconf 2.59.
5302
53032004-08-28 Alan Modra <amodra@bigpond.net.au>
5304
5305 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
5306 symbol pointer arrays before modifying.
5307
53082004-08-28 Alan Modra <amodra@bigpond.net.au>
5309
5310 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
5311 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
5312 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
5313 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
5314 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
5315 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
5316 Use both symbol tables on non-relocatable objects. Use a common
5317 error exit. Fix "mid" warning.
5318 * libbfd.h: Regenerate.
5319 * bfd-in2.h: Regenerate.
5320
53212004-08-28 Alan Modra <amodra@bigpond.net.au>
5322
5323 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
5324 object file.
5325 (struct sfpr_def_parms): Save some space.
5326 (sfpr_define): Here too.
5327
5328 * elf64-ppc.c (compare_symbols): Put section syms first.
5329 (sym_exists_at): New function.
5330 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
5331 points only for relocatable files. Use .opd section contents
5332 otherwise. Generally clean up the code.
5333
53342004-08-27 Alan Modra <amodra@bigpond.net.au>
5335
5336 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
5337 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
5338 (struct sfpr_def_parms): New.
5339 (sfpr_define): New function.
5340 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
5341 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
5342 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
5343 (savefpr1_tail, restfpr1_tail): New functions.
5344 (savevr, savevr_tail, restvr, restvr_tail): New functions.
5345 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
5346 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
5347 code. Define all ABI mandated _save and _rest functions.
5348
53492004-08-26 Paul Brook <paul@codesourcery.com>
5350
5351 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
5352
53532004-08-26 Alan Modra <amodra@bigpond.net.au>
5354
5355 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
5356 TRUE or FALSE.
5357
53582004-08-26 Alan Modra <amodra@bigpond.net.au>
5359
5360 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
5361 that pcrel correction is applied for R_386_PC32.
5362
53632004-08-25 Alan Modra <amodra@bigpond.net.au>
5364
5365 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
5366 for R_386_32 and R_386_PC32 relocs against symbols defined in
5367 discarded sections.
5368
53692004-08-25 Dmitry Diky <diwil@spec.ru>
5370
5371 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
5372 Add new relocations.
5373 * bfd-in2.h: Regenerate.
5374 * libbfd.h: Regenerate.
5375 * elf32-msp430.c: Clean-up code.
5376 (elf_msp430_howto_table): Add new relocation entries.
5377 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
5378 (msp430_elf_relax_section): New function.
5379 (msp430_elf_relax_delete_bytes): New function.
5380 (msp430_elf_symbol_address_p): New function.
5381
53822004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
5383
5384 * elf32-m32r.c (m32r_elf_relocate_section): Handle
5385 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
5386
53872004-08-20 Daniel Jacobowitz <dan@debian.org>
5388
5389 * elflink.c (_bfd_elf_section_already_linked): Handle
5390 SEC_LINK_DUPLICATES_SAME_CONTENTS.
5391
53922004-08-19 Mark Mitchell <mark@codesourcery.com>
5393
5394 * config.bfd (arm*-*-symbianelf*): New target.
5395 (arm*-*-eabi*): Likewise.
5396
53972004-08-19 Alan Modra <amodra@bigpond.net.au>
5398
5399 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
5400 "struct ppc_link_hash_entry *".
5401 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
5402 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
5403
54042004-08-19 Jakub Jelinek <jakub@redhat.com>
5405
5406 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
5407 entries (where fd_aux overlaps next entry's fd_func).
5408 Add non_overlapping argument, use it.
5409 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
5410 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5411 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
5412 as indexes into opd_sym_map/opd_adjust array.
5413 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
5414
54152004-08-18 Alan Modra <amodra@bigpond.net.au>
5416
5417 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
5418 if we can look up their function descriptor in a regular file.
5419
54202004-08-18 Nick Clifton <nickc@redhat.com>
5421
5422 PR 324
5423 * cofflink.c (coff_link_add_symbols): Check that the comdat
5424 pointer in the coff_section_data structure has been initialised
5425 before using it.
5426
54272004-08-18 Alan Modra <amodra@bigpond.net.au>
5428
5429 PR 338
5430 * elflink.c (bfd_elf_record_link_assignment): Add comment about
5431 changing bfd_link_hash_undefined to bfd_link_hash_new.
5432
54332004-08-17 Jakub Jelinek <jakub@redhat.com>
5434
5435 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
5436 if not yet defined.
5437 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
5438 (synthetic_opd, synthetic_relocatable): New variables.
5439 (compare_symbols, compare_relocs): New helper routines.
5440 (ppc64_elf_get_synthetic_symtab): New function.
5441 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
5442 to relsyms.
5443 * bfd-in2.h: Regenerated.
5444 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
5445 to relsyms. Return 0 if abfd is relocatable.
5446
54472004-08-17 Alan Modra <amodra@bigpond.net.au>
5448
5449 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
5450
54512004-08-17 Nick Clifton <nickc@redhat.com>
5452
5453 * (is_arm_mapping_symbol_name): New function - return true
5454 when a symbol name matches the requirements for an ARM mapping
5455 symbol name.
5456 (arm_elf_find_function): New function based on
5457 elf_find_function in elf.c but skipping ARM mapping symbols
5458 and including thumb function symbols.
5459 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
5460 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
5461
54622004-08-17 Alan Modra <amodra@bigpond.net.au>
5463
5464 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
5465 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
5466 (ppc64_elf_brtaken_reloc): Here too.
5467
54682004-08-17 Alan Modra <amodra@bigpond.net.au>
5469
5470 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
5471 symbol visibility.
5472 (ppc64_elf_check_directives): Check that we have the right hash
5473 table before proceeding.
5474
54752004-08-17 Alan Modra <amodra@bigpond.net.au>
5476
5477 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
5478 (adjust_opd_syms): Attach opd syms for deleted entries to one of
5479 the sections that will be discarded.
5480
54812004-08-16 Alan Modra <amodra@bigpond.net.au>
5482
5483 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
5484
54852004-08-16 Alan Modra <amodra@bigpond.net.au>
5486
5487 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
5488 free space available.
5489
54902004-08-16 Alan Modra <amodra@bigpond.net.au>
5491
5492 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
5493 occurrences with bfd_byte * thoughout file.
5494
5495 * coff-rs6000.c (do_shared_object_padding): Warning fix.
5496 (xcoff_write_armap_big): Likewise.
5497 (xcoff_write_archive_contents_old): Likewise.
5498 (xcoff_write_archive_contents_big): Likewise.
5499
5500 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
5501
55022004-08-13 Nick Clifton <nickc@redhat.com>
5503
5504 * elf32-arm.h: Convert to ISO C90.
5505
55062004-08-13 Alan Modra <amodra@bigpond.net.au>
5507
5508 PR 293
5509 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
5510 zero the plt field.
5511
55122004-08-13 Alan Modra <amodra@bigpond.net.au>
5513
5514 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
5515 (bfd_archive_filename, bfd_get_section_ident): Delete.
5516 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
5517 bfd_archive_filename.
5518 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
5519 to warn about symbols in discarded sections. Use _bfd_error_handler.
5520 * aout-adobe.c (aout_adobe_callback): See below.
5521 * aout-cris.c (swap_ext_reloc_in): ..
5522 * coff-arm.c (find_thumb_glue, find_arm_glue,
5523 coff_arm_relocate_section, bfd_arm_process_before_allocation,
5524 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
5525 coff_arm_copy_private_bfd_data): ..
5526 * coff-i860.c (i860_reloc_processing): ..
5527 * coff-mcore.c (mcore_coff_unsupported_reloc,
5528 coff_mcore_relocate_section): ..
5529 * coff-ppc.c (coff_ppc_relocate_section): ..
5530 * coff-rs6000.c (xcoff_create_csect_from_smclas
5531 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5532 sh_swap_insns, sh_relocate_section): ..
5533 * coff-tic54x.c (tic54x_reloc_processing): ..
5534 * coff-tic80.c (coff_tic80_relocate_section): ..
5535 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
5536 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
5537 coff_slurp_symbol_table, coff_classify_symbol,
5538 coff_slurp_reloc_table): ..
5539 * coffgen.c (_bfd_coff_read_string_table): ..
5540 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
5541 _bfd_coff_generic_relocate_section): ..
5542 * cpu-arm.c (bfd_arm_merge_machines): ..
5543 * cpu-sh.c (sh_merge_bfd_arch): ..
5544 * elf-hppa.h (elf_hppa_relocate_section): ..
5545 * elf.c (bfd_elf_string_from_elf_section, setup_group,
5546 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
5547 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
5548 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
5549 * elf32-arm.h (find_thumb_glue, find_arm_glue,
5550 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
5551 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
5552 elf32_arm_relocate_section, elf32_arm_set_private_flags,
5553 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
5554 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
5555 cris_elf_merge_private_bfd_data
5556 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
5557 * elf32-gen.c (elf32_generic_link_add_symbols): ..
5558 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
5559 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
5560 elf32_hppa_relocate_section): ..
5561 * elf32-i370.c (i370_elf_merge_private_bfd_data,
5562 i370_elf_check_relocs, i370_elf_relocate_section): ..
5563 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
5564 elf_i386_relocate_section): ..
5565 * elf32-m32r.c (m32r_elf_relocate_section,
5566 m32r_elf_merge_private_bfd_data): ..
5567 * elf32-m68hc1x.c (m68hc12_add_stub,
5568 _bfd_m68hc11_elf_merge_private_bfd_data): ..
5569 * elf32-m68k.c (elf_m68k_relocate_section): ..
5570 * elf32-mcore.c (mcore_elf_unsupported_reloc,
5571 mcore_elf_relocate_section): ..
5572 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
5573 ppc_elf_check_relocs, ppc_elf_relocate_section,
5574 ppc_elf_begin_write_processing): ..
5575 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5576 elf_s390_relocate_section): ..
5577 * elf32-sh-symbian.c (sh_symbian_import_as,
5578 sh_symbian_process_embedded_commands,
5579 sh_symbian_relocate_section): ..
5580 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
5581 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
5582 sh_elf_merge_private_data): ..
5583 * elf32-sparc.c (elf32_sparc_check_relocs,
5584 elf32_sparc_relocate_section,
5585 elf32_sparc_merge_private_bfd_data): ..
5586 * elf32-v850.c (v850_elf_check_relocs,
5587 v850_elf_merge_private_bfd_data): ..
5588 * elf32-xtensa.c (elf_xtensa_check_relocs,
5589 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
5590 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
5591 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
5592 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
5593 * elf64-gen.c (elf64_generic_link_add_symbols): ..
5594 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
5595 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
5596 ppc64_elf_relocate_section): ..
5597 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5598 elf_s390_relocate_section): ..
5599 * elf64-sh64.c (sh_elf64_relocate_section): ..
5600 * elf64-sparc.c (sparc64_elf_check_relocs,
5601 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
5602 sparc64_elf_merge_private_bfd_data): ..
5603 * elf64-x86-64.c (elf64_x86_64_check_relocs,
5604 elf64_x86_64_relocate_section): ..
5605 * elflink.c (_bfd_elf_add_default_symbol,
5606 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
5607 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
5608 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
5609 elf_get_linked_section_vma, elf_fixup_link_order,
5610 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
5611 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
5612 * elfxx-ia64.c (elfNN_ia64_relax_section,
5613 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
5614 * elfxx-mips.c (mips_elf_perform_relocation,
5615 _bfd_mips_elf_check_relocs,
5616 _bfd_mips_elf_merge_private_bfd_data): ..
5617 * ieee.c (ieee_slurp_external_symbols): ..
5618 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
5619 * libbfd.c (_bfd_generic_verify_endian_match): ..
5620 * linker.c (_bfd_generic_link_add_one_symbol,
5621 _bfd_generic_section_already_linked): ..
5622 * pdp11.c (translate_to_native_sym_flags): ..
5623 * pe-mips.c (coff_pe_mips_relocate_section): ..
5624 * peicode.h (pe_ILF_build_a_bfd): ..
5625 * srec.c (srec_bad_byte): ..
5626 * stabs.c (_bfd_link_section_stabs): ..
5627 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
5628 Replace all uses of bfd_archive_filename and bfd_get_section_ident
5629 with corresponding %B and %A in _bfd_error_handler format string.
5630 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
5631 calls to use %A and %B. Fix "against symbol .. from section" and
5632 similar error messages. Combine multiple _bfd_error_handler calls
5633 where they were separated due to bfd_archive_filename deficiencies.
5634 * bfd-in2.h: Regenerate.
5635
56362004-08-12 H.J. Lu <hongjiu.lu@intel.com>
5637
5638 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
5639 relocation.
5640
56412004-08-10 Alan Modra <amodra@bigpond.net.au>
5642
5643 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
5644 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
5645 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
5646 Add twiddled_syms.
5647 (link_hash_newfunc): Init was_undefined.
5648 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
5649 Use undefweak instead.
5650 (ppc64_elf_check_directives): Fix undefs chain.
5651 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
5652 references.
5653 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
5654 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
5655 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
5656
56572004-08-09 Jakub Jelinek <jakub@redhat.com>
5658
5659 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
5660 error, test input_section flags rather than sec.
5661
56622004-08-09 Alan Modra <amodra@bigpond.net.au>
5663
5664 * elf-bfd.h (struct elf_backend_data): Add
5665 elf_backend_archive_symbol_lookup.
5666 (_bfd_elf_archive_symbol_lookup): Declare.
5667 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
5668 (elf_link_add_archive_symbols): ..extracted from here. Call the
5669 backend version.
5670 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
5671 (elfNN_bed): Init new field.
5672 * elf64-ppc.c (elf_backend_check_directives): Define.
5673 (elf_backend_archive_symbol_lookup): Define.
5674 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
5675 a ppc_link_hash_entry pointer.
5676 (get_fdh): Move.
5677 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
5678 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
5679 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
5680 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
5681 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
5682 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5683 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
5684 descriptor symbols.
5685
56862004-08-09 Alan Modra <amodra@bigpond.net.au>
5687
5688 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
5689 (ppc64_elf_add_symbol_hook): Test for NULL section.
5690 (get_sym_h): Formatting.
5691 (ppc64_elf_size_stubs): Include reloc addend in value stored as
5692 stub target_value.
5693
5694 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
5695 long branch stubs with code handling plt and r2off branch stubs.
5696
56972004-08-09 Alan Modra <amodra@bigpond.net.au>
5698
5699 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
5700 * elflink.c (elf_link_input_bfd): Formatting.
5701 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
5702 all callers.
5703 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
5704 (link_hash_newfunc): Don't set it.
5705 (ppc64_elf_copy_indirect_symbol): Nor copy it.
5706 (ppc64_elf_mark_entry_syms): Delete.
5707 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
5708 sections. Use get_opd_info.
5709 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
5710
57112004-08-09 Alan Modra <amodra@bigpond.net.au>
5712
5713 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
5714
5715 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
5716 (func_desc_adjust): Don't set have_undefweak.
5717 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
5718 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
5719
5720 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
5721 "struct ppc_link_hash_entry *". Adjust all references.
5722 (ppc64_elf_hide_symbol): Correct a comment.
5723
5724 * elf64-ppc.c (get_opd_info): New function.
5725 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
5726 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
5727 before calling get_fdh. Test fdh rather than h before dereferencing
5728 fdh. Mark removed symbols in opd_adjust.
5729 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
5730 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
5731 opd symbols.
5732 (ppc64_elf_output_symbol_hook): Likewise.
5733
57342004-08-06 Paul Brook <paul@codesourcery.com>
5735
5736 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
5737 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
5738 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
5739 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
5740 and BFD_RELOC_ARM_SBREL32.
5741 * bfd-in2.h, bbfd.h: Regenerate.
5742
57432004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5744
5745 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
5746 the dynamic link symbol actually in use.
5747
57482004-08-01 Stephane Carrez <stcarrez@nerim.fr>
5749
5750 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
5751
57522004-07-31 Joel Brobecker <brobecker@gnat.com>
5753 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5754
5755 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
5756 SHN_MIPS_TEXT and SHN_MIPS_DATA.
5757
57582004-07-30 H.J. Lu <hongjiu.lu@intel.com>
5759 Nick Clifton <nickc@redhat.com>
5760
5761 PR 290
5762 * bfd.c (_bfd_default_error_handler): Make it global.
5763
5764 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
5765
5766 * elf.c (assign_section_numbers): Cope gracefully with sections
5767 which have SHF_LINK_ORDER set but no sh_link set up.
5768 * elflink.c (elf_get_linked_section_vma): Likewise.
5769
5770 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
5771 it to NULL.
5772
5773 * elfxx-target.h (elf_backend_link_order_error_handler): New.
5774 Set it to _bfd_default_error_handler.
5775 (elfNN_bed): Add elf_backend_link_order_error_handler.
5776
5777 * libbfd-in.h (_bfd_default_error_handler): New.
5778
5779 * libbfd.h: Regenerated.
5780
57812004-07-30 Jakub Jelinek <jakub@redhat.com>
5782
5783 * archures.c (bfd_mach_sparc_64bit_p): Define.
5784 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
5785 * bfd-in2.h: Rebuilt.
5786
57872004-07-29 Alexandre Oliva <aoliva@redhat.com>
5788
5789 Introduce SH2a support.
5790 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
5791 * archures.c (bfd_mach_sh2a_nofpu): New.
5792 * bfd-in2.h: Rebuilt.
5793 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
5794 (arch_info_struct): Add sh2a_nofpu.
5795 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
5796 2003-12-29 DJ Delorie <dj@redhat.com>
5797 * reloc.c: Add relocs for sh2a.
5798 * bfd-in2.h: Regenerate.
5799 * libbfd.hh: Regenerate.
5800 2003-12-01 Michael Snyder <msnyder@redhat.com>
5801 * archures.c (bfd_mach_sh2a): New.
5802 * bfd-in2.h: Rebuilt.
5803 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
5804 (SH2A_NEXT): New.
5805 (arch_info_struct): Add sh2a.
5806 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
5807
58082004-07-28 Nick Clifton <nickc@redhat.com>
5809 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5810
5811 PR 273
5812 * som.c (setup_sections): Improve estimation of space sizes in
5813 relocatable objects.
5814
58152004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
5816 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
5817 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
5818 to targ_selvecs.
5819 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
5820 * configure: Regenerate.
5821 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
5822 case that accepts OSABI=NetBSD and OSABI=SysV.
5823 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
5824 the base of .got or .data (if .got does not exist).
5825 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
5826 set OSABI=NetBSD.
5827 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
5828 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
5829 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
5830 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
5831
58322004-07-27 H.J. Lu <hongjiu.lu@intel.com>
5833
5834 PR 161/251
5835 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
5836 (elf_sec_group): Defined.
5837 (bfd_elf_match_symbols_in_sections): New prototype.
5838 (_bfd_elf_setup_group_pointers): Likewise.
5839
5840 * elf.c (bfd_elf_discard_group): Abort.
5841 (bfd_elf_set_group_contents): Also include relocation sections.
5842 Remove zero-fill for ld -r.
5843 (_bfd_elf_setup_group_pointers): New function.
5844 (elf_sort_elf_symbol): Likewise.
5845 (elf_sym_name_compare): Likewise.
5846 (bfd_elf_match_symbols_in_sections): Likewise.
5847
5848 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
5849
5850 * elflink.c (match_group_member): New.
5851 (elf_link_input_bfd): Check group member for discarded section.
5852 (try_match_symbols_in_sections): New function.
5853 (already_linked): Likewise.
5854 (_bfd_elf_section_already_linked): Support mixing comdat group
5855 and linkonce section.
5856
5857 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
5858 * linker.c (bfd_section_already_linked_table_traverse): New.
5859
5860 * libbfd.h: Regenerated.
5861
58622004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
5863
5864 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
5865 BFD_RELOC_CRX_SWITCH32.
5866 * bfd-in2.h: Regenerate.
5867 * libbfd.h: Regenerate.
5868 * elf32-crx.c: Support relocation/relaxation of
5869 BFD_RELOC_CRX_SWITCH* types.
5870
58712004-07-27 Alan Modra <amodra@bigpond.net.au>
5872
5873 * elf64-ppc.c: Correct "Linker stubs" comment.
5874
58752004-07-26 H.J. Lu <hongjiu.lu@intel.com>
5876
5877 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
5878 linked-to section.
5879 (elf_linked_to_section): New.
5880
5881 * elf.c (assign_section_numbers): Set up sh_link for
5882 SHF_LINK_ORDER.
5883
5884 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
5885 to sh_link for SHT_IA_64_UNWIND sections.
5886
58872004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5888
5889 * elflink.c (elf_fixup_link_order): Add _() to error message.
5890
58912004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5892
5893 * elflink.c (elf_fixup_link_order): Issue a warning and flag
5894 an error if failed.
5895
58962004-07-21 H.J. Lu <hongjiu.lu@intel.com>
5897
5898 * aout-adobe.c (aout_32_section_already_linked): Defined.
5899 * aout-target.h (MY_section_already_linked): Likewise.
5900 * aout-tic30.c (MY_section_already_linked): Likewise.
5901 * binary.c (binary_section_already_linked): Likewise.
5902 * bout.c (b_out_section_already_linked): Likewise.
5903 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
5904 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
5905 * coffcode.h (coff_section_already_linked): Likewise.
5906 * i386msdos.c (msdos_section_already_linked): Likewise.
5907 * i386os9k.c (os9k_section_already_linked): Likewise.
5908 * ieee.c (ieee_section_already_linked): Likewise.
5909 * ihex.c (ihex_section_already_linked): Likewise.
5910 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
5911 * mmo.c (mmo_section_already_linked): Likewise.
5912 * nlm-target.h (nlm_section_already_linked): Likewise.
5913 * oasys.c (oasys_section_already_linked): Likewise.
5914 * pef.c (bfd_pef_section_already_linked): Likewise.
5915 * ppcboot.c (ppcboot_section_already_linked): Likewise.
5916 * som.c (som_bfd_discard_group): Likewise.
5917 * srec.c (srec_section_already_linked): Likewise.
5918 * tekhex.c (tekhex_section_already_linked): Likewise.
5919 * versados.c (versados_section_already_linked): Likewise.
5920 * vms.c (vms_section_already_linked): Likewise.
5921 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
5922 * xsym.c (bfd_sym_section_already_linked): Likewise.
5923
5924 * bfd-in.h (bfd_section_already_linked_table_init): New.
5925 (bfd_section_already_linked_table_free): Likewise.
5926
5927 * coff-rs6000.c (rs6000coff_vec): Add
5928 _bfd_generic_section_already_linked.
5929 (pmac_xcoff_vec): Likewise.
5930 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5931 (aix5coff64_vec): Likewise.
5932
5933 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
5934 * elflink.c (_bfd_elf_section_already_linked): New function.
5935
5936 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
5937
5938 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
5939 (_bfd_generic_section_already_linked): New.
5940 (bfd_section_already_linked_hash_entry): Likewise.
5941 (bfd_section_already_linked): Likewise.
5942 (bfd_section_already_linked_table_lookup): Likewise.
5943 (bfd_section_already_linked_table_insert): Likewise.
5944
5945 * linker.c (bfd_section_already_linked): New.
5946 (_bfd_section_already_linked_table): Likewise.
5947 (bfd_section_already_linked_table_lookup): Likewise.
5948 (bfd_section_already_linked_table_insert): Likewise.
5949 (already_linked_newfunc): Likewise.
5950 (bfd_section_already_linked_table_init): Likewise.
5951 (bfd_section_already_linked_table_free): Likewise.
5952 (_bfd_generic_section_already_linked): Likewise.
5953
5954 * section.c (bfd_section): Remove comdat.
5955 (bfd_comdat_info): Moved to ...
5956 * bfd-in.h (coff_comdat_info): Here.
5957 (bfd_coff_get_comdat_section): New.
5958 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
5959 * libcoff-in.h (coff_section_tdata): Add comdat.
5960 * coffcode.h (handle_COMDAT): Updated.
5961 * cofflink.c (coff_link_add_symbols): Likewise.
5962 * ecoff.c (bfd_debug_section): Likewise.
5963
5964 * targets.c (bfd_target): Add _section_already_linked.
5965 (BFD_JUMP_TABLE_LINK): Updated.
5966
5967 * bfd-in2.h: Regenerated.
5968 * libbfd.h: Likewise.
5969 * libcoff.h: Likewise.
5970
59712003-07-21 Paul Brook <paul@codesourcery.com>
5972
5973 * elflink.c (elf_get_linked_section_vma, compare_link_order,
5974 elf_fixup_link_order): New functions.
5975 (bfd_elf_final_link): Call elf_fixup_link_order.
5976
59772004-07-21 Alexandre Oliva <aoliva@redhat.com>
5978
5979 * elf-bfd.h (ELF_COMMON_DEF_P): New.
5980 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
5981 common definitions.
5982 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
5983 _bfd_elf_symbol_refs_local_p.
5984 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
5985 symbols.
5986
59872004-07-19 H.J. Lu <hongjiu.lu@intel.com>
5988
5989 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
5990 DYN_NO_NEEDED.
5991 (bfd_elf_get_dyn_lib_class): New prototype.
5992 * elf.c (bfd_elf_get_dyn_lib_class): New function.
5993
5994 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
5995 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
5996 entry is needed. Issue an error if a DT_NEEDED entry is needed
5997 for a file marked DYN_NO_NEEDED.
5998 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
5999 for DT_NEEDED tags.
6000
6001 * bfd-in2.h: Regenerated.
6002
60032004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6004
6005 * elflink.c (elf_section_complain_discarded): Don't complain in
6006 .PARISC.unwind.
6007
60082004-07-10 James E Wilson <wilson@specifixinc.com>
6009
6010 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
6011 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
6012 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
6013 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
6014 Fix callers.
6015 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
6016 bfd_put_64 to bfd_putl64.
6017 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
6018
60192004-07-09 H.J. Lu <hongjiu.lu@intel.com>
6020
6021 PR 240
6022 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
6023 .init/.fini sections when trying to relax it.
6024
60252004-07-09 Jie Zhang <zhangjie@magima.com.cn>
6026
6027 * elf.c (assign_file_positions_for_segments): Make sure the
6028 .dynamic section is the first section in the PT_DYNAMIC segment.
6029
60302004-07-09 Nick Clifton <nickc@redhat.com>
6031
6032 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
6033 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
6034 sh_elf_get_flags_from_mach functions so that they do not conflict
6035 when this target is built with other sh-elf targets.
6036 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
6037 suppression of this function.
6038 (sh_elf_find_flags): Likewise.
6039
60402004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
6041
6042 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
6043 (ALL_MACHINES_CFILES): Add cpu-crx.c.
6044 (BFD32_BACKENDS): Add elf32-crx.lo.
6045 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
6046 (cpu-crx.lo): New target.
6047 (elf32-crx.lo): New target.
6048 * Makefile.in: Regenerate.
6049 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
6050 (bfd_archures_list): Add bfd_crx_arch.
6051 * bfd-in2.h: Regenerate.
6052 * config.bfd: Handle crx-*-elf*, crx*.
6053 * configure.in: Handle bfd_elf32_crx_vec.
6054 * configure: Regenerate.
6055 * cpu-crx.c: New file.
6056 * elf32-crx.c: Likewise.
6057 * libbfd.h: Regenerate.
6058 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
6059 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
6060 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
6061 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
6062 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
6063 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
6064 * targets.c (bfd_elf32_crx_vec): Declare.
6065 (bfd_target_vector): Add bfd_elf32_crx_vec.
6066
60672004-07-06 Nick Clifton <nickc@redhat.com>
6068
6069 * config.bfd: Add sh-symbian-elf target.
6070 * configure.in: Add bfd_elf32_shl_symbian_vec.
6071 * configure: Regenerate.
6072 * elf-bfd.h (struct elf_backend_data): Add new field
6073 'check_directives'.
6074 * elflink.c (elf_link_add_object_symbols): Invoke the
6075 check_directives function, if defined.
6076 * elfxx-target.h: Provide a default, NULL definition for
6077 check_directives.
6078 * targets.c: Add bfd_elf32_shl_symbian_vec.
6079 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
6080 definition.
6081 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
6082 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
6083 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
6084 not already been defined.
6085 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
6086 * sh-symbian.c: New file. Provide functions to support the
6087 * sh-symbian-elf target.
6088 * Makefile.am: Add elf32-sh-symbian.c
6089 * Makefile.in: Regenerate.
6090
60912004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
6092
6093 * elf32-sh.c: Include ../opcodes/sh-opc.h.
6094 * Makefile.am: Ran make dep-am.
6095 * Makefile.in: Ran make dep-in.
6096
60972004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
6098
6099 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
6100 externals properly.
6101
61022004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6103
6104 * config.bfd: Add want64 to configuration target s390-*-linux*.
6105
61062004-07-01 H.J. Lu <hongjiu.lu@intel.com>
6107
6108 * bfd.c (bfd_get_section_ident): New.
6109
6110 * elflink.c (elf_link_read_relocs_from_section): Call
6111 bfd_get_section_ident to identify the section when reporting
6112 error.
6113 (_bfd_elf_link_output_relocs): Likewise.
6114 (elf_link_output_extsym): Likewise.
6115 (elf_link_input_bfd): Likewise.
6116 (bfd_elf_gc_record_vtinherit): Likewise.
6117
6118 * bfd-in2.h: Regenerated.
6119
61202004-07-01 Jie Zhang <zhangjie@magima.com.cn>
6121 Nick Clifton <nickc@redhat.com>
6122
6123 PR 204
6124 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
6125 of section symbols to mips_elf_sort_hash_table ().
6126
61272004-07-01 Alan Modra <amodra@bigpond.net.au>
6128
6129 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
6130 change. Comment.
6131 (elf_section_complain_discarded): New function. Handle
6132 .gcc_except_table too.
6133 (elf_link_input_bfd): Rewrite handling of relocs against symbols
6134 in discarded sections.
6135 * elf-bfd.h (elf_discarded_section): Protect macro arg.
6136
61372004-06-30 James E Wilson <wilson@specifixinc.com>
6138
6139 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
6140 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
6141
61422004-06-30 H.J. Lu <hongjiu.lu@intel.com>
6143
6144 PR 233
6145 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
6146 local references to discarded sections and report their
6147 locations.
6148
61492004-06-30 Alan Modra <amodra@bigpond.net.au>
6150
6151 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
6152 sec_info_type, test section name instead.
6153
61542004-06-29 H.J. Lu <hongjiu.lu@intel.com>
6155
6156 PR 240
6157 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
6158 in .init/.fini sections.
6159
61602004-06-29 Bob Wilson <bob.wilson@acm.org>
6161
6162 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
6163 bfd_get_section_limit.
6164
61652004-06-29 Bob Wilson <bob.wilson@acm.org>
6166
6167 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
6168 output section size.
6169
61702004-06-29 Alan Modra <amodra@bigpond.net.au>
6171
6172 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
6173 rawsize.
6174 (mmix_elf_perform_relocation): Adjust for above change.
6175 (mmix_elf_relocate_section): Likewise.
6176 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
6177 (mmix_elf_get_section_contents): Delete.
6178 (bfd_elf64_get_section_contents): Delete.
6179 (mmix_elf_relocate_section): Zero stub area.
6180 * linker.c (default_indirect_link_order): Alloc max of section size
6181 and rawsize.
6182 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
6183 * section.c (bfd_malloc_and_get_section): Likewise.
6184 (struct bfd_section): Update rawsize comment.
6185 * bfd-in2.h: Regenerate.
6186
6187 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
6188
61892004-06-29 Alan Modra <amodra@bigpond.net.au>
6190
6191 * bfd-in.h (bfd_get_section_limit): Define.
6192 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
6193 (_bfd_final_link_relocate): Use bfd_get_section_limit.
6194 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
6195 * coff-arm.c (coff_arm_relocate_section): Likewise.
6196 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
6197 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
6198 (bfd_ns32k_final_link_relocate): Likewise.
6199 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
6200 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
6201 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
6202 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
6203 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
6204 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
6205 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
6206 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6207 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
6208 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
6209 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
6210 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
6211 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
6212 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
6213 * elf32-v850.c (v850_elf_reloc): Likewise.
6214 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
6215 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
6216 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
6217 * elf64-mips.c (mips_elf64_gprel32_reloc)
6218 (mips16_gprel_reloc): Likewise.
6219 * elf64-mmix.c (mmix_elf_reloc): Likewise.
6220 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
6221 * elf64-sparc.c (init_insn_reloc): Likewise.
6222 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
6223 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
6224 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
6225 (_bfd_mips_elf_generic_reloc): Likewise.
6226 * bfd-in2.h: Regenerate.
6227
62282004-06-28 Alan Modra <amodra@bigpond.net.au>
6229
6230 * bfd-in.h (struct stab_info): Move from stabs.c.
6231 * stabs.c (struct stab_link_includes_table): Delete.
6232 (stab_link_includes_lookup): Delete.
6233 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
6234 level of indirection from sinfo parm.
6235 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
6236 stabstr section. Adjust hash table accesses.
6237 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
6238 alloc. Adjust stab_info test.
6239 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
6240 (_bfd_coff_final_link): Adjust stab_info test.
6241 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
6242 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
6243 in place.
6244 * libcoff-in.h (struct coff_link_hash_table): Likewise.
6245 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
6246 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
6247 stabstr section. Adjust stab_info test.
6248 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
6249 (_bfd_write_stab_strings): Adjust prototypes.
6250 * libbfd.h: Regenerate.
6251 * libcoff.h: Regenerate.
6252 * bfd-in2.h: Regenerate.
6253
62542004-06-27 Mark Kettenis <kettenis@gnu.org>
6255
6256 From Miod Vallat <miod@online.fr>:
6257 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
6258
62592004-06-26 Alexandre Oliva <aoliva@redhat.com>
6260
6261 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
6262 (struct elf32_mn10300_link_hash_entry): Remove
6263 pcrel_relocs_copied.
6264 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
6265 R_MN10300_32. Don't adjust pcrel_relocs_copied.
6266 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
6267 and gotoff relocations if the symbol doesn't bind locally. Use
6268 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
6269 relocation for PCREL32.
6270 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
6271 to test whether a symbol binds locally.
6272 (elf32_mn10300_link_hash_newfunc): Don't initialize
6273 pcrel_relocs_copied.
6274 (_bfd_mn10300_elf_discard_copies): Delete.
6275 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
6276
62772004-06-26 Mark Kettenis <kettenis@gnu.org>
6278
6279 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
6280
62812004-06-25 Joel Brobecker <brobecker@gnat.com>
6282
6283 * som.c (som_set_reloc_info): Correct small typo.
6284
62852004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
6286
6287 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
6288 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
6289 (m32r_elf_gcsweep_hook): Likewise.
6290 (m32r_elf_check_relocs): Likewise.
6291 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
6292 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
6293 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
6294 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
6295 * bfd-in2.h: Regenerated.
6296 * libbfd.h: Regenerated.
6297
62982004-06-24 H.J. Lu <hongjiu.lu@intel.com>
6299
6300 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
6301 relocation symbol.
6302 (elf64_x86_64_relocate_section): Issue an error for
6303 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
6304 against global symbols when building shared library.
6305
63062004-06-24 Alan Modra <amodra@bigpond.net.au>
6307
6308 * section.c (struct sec): Rename "_cooked_size" to "size".
6309 Rename "_raw_size" to "rawsize".
6310 (STD_SECTION): Adjust comments.
6311 (bfd_set_section_size, bfd_get_section_contents): Use size.
6312 (bfd_malloc_and_get_section): New function.
6313 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
6314 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
6315 Correctly free reloc and contents memory.
6316 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
6317 and fake CIE now that we can shink section size to zero.
6318 (_bfd_elf_write_section_eh_frame): Likewise..
6319 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
6320 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
6321 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
6322 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
6323 unneeded indirection.
6324 * elf.c (_bfd_elf_section_offset): .. and update call.
6325 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
6326 * libbfd.h: Regenerate.
6327 * bfd-in2.h: Regenerate.
6328
6329 Replace occurrences of "_raw_size" and "_cooked_size" in most places
6330 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
6331 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
6332 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
6333 Similarly use "rawsize", if non-zero, in reloc functions to validate
6334 reloc addresses. Use new bfd_malloc_and_get_section in most places
6335 where bfd_get_section_contents was called. Expand all occurrences of
6336 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
6337 grok_prstatus and similar functions to "size".
6338 * aix386-core.c (aix386_core_file_p): ..
6339 * aix5ppc-core.c (xcoff64_core_p): ..
6340 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
6341 aout_adobe_set_section_contents): ..
6342 * aout-target.h (callback): ..
6343 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
6344 MY_bfd_final_link): ..
6345 * aoutf1.h (sunos4_core_file_p): ..
6346 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6347 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
6348 final_link, aout_link_input_section): ..
6349 * binary.c (binary_object_p, binary_canonicalize_symtab,
6350 binary_set_section_contents): ..
6351 * bout.c (b_out_callback, b_out_write_object_contents,
6352 b_out_set_section_contents, b_out_bfd_relax_section,
6353 b_out_bfd_get_relocated_section_contents): ..
6354 * cisco-core.c (cisco_core_file_validate): ..
6355 * coff-alpha.c (alpha_ecoff_object_p,
6356 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
6357 * coff-arm.c (coff_arm_relocate_section,
6358 bfd_arm_allocate_interworking_sections): ..
6359 * coff-h8300.c (h8300_reloc16_extra_cases,
6360 h8300_bfd_link_add_symbols): ..
6361 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
6362 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
6363 ppc_bfd_coff_final_link): ..
6364 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
6365 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6366 sh_align_loads, sh_coff_get_relocated_section_contents): ..
6367 * coff64-rs6000.c (xcoff64_write_object_contents,
6368 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
6369 * coffcode.h (coff_compute_section_file_positions,
6370 coff_write_object_contents): ..
6371 * coffgen.c (make_a_section_from_file, coff_write_symbols,
6372 coff_section_symbol, build_debug_section): ..
6373 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
6374 process_embedded_commands, _bfd_coff_link_input_bfd,
6375 _bfd_coff_write_global_sym): ..
6376 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
6377 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
6378 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
6379 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
6380 _bfd_dwarf2_find_nearest_line): ..
6381 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
6382 ecoff_compute_section_file_positions,
6383 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
6384 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
6385 _bfd_elf_discard_section_eh_frame_hdr,
6386 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
6387 _bfd_elf_write_section_eh_frame,
6388 _bfd_elf_write_section_eh_frame_hdr): ..
6389 * elf-hppa.h (elf_hppa_sort_unwind): ..
6390 * elf-m10200.c (mn10200_elf_relax_section,
6391 mn10200_elf_relax_delete_bytes,
6392 mn10200_elf_get_relocated_section_contents): ..
6393 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
6394 mn10300_elf_check_relocs, mn10300_elf_relax_section,
6395 mn10300_elf_relax_delete_bytes,
6396 mn10300_elf_get_relocated_section_contents,
6397 _bfd_mn10300_elf_adjust_dynamic_symbol,
6398 _bfd_mn10300_elf_discard_copies,
6399 _bfd_mn10300_elf_size_dynamic_sections,
6400 _bfd_mn10300_elf_finish_dynamic_sections): ..
6401 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
6402 _bfd_elf_make_section_from_phdr, elf_fake_sections,
6403 bfd_elf_set_group_contents, map_sections_to_segments,
6404 elf_sort_sections, assign_file_positions_for_segments,
6405 SECTION_SIZE, copy_private_bfd_data,
6406 _bfd_elf_get_dynamic_reloc_upper_bound,
6407 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
6408 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
6409 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
6410 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
6411 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
6412 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
6413 bfd_elf32_arm_process_before_allocation,
6414 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
6415 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
6416 elf32_arm_write_section): ..
6417 * elf32-cris.c (cris_elf_grok_prstatus,
6418 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
6419 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
6420 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
6421 elf_cris_discard_excess_dso_dynamics,
6422 elf_cris_discard_excess_program_dynamics): ..
6423 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
6424 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
6425 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
6426 _frv_create_got_section, _frvfdpic_assign_plt_entries,
6427 elf32_frvfdpic_size_dynamic_sections,
6428 elf32_frvfdpic_modify_segment_map,
6429 elf32_frvfdpic_finish_dynamic_sections): ..
6430 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
6431 elf32_h8_get_relocated_section_contents): ..
6432 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
6433 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
6434 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
6435 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
6436 elf32_hppa_finish_dynamic_sections): ..
6437 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
6438 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
6439 i370_elf_finish_dynamic_sections): ..
6440 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
6441 allocate_dynrelocs, elf_i386_size_dynamic_sections,
6442 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
6443 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
6444 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
6445 * elf32-ip2k.c (ip2k_is_switch_table_128,
6446 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
6447 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
6448 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
6449 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
6450 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
6451 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
6452 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
6453 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
6454 m32r_elf_get_relocated_section_contents): ..
6455 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
6456 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
6457 m68hc11_elf_relax_delete_bytes): ..
6458 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
6459 m68hc12_elf_size_one_stub): ..
6460 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
6461 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
6462 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
6463 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
6464 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
6465 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6466 elf32_mips_grok_prstatus): ..
6467 * elf32-or32.c (or32_elf_consth_reloc): ..
6468 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
6469 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
6470 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
6471 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
6472 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
6473 ppc_elf_final_write_processing): ..
6474 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6475 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6476 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
6477 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
6478 sh_elf_relax_delete_bytes, sh_elf_align_loads,
6479 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
6480 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
6481 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
6482 * elf32-sh64-com.c (sh64_address_in_cranges,
6483 sh64_get_contents_type): ..
6484 * elf32-sh64.c (sh64_find_section_for_address,
6485 sh64_elf_final_write_processing): ..
6486 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
6487 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
6488 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
6489 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
6490 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
6491 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
6492 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
6493 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
6494 elf_vax_finish_dynamic_sections): ..
6495 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
6496 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
6497 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
6498 xstormy16_elf_finish_dynamic_sections): ..
6499 * elf32-xtensa.c (xtensa_read_table_entries,
6500 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
6501 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
6502 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
6503 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
6504 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
6505 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
6506 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
6507 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
6508 xtensa_callback_required_dependence): ..
6509 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
6510 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
6511 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
6512 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
6513 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
6514 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
6515 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
6516 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
6517 * elf64-hppa.c (allocate_dynrel_entries,
6518 elf64_hppa_size_dynamic_sections,
6519 elf64_hppa_finish_dynamic_sections): ..
6520 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
6521 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
6522 elf64_mips_grok_prstatus): ..
6523 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
6524 mmix_elf_relocate_section, mmix_elf_final_link,
6525 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
6526 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
6527 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
6528 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
6529 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
6530 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
6531 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
6532 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
6533 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
6534 ppc64_elf_finish_dynamic_sections): ..
6535 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6536 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6537 elf_s390_finish_dynamic_sections): ..
6538 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
6539 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
6540 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
6541 sh64_elf64_finish_dynamic_sections): ..
6542 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
6543 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
6544 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
6545 sparc64_elf_finish_dynamic_symbol,
6546 sparc64_elf_finish_dynamic_sections): ..
6547 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
6548 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
6549 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
6550 elf64_x86_64_finish_dynamic_sections): ..
6551 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
6552 * elfcode.h (elf_slurp_reloc_table): ..
6553 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
6554 elf_finalize_dynstr, elf_link_add_object_symbols,
6555 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
6556 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
6557 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6558 elf32_mips_grok_prstatus): ..
6559 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
6560 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
6561 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
6562 elfNN_ia64_finish_dynamic_sections): ..
6563 * elfxx-mips.c (mips_elf_create_procedure_table,
6564 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
6565 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
6566 mips_elf_global_got_index, mips_elf_multi_got,
6567 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
6568 mips_elf_allocate_dynamic_relocations,
6569 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
6570 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
6571 _bfd_mips_elf_always_size_sections,
6572 _bfd_mips_elf_size_dynamic_sections,
6573 _bfd_mips_elf_finish_dynamic_symbol,
6574 _bfd_mips_elf_finish_dynamic_sections,
6575 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
6576 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
6577 _bfd_elf_mips_get_relocated_section_contents,
6578 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
6579 * hp300hpux.c (callback): ..
6580 * hppabsd-core.c (make_bfd_asection): ..
6581 * hpux-core.c (make_bfd_asection): ..
6582 * i386linux.c (linux_link_create_dynamic_sections,
6583 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
6584 * i386msdos.c (msdos_write_object_contents): ..
6585 * i386os9k.c (os9k_callback, os9k_write_object_contents,
6586 os9k_set_section_contents): ..
6587 * ieee.c (parse_expression, ieee_slurp_external_symbols,
6588 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
6589 ieee_write_section_part, do_with_relocs, do_as_repeat,
6590 do_without_relocs, ieee_write_debug_part, init_for_output,
6591 ieee_set_section_contents): ..
6592 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
6593 * irix-core.c (do_sections, make_bfd_asection): ..
6594 * libaout.h (aout_section_merge_with_text_p): ..
6595 * libbfd.c (_bfd_generic_get_section_contents,
6596 _bfd_generic_get_section_contents_in_window): ..
6597 * linker.c (default_indirect_link_order): ..
6598 * lynx-core.c (make_bfd_asection): ..
6599 * m68klinux.c (linux_link_create_dynamic_sections,
6600 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6601 * mach-o.c (bfd_mach_o_make_bfd_section,
6602 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
6603 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
6604 bfd_mach_o_scan_read_segment): ..
6605 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
6606 _bfd_merge_sections): ..
6607 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
6608 mmo_map_set_sizes, mmo_canonicalize_symtab,
6609 mmo_internal_write_section, mmo_write_object_contents): ..
6610 * netbsd-core.c (netbsd_core_file_p): ..
6611 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
6612 nlm_alpha_set_public_section): ..
6613 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
6614 * nlm32-sparc.c (nlm_sparc_write_import): ..
6615 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
6616 nlm_compute_section_file_positions): ..
6617 * oasys.c (oasys_object_p, oasys_slurp_section_data,
6618 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
6619 * opncls.c (get_debug_link_info): ..
6620 * osf-core.c (make_bfd_asection): ..
6621 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6622 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
6623 final_link, aout_link_input_section): ..
6624 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
6625 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
6626 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
6627 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
6628 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
6629 * ptrace-core.c (ptrace_unix_core_file_p): ..
6630 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
6631 _bfd_final_link_relocate, bfd_generic_relax_section,
6632 bfd_generic_get_relocated_section_contents): ..
6633 * reloc16.c (bfd_coff_reloc16_relax_section,
6634 bfd_coff_reloc16_get_relocated_section_c): ..
6635 * riscix.c (riscix_some_aout_object_p): ..
6636 * rs6000-core.c (read_hdr, make_bfd_asection): ..
6637 * sco5-core.c (make_bfd_asection): ..
6638 * simple.c (bfd_simple_get_relocated_section_contents): ..
6639 * som.c (som_object_setup, setup_sections, som_prep_headers,
6640 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
6641 som_set_reloc_info, som_get_section_contents,
6642 som_bfd_link_split_section): ..
6643 * sparclinux.c (linux_link_create_dynamic_sections,
6644 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6645 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
6646 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
6647 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
6648 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
6649 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
6650 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
6651 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
6652 sunos_finish_dynamic_link): ..
6653 * syms.c (_bfd_stab_section_find_nearest_line): ..
6654 * tekhex.c (first_phase, tekhex_set_section_contents,
6655 tekhex_write_object_contents): ..
6656 * trad-core.c (trad_unix_core_file_p): ..
6657 * versados.c (process_esd, process_otr, process_otr): ..
6658 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
6659 * vms-misc.c (add_new_contents): ..
6660 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
6661 * vms.c (vms_set_section_contents): ..
6662 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
6663 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
6664 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
6665 * xsym.c (bfd_sym_scan): .. See above.
6666
66672004-06-21 H.J. Lu <hongjiu.lu@intel.com>
6668
6669 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
6670 calling _bfd_merged_section_offset only for section symbols.
6671
66722004-06-22 Alan Modra <amodra@bigpond.net.au>
6673
6674 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
6675 for handling SEC_MERGE symbols in relax_section.
6676
66772004-06-21 Alexandre Oliva <aoliva@redhat.com>
6678
6679 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
6680 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
6681 linked together. Mark the result as h8300sx code.
6682
66832004-06-21 Alexandre Oliva <aoliva@redhat.com>
6684
6685 * elf-bfd.h (struct elf_backend_data): Added
6686 elf_backend_omit_section_dynsym.
6687 (_bfd_elf_link_omit_section_dynsym): Declare.
6688 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
6689 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
6690 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
6691 (_bfd_elf_link_renumber_dynsyms): ... this function.
6692 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
6693 _bfd_elf_link_omit_section_dynsym).
6694 (elfNN_bed): Added elf_backend_omit_section_dynsym.
6695
66962004-06-21 Nick Clifton <nickc@redhat.com>
6697
6698 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
6699 flags.
6700
67012004-06-17 Jerome Guitton <guitton@gnat.com>
6702
6703 * bfd-in.h (bfd_cache_close_all): New function declaration.
6704 * bfd-in2.h: Regenerate.
6705 * cache.c (bfd_cache_close_all): New function definition.
6706
67072004-06-16 Mark Kettenis <kettenis@gnu.org>
6708
6709 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
6710 4.10 and beyond.
6711 * configure: Regenerate.
6712
67132004-06-16 Daniel Jacobowitz <dan@debian.org>
6714
6715 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
6716 the pre-existing section.
6717
67182004-06-15 Alan Modra <amodra@bigpond.net.au>
6719
6720 * section.c (struct sec): Remove usused flags. Reorganize a little.
6721 (bfd_get_section_size_before_reloc): Delete.
6722 (bfd_get_section_size_after_reloc): Delete.
6723 (STD_SECTION): Update.
6724 (bfd_get_section_size_now): Delete.
6725 (bfd_set_section_contents): Don't referece reloc_done.
6726 (bfd_get_section_contents): Remove reloc_done comment.
6727 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
6728 reloc_done.
6729 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
6730 * ecoff.c (bfd_debug_section): Update initializer.
6731 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
6732 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
6733 * bfd-in.h (bfd_section_size): Expand.
6734 (bfd_get_section_size): New macro.
6735 * bfd-in2.h: Regenerate.
6736 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
6737 bfd_get_section_size_before_reloc with bfd_get_section_size.
6738 * coffcode.h (coff_write_object_contents): Likewise.
6739 * coffgen.c (build_debug_section): Likewise.
6740 * dwarf1.c (parse_line_table): Likewise.
6741 (_bfd_dwarf1_find_nearest_line): Likewise.
6742 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
6743 * i386msdos.c (msdos_write_object_contents): Likewise.
6744 * pdp11.c (squirt_out_relocs): Likewise.
6745 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
6746 * elf64-mmix.c (mmix_elf_final_link): Update comment.
6747
67482004-06-14 Chris Demetriou <cgd@broadcom.com>
6749
6750 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
6751 removal) with updated comment.
6752 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
6753 BFD_RELOC_32_PCREL.
6754 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
6755 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6756
67572004-06-12 Alan Modra <amodra@bigpond.net.au>
6758
6759 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
6760 overflow on branches to undefweaks.
6761
67622004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6763
6764 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
6765 as ecoff_section_data() does not return a valid lvalue.
6766
67672004-06-09 Alexandre Oliva <aoliva@redhat.com>
6768
6769 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
6770 (elf_link_add_object_symbols): Likewise.
6771
6772 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
6773 (elf_backend_reloc_type_class): New.
6774
67752004-06-08 Mark Kettenis <kettenis@gnu.org>
6776
6777 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
6778 netbsd-core.lo.
6779 * configure: Regenerate.
6780
67812004-06-07 Daniel Jacobowitz <dan@debian.org>
6782
6783 From: Albert Chin-A-Young <china@thewrittenword.com>
6784 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
6785 to unsigned int.
6786
67872004-05-29 H.J. Lu <hongjiu.lu@intel.com>
6788
6789 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
6790 change.
6791
67922004-05-28 DJ Delorie <dj@redhat.com>
6793
6794 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
6795 for linking, but otherwise adjust reloc for merged sections.
6796
67972004-05-28 H.J. Lu <hongjiu.lu@intel.com>
6798
6799 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
6800 _bfd_merged_section_offset for local symbols.
6801
68022004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
6803
6804 * Makefile.am: Regenerate dependencies.
6805 * Makefile.in: Regenerate.
6806 * archures.c: Add bfd_mach_sh3_nommu .
6807 * bfd-in2.h: Regenerate.
6808 * cpu-sh.c: Add sh3-nommu architecture.
6809 (bfd_to_arch_table): Create new table.
6810 (sh_get_arch_from_bfd_mach): Create new function.
6811 (sh_get_arch_up_from_bfd_mach): Create new function.
6812 (sh_merge_bfd_arch): Create new function.
6813 * elf32-sh.c (sh_ef_bfd_table): Add table.
6814 (sh_elf_check_relocs): Replace switch statement with
6815 use of sh_ef_bfd_table .
6816 (sh_elf_get_flags_from_mach): Add new function.
6817 (sh_find_elf_flags): Likewise.
6818 (sh_elf_copy_private_data): Replace most of non-elf contents
6819 with a call to sh_merge_bfd_arch() .
6820
68212004-05-27 Michael Chastain <mec.gnu@mindspring.com>
6822
6823 * Makefile.am (bfdver.h): Use explicit filename, not $< .
6824 * Makefile.in: Regenerate.
6825
68262004-05-27 Alexandre Oliva <aoliva@redhat.com>
6827
6828 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
6829 custom calling conventions for dynamic symbols.
6830 (mn10300_elf_relax_section): Avoid relaxing a function as a local
6831 symbol if it's an alias to a global one.
6832
68332004-05-26 H.J. Lu <hongjiu.lu@intel.com>
6834
6835 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
6836 change.
6837
68382004-05-27 Alexandre Oliva <aoliva@redhat.com>
6839
6840 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
6841 loop over hashes.
6842
68432004-05-26 Alan Modra <amodra@bigpond.net.au>
6844
6845 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
6846 for SHT_GROUP sections.
6847
68482004-05-25 Alan Modra <amodra@bigpond.net.au>
6849
6850 * elflink.c (elf_link_add_object_symbols): Don't set up merge
6851 section data here..
6852 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
6853 * merge.c: Formatting. Remove unnecessary casts. Expand
6854 bfd_get_section_alignment macro.
6855 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
6856 use throughout file.
6857 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
6858 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
6859 section name to determine sinfo group, instead test output section
6860 and alignment.
6861 (_bfd_merge_sections): Add struct bfd_link_info param. Call
6862 _bfd_strip_section_from_output rather than just twiddling flags.
6863 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
6864 (_bfd_merge_sections): Update prototype.
6865 * libbfd.h: Regenerate.
6866
68672004-05-24 Mark Kettenis <kettenis@gnu.org>
6868
6869 * netbsd-core.c: Correctly indent section that sets architecture
6870 from machine ID.
6871
6872 From Miod Vallat <miod@online.fr>:
6873 * m88kopenbsd.c: New file.
6874 * targets.c (m88k_openbsd_vec): New.
6875 * config.bfd: Add m88k-*-openbsd*.
6876 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
6877 (m88kopenbsd_vec): New.
6878 * configure: Regenerate.
6879 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
6880 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
6881 Run "make dep-am".
6882 * Makefile.in: Regenerate.
6883 * po/SRC-POTFILES.in: Regenerate.
6884
68852004-05-24 Nick Clifton <nickc@redhat.com>
6886
6887 * hash.c: Remove bogus node "Changing the default Hash Table Size"
6888 introduced by hash table size patch.
6889
68902004-05-22 Ben Elliston <bje@au.ibm.com>
6891
6892 * configure.in (is_release): Remove.
6893 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
6894 (AC_OUTPUT): Don't output bfdver.h from version.h.
6895 * configure: Regenerate.
6896 * Makefile.am (RELEASE): New variable.
6897 (bfdver.h): New target.
6898 * Makefile.in: Regenerate.
6899 * doc/Makefile.in: Likewise.
6900
69012004-05-22 Ben Elliston <bje@au.ibm.com>
6902
6903 * Makefile.am (config.status): Don't depend on version.h.
6904 * Makefile.in: Regenerate.
6905
69062004-05-22 Alan Modra <amodra@bigpond.net.au>
6907
6908 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
6909 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
6910 * libbfd.h: Regenerate.
6911 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
6912 (_bfd_elf_rel_local_sym): Likewise.
6913 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
6914 (elf_link_input_bfd): Likewise.
6915 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
6916 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6917 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6918 (elfNN_ia64_relocate_section): Likewise.
6919
69202004-05-21 Andy Chittenden <achittenden@bluearc.com>
6921
6922 * hash.c (bfd_default_hash_table_size): New variable.
6923 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
6924 (bfd_hash_set_default_size): New function. Set the default size
6925 to a selected prime number close to the argument. Document new
6926 function.
6927 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
6928 * bfd-in2.h: Regenerate.
6929 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
6930 * Makefile.in: Regenerate.
6931
69322004-05-21 Mark Kettenis <kettenis@gnu.org>
6933
6934 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
6935 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
6936 arm, m68k, m88k and hppa core files.
6937
69382004-05-21 Nick Clifton <nickc@redhat.com>
6939
6940 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
6941 (bfd_bwrite): Likewise.
6942 (bfd_tell): Likewise.
6943 (bfd_flush): Likewise.
6944 (bfd_stat): Likewise.
6945 (bfd_seek): Likewise.
6946 (bfd_get_mtime): Likewise.
6947 (bfd_get_size): Likewise.
6948
69492004-05-19 Ben Elliston <bje@au.ibm.com>
6950
6951 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
6952
69532004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
6954
6955 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
6956 (bfd_generic_openr_next_archived_file): Likewise.
6957
69582004-05-17 Bob Wilson <bob.wilson@acm.org>
6959
6960 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
6961 section names by inserting a new substring after .gnu.linkonce, except
6962 for .gnu.linkonce.t.* where the "t." is replaced.
6963
69642004-05-17 Adam Nemet <anemet@lnxw.com>
6965
6966 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
6967 (m68-*-lynxos* case): Likewise.
6968 (powerpc-*-lyxnos* case): New case.
6969 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
6970
69712004-05-17 David Heine <dlheine@tensilica.com>
6972
6973 * aout-target.h (MY_bfd_copy_private_header_data): Define.
6974 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
6975 * bfd.c (bfd_copy_private_header_data): Define.
6976 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
6977 interface.
6978 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
6979 * coffcode.h (coff_bfd_copy_private_header_data): Define.
6980 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
6981 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
6982 segments by calling copy_private_bfd_data.
6983 (_bfd_elf_copy_private_header_data): Define.
6984 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
6985 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
6986 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
6987 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
6988 * mmo.c (mmo_bfd_copy_private_header_data): Define.
6989 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
6990 * som.c (som_bfd_copy_private_header_data): Define.
6991 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
6992 * vms.c (vms_bfd_copy_private_header_data): Define.
6993 * bfd-in2.h: Regenerate.
6994 * libbfd.h: Regenerate.
6995
69962004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6997
6998 * elfxx-mips.c (MINUS_TWO): Define.
6999 (mips_elf_higher, mips_elf_highest,
7000 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
7001 some bfd_vma values.
7002 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
7003
70042004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7005
7006 * som.c (log2): Rename to exact_log2. Adjust all callers.
7007
70082004-05-13 Paul Brook <paul@codesourcery.com>
7009
7010 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
7011 dwarf3 format CIE entries. Remove comment about the size of the
7012 ra_column field. It is now correctly deduced.
7013
70142004-05-13 Joel Sherrill <joel@oarcorp.com>
7015
7016 * config.bfd (or32-*-rtems*): Switch to elf.
7017
70182004-05-13 Nick Clifton <nickc@redhat.com>
7019
7020 * po/fr.po: Updated French translation.
7021
70222004-05-11 Jakub Jelinek <jakub@redhat.com>
7023
7024 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
7025 into .dynsym if elf_section_data (sec)->dynindx <= 0.
7026 Adjust counting of last_local.
7027 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
7028 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
7029 created by the linker nor !SHF_ALLOC.
7030
7031 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
7032 DT_PLTGOT to the start of the .got.plt section instead of the
7033 .got output section. Set sh_entsize for .got section in addition
7034 to .got.plt.
7035 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7036 is at sgot->output_section->vma.
7037 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
7038 DT_PLTGOT to the start of the .got.plt section instead of the
7039 .got output section.
7040 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
7041 is at sgot->output_section->vma. Set sh_entsize for .got section
7042 in addition to .got.plt.
7043 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
7044 (bfd_section_from_phdr): Likewise.
7045 (map_sections_to_segments): Likewise.
7046 (assign_file_positions_for_segments): Likewise.
7047 (get_program_header_size): Likewise.
7048 * elflink.c (bfd_elf_size_dynamic_sections): Set
7049 elf_tdata (output_bfd)->relro from info->relro.
7050 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
7051
70522004-05-08 Alexandre Oliva <aoliva@redhat.com>
7053
7054 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
7055 a zero symndx for which we hadn't accounted a dynamic relocation.
7056 (_frvfdpic_add_rofixup): Likewise.
7057
70582004-05-07 Brian Ford <ford@vss.fsi.com>
7059 DJ Delorie <dj@redhat.com>
7060
7061 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
7062 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
7063 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
7064 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
7065
70662004-05-07 Alexandre Oliva <aoliva@redhat.com>
7067
7068 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
7069 immediately if there's no link info.
7070 (elf32_frvfdpic_copy_private_bfd_data): New.
7071 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
7072
70732004-05-06 Zack Weinberg <zack@codesourcery.com>
7074
7075 * dwarf2.c (add_line_info): Also set info->filename to NULL if
7076 filename argument is null; do not call strlen on a null pointer.
7077
70782004-05-06 Daniel Jacobowitz <drow@mvista.com>
7079
7080 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
7081 special case.
7082
70832004-05-05 Alexandre Oliva <aoliva@redhat.com>
7084
7085 * configure.in (bfd_elf32_frvfdpic_vec): New.
7086 * configure: Rebuilt.
7087 * targets.c (bfd_elf32_frvfdpic_vec): New.
7088 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
7089 on the latter.
7090 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
7091 frvfdpic instead of frv. Rearrange elf-target macros such that
7092 the FDPIC-specific ones are only defined for this new target
7093 vector.
7094 (bfd_elf32_frvfdpic_vec): Declare.
7095 (IS_FDPIC): New.
7096 (elf32_frv_relocate_section): Use it to enable segment checking
7097 and to control rofixup emission. Add output section vma to
7098 applied relocation in non-LOAD non-ALLOC sections. Use
7099 _bfd_error_handler for errors.
7100 (_frv_create_got_section): Create .rel.got and .rofixup only in
7101 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
7102 linker script.
7103 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
7104 (elf32_frvfdpic_modify_segment_map): Likewise.
7105 (elf32_frv_finish_dynamic_sections): New, do-nothing.
7106 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
7107 error message if we miscompute the rofixup size.
7108 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
7109 (frvfdpic_elf_encode_eh_address): Likewise.
7110 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
7111 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
7112 relocs. Reject unknown relocation types.
7113 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
7114 (frv_elf_merge_private_bfd_data): Likewise.
7115 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
7116 0x4000 for newly-added elf32-frvfdpic.
7117
71182004-05-05 Nick Clifton <nickc@redhat.com>
7119
7120 PR/136
7121 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
7122 returning NULL as most users of this function do not check its
7123 return value.
7124 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
7125 of bfd_cache_lookup().
7126 * sco5-core.c (sco5_core_file_p): Likewise.
7127 * trad-core.c (trad_unix_core_file_p): Likewise.
7128
71292004-05-05 Nick Clifton <nickc@redhat.com>
7130
7131 * cache.c (bfd_cache_lookup): Improve formatting.
7132 * archive.c: Fix formatting.
7133
71342004-05-05 Peter Barada <peter@the-baradas.com>
7135
7136 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
7137 * cpu-m68k.c(bfd_m68k_arch): Likewise.
7138 * bfd-in2.h(bfd_architecture): Regenerate.
7139
71402004-05-03 Alan Modra <amodra@bigpond.net.au>
7141
7142 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
7143 SEC_MERGE sections.
7144 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
7145 those against discarded link-once and SEC_MERGE section symbols.
7146
71472004-05-02 H.J. Lu <hongjiu.lu@intel.com>
7148
7149 * section.c (bfd_get_section_by_name_if): New.
7150 * bfd-in2.h: Regenerated.
7151
71522004-05-02 Alan Modra <amodra@bigpond.net.au>
7153
7154 * som.c (som_bfd_is_group_section): Define.
7155
71562004-05-01 Alan Modra <amodra@bigpond.net.au>
7157
7158 * section.c (bfd_make_section_anyway): Copy the whole
7159 bfd_hash_entry, not just "next" from existing entry.
7160
71612004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7162
7163 * elf.c (bfd_section_from_shdr): Maintain the section order in
7164 a section group.
7165 (special_sections): Add ".note.GNU-stack".
7166 (elf_fake_sections): Handle section group for relocatable
7167 link..
7168
71692004-04-30 H.J. Lu <hongjiu.lu@intel.com>
7170
7171 * section.c (bfd_sections_find_if): New.
7172 * bfd-in2.h: Regenerated.
7173
71742004-04-30 Alan Modra <amodra@bigpond.net.au>
7175
7176 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
7177
7178 * elf-bfd.h (bfd_elf_is_group_section): Declare.
7179 * elf.c (bfd_elf_is_group_section): New function.
7180 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
7181 * section.c (bfd_generic_is_group_section): New function.
7182 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
7183 (BFD_JUMP_TABLE_LINK): Adjust.
7184 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
7185 * aout-target.h (MY_bfd_is_group_section): Define.
7186 * aout-tic30.c (MY_bfd_is_group_section): Define.
7187 * bfd.c (bfd_is_group_section): Define.
7188 * binary.c (binary_bfd_is_group_section): Define.
7189 * bout.c (b_out_bfd_is_group_section): Define.
7190 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
7191 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
7192 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
7193 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
7194 * coffcode.h (coff_bfd_is_group_section): Define.
7195 * i386msdos.c (msdos_bfd_is_group_section): Define.
7196 * i386os9k.c (os9k_bfd_is_group_section): Define.
7197 * ieee.c (ieee_bfd_is_group_section): Define.
7198 * ihex.c (ihex_bfd_is_group_section): Define.
7199 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
7200 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
7201 * mmo.c (mmo_bfd_is_group_section): Define.
7202 * nlm-target.h (nlm_bfd_is_group_section): Define.
7203 * oasys.c (oasys_bfd_is_group_section): Define.
7204 * pef.c (bfd_pef_bfd_is_group_section): Define.
7205 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
7206 * srec.c (srec_bfd_is_group_section): Define.
7207 * tekhex.c (tekhex_bfd_is_group_section): Define.
7208 * versados.c (versados_bfd_is_group_section): Define.
7209 * vms.c (vms_bfd_is_group_section): Define.
7210 * xsym.c (bfd_sym_bfd_is_group_section): Define.
7211 * bfd-in2.h: Regenerate.
7212 * libbfd.h: Regenerate.
7213
72142004-04-30 Alan Modra <amodra@bigpond.net.au>
7215
7216 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
7217
72182004-04-30 Hans-Peter Nilsson <hp@axis.com>
7219
7220 * configure.in: Update version to 2.15.91.
7221 * configure: Regenerate.
7222
72232004-04-29 Brian Ford <ford@vss.fsi.com>
7224
7225 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
7226 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
7227 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
7228 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
7229 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
7230 .gnu.linkonce.wi. sections.
7231 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
7232 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
7233 .gnu.linkonce.wi..
7234 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
7235 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7236
72372004-04-28 Chris Demetriou <cgd@broadcom.com>
7238
7239 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
7240 * bfd-in2.h: Regenerate.
7241 * libbfd.h: Likewise.
7242
72432004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7244
7245 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
7246 dup_common fields.
7247 (setup_sections): Use som_subspace_dictionary_record struct instead
7248 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
7249 is_comdat, is_common or dup_common.
7250 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
7251 is_comdat, is_common and dup_common in section subspace_dict from
7252 copy_data.
7253 (som_begin_writing): Use som_subspace_dictionary_record struct.
7254 (som_finish_writing): Likewise.
7255 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
7256 is_common and dup_common flags in info for symbol. Add comment
7257 regarding linker support for these fields. Slightly reorganize
7258 function.
7259 (som_build_and_write_symbol_table): Set is_comdat, is_common and
7260 dup_common fields in symbol table from symbol info.
7261 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
7262 arguments. Set corresponding fields in copy_data. Change all callers.
7263 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
7264 symbol table.
7265 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
7266 * som.h (som_subspace_dictionary_record): Define.
7267 (som_copyable_section_data_struct): Add is_comdat, is_common and
7268 dup_common fields.
7269 (som_section_data_struct): Use som_subspace_dictionary_record struct
7270 instead of subspace_dictionary_record.
7271 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
7272
72732004-04-27 Bob Wilson <bob.wilson@acm.org>
7274
7275 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
7276 if set. Check reloc_done flag before applying relocations. Use
7277 output addresses, both when applying relocations and when comparing
7278 against the specified section.
7279 (elf_xtensa_relocate_section): Use output address to check if dynamic
7280 reloc is in a literal pool. Set section's reloc_done flag.
7281
72822004-04-27 H.J. Lu <hongjiu.lu@intel.com>
7283
7284 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
7285 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
7286 section.
7287 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
7288 section.
7289
72902004-04-27 Alan Modra <amodra@bigpond.net.au>
7291
7292 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
7293 structure field removed in 2004-04-24 patch.
7294 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
7295
7296 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
7297 Constify hdr arg.
7298 * elf32-arm.h (elf32_arm_section_flags): Likewise.
7299 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
7300 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
7301 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
7302 field before calling elf_backend_section_flags.
7303
73042004-04-24 Chris Demetriou <cgd@broadcom.com>
7305
7306 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
7307 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
7308 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
7309 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
7310 and BFD_RELOC_32_PCREL.
7311 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
7312 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
7313 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7314 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
7315 (mips_elf_next_relocation): Move comment about matching HI/LO
7316 relocations to...
7317 (_bfd_mips_elf_relocate_section): Here. Remove handling for
7318 R_MIPS_GNU_REL_HI16.
7319
73202004-04-23 Chris Demetriou <cgd@broadcom.com>
7321
7322 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
7323 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
7324 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
7325 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
7326 and update comments to reflect current usage.
7327 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
7328 and MIPS_R_SWITCH, as well as several empty entries. Update comment
7329 for MIPS_R_PCREL16.
7330 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
7331 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
7332 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7333 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
7334 type number to be MIPS_R_PCREL16.
7335 (mips_relocate_section): Remove support for link-time relaxation
7336 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
7337 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7338 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
7339 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
7340 relaxation of branches used by embedded-PIC.
7341 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
7342 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
7343 related members, update comment.
7344 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
7345 code related to embedded-PIC.
7346 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
7347 initialization of now-removed 'adjust' member of
7348 'struct ecoff_debug_info'.
7349
73502004-04-23 Chris Demetriou <cgd@broadcom.com>
7351
7352 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
7353
73542004-04-21 Philip Blundell <pb@nexus.co.uk>
7355
7356 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
7357 relocs for locally defined symbols during -shared final link.
7358 (elf32_arm_final_link_relocate): Likewise.
7359
73602004-04-22 Jakub Jelinek <jakub@redhat.com>
7361
7362 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
7363 ELF_LINK_POINTER_EQUALITY_NEEDED.
7364 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
7365 if r_type is not R_X86_64_PC32.
7366 (elf64_x86_64_finish_dynamic_symbol): If
7367 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
7368 SHN_UNDEF symbols.
7369
73702004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7371
7372 * elf32-sh.c (sh_elf_plt_sym_val): New function.
7373 (elf_backend_plt_sym_val): Define.
7374
73752004-04-22 Andrew Cagney <cagney@redhat.com>
7376
7377 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
7378
73792004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7380
7381 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
7382 make_bfd_asection.
7383 * som.c (som_set_section_contents): Constantify second argument.
7384 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
7385 (som_object_setup): Rework to avoid warning.
7386 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
7387 Likewise.
7388
73892004-04-22 Andrew Cagney <cagney@redhat.com>
7390
7391 * cache.c (bfd_cache_close): Check for a previously closed file.
7392
73932004-04-22 Jakub Jelinek <jakub@redhat.com>
7394
7395 * bfd.c (bfd_get_synthetic_symtab): Define.
7396 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
7397 NAME##_get_synthetic_symtab.
7398 (struct bfd_target): Add _bfd_get_synthetic_symtab.
7399 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
7400 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
7401 relplt_name fields.
7402 (_bfd_elf_get_synthetic_symtab): New prototype.
7403 * elfcode.h (elf_get_synthetic_symtab): Define.
7404 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
7405 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
7406 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
7407 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
7408 * bfd-in2.h: Rebuilt.
7409 * libbfd.h: Rebuilt.
7410 * elf32-i386.c (elf_i386_plt_sym_val): New function.
7411 (elf_backend_plt_sym_val): Define.
7412 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
7413 (elf_backend_plt_sym_val): Define.
7414 * elf32-s390.c (elf_s390_plt_sym_val): New function.
7415 (elf_backend_plt_sym_val): Define.
7416 * elf64-s390.c (elf_s390_plt_sym_val): New function.
7417 (elf_backend_plt_sym_val): Define.
7418 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
7419 (elf_backend_plt_sym_val): Define.
7420 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
7421 (elf_backend_plt_sym_val): Define.
7422 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
7423 (elf_backend_plt_sym_val): Define.
7424 * aout-target.h (MY_get_synthetic_symtab): Define.
7425 * aout-tic30.c (MY_get_synthetic_symtab): Define.
7426 * coff-rs6000.c (rs6000coff_vec): Add
7427 _bfd_nodynamic_get_synthetic_symtab.
7428 (pmac_xcoff_vec): Likewise.
7429 * coff64-rs6000.c (rs6000coff64_vec): Add
7430 _bfd_nodynamic_get_synthetic_symtab.
7431 (aix5coff64_vec): Likewise.
7432 * sunos.c (MY_get_synthetic_symtab): Define.
7433 * vms.c (vms_get_synthetic_symtab): Define.
7434
74352004-04-22 Nick Clifton <nickc@redhat.com>
7436
7437 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
7438
74392004-04-22 Peter Barada <peter@the-baradas.com>
7440
7441 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
7442 * bfd2-in.h: Regenerate.
7443 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
7444
74452004-04-21 Chris Demetriou <cgd@broadcom.com>
7446
7447 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
7448 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
7449 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
7450 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
7451 * bfd-in2.h: Regenerate.
7452
74532004-04-21 Bob Wilson <bob.wilson@acm.org>
7454
7455 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
7456 require relocations against a weak symbol to reference the same
7457 symbol hash entry if not a final, static link.
7458 (get_cached_value, add_value_map): Add final_static_link argument.
7459 (remove_literals): Pass final_static_link argument as needed.
7460
74612004-04-21 Andrew Cagney <cagney@redhat.com>
7462
7463 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
7464 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
7465 (opncls_bwrite, opncls_bclose, opncls_bflush)
7466 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
7467 bfd iovec that uses function callbacks.
7468 (bfd_close): Use the iovec's bclose.
7469 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
7470 (cache_bclose, cache_bflush, cache_bstat)
7471 (cache_iovec): New functions and global variable, implement a
7472 cache "iovec", where applicable set bfd_error.
7473 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
7474 * bfdio.c (struct bfd_iovec): Define.
7475 (real_read): Delete function.
7476 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
7477 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
7478 assume that bread and bwrite set bfd_error.
7479 * bfd.c (struct bfd): Add "iovec", update comments.
7480 * bfd-in2.h, libbfd.h: Re-generate.
7481
74822004-04-21 Andrew Cagney <cagney@redhat.com>
7483
7484 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7485
74862004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
7487
7488 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
7489 (bfd_elf_gc_sections): Fail if a shared object is being created.
7490 Do not fail if dynamic sections have been created. Instead call
7491 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
7492 dynamically referenced symbols. Do not mark the whole graph
7493 rooted at .eh_frame, only the section proper.
7494
74952004-04-20 DJ Delorie <dj@redhat.com>
7496
7497 * reloc.c: Add BFD_RELOC_32_SECREL.
7498 * bfd-in2.h: Regenerate.
7499 * libbfd.h: Likewise.
7500 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
7501 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
7502 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
7503
75042004-04-19 Jakub Jelinek <jakub@redhat.com>
7505
7506 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
7507 relocs against hidden/protected undefweak symbols properly.
7508 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7509
75102004-04-18 Mark Kettenis <kettenis@gnu.org>
7511
7512 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7513 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
7514 core files.
7515
75162004-04-17 Brian Ford <ford@vss.fsi.com>
7517
7518 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
7519 filepos for the SizeOfHeaders field.
7520 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
7521 overflow.
7522 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
7523
75242004-04-16 Alan Modra <amodra@bigpond.net.au>
7525
7526 * simple.c (bfd_simple_get_relocated_section_contents): Don't
7527 change reloc_done. Set and restore _cooked_size.
7528 (RETURN): Delete.
7529
75302004-04-15 Mark Kettenis <kettenis@gnu.org>
7531
7532 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
7533 core files.
7534
75352004-04-15 Nick Clifton <nickc@redhat.com>
7536
7537 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
7538
75392004-04-15 Alan Modra <amodra@bigpond.net.au>
7540
7541 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
7542
75432004-04-15 H.J. Lu <hongjiu.lu@intel.com>
7544
7545 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
7546 when it is a definition.
7547
75482004-04-14 Alan Modra <amodra@bigpond.net.au>
7549
7550 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
7551 when statically linking PIC code.
7552 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7553
75542004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7555
7556 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
7557 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
7558 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
7559 * configure: Regenerate.
7560
75612004-04-08 Richard Sandiford <rsandifo@redhat.com>
7562
7563 * elflink.c: Include libiberty.h.
7564 * Makefile.am (elflink.lo): Depend on libiberty.h.
7565 * Makefile.in: Regenerate.
7566
75672004-04-06 Daniel Jacobowitz <drow@mvista.com>
7568
7569 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
7570 ".MIPS.stubs".
7571
75722004-04-05 H.J. Lu <hongjiu.lu@intel.com>
7573
7574 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
7575 reserve the memory for dynamic linker
7576
75772004-04-05 Mark Kettenis <kettenis@gnu.org>
7578
7579 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
7580 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
7581
75822004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7583
7584 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
7585 RELOC_FOR_GLOBAL_SYMBOL.
7586 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
7587
75882004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7589
7590 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7591 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
7592
75932004-04-01 Paul Brook <paul@codesourcery.com>
7594
7595 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
7596 * elf32-arm.h (struct elf32_elf_section_map): New.
7597 (struct _arm_elf_section_data): New.
7598 (elf32_arm_section_data): Define.
7599 (struct elf32_arm_link_hash_table): Add byteswap_code.
7600 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
7601 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
7602 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
7603 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
7604 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
7605 (bfd_elf32_new_section_hook, elf_backend_write_section,
7606 elf_backend_link_output_symbol_hook): Define.
7607
76082004-04-01 Andy Chittenden <achittenden@bluearc.com>
7609
7610 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
7611 that keeps the characters in a B_INCL..B_EINCL range.
7612 (_bfd_link_section_stabs): When computing the sum of the
7613 characters in a B_INCL..B_EINCL range also keep a copy of those
7614 characters. Use this information to distinguish between
7615 include sections that have the same sum and the same length
7616 but which are nevertheless unique.
7617
76182004-03-31 Paul Brook <paul@codesourcery.com>
7619
7620 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
7621 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
7622
76232004-03-31 Andy Chittenden <achittenden@bluearc.com>
7624
7625 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
7626 to 'sum_chars' and add field 'num_chars'.
7627 (_bfd_link_section_stabs): When computing the sum of the
7628 characters in a B_INCL..B_EINCL range also keep a count of the
7629 number of characters. Use this information to help distinguish
7630 between include sections when have the same sum but which
7631 nevertheless are still unique.
7632
76332004-03-31 Mattias Engdegård <mattias@virtutech.se>
7634
7635 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
7636
76372004-03-30 Galit Heller <Galit.Heller@nsc.com>
7638 Tomer Levi <Tomer.Levi@nsc.com>
7639
7640 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
7641 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
7642 (BFD32_BACKENDS): Add elf32-cr16c.lo.
7643 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
7644 (cpu-cr16c.lo): New target.
7645 (elf32-cr16c.lo): Likewise.
7646 * Makefile.in: Regenerate.
7647 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
7648 (bfd_archures_list): Add bfd_cr16c_arch.
7649 * config.bfd: Handle cr16c-*-elf*.
7650 * configure.in: Handle bfd_elf32_cr16c_vec.
7651 * configure: Regenerate.
7652 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
7653 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
7654 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
7655 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
7656 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
7657 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
7658 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
7659 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
7660 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
7661 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
7662 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
7663 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
7664 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
7665 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
7666 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
7667 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
7668 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
7669 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
7670 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
7671 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
7672 * targets.c (bfd_elf32_cr16c_vec): Declare.
7673 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
7674 * cpu-cr16c.c: New file.
7675 * elf32-cr16c.c: Likewise.
7676 * libbfd.h: Regenerate.
7677 * bfd-in2.h: Likewise.
7678
76792004-03-30 Jakub Jelinek <jakub@redhat.com>
7680
7681 * elf.c (map_sections_to_segments): Fix handling of .tbss.
7682
76832004-03-27 Alan Modra <amodra@bigpond.net.au>
7684
7685 * Makefile.am: Remove all mention of elflink.h.
7686 * Makefile.in: Regenerate.
7687 * bfd-in.h (bfd_elf_discard_info): Declare.
7688 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
7689 * bfd-in2.h: Regenerate.
7690 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
7691 bfd_elf32_link_record_dynamic_symbol,
7692 bfd_elf64_link_record_dynamic_symbol,
7693 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
7694 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
7695 _bfd_elf32_link_record_local_dynamic_symbol,
7696 _bfd_elf64_link_record_local_dynamic_symbol,
7697 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
7698 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
7699 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
7700 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
7701 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
7702 _bfd_elf32_reloc_symbol_deleted_p,
7703 _bfd_elf64_reloc_symbol_deleted_p): Delete.
7704 (bfd_elf_link_record_dynamic_symbol,
7705 bfd_elf_link_record_local_dynamic_symbol,
7706 bfd_elf_final_link, bfd_elf_gc_sections,
7707 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
7708 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
7709 bfd_elf_reloc_symbol_deleted_p): Declare.
7710 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
7711 * elf32-arm.h: Update for changed function names. Remove local
7712 WILL_CALL_FINISH_DYNAMIC_SECTION define.
7713 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
7714 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
7715 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
7716 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7717 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
7718 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
7719 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
7720 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
7721 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
7722 (bfd_elfNN_print_symbol): Define.
7723 * elfcode.h: Don't include elflink.h.
7724 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
7725 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
7726 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
7727 elf_gc_record_vtinherit, elf_gc_record_vtentry,
7728 elf_link_record_local_dynamic_symbol): Don't define.
7729 * elflink.c: Update for changed function names. Move elflink.h
7730 code here.
7731 * elflink.h: Delete file.
7732 * po/SRC-POTFILES.in: Regenerate.
7733 * po/bfd.pot: Regenerate.
7734
77352004-03-27 Alan Modra <amodra@bigpond.net.au>
7736
7737 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
7738 "name" for global syms accidentally removed in 2004-03-20 change.
7739
77402004-03-27 Alan Modra <amodra@bigpond.net.au>
7741
7742 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
7743 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
7744 where Elf_External_* is different for 64 and 32 bit, with
7745 corresponding elf_size_info field.
7746 (struct elf_final_link_info): Use "bfd_byte *" instead
7747 of "Elf_External_Sym *" for external_syms and symbuf.
7748 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
7749 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
7750 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
7751 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
7752 (elf_link_sort_cmp2): Adjust.
7753 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
7754 using ELF_R_SYM macro. Set u.sym_mask.
7755 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
7756 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
7757 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
7758 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
7759 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
7760 swap_syn_out functions. Rearrange dyn swap in/out switch.
7761 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
7762 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
7763 (elf_link_flush_output_syms): Add elf_backend_data arg.
7764 (elf_link_check_versioned_symbol): Likewise.
7765 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
7766 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
7767 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
7768 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
7769 ELF_R_TYPE and ELF_R_INFO macros.
7770 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
7771 based on size rather than using ELF_R_INFO.
7772 (elf_gc_mark): Set up r_sym_shift local var and use instead of
7773 ELF_R_SYM macro.
7774 (struct alloc_got_off_arg): New.
7775 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
7776 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
7777 (elf_gc_allocate_got_offsets): Adjust.
7778 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
7779 ELF_R_SYM. Use bfd_section_from_elf_index.
7780 (elf_bfd_discard_info): Set cookie.r_sym_shift.
7781 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
7782 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
7783
77842004-03-26 Stan Shebs <shebs@apple.com>
7785
7786 Remove MPW support, no longer used.
7787 * config.bfd (powerpc-*-mpw*): Remove configuration.
7788 * mpw-config.in, mpw-make.sed: Remove files.
7789 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
7790
77912004-03-26 Alan Modra <amodra@bigpond.net.au>
7792
7793 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
7794 (ppc64_elf_add_symbol_hook): New function.
7795 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
7796 const from Elf_Internal_Sym param.
7797 * elflink.c (elf_link_add_object_symbols): Adjust.
7798 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
7799 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
7800 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
7801 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
7802 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
7803 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
7804 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
7805 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
7806 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
7807 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
7808 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
7809 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
7810 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
7811 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
7812 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
7813 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
7814
78152004-03-26 Alan Modra <amodra@bigpond.net.au>
7816
7817 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
7818 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
7819 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
7820 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
7821 (bfd_elf64_bfd_link_add_symbols): Delete.
7822 (bfd_elf_link_add_symbols): Declare.
7823 * elfcode.h (elf_bfd_link_add_symbols): Delete.
7824 * elflink.c: Include safe-ctype.h.
7825 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
7826 make static.
7827 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
7828 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
7829 static.
7830 (elf_link_add_archive_symbols): Rename from
7831 _bfd_elf_link_add_archive_symbols, make static.
7832 (elf_link_add_object_symbols): New function. Corresponding
7833 elflink.h function converted to use elf_size_info.
7834 (bfd_elf_link_add_symbols): Likewise.
7835 (bfd_elf_size_dynamic_sections): Adjust.
7836 * elflink.h (elf_bfd_link_add_symbols): Delete.
7837 (elf_link_add_object_symbols): Delete.
7838 * elf32-gen.c (elf32_generic_link_add_symbols): Call
7839 bfd_elf_link_add_symbols.
7840 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
7841
78422004-03-25 Alan Modra <amodra@bigpond.net.au>
7843
7844 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
7845 and chained shared libs only if dynsym. Clear dynsym on forced-local.
7846
7847 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
7848 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
7849 (_bfd_elf_add_dt_needed_tag): Declare.
7850 (_bfd_elf_sort_symbol): Declare.
7851 (_bfd_elf_finalize_dynstr): Declare.
7852 (RELOC_FOR_GLOBAL_SYM): Formatting.
7853 * elfcode.h (elf_add_dynamic_entry): Delete.
7854 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
7855 elflink.h function converted to use elf_size_info.
7856 (_bfd_elf_add_dt_needed_tag): Likewise.
7857 (_bfd_elf_sort_symbol): Likewise.
7858 (_bfd_elf_finalize_dynstr): Likewise.
7859 (compute_bucket_count): Likewise.
7860 (bfd_elf_size_dynamic_sections): Likewise. Check result of
7861 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
7862 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
7863 * elflink.h: ..here.
7864 (sort_symbol, add_dt_needed_tag): Delete.
7865 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
7866 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
7867 Update all users.
7868 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
7869 * elf32-cris.c (add_dynamic_entry): Likewise.
7870 * elf32-hppa.c (add_dynamic_entry): Likewise.
7871 * elf32-i370.c (add_dynamic_entry): Likewise.
7872 * elf32-i386.c (add_dynamic_entry): Likewise.
7873 * elf32-m32r.c (add_dynamic_entry): Likewise.
7874 * elf32-m68k.c (add_dynamic_entry): Likewise.
7875 * elf32-ppc.c (add_dynamic_entry): Likewise.
7876 * elf32-s390.c (add_dynamic_entry): Likewise.
7877 * elf32-sh.c (add_dynamic_entry): Likewise.
7878 * elf32-sparc.c (add_dynamic_entry): Likewise.
7879 * elf32-vax.c (add_dynamic_entry): Likewise.
7880 * elf32-xtensa.c (add_dynamic_entry): Likewise.
7881 * elf64-alpha.c (add_dynamic_entry): Likewise.
7882 * elf64-hppa.c (add_dynamic_entry): Likewise.
7883 * elf64-ppc.c (add_dynamic_entry): Likewise.
7884 * elf64-s390.c (add_dynamic_entry): Likewise.
7885 * elf64-sparc.c (add_dynamic_entry): Likewise.
7886 * elf64-x86-64.c (add_dynamic_entry): Likewise.
7887 * elfxx-ia64.c (add_dynamic_entry): Likewise.
7888 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
7889 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
7890 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
7891 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
7892
78932004-03-23 Paul Brook <paul@codesourcery.com>
7894
7895 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
7896
78972004-03-22 Bob Wilson <bob.wilson@acm.org>
7898
7899 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
7900 literal tables and check for relocs outside of literal pools.
7901 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
7902 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
7903 set DF_TEXTREL.
7904 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
7905 (elf_xtensa_relocate_section): Read literal tables and check for
7906 dynamic relocations in read-only sections and not in literal pools.
7907
79082004-03-23 Alan Modra <amodra@bigpond.net.au>
7909
7910 PR 51.
7911 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
7912
79132004-03-22 Hans-Peter Nilsson <hp@axis.com>
7914
7915 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
7916 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
7917 not defined by the executable, or defined in a DSO.
7918 <eliding run-time relocation of .got>: Initialize GOT entry for a
7919 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
7920 executable.
7921 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
7922 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
7923 a PLT reloc to GOT for an executable.
7924 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
7925 .got for a DSO and explain why.
7926 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
7927 and unreferenced symbols for which a PLT is defined. Adjust
7928 dynamic-symbol pruning correspondingly, to make sure we don't lose
7929 a dynamic symbol also defined by a DSO.
7930
79312004-03-22 Alan Modra <amodra@bigpond.net.au>
7932
7933 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
7934 and rel args. Group input and output args. Wrap to 80 columns.
7935 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
7936 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
7937 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
7938 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
7939 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7940 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
7941 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
7942 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
7943 RELOC_FOR_GLOBAL_SYMBOL invocation.
7944
79452004-03-20 H.J. Lu <hongjiu.lu@intel.com>
7946
7947 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
7948 unresolved symbols in objects aren't allowed.
7949
7950 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
7951 unresolved symbols.
7952 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
7953 (elf_hppa_unmark_useless_dynamic_symbols):
7954 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7955 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
7956 (elf32_hppa_relocate_section): Likewise.
7957 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7958 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7959 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7960 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
7961 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7962
7963 * elf-m10200.c (mn10200_elf_relocate_section): Use
7964 RELOC_FOR_GLOBAL_SYMBOL.
7965 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7966 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
7967 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7968 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7969 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7970 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
7971 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7972 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
7973 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7974 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7975 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7976 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
7977
79782004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7979
7980 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
7981 (final_link_relocate): Likewise.
7982 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
7983 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
7984
79852004-03-19 Alan Modra <amodra@bigpond.net.au>
7986
7987 * Makefile.am: Run "make dep-am".
7988 * Makefile.in: Regenerate.
7989 * aclocal.m4: Regenerate.
7990 * config.in: Regenerate.
7991 * po/bfd.pot: Regenerate.
7992
79932004-03-19 Alan Modra <amodra@bigpond.net.au>
7994 H.J. Lu <hongjiu.lu@intel.com>
7995
7996 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
7997 type and size change code to where it was previously. Remove
7998 dt_needed param. Treat old weak syms as strong if new sym is
7999 from a shared lib, even when old sym is from another shared
8000 lib. Remove unnecessary tests of oldweak and newweak. Correct
8001 comments.
8002 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
8003 _bfd_elf_merge_symbol calls.
8004 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
8005 dt_needed local var. Update comments.
8006 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
8007 (_bfd_elf_add_default_symbol): Likewise.
8008
8009 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
8010 strong syms in one shared object overriding weak syms in another.
8011
80122004-03-18 Alan Modra <amodra@bigpond.net.au>
8013
8014 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
8015 dyn_lib_class field. Rearrange for better packing.
8016 (elf_dt_soname): Delete.
8017 (elf_dyn_lib_class): Define.
8018 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
8019 (bfd_elf_set_dt_needed_soname): Delete.
8020 (bfd_elf_set_dyn_lib_class): New function.
8021 * elflink.h (add_dt_needed_tag): New function. Split out from..
8022 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
8023 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
8024 initialization of soname.
8025 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
8026 elf_dt_soname.
8027 * bfd-in.h (enum dynamic_lib_link_class): New.
8028 (bfd_elf_set_dt_needed_soname): Delete.
8029 (bfd_elf_set_dyn_lib_class): Declare.
8030 * bfd-in2.h: Regenerate.
8031
8032 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
8033 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
8034 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
8035 symbol loop. Instead use add_needed to flag tag as written.
8036
80372004-03-17 Nathan Sidwell <nathan@codesourcery.com>
8038
8039 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
8040 logic for null_input_bfd detection.
8041
80422004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8043
8044 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
8045
80462004-03-16 Mark Kettenis <kettenis@gnu.org>
8047
8048 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
8049 code.
8050
80512004-03-16 Alan Modra <amodra@bigpond.net.au>
8052
8053 * elflink.c (elf_link_read_relocs_from_section): Don't use
8054 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
8055 (_bfd_elf_link_read_relocs): ..to here.
8056 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
8057
80582004-03-16 Alan Modra <amodra@bigpond.net.au>
8059
8060 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
8061 values selected in configure.host. Require both to be defined
8062 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
8063 corresponding BFD_HOST vars with quotes.
8064 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
8065 Always require BFD_HOST_64_BIT_DEFINED.
8066 <file_ptr type>: Find off_t size before emitting message. Combine
8067 off_t and ftello64 conditional.
8068 * configure: Regenerate.
8069
80702004-03-16 Alan Modra <amodra@bigpond.net.au>
8071
8072 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
8073 aliasing warning. Remove trailing whitespace throughout file.
8074
80752004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
8076
8077 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
8078 input_section in calls to get_dyn_name.
8079 * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *". Use section id of first section in input BFD to build dynamic name for
8080 local symbols.
8081 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
8082
80832004-03-15 Alan Modra <amodra@bigpond.net.au>
8084
8085 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
8086 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
8087 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
8088 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
8089 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
8090 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
8091 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
8092 when using long.
8093 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
8094 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
8095 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8096 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
8097 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
8098 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
8099 (read_8_bytes, read_indirect_string, read_address): Likewise.
8100 (read_abbrevs, parse_comp_unit): Likewise.
8101 * targets.c (struct bfd_target): Likewise.
8102 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
8103 * hppabsd-core.c: Likewise. Formatting.
8104 * hpux-core.c: Likewise.
8105 * irix-core.c: Likewise.
8106 * netbsd-core.c: Likewise.
8107 * osf-core.c: Likewise.
8108 * ptrace-core.c: Likewise.
8109 * sco5-core.c: Likewise.
8110 * trad-core.c: Likewise.
8111 * configure: Regenerate.
8112 * bfd-in2.h: Regenerate.
8113
81142004-03-15 Alan Modra <amodra@bigpond.net.au>
8115
8116 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
8117 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
8118 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
8119 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
8120 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
8121 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
8122 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
8123 * libbfd.c: Likewise in function definitions.
8124 (bfd_put_8): Mask with 0xff rather than casting to char.
8125 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
8126 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
8127 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
8128 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
8129 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
8130 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
8131 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
8132 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
8133 (H_GET_64, H_GET_32, H_GET_16): Likewise.
8134 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
8135 * archive.c (do_slurp_coff_armap): Update swap prototype.
8136 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
8137 (tic54x_getl_signed_32): Likewise.
8138 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
8139 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
8140 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
8141 (bfd_getp_signed_32, bfd_putp32): Likewise.
8142 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
8143 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
8144 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
8145 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
8146 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
8147 bfd_h_getx_signed_16, bfd_h_putx16.
8148 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
8149 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
8150 * hpux-core.c: Likewise.
8151 * irix-core.c: Likewise.
8152 * netbsd-core.c: Likewise.
8153 * osf-core.c: Likewise.
8154 * ptrace-core.c: Likewise.
8155 * sco5-core.c: Likewise.
8156 * trad-core.c: Likewise.
8157 * bfd-in2.h: Regenerate.
8158
81592004-03-15 Matt Thomas <matt@3am-software.com>
8160
8161 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
8162 selected.
8163
81642004-03-13 Mark Kettenis <kettenis@gnu.org>
8165
8166 * config.bfd: Add x86_64-*-openbsd*.
8167 * configure.in (x86_64-*-openbsd*): Set COREFILE to
8168 netbsd-core.lo.
8169 * configure: Regenerate.
8170
81712004-03-12 Nick Clifton <nickc@redhat.com>
8172 Dave Murphy <wintermute2k4@ntlworld.com>
8173
8174 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
8175 if the input bfd does not contain any code.
8176
81772004-03-09 Steve Ellcey <sje@cup.hp.com>
8178
8179 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
8180
81812004-03-05 Fred Fish <fnf@redhat.com>
8182
8183 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
8184 mips16 symbols to be even rather than testing first for even/odd.
8185 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
8186
81872004-03-05 Nathan Sidwell <nathan@codesourcery.com>
8188
8189 * elf.c (map_sections_to_segments): Ignore .tbss sections for
8190 layout purposes.
8191
81922004-03-03 Alexandre Oliva <aoliva@redhat.com>
8193
8194 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
8195 undefined symbols as hash_new.
8196
81972003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
8198
8199 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
8200 * cpu-sh.c: Ditto.
8201 * elf32-sh.c: Ditto.
8202 * bfd-in2.h: Regenerate.
8203
82042004-03-02 Alexandre Oliva <aoliva@redhat.com>
8205
8206 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
8207 dynrelocs.
8208 (_frv_count_got_plt_entries): Initialize them.
8209 (frv_pic_relocs_info_find): Add insert argument. Adjust all
8210 callers.
8211 (frv_pic_relocs_info_for_global): Likewise.
8212 (frv_pic_relocs_info_for_local): Likewise.
8213 (frv_pic_merge_early_relocs_info): New.
8214 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
8215 another.
8216 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
8217 Check that we don't exceed the allocated count for entry.
8218 (_frv_add_rofixup): Likewise.
8219 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
8220 (elf32_frv_finish_dynamic_sections): Improve error message in case
8221 we emit too few rofixup entries.
8222
82232004-03-01 Richard Sandiford <rsandifo@redhat.com>
8224
8225 * archures.c (bfd_mach_fr450): New.
8226 * bfd-in2.h: Regenerate.
8227 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
8228 (arch_info_500): Link to it.
8229 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
8230 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
8231 (frv_elf_arch_extension_p): New function.
8232 (frv_elf_merge_private_bfd_data): Use it.
8233
82342004-02-28 H.J. Lu <hongjiu.lu@intel.com>
8235
8236 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
8237
8238 * elflink.h (is_global_data_symbol_definition): Moved to
8239 elflink.c.
8240 (elf_link_is_defined_archive_symbol): Likewise.
8241 (elf_link_add_archive_symbols): Likewise. Renamed to
8242 _bfd_elf_link_add_archive_symbols.
8243
8244 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
8245 of ELF symbol table entry from backend.
8246 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
8247 instead of elf_link_add_object_symbols.
8248
82492004-02-27 Alexandre Oliva <aoliva@redhat.com>
8250
8251 * elf-bfd.h (struct elf_backend_data): Added
8252 elf_backend_can_make_relative_eh_frame,
8253 elf_backend_can_make_lsda_relative_eh_frame and
8254 elf_backend_encode_eh_address.
8255 (_bfd_elf_encode_eh_address): Declare.
8256 (_bfd_elf_can_make_relative): Declare.
8257 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
8258 hooks to decide whether to attempt to make_relative and
8259 make_lsda_relative.
8260 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
8261 (_bfd_elf_can_make_relative): New.
8262 (_bfd_elf_encode_eh_address): New.
8263 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
8264 (frv_elf_encode_eh_address): New.
8265 (elf_backend_can_make_relative_eh_frame): Define.
8266 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8267 (elf_backend_encode_eh_address): Define.
8268 * elfxx-target.h
8269 (elf_backend_can_make_relative_eh_frame): Define.
8270 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8271 (elf_backend_encode_eh_address): Define.
8272 (elfNN_bed): Add them.
8273
82742004-02-27 Alexandre Oliva <aoliva@redhat.com>
8275
8276 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
8277 complain_on_overflow to signed.
8278
82792004-02-27 H.J. Lu <hongjiu.lu@intel.com>
8280
8281 * elflink.h (sort_symbol): New.
8282 (elf_link_add_object_symbols): Use a sorted symbol array for
8283 weakdef.
8284
82852004-02-27 Jakub Jelinek <jakub@redhat.com>
8286
8287 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8288 for pc relative relocs.
8289 (elf_s390_relocate_section): Likewise.
8290 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8291 for pc relative relocs.
8292 (elf_s390_relocate_section): Likewise.
8293
82942004-02-26 H.J. Lu <hongjiu.lu@intel.com>
8295
8296 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
8297 count_dyn_reloc.
8298
82992004-02-25 H.J. Lu <hongjiu.lu@intel.com>
8300
8301 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
8302 field to track if a relocation is against readonly section.
8303 (count_dyn_reloc): Take a new argument for rent->reltext.
8304 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
8305 (get_reloc_section): Don't set ia64_info->reltext here.
8306 (allocate_dynrel_entries): Set ia64_info->reltext here.
8307
83082004-02-24 Alexandre Oliva <aoliva@redhat.com>
8309
8310 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
8311 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
8312 function's descriptor to symbol+offset, and map local undefweak
8313 symbol to NULL function descriptor.
8314 (elf32_frv_relocate_section): Likewise.
8315
83162004-02-23 Mark Kettenis <kettenis@gnu.org>
8317
8318 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
8319 M_X86_64_NETBSD.
8320 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
8321 (netbsd_core_file_p): Set architecture from machine ID for
8322 selected machines.
8323
83242004-02-23 Jakub Jelinek <jakub@redhat.com>
8325
8326 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
8327 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
8328
83292004-02-21 H.J. Lu <hongjiu.lu@intel.com>
8330
8331 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
8332 symbols with non-default visibility.
8333
83342004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
8335
8336 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
8337 IMAGE_SCN_MEM_WRITE on known sections only.
8338
83392004-02-20 Jakub Jelinek <jakub@redhat.com>
8340
8341 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
8342 symbols used in PIE relocs.
8343
83442004-02-19 Jakub Jelinek <jakub@redhat.com>
8345
8346 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
8347 .plt sh_entsize.
8348
83492004-02-18 Daniel Jacobowitz <drow@mvista.com>
8350
8351 * configure.in: Update version to 2.15.90.
8352 * configure: Regenerate.
8353
83542004-02-17 Daniel Jacobowitz <drow@mvista.com>
8355 Richard Sandiford <rsandifo@redhat.com>
8356
8357 * elfxx-mips.c (mips_elf_calculate_relocation): Use
8358 _bfd_elf_symbol_refs_local_p to decide whether to decay
8359 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
8360 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
8361 relocs if the symbol wasn't defined by a regular object file.
8362 Don't check the symbol's dynindx.
8363
83642004-02-16 Andrew Cagney <cagney@redhat.com>
8365
8366 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
8367 @bfd_file_ptr@.
8368 * bfd-in2.h: Re-generate.
8369
83702004-02-14 Andrew Cagney <cagney@redhat.com>
8371
8372 * configure.host (HDEFINES): When hppa*-*-hpux*, define
8373 _LARGEFILE64_SOURCE.
8374
83752004-02-13 Andrew Cagney <cagney@redhat.com>
8376
8377 * elf.c (vma_page_aligned_bias): New function.
8378 (assign_file_positions_except_relocs)
8379 (assign_file_positions_for_segments): Replace broken modulo
8380 arithmetic with call to vma_page_aligned_bias.
8381
83822004-02-11 Andrew Cagney <cagney@redhat.com>
8383
8384 * bfd-in.h: Update copyright.
8385 (bfd_tell): Change return type to file_ptr.
8386 * bfd-in2.h: Re-generate.
8387 * cache.c: Update copyright.
8388 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
8389 parameter.
8390 (close_one): Use real_ftell.
8391 * bfdio.c: Update copyright.
8392 (real_ftell, real_fseek): New functions.
8393 (bfd_tell): Use real_fseek and real_ftell, change return type to
8394 file_ptr.
8395 (bfd_seek): Use real_ftell and real_fseek, change type of
8396 file_position to a file_ptr.
8397 * libbfd-in.h: Update copyright.
8398 (real_ftell, real_fseek): Declare.
8399 * libbfd.h: Re-generate.
8400
8401 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
8402 fseeko and fseeko64. Determine bfd_file_ptr.
8403 * configure: Re-generate.
8404 * config.in: Re-generate.
8405
84062004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
8407
8408 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
8409 * elf32-h8300.c: Likewise.
8410
84112004-02-09 Christian Vogel <vogelchr@vogel.cx>
8412 Nick Clifton <nickc@redhat.com>
8413
8414 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
8415 GOT entries with no associated GOT subsection.
8416
84172004-02-09 Richard Sandiford <rsandifo@redhat.com>
8418
8419 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
8420 * elf.c (swap_out_syms): Use it to decide whether local section
8421 symbols should be named.
8422 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
8423 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
8424 (elf_backend_name_local_section_symbols): Define.
8425 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
8426
84272004-01-30 H.J. Lu <hongjiu.lu@intel.com>
8428
8429 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
8430 (elfNN_ia64_relax_section): Optimize brl to br during the relax
8431 finalize pass.
8432
84332004-01-30 Alexandre Oliva <aoliva@redhat.com>
8434
8435 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
8436 to bfd_link_hash_entry passed by reference to
8437 _bfd_generic_link_add_one_symbol.
8438
84392004-01-25 H.J. Lu <hongjiu.lu@intel.com>
8440
8441 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
8442 relocations against dynamic symbols.
8443
84442004-01-23 Daniel Jacobowitz <drow@mvista.com>
8445
8446 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
8447 change.
8448
84492004-01-21 Tom Rix <tcrix@worldnet.att.net>
8450
8451 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
8452 * bfd-in2.h, libbfd.h: Rebuilt.
8453
84542004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
8455
8456 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
8457 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
8458 flag has been cleared.
8459
84602004-01-19 Kazu Hirata <kazu@cs.umass.edu>
8461
8462 * coff-h8300.c: Add and adjust comments about relaxation.
8463 * elf32-h8300.c: Likewise.
8464
84652004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8466
8467 * coff-h8300.c: Fix comment typos.
8468 * elf32-h8300.c: Likewise.
8469
84702004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8471
8472 * coff-h8300.c: Add comments about relaxation.
8473 * elf32-h8300.c: Likewise.
8474
84752004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8476
8477 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
8478 throughout.
8479 * aclocal.m4: Regenerate.
8480 * configure: Regenerate.
8481
84822004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
8483
8484 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
8485 mips_elf64_rtype_to_howto instead of using howto_table.
8486
84872004-01-13 Daniel Jacobowitz <drow@mvista.com>
8488
8489 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
8490 the .plt section.
8491 (elf32_arm_check_relocs): Don't increment the PLT refcount for
8492 relocs which would not use the PLT.
8493
84942004-01-13 Alan Modra <amodra@bigpond.net.au>
8495
8496 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
8497 (ppc64_elf_gc_sweep_hook): Likewise.
8498 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
8499
85002004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
8501
8502 Adds linker relaxation support for bit manipulation insns like
8503 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
8504 bst, btst, bxor.
8505 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
8506 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
8507 * coff-h8300.c: Opcode for bit manipulation insn is checked in
8508 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
8509
85102004-01-12 Alan Modra <amodra@bigpond.net.au>
8511
8512 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
8513
85142004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8515
8516 * elf32-h8300.c: Fix formatting.
8517
85182004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8519
8520 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
8521 dynamic object is present. Declare r_symndx and h in an inner
8522 scope.
8523 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
8524
85252004-01-09 Daniel Jacobowitz <drow@mvista.com>
8526
8527 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
8528 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
8529 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
8530 identically. Do not emit PC24 relocations for shared libraries.
8531 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
8532 identically. Don't adjust pc_count.
8533 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
8534 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
8535 adjust count for branch relocations.
8536 (allocate_dynrelocs): Correct typo in call to
8537 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
8538 PC24 or PLT32 relocs when linking.
8539
85402004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8541
8542 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
8543 relocation howto with ARM_26 one for consistency.
8544 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
8545 that will be converted to ARM_26D ones, since we always want 'done'
8546 relocations to be reflected in section's data.
8547 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
8548 offset.
8549 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
8550 requested.
8551
85522004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8553
8554 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
8555 are not partial_inplace during a relocatable link.
8556
85572004-01-08 Kazu Hirata <kazu@cs.umass.edu>
8558
8559 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
8560 if no dynamic object is present. Declare r_symndx and h in an
8561 inner scope.
8562
85632004-01-07 H.J. Lu <hongjiu.lu@intel.com>
8564
8565 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
8566 trampoline if it is known out of range.
8567
85682004-01-06 Alexandre Oliva <aoliva@redhat.com>
8569
8570 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
8571 * elf32-frv.c (_frv_osec_readonly_p): New.
8572 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
8573 undefweak symbol.
8574 (_frv_count_got_plt_entries): Adjust expected count accordingly.
8575 (elf32_frv_relocate_section): Likewise. Error out if attempting
8576 to emit rofixups or dynamic relocs in read-only segments. Use
8577 _bfd_elf_section_offset to adjust r_offsets in rofixups and
8578 dynamic relocations.
8579 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
8580 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
8581 relocations or fixups involving merged sections correctly. Avoid
8582 crash when undefined symbol is referenced by R_FRV_32 or
8583 R_FRV_FUNCDESC_VALUE.
8584 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
8585 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
8586 input section holding local symbol to addend of R_FRV_32 or
8587 R_FRV_FUNCDESC_VALUE dynamic relocation.
8588 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
8589 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
8590 (elf32_frv_always_size_sections): Don't store pointer to
8591 __stacksize symbol in sec_info.
8592 (elf32_frv_modify_segment_map): Look it up here.
8593 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
8594 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
8595 of the lazy PLT entry, not only its offset, as the low word of a
8596 function descriptor.
8597 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
8598 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
8599 if a hash table entry already exists but is not a definition.
8600 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
8601 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
8602 (_frv_add_rofixup): Don't inline.
8603 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
8604 for undefweak symbols.
8605 (elf32_frv_relocate_section): Avoid crash while computing
8606 relocation when linking with shared library. Only emit rofixups
8607 and dynamic relocations for alloc&load sections. Mark binaries
8608 with inter-segment relocations for relocation as a unit.
8609 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
8610 (DEFAULT_STACK_SIZE): New.
8611 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
8612 emit rofixups or dynamic relocs when linking dynamic non-PIE
8613 executables.
8614 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
8615 shared libs too. Reserve the last entry for the GOT pointer.
8616 (elf32_frv_finish_dynamic_sections): Emit it.
8617 (elf32_frv_always_size_sections): New.
8618 (elf32_frv_modify_segment_map): New.
8619 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
8620 sections.
8621 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
8622 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
8623 (elf_backend_always_size_sections): New.
8624 (elf_backend_modify_segment_map): New.
8625 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
8626 * config.bfd: Added frv-*-*linux*.
8627 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
8628 ABS section, instead of crashing.
8629 (elf32_frv_relocate_section): Don't crash before warning about
8630 different segments in non-PIC relocation.
8631 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
8632 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
8633 relocs to undefweak symbols.
8634 (elf32_frv_relocate_section): Ditto for undefined symbols.
8635 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
8636 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
8637 gotfixup section was created.
8638 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
8639 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
8640 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
8641 complain_overflow_signed.
8642 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
8643 have not been allocated.
8644 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
8645 privfd only if dynamic sections were created.
8646 (elf32_frv_relocate_section): Compute gprel_segment, and use it
8647 for GPREL relocs. When linking relocatable FDPIC executables,
8648 emit warnings for relocations that would be illegal on PIE or
8649 shared libraries. Emit rofixup for R_FRV_32 only if input object
8650 is not FDPIC.
8651 (_frv_create_got_section): Define _gp symbol in the rofixup
8652 section.
8653 (elf32_frv_finish_dynamic_sections): If rofixups needed but
8654 dynamic sections missing, error out requesting -melf32frvfd.
8655 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
8656 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
8657 computation of addends from section and global or local symbol
8658 value. Change return type to bfd_boolean, and return a failure if
8659 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
8660 nonzero addend is required.
8661 (elf32_frv_relocate_section): Likewise. Print error for
8662 unsupported nonzero addends.
8663 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
8664 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
8665 force everything local.
8666 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
8667 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
8668 (frv_gotfixup_section): New.
8669 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
8670 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
8671 and relocsfdv.
8672 (_frv_add_rofixup): New.
8673 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
8674 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
8675 improve some ugly conditions.
8676 (elf32_frv_relocate_section): Likewise. Reject inter-segment
8677 relocations in fdpic.
8678 (_frv_create_got_section): Create .rofixup.got section.
8679 (struct _frv_dynamic_got_info): Added fixups.
8680 (_frv_count_got_plt_entries): Account in-GOT relocations into
8681 relocs32, relocsfd and relocsfdv. Account them into relocs or
8682 fixups, as appropriate.
8683 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
8684 sizing of gotrel.
8685 (elf32_frv_finish_dynamic_sections): Verify that the right number
8686 of relocations and fixups was generated.
8687 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
8688 relocsfdv.
8689 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
8690 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
8691 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
8692 descriptor of a (formerly-)global symbol is local.
8693 (struct frv_pic_relocs_info): Adjust comments.
8694 (_frv_emit_got_relocs_plt_entries): Adjust.
8695 (elf32_frv_relocate_section): Likewise.
8696 (_frv_count_got_plt_entries): Likewise.
8697 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
8698 symbol's value to addend in the common preamble. Decay dynamic
8699 symbols to section+offset if they bind or call locally, for GOT
8700 and FUNCDESC_VALUE, respectively.
8701 (elf32_frv_relocate_section): Likewise.
8702 (elf32_frv_check_relocs): Don't register as dynamic symbols of
8703 internal or hidden visibility.
8704 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
8705 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
8706 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
8707 (elf32_frv_relocate_section): Pass relocation addend in. Use
8708 original relocation addend to look up the got relocs/plt entries
8709 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
8710 processing relocations that reference .scommon symbols.
8711 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
8712 Introduce support for dynamic linking.
8713 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
8714 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
8715 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
8716 (frv_reloc_type_lookup): Return REL howtos for executables and
8717 dynamic libraries.
8718 (frv_info_to_howto_rel): New.
8719 (struct frv_elf_link_hash_table): New.
8720 (frv_hash_table, frv_got_section, frv_gotrel_section,
8721 frv_plt_section, frv_pltrel_section, frv_relocs_info,
8722 frv_got_initial_offset, frv_plt_initial_offset): New macros.
8723 (frv_elf_link_hash_table_create): New.
8724 (struct frv_pic_relocs_info): New.
8725 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
8726 (frv_pic_relocs_info_find): New.
8727 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
8728 New.
8729 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
8730 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
8731 (_frv_emit_got_relocs_plt_entries): New.
8732 (elf32_frv_relocate_section): Add support for dynamic linking.
8733 Handle new relocations.
8734 (_frv_create_got_section): New.
8735 (elf32_frv_create_dynamic_sections): New.
8736 (ELF_DYNAMIC_INTERPRETER): New.
8737 (struct _frv_dynamic_got_info): New.
8738 (_frv_count_got_plt_entries): New.
8739 (struct _frv_dynamic_got_plt_info): New.
8740 (_frv_compute_got_alloc_data): New.
8741 (_frv_get_got_entry, _frv_get_fd_entry): New.
8742 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
8743 (_frv_resolve_final_relocs_info): New.
8744 (elf32_frv_size_dynamic_sections): New.
8745 (elf32_frv_finish_dynamic_sections): New.
8746 (elf32_frv_adjust_dynamic_symbol): New.
8747 (elf32_frv_finish_dynamic_symbol): New.
8748 (elf32_frv_check_relocs): Handle new relocs. Explain how the
8749 whole thing works.
8750 (elf_info_to_howto_rel): Define.
8751 (bfd_elf32_bfd_link_hash_table_create): Define.
8752 (elf_backend_create_dynamic_sections): Define.
8753 (elf_backend_adjust_dynamic_symbol): Define.
8754 (elf_backend_size_dynamic_sections): Define.
8755 (elf_backend_finish_dynamic_symbol): Define.
8756 (elf_backend_finish_dynamic_sections): Define.
8757 (elf_backend_want_got_sym): Define.
8758 (elf_backend_got_header_size): Define.
8759 (elf_backend_want_got_plt): Define.
8760 (elf_backend_plt_readonly): Define.
8761 (elf_backend_want_plt_sym): Define.
8762 (elf_backend_plt_header_size): Define.
8763 (elf_backend_may_use_rel_p): Define.
8764 (elf_backend_may_use_rela_p): Define.
8765 (elf_backend_default_use_rela_p): Define.
8766 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
8767 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
8768 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
8769 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
8770 (frv_reloc_map): Map the corresponding BFD relocs to them.
8771 (frv_reloc_type_lookup): ... and back to BFD relocs.
8772 * reloc.c: New relocs.
8773 * bfd-in2.h, libbfd.h: Rebuilt.
8774 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
8775 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
8776 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
8777 R_FRV_FUNCDESC_GOTLO): New.
8778 (frv_reloc_map): Map the corresponding BFD relocs to them.
8779 (frv_reloc_type_lookup): ... and back to BFD relocs.
8780 * reloc.c: New relocs.
8781 * bfd-in2.h, libbfd.h: Rebuilt.
8782
87832004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8784
8785 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8786 targets to support pages of up to 64kB.
8787 (elf32_bed): Redefine to get a separate backend data structure for
8788 traditional targets.
8789 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8790 targets to support pages of up to 64kB.
8791 (elf64_bed): Redefine to get a separate backend data structure for
8792 traditional targets.
8793 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8794 targets to support pages of up to 64kB.
8795 (elf32_bed): Redefine to get a separate backend data structure for
8796 traditional targets.
8797
87982004-01-04 Mark Kettenis <kettenis@gnu.org>
8799
8800 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
8801
88022004-01-02 Mark Kettenis <kettenis@gnu.org>
8803
8804 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
8805 (elf_i386_grok_psinfo): Likewise.
8806
88072004-01-02 Bernardo Innocenti <bernie@develer.com>
8808
8809 * config.bfd: Add m68k-uClinux target.
8810
88112004-01-01 Grant Edwards <grante@visi.com>
8812
8813 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
8814 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
8815 (elf32_h8_gc_sweep_hook): New function.
8816 (elf_backend_gc_mark_hook): Define.
8817 (elf_backend_gc_sweep_hook): Define.
8818 (elf_backend_can_gc_sections): Define.
8819
8820For older changes see ChangeLog-0203
8821\f
8822Local Variables:
8823mode: change-log
8824left-margin: 8
8825fill-column: 74
8826version-control: never
8827End:
This page took 0.131305 seconds and 4 git commands to generate.