(elf32_arm_size_dynamic_sections): Fix a typo and touchup logic like i386/ppc.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
8532796c
NC
12005-07-05 Peter S. Mazinger <ps.m@gmx.net>
2
3 * elf32-arm.c (elf32_arm_size_dynamic_sections): Fix a typo and
4 touchup logic like i386/ppc.
5
b35d266b
AM
62005-07-05 Alan Modra <amodra@bigpond.net.au>
7
8 * elf.c (special_sections): Move const qualifier.
9 (special_sections_b..special_sections_t): Likewise.
10 * elf32-arm.c (elf32_arm_symbian_get_sec_type_attr): Remove duplicate
11 const.
12 (elf32_arm_symbian_special_sections): Move const qualifier.
13 * elf32-m32r.c: Similarly.
14 * elf32-m68hc11.c: Similarly.
15 * elf32-m68hc12.c: Similarly.
16 * elf32-mcore.c: Similarly.
17 * elf32-ppc.c: Similarly.
18 * elf32-sh64.c: Similarly.
19 * elf32-v850.c: Similarly.
20 * elf32-xtensa.c: Similarly.
21 * elf64-alpha.c: Similarly.
22 * elf64-hppa.c: Similarly.
23 * elf64-ppc.c: Similarly.
24 * elf64-sh64.c: Similarly.
25 * elfxx-ia64.c: Similarly.
26 * elfxx-mips.c: Similarly.
27
80447b21
NC
282005-07-04 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
29
30 * elf32-m32r.c (m32r_elf_size_dynamic_sections): Use
31 info->executable instead of !info->shared where appropriate.
32
540b09cb
AM
332005-07-04 Alan Modra <amodra@bigpond.net.au>
34
35 PR 1042
36 * elf.c (assign_file_positions_for_segments): Remove excluded
37 sections from the segment map.
38
551b43fd
AM
392005-07-04 Alan Modra <amodra@bigpond.net.au>
40
41 PR 1004
42 * elf-bfd.h (struct elf_backend_data): Add get_sec_type_attr. Delete
43 special_sections.
44 (_bfd_elf_get_special_section): Declare.
45 (bfd_elf_special_section): Update prototype.
46 * elf.c (special_sections): Remove unused outer entries.
47 (get_special_section): Delete.
48 (_bfd_elf_get_special_section): New function.
49 (_bfd_elf_get_sec_type_attr): Replace "name" arg with "sec". Update
50 special_sections indexing.
51 (_bfd_elf_new_section_hook): Call backend get_sec_type_attr.
52 * elf32-arm.c (symbian_special_sections_d): Delete.
53 (symbian_special_sections_g, symbian_special_sections_h): Delete.
54 (symbian_special_sections_i, symbian_special_sections_f): Delete.
55 (symbian_special_sections_p): Delete.
56 (elf32_arm_symbian_special_sections): Merge above to here.
57 (elf32_arm_symbian_get_sec_type_attr): New function.
58 (elf_backend_special_sections): Don't define.
59 (elf_backend_get_sec_type_attr): Define.
60 * elf32-m32r.c: Similarly to elf32-arm.c.
61 * elf32-m68hc11.c: Likewise.
62 * elf32-m68hc12.c: Likewise.
63 * elf32-mcore.c: Likewise.
64 * elf32-sh64.c: Likewise.
65 * elf32-v850.c: Likewise.
66 * elf32-xtensa.c: Likewise.
67 * elf64-alpha.c: Likewise.
68 * elf64-hppa.c: Likewise.
69 * elf64-ppc.c: Likewise.
70 * elf64-sh64.c: Likewise.
71 * elfxx-ia64.c: Likewise.
72 * elfxx-mips.c: Likewise.
73 * elf32-ppc.c: Likewise.
74 (bfd_elf_special_section ppc_alt_plt): New. Use it if .plt loadable.
75 * elfxx-mips.h (_bfd_mips_elf_get_sec_type_attr): Declare.
76 (_bfd_mips_elf_special_sections, elf_backend_special_sections): Delete.
77 (elf_backend_get_sec_type_attr): Define.
78 * elfxx-target.h (elf_backend_get_sec_type_attr): Define.
79 (elf_backend_special_sections): Don't define.
80 (elfNN_bed): Update.
81
47b0e7ad
NC
822005-07-01 Nick Clifton <nickc@redhat.com>
83
84 * cpu-d10v.c: Update to ISO C90 style function declarations and
85 fix formatting.
86 * cpu-d30v.c: Likewsie.
87 * cpu-i370.c: Likewsie.
88 * cpu-xstormy16.c: Likewsie.
89 * elf32-arc.c: Likewsie.
90 * elf32-d10v.c: Likewsie.
91 * elf32-d30v.c: Likewsie.
92 * elf32-dlx.c: Likewsie.
93 * elf32-i370.c: Likewsie.
94 * elf32-i960.c: Likewsie.
95 * elf32-ip2k.c: Likewsie.
96 * elf32-m32r.c: Likewsie.
97 * elf32-mcore.c: Likewsie.
98 * elf32-openrisc.c: Likewsie.
99 * elf32-or32.c: Likewsie.
100 * elf32-pj.c: Likewsie.
101 * elf32-v850.c: Likewsie.
102 * elf32-xstormy16.c: Likewsie.
103
85d162e6
AM
1042005-07-01 Alan Modra <amodra@bigpond.net.au>
105
106 * elf64-alpha.c (elf64_alpha_create_got_section): Always create
107 a new .got section.
108 (elf64_alpha_create_dynamic_sections): Always make new sections
109 by using bfd_make_section_anyway_with_flags. Check that .got not
110 already created.
111 (elf64_alpha_check_relocs): Delete "got_created". Use tdata->gotobj
112 instead.
113
b116d4a7
AM
1142005-06-30 Alan Modra <amodra@bigpond.net.au>
115
116 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Ignore dynamic
117 _SDA_BASE_ and _SDA2_BASE_ symbols.
118 * elflink.c (_bfd_elf_provide_symbol): Correct comment. Define
119 sym if not def_regular.
120 (_bfd_elf_provide_section_bound_symbols): Similarly.
121
7f41b278
BE
1222005-06-30 Ben Elliston <bje@gnu.org>
123
124 * config.bfd: Mark as obsolete:
125 m68*-apollo-*
126 m68*-apple-aux*
127 m68*-bull-sysv*
128
39c2f51b
AM
1292005-06-29 Alan Modra <amodra@bigpond.net.au>
130
131 * elflink.c (_bfd_elf_gc_mark): Mark sections referenced by
132 .eh_frame specially..
133 (bfd_elf_gc_sections): ..rather than totally ignoring .eh_frame.
134 Don't recheck sections we have already marked.
135 (elf_gc_sweep): Keep non-code sections referenced from .eh_frame.
136 * section.c (struct bfd_section): Add gc_mark_from_eh.
137 (STD_SECTION): Adjust.
138 * ecoff.c (bfd_debug_section): Adjust.
139 * bfd-in2.h: Regenerate.
140
e8aaee2a
AM
1412005-06-29 Alan Modra <amodra@bigpond.net.au>
142
143 * elflink.c (elf_gc_sweep): Do not refcount on sections that have
144 not been processed by check_relocs.
145
3b2175db
PB
1462005-06-29 Paul Brook <paul@codesourcery.com>
147
148 * bfd-in.h (_bfd_elf_provide_symbol): Update prototype.
149 * bfd-in2.h: Regenerate.
150 * elf32-ppc.c (ppc_elf_set_sdata_syms): Make sdata symbols section
151 relative.
152 * elflink.c (bfd_elf_set_symbol): Add section argument.
153 (_bfd_elf_provide_symbol): Ditto.
154 (_bfd_elf_provide_section_bound_symbols): Pass NULL section argument.
155
a63e02c7
DA
1562005-06-27 Carlos O'Donell <carlos@systemhalted.org>
157
158 * bfd/elf32-hppa.c (struct elf32_hppa_stub_hash_entry):
159 Use bh_root, and hh.
160 (struct elf32_hppa_link_hash_entry): Use eh, and hsh_cache.
161 (struct elf32_hppa_dyn_reloc_entry): Use hdh_next.
162 (struct elf32_hppa_link_hash_table): Use etab and bstab.
163 (stub_hash_newfunc): Use hh.
164 (hppa_link_hash_newfunc): Use hsh_cache.
165 (elf32_hppa_link_hash_table_create): Use etab, and bstab.
166 (elf32_hppa_link_hash_table_free): Use bstab.
167 (hppa_stub_name): Use eh.
168 (hppa_get_stub_entry): Use hh, hsh_entry, and hsh_cache.
169 (hppa_add_stub): Use bstab.
170 (hppa_type_of_stub): Use eh.
171 (hppa_build_one_stub): Use hh and bh_root.
172 (elf32_hppa_copy_indirect_symbol): Use hdh_next.
173 (elf32_hppa_check_relocs): Use eh, etab, and hdh_next.
174 (elf32_hppa_gc_sweep_hook): Use hdh_next.
175 (elf32_hppa_adjust_dynamic_symbol): Use hdh_next, and etab.
176 (allocate_plt_static): Use etab.
177 (allocate_dynrelocs): Use etab, and hdh_next.
178 (readonly_dynrelocs): Use hdh_next.
179 (elf32_hppa_size_dynamic_sections): Use etab, and hdh_next.
180 (get_local_syms): Use eh, bstab, and hh.
181 (elf32_hppa_size_stubs): Use eh, bstab, and hh.
182 (elf32_hppa_set_gp): Use etab.
183 (elf32_hppa_build_stubs): Use bstab.
184 (final_link_relocate): Use eh, bh_root.
185 (elf32_hppa_relocate_section): Use elf, etab.
186 (elf32_hppa_finish_dynamic_sections): Use etab.
187
5f1cb353
L
1882005-06-27 H.J. Lu <hongjiu.lu@intel.com>
189
190 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): Remove
191 the extra `;'.
192
875c0872
DA
1932005-06-21 Carlos O'Donell <carlos@systemhalted.org>
194
195 * bfd/elf32-hppa.c (hppa_elf_hash_entry): Define.
196 (hppa_stub_hash_entry): Define.
197 (stub_hash_newfunc): Rename variables.
198 (hppa_link_hash_newfunc): Likewise.
199 (elf32_hppa_link_hash_table_free): Likewise.
200 (hppa_stub_name): Likewise.
201 (hppa_get_stub_entry): Likewise.
202 (hppa_add_stub): Likewise.
203 (hppa_type_of_stub): Likewise.
204 (hppa_build_one_stub): Likewise.
205 (hppa_size_one_stub): Likewise.
206 (elf32_hppa_create_dynamic_sections): Likewise.
207 (elf32_hppa_copy_indirect_symbol): Likewise.
208 (elf32_hppa_check_relocs): Likewise.
209 (elf32_hppa_gc_mark_hook): Likewise.
210 (elf32_hppa_gc_sweep_hook): Likewise.
211 (elf32_hppa_grok_psinfo): Likewise.
212 (elf32_hppa_hide_symbol): Likewise.
213 (elf32_hppa_adjust_dynamic_symbol): Likewise.
214 (allocate_dynrelocs): Likewise.
215 (clobber_millicode_symbols): Likewise.
216 (readonly_dynrelocs): Likewise.
217 (elf32_hppa_size_dynamic_sections): Likewise.
218 (get_local_syms): Likewise.
219 (elf32_hppa_size_stubs): Likewise.
220 (hppa_record_segment_addr): Likewise.
221 (final_link_relocate): Likewise.
222 (elf32_hppa_relocate_section): Likewise.
223 (elf32_hppa_finish_dynamic_symbol): Likewise.
224
973a3492
L
2252005-06-20 H.J. Lu <hongjiu.lu@intel.com>
226
227 PR 1025
228 * elf-m10300.c (mn10300_elf_check_relocs): Handle indirect
229 symbol.
230 * elf32-arm.c (elf32_arm_check_relocs): Likewise.
231 * elf32-avr.c (elf32_avr_check_relocs): Likewise.
232 * elf32-cris.c (cris_elf_check_relocs): Likewise.
233 * elf32-d10v.c (elf32_d10v_check_relocs): Likewise.
234 * elf32-dlx.c (elf32_dlx_check_relocs): Likewise.
235 * elf32-fr30.c (fr30_elf_check_relocs): Likewise.
236 * elf32-frv.c (elf32_frv_check_relocs): Likewise.
237 * elf32-i370.c (i370_elf_check_relocs): Likewise.
238 * elf32-iq2000.c (iq2000_elf_check_relocs): Likewise.
239 * elf32-m32r.c (m32r_elf_check_relocs): Likewise.
240 * elf32-m68hc1x.c (elf32_m68hc11_check_relocs): Likewise.
241 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
242 * elf32-mcore.c (mcore_elf_check_relocs): Likewise.
243 * elf32-ms1.c (ms1_elf_check_relocs): Likewise.
244 * elf32-msp430.c (elf32_msp430_check_relocs): Likewise.
245 * elf32-openrisc.c (openrisc_elf_check_relocs): Likewise.
246 * elf32-ppc.c (ppc_elf_check_relocs): Likewise.
247 * elf32-s390.c (elf_s390_check_relocs): Likewise.
248 * elf32-sh.c (sh_elf_check_relocs): Likewise.
249 * elf32-v850.c (v850_elf_check_relocs): Likewise.
250 * elf32-vax.c (elf_vax_check_relocs): Likewise.
251 * elf64-mmix.c (mmix_elf_check_relocs): Likewise.
252 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
253 * elf64-s390.c (elf_s390_check_relocs): Likewise.
254 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
255 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Likewise.
256 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
257
71cb9464
L
2582005-06-20 H.J. Lu <hongjiu.lu@intel.com>
259
f7c5057a
L
260 PR 1022
261 * elf32-hppa.c (elf32_hppa_check_relocs): Handle indirect
262 symbol.
263
2642005-06-20 H.J. Lu <hongjiu.lu@intel.com>
265
266 PR 1025
71cb9464
L
267 * elf32-i386.c (elf_i386_check_relocs): Handle indirect symbol.
268 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
269
73d147dc
L
2702005-06-18 H.J. Lu <hongjiu.lu@intel.com>
271
272 * reloc.c: Add BFD_RELOC_X86_64_GOTOFF64 and
273 BFD_RELOC_X86_64_GOTPC32.
274 * bfd-in2.h: Regenerated.
275
a50b2160
JJ
2762005-06-17 Jakub Jelinek <jakub@redhat.com>
277
aa2ca951
JJ
278 * elf.c (bfd_section_from_shdr): Kill bogus warning.
279
a50b2160
JJ
280 * elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for
281 symbol, relocation, group or versym sections.
282
283 * coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
284 is NULL.
285 * peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
286 doesn't point into the section.
287
d6ab8113
JB
2882005-06-17 Jan Beulich <jbeulich@novell.com>
289
290 * bfd-in2.h (elf_x86_64_reloc_type): Add BFD_RELOC_X86_64_GOTOFF64
291 and BFD_RELOC_X86_64_GOTPC32.
292 * libbfd.h (bfd_reloc_code_real_names): Likewise.
293 * elf64-x86-64.c (x86_64_elf_howto_table): Add entries for
294 R_X86_64_PC64, R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
295 (x86_64_reloc_map): Add entries for R_X86_64_PC64, R_X86_64_GOTOFF64,
296 and R_X86_64_GOTPC32.
297 (elf64_x86_64_info_to_howto): Adjust bounding relocation type.
298 (elf64_x86_64_check_relocs): Also handle R_X86_64_PC64,
299 R_X86_64_GOTOFF64, and R_X86_64_GOTPC32.
300 (elf64_x86_64_relocate_section): Likewise.
301 (elf64_x86_64_gc_sweep_hook): Also handle R_X86_64_PC64.
302
b820f1e4
MK
3032005-06-15 Mark Kettenis <kettenis@gnu.org>
304
305 * archive.c: Include "libiberty.h".
306
46767561
NC
3072005-06-15 Nick Clifton <nickc@redhat.com>
308
309 * elf32-v850.c (ELF_MACHINE_ALT2): Define so that binaries
310 produced by the GreenHills toolchain can be assimilated.
311
580a09db
DA
3122005-06-14 Steve Ellcey <sje@cup.hp.com>
313
314 * som.c (som_find_inliner_info): New.
315
91134c82
L
3162005-06-14 H.J. Lu <hongjiu.lu@intel.com>
317
318 * elflink.c (_bfd_elf_merge_symbol): Fix a typo in comment.
319
933d961a
JJ
3202005-06-14 Jakub Jelinek <jakub@redhat.com>
321
322 * elf.c (bfd_section_from_shdr): Fail if name is NULL.
323 Prevent endless recursion on broken objects.
324
325 * archive.c (do_slurp_coff_armap): Check for overflows.
326
9a44bbd9
DJ
3272005-06-10 Daniel Jacobowitz <dan@codesourcery.com>
328
329 * elfcode.h (elf_write_relocs): Do nothing if there are no
330 relocations.
331
75758e9d
AM
3322005-06-10 Alan Modra <amodra@bigpond.net.au>
333
334 * dwarf2.c (decode_line_info): Revert last change. Instead set
335 initial low_pc to -1 to avoid need to test whether loc_pc has
336 been set.
337
2ae0844c
CF
3382005-06-09 Christopher Faylor <cgf@timesys.com>
339
340 * coffcode.h (sec_to_styp_flags): Set appropriate section flags when
341 either SEC_ALLOC OR SEC_LOAD.
342
3b137b9a
CF
3432005-06-09 Christopher Faylor <cgf@timesys.com>
344
345 * coffcode.h (sec_to_styp_flags): Remove read/write flags from noload
346 section header. Do not add STYP_NOLOAD since it does not appear to be
347 a valid PE flag.
348
6bd00c5d
L
3492005-06-09 H.J. Lu <hongjiu.lu@intel.com>
350
351 PR 1000
352 * dwarf2.c (lookup_address_in_line_info_table): Restore code
353 handling NULL function info, removed with 2005-04-03 change.
354
a366f4ff
MM
3552005-06-08 Mark Mitchell <mark@codesourcery.com>
356
357 * opncls.c (bfd_fopen): Mark returned BFD as cacheable if FD == -1.
358
0e58fcf3
AM
3592005-06-09 Alan Modra <amodra@bigpond.net.au>
360
361 * elflink.c (elf_mark_used_section): Delete.
362 (bfd_elf_gc_sections): Call bfd_generic_gc_sections.
363 * reloc.c (bfd_mark_used_section): New function.
364 (bfd_generic_gc_sections): Call bfd_mark_used_section.
365
92a7c1b8
AM
3662005-06-08 Alan Modra <amodra@bigpond.net.au>
367
368 * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
d83747fa 369 (bfd_fdopenr): Same.
92a7c1b8 370
dfab97d6
MM
3712005-06-07 Mark Mitchell <mark@codesourcery.com>
372
373 * opncls.c (bfd_fdopenr): Add missing break statements.
374
2d0123b7
MM
3752005-06-07 Mark Mitchell <mark@codesourcery.com>
376
377 * opncls.c (bfd_fopen): New API.
378 (bfd_openr): Use it.
379 (bfd_fdopenr): Likewise.
380 * bfd-in2.h: Regenerated.
381
de33e640
AH
3822005-06-07 Aldy Hernandez <aldyh@redhat.com>
383 Michael Snyder <msnyder@redhat.com>
384 Stan Cox <scox@redhat.com>
385
386 * Makefile.am (ALL_MACHINES): Add ms1 support.
387 (ALL_MACHINES_CFILES): Same.
388 (BFD32_BACKENDS): Same.
389 (BFD32_BACKENDS_CFILES): Same.
390
391 * Makefile.in: Regenerate.
392
393 * archures.c (bfd_architecture): Add ms1 entries.
394 Externalize bfd_ms1_arch.
395 (bfd_archures_list): Add bfd_ms1_arch.
396
397 * bfd-in2.h: Regenerate.
398
399 * cpu-ms1.c: New file.
400
401 * elf32-ms1.c: New file.
402
403 * targets.c: Define extern of bfd_elf32_ms1_vec.
404 Add bfd_elf32_ms1_vec to _bfd_target_vector.
405
406 * configure.in: Add bfd_elf32_ms1_vec case.
407
408 * configure: Regenerate.
409
410 * config.bfd: Add ms1-*-elf to table.
411
55cf6793
ZW
4122005-06-07 Zack Weinberg <zack@codesourcery.com>
413
414 * coff-i386.c: Change md_apply_fix3 to md_apply_fix in comment.
415
4575b1b5
AM
4162005-06-07 Alan Modra <amodra@bigpond.net.au>
417
418 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Init _bfd_find_line.
419 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
420
5420f73d
L
4212005-06-06 H.J. Lu <hongjiu.lu@intel.com>
422
423 PR 990
424 * bfd.c (bfd_find_line): New.
425
426 * dwarf2.c (comp_unit): Add variable_table.
427 (funcinfo): Add file, line, and sec.
428 (varinfo): New.
429 (lookup_symbol_in_function_table): New.
430 (lookup_symbol_in_variable_table): New.
431 (scan_unit_for_functions): Renamed to ...
432 (scan_unit_for_symbols): This. Handle DW_TAG_entry_point and
433 DW_TAG_variable.
434 (comp_unit_find_nearest_line): Updated.
435 (comp_unit_find_line): New.
436 (_bfd_dwarf2_find_line): New.
437
438 * elf-bfd.h (_bfd_elf_find_line): New.
439 (_bfd_generic_find_line): New. Defined.
440
441 * elf.c (_bfd_elf_find_line): New.
442
443 * libbfd-in.h (_bfd_dwarf2_find_line): New.
444 (_bfd_generic_find_line): New.
445
446 * bfd-in2.h: Regenerated.
447 * libbfd.h: Likewise.
448
449 * libbfd.c (_bfd_generic_find_line): New.
450
451 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Initialize _bfd_find_line
452 with _bfd_generic_find_line.
453 (bfd_target): Add _bfd_find_line.
454
b42f9a05
L
4552005-06-06 H.J. Lu <hongjiu.lu@intel.com>
456
457 * dwarf2.c (decode_line_info): Properly set low_pc.
458
b4f4e59f
AM
4592005-06-06 Alan Modra <amodra@bigpond.net.au>
460
461 * elf64-pcc.c (ppc64_elf_gc_mark_hook): For the local sym in .opd
462 case, include addend when indexing .opd section map.
463 (ppc64_elf_edit_opd): Add no_opd_opt param. Do nothing besides
464 clear opd_adjust array if no_opd_opt set. Tidy code.
46de2a7c
AM
465 Ignore zero size .opd. Check bfd_alloc return value.
466 (ppc_stub_name): Return immediately on bfd_malloc fail.
b4f4e59f
AM
467 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
468
2ae727ad
L
4692005-06-04 H.J. Lu <hongjiu.lu@intel.com>
470
471 * dwarf2.c (comp_unit): Fix a typo in comment.
472
ce71b576
NC
4732005-06-03 Jan-Benedict Glaw <jbglaw@lug-owl.de>
474
475 * elf32-vax.c (rtype_to_howto): Remove PARAMS.
476 (reloc_type_lookup): Dito.
477 (elf_vax_discard_copies): Dito.
478 (elf_vax_instantiate_got_entries): Dito.
479 (elf_vax_link_hash_traverse): Dito.
480 (elf_vax_link_hash_newfunc): Dito.
481 (elf_vax_link_hash_table_create): Dito.
482 (elf32_vax_set_private_flags): Dito.
483 (elf32_vax_merge_private_bfd_data): Dito.
484 (elf32_vax_print_private_bfd_data): Dito.
485 (elf_vax_check_relocs): Dito.
486 (elf_vax_gc_mark_hook): Dito.
487 (elf_vax_gc_sweep_hook): Dito.
488 (elf_vax_size_dynamic_sections): Dito.
489 (elf_vax_discard_copies): Dito.
490 (elf_vax_instantiate_got_entries): Dito.
491 (elf_vax_relocate_section): Dito.
492 (elf_vax_finish_dynamic_symbol): Dito.
493 (elf_vax_finish_dynamic_sections): Dito.
494 (elf_vax_hash_table): Break-up of line isn't needed.
495 (elf_vax_check_relocs): Remove leading whitespace
496 (elf_vax_relocate_section): Remove redundant whitespace
497 (elf_vax_link_hash_newfunc): Don't cast NULL.
498 (elf_vax_link_hash_table_create): Dito.
499 * cpu-vax.c (bfd_vax_arch) Remove a trailing space.
500
9635fe29
AM
5012005-06-03 Alan Modra <amodra@bigpond.net.au>
502
e1fffbe6
AM
503 PR 568
504 * configure.in: Bump version
505 * configure: Regenerate.
506 * elflink.c (elf_link_input_bfd): Use einfo linker callback to print
507 discarded section sym refs and kill linker output.
508 * simple.c (simple_dummy_einfo): New function.
509 (bfd_simple_get_relocated_section_contents): Init callbacks.einfo.
510
9635fe29
AM
511 * elf32-i386.c (elf_i386_relocate_section): Handle zero symndx
512 for all reloc types.
513
e87d886e
AM
5142005-06-02 Alan Modra <amodra@bigpond.net.au>
515
516 * elf64-ppc.c (add_symbol_adjust): Set sym visibility to most
517 restrictive of func code and func descr for undefined syms as well
518 as defined.
519
b2b09913
JB
5202005-05-31 Jim Blandy <jimb@redhat.com>
521
522 * Makefile.am: Regenerate dependencies with 'make dep-am'.
523 * Makefile.in: Regenerate.
524
8288a39e
RH
5252005-05-31 Richard Henderson <rth@redhat.com>
526
527 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_JSRDIRECT): New.
528 (ALPHA_ELF_LINK_HASH_TLS_IE): Renumber to 0x80.
529 (ALPHA_ELF_LINK_HASH_LU_PLT): Rename from ALPHA_ELF_LINK_HASH_LU_FUNC.
530 (elf64_alpha_want_plt): Update to match.
531 (elf64_alpha_check_relocs): Collect JSRDIRECT in gotent_flags.
532 (elf64_alpha_relax_with_lituse): Likewise. Handle JSRDIRECT.
533
f1c71a59
ZW
5342005-05-31 Zack Weinberg <zack@codesourcery.com>
535
536 * elf32-arm.c (elf32_arm_reloc_type_lookup)
537 (elf32_arm_nabi_grok_prstatus, elf32_arm_nabi_grok_psinfo):
538 Use ISO C90 function declaration style.
539
653bb2de
JW
5402005-05-31 James E Wilson <wilson@specifixinc.com>
541
542 * elfcode.h (NAME(bfd_elf,bfd_from_remote_memory)): Check for program
543 header PF_R flag on PT_LOAD segments.
544
f915360b
RH
5452005-05-30 Richard Henderson <rth@redhat.com>
546
547 * elf64-alpha.c (elf64_alpha_relocate_section): Use dtp_base for
548 the zero index relocs produced by elf64_alpha_relax_tls_get_addr.
549
6ec7057a
RH
5502005-05-29 Richard Henderson <rth@redhat.com>
551
552 * configure.in (--enable-secureplt): New.
553 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
554 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
555 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
556 (elf64_alpha_use_secureplt): New.
557 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
558 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
559 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
560 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
561 (struct alpha_elf_link_hash_entry): Add plt_offset.
562 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
563 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
564 (PLT_ENTRY_WORD3): Remove.
565 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
566 on .plt and create .got.plt.
567 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
568 (get_got_entry): Initialize plt_offset.
569 (elf64_alpha_want_plt): New.
570 (elf64_alpha_check_relocs): Use it.
571 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
572 plt entries here.
573 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
574 error as user error.
575 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
576 got subsection.
577 (elf64_alpha_size_plt_section): Size .got.plt section.
578 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
579 plt entries used.
580 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
581 Add PLTRO DYNAMIC entry.
582 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
583 (elf64_alpha_finish_dynamic_sections): Likewise.
584
3133ddbf
DJ
5852005-05-28 David Daney <ddaney@avtrex.com>
586
587 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
588 calculation of DT_RELSZ to occur after all dynamic relocations
589 are created.
590
36527912
AJ
5912005-05-28 Eli Zaretskii <eliz@gnu.org>
592
593 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
594 * config.in, configure: Regenerate.
595
1bc8074d 5962005-05-26 Mark Kettenis <kettenis@gnu.org>
6ec7057a 597 Maciej W. Rozycki <macro@linux-mips.org>
1bc8074d
MR
598
599 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
600 stop processing of options if one of invalid size is
601 encountered.
602 (_bfd_mips_elf_section_from_shdr): Likewise.
603 (_bfd_mips_elf_fake_sections): Reset the type of empty special
604 sections.
605
75fed80d
RH
6062005-05-26 Richard Henderson <rth@redhat.com>
607
36527912 608 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
75fed80d
RH
609 plt_old_section, plt_old_value.
610 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
611 (elf64_alpha_size_plt_section_1): Don't use it.
612
24639c7d
JJ
6132005-05-26 Jakub Jelinek <jakub@redhat.com>
614
615 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
616 first shdr has sh_size == 0. Fail if e_shnum is large to cause
617 arithmetic overflow when allocating the i_shdr array.
618 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
619
a7519a3c
RH
6202005-05-25 Richard Henderson <rth@redhat.com>
621
622 * elf64-alpha.c: Update all function definitions to ISO C. Remove
623 all function prototypes; rearrange functions into def-use order.
624
308da68f
RH
6252005-05-25 Richard Henderson <rth@redhat.com>
626
627 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
628 in the presence of deleting elements.
629 (elf64_alpha_size_got_sections): Zero dead got section size.
630
4ab527b0
FF
6312005-05-23 Fred Fish <fnf@specifixinc.com>
632
633 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
634 (struct funcinfo): Add caller_func, caller_file, caller_line.
635 tag, and nesting_level members.
636 (lookup_address_in_function_table): Change first passed parameter
637 from "struct funcinfo *" to "struct comp_unit *".
638 (lookup_address_in_function_table): Dereference unit to find function
639 table.
640 (lookup_address_in_function_table): Traverse the function list to
641 create a chain of inlined functions back to the first non inlined
642 function.
643 (scan_unit_for_functions): Remember tag and nesting level. Handle
644 DW_AT_call_file and DW_AT_call_line.
645 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
646 call to pass unit pointer instead of function table pointer. For
647 inlined functions, save pointer to the inliner chain.
648 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
649 (_bfd_dwarf2_find_inliner_info): New function that returns information
650 from the inliner chain after a call to bfd_find_nearest_line.
651
652 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
653 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
654 NAME##_find_inliner_info.
655 (bfd_target): Add _bfd_find_inliner_info.
656 * bfd-in2.h: Regenerate.
657
658 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
659 macro that always returns bfd_false.
660 (_bfd_dwarf2_find_inliner_info): Declare.
661 * libbfd.h: Regenerate.
36527912 662
4ab527b0
FF
663 * elf32-arm.c (elf32_arm_find_inliner_info): New function
664 that calls _bfd_dwarf2_find_inliner_info.
665 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
666
667 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
668 that calls _bfd_dwarf2_find_inliner_info.
669 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
670 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
671 _bfd_mips_elf_find_inliner_info.
672 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
673 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
674
675 * elf.c (_bfd_elf_find_inliner_info): New function that calls
676 _bfd_dwarf2_find_inliner_info.
677 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
678 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
679 _bfd_elf_find_inliner_info.
680
681 * coffgen.c (coff_find_inliner_info): New function that
682 calls _bfd_dwarf2_find_inliner_info.
683 * libcoff-in.h (coff_find_inliner_info): Declare.
684 * libcoff.h: Regenerate.
685 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
686 (pmac_xcoff_vec) Ditto.
687 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
688 (aix5coff64_vec): Ditto.
36527912 689
4ab527b0
FF
690 * aout-target.h (MY_find_inliner_info): Define as
691 _bfd_nosymbols_find_inliner_info.
692 * aout-tic30.c (MY_find_inliner_info): Ditto.
693 * binary.c (binary_find_inliner_info): Ditto.
694 * i386msdos.c (msdos_find_inliner_info): Ditto.
695 * ihex.c (ihex_find_inliner_info): Ditto.
696 * libaout.h (aout_32_find_inliner_info): Ditto.
697 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
698 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
699 * mmo.c (mmo_find_inliner_info): Ditto.
700 * nlm-target.h (nlm_find_inliner_info): Ditto.
701 * pef.c (bfd_pef_find_inliner_info): Ditto.
702 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
703 * srec.c (srec_find_inliner_info): Ditto.
704 * tekhex.c (tekhex_find_inliner_info): Ditto.
705 * versados.c (versados_find_inliner_info): Ditto.
706 * xsym.c (bfd_sym_find_inliner_info): Ditto.
707
708 * ieee.c (ieee_find_inliner_info): New function that always
709 returns FALSE.
710 * oasys.c (oasys_find_inliner_info): Ditto.
711 * vms.c (vms_find_inliner_info): Ditto.
712
9edfd1af
AM
7132005-05-24 Alan Modra <amodra@bigpond.net.au>
714
715 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
716 force old plt layout.
717
3241278a
RH
7182005-05-22 Richard Henderson <rth@redhat.com>
719
720 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
721 sections.
722 (elf64_alpha_check_relocs): Likewise.
723 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
724 non-allocated sections.
725
d6ad34f6
RH
7262005-05-22 Richard Henderson <rth@redhat.com>
727
36527912 728 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
d6ad34f6
RH
729 undefweak to use zero register. Call elf64_alpha_relax_got_load
730 if not all uses removed.
731 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
732 (elf64_alpha_relax_section): Handle undefweak symbols.
733 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
734 (elf64_alpha_size_rela_got_1): Likewise.
735 (elf64_alpha_relocate_section): Likewise.
736
487c4353
RH
7372005-05-22 Richard Henderson <rth@redhat.com>
738
739 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
740 on SEC_CODE sections.
741
a96afa0f
DA
7422005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
743
744 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
745 unsigned int *.
746 (som_write_space_strings): Change type of tmp_space and p to char *.
747 (som_write_symbol_strings): Likewise. Also change type of comp to
748 char *comp[4].
749 (som_begin_writing): Change type of strings_size to unsigned int.
750 (som_finish_writing): Likewise.
751 (som_slurp_reloc_table): Change type of external_relocs to unsigned
752 char *.
753 * som.h (struct som_section_data_struct): Change type of reloc_stream
754 field to unsigned char *.
755
643796e3
DJ
7562005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
757
758 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
759 copy relocations for VxWorks.
760
4dc4a9a5
DJ
7612005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
762
763 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
764 has_sda_refs.
765 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
766 (ppc_elf_check_relocs): Set has_sda_refs.
767 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
768 copy relocations. Use has_sda_refs to place variables in .sbss.
769 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
770 .sbss.
771
dd1a320b
BW
7722005-05-20 Bob Wilson <bob.wilson@acm.org>
773
774 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
775 xtensa_default_isa is initialized.
776
28e99bb6
AM
7772005-05-20 Alan Modra <amodra@bigpond.net.au>
778
779 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
780 for second and subsequent list entries. Only allocate multiple
781 glink stubs when shared or pie.
782 (ppc_elf_finish_dynamic_symbol): Break out early when only one
783 glink stub is needed.
784
e3e71e27
ZW
7852005-05-19 Zack Weinberg <zack@codesourcery.com>
786
787 * Makefile.am: Have 'all' depend on 'info'.
788 * Makefile.in: Regenerate.
789
a6aa5195
AM
7902005-05-19 Alan Modra <amodra@bigpond.net.au>
791
792 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
793 init_offset. Add init_got_refcount, init_plt_refcount,
794 init_got_offset and init_plt_offset.
795 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
796 (_bfd_elf_link_hash_hide_symbol): Likewise.
797 (_bfd_elf_link_hash_table_init): Likewise.
798 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
799 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
800 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
801 (bfd_elf_size_dynamic_sections): Likewise.
802 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
803 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
804 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
805 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
806 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
807 (struct plt_entry): New.
808 (ppc_elf_link_hash_table_create): Set new init_plt fields.
809 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
810 use _bfd_elf_link_hash_copy_indirect.
811 (update_plt_info, find_plt_ent): New functions.
812 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
813 and adjust for use of plt list rather than refcount.
814 (ppc_elf_gc_sweep_hook): Likewise.
815 (ppc_elf_tls_optimize): Likewise.
816 (ppc_elf_adjust_dynamic_symbol): Likewise.
817 (allocate_dynrelocs): Likewise.
818 (ppc_elf_relax_section): Likewise.
819 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
820 when performing a relocatable link.
821 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
822 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
823 pic resolver stub.
824
a49e53ed
AM
8252005-05-19 Alan Modra <amodra@bigpond.net.au>
826
827 * elf.c (assign_file_positions_for_segments): Use maximum of
828 maxpagesize and section alignment when adjusting initial
829 segment offset and section offsets.
830
cb1afa5c
ZW
8312005-05-18 Zack Weinberg <zack@codesourcery.com>
832
833 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
834 unconditional.
835
13792e9d
L
8362005-05-18 H.J. Lu <hongjiu.lu@intel.com>
837
838 * elf.c (group_signature): Undo the last change. Check if the
839 symbol table section is correct.
840
c19d1205
ZW
8412005-05-17 Zack Weinberg <zack@codesourcery.com>
842
843 * elf32-arm.c: Wherever possible, use official reloc names
844 from AAELF.
845 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
846 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
847 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
848 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
849 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
850 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
851 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
852 Add many new relocations from AAELF.
853 (elf32_arm_howto_from_type): Update to match.
854 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
855 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
856 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
857 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
858 (elf32_arm_final_link_relocate): Add support for
859 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
860 case entries redundant with default.
861
862 * reloc.c: Reorganize ARM relocations. Add Thumb
863 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
864 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
865 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
866 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
867 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
868 * bfd-in2.h, libbfd.h: Regenerate.
869
26ae6d5e
DJ
8702005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
871
872 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
873 elf_shstrtab.
874 * format.c (bfd_check_format_matches): Set output_has_begun
875 for both_direction.
876 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
877 special case for both_direction.
878
5982e3c7
NC
8792005-05-17 Nick Clifton <nickc@redhat.com>
880
881 * elf.c (group_signature): Check for a group section which is
882 actually a (corrupt) symbol table section in disguise and prevent
883 an infinite loop from occurring.
884
fc3ab699
L
8852005-05-17 H.J. Lu <hongjiu.lu@intel.com>
886
887 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
888 2005-02-16.
889
5e27d427
L
8902005-05-17 H.J. Lu <hongjiu.lu@intel.com>
891
892 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
893 predicate on slot 0 only if slot 0 isn't br.
894
75ff4589
L
8952005-05-17 H.J. Lu <hongjiu.lu@intel.com>
896
897 PR 797
898 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
899 empty sdynbss section.
900 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
901
8e0ed13f
NC
9022005-05-17 Tavis Ormandy <taviso@gentoo.org>
903
904 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
905 dynamic sections.
906
7e8aeb9a
AM
9072005-05-17 Alan Modra <amodra@bigpond.net.au>
908
909 * elf32-ppc.c (LIS_11. LIS_12): Define.
910 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
911 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
912 for --data-plt when building non-pie executables.
913
641bd093
NC
9142005-05-17 Nick Clifton <nickc@redhat.com>
915
10dbd1f3
NC
916 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
917 the situation where a symbols's section is not known but a section
918 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
919 OS.
920
641bd093
NC
921 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
922 the presence of a symbol table to just before the symbol table is
923 actually used.
924
83b6bd86
L
9252005-05-16 H.J. Lu <hongjiu.lu@intel.com>
926
927 PR 834
928 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
929 (elfNN_ia64_relax_section): Use it.
930
06084812
MK
9312005-05-14 Mark Kettenis <kettenis@gnu.org>
932
933 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
934 of basename.
935
1fe44d79
AM
9362005-05-14 Alan Modra <amodra@bigpond.net.au>
937
938 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
939 not DT_PPC_GLINK.
940 (ppc_elf_finish_dynamic_sections): Likewise.
941
2db3311b
FF
9422005-05-13 Fred Fish <fnf@specifixinc.com>
943
944 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
945 * libbfd.h: Rebuilt.
946
7db48a12
BW
9472005-05-13 Bob Wilson <bob.wilson@acm.org>
948
949 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
950 periods in linkonce_kind values.
951
8fe76924
L
9522005-05-12 H.J. Lu <hongjiu.lu@intel.com>
953
954 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
955 against protected function when building executable.
956
86b9da88
AM
9572005-05-12 Alan Modra <amodra@bigpond.net.au>
958
959 * elf32-ppc.c (LWZU_0_X_11): Delete.
960 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
961 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
962 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
963 table.
964 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
965 table.
966 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
967 Generate .glink branch table and updated stubs.
968
d7128ce4
AM
9692005-05-11 Alan Modra <amodra@bigpond.net.au>
970
971 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
972 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
973 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
974 (CROR_151515, CROR_313131): Delete.
975 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
976 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
977 LWZU_0_X_11): Define.
978 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
979 and R_PPC_REL16_HA entries.
980 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
981 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
982 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
983 new_plt, and old_plt.
984 (ppc_elf_create_dynamic_sections): Create .glink section.
985 (ppc_elf_check_relocs): Set new_plt and old_plt.
986 (ppc_elf_select_plt_layout): New function.
987 (ppc_elf_tls_setup): Set plt output section elf type and flags.
988 (allocate_got): Handle differences between old and new got layout.
989 (allocate_dynrelocs): Likewise for plt.
990 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
991 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
992 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
993 destination of R_PPC_PLTREL24 relocs.
994 (ppc_elf_relocate_section): Handle new relocs and changed destination
995 of R_PPC_PLTREL24.
996 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
997 differences in layout.
998 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
999 put a blrl in new got. Write glink contents.
1000 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
1001 * libbfd.h: Regenerate.
1002 * bfd-in2.h: Regenerate.
1003
4c9b0de6
AS
10042005-05-11 Andreas Schwab <schwab@suse.de>
1005
1006 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
1007 warning.
1008
3d2b39cf
L
10092005-05-10 H.J. Lu <hongjiu.lu@intel.com>
1010
1011 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
1012 section if SEC_ALLOC isn't set.
1013
2ba49b59
KC
10142005-05-09 Kelley Cook <kcook@gcc.gnu.org>
1015
1016 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
1017 * acinclude.m4: Don't sinclude accross.m4.
1018 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
1019
433817dd
AM
10202005-05-09 Alan Modra <amodra@bigpond.net.au>
1021
1022 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
1023 (ppc64_elf_add_symbol_hook): Set has_dotsym.
1024 (ppc64_elf_check_directives): Only process syms when has_dotsym.
1025 (func_desc_adjust): Hide fake function descriptors when function
1026 code entry is defined.
1027 (adjust_opd_syms): Adjust for deleted_section becoming union field.
1028
0560d0f7
AM
10292005-05-09 Alan Modra <amodra@bigpond.net.au>
1030
1031 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
1032
74cc7600
DK
10332005-05-08 Dave Korn <dave.korn@artimi.com>
1034
1035 * coff-tic80.c: Undefine _CONST after system headers to prevent
1036 clash with tic80-specific definition in include/coff/tic80.h
1037
cfca085c
L
10382005-05-08 H.J. Lu <hongjiu.lu@intel.com>
1039
1040 PR 939
1041 * elflink.c (elf_link_output_extsym): Use output_bfd if
1042 h->root.u.def.section is bfd_abs_section_ptr when reporting
1043 error.
1044
7f4d3958
L
10452005-05-07 H.J. Lu <hongjiu.lu@intel.com>
1046
1047 * elf-bfd.h (elf_backend_data): Update special_sections to
1048 array of pointer to bfd_elf_special_section.
1049 * elf.c (special_sections): Likewise.
1050 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
1051 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1052 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1053 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1054 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1055 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
1056 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1057 * elf32-v850.c (v850_elf_special_sections): Likewise.
1058 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1059 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1060 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1061 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1062 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1063 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1064 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1065 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
1066
1067 * elf.c (get_special_section): Updated.
1068
3b36f7e6
AM
10692005-05-07 Alan Modra <amodra@bigpond.net.au>
1070
1071 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
1072 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
1073 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
1074 got_symbol_offset.
1075 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
1076 * elf32-frv.c (_frv_create_got_section): Likewise.
1077 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
1078 (elf_backend_got_symbol_offset): Don't define.
1079 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
1080 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
1081 and got_gap.
1082 (ppc_elf_create_got): Tidy.
1083 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
1084 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
1085 (ppc_elf_gc_sweep_hook): Likewise.
1086 (ppc_elf_relocate_section): Likewise.
1087 (ppc_elf_finish_dynamic_symbol): Likewise.
1088 (allocate_got): New function.
1089 (allocate_dynrelocs): Use allocate_got.
1090 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
1091 so that local got can refcount it. Set got_header_size.
1092 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
1093 coded 4.
1094 (ppc_elf_finish_dynamic_sections): Likewise.
1095 (elf_backend_got_symbol_offset): Don't define.
1096 (elf_backend_got_header_size): Ditto.
1097
2e0fbf77
JW
10982005-05-05 Steve Ellcey <sje@cup.hp.com>
1099
1100 * configure.in (ACX_HEADER_STRING): New.
1101 * configure: Regenerate.
1102 * config.in: Regenerate.
1103 * sysdep.h (STRING_WITH_STRINGS): Use.
1104
6f140a15
L
11052005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1106
1107 * elf.c (_bfd_elf_close_and_cleanup): Only call
1108 _bfd_dwarf2_cleanup_debug_info on bfd_object.
1109
01d9ad14
L
11102005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1111
1112 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
1113 "__bss_start" instead of "_edata" as fallback.
1114
b36b76cb
L
11152005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1116
1117 * bfd-in2.h: Regenerated.
1118
eac338cf
PB
11192005-05-05 Paul Brook <paul@codesourcery.com>
1120
1121 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
1122 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
1123 elf-vxworks.lo.
1124 * configure: Regenerate.
1125 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
1126 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
1127 (elf32-i386.lo): Depend on elf-vxworks.h.
1128 (elf-vxworks.lo): New rule.
1129 * Makefile.in: Regenerate.
1130 * elf-bfd.h (elf_backend_data): Update type of
1131 elf_backend_emit_relocs.
1132 (_bfd_elf_link_output_relocs): Update prototype.
1133 * elflink.c (_bfd_elf_link_output_relocs): Always use
1134 bed->elf_backend_emit_relocs when outputting relocations.
1135 * elfxx-target.h (elf_backend_emit_relocs): Default to
1136 _bfd_elf_link_output_relocs.
1137 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
1138 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
1139 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
1140 (elf_i386_plt0_entry): Remove padding.
1141 (elf_i386_pic_plt0_entry): Ditto.
1142 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
1143 (PLT_NON_JUMP_SLOT_RELOCS): Define.
1144 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
1145 plt0_pad_byte fields.
1146 (elf_i386_link_hash_table_create): Zero them.
1147 (elf_i386_create_dynamic_sections): Create static relocation section.
1148 (allocate_dynrelocs): Allocate space for static PLT relocations.
1149 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
1150 symbols. Give PLT symbols function type. Don't strip PLT sections
d7128ce4 1151 if we have exported symbols from them.
eac338cf
PB
1152 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
1153 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
1154 VxWorks.
1155 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
1156 Add relocation for GOT location. Fill in PLT static relocations.
1157 (elf_i386_vxworks_link_hash_table_create): New function.
1158 (elf_i386_vxworks_link_output_symbol_hook): New function.
1159 * elf-vxworks.h: New file.
1160
3496cb2a
L
11612005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1162
1163 * section.c (bfd_make_section_anyway_with_flags): New.
1164 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
1165 (bfd_make_section_with_flags): New.
1166 (bfd_make_section): Call bfd_make_section_with_flags.
1167
1168 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
1169 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
1170 instead of bfd_make_section/bfd_make_section and don't call
1171 bfd_set_section_flags.
1172 (mn10300_elf_check_relocs): Likewise.
1173 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
1174 * elf32-arm.c (create_got_section): Likewise.
1175 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
1176 (elf32_arm_check_relocs): Likewise.
1177 * elf32-cris.c (cris_elf_check_relocs): Likewise.
1178 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
1179 (_frv_create_got_section): Likewise.
1180 (elf32_frvfdpic_create_dynamic_sections): Likewise.
1181 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
1182 (elf32_hppa_check_relocs): Likewise.
1183 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
1184 (i370_elf_check_relocs): Likewise.
1185 * elf32-i386.c (create_got_section): Likewise.
1186 (elf_i386_check_relocs): Likewise.
1187 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
1188 (create_got_section): Likewise.
1189 (m32r_elf_create_dynamic_sections): Likewise.
1190 (m32r_elf_check_relocs): Likewise.
1191 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
1192 * elf32-ppc.c (ppc_elf_create_got): Likewise.
1193 (ppc_elf_create_dynamic_sections): Likewise.
1194 (ppc_elf_add_symbol_hook): Likewise.
1195 (ppc_elf_check_relocs): Likewise.
1196 * elf32-s390.c (create_got_section): Likewise.
1197 (elf_s390_check_relocs): Likewise.
1198 * elf32-sh.c (create_got_section): Likewise.
1199 (sh_elf_create_dynamic_sections): Likewise.
1200 (sh_elf_check_relocs): Likewise.
1201 * elf32-vax.c (elf_vax_check_relocs): Likewise.
1202 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
1203 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
1204 (add_extra_plt_sections): Likewise.
1205 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1206 (elf64_alpha_create_got_section): Likewise.
1207 (elf64_alpha_create_dynamic_sections): Likewise.
1208 (elf64_alpha_check_relocs): Likewise.
1209 * elf64-hppa.c (get_reloc_section): Likewise.
1210 (get_opd): Likewise.
1211 (get_plt): Likewise.
1212 (get_dlt): Likewise.
1213 (get_stub): Likewise.
1214 (elf64_hppa_create_dynamic_sectionso): Likewise.
1215 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
1216 * elf64-ppc.c (create_linkage_sections): Likewise.
1217 (ppc64_elf_check_relocs): Likewise.
1218 * elf64-s390.c (create_got_section): Likewise.
1219 (elf_s390_check_relocs): Likewise.
1220 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
1221 (sh64_elf64_create_dynamic_sections): Likewise.
1222 * elf64-x86-64.c (create_got_section): Likewise.
1223 (elf64_x86_64_check_relocs): Likewise.
1224 * elflink.c (_bfd_elf_create_got_section): Likewise.
1225 (_bfd_elf_link_create_dynamic_sections): Likewise.
1226 (elf_link_add_object_symbols): Likewise.
1227 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1228 (elfNN_ia64_create_dynamic_sections): Likewise.
1229 (get_fptr): Likewise.
1230 (get_pltoff): Likewise.
1231 (get_reloc_section): Likewise.
1232 (elfNN_ia64_object_p): Likewise.
1233 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
1234 (mips_elf_create_compact_rel_section): Likewise.
1235 (mips_elf_create_got_section): Likewise.
1236 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1237 * elfxx-sparc.c (create_got_section): Likewise.
1238 (_bfd_sparc_elf_check_relocs): Likewise.
1239
1240 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
1241 on linker created sections.
1242
59fef9e7
L
12432005-05-05 H.J. Lu <hongjiu.lu@intel.com>
1244
1245 PR 882
1246 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
1247 script on executable.
1248
35330cce
NC
12492005-05-05 John Levon <levon@movementarian.org>
1250
1251 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
1252 allocated memory before returning.
1253 (decode_line_info): Likewise.
1254 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
1255 allocated by functions in this file.
1256 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
6f140a15 1257 * elf.c (_bfd_elf_close_and_cleanup): Call
35330cce
NC
1258 _bfd_dwarf2_cleanup_debug_info.
1259
4a2a2686
HPN
12602005-05-05 Hans-Peter Nilsson <hp@axis.com>
1261
1262 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
1263 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
1264 * configure, config.in, Makefile.in: Regenerate.
1265 * sysdep.h (stpcpy): Revert last change.
1266
0baace35
HPN
12672005-05-05 Hans-Peter Nilsson <hp@axis.com>
1268
1269 * sysdep.h (stpcpy): Wrap declaration in parentheses.
1270
5a260b66
L
12712005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1272
1273 * elfxx-ia64.c (ARCH_SIZE): New.
1274 (LOG_SECTION_ALIGN): Likewise.
1275 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
1276 align relocation sections.
1277 (get_fptr): Likewise.
1278 (get_reloc_section): Likewise.
1279 (elfNN_ia64_tprel_base): Likewise.
1280 (elfNN_ia64_check_relocs): Support 32bit relocations.
1281 (allocate_global_fptr_got): Likewise.
1282 (allocate_dynrel_entries): Likewise.
1283 (set_got_entry): Likewise.
1284 (set_pltoff_entry): Likewise.
1285 (elfNN_ia64_relocate_section): Likewise.
1286
12872005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1288
1289 * configure.in: Add AC_CHECK_DECLS(stpcpy).
1290 * configure: Regenerate.
1291 * config.in: Likewise.
1292
1293 * sysdep.h (stpcpy): New.
1294
3e110533
NC
12952005-05-04 Nick Clifton <nickc@redhat.com>
1296
1297 * Update the address and phone number of the FSF organization in
1298 the GPL notices in the following files:
1299 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
1300 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
1301 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
1302 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
1303 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
1304 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
1305 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
1306 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
1307 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
1308 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
1309 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
1310 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
1311 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
1312 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
1313 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
1314 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
1315 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
1316 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
1317 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
1318 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
1319 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
1320 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
1321 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
1322 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
1323 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
1324 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
1325 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
1326 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
1327 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
1328 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
1329 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
1330 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
1331 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
1332 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1333 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
1334 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
1335 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
1336 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
1337 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
1338 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
1339 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
1340 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
1341 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
1342 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
1343 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
1344 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
1345 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
1346 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
1347 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
1348 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
1349 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
1350 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
1351 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
1352 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
1353 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
1354 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
1355 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
1356 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
1357 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
1358 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
1359 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
1360 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
1361 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
1362 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
1363 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
1364 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
1365 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
1366 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
1367 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
1368 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
11d02c41 1369 hosts/alphavms.h
3e110533 1370
f652615e
L
13712005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1372
1373 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
1374 * bfd-in2.h: Regenerated.
1375
1376 * elflink.c (bfd_elf_set_symbol): New.
1377 (_bfd_elf_provide_symbol): Call it.
1378 (_bfd_elf_provide_section_bound_symbols): New.
1379
c5e2cead
L
13802005-05-04 H.J. Lu <hongjiu.lu@intel.com>
1381
1382 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
1383 at the end, if a strong definition has already been seen.
1384
8423293d
AM
13852005-05-04 Alan Modra <amodra@bigpond.net.au>
1386
1387 * section.c (struct bfd_section): Replace link_order_head and
1388 link_order_tail with map_head and map_tail union.
1389 (STD_SECTION): Update.
1390 (_bfd_strip_section_from_output): Delete.
1391 * aoutx.h: Update throughout for above changes.
1392 * coff-ppc.c: Likewise.
1393 * cofflink.c: Likewise.
1394 * ecoff.c: Likewise.
1395 * elf-eh-frame.c: Likewise.
1396 * elf-m10300.c: Likewise.
1397 * elf.c: Likewise.
1398 * elf32-arm.c: Likewise.
1399 * elf32-cris.c: Likewise.
1400 * elf32-hppa.c: Likewise.
1401 * elf32-i386.c: Likewise.
1402 * elf32-m32r.c: Likewise.
1403 * elf32-m68hc1x.c: Likewise.
1404 * elf32-m68k.c: Likewise.
1405 * elf32-ppc.c: Likewise.
1406 * elf32-s390.c: Likewise.
1407 * elf32-sh.c: Likewise.
1408 * elf32-vax.c: Likewise.
1409 * elf32-xtensa.c: Likewise.
1410 * elf64-alpha.c: Likewise.
1411 * elf64-hppa.c: Likewise.
1412 * elf64-ppc.c: Likewise.
1413 * elf64-s390.c: Likewise.
1414 * elf64-sh64.c: Likewise.
1415 * elf64-x86-64.c: Likewise.
1416 * elflink.c: Likewise.
1417 * elfxx-ia64.c: Likewise.
1418 * elfxx-mips.c: Likewise.
1419 * elfxx-sparc.c: Likewise.
1420 * linker.c: Likewise.
1421 * merge.c: Likewise.
1422 * pdp11.c: Likewise.
1423 * xcofflink.c: Likewise.
1424 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
1425 out from bfd_elf_size_dynamic_sections.
1426 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
1427 * bfd-in2.h: Regenerate.
1428
04dd1667
AM
14292005-05-04 Alan Modra <amodra@bigpond.net.au>
1430
1431 * section.c (bfd_section_list_remove): Don't clear s->next.
1432 (bfd_section_list_append): Always init s->prev.
1433 (bfd_section_list_prepend): Define.
1434 (bfd_section_list_insert_after): Minor optimization.
1435 (bfd_section_removed_from_list): Rewrite.
1436 * elf.c (assign_section_numbers): Simplify list traversal now that
1437 bfd_section_list_remove doesn't destroy removed section next ptr.
1438 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1439 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
1440 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
1441 * bfd-in2.h: Regenerate.
1442
5daa8fe7
L
14432005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1444
1445 * bfd.c (bfd): Remove section_tail and add section_last.
1446 (bfd_preserve): Likewise.
1447 (bfd_preserve_save): Likewise.
1448 (bfd_preserve_restore): Likewise.
1449 * opncls.c (_bfd_new_bfd): Likewise.
1450
1451 * coffcode.h (coff_compute_section_file_positions): Updated.
1452 (coff_compute_section_file_positions): Likewise.
1453 * elf.c (assign_section_numbers): Likewise.
1454 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1455 * elf64-mmix.c (mmix_elf_final_link): Likewise.
1456 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
1457 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1458 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1459 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1460
1461 * ecoff.c (bfd_debug_section): Initialize prev.
1462
1463 * section.c (bfd_section): Add prev.
1464 (bfd_section_list_remove): Updated.
1465 (bfd_section_list_append): New.
1466 (bfd_section_list_insert_after): New.
1467 (bfd_section_list_insert_before): New.
1468 (bfd_section_list_insert): Removed.
1469 (bfd_section_removed_from_list): Updated.
1470 (STD_SECTION): Initialize prev.
1471 (bfd_section_init): Updated.
1472 (bfd_section_list_clear): Updated.
1473
1474 * bfd-in2.h: Regenerated.
1475
a31501e9
L
14762005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1477
1478 * elf.c (_bfd_elf_new_section_hook): Don't call
1479 _bfd_elf_get_sec_type_attr on sections from input files.
1480
d05da6a8
L
14812005-05-02 H.J. Lu <hongjiu.lu@intel.com>
1482
1483 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
1484 hash table size 16699 instead of bfd_hash_table_init.
1485
a67b080b
PB
14862005-05-01 Paul Brook <paul@codesourcery.com>
1487
1488 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
1489 definition has already been seen.
1490
c6596c5e
PB
14912005-05-01 Paul Brook <paul@codesourcery.com>
1492
1493 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
1494 R_ARM_PLT32 the same as R_ARM_PC24.
1495 (arm_add_to_rel): Ditto.
1496
9a813b7a
DJ
14972005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
1498
1499 * config.bfd: Add h8300*-*-rtemscoff.
1500 Switch h8300*-*-rtems* to elf.
1501
aa7eb06d
DJ
15022005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
1503
1504 * aclocal.m4, Makefile.in: Regnerated.
1505
fa0d1cab
PB
15062005-04-28 Paul Brook <paul@codesourcery.com>
1507
1508 Merge changes only applied to Makefile.in.
1509 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
1510 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1511 (elfxx-sparc.lo): New rule.
1512 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1513 (elf64-sparc.lo): Likewise.
1514
0291d291
NC
15152005-04-28 Julian Brown <julian@codesourcery.com>
1516
1517 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
1518 import.
1519
26c61ae5
L
15202005-04-27 H.J. Lu <hongjiu.lu@intel.com>
1521
1522 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
1523
1524 * elf.c (bfd_elf_sym_name): Updated.
1525 (group_signature): Likewise.
1526 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1527 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
1528 (ppc64_elf_edit_toc): Likewise.
1529 (ppc64_elf_relocate_section): Likewise.
1530 * elfcode.h (elf_slurp_symbol_table): Likewise.
1531 * elflink.c (elf_link_input_bfd): Likewise.
1532
1533 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
1534 bfd_elf_sym_name to get local symbol name when reporting errors.
1535
8c19749a
NC
15362005-04-27 Nick Clifton <nickc@redhat.com>
1537
1538 * elflink.c (elf_link_input_bfd): Handle the case where a badly
1539 formatted input file results in a reloc which has no associated
1540 global symbol.
1541
8e5b6e16
JG
15422005-04-26 Jerome Guitton <guitton@gnat.com>
1543
1544 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
1545
e459dc7b
DM
15462005-04-25 David S. Miller <davem@davemloft.net>
1547
1548 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
1549 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
1550 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
1551 Likewise.
1552
6d633fd2
L
15532005-04-25 H.J. Lu <hongjiu.lu@intel.com>
1554
1555 PR 858
1556 * elflink.c (elf_link_input_bfd): Make non-debugging reference
1557 to discarded section an error.
1558
d34a2b1d
JG
15592005-04-21 Jerome Guitton <guitton@gnat.com>
1560
1561 * configure.in: Replace BFD_NEED_DECLARATION checks by the
1562 corresponding AC_CHECK_DECLS.
1563 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
1564 HAVE_DECL_*.
1565 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
1566 * configure: Regenerate.
1567 * config.in: Ditto.
1568
ff01938b
AS
15692005-04-21 Andreas Schwab <schwab@suse.de>
1570
c2e70a82
AS
1571 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
1572 unsigned from type of dynamic_interpreter.
1573 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
1574 casts again.
1575
ff01938b
AS
1576 * elf.c (assign_section_numbers): Fix comment.
1577
0858d3ec
JG
15782005-04-21 Jerome Guitton <guitton@gnat.com>
1579
1580 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
1581 for struct som_exec_auxhdr fields.
1582
7920ce38
NC
15832005-04-21 Nick Clifton <nickc@redhat.com>
1584
1585 * aout-adobe.c: Convert to ISO C and fix formatting.
1586 * aout-arm.c: Convert to ISO C and fix formatting.
1587 * aout-cris.c: Convert to ISO C and fix formatting.
1588 * aout-ns32k.c: Convert to ISO C and fix formatting.
1589 * aout-tic30.c: Convert to ISO C and fix formatting.
1590 * coffcode.h: Convert to ISO C and fix formatting.
1591 * coffswap.h: Convert to ISO C and fix formatting.
1592 * i386aout.c: Convert to ISO C and fix formatting.
1593 * libaout.h: Convert to ISO C and fix formatting.
1594 * libcoff-in.h: Convert to ISO C and fix formatting.
1595 * libcoff.h: Convert to ISO C and fix formatting.
1596 * libecoff.h: Convert to ISO C and fix formatting.
1597 * libnlm.h: Convert to ISO C and fix formatting.
1598 * libpei.h: Convert to ISO C and fix formatting.
1599 * libxcoff.h: Convert to ISO C and fix formatting.
1600 * nlm-target.h: Convert to ISO C and fix formatting.
1601 * nlm.c: Convert to ISO C and fix formatting.
1602 * nlm32-alpha.c: Convert to ISO C and fix formatting.
1603 * nlm32-i386.c: Convert to ISO C and fix formatting.
1604 * nlm32-ppc.c: Convert to ISO C and fix formatting.
1605 * nlm32-sparc.c: Convert to ISO C and fix formatting.
1606 * nlmcode.h: Convert to ISO C and fix formatting.
1607 * nlmswap.h: Convert to ISO C and fix formatting.
1608 * pe-mips.c: Convert to ISO C and fix formatting.
1609 * peXXigen.c: Convert to ISO C and fix formatting.
1610 * peicode.h: Convert to ISO C and fix formatting.
1611 * vms-gsd.c: Convert to ISO C and fix formatting.
1612 * vms-hdr.c: Convert to ISO C and fix formatting.
1613 * vms-misc.c: Convert to ISO C and fix formatting.
1614 * vms-tir.c: Convert to ISO C and fix formatting.
1615 * vms.c: Convert to ISO C and fix formatting.
1616 * vms.h: Convert to ISO C and fix formatting.
1617
1618 * coffgen.c (coff_print_symbol): Restore correct formatting of
1619 output.
1620
e8be8da4
DM
16212005-04-20 David S. Miller <davem@davemloft.net>
1622
1623 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
1624 (_bfd_sparc_elf_link_hash_table_create): Likewise.
1625 (allocate_dynrelocs): Likewise.
1626
ec7b76fe
JG
16272005-04-20 Jerome Guitton <guitton@gnat.com>
1628
1629 * configure.in: Fix the check for basename declaration. Add check
1630 for declarations of ftello, ftello64, fseeko, fseeko64.
1631 * configure: Regenerate.
1632 * config.in: Ditto.
1633 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
1634
22b75d0a
DM
16352005-04-19 David S. Miller <davem@davemloft.net>
1636
1637 * elfxx-sparc.c: New file.
1638 * elfxx-sparc.h: New file.
1639 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
1640 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1641 (elfxx-sparc.lo): New rule.
1642 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1643 (elf64-sparc.lo): Likewise.
1644 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
1645 (bfd_elf64_sparc_vec): Likewise.
1646 * configure: Regenerate.
1647 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
1648 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
1649 which is more consistent with elf32-sparc.c
1650
a008ac03
DJ
16512005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
1652
1653 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
1654 (mips_elf_create_local_got_entry): Check h->root.forced_local.
1655
c87b5a93
AM
16562005-04-19 Alan Modra <amodra@bigpond.net.au>
1657
1658 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
1659 dynamic relocs in non-SEC_ALLOC sections.
1660 (ppc_elf_gc_sweep_hook): Likewise.
1661 (ppc_elf_relax_section): Likewise.
1662 (ppc_elf_relocate_section): Likewise.
1663
7cefacd3
NC
16642005-04-18 Nick Clifton <nickc@redhat.com>
1665
1666 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
1667 assigning a value to return_value.
1668
278d8f37
L
16692005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1670
1671 PR 855
1672 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
1673 created group data.
1674
20dbb49d
L
16752005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1676
1677 PR 855
1678 * elf.c (setup_group): Properly handle zero group count.
1679
6a808a40
MK
16802005-04-17 Mark Kettenis <kettenis@gnu.org>
1681
1682 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
1683 (som_is_subspace, compare_subspaces, som_compute_checksum)
1684 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
1685 protoypes.
1686 (hppa_som_reloc, compare_syms, compare_subspaces)
1687 (som_print_symbol, som_get_section_contents)
1688 (som_set_section_contents): Remove space after 'void *'.
1689 (som_bfd_print_private_bfd_data): Use %lx to print longs.
1690 (som_bfd_merge_private_bfd_data)
1691 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
1692 defines.
1693
33bfe774
JB
16942004-04-15 Julian Brown <julian@codesourcery.com>
1695
1696 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1697 * bfd-in2.h: Regenerate.
1698 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
1699 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
1700 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
1701 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
1702 relocations if requested to.
1703 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
1704 use_blx rather than symbian_p.
1705 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
1706 use_blx is in effect.
1707 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
1708 for SymbianOS.
1709
745c12f8
NC
17102005-04-15 Nick Clifton <nickc@redhat.com>
1711
1712 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
1713 values.
1714
2e8b3a61
AM
17152005-04-15 Alan Modra <amodra@bigpond.net.au>
1716
1717 PR ld/815
1718 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
1719 used as a list pointer.
1720
9e9b66a9
AM
17212005-04-14 Alan Modra <amodra@bigpond.net.au>
1722
1723 * Makefile.am (NO_WERROR): Define.
1724 * warning.m4: New file
1725 * acinclude.m4: Include warning.m4.
1726 * configure.in: Invoke AM_BINUTILS_WARNINGS.
1727 * Makefile.in: Regenerate.
1728 * configure: Regenerate.
1729
8699aa54
AM
17302005-04-14 Alan Modra <amodra@bigpond.net.au>
1731
92ceba1e
AM
1732 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
1733 Write trailing padding.
1734
8699aa54
AM
1735 * merge.c (merge_strings): Round up section size for alignment.
1736
40937810
JJ
17372005-04-14 David S. Miller <davem@davemloft.net>
1738
1739 Add TLS support for 64-bit Sparc ELF.
1740 * elf64-sparc.c (sparc64_elf_dyn_relocs,
1741 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
1742 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
1743 sparc64_elf_hash_entry, sparc64_elf_tdata,
1744 sparc64_elf_local_got_tls_type): New defines.
1745 (sparc64_elf_mkobject): New function.
1746 (sparc64_elf_link_hash_table): Add members for dynamic linker
1747 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
1748 uion to track TLS GOT references. Add sym_sec to cache
1749 mappings from local sym to section.
1750 (link_hash_newfunc): New function.
1751 (sparc64_elf_bfd_link_hash_table_create): Rename to
1752 sparc64_elf_link_hash_table_create for consistency.
1753 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
1754 (sparc64_elf_create_dynamic_sections): Initialize new section
1755 members of sparc64_elf_link_hash_table. Only init srelbss
1756 if not-shared.
1757 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
1758 New functions.
1759 (SPARC_NOP): Define.
1760 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
1761 sparc64_elf_plt_ptr_offset): Delete.
1762 (sparc64_plt_entry_build): New function to build PLT entries
1763 gradually instread of all at once at the end of linking.
1764 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
1765 local vars. Get them from sparc64_elf_hash_table instead.
1766 Check early on if r_symndx is in bounds. Handle TLS transitions.
1767 Account for TLS GOT references and DF_STATIC_TLS, as needed.
1768 For TLS relocs, record the tls_type in either
1769 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
1770 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
1771 to the __tls_get_addr symbol. For PLT relocs, track references
1772 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
1773 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
1774 symbol references, count the number of relocations needed for
1775 that symbol. For default switch case, don't error, this lets
1776 the TLS relocs not explicitly handled by this function get
1777 accepted.
1778 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
1779 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
1780 it from sparc64_elf_hash_table. Store the real PLT offset
1781 in h->plt.offset, and build PLT entries one at a time. Also
1782 get .dynbss section pointer from htab.
1783 (allocate_dynrelocs, readonly_dynrelocs,
1784 sparc64_omit_section_dynsym): New functions.
1785 (sparc64_elf_omit_section_dynsym): Use these new functions as
1786 helpers.
1787 (dtpoff_base, tpoff): New functions.
1788 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
1789 locals, get them from sparc64_elf_hash_table. Handle TLS
1790 relocations and refcounting in main relocation loop.
1791 (sparc64_elf_finish_dynamic_symbol): Use
1792 sparc64_elf_link_hash_table. Build PLT entries as we see
1793 them. Handle TLS GOT relocations.
1794 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
1795 from sparc64_elf_hash_table. Initialize only PLT header
1796 not all entries since we not build PLT entries one by one.
1797 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
1798 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
1799 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
1800
e75a280b
L
18012005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
1802
1803 * elflink.c (elf_link_input_bfd): Update check for removed
1804 sections.
1805
ceae3e33
AM
18062005-04-12 Alan Modra <amodra@bigpond.net.au>
1807
1808 * Makefile.am: Run "make dep-am".
1809 * Makefile.in: Regenerate.
1810 * aclocal.m4: Regenerate.
1811 * libcoff.h: Regenerate.
1812
ab82c5b9
L
18132005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1814
1815 * linker.c (_bfd_generic_link_output_symbols): Also check if
1816 the output section of an input section has been removed from
1817 the output file.
1818
1819 * section.c (bfd_section_list_remove): Clear the next field
1820 of the removed section.
1821 (bfd_section_removed_from_list): New.
1822 * bfd-in2.h: Regenerated.
1823
bd695bcc
JJ
18242005-04-11 David S. Miller <davem@davemloft.net>
1825
1826 * elf32-sparc.c (elf32_sparc_relocate_section,
1827 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
1828 R_SPARC_TLS_LE_{HIX22,LOX10}.
1829 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
1830 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
1831 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
1832 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
1833
b5b2699c
L
18342005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1835
1836 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
1837
116c20d2 18382005-04-11 Nick Clifton <nickc@redhat.com>
d7128ce4 1839
116c20d2
NC
1840 * aout-target.h: Convert to ISO C.
1841 * aoutf1.h: Convert to ISO C.
1842 * aoutx.h: Convert to ISO C.
1843 * bout.c: Convert to ISO C.
1844 * dwarf1.c: Convert to ISO C.
1845 * ecoffswap.h: Convert to ISO C.
1846 * freebsd.h: Convert to ISO C.
1847 * genlink.h: Convert to ISO C.
1848 * ieee.c: Convert to ISO C.
1849 * ihex.c: Convert to ISO C.
1850 * libcoff-in.h: Convert to ISO C.
1851 * mach-o.c: Convert to ISO C.
1852 * mach-o.h: Convert to ISO C.
1853 * netbsd.h: Convert to ISO C.
1854 * ns32k.h: Convert to ISO C.
1855 * ns32knetbsd.c: Convert to ISO C.
1856 * oasys.c: Convert to ISO C.
1857 * pdp11.c: Convert to ISO C.
1858 * pef-traceback.h: Convert to ISO C.
1859 * pef.c: Convert to ISO C.
1860 * pef.h: Convert to ISO C.
1861 * riscix.c: Convert to ISO C.
1862 * som.c: Convert to ISO C.
1863 * som.h: Convert to ISO C.
1864 * srec.c: Convert to ISO C.
1865 * stabs.c: Convert to ISO C.
1866 * sunos.c: Convert to ISO C.
1867 * tekhex.c: Convert to ISO C.
1868 * versados.c: Convert to ISO C.
1869 * version.h: Convert to ISO C.
1870 * xcoff-target.h: Convert to ISO C.
1871 * xcofflink.c: Convert to ISO C.
1872 * xsym.c: Convert to ISO C.
1873 * xsym.h: Convert to ISO C.
1874
8f6277f5
PB
18752005-04-08 Paul Brook <paul@codesourcery.com>
1876
1877 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
1878 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
1879 (ARM2THUMB_PIC_GLUE_SIZE): Define.
1880 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
1881 (elf32_arm_to_thumb_stub): Create PIC stubs.
1882 (record_arm_to_thumb_glue): Use different stub size for relocatable
1883 images.
1884
8c1d1bb8
AM
18852005-04-05 Alan Modra <amodra@bigpond.net.au>
1886
1887 * elf64-ppc.c (dec_dynrel_count): New function split out from
1888 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
1889 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
1890 (ppc64_elf_tls_optimize): Likewise.
1891
8c101720
NC
18922005-04-05 Mark Kettenis <kettenis@gnu.org>
1893
1894 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
1895 CORE_WCOOKIE_OFFSET.
1896 (SPARC64_WCOOKIE_OFFSET): New.
1897 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
1898
429cc0ae
NC
18992005-04-05 Nick Clifton <nickc@redhat.com>
1900
1901 * po/rw.po: New translation: Kinyarwanda
1902 * configure.in (ALL_LINGUAS): Add rw
1903 * configure: Regenerate.
1904
cc2e31b9
RS
19052005-04-05 Richard Sandiford <rsandifo@redhat.com>
1906
1907 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
1908 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
1909 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
1910 section flags.
1911 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
1912 to check for SHT_MIPS_OPTIONS sections.
1913 (_bfd_mips_elf_set_section_contents): Likewise.
1914
8236346f
EC
19152005-04-04 Eric Christopher <echristo@redhat.com>
1916
1917 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
1918 Clean up gp handling code.
1919
7e4111ad
L
19202005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1921
1922 * elf.c (bfd_elf_set_group_contents): Ignore linker created
d7128ce4 1923 group section.
da9f89d4
L
1924 (assign_section_numbers): Accept link_info. Check SHT_GROUP
1925 sections for relocatable files only. Remove the linker created
1926 group sections.
1927 (_bfd_elf_compute_section_file_positions): Pass link_info to
1928 assign_section_numbers.
1929
1930 * elfxx-ia64.c (elfNN_ia64_object_p): New.
1931 (elf_backend_object_p): Defined.
7e4111ad 1932
96982dc9
L
19332005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1934
1935 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
1936
a13afe8e
FF
19372005-04-03 Fred Fish <fnf@specifixinc.com>
1938
1939 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
1940 dwarf_ranges_size members.
1941 (struct comp_unit): Add base_address member.
1942 (struct funcinfo): Replace low/high members with an arange.
1943 (arange_add): Replace incoming "unit" parameter with "abfd" and
1944 "first_arange" pointers. Reorganize/rewrite function body.
1945 (decode_line_info): Change arange_add call to pass bfd and arange
1946 pointers.
1947 (lookup_address_in_line_info_table): Use arange list instead of
1948 individual low/high members. Walk function's arange list to find
1949 lowest PC in list, to test for overlapping functions.
1950 (read_debug_ranges): New function, reads the debug_ranges section.
1951 (lookup_address_in_function_table): Use arange list instead of
1952 individual low/high members. Rewrite to find smallest range that
1953 matches.
1954 (read_rangelist): Read a given rangelist from debug_ranges.
1955 (scan_unit_for_functions): Use arange list instead of individual
1956 low/high members. Handle a DW_AT_ranges attribute.
1957 (parse_comp_unit): Use arange list instead of individual low/high
1958 members. Save comp unit base address. Handle a DW_AT_ranges
1959 attribute.
1960
2796fd96
L
19612005-04-01 H.J. Lu <hongjiu.lu@intel.com>
1962
1963 * elf.c (assign_section_numbers): Really use the kept section.
1964
01b3c8ab
L
19652005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1966
1967 * elf-bfd.h (_bfd_elf_check_kept_section): New.
1968
1969 * elf.c (assign_section_numbers): When sh_link points to a
1970 discarded section, call _bfd_elf_check_kept_section to see if
1971 the kept section can be used. Otherwise reject sh_link
1972 pointing to discarded section.
1973
1974 * elflink.c (_bfd_elf_check_kept_section): New.
1975 (elf_link_input_bfd): Use it.
1976
35090471
AM
19772005-04-01 Alan Modra <amodra@bigpond.net.au>
1978
1979 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
1980 that we no longer need.
1981
7356fed5
AM
19822005-04-01 Alan Modra <amodra@bigpond.net.au>
1983
1984 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
1985 rather than 0.
77623a34 1986 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
7356fed5 1987
28b13744
L
19882005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1989
1990 * elf.c (assign_section_numbers): Fix a typo.
1991
c93625e2
L
19922005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1993
1994 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
1995 error message.
1996 (_bfd_elf_section_already_linked): Likewise.
1997
fddc4048
JG
19982005-03-31 Jerome Guitton <guitton@gnat.com>
1999
2000 * config.in: Regenerate.
2001
2e9ebff5
JG
20022005-03-31 Jerome Guitton <guitton@gnat.com>
2003
c93625e2
L
2004 * config.in (HAVE_DECL_BASENAME): New configure macro.
2005 * configure.in: Check for basename.
2006 * configure: Regenerate.
2e9ebff5 2007
05ea83ed
JB
20082005-03-30 Julian Brown <julian@codesourcery.com>
2009
2010 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
2011 bfd_elf32_is_arm_mapping_symbol_name.
2012 * bfd-in2.h: Regenerate.
2013 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
2014 bfd_elf32_is_arm_mapping_symbol_name.
2015 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
2016 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
2017 (arm_elf_find_function): Likewise.
2018 (elf32_arm_output_symbol_hook): Likewise.
2019
9d2da7ca
JB
20202005-03-30 Julian Brown <julian@codesourcery.com>
2021
2022 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
2023 * bfd-in2.h: Regenerate.
2024 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
2025 bfd_elf32_is_arm_mapping_symbol_name.
2026 (elf32_arm_output_symbol_hook): Likewise.
2027 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
2028 mapping symbols.
2029 (is_arm_mapping_symbol_name): Function moved from here...
2030 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
2031 and made global.
2032
efa9bda4
AL
20332005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
2034
2035 * configure.in: Check for ffs decl and alphabetize.
2036 * config.in: Regenerate.
2037 * configure: Regenerate.
d7128ce4 2038 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
efa9bda4 2039
09a9d560
FF
20402005-03-29 Fred Fish <fnf@specifixinc.com>
2041
2042 * dwarf2.c (struct comp_unit): Fix typo.
2043 (scan_unit_for_functions): Remove unused local variable "name"
2044 and dead code that set it.
2045
ba93b8ac
DJ
20462005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2047 Phil Blundell <philb@gnu.org>
2048
2049 * bfd-in2.h, libbfd.h: Regenerated.
2050 * reloc.c: Add ARM TLS relocations.
2051 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
2052 relocations.
2053 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
2054 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
2055 (elf32_arm_tls_ie32_howto): New.
2056 (elf32_arm_howto_from_type): Support TLS relocations.
2057 (elf32_arm_reloc_map): Likewise.
2058 (elf32_arm_reloc_type_lookup): Likewise.
2059 (TCB_SIZE): Define.
2060 (struct elf32_arm_obj_tdata): New.
2061 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
2062 (elf32_arm_mkobject): New function.
2063 (struct elf32_arm_relocs_copied): Add pc_count.
2064 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
2065 (GOT_TLS_IE): Define.
2066 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
2067 (elf32_arm_link_hash_newfunc): Initialize tls_type.
2068 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
2069 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
2070 (dtpoff_base, tpoff): New functions.
2071 (elf32_arm_final_link_relocate): Handle TLS relocations.
2072 (IS_ARM_TLS_RELOC): Define.
2073 (elf32_arm_relocate_section): Warn about TLS mismatches.
2074 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
2075 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
2076 TLS relocations and pc_count.
2077 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
2078 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
2079 calls.
2080 (elf32_arm_size_dynamic_sections): Handle TLS.
2081 (elf32_arm_finish_dynamic_symbol): Likewise.
2082 (bfd_elf32_mkobject): Define.
2083
71a976dd
DJ
20842005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
2085
2086 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
2087 relocation types. Don't count relocations which will use a PLT.
2088
7e7353ed
JB
20892005-03-29 Joel Brobecker <brobecker@gnat.com>
2090
2091 * elf.c (elfcore_grok_nto_status): Print tid as long.
2092 (elfcore_grok_nto_regs): Likewise.
2093
166856d7
JB
20942005-03-29 Joel Brobecker <brobecker@gnat.com>
2095
40937810 2096 * irix-core.c: Remove some unnecessary prototypes.
166856d7 2097
40f85900
JB
20982005-03-28 Joel Brobecker <brobecker@adacore.com>
2099
2100 * irix-core.c: Convert to ISO C.
2101
aa2e06ba
JB
21022005-03-28 Joel Brobecker <brobecker@adacore.com>
2103
2104 * irix-core.c (do_sections): Replace + by | in expression.
2105 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
2106 to unused parameters to avoid a compiler warning.
2107
832bc186
MK
21082005-03-28 Mark Kettenis <kettenis@gnu.org>
2109
2110 * netbsd-core.c: Convert to ISO C. Fix formatting.
2111
82f0cfbd
EC
21122005-03-24 Eric Christopher <echristo@redhat.com>
2113
2114 * elfxx-mips.c: Revert previous patch.
2115
d7b9976f
NC
21162005-03-24 Nick Clifton <nickc@redhat.com>
2117
2118 * targets.c (_bfd_target_vector): Only include the
2119 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
2120 all targets enabled.
2121
074d327a
NC
21222005-03-24 James E Wilson <wilson@specifixinc.com>
2123
2124 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
2125 (BFD64_BACKENDS): Add elf32-ia64.lo.
2126 * Makefile.in: Regenerate.
2127
cc27e1dc
EC
21282005-03-23 Eric Christopher <echristo@redhat.com>
2129
2130 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
2131 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
2132 after emitting relocation.
2133 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
2134 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
2135 and readonly_reloc.
2136
ed84e695
NC
21372005-03-23 Mike Frysinger <vapier@gentoo.org>
2138 Nick Clifton <nickc@redhat.com>
2139
2140 * config.bfd: Accept any C library to accompany a GNU Linux
2141 implementation, not just the GNU C library.
2142 * configure.in: Likewise.
2143 * configure: Regenerate.
2144
81e1b023
L
21452005-03-22 H.J. Lu <hongjiu.lu@intel.com>
2146
2147 * bfd-in.h (_bfd_elf_provide_symbol): New.
2148 * bfd-in2.h: Regenerated.
2149
2150 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
2151 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
2152 of set_linker_sym.
2153
2154 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
2155 from elf32-ppc.c.
2156
672c2d7e
HPN
21572005-03-22 Hans-Peter Nilsson <hp@axis.com>
2158
2159 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
2160
1fbc7e7a
BW
21612005-03-22 Bob Wilson <bob.wilson@acm.org>
2162
2163 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
2164 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
2165 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
2166 (xtensa_opcode_decode): Rearrange code.
2167
c8e7bf0d
NC
21682005-03-22 Nick Clifton <nickc@redhat.com>
2169
2170 * binary.c: Convert to ISO C90 formatting.
2171 * coff-arm.c: Convert to ISO C90 formatting.
2172 * coffgen.c: Convert to ISO C90 formatting.
2173 * elf32-gen.c: Convert to ISO C90 formatting.
2174 * elf64-gen.c: Convert to ISO C90 formatting.
2175 * hash.c: Convert to ISO C90 formatting.
2176 * ieee.c: Convert to ISO C90 formatting.
2177
28a094c2
DJ
21782005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2179
2180 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
2181 unresolved symbols in R_ARM_NONE relocations.
2182
0945cdfd
DJ
21832005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
2184
2185 * elf32-arm.c (elf32_arm_final_link_relocate): Add
2186 UNRESOLVED_RELOC_P argument. Set it appropriately.
2187 (elf32_arm_relocate_section): Update call to
2188 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
2189 unresolved_reloc instead.
2190
11d2f718
AM
21912005-03-23 Alan Modra <amodra@bigpond.net.au>
2192
2193 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
2194 .gnu.warning.* sections.
2195
76750a2f
AM
21962005-03-22 Alan Modra <amodra@bigpond.net.au>
2197
2198 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
2199 written_address_p.
2200 (ppc_elf_create_linker_section): Don't try to reuse existing section.
2201 (elf_create_pointer_linker_section): Delete info parm. Don't make
2202 h dynamic. Don't set written_address_p.
2203 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
2204 (bfd_put_ptr): Delete.
2205 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
2206 Always write section contents. Assert global sym is def_regular.
2207 Use offset bottom bit as a written flag.
2208 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
2209 calls.
2210
f85f57ad
AM
22112005-03-22 Alan Modra <amodra@bigpond.net.au>
2212
2213 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
2214 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
2215 and end syms.
2216
2dc773a0
NC
22172005-03-21 Nick Clifton <nickc@redhat.com>
2218
2219 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
2220 targets.
2221 (t2a1_bx_pc_insn): Likewise.
2222 (t2a2_noop_insn): Likewise.
2223 (t2a3_b_insn): Likewise.
2224 (t2a1_push_insn): Likewise.
2225 (t2a2_ldr_insn): Likewise.
2226 (t2a3_mov_insn): Likewise.
2227 (t2a4_bx_insn): Likewise.
2228 (t2a5_pop_insn): Likewise.
2229 (t2a6_bx_insn): Likewise.
2230 (coff_arm_relocate_section): Only declare the high_address
2231 variable for non WINCE targets.
2232
644285ef
AM
22332005-03-22 Alan Modra <amodra@bigpond.net.au>
2234
2235 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
2236 SEC_LINKER_CREATED. Attach to dynobj.
2237 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
2238
c9a2f333
AM
22392005-03-21 Alan Modra <amodra@bigpond.net.au>
2240
2241 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
2242 sym_offset. Add name, bss_name, sym_name, sym_val.
2243 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
2244 Add sdata array of elf_linker_section_t.
2245 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
2246 (enum elf_linker_section_enum): Delete.
2247 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
2248 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
2249 the special sections are needed. Adjust htab->sdata refs.
2250 Ensure dynobj is set in sreloc code.
2251 (ppc_elf_size_dynamic_sections): Strip sdata sections.
2252 (ppc_elf_set_sdata_syms): New function.
2253 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
2254 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
2255 sym_val instead of sym_hash.
2256 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
2257
8853c3d3
AM
22582005-03-21 Alan Modra <amodra@bigpond.net.au>
2259
2260 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
2261 (ppc_elf_merge_private_bfd_data): Likewise.
2262
2bb04cf2
AM
22632005-03-21 Alan Modra <amodra@bigpond.net.au>
2264
2265 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
2266 (ppc_elf_create_linker_section): Don't create rel_section.
2267 (elf_create_pointer_linker_section): Don't size relocs.
2268 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
2269 Don't generate relocs.
2270 (ppc_elf_relocate_section): Adjust calls to
2271 elf_finish_pointer_linker_section.
2272
d2663f46
AM
22732005-03-21 Alan Modra <amodra@bigpond.net.au>
2274
2275 * elf32-ppc.c (is_ppc_elf_target): New function.
2276 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
2277 for bfd_target_elf_flavour. Do this test before endian check.
2278 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
2279 (ppc_elf_size_dynamic_sections): Likewise.
2280
6dc132d9
L
22812005-03-20 H.J. Lu <hongjiu.lu@intel.com>
2282
2283 * elf-bfd.h (elf_backend_data): Add int to
2284 elf_backend_section_from_shdr.
2285 (bfd_elf_section_data): Update comment for this_idx.
2286 (_bfd_elf_make_section_from_shdr): Add int.
2287 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2288
2289 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
2290 and use it to set this_idx in bfd_elf_section_data.
2291 (bfd_section_from_shdr): Pass shindex to
2292 _bfd_elf_make_section_from_shdr.
2293 (_bfd_elf_section_from_bfd_section): Use this_idx in
2294 bfd_elf_section_data to find section index.
2295
2296 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
2297 index and pass it to _bfd_elf_make_section_from_shdr.
2298 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
2299 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2300 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2301 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2302 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2303 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2304 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
2305 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2306 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2307
cabd4ccc
DS
23082005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
2309 Ross Ridge <rridge@csclub.uwaterloo.ca>
2310
2311 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
2312 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
2313 cases. Add comment.
2314
7451fd89
L
23152005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2316
2317 * elflink.c (elf_mark_used_section): Remove check for special
2318 sections.
2319
b4677f03
AS
23202005-03-18 Andreas Schwab <schwab@suse.de>
2321
2322 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
2323 from bfd_vma to ia64_insn, remove broken cast.
2324
238d258f
NC
23252005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
2326
8853c3d3 2327 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
238d258f
NC
2328 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
2329 elf_m68k_finish_dynamic_sections): Use it.
2330
b294bdf8
MM
23312005-03-17 Paul Brook <paul@codesourcery.com>
2332 Dan Jacobowitz <dan@codesourcery.com>
2333 Mark Mitchell <mark@codesourcery.com>
2334
2335 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
2336 (elf32_arm_additional_program_headers): Likewise.
2337 (elf_backend_modify_segment_map): Define.
2338 (elf_backend_additional_program_headers): Likewise.
2339 (elf32_arm_symbian_modify_segment_map): Use
2340 elf32_arm_modify_segment_map.
2341
257a4820
L
23422005-03-18 H.J. Lu <hongjiu.lu@intel.com>
2343
2344 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
2345 for special sections.
2346
554220db
AM
23472005-03-18 Alan Modra <amodra@bigpond.net.au>
2348
2349 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
2350 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
2351 section_sym_count param, and return number of section symbols.
2352 (bfd_elf_size_dynamic_sections): Clear section symbol area of
2353 .dynsym contents. Don't bother calling swap_symbol_out on the
2354 first all-zero dynsym.
2355 (elf_mark_used_section): Formatting. Avoid twiddling flags in
2356 special sections like bfd_abs_section.
2357 (bfd_elf_gc_sections): Spelling fix.
2358
36868d45
NC
23592005-03-16 Fred Fish <fnf@specifixinc.com>
2360
2361 PR binutils/790
2362 * dwarf2.c (read_indirect_string): Fix apparent typo, check
2363 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
2364
57316bff
L
23652005-03-16 H.J. Lu <hongjiu.lu@intel.com>
2366
2367 * elflink.c (elf_mark_used_section): New.
2368 (bfd_elf_gc_sections): Call elf_gc_mark_section for
2369 non-relocatable link if we don't do GC.
2370
1ad12f97
NC
23712005-03-16 Nick Clifton <nickc@redhat.com>
2372 Ben Elliston <bje@au.ibm.com>
2373
569acd2c 2374 * configure.in (werror): New switch: Add -Werror to the
1ad12f97 2375 compiler command line. Enabled by default. Disable via
569acd2c 2376 --disable-werror.
1ad12f97
NC
2377 * configure: Regenerate.
2378
3b5d3310
NC
23792005-03-16 Nick Clifton <nickc@redhat.com>
2380
2381 * ecoff.c: Convert to ISO C90 formatting.
2382
25dbc73a
AM
23832005-03-16 Alan Modra <amodra@bigpond.net.au>
2384
2385 * elf32-ppc.c: Divide file into general and linker specific
2386 functions. Sort linker functions into roughly the order in which
2387 they are called by the ELF linker code.
2388
cb2d1ef2
AM
23892005-03-16 Alan Modra <amodra@bigpond.net.au>
2390
2391 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
2392 on section. Correct comment, and add FIXME.
2393 (ppc_elf_additional_program_headers): Don't bump header count for
2394 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
2395 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
2396 do allocate memory if they need it.
2397
34723071
NC
23982005-03-15 Mikkel Krautz <krautz@gmail.com>
2399
2400 * config.bfd (x86_64-elf): Add target.
2401
729ae8d2
AM
24022005-03-15 Alan Modra <amodra@bigpond.net.au>
2403
2404 * po/es.po: Commit new Spanish translation.
2405
f0581930
L
24062005-03-14 H.J. Lu <hongjiu.lu@intel.com>
2407
2408 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
2409 for global symbol when reporting overflow.
2410
390c0e42
JJ
24112005-03-11 Jakub Jelinek <jakub@redhat.com>
2412
2413 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
2414 * libbfd.h: Rebuilt.
2415 * archive.c (_bfd_ar_spacepad): New function.
2416 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
2417 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
2418 coff_write_armap): Use it.
2419 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
2420 uid/gid support.
2421 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
2422
a2633f4e
MK
24232005-03-10 Mark Kettenis <kettenis@gnu.org>
2424
2425 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
2426 has_table to the start of the function.
2427
109f7096
BE
24282005-03-10 Ben Elliston <bje@au.ibm.com>
2429
2430 * archive.c: Include hashtab.h.
2431 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
2432 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
2433 (hash_file_ptr): New function.
2434 (eq_file_ptr): Likewise.
2435 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
2436 * libbfd-in.h: Include hashtab.h.
2437 (struct artdata): Change `cache' member type to htab_t.
2438 * libbfd.h: Rebuild.
2439
664fe1be
DJ
24402005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
2441
2442 * configure.in: Bump version to 2.16.90.
2443 * configure: Regenerated.
2444
0709bb22
JJ
24452005-03-07 Jakub Jelinek <jakub@redhat.com>
2446
2447 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
2448 close is a function like macro in system headers.
2449
b18e2ae5
AM
24502005-03-07 Alan Modra <amodra@bigpond.net.au>
2451
2452 PR ld/778
2453 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
2454 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
2455
1f170678
AM
24562005-03-06 Alan Modra <amodra@bigpond.net.au>
2457
2458 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
2459
06647dfd
AM
24602005-03-05 Alan Modra <amodra@bigpond.net.au>
2461
2462 * po/bfd.pot: Regenerate.
2463
93f3fa99
AM
24642005-03-05 Alan Modra <amodra@bigpond.net.au>
2465
2466 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
2467 with is_func.
2468 (func_desc_adjust): Force dot-syms local in executables as well
2469 as shared libs.
2470
bbe506e8
TS
24712005-03-04 David Daney <ddaney@avtrex.com>
2472
2473 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
2474 '__gnu_local_gp' symbol used by gas -mno-shared.
2475
d27f5fa1
L
24762005-03-03 H.J. Lu <hongjiu.lu@intel.com>
2477
2478 * elf-bfd.h (elf_backend_data): Add "const char *" to
2479 elf_backend_section_from_phdr.
2480
2481 * elf.c (bfd_section_from_phdr): Pass "proc" to the
2482 elf_backend_section_from_phdr hook.
2483
0f20cc35
DJ
24842005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
2485 Joseph Myers <joseph@codesourcery.com>
2486
2487 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
2488 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
2489 and tls_ldm_offset.
2490 (struct mips_elf_got_per_bfd_arg): Add global_count.
2491 (struct mips_elf_count_tls_arg): New.
2492 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
2493 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
2494 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
2495 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
2496 (TLS_RELOC_P): Define.
2497 (TP_OFFSET, DTP_OFFSET): Define.
2498 (dtprel_base, tprel_base): New functions.
2499 (mips_elf_link_hash_newfunc): Initialize tls_type.
2500 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
2501 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
2502 TLS entries.
2503 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
2504 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
2505 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
2506 (mips_tls_got_index): New functions.
2507 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
2508 arguments. Pass them to mips_elf_create_local_got_entry. Use
2509 mips_tls_got_index.
2510 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
2511 Handle TLS entries.
2512 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
2513 mips_elf_create_local_got_entry.
2514 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
2515 arguments. Handle TLS entries.
2516 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
2517 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
2518 TLS entries.
2519 (mips_elf_record_global_got_symbol): Likewise.
2520 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
2521 Count TLS entries.
2522 (mips_elf_merge_gots): Handle TLS entries when merging.
2523 (mips_elf_initialize_tls_index): New function.
2524 (mips_elf_set_global_got_offset): Handle TLS entries.
2525 (mips_elf_adjust_gp): Handle TLS.
2526 (mips_elf_multi_got): Remove redundant call to
2527 mips_elf_resolve_final_got_entries. Initialize global_count.
2528 Correct a comment. Initialize new TLS members of mips_got_info.
2529 Assign TLS GOT indexes for new GOTs.
2530 (mips_elf_create_got_section): Initialize new TLS members of
2531 mips_got_info.
2532 (mips_elf_calculate_relocation): Handle TLS relocs.
2533 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
2534 functions.
2535 (_bfd_mips_elf_always_size_sections): Handle TLS.
2536 (_bfd_mips_elf_size_dynamic_sections): Likewise.
2537 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
2538 changed functions.
2539 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
2540 (_bfd_mips_elf_hide_symbol): Handle TLS.
2541 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
2542 (mips_reloc_map): Add TLS relocs.
2543 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
2544 * elf64-mips.c (mips_elf64_howto_table_rel)
2545 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
2546 * reloc.c: Define new MIPS TLS relocations.
2547 * libbfd.h, bfd-in2.h: Regenerated.
2548
bb14f524
JB
25492005-03-02 Jan Beulich <jbeulich@novell.com>
2550
2551 * Makefile.am: Add dependency of cache.o on libiberty.h.
2552 * cache.c: Include libiberty.h.
2553 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
2554
8c1acd09
ZW
25552005-03-01 Zack Weinberg <zack@codesourcery.com>
2556
2557 * elf.c (bfd_section_from_shdr <default case>): Call
2558 elf_backend_section_from_shdr hook unconditionally, and return
2559 what it returns.
2560 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
2561 * elfxx-target.h (elf_backend_section_from_shdr)
2562 (elf_backend_section_from_phdr): Default to
2563 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
2564 respectively.
2565
70bfecec
AM
25662005-03-01 Alan Modra <amodra@bigpond.net.au>
2567
a67a7b8b
AM
2568 * targets.h: Typo fix.
2569 * bfd-in2.h: Regenerate.
2570
70bfecec
AM
2571 * bout.c (b_out_write_object_contents): Don't use sizeof on host
2572 structs to size on-disk structures.
2573 (b_out_set_section_contents): Size the external struct, not the
2574 internal one for on-disk size.
2575 (b_out_sizeof_headers): Likewise.
2576
ceb1f1ef
AM
25772005-03-01 Alan Modra <amodra@bigpond.net.au>
2578
2579 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
2580 entry points with the func descriptor as well as undefweak.
2581
f67e617a
NC
25822005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
2583
2584 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
2585 present when IMPORT_NAME_UNDOECRATE is used.
2586
af44c138
L
25872005-02-28 H.J. Lu <hongjiu.lu@intel.com>
2588
2589 PR 757
2590 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
2591 int.
2592
2593 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
2594 to _bfd_elf_merge_symbol.
2595
2596 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
2597 unsigned int to return the alignment of the old common symbol
2598 in the dynamic object.
2599 (_bfd_elf_add_default_symbol): Pass NULL to
2600 _bfd_elf_merge_symbol.
2601 (elf_link_add_object_symbols): Pass &old_alignment to
2602 _bfd_elf_merge_symbol. Get the alignment of the new common
2603 symbol in the dynamic object.
2604
10adf131
BE
26052005-02-24 Ben Elliston <bje@au.ibm.com>
2606
2607 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
2608 * format.c (bfd_check_format_matches): Likewise.
2609 * archive.c (BFD_GNU960_ARMAG): Likewise.
2610 (bfd_generic_archive_p): Likewise.
2611 (_bfd_write_archive_contents): Likewise.
2612
60b779bf
L
26132005-02-24 H.J. Lu <hongjiu.lu@intel.com>
2614
2615 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
2616 * configure: Regenerate.
2617
1f02cbd9
JB
26182005-02-24 Julian Brown <julian@sirius.codesourcery.com>
2619
2620 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
2621 COMDAT group sections to have default visibility.
2622
f60ca5e3
AM
26232005-02-24 Alan Modra <amodra@bigpond.net.au>
2624
2625 * coffcode.h (coff_print_aux): Warning fix.
2626 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
2627 instead of section pointer to identify.
2628 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
2629 the correct size buffer for local sym mangling too.
2630 (h8300_bfd_link_add_symbols): Likewise.
2631 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
2632 warning.
2633 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
2634 * elf32-xtensa.c (literal_value_hash): Warning fix.
2635 * versados.c (process_otr): Warning fix.
2636 (versados_canonicalize_reloc): Likewise.
2637 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
2638 * vms.c (fill_section_ptr): Warning fix.
2639
9a5d8e72
L
26402005-02-23 H.J. Lu <hongjiu.lu@intel.com>
2641
2642 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
2643 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
2644
4b6c0f2f
NC
26452005-02-23 Nick Clifton <nickc@redhat.com>
2646
abc0f8d0
NC
2647 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
2648 the relvaddr field of the Elf32_crinfo structure.
2649
9b69b847
NC
2650 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
2651 variables that are passed by reference to
2652 m68hc11_get_relocation_value in case that function does not
2653 initialise them.
2654
90e868ac
NC
2655 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
2656 return statements and replace with a single return at the end of
2657 the function. This helps pacify the flow analysis code in gcc 4.0.
2658
4b6c0f2f
NC
2659 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
2660 strtab to avoid compile time warning.
2661
c3e8c140
BE
26622005-02-23 Ben Elliston <bje@au.ibm.com>
2663
2664 * opncls.c (bfd_zalloc): Document this function.
2665
ebe372c1
L
26662005-02-21 H.J. Lu <hongjiu.lu@intel.com>
2667
2668 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
2669 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
2670 Replace SEC_SHARED with SEC_COFF_SHARED.
2671 (styp_to_sec_flags): Likewise.
2672
2673 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
2674 (TARGET_LITTLE_SYM): Likewise.
2675
2676 * section.c (SEC_ARCH_BIT_0): Removed.
2677 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
2678 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
2679 (SEC_SHARED): Renamed to ...
2680 (SEC_COFF_SHARED): This.
2681 (SEC_BLOCK): Renamed to ...
2682 (SEC_TIC54X_BLOCK): This.
2683 (SEC_CLINK): Renamed to ...
2684 (SEC_TIC54X_CLINK): This.
2685 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
2686 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
2687 end.
2688 * bfd-in2.h: Regenerated.
2689
26bf4e33
FF
26902005-02-21 Fred Fish <fnf@specifixinc.com>
2691
2692 * dwarf2.c (find_abstract_instance_name): Call recursively
2693 to handle a DW_AT_specification.
2694
e6daada3
TS
26952005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2696
2697 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
2698 mips_elf_create_dynamic_relocation,
2699 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
2700 Remove #if 0'd code.
2701
d25604af
AM
27022005-02-21 Alan Modra <amodra@bigpond.net.au>
2703
2704 * Makefile.am: Run "make dep-am"
2705 * Makefile.in: Regenerate.
2706
fedf8d51
AM
27072005-02-21 Alan Modra <amodra@bigpond.net.au>
2708
2709 * coffgen.c (bfd_coff_get_comdat_section): Check that
2710 coff_section_data isn't NULL.
2711
f075ee0c
AM
27122005-02-21 Alan Modra <amodra@bigpond.net.au>
2713
2714 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
2715 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
2716 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
2717 useless assignments.
2718 (xcoff_write_archive_contents_big): Likewise.
2719 (_bfd_xcoff_put_ldsymbol_name): Likewise.
2720 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
2721 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
2722 * cofflink.c (process_embedded_commands): Warning fixes.
2723 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
2724 Warning fixes.
2725 * dwarf2.c: Warning fixes.
2726 * elf-bfd.h: Likewise.
2727 * elf-eh-frame.c: Likewise.
2728 * elf-strtab.c: Likewise.
2729 * elf.c: Likewise.
2730 * elf32-m68k.c: Likewise.
2731 * elf32-ppc.c: Likewise.
2732 * elf32-sh-symbian.c: Likewise.
2733 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
2734 * elf64-sh64.c: Likewise.
2735 * peicode.h: Likewise.
2736 * elf64-mmix.c: Warning fixes.
2737 * elfcode.h: Likewise.
2738 * elfxx-mips.c: Likewise.
2739 * libbfd-in.h: Likewise.
2740 * libbfd.c: Likewise.
2741 * mach-o.c: Likewise.
2742 * merge.c: Likewise.
2743 * mmo.c: Likewise.
2744 * opncls.c: Likewise.
2745 * pef.c: Likewise.
2746 * srec.c: Likewise.
2747 * vms-hdr.c: Likewise.
2748 * vms-tir.c: Likewise.
2749 * xtensa-isa.c: Likewise.
2750 * xtensa-modules.c: Likewise.
2751 * xsym.c: Likewise.
2752 (pstrcmp): Use correct choice of string lengths. Fix return value.
2753 (bfd_sym_module_name): Correct string length.
2754 * bfd-in2.h: Regenerate.
2755 * libbfd.h: Regenerate.
2756
68320ddb
AO
27572005-02-17 Alexandre Oliva <aoliva@redhat.com>
2758
2759 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
fedf8d51 2760 uninitialized check_segment[1] in TLSMOFF case.
68320ddb
AO
2761 Reported by Alan Modra.
2762 (elf32_frv_relocate_section): Improve errors and warnings.
2763
1808e341
AM
27642005-02-17 Alan Modra <amodra@bigpond.net.au>
2765
2766 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
2767
5ff625e9
AM
27682005-02-16 Alan Modra <amodra@bigpond.net.au>
2769
2770 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
2771 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
2772 * pef.c (bfd_pef_scan): Don't ignore return value of
2773 bfd_pef_scan_start_address.
7e3102a7
AM
2774 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
2775 bfd_mach_o_scan_start_address.
2776 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
2777 * elfxx-mips.c: Remove unnecessary prototypes.
2778 (sort_dynamic_relocs_64): Abort if not BFD64.
5ff625e9 2779
92b7a70f
AM
27802005-02-16 Alan Modra <amodra@bigpond.net.au>
2781
2782 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
2783 Skip toc reloc adjust if reloc_count is zero.
2784
d6f16593 27852005-02-15 Nigel Stephens <nigel@mips.com>
fedf8d51 2786 Maciej W. Rozycki <macro@mips.com>
d6f16593
MR
2787
2788 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2789 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2790 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2791 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2792 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2793 dst_mask.
2794 (mips16_gprel_reloc): Remove bit shuffling; call
2795 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2796 and _bfd_mips16_elf_reloc_shuffle() instead.
2797 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2798 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2799 relocs.
2800 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
2801 elf_mips16_howto_table_rel.
2802 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
2803 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
2804 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2805 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
2806 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2807 dst_mask.
2808 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
2809 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
2810 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
2811 placeholders.
2812 (mips16_gprel_reloc): Remove bit shuffling; call
2813 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2814 and _bfd_mips16_elf_reloc_shuffle() instead.
2815 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2816 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2817 relocs.
2818 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
2819 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
2820 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2821 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2822 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2823 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2824 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2825 dst_mask.
2826 (mips16_gprel_reloc): Remove bit shuffling; call
2827 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2828 and _bfd_mips16_elf_reloc_shuffle() instead.
2829 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2830 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2831 relocs.
2832 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
2833 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
2834 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
2835 handle bit shuffling for MIPS16 relocs.
2836 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2837 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
2838 and _bfd_mips16_elf_reloc_shuffle().
2839 (_bfd_mips_elf_generic_reloc): Likewise.
2840 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
2841 and R_MIPS16_LO16.
2842 (mips_elf_obtain_contents): Remove bit shuffling.
2843 (mips_elf_perform_relocation): Likewise; call
2844 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
2845 instead.
2846 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
2847 and R_MIPS16_LO16.
2848 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
2849 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2850 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
2851 (BFD_RELOC_MIPS16_HI16_S): Likewise.
2852 (BFD_RELOC_MIPS16_LO16): Likewise.
2853 * bfd-in2.h: Regenerate.
2854 * libbfd.h: Regenerate.
2855
0ca3e455
JB
28562005-02-15 Jan Beulich <jbeulich@novell.com>
2857
2858 * elfxx-ia64.c (ia64_howto_table): Correct strings for
2859 R_IA64_DTPMOD64[LM]SB.
2860
c5509b92
L
28612005-02-14 H.J. Lu <hongjiu.lu@intel.com>
2862
2863 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
2864 backward branch in the same section.
2865 (elfNN_ia64_relocate_section): Inform users that the input
2866 section is too big to relax br instruction when overflow
2867 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
2868 and R_IA64_PCREL21F.
2869
5cba516c
NC
28702005-02-14 Orjan Friberg <orjanf@axis.com>
2871
2872 * elfcore.h (elf_core_file_p): Move the call to
2873 elf_backend_object_p to allow the correct machine to be set before
2874 processing the program headers.
2875
b59a68e1
NC
28762005-02-14 Nick Clifton <nickc@redhat.com>
2877
2878 PR binutils/716
2879 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
2880 aware flag from the input bfd to the output bfd.
2881
254f0426
MR
28822005-02-11 Maciej W. Rozycki <macro@mips.com>
2883
2884 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
2885 R_MIPS_LITERAL relocations for external symbols.
2886 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
2887 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
2888
e91cdea7
L
28892005-02-11 H.J. Lu <hongjiu.lu@intel.com>
2890
2891 * bfd-in2.h: Rebuilt.
2892
67687978
PB
28932005-02-11 Paul Brook <paul@codesourcery.com>
2894
2895 * elf-bfd.h (struct elf_link_hash_table): Add
2896 is_relocatable_executable.
2897 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
2898 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
2899 symbols in relocatable executables.
2900 (bfd_elf_record_link_assignment): Create dynamic section symbols in
2901 relocatable executables.
2902 (_bfd_elf_link_renumber_dynsyms): Ditto.
2903 (bfd_elf_final_link): Ditto.
2904 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
2905 relocations into relocatable executables.
2906 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
2907 executables. Also copy absolute relocations.
2908 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
2909 in relocatable executables.
2910 (allocate_dynrelocs): Copy relocations for relocatable executables.
2911 Output dynamic symbols for symbols defined in linker scripts.
2912
ca724bf2
NC
29132005-02-11 Nick Clifton <nickc@redhat.com>
2914
4b74b983
NC
2915 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
2916 to avoid a compile time warning.
2917
ca724bf2
NC
2918 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
2919 BFD_ASSERT.
2920
3e25964f
NC
2921 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
2922 inclusion of coffcode.h so that it is actually picked up.
2923
cb7a88a4
NC
2924 * coffcode.h (coff_std_swap_table): Add an unused attribute in
2925 case it is not used.
2926
596c83ec
NC
2927 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
2928 structure and macro.
2929
6c408f53
NC
2930 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
2931 array.
2932
d5b2f13b
NC
2933 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
2934 to protect the declaration of this array.
2935
169a6afd
NC
2936 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
2937 Avoid call to memcpy with a size of 0.
2938
2917689a
AM
29392005-02-12 Alan Modra <amodra@bigpond.net.au>
2940
2941 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
2942 old-style branches to undefined dot-symbols which will be
2943 satisfied by a plt call.
2944
40d16e0b
AM
29452005-02-11 Alan Modra <amodra@bigpond.net.au>
2946
2947 * elf64-ppc.c (move_plt_plist): New function, extracted from..
2948 (ppc64_elf_copy_indirect_symbol): ..here.
2949 (func_desc_adjust): Use move_plt_plist.
2950
e37c699c
PB
29512005-02-10 Paul Brook <paul@codesourcery.com>
2952
2953 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
2954
6fa3860b
PB
29552005-02-10 Paul Brook <paul@codesourcery.com>
2956
2957 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
2958 symbols local.
2959 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
2960 (elf_link_renumber_local_hash_table_dynsyms): New function.
2961 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
2962
d457dcf6
JJ
29632005-02-10 Jakub Jelinek <jakub@redhat.com>
2964
2965 * bfd-in.h (BFD_LINKER_CREATED): Define.
2966 * bfd-in2.h: Rebuilt.
2967 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
2968 BFD_LINKER_CREATED bfds when determining input bfds without
2969 .note.GNU-stack section.
2970
7f05722e
MR
29712005-02-10 Maciej W. Rozycki <macro@mips.com>
2972
2973 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
2974 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
2975 relocations against external symbols unchanged.
2976
ccf5f610
PB
29772005-02-08 Paul Brook <paul@codesourcery.com>
2978
2979 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
2980 sections.
2981
370a0e1b
HPN
29822005-02-08 Hans-Peter Nilsson <hp@axis.com>
2983
2984 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
2985 prefix here.
2986
99277196
MR
29872005-02-07 Maciej W. Rozycki <macro@mips.com>
2988
2989 * elf64-mips.c: Fix formatting throughout.
2990
6422fbef
MR
29912005-02-07 Maciej W. Rozycki <macro@mips.com>
2992
2993 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
2994
303e4c21
AO
29952005-02-07 Alexandre Oliva <aoliva@redhat.com>
2996
2997 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
2998 *ABS*/*UND* sections.
2999 (elf32_frv_relocate_section): Move zero-addend-required error...
3000 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
3001 missing needed TLS section.
3002
c3864421
HPN
30032005-02-07 Hans-Peter Nilsson <hp@axis.com>
3004
3005 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
3006 being the last symbol.
9f400ee9
HPN
3007 (aout_link_add_symbols): Just return TRUE if a warning
3008 symbol was last.
c3864421 3009
765f2ef6
MR
30102005-02-07 Maciej W. Rozycki <macro@mips.com>
3011
3012 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
3013 R_MIPS_GPREL32 relocations against external symbols.
3014 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
3015 comment.
3016
1b3a8575
AM
30172005-02-07 Alan Modra <amodra@bigpond.net.au>
3018
3019 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
3020 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
3021 elf_string_from_elf_strtab.
3022 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
3023 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
3024 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
3025 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
3026 looking at cached symtab info first, before iterating over headers.
3027 For SHT_REL and SHT_RELA, load dynsymtab if needed.
3028 * elfcode.h (elf_object_p): Don't load section header stringtab
3029 specially.
3030
90f487df
L
30312005-02-06 H.J. Lu <hongjiu.lu@intel.com>
3032
3033 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
3034 against protected function when building shared library.
3035
3036 PR 584
3037 * elf64-x86-64.c (is_32bit_relative_branch): New.
3038 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
3039 protected function symbol when building shared library for
3040 32bit relative branch instruction.
3041
c4f68ce3
AM
30422005-02-06 Alan Modra <amodra@bigpond.net.au>
3043
3044 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
3045 syms when doing a relocatable link.
3046 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
3047 at u.def.section.
3048 (ppc64_elf_tls_setup): Likewise.
3049 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
3050
908b32fc
AM
30512005-02-04 Alan Modra <amodra@bigpond.net.au>
3052
3053 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
3054 (link_hash_newfunc): Clear all locals using memset.
3055 (make_fdh): Remove flags param. Always create fake func desc
3056 weak. Link the descriptor with the code entry sym.
3057 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
3058 (add_symbol_adjust): Adjust make_fdh call.
3059 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
3060 descriptor to strong undefined if code entry is strong.
3061
4ea42fb7
AM
30622005-02-04 Alan Modra <amodra@bigpond.net.au>
3063
3064 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
3065 lookup here. Set to new before calling bfd_link_repair_undef_list.
3066 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
3067
10d86c8a
AM
30682005-02-03 Alan Modra <amodra@bigpond.net.au>
3069
3070 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
3071
11f25ea6
AM
30722005-02-03 Alan Modra <amodra@bigpond.net.au>
3073
3074 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
3075 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
3076 before the as-needed lib was loaded. Abort on unexpected refs.
3077
4f40114d
AM
30782005-02-02 Alan Modra <amodra@bigpond.net.au>
3079
ec13b3bb
AM
3080 * elflink.c (elf_smash_syms): Expand comments.
3081 (elf_link_add_object_symbols): Only call elf_smash_syms for
3082 as-needed dynamic objects.
3083
4f40114d
AM
3084 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
3085 everything, just the field specific to ia64.
336549c1 3086 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
4f40114d 3087
bb700d78
AM
30882005-02-01 Alan Modra <amodra@bigpond.net.au>
3089
3090 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
3091 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
3092 undefined syms.
3093 (struct add_symbol_adjust_data): New.
3094 (add_symbol_adjust): Make an undefweak func desc for old ABI
3095 objects to link with --as-needed shared libs. Return fail status.
3096 Don't adjust old ABI func entry sym to weak if func desc syms
3097 isn't defined.
3098 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
3099 and return status.
3100
1ffd1c2f
HPN
31012005-02-01 Hans-Peter Nilsson <hp@axis.com>
3102
3103 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
3104 for clarity.
3105
77cfaee6
AM
31062005-02-01 Alan Modra <amodra@bigpond.net.au>
3107
3108 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
3109 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
3110 remove anything but new and undefweak.
3111 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
3112 existing _DYNAMIC.
3113 (_bfd_elf_create_dynamic_sections): Formatting.
3114 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
3115 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
3116 (struct elf_smash_data): New.
3117 (elf_smash_syms): New function.
3118 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
3119 unneeded dynamic objects to loaded list.
3120 (elf_link_output_extsym): Don't handle as-needed here. Strip
3121 bfd_link_hash_new symbols.
3122 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3123 delref when dynindx is already -1.
3124 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
3125 symbols.
3126 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
3127
b15c48d1
BE
31282005-02-01 Ben Elliston <bje@au.ibm.com>
3129
3130 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
3131
0983f4eb 31322005-02-01 Ben Elliston <bje@au.ibm.com>
0e71e495
BE
3133
3134 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
3135 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
3136 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
3137 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
3138 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
3139 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
3140 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
3141 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
3142 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
3143 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
3144 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
11d02c41 3145 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
0e71e495
BE
3146 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
3147 throughout. Similarly, collapse #if 1'd code.
3148
31492005-02-01 Ben Elliston <bje@au.ibm.com>
3150
0983f4eb
BE
3151 * elf-bfd.h (bfd_elf_discard_group): Remove.
3152 * elf.c (bfd_elf_discard_group): Likewise.
3153 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
3154
8c946ed5
RS
31552005-01-31 Richard Sandiford <rsandifo@redhat.com>
3156
3157 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
3158 (_bfd_elf_eh_frame_address_size): Declare.
3159 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
3160 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
3161 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
3162 (elf_backend_eh_frame_address_size): Define.
3163 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
3164 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
3165 size from the new backend hook.
3166 (_bfd_elf_write_section_eh_frame): Likewise.
3167 (_bfd_elf_eh_frame_address_size): New function.
3168
c46f8c51
AC
31692005-01-31 Andrew Cagney <cagney@gnu.org>
3170
3171 * configure: Regenerate to track ../gettext.m4.
3172
5cd3778d
MM
31732005-01-31 Mark Mitchell <mark@codesourcery.com>
3174
3175 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
3176 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
ec13b3bb 3177
d6486796
NC
31782005-01-31 Nick Clifton <nickc@redhat.com>
3179
3180 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
3181 sparc-lynxos, vax-vms) be obsolete.
3182
b1342370
DJ
31832005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
3184
3185 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
3186 * elf32-arm.c (ELF_MINPAGESIZE): Define.
3187 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
3188 * elfcode.h (elf_object_p): Use minpagesize instead of
3189 maxpagesize.
3190 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
3191 (elfNN_bed): Include ELF_MINPAGESIZE.
3192
319850b4
JB
31932005-01-28 Julian Brown <julian@codesourcery.com>
3194
3195 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3196 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
3197 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
3198 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
ec13b3bb 3199 passing flag value from ld. Set flag value in global hash table entry.
319850b4 3200 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
ec13b3bb 3201 relocation.
319850b4 3202
a53bf506
AC
32032005-01-27 Andrew Cagney <cagney@gnu.org>
3204
3205 * configure: Regenerate to track ../gettext.m4 change.
3206
dc4c9c19
MM
32072005-01-25 Mark Mitchell <mark@codesourcery.com>
3208
3209 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
ec13b3bb 3210 SymbianOS.
dc4c9c19 3211
90219bd0
AO
32122005-01-25 Alexandre Oliva <aoliva@redhat.com>
3213
3214 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
3215 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
3216 for TLSMOFF.
3217 * reloc.c: Add R_FRV_TLSMOFF.
3218 * elf32-frv.c (elf32_frv_howto_table): Likewise.
3219 (frv_reloc_map, frv_reloc_type_lookup): Map it.
3220 (elf32_frv_relocate_section): Handle it.
3221 (elf32_frv_check_relocs): Likewise.
3222 * libbfd.h, bfd-in2.h: Rebuilt.
3223 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
3224 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
3225 when given an undefweak TLS symbol. Fix constant TLS PLT entries
3226 such that they return the constant in gr9.
3227 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
3228 symbols.
3229 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
3230 too, such that they shrink on relaxation.
3231 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
3232 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
3233 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
3234 if we can guarantee the use of 16-bit constants.
3235 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
3236 Introduce TLS support for FR-V FDPIC.
3237 * reloc.c: Add TLS relocations.
3238 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
3239 (elf32_frv_rel_tlsdesc_value_howto): New.
3240 (elf32_frv_rel_tlsoff_howto): New.
3241 (frv_reloc_map): Add new mappings.
3242 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
3243 reloc information.
3244 (frvfdpic_dynamic_got_plt_info): New.
3245 (frvfdpic_plt_tls_ret_offset): New.
3246 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
3247 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
3248 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
3249 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
3250 section as local.
3251 (struct frvfdpic_relocs_info): Add TLS fields.
3252 (frvfdpic_relocs_info_hash): Warning clean up.
3253 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
3254 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
3255 (FRVFDPIC_TLS_BIAS): Define.
3256 (tls_biased_base): New.
3257 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
3258 relocations.
3259 (frv_reloc_type_lookup): Likewise.
3260 (frvfdpic_info_to_howto_rel): Likewise.
3261 (elf32_frv_relocate_section): Likewise.
3262 (_frv_create_got_section): Create the PLT section here.
3263 (elf32_frvfdpic_create_dynamic_sections): Not here.
3264 (_frvfdpic_count_nontls_entries): Move out of...
3265 (_frvfdpic_count_got_plt_entries): ... here.
3266 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
3267 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
3268 support.
3269 (_frvfdpic_relax_tls_entries): New.
3270 (_frvfdpic_compute_got_alloc_data): Add TLS support.
3271 (_frvfdpic_get_tlsdesc_entry): New.
3272 (_frvfdpic_assign_got_entries): Add TLS support.
3273 (_frvfdpic_assign_plt_entries): Likewise.
3274 (_frvfdpic_reset_got_plt_entries): New.
3275 (_frvfdpic_size_got_plt): Move out of...
3276 (elf32_frvfdpic_size_dynamic_sections): ... here.
3277 (_frvfdpic_relax_got_plt_entries): New.
3278 (elf32_frvfdpic_relax_section): New.
3279 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
3280 (elf32_frv_check_relocs): Add TLS support.
3281 (bfd_elf32_bfd_relax_section): Define for FDPIC.
3282 * libbfd.h, bfd-in2.h: Rebuilt.
3283
8615f3f2
AM
32842005-01-25 Alan Modra <amodra@bigpond.net.au>
3285
3286 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
3287 loadable reloc sections.
3288 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
3289 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
3290
7e9f0867
AM
32912005-01-25 Alan Modra <amodra@bigpond.net.au>
3292
3293 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
3294 sections immediately when linking shared libs. Instead, wait until
3295 we know a lib is needed.
3296 (_bfd_elf_link_create_dynstrtab): Extract from..
3297 (_bfd_elf_link_create_dynamic_sections_): ..here.
3298 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
3299 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
3300 for non-existent .dynamic.
3301 (elf_link_output_extsym): Don't complain about undefined symbols
3302 in as-needed dynamic libs that aren't actually linked.
3303
45181ed1
AC
33042005-01-24 Andrew Cagney <cagney@gnu.org>
3305
3306 * configure: Regenerate, ../gettext.m4 was updated.
3307
753e3eb6
BE
33082005-01-21 Ben Elliston <bje@au.ibm.com>
3309
3310 * aout-encap.c: Remove unused file.
3311
1c16dfa5
L
33122005-01-19 H.J. Lu <hongjiu.lu@intel.com>
3313
3314 PR 679
3315 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
3316 non-function symbols are local.
3317 (_bfd_elf_symbol_refs_local_p): Likewise.
3318
1449d79b
AM
33192005-01-18 Alan Modra <amodra@bigpond.net.au>
3320
3321 * bfd.c (bfd_link_just_syms): Add abfd param.
3322 * bfd-in2.h: Regenerate.
3323
dcf507a6
RS
33242005-01-17 Richard Sandiford <rsandifo@redhat.com>
3325
3326 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
3327 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
3328 instructions. If the amount of padding is known, reduce the size
3329 of the CIE or FDE by that amount.
3330
2c42be65
RS
33312005-01-17 Richard Sandiford <rsandifo@redhat.com>
3332
3333 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
3334 augmentation_size. Use bfd_signed_vmas for data_align.
3335 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
3336 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
3337 functions. Don't read past the end of the enclosing CIE or FDE.
3338 (skip_bytes): New utility function.
3339 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
3340 sanity checking.
3341 (_bfd_elf_write_section_eh_frame): Use new functions.
3342
acfe5567
RS
33432005-01-17 Richard Sandiford <rsandifo@redhat.com>
3344
3345 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
3346 assert-style REQUIRE() macro to handle sanity checks.
3347
c0c28ab8
L
33482005-01-17 H.J. Lu <hongjiu.lu@intel.com>
3349
3350 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
3351 (comp_unit): Here.
3352 (read_unsigned_leb128): Removed.
3353 (read_signed_leb128): Removed.
3354 (find_abstract_instance_name): Updated.
3355 (parse_comp_unit): Accept info_ptr_unit.
3356 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
3357 comp unit and pass it to parse_comp_unit.
3358
3359 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
3360 (read_signed_leb128): Moved to ...
3361 * libbfd.c: Here.
3362
3363 * libbfd-in.h (read_unsigned_leb128): New prototype.
3364 (read_signed_leb128): Likewise.
3365 * libbfd.h: Regenerated.
3366
e38bc3b5
NC
33672005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
3368 Nick Clifton <nickc@redhat.com>
3369
3370 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
3371 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
3372 arch_sh4a_nofpu_up in order to match the external names and make the
3373 testsuite's job easier.
3374 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
3375 names.
3376 * bfd-in2.h: Regenerate.
3377
8fb84ecc
AC
33782005-01-15 Andrew Cagney <cagney@gnu.org>
3379
3380 * bfd.m4: New file.
3381 * acinclude.m4: Move BFD_NEED_DECLARATION,
3382 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
3383 the new file bfd.m4. Include ../bfd/bfd.m4.
3384 * configure: Re-generate.
8615f3f2 3385
b4a38de6
AM
33862005-01-12 Alan Modra <amodra@bigpond.net.au>
3387
3388 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
3389 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
3390 reaching PLT.
3391 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
3392 R_PPC_RELAX32PC_PLT.
3393
3eb128b2
AM
33942005-01-11 Alan Modra <amodra@bigpond.net.au>
3395
3396 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
3397 symbols.
3398 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
3399 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
3400 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
3401 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
3402 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
3403 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
3404 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
3405 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3406 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3407 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
3408 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
3409 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
3410 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3411 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3412
264a1fe0
AM
34132005-01-11 Alan Modra <amodra@bigpond.net.au>
3414
3415 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
3416 .dynsbss flags.
3417
5c4504f7
NC
34182005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
3419
3420 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
3421 * bfd-in2.h: Regenerate.
3422 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
3423 to support these new machine values.
3424 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
3425 the maxq10.
3426 (bfd_maxq_arch): Update values for the maxq20.
3427
669460c7
EB
34282005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
3429
3430 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
3431 non-shared object, do not reserve space in .plt and .rela.plt for
3432 regular symbols neither defined nor referenced in shared objects.
3433
a51a7930
EB
34342005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3435
01aac484
EB
3436 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
3437 to zero the structure.
3438 (create_got_section): Use BFD_ASSERT instead of abort.
a51a7930
EB
3439 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
3440 'srelgot' fields.
3441 (create_got_section): New function.
3442 (sparc64_elf_create_dynamic_sections): Likewise.
3443 (sparc64_elf_check_relocs): Invoke create_got_section instead of
3444 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
3445 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
3446 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
3447 (sparc64_elf_finish_dynamic_symbol): Likewise.
3448 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
3449 (elf_backend_create_dynamic_sections): Define to
3450 sparc64_elf_create_dynamic_sections.
3451
151e5294
EB
34522005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
3453
3454 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
3455 (elf_backend_omit_section_dynsym): Define to it.
3456 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
3457 (elf_backend_omit_section_dynsym): Define to it.
3458
6f79b219
JJ
34592005-01-07 Jakub Jelinek <jakub@redhat.com>
3460
3461 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
3462 PT_DYNAMIC segment, unless .dynamic.
3463
4e7fd91e
PB
34642005-01-06 Paul Brook <paul@codesourcery.com>
3465
3466 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
3467 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
3468 * configure: Regenerate.
3469 * elf32-arm.c: Add VxWorks target bfd.
3470 (USE_REL): Remove.
3471 (elf32_arm_link_hash_table): Add use_rel.
3472 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
3473 elf32_arm_relocate_section): Replace USE_REL with runtime check.
3474 Correct offset calculation for RELA case.
3475 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
3476 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
3477 (elf32_arm_vxworks_link_hash_table_create): New function.
3478 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
3479 (bfd_elf32_littlearm_vxworks_vec): Ditto.
3480 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
3481
4c52953f
AM
34822005-01-06 Alan Modra <amodra@bigpond.net.au>
3483
3484 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
3485 multi_toc_needed.
3486 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
3487 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
3488 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
3489 (ppc64_elf_next_toc_section): Heed no_multi_toc.
3490 (ppc64_elf_reinit_toc): Set multi_toc_needed.
3491 (toc_adjusting_stub_needed): Rewrite.
3492 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
3493 toc tests. Adjust for toc_adjusting_stub_needed changes.
3494 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
3495 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
3496 * section.c: Expand comment on backend bits.
3497 * bfd-in2.h: Regenerate.
3498 * libbfd.h: Regenerate.
3499
f03d65b4
AM
35002005-01-06 Alan Modra <amodra@bigpond.net.au>
3501
3502 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
3503 toc adjusting stub, do not test source section flags.
3504
8af139b3
EB
35052005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
3506
3507 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
3508 from STABS debugging sections again.
3509
06f22d7e
FF
35102005-01-05 Fred Fish <fnf@specifixinc.com>
3511
3512 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
3513 (find_abstract_instance_name): New function.
3514 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
3515 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
3516 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
3517
83a358aa
PB
35182004-12-31 Paul Brook <paul@copdesourcery.com>
3519
3520 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
3521
b996922c
AM
35222004-12-31 Alan Modra <amodra@bigpond.net.au>
3523
3524 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
3525 Commit missing changes from 2004-12-22.
3526 * bfd-in2.h: Regenerate.
3527
17a83432
TL
35282004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
3529
3530 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
3531
d69f560c
KW
35322004-12-21 Kris Warkentin <kewarken@qnx.com>
3533
3534 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
3535 Add 'base' argument for constructing register sections. Reformat.
3536 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
3537 gp and fp regs. Reformat.
4c52953f 3538
750bce0e
NC
35392004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
3540
3541 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
3542 * bfd-in2.h: Regenerate.
3543 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
3544 (avr_reloc_map): Likewise.
3545 (avr_final_link_relocate): Likewise.
3546
a5db907e
AM
35472004-12-22 Alan Modra <amodra@bigpond.net.au>
3548
3549 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
3550 as-needed dynamic libs as undefined.
3551 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
3552 libs when finding they are needed.
3553
8860955f
AM
35542004-12-20 Alan Modra <amodra@bigpond.net.au>
3555
3556 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
3557 (opd_entry_value): Use opd_relocs if available.
3558 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
3559 copy .opd relocations to opd_relocs.
3560 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
3561
1e50d24d
RS
35622004-12-16 Richard Sandiford <rsandifo@redhat.com>
3563
3564 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
3565 * elf32-v850.c (v850_elf_howto_table): Add entry for
3566 R_V850_LO16_SPLIT_OFFSET.
3567 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
3568 (v850_elf_perform_lo16_relocation): New function, extracted from...
3569 (v850_elf_perform_relocation): ...here. Use it to handle
3570 R_V850_LO16_SPLIT_OFFSET.
3571 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
3572 R_V850_LO16_SPLIT_OFFSET.
3573 * libbfd.h, bfd-in2.h: Regenerate.
3574
2fbd2a87
NC
35752004-12-14 P.J. Darcy <darcypj@us.ibm.com>
3576
3577 * config.bfd: Add s390x-ibm-tpf support.
3578
06302770
TL
35792004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
3580
8860955f 3581 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
06302770
TL
3582 to prototype, to make hash info available.
3583 Prevent wrapped symbols from being adjusted twice.
3584
c314987d
RS
35852004-12-14 Richard Sandiford <rsandifo@redhat.com>
3586
3587 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
3588 overflow for calls to undefined weak symbols.
3589
5c799c07
AM
35902004-12-11 Alan Modra <amodra@bigpond.net.au>
3591
3592 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
3593 canonical sections syms have a name.
3594
645ea6a9
AM
35952004-12-11 Alan Modra <amodra@bigpond.net.au>
3596
3597 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
3598 have been adjusted for output.
3599 (ppc64_elf_relocate_section): Mark sections with reloc_done.
3600
0e2cfdce
AM
36012004-12-10 Alan Modra <amodra@bigpond.net.au>
3602
be8dd2ca
AM
3603 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
3604 add symtab_hdr param.
0e2cfdce
AM
3605 (group_signature): Update calls.
3606 * elf-bfd.h (bfd_elf_sym_name): Update.
3607 * elf32-ppc.c (ppc_elf_relocate_section): Update.
8860955f
AM
3608 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
3609 (ppc64_elf_relocate_section): Update.
0e2cfdce
AM
3610 * elflink.c (elf_link_input_bfd): Update.
3611
138f35cc
JJ
36122004-12-10 Jakub Jelinek <jakub@redhat.com>
3613
3614 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
3615 st_shndx on STT_SECTION sections.
3616
f9cfae62
DJ
36172004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
3618
3619 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
3620 ELF section symbols.
3621
0d2e43ed
ILT
36222004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
3623
1367d393
ILT
3624 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
3625 return a real value, unless it is a PLT symbol.
3626 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
3627 bal if possible.
3628
74f79d8d
ILT
3629 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
3630 R_MIPS_JALR entry to 0.
3631
0d2e43ed
ILT
3632 * archures.c: Define bfd_mach_mips9000.
3633 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
3634 (mips_set_isa_flags): Handle bfd_mach_mips9000.
3635 * cpu-mips.c (I_mips9000): Define.
3636 (arch_info_struct): Add case for bfd_mach_mips9000.
3637 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
3638 * bfd-in2.h: Regenerate.
3639
728b2f21
ILT
36402004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
3641
3642 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
3643 overflow.
3644
45ab555d
BE
36452004-12-07 Ben Elliston <bje@gnu.org>
3646
3647 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
3648
1511ddaf
DJ
36492004-12-06 Daniel Jacobowitz <dan@debian.org>
3650
3651 Suggested by Fergal Daly <fergal@esatclear.ie>:
3652 * simple.c (simple_dummy_multiple_definition): New function.
3653 (bfd_simple_get_relocated_section_contents): Use it.
3654
36552004-12-03 Jan Beulich <jbeulich@novell.com>
57426232
JB
3656
3657 * elf.c (elf_find_function): Don't use the last file symbol ever,
3658 seen, but the last one seen prior to the symbol being reported.
3659 Don't report a filename at all for global symbols when that might
3660 be ambiguous/wrong.
3661
94a3258f
PB
36622004-12-01 Paul Brook <paul@codesourcery.com>
3663
3664 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
3665 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
3666 version.
3667
529fcb95
PB
36682004-12-01 Paul Brook <paul@codesourcery.com>
3669
3670 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
3671 sections undefined.
3672
dea514f5
PB
36732004-11-30 Paul Brook <paul@codesourcery.com>
3674
3675 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
3676 no_pipeline_knowledge
3677 (elf32_arm_link_hash_table_create): Ditto.
3678 (bfd_elf32_arm_process_before_allocation): Ditto.
3679 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
3680 handling.
3681 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
3682 prototype.
3683 * bfd-in2.h: Regenerate.
3684
edfc032f
AM
36852004-11-30 Randolph Chung <tausq@debian.org>
3686
3687 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
3688 (elf32_hppa_grok_psinfo): New function.
3689 (elf_backend_grok_prstatus): Define.
3690 (elf_backend_grok_psinfo): Define.
3691
0be9069d
L
36922004-11-24 H.J. Lu <hongjiu.lu@intel.com>
3693
3694 PR 574:
3695 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
3696
47cc2cf5
PB
36972004-11-24 Paul Brook <paul@codesourcery.com>
3698
3699 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
3700
0beaef2b
PB
37012004-11-24 Paul Brook <paul@codesourcery.com>
3702
3703 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
3704 (elf32_arm_swap_symbol_out): New function.
3705 (elf32_arm_size_info): Add.
3706 (elf_backend_size_info): Define.
3707
3dd2fcf0
DA
37082004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3709
3710 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
3711 make_bfd_asection.
3712
de52dba4
AM
37132004-11-19 Alan Modra <amodra@bigpond.net.au>
3714
3715 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
3716 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
3717 * nlmcode.h (nlm_write_object_contents): Warning fix.
3718
288f74fa
BW
37192004-11-18 Bob Wilson <bob.wilson@acm.org>
3720
3721 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
3722
b7693d02
DJ
37232004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3724
3725 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
3726 (elf32_arm_plt_thumb_stub): New.
3727 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
3728 and plt_got_offset.
3729 (elf32_arm_link_hash_traverse): Fix typo.
3730 (elf32_arm_link_hash_table): Add obfd.
3731 (elf32_arm_link_hash_newfunc): Initialize new fields.
3732 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
3733 (elf32_arm_link_hash_table_create): Initialize obfd.
3734 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
3735 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
3736 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
3737 interworking BFD is not dynamic.
3738 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
3739 not emit glue for PLT references.
3740 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
3741 emit glue for PLT references. Support the Thumb PLT prefix.
3742 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
3743 plt_thumb_refcount.
3744 (elf32_arm_check_relocs): Likewise.
3745 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
3746 plt_thumb_refcount.
3747 (allocate_dynrelocs): Handle Thumb PLT references.
3748 (elf32_arm_finish_dynamic_symbol): Likewise.
3749 (elf32_arm_symbol_processing): New function.
3750 (elf_backend_symbol_processing): Define.
3751
353057a5
RS
37522004-11-16 Richard Sandiford <rsandifo@redhat.com>
3753
3754 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
3755 add_fde_encoding. Remove need_relative.
3756 * elf-eh-frame.c (extra_augmentation_string_bytes)
3757 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
3758 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
3759 in cases where the CIE has no existing 'R' augmentation. Use
3760 size_of_output_cie_fde when assigning offsets. Use the final offset
3761 as the new section size.
3762 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
3763 Account for any extra augmentation bytes in the returned offset.
3764 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
3765 moved before being modified. Pad growing entries with DW_CFA_nops.
3766 Add 'z' and 'R' augmentations as directed by add_augmentation_size
3767 and add_fde_encoding.
3768
b32d3aa2
MM
37692004-11-15 Mark Mitchell <mark@codesourcery.com>
3770
3771 * elf32-arm.c (elf32_arm_relocate_section): Use
3772 arm_real_reloc_type.
3773
5d41f0b6
RS
37742004-11-16 Richard Sandiford <rsandifo@redhat.com>
3775
3776 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
3777 for discard relocations; don't add an R_MIPS_NONE to the main body
3778 of .rel.dyn.
3779
fc0e6df6
PB
37802004-11-04 Paul Brook <paul@codesourcery.com>
3781
3782 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
3783 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
3784 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
3785 default version definition for unversioned symbols.
3786 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
3787 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
3788 _bfd_elf_slurp_version_tables. Set default version for unversioned
3789 imported symbols.
3790
b23e50e2
PB
37912004-11-15 Paul Brook <paul@codesourcery.com>
3792
3793 * elflink.c (elf_link_add_object_symbols): Don't assume version
3794 indices are consecutive.
3795
f4a6705c
RS
37962004-11-14 Richard Sandiford <rsandifo@redhat.com>
3797
3798 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
3799 composite relocations against the personality data.
3800
ee06dc07
PB
38012004-11-13 Paul Brook <paul@codesourcery.com>
3802
3803 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
3804 R_ARM_PREL31 relocations to PLT entries.
3805 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
3806 (elf32_arm_check_relocs): Ditto.
3807
a1ace8d8
BW
38082004-11-12 Bob Wilson <bob.wilson@acm.org>
3809
3810 * xtensa-isa.c (xtensa_interface_class_id): New.
3811
e4115460
BW
38122004-11-11 Bob Wilson <bob.wilson@acm.org>
3813
3814 * elf32-xtensa.c (property_table_compare): Remove assertion about
3815 entries with the same address and non-zero size.
3816 (xtensa_read_table_entries): Report such entries as errors.
3817
6366ff1e
MM
38182004-11-11 Mark Mitchell <mark@codesourcery.com>
3819
3820 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
3821 R_ARM_RELATIVE on Symbian OS.
3822
b34af79c
MM
38232004-11-09 Mark Mitchell <mark@codesourcery.com>
3824
e6dc21b6
MM
3825 * som.c (som_bfd_print_private_bfd_data): New function.
3826 (som_object_setup): Save the auxiliary header. Don't assume that
3827 zero is an invalid entry point for a shared library.
3828 (som_object_p): Allocate the auxiliary header on the heap.
3829
b34af79c
MM
3830 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
3831 declaration.
3832 (elf32_arm_symbian_modify_segment_map): Likewise.
3833
08d1f311
DJ
38342004-11-09 Daniel Jacobowitz <dan@debian.org>
3835
3836 From David Poole <daveml@mbuf.com>:
3837 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
3838 (elf32_arm_size_dynamic_sections): Call it.
3839
0306b3bf
AM
38402004-11-09 Alan Modra <amodra@bigpond.net.au>
3841
3842 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
3843 (ALL_MACHINES_CFILES): Fix typo.
3844 * Makefile.in: Regenerate.
3845 * po/SRC-POTFILES.in: Regenerate.
3846
a16385dc
MM
38472004-11-08 Mark Mitchell <mark@codesourcery.com>
3848
3849 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
3850 R_ARM_RELATIVE relocation for Symbian OS, mention the section
3851 symbol in the relocation.
3852
0306b3bf
AM
38532004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
3854 Vineet Sharma <vineets@noida.hcltech.com>
7499d566
NC
3855
3856 * coff-maxq.c: New File.
0306b3bf
AM
3857 * cpu-maxq.c: New File.
3858 * coffcode.h: Likewise.
3859 * config.bfd: Likewise.
3860 * configure.in (maxqcoff_vec): New target vector.
7499d566
NC
3861 * Makefile.am: Add support for maxq target.
3862 * configure.in: Likewise.
0306b3bf
AM
3863 * archures.c:. Likewise.
3864 * targets.c: Likewise.
3865 * bfd_in2.h : Regenerated.
7499d566
NC
3866 * Makefile.in: Regenerated.
3867 * configure: Regenerated.
3868 * doc/Makefile.in: Regenerated.
3869
977cdf5a
NC
38702004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3871
3872 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
3873 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
3874 C_NT_WEAK aux entries.
3875 (_bfd_coff_generic_relocate_section): Handle undefined
3876 aliases.
3877
9dfe8738
AS
38782004-11-07 Andreas Schwab <schwab@suse.de>
3879
3880 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
3881 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
3882 non-default visibility.
3883
c3c76620
MM
38842004-11-01 Mark Mitchell <mark@codesourcery.com>
3885
3886 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
0306b3bf 3887 D_PAGED.
c3c76620
MM
3888 (elf32_arm_symbian_modify_segment_map): Don't
3889 reset includes_filehdr and includes_phdrs here.
3890
7f266840
DJ
38912004-11-04 Daniel Jacobowitz <dan@debian.org>
3892
3893 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
3894 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
3895 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
3896 dependency.
3897 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
3898 to a new removed list. Remove normal configuration stanzas.
3899 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
3900 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
3901 elfarm-nabi.lo with elf32-arm.lo.
3902 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
3903 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
3904 * elf32-arm.h: Remove.
3905 * elfarm-oabi.c: Remove.
3906 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
3907 and bfd_elf32_littlearm_oabi_vec.
3908 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
3909
bac23f82
HPN
39102004-11-04 Hans-Peter Nilsson <hp@axis.com>
3911
3912 * config.bfd: Support crisv32-*-* like cris-*-*.
3913 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
3914 (bfd_mach_cris_v10_v32): New macros.
3915 * cpu-cris.c: Tweak formatting.
3916 (get_compatible): New function.
3917 (N): New macro.
3918 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
3919 bfd_arch_info_type:s.
3920 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
3921 get_compatible for member compatible and link bfd_cris_arch_v32 as
3922 next.
3923 * elf32-cris.c (cris_elf_pcrel_reloc)
3924 (cris_elf_set_mach_from_flags): New functions.
3925 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
3926 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
3927 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
3928 numbers for bfd_mach_cris_v32.
3929 (PLT_ENTRY_SIZE_V32): New macro.
3930 (elf_cris_plt0_entry): Drop last comma in initializer.
3931 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
3932 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
3933 PLT initializers.
3934 (cris_elf_relocate_section): Change all "%B(%A)" messages to
3935 "%B, section %A".
3936 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
3937 (elf_cris_finish_dynamic_sections): Similar.
3938 (elf_cris_adjust_dynamic_symbol): Similar.
3939 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
3940 section %A".
3941 <switch with PIC relocs>: Emit error and return FALSE for
3942 bfd_mach_cris_v10_v32.
3943 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
3944 Emit warning when generating textrel reloc.
3945 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
3946 (cris_elf_final_write_processing): Set flags according to mach.
3947 (cris_elf_print_private_bfd_data): Display
3948 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
3949 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
3950 new_flags. Don't call cris_elf_final_write_processing. Don't
3951 look at the actual elf header flags at all; use
3952 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
3953 in bfd_get_mach for ibfd and obfd and handle merging of compatible
3954 objects.
3955 (bfd_elf32_bfd_copy_private_bfd_data): Define.
3956 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
3957 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
3958 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
3959 * bfd-in2.h, libbfd.h: Regenerate.
3960
c5614fa4
AM
39612004-11-04 Alan Modra <amodra@bigpond.net.au>
3962
3963 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
3964 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
3965 comment.
3966 (struct adjust_toc_info): New.
3967 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
3968
0ebdbb83
BW
39692004-11-03 Bob Wilson <bob.wilson@acm.org>
3970
3971 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
3972 if there are no segments.
3973
675b2ace
DJ
39742004-11-02 Daniel Jacobowitz <dan@debian.org>
3975
3976 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
3977
58852c27
NC
39782004-11-02 Nick Clifton <nickc@redhat.com>
3979
3980 * elf32-iq2000.c: Convert to ISO C90 formatting.
3981
e6857c0c
HPN
39822004-11-02 Hans-Peter Nilsson <hp@axis.com>
3983
20288ed6 3984 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
e6857c0c 3985
bf718458
L
39862004-10-28 H.J. Lu <hongjiu.lu@intel.com>
3987
3988 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
3989 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
3990 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
3991
044ad7e3
KK
39922004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3993
3994 * elf32-sh.c (tpoff): Take alignment into account.
3995
d5cb4bb8
NC
39962004-10-28 Nick Clifton <nickc@redhat.com>
3997
3998 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
0d48eab6 3999 performing a relocatable link.
d5cb4bb8
NC
4000 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
4001 for MIPS ports under Irix.
4002
5b5bb741
PB
40032004-10-27 Richard Earnshaw <rearnsha@arm.com>
4004
4005 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
4006 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
4007 (elf32_arm_final_link_relocate): Ditto.
4008 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
4009 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
4010 (elf32_arm_adjust_dynamic_symbol): Ditto.
4011 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
4012 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
4013 (elf32_arm_r_howto): ... To here.
4014 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
4015
97ecf322
L
40162004-10-26 H.J. Lu <hongjiu.lu@intel.com>
4017
4018 PR 475
4019 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
4020 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
4021 and R_IA64_SECREL64LSB.
4022
3e3b46e5
PB
40232004-10-26 Paul Brook <paul@codesourcery.com>
4024
4025 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
4026 (bfd_elf_size_dynamic_sections): Create default version definition.
4027 (elf_link_output_extsym): Adjust for default symbol version.
4028
aa69fe43
HPN
40292004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4030
278b4623
HPN
4031 * mmo.c: Adjust to ISO C.
4032
aa69fe43
HPN
4033 * mmo.c (mmo_write_section_description): New function broken out
4034 of mmo_internal_write_section.
4035 (mmo_internal_write_section): For each of .text and .data, call
4036 mmo_write_section_description before outputting contents if it has
4037 nontrivially deducible vma or contents.
4038 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
4039 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
4040 symbols if found within the .data address range.
4041
ed040321
DJ
40422004-10-24 Daniel Jacobowitz <dan@debian.org>
4043
4044 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
4045
830866af
HPN
40462004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
4047
4048 * mmo.c (File Layout): Correct place of misplaced blurb about
4049 special data.
4050
5f417ca3
MK
40512004-10-22 Mark Kettenis <kettenis@gnu.org>
4052
4053 * config.bfd: Add mips64*-*-openbsd.
4054
823fc61f
BW
40552004-10-21 Bob Wilson <bob.wilson@acm.org>
4056
4057 * elf32-xtensa.c (ebb_propose_action): Put declarations before
4058 statements.
4059
8697aafb
L
40602004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4061
4062 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
4063 * configure: Regenerate.
4064
dfeffb9f
L
40652004-10-21 H.J. Lu <hongjiu.lu@intel.com>
4066
4067 PR 463
4068 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
4069 to linker reloc_overflow callback.
4070 (aout_link_input_section_ext): Likewise.
4071 (aout_link_reloc_link_order): Likewise.
4072 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
4073 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
4074 Likewise.
4075 (alpha_relocate_section): Likewise.
4076 * coff-arm.c (coff_arm_relocate_section): Likewise.
4077 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
4078 * coff-h8500.c (extra_case): Likewise.
4079 * coff-i960.c (coff_i960_relocate_section): Likewise.
4080 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
4081 * coff-mips.c (mips_relocate_section): Likewise.
4082 * coff-or32.c (coff_or32_relocate_section): Likewise.
4083 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
4084 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
4085 * coff-sh.c (sh_relocate_section): Likewise.
4086 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
4087 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
4088 * coff-z8k.c (extra_case): Likewise.
4089 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
4090 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
4091 (_bfd_coff_generic_relocate_section): Likewise.
4092 * ecoff.c (ecoff_reloc_link_order): Likewise.
4093 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
4094 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
4095 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
4096 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
4097 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4098 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
4099 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4100 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
4101 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
4102 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
4103 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
4104 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4105 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4106 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4107 * elf32-i386.c (elf_i386_relocate_section): Likewise.
4108 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4109 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4110 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
4111 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4112 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
4113 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4114 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
4115 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
4116 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4117 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4118 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4119 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4120 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4121 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4122 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4123 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4124 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4125 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
4126 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4127 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4128 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4129 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4130 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4131 * elflink.c (elf_reloc_link_order): Likewise.
4132 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4133 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4134 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
4135 * linker.c (_bfd_generic_reloc_link_order): Likewise.
4136 * pdp11.c (pdp11_aout_link_input_section): Likewise.
4137 (aout_link_reloc_link_order): Likewise.
4138 * reloc.c (bfd_generic_get_relocated_section_contents):
4139 Likewise.
4140 * xcofflink.c (xcoff_reloc_link_order): Likewise.
4141 * simple.c (simple_dummy_reloc_overflow): Updated.
4142
1715e0e3
AS
41432004-10-20 Andreas Schwab <schwab@suse.de>
4144
4145 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
4146 (elf_backend_plt_sym_val): Define.
4147
db3d41a8
DS
41482004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
4149
4150 * config.bfd: Set targ_underscore=yes for PE COFF targets
4151
4b85d634
AM
41522004-10-19 Alan Modra <amodra@bigpond.net.au>
4153
4154 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
4155 (ppc64_elf_edit_opd): Likewise.
4156
6df4d94c
MM
41572004-10-18 Mark Mitchell <mark@codesourcery.com>
4158
4159 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
4160 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
4161 set SEC_ALLOC and SEC_LOAD.
4162
00d962d1
NC
41632004-10-18 Nick Clifton <nickc@redhat.com>
4164
4165 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
4166 'name' for relocs against both local and global symbols.
4167
b58f81ae
DJ
41682004-10-16 Daniel Jacobowitz <dan@debian.org>
4169
4170 * bfd-in2.h: Regenerate.
4171 * bfd.c (struct bfd): Add no_export.
4172 * elflink.c (elf_link_add_object_symbols): Handle no_export.
4173
7d3f158f
AM
41742004-10-15 Alan Modra <amodra@bigpond.net.au>
4175
4176 * config.bfd: Whitespace cleanup.
4177 * Makefile.am: Run "make dep-am"
4178 * Makefile.in: Regenerate.
4179
6d2cd210
JJ
41802004-10-15 Jakub Jelinek <jakub@redhat.com>
4181
4182 * elflink.c (struct already_linked_section): Removed.
4183 (try_match_symbols_in_sections, already_linked): Removed.
4184 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
4185 prefix of section names when finding already_linked_table
4186 chain. Compare section names. Instead of calling already_linked,
4187 do it inline and only for sections in the same already_linked_list.
4188
92e4ec35
AM
41892004-10-15 Alan Modra <amodra@bigpond.net.au>
4190
4191 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
4192 parameter. If called after _bfd_elf_write_section_eh_frame,
4193 don't allow a -2 return unless need_* bit is already set, and
4194 handle offsets adjusted for output_offset.
4195 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
4196 * elf.c (_bfd_elf_section_offset): Update call.
4197
7bf6dede
L
41982004-10-13 H.J. Lu <hongjiu.lu@intel.com>
4199
4200 PR 440
4201 * coffcode.h (coff_compute_section_file_positions): Cast to
4202 bfd_vma when computing page alignment.
4203
c0042f5d
MM
42042004-10-13 Mark Mitchell <mark@codesourcery.com>
4205
4206 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4207 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
4208
2a1b9a48
MM
42092004-10-12 Mark Mitchell <mark@codesourcery.com>
4210
4211 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
4212 relocations use a virtual address, not a section offset.
4213
b08b5071
BW
42142004-10-12 Bob Wilson <bob.wilson@acm.org>
4215
4216 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
4217 (narrow_instruction, widen_instruction): Remove unnecessary calls to
4218 xtensa_format_encode.
4219 (ebb_propose_action): Inline call to ebb_add_proposed_action.
4220 (ebb_add_proposed_action): Delete.
4221
7fa3d080
BW
42222004-10-12 Bob Wilson <bob.wilson@acm.org>
4223
4224 * elf32-xtensa.c: Use ISO C90 formatting.
4225
3656d5e3
PB
42262004-10-12 Paul Brook <paul@codesourcery.com>
4227
4228 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
4229 message.
4230
8cb51566
PB
42312004-10-12 Paul Brook <paul@codesourcery.com>
4232
4233 * elf32-arm.h: Support EABI version 4 objects.
4234
1abc8597
AM
42352004-10-12 Alan Modra <amodra@bigpond.net.au>
4236
4237 PR 325
4238 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
4239 Don't mark as default.
4240 (bfd_x86_64_arch): Don't mark as default.
4241
9e66c942
AM
42422004-10-12 Alan Modra <amodra@bigpond.net.au>
4243
4244 * elflink.c (enum action_discarded): New.
4245 (elf_section_complain_discarded): Delete.
4246 (elf_action_discarded): New function subsuming the above and also
4247 controlling reloc behaviour.
1abc8597 4248 (elf_link_input_bfd): Use it.
9e66c942 4249
7f1204bb
JJ
42502004-10-11 Jakub Jelinek <jakub@redhat.com>
4251
4252 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
4253 (special_sections): Add .gnu.liblist and .gnu.conflict.
4254 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
4255
87e5235d
AM
42562004-10-11 Alan Modra <amodra@bigpond.net.au>
4257
4258 PR 233
4259 * elflink.c (elf_link_input_bfd): Try harder to support
4260 relocations against symbols in removed linkonce sections.
4261
2ad770c3
AM
42622004-10-11 Alan Modra <amodra@bigpond.net.au>
4263
029446c4
AM
4264 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
4265
2ad770c3
AM
4266 PR 354
4267 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
4268 sections do not reference symbols in non-SEC_ALLOC sections.
4269
1da212d6
AM
42702004-10-11 Alan Modra <amodra@bigpond.net.au>
4271
4272 PR 437
4273 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
4274 (_bfd_elf_link_omit_section_dynsym): Formatting.
4275
f12123c0
AM
42762004-10-10 Alan Modra <amodra@bigpond.net.au>
4277
4278 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
4279 * libbfd.h: Regnerate.
4280 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
4281 * elf32-frv.c: Likewise.
4282 * elf32-m32r.c: Likewise.
4283 * elf32-ppc.c: Likewise.
4284 * elf64-hppa.c: Likewise.
4285 * elfxx-ia64.c: Likewise.
4286 * opncls.c: Likewise.
4287
fda3ecf2
AM
42882004-10-10 Alan Modra <amodra@bigpond.net.au>
4289
3472e2e9
AM
4290 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
4291 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
4292 offsets stored in struct eh_cie_fde entries before doing other
4293 work.
4294
fda3ecf2
AM
4295 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
4296 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
4297 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
4298 setting offsets for removed CIEs. Don't set "sec", instead set
4299 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
4300 CIE in hdr_info. Only set make_relative and make_lsda_relative
4301 for CIEs. Use pointers rather than array indices.
4302 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
4303 make_lsda_relative, need_* on cie_inf for FDEs.
4304 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
4305 section output_offset. Delete cie_offset, instead use cie_inf
4306 pointer to CIE entry. Use need_relative and need_lsda_relative on
4307 CIE entry for FDEs. Use pointers rather than array indices.
4308
7db6994f
AM
43092004-10-09 Alan Modra <amodra@bigpond.net.au>
4310
4311 * coff-rs6000.c (rs6000coff_vec): Add initializer for
4312 bfd_is_target_special_symbol.
4313 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4314 * som.c (som_bfd_is_target_special_symbol): Define.
4315
3c9458e9
NC
43162004-10-08 Nick Clifton <nickc@redhat.com>
4317
4318 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
4319 * configure: Regenerate.
4320 * bfd-in2.h: Regenerate.
4321 * syms.c (bfd_is_target_special_symbol): New interface function.
4322 Returns true when a symbol should be considered to be special.
7db6994f 4323 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
3c9458e9
NC
4324 the symbol jump table.
4325 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
4326 Return true iff the symbol is a mapping symbol.
4327 (bfd_elf32_bfd_is_target_special_symbol): Define.
4328 * elfxx-target.h: Provide a default definition for
4329 bfd_is_target_special_symbol.
4330 * aout-target.h: Likewise.
4331 * aout-tic30.c: Likewise.
873d03ee 4332 * binary.c: Likewise.
3c9458e9
NC
4333 * coffcode.h: Likewise.
4334 * i386msdos.c: Likewise.
4335 * ieee.c: Likewise.
873d03ee 4336 * ihex.c: Likewise.
3c9458e9
NC
4337 * libaout.h: Likewise.
4338 * libbfd-in.h: Likewise
4339 * libecoff.h: Likewise.
4340 * mach-o.c: Likewise.
4341 * mmo.c: Likewise.
4342 * nlm-target.h: Likewise.
4343 * oasys.c: Likewise.
4344 * pef.c: Likewise.
4345 * ppcboot.c: Likewise.
4346 * srec.c: Likewise.
4347 * tekhex.c: Likewise.
4348 * versados.c: Likewise.
4349 * vms.c: Likewise.
4350 * xcoff-target.h: Likewise.
4351 * xsym.c: Likewise.
4352 * libbfd.h: Regenerate.
4353
d2b2c203
DJ
43542004-10-08 Daniel Jacobowitz <dan@debian.org>
4355
4356 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
4357 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
4358 (elf_backend_section_from_shdr): Define.
4359
864274b0
AM
43602004-10-08 Alan Modra <amodra@bigpond.net.au>
4361
4362 * syms.c (bfd_is_local_label): Return false for file symbols.
4363
43cd72b9 43642004-10-07 Bob Wilson <bob.wilson@acm.org>
85a5ac80 4365 David Heine <dlheine@tensilica.com>
43cd72b9
BW
4366
4367 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
4368 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
4369 (elf32xtensa_no_literal_movement): New global variable.
4370 (elf_howto_table): Add entries for new relocations.
4371 (elf_xtensa_reloc_type_lookup): Handle new relocations.
4372 (property_table_compare): When addresses are equal, compare sizes and
4373 various property flags.
4374 (property_table_matches): New.
4375 (xtensa_read_table_entries): Extend to read new property tables. Add
4376 output_addr parameter to indicate that output addresses should be used.
4377 Use bfd_get_section_limit.
4378 (elf_xtensa_find_property_entry): New.
4379 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
4380 (elf_xtensa_check_relocs): Handle new relocations.
4381 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
4382 relocations. Use new xtensa-isa.h functions.
4383 (build_encoding_error_message): Remove encode_result parameter. Add
4384 new target_address parameter used to detect alignment errors.
4385 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
4386 error handling. Use new is_operand_relocation function.
4387 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
4388 Use underbar macro for error messages. Formatting.
4389 (get_const16_opcode): New.
4390 (get_l32r_opcode): Add a separate flag for initialization.
4391 (get_relocation_opnd): Operand number is no longer explicit in the
4392 relocation. Change to decode the opcode and analyze its operands.
4393 (get_relocation_slot): New.
4394 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
4395 Use new xtensa-isa.h functions to handle multislot instructions.
4396 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
4397 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
4398 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
4399 check_loop_aligned, check_branch_target_aligned_address, narrowable,
4400 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
4401 get_single_format, init_op_single_format_table): New.
4402 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
4403 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
4404 (contract_asm_expansion): Add error_message parameter and pass it to
4405 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
4406 with R_XTENSA_SLOT0_OP.
4407 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
4408 instructions. Use new xtensa-isa.h functions.
4409 (r_reloc struct): Add new virtual_offset field.
4410 (r_reloc_init): Add contents and content_length parameters. Set
4411 virtual_offset field to zero. Add contents to target_offset field for
4412 partial_inplace relocations.
4413 (r_reloc_is_defined): Check for null.
4414 (print_r_reloc): New debug function.
4415 (source_reloc struct): Replace xtensa_operand field with pair of the
4416 opcode and the operand position. Add is_abs_literal field.
4417 (init_source_reloc): Specify operand by opcode/position pair. Set
4418 is_abs_literal field.
4419 (source_reloc_compare): When target_offsets are equal, compare other
4420 fields to make sorting predictable.
4421 (literal_value struct): Add is_abs_literal field.
4422 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
4423 (init_literal_value): New.
4424 (is_same_value): Replace with ...
4425 (literal_value_equal): ... this function. Add comparisons of
4426 virtual_offset and is_abs_literal fields.
4427 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
4428 failure. Initialize has_last_loc field.
4429 (value_map_hash_table_delete): New.
4430 (hash_literal_value): Rename to ...
4431 (literal_value_hash): ... this. Include is_abs_literal flag and
4432 virtual_offset field in the hash value.
4433 (get_cached_value): Rename to ...
4434 (value_map_get_cached_value): ... this. Update calls to
4435 literal_value_hash and literal_value_equal.
4436 (add_value_map): Check for allocation failure. Update calls to
4437 value_map_get_cached_value and literal_value_hash.
4438 (text_action, text_action_list, text_action_t): New types.
4439 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
4440 text_action_add, text_action_add_literal, offset_with_removed_text,
4441 offset_with_removed_text_before_fill, find_insn_action,
4442 print_action_list, print_removed_literals): New.
4443 (offset_with_removed_literals): Delete.
4444 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
4445 fix_array, fix_array_count, allocated_relocs, relocs_count, and
4446 allocated_relocs_count fields.
4447 (init_xtensa_relax_info): Initialize new fields.
4448 (reloc_bfd_fix struct): Add new translated field.
4449 (reloc_bfd_fix_init): Add translated parameter and use it to set the
4450 translated field.
4451 (fix_compare, cache_fix_array): New.
4452 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
4453 section via get_xtensa_relax_info. Use cache_fix_array to set up
4454 sorted fix_array and use bsearch instead of linear search.
4455 (section_cache_t): New struct.
4456 (init_section_cache, section_cache_section, clear_section_cache): New.
4457 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
4458 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
4459 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
4460 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
4461 New.
4462 (retrieve_contents): Use bfd_get_section_limit.
4463 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
4464 to compute_removed_literals. Free value_map_hash_table when no longer
4465 needed.
4466 (analyze_relocations): Check is_relaxable_asm_section flag. Call
4467 compute_text_actions for all sections.
4468 (find_relaxable_sections): Mark sections as relaxable if they contain
4469 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
4470 call. Increment relax_info src_count field only for appropriate
4471 relocation types. Remove is_literal_section check.
4472 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
4473 r_reloc_init and find_associated_l32r_irel. Check
4474 is_relaxable_asm_section flag. Handle L32R instructions with absolute
4475 literals. Pass is_abs_literal flag to init_source_reloc.
4476 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
4477 CONST16 instructions. Adjust calls to r_reloc_init and
fda3ecf2 4478 pcrel_reloc_fits. Handle weak symbols conservatively.
43cd72b9
BW
4479 (find_associated_l32r_irel): Add bfd parameter and pass it to
4480 is_l32r_relocation.
4481 (compute_text_actions, compute_ebb_proposed_actions,
4482 compute_ebb_actions, check_section_ebb_pcrels_fit,
4483 check_section_ebb_reduces, text_action_add_proposed,
4484 compute_fill_extra_space): New.
4485 (remove_literals): Replace with ...
4486 (compute_removed_literals): ... this function. Call
4487 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
4488 Call xtensa_read_table_entries to get the property table. Skip
4489 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
4490 is_removable_literal, remove_dead_literal, and
fda3ecf2 4491 identify_literal_placement functions.
43cd72b9
BW
4492 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
4493 instead of linear search.
4494 (is_removable_literal, remove_dead_literal,
4495 identify_literal_placement): New.
4496 (relocations_reach): Update check for literal not referenced by any
4497 PC-relative relocations. Adjust call to pcrel_reloc_fits.
4498 (coalesce_shared_literal, move_shared_literal): New.
4499 (relax_section): Use bfd_get_section_limit. Call
4500 translate_section_fixes. Update calls to r_reloc_init and
4501 offset_with_removed_text. Check new is_relaxable_asm_section flag.
4502 Add call to pin_internal_relocs. Add special handling for
4503 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
4504 info to calculate new addend_displacement variable. Replace code for
4505 deleting literals with more general code to perform the actions
4506 determined by the action_list for the section.
4507 (translate_section_fixes, translate_reloc_bfd_fix): New.
4508 (translate_reloc): Check new is_relaxable_asm_section flag. Call
4509 find_removed_literal only if is_operand_relocation. Update call to
4510 offset_with_removed_text. Use new target_offset and removed_bytes
4511 variables.
4512 (move_literal): New.
4513 (relax_property_section): Use bfd_get_section_limit. Set new
4514 is_full_prop_section flag and handle new property tables. Update calls
4515 to r_reloc_init and offset_with_removed_text. Check
4516 is_relaxable_asm_section flag. Handle expansion of zero-sized
4517 unreachable entries, with use of offset_with_removed_text_before_fill.
4518 For relocatable links, combine entries only for literal tables.
4519 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
4520 calls to offset_with_removed_text. Translate st_size field for
4521 function symbols.
4522 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
4523 failure. Add contents parameter. Update call to get_bfd_fix. Update
4524 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
4525 R_XTENSA_ASM_EXPAND relocs.
4526 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
4527 call to get_bfd_fix. Include offset from contents for partial_inplace
4528 relocations.
4529 (is_reloc_sym_weak): New.
4530 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
4531 (prop_sec_len): New.
4532 (xtensa_is_property_section): Handle new property sections.
4533 (is_literal_section): Delete.
4534 (internal_reloc_compare): When r_offset matches, compare r_info and
4535 r_addend to make sorting predictable.
4536 (internal_reloc_matches): New.
4537 (xtensa_get_property_section_name): Handle new property sections.
4538 (xtensa_get_property_predef_flags): New.
4539 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
4540 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
4541 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
4542 (xtisa_errno, xtisa_error_msg): New variables.
4543 (xtensa_isa_errno, xtensa_isa_error_msg): New.
4544 (xtensa_insnbuf_alloc): Add error handling.
4545 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
4546 use xtensa_format_decode. Add error handling.
4547 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
4548 instruction length to find the number of bytes to copy.
4549 (xtensa_isa_init): Add error handling. Replace calls to
4550 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
4551 tables in the xtensa_modules structure.
4552 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
4553 xtensa_extend_isa): Delete.
4554 (xtensa_isa_free): Change to only free lookup tables.
4555 (opname_lookup_compare): Replace with ...
4556 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
4557 (xtensa_insn_maxlength): Rename to ...
4558 (xtensa_isa_maxlength): ... this.
4559 (xtensa_insn_length): Delete.
4560 (xtensa_insn_length_from_first_byte): Replace with ...
4561 (xtensa_isa_length_from_chars): ... this function.
4562 (xtensa_num_opcodes): Rename to ...
4563 (xtensa_isa_num_opcodes): ... this.
4564 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
4565 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
4566 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
4567 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
4568 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
4569 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
4570 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
4571 (xtensa_opcode_lookup): Add error handling.
4572 (xtensa_decode_insn): Replace with ...
4573 (xtensa_opcode_decode): ... this function, with new format and
4574 slot parameters. Add error handling.
4575 (xtensa_encode_insn): Replace with ...
4576 (xtensa_opcode_encode): ... this function, which does the encoding via
4577 one of the entries in the "encode_fns" array. Add error handling.
4578 (xtensa_opcode_name): Add error handling.
4579 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
4580 xtensa_opcode_is_call): New.
4581 (xtensa_num_operands): Replace with ...
4582 (xtensa_opcode_num_operands): ... this function. Add error handling.
4583 (xtensa_opcode_num_stateOperands,
4584 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
4585 xtensa_opcode_funcUnit_use, xtensa_operand_name,
4586 xtensa_operand_is_visible): New.
4587 (xtensa_get_operand, xtensa_operand_kind): Delete.
4588 (xtensa_operand_inout): Add error handling and special-case for
4589 "sout" operands.
4590 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
4591 operate on one slot of an instruction. Added error handling.
4592 (xtensa_operand_encode): Handle default operands with no encoding
4593 functions. Check for success by comparing against decoded value.
4594 Add error handling.
4595 (xtensa_operand_decode): Handle default operands. Return decoded value
4596 through argument pointer. Add error handling.
4597 (xtensa_operand_is_register, xtensa_operand_regfile,
4598 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
4599 (xtensa_operand_isPCRelative): Rename to ...
4600 (xtensa_operand_is_PCrelative): ... this. Add error handling.
4601 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
4602 through argument pointer. Add error handling.
4603 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
4604 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
4605 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
4606 xtensa_regfile_shortname, xtensa_regfile_view_parent,
4607 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
4608 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
4609 xtensa_state_is_exported, xtensa_sysreg_lookup,
4610 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
4611 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
4612 xtensa_interface_num_bits, xtensa_interface_inout,
4613 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
4614 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
4615 * xtensa-modules.c: Rewrite to use new data structures.
4616 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
4617 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
4618 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
4619 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
4620 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
4621 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
4622 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
4623 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
4624 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
4625 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
4626 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
4627 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
4628 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
4629 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
4630 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
4631 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
4632 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
4633 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
4634 * Makefile.in: Regenerate.
4635 * bfd-in2.h: Likewise.
4636 * libbfd.h: Likewise.
4637
99022dfb
RS
46382004-10-07 Richard Sandiford <rsandifo@redhat.com>
4639
4640 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
4641 against the absolute section.
4642 (mips_elf64_write_rela): Likewise.
4643
b67ae299
NC
46442004-10-07 Jan Beulich <jbeulich@novell.com>
4645
4646 * elf.c (elf_find_function): Don't generally check for matching
4647 section, just for non-file symbols. Remove redunant comparison
4648 for the latter.
4649 * elf32-arm.h (arm_elf_find_function): Likewise.
4650
8fdd7217
NC
46512004-10-07 Jeff Baker <jbaker@qnx.com>
4652
4653 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
4654 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
4655 was specified.
4656
073a2dc3
RM
46572004-10-04 Roland McGrath <roland@redhat.com>
4658
4659 * hash.c (bfd_hash_set_default_size): Use const for table.
4660 Use size_t instead of int for variable compared to sizeof results.
4661
7785be14
AM
46622004-10-05 Alan Modra <amodra@bigpond.net.au>
4663
4664 PR 425
4665 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
4666
40a18ebd
NC
46672004-10-01 Paul Brook <paul@codesourcery.com>
4668
4669 * elf32-arm.h (elf32_arm_fake_sections,
4670 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
4671 functions.
4672 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
4673
8935b81f
AM
46742004-10-01 Alan Modra <amodra@bigpond.net.au>
4675
4676 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
4677 need_lsda_relative.
4678 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
4679 need_relative or need_lsda_relative if we are processing an
4680 offset for a reloc on a FDE initial loc or LSDA field
4681 respectively.
4682 (_bfd_elf_write_section_eh_frame): Test need_relative and
4683 need_lsda_relative in place of corresponding make_* field
4684 when deciding to use pc-relative encodings.
4685
eeac373a
PB
46862004-09-30 Paul Brook <paul@codesourcery.com>
4687
4688 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
4689 target2 relocation type.
4690
7479dfd4
L
46912004-09-30 H.J. Lu <hongjiu.lu@intel.com>
4692
4693 PR 414
4694 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
4695
0dd132b6
NC
46962004-09-30 Paul Brook <paul@codesourcery.com>
4697
4698 * reloc.c: Add BFD_RELOC_ARM_SMI.
4699 * bfd-in2.h: Regenerate.
4700 * libbfd.h: Ditto.
4701
1ba54ee0
AM
47022004-09-24 Alan Modra <amodra@bigpond.net.au>
4703
4704 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
4705 vma and output offset to address.
4706 * simple.c (simple_save_output_info): Only set output section
4707 and offset for debug sections, or those not already set up by
4708 the linker.
4709 (bfd_simple_get_relocated_section_contents): Update comment.
4710
5efb6261
AM
47112004-09-24 Alan Modra <amodra@bigpond.net.au>
4712
4713 * elf.c (IS_LOADED): Delete.
4714 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
4715 Restore SEC_HAS_CONTENTS test to the one place it was used prior
4716 to 2004-09-22.
4717
fca870e4
AM
47182004-09-23 Alan Modra <amodra@bigpond.net.au>
4719
4720 PR gas/396
4721 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
4722 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
4723 redundant assignment of EM_SPARC.
4724
c86696a3
BF
47252004-09-22 Brian Ford <ford@vss.fsi.com>
4726
4727 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
4728 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
4729 constants.
4730 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4731
73adb214
AM
47322004-09-22 Alan Modra <amodra@bigpond.net.au>
4733
4734 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
4735 (elf_backend_modify_segment_map): Don't define.
4736
b301b248
AM
47372004-09-22 Alan Modra <amodra@bigpond.net.au>
4738
4739 * elf.c (IS_LOADED): Define.
4740 (assign_file_positions_for_segments): Don't round up file offset of
4741 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
4742 Delete code handling link script adjustment of lma. Do the adjust
4743 in later code handling similar ajustments. Remove dead code error
4744 check. Warn if section lma would require a negative offset
4745 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
4746 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
4747 update voff in section loop. Change voff in segment loop to be an
4748 adjustment on top of "off". Set sec->filepos and update "off" later.
4749 Test for loadable sections consistently using IS_LOADED. Similarly,
073a2dc3 4750 test for alloc-only sections other than .tbss consistently.
b301b248
AM
4751 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
4752 Tidy PT_NOTE handling. Use %B and %A in error messages.
4753 (assign_file_positions_except_relocs): Use %B in error message.
4754
3f85e526
L
47552004-09-17 H.J. Lu <hongjiu.lu@intel.com>
4756
4757 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
4758 (CONFIG_STATUS_DEPENDENCIES): New.
4759 (Makefile): Removed.
4760 (config.status): Likewise.
4761 * Makefile.in: Regenerated.
4762
eb043451
PB
47632004-09-17 Paul Brook <paul@codesourcery.com>
4764
4765 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
4766 (bfd_elf32_arm_process_before_allocation): Update prototype.
4767 * bfd-in2.h: Regenerate.
4768 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
4769 (elf32_arm_link_hash_table_create): Set it.
4770 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
4771 (bfd_elf32_arm_set_target_relocs): New function.
4772 (arm_real_reloc_type): New function.
4773 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
4774 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
4775 (elf32_arm_gc_sweep_hook): Ditto.
4776 (elf32_arm_check_relocs): Ditto.
4777 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
4778 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
4779 R_ARM_GOT_TARGET2.
4780 (elf32_arm_got_prel): New variable.
4781 (elf32_arm_howto_from_type): New function.
4782 (elf32_arm_info_to_howto): Use it.
4783 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
4784 BFD_RELOC_ARM_TARGET2.
4785 * libbfd.h: Regenerate.
4786 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
4787
f6e332e6
AM
47882004-09-17 Alan Modra <amodra@bigpond.net.au>
4789
4790 * ecoff.c: Update u.undef.next refs.
4791 * elf64-ppc.c: Likewise.
4792 * elflink.c: Likewise.
4793 * linker.c: Likewise.
4794 * xcofflink.c: Likewise.
4795
4796 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
4797 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
4798 fields to indirect struct.
4799 * elf-m10300.c: Update u.weakdef refs.
4800 * elf32-arm.h: Likewise.
4801 * elf32-cris.c: Likewise.
4802 * elf32-frv.c: Likewise.
4803 * elf32-hppa.c: Likewise.
4804 * elf32-i370.c: Likewise.
4805 * elf32-i386.c: Likewise.
4806 * elf32-m32r.c: Likewise.
4807 * elf32-m68k.c: Likewise.
4808 * elf32-ppc.c: Likewise.
4809 * elf32-s390.c: Likewise.
4810 * elf32-sh.c: Likewise.
4811 * elf32-sparc.c: Likewise.
4812 * elf32-vax.c: Likewise.
4813 * elf32-xtensa.c: Likewise.
4814 * elf64-alpha.c: Likewise.
4815 * elf64-hppa.c: Likewise.
4816 * elf64-ppc.c: Likewise.
4817 * elf64-s390.c: Likewise.
4818 * elf64-sh64.c: Likewise.
4819 * elf64-sparc.c: Likewise.
4820 * elf64-x86-64.c: Likewise.
4821 * elfxx-ia64.c: Likewise.
4822 * elfxx-mips.c: Likewise.
4823 * elflink.c: Likewise. Also u.elf_hash_value.
4824 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
4825 indirection.
4826 (elf_gc_smash_unused_vtentry_relocs): Likewise.
4827 (bfd_elf_gc_record_vtinherit): Alloc vtable.
4828 (bfd_elf_gc_record_vtentry): Likewise.
4829 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
4830
90c0a373
AM
48312004-09-17 Alan Modra <amodra@bigpond.net.au>
4832
4833 * Makefile.am: Run "make dep-am".
4834 * Makefile.in: Regenerate.
4835 * bfd-in2.h: Regenerate.
4836 * po/SRC-POTFILES.in: Regenerate.
4837 * po/bfd.pot: Regenerate.
4838
f5385ebf
AM
48392004-09-16 Alan Modra <amodra@bigpond.net.au>
4840
4841 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
4842 with bitfields. Make "type" and "other" bitfields too.
4843 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
4844 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
4845 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
4846 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
4847 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
4848 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
4849 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
4850 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
4851 * elf-hppa.h: Update all uses of elf_link_hash_flags.
4852 * elf-m10300.c: Likewise.
4853 * elf.c: Likewise.
4854 * elf32-arm.h: Likewise.
4855 * elf32-cris.c: Likewise.
4856 * elf32-frv.c: Likewise.
4857 * elf32-hppa.c: Likewise.
4858 * elf32-i370.c: Likewise.
4859 * elf32-i386.c: Likewise.
4860 * elf32-m32r.c: Likewise.
4861 * elf32-m68k.c: Likewise.
4862 * elf32-ppc.c: Likewise.
4863 * elf32-s390.c: Likewise.
4864 * elf32-sh-symbian.c: Likewise.
4865 * elf32-sh.c: Likewise.
4866 * elf32-sh64.c: Likewise.
4867 * elf32-sparc.c: Likewise.
4868 * elf32-vax.c: Likewise.
4869 * elf32-xtensa.c: Likewise.
4870 * elf64-alpha.c: Likewise.
4871 * elf64-hppa.c: Likewise.
4872 * elf64-ppc.c: Likewise.
4873 * elf64-s390.c: Likewise.
4874 * elf64-sh64.c: Likewise.
4875 * elf64-sparc.c: Likewise.
4876 * elf64-x86-64.c: Likewise.
4877 * elflink.c: Likewise.
4878 * elfxx-ia64.c: Likewise.
4879 * elfxx-mips.c: Likewise.
4880 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
4881 * configure: Regenerate.
4882 * aclocal.m4: Regenerate.
4883
b6ee372a
AM
48842004-09-16 Alan Modra <amodra@bigpond.net.au>
4885
4886 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
4887 around uses of R_ARM_TARGET1.
4888 (elf32_arm_check_relocs): Likewise.
4889
9c504268
PB
48902004-09-13 Paul Brook <paul@codesourcery.com>
4891
4892 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4893 prototype.
4894 * bfd-in2.h: Regenerate.
4895 * libbfd.h: Regenerate.
4896 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
4897 (elf32_arm_link_hash_table_create): Set target1_is_rel.
4898 (bfd_elf32_arm_process_before_allocation): Ditto.
4899 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
4900 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
4901 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
4902 * reloc.c: Ditto.
4903
94ea025a
JB
49042004-09-10 Joel Brobecker <brobecker@gnat.com>
4905
4906 * hpux-core.c (thread_section_p): New function.
4907 (hpux_core_core_file_p): Fix computation of offset in call
4908 to bfd_seek. Create a ".reg" section from an arbitrary
4909 ".reg/<id>" section if none was created after having read
4910 all sections.
4911
24443139
AS
49122004-09-11 Andreas Schwab <schwab@suse.de>
4913
4914 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
4915 * aclocal.m4: Rebuild.
4916 * configure: Rebuild.
4917
f4eae89c
JB
49182004-09-10 Joel Brobecker <brobecker@gnat.com>
4919
4920 * section.c (bfd_sections_find_if): Fix parameter name in
4921 comment to match code.
4922
e0638f70
AM
49232004-09-10 Alan Modra <amodra@bigpond.net.au>
4924
4925 * elf.c (assign_file_positions_except_relocs): Assign relocs
4926 stored in a bfd section.
4927
5e0f5ae3
HPN
49282004-09-08 Hans-Peter Nilsson <hp@axis.com>
4929
4930 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
4931 h->gotplt_refcount to 0, not -1.
4932
ada1953e
HPN
49332004-09-07 Hans-Peter Nilsson <hp@axis.com>
4934
4935 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
4936 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
4937 symname.
4938 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
4939 handle symbol visibility here.
4940
ee75fd95
AM
49412004-09-07 Alan Modra <amodra@bigpond.net.au>
4942
4943 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
4944 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
4945 callers.
4946 (ppc_stub_name): Remove trailing "+0" on stub name.
4947 (create_linkage_sections): Create relocations for
4948 branch lookup table when --emit-relocs as well as when --shared.
4949 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
4950 relbrlt test. For --emit-stub-syms, always output a sym even when
4951 one already exists on a plt call stub. Put stub type in the stub
4952 symbol name.
4953 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
4954 test.
4955 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
4956 reloc_count in stub sections. Adjust relbrlt test.
4957 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
4958 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
4959 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
4960 for relocs against discarded symbols. Fix comments.
4961
229fcec5
MM
49622004-09-06 Mark Mitchell <mark@codesourcery.com>
4963
4964 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
4965 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
4966 from ...
4967 (map_sections_to_segments): ... here. Use it. Assign a file
4968 position to the .dynamic section if it is not loadable, but part
4969 of the PT_DYNAMIC segment.
4970 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4971 offsets, not VMAs, for the BPABI. Do not fill in the header in
4972 the .got.plt section for the BPABI.
4973 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
4974 PT_DYNAMIC segment.
4975 (elf_backend_want_got_plt): Define to zero for Symbian OS.
073a2dc3 4976
9a0789ec
NC
49772004-09-06 Nick Clifton <nickc@redhat.com>
4978
4979 * elflink.c (elf_link_add_object_symbols): Set the error code to
4980 bfd_error_wrong_format when the input format does not match the
4981 output format.
4982
7b53ace3
AM
49832004-09-06 Alan Modra <amodra@bigpond.net.au>
4984
4985 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
4986 (ppc64_elf_check_directives): ..here.
4987 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
4988 before accessing ppc64_elf_tdata.
4989 (ppc64_elf_finish_dynamic_sections): And here too.
4990
3e540f25
AM
49912004-09-04 Alan Modra <amodra@bigpond.net.au>
4992
4993 * bfd.c (_bfd_default_error_handler): Correct loop exit.
4994
e5a52504
MM
49952004-09-03 Mark Mitchell <mark@codesourcery.com>
4996
4997 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
4998 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
4999 (bfd_elf32_littlearm_symbian_vec): Likewise.
5000 * configure: Regenerated.
5001 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
5002 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
5003 (PLT_ENTRY_SIZE): Likewise.
5004 (bfd_vma_elf32_arm_symbian_plt_entry): New
5005 variable.
5006 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
5007 and symbian_p.
5008 (create_got_section): Don't create sections when generating BPABI
5009 objects.
5010 (elf32_arm_create_dynamic_sections): Tidy.
5011 (elf32_arm_link_hash_table_create): Set plt_header_size,
5012 plt_entry_size, and symbian_p.
5013 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
5014 generating BPABI objects.
5015 (allocate_dynrelocs): Use htab->plt_header_size, not
5016 PLT_HEADER_SIZE. Do not add to .got.plt when
5017 generating BPABI objects.
5018 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
5019 * elfarm-nabi.c: Add SymbianOS target vectors.
5020 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
5021 (_bfd_elf_link_create_dynamic_sections): Likewise.
5022 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
5023 (elfNN_bed): Use it.
5024 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
5025 (bfd_elf32_littlearm_symbian_vec): Likewise.
5026 (_bfd_target_vector): Add them.
5027
6e3b6835
NC
50282004-09-03 Nick Clifton <nickc@redhat.com>
5029
5030 PR 360
5031 * coffcode.h (handle_COMDAT): Replace abort with an warning
5032 message and allow the scan to continue.
5033
595da8c5
AM
50342004-09-02 Alan Modra <amodra@bigpond.net.au>
5035
5036 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
5037 in when reading relocs, not our sorted syms. Remove unnecessary
5038 var.
5039
6723a9f4
EB
50402004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
5041
5042 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
5043
5464f5a1
NN
50442004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
5045
5046 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
5047 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
5048 replace uses of *_alias with *_noncanonical.
5049 * aclocal.m4: Rebuild with aclocal 1.4p6.
5050 * Makefile.in: Rebuild with automake 1.4p6.
5051 * doc/Makefile.in: Rebuild with automake 1.4p6.
5052 * configure.in: Autoupdate with autoupdate 2.59.
5053 * config.in: Regenerate with autoheader 2.59.
5054 * configure: Regnerate with autoconf 2.59.
5055
a7535cf3
AM
50562004-08-28 Alan Modra <amodra@bigpond.net.au>
5057
5058 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
5059 symbol pointer arrays before modifying.
5060
c9727e01
AM
50612004-08-28 Alan Modra <amodra@bigpond.net.au>
5062
b91e2ae2 5063 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
c9727e01
AM
5064 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
5065 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
5066 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
b91e2ae2
AM
5067 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
5068 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
5069 Use both symbol tables on non-relocatable objects. Use a common
5070 error exit. Fix "mid" warning.
c9727e01
AM
5071 * libbfd.h: Regenerate.
5072 * bfd-in2.h: Regenerate.
5073
699733f6
AM
50742004-08-28 Alan Modra <amodra@bigpond.net.au>
5075
5076 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
5077 object file.
5078 (struct sfpr_def_parms): Save some space.
5079 (sfpr_define): Here too.
5080
5081 * elf64-ppc.c (compare_symbols): Put section syms first.
5082 (sym_exists_at): New function.
5083 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
5084 points only for relocatable files. Use .opd section contents
5085 otherwise. Generally clean up the code.
5086
deb0e272
AM
50872004-08-27 Alan Modra <amodra@bigpond.net.au>
5088
5089 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
5090 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
5091 (struct sfpr_def_parms): New.
5092 (sfpr_define): New function.
5093 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
5094 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
5095 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
5096 (savefpr1_tail, restfpr1_tail): New functions.
5097 (savevr, savevr_tail, restvr, restvr_tail): New functions.
5098 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
5099 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
5100 code. Define all ABI mandated _save and _rest functions.
5101
85a84e7a
PB
51022004-08-26 Paul Brook <paul@codesourcery.com>
5103
deb0e272 5104 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
85a84e7a 5105
688c58f3
AM
51062004-08-26 Alan Modra <amodra@bigpond.net.au>
5107
5108 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
5109 TRUE or FALSE.
5110
3e95eabc
AM
51112004-08-26 Alan Modra <amodra@bigpond.net.au>
5112
5113 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
5114 that pcrel correction is applied for R_386_PC32.
5115
f855931b
AM
51162004-08-25 Alan Modra <amodra@bigpond.net.au>
5117
5118 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
5119 for R_386_32 and R_386_PC32 relocs against symbols defined in
5120 discarded sections.
5121
b18c562e
NC
51222004-08-25 Dmitry Diky <diwil@spec.ru>
5123
5124 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
5125 Add new relocations.
5126 * bfd-in2.h: Regenerate.
f855931b 5127 * libbfd.h: Regenerate.
b18c562e
NC
5128 * elf32-msp430.c: Clean-up code.
5129 (elf_msp430_howto_table): Add new relocation entries.
5130 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
5131 (msp430_elf_relax_section): New function.
5132 (msp430_elf_relax_delete_bytes): New function.
5133 (msp430_elf_symbol_address_p): New function.
5134
af705ba8
NC
51352004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
5136
5137 * elf32-m32r.c (m32r_elf_relocate_section): Handle
5138 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
5139
ea5158d8
DJ
51402004-08-20 Daniel Jacobowitz <dan@debian.org>
5141
5142 * elflink.c (_bfd_elf_section_already_linked): Handle
5143 SEC_LINK_DUPLICATES_SAME_CONTENTS.
5144
49d934f1
MM
51452004-08-19 Mark Mitchell <mark@codesourcery.com>
5146
5147 * config.bfd (arm*-*-symbianelf*): New target.
5148 (arm*-*-eabi*): Likewise.
5149
039b3fef
AM
51502004-08-19 Alan Modra <amodra@bigpond.net.au>
5151
5152 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
5153 "struct ppc_link_hash_entry *".
5154 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
5155 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
5156
3f764659
JJ
51572004-08-19 Jakub Jelinek <jakub@redhat.com>
5158
5159 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
5160 entries (where fd_aux overlaps next entry's fd_func).
5161 Add non_overlapping argument, use it.
5162 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
5163 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5164 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
5165 as indexes into opd_sym_map/opd_adjust array.
5166 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
5167
c09bdfe5
AM
51682004-08-18 Alan Modra <amodra@bigpond.net.au>
5169
5170 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
5171 if we can look up their function descriptor in a regular file.
5172
271d0fc3
NC
51732004-08-18 Nick Clifton <nickc@redhat.com>
5174
5175 PR 324
5176 * cofflink.c (coff_link_add_symbols): Check that the comdat
5177 pointer in the coff_section_data structure has been initialised
5178 before using it.
5179
a010d60f
AM
51802004-08-18 Alan Modra <amodra@bigpond.net.au>
5181
5182 PR 338
5183 * elflink.c (bfd_elf_record_link_assignment): Add comment about
5184 changing bfd_link_hash_undefined to bfd_link_hash_new.
5185
90e3cdf2
JJ
51862004-08-17 Jakub Jelinek <jakub@redhat.com>
5187
5188 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
5189 if not yet defined.
5190 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
5191 (synthetic_opd, synthetic_relocatable): New variables.
5192 (compare_symbols, compare_relocs): New helper routines.
5193 (ppc64_elf_get_synthetic_symtab): New function.
5194 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
5195 to relsyms.
5196 * bfd-in2.h: Regenerated.
5197 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
5198 to relsyms. Return 0 if abfd is relocatable.
5199
7c2c8505
AM
52002004-08-17 Alan Modra <amodra@bigpond.net.au>
5201
5202 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
5203
0367ecfb
NC
52042004-08-17 Nick Clifton <nickc@redhat.com>
5205
5206 * (is_arm_mapping_symbol_name): New function - return true
5207 when a symbol name matches the requirements for an ARM mapping
5208 symbol name.
5209 (arm_elf_find_function): New function based on
5210 elf_find_function in elf.c but skipping ARM mapping symbols
5211 and including thumb function symbols.
5212 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
5213 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
5214
2441e016
AM
52152004-08-17 Alan Modra <amodra@bigpond.net.au>
5216
5217 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
5218 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
5219 (ppc64_elf_brtaken_reloc): Here too.
5220
35b0ce59
AM
52212004-08-17 Alan Modra <amodra@bigpond.net.au>
5222
5223 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
5224 symbol visibility.
5225 (ppc64_elf_check_directives): Check that we have the right hash
5226 table before proceeding.
5227
81688140
AM
52282004-08-17 Alan Modra <amodra@bigpond.net.au>
5229
5230 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
5231 (adjust_opd_syms): Attach opd syms for deleted entries to one of
5232 the sections that will be discarded.
5233
327c1315
AM
52342004-08-16 Alan Modra <amodra@bigpond.net.au>
5235
5236 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
5237
45fc9e4a
AM
52382004-08-16 Alan Modra <amodra@bigpond.net.au>
5239
5240 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
5241 free space available.
5242
9dadfa79
AM
52432004-08-16 Alan Modra <amodra@bigpond.net.au>
5244
5245 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
f89c4dec 5246 occurrences with bfd_byte * thoughout file.
9dadfa79
AM
5247
5248 * coff-rs6000.c (do_shared_object_padding): Warning fix.
5249 (xcoff_write_armap_big): Likewise.
5250 (xcoff_write_archive_contents_old): Likewise.
5251 (xcoff_write_archive_contents_big): Likewise.
5252
5253 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
5254
57e8b36a
NC
52552004-08-13 Nick Clifton <nickc@redhat.com>
5256
5257 * elf32-arm.h: Convert to ISO C90.
5258
a005f94e
AM
52592004-08-13 Alan Modra <amodra@bigpond.net.au>
5260
5261 PR 293
5262 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
5263 zero the plt field.
5264
d003868e
AM
52652004-08-13 Alan Modra <amodra@bigpond.net.au>
5266
5267 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
5268 (bfd_archive_filename, bfd_get_section_ident): Delete.
5269 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
5270 bfd_archive_filename.
5271 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
5272 to warn about symbols in discarded sections. Use _bfd_error_handler.
5273 * aout-adobe.c (aout_adobe_callback): See below.
5274 * aout-cris.c (swap_ext_reloc_in): ..
5275 * coff-arm.c (find_thumb_glue, find_arm_glue,
5276 coff_arm_relocate_section, bfd_arm_process_before_allocation,
5277 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
5278 coff_arm_copy_private_bfd_data): ..
5279 * coff-i860.c (i860_reloc_processing): ..
5280 * coff-mcore.c (mcore_coff_unsupported_reloc,
5281 coff_mcore_relocate_section): ..
5282 * coff-ppc.c (coff_ppc_relocate_section): ..
5283 * coff-rs6000.c (xcoff_create_csect_from_smclas
5284 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5285 sh_swap_insns, sh_relocate_section): ..
5286 * coff-tic54x.c (tic54x_reloc_processing): ..
5287 * coff-tic80.c (coff_tic80_relocate_section): ..
5288 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
5289 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
5290 coff_slurp_symbol_table, coff_classify_symbol,
5291 coff_slurp_reloc_table): ..
5292 * coffgen.c (_bfd_coff_read_string_table): ..
5293 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
5294 _bfd_coff_generic_relocate_section): ..
5295 * cpu-arm.c (bfd_arm_merge_machines): ..
5296 * cpu-sh.c (sh_merge_bfd_arch): ..
5297 * elf-hppa.h (elf_hppa_relocate_section): ..
5298 * elf.c (bfd_elf_string_from_elf_section, setup_group,
5299 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
5300 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
5301 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
5302 * elf32-arm.h (find_thumb_glue, find_arm_glue,
5303 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
5304 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
5305 elf32_arm_relocate_section, elf32_arm_set_private_flags,
5306 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
5307 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
5308 cris_elf_merge_private_bfd_data
5309 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
5310 * elf32-gen.c (elf32_generic_link_add_symbols): ..
5311 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
5312 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
5313 elf32_hppa_relocate_section): ..
5314 * elf32-i370.c (i370_elf_merge_private_bfd_data,
5315 i370_elf_check_relocs, i370_elf_relocate_section): ..
5316 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
5317 elf_i386_relocate_section): ..
5318 * elf32-m32r.c (m32r_elf_relocate_section,
5319 m32r_elf_merge_private_bfd_data): ..
5320 * elf32-m68hc1x.c (m68hc12_add_stub,
5321 _bfd_m68hc11_elf_merge_private_bfd_data): ..
5322 * elf32-m68k.c (elf_m68k_relocate_section): ..
5323 * elf32-mcore.c (mcore_elf_unsupported_reloc,
5324 mcore_elf_relocate_section): ..
5325 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
5326 ppc_elf_check_relocs, ppc_elf_relocate_section,
5327 ppc_elf_begin_write_processing): ..
5328 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5329 elf_s390_relocate_section): ..
5330 * elf32-sh-symbian.c (sh_symbian_import_as,
5331 sh_symbian_process_embedded_commands,
5332 sh_symbian_relocate_section): ..
5333 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
5334 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
5335 sh_elf_merge_private_data): ..
5336 * elf32-sparc.c (elf32_sparc_check_relocs,
5337 elf32_sparc_relocate_section,
5338 elf32_sparc_merge_private_bfd_data): ..
5339 * elf32-v850.c (v850_elf_check_relocs,
5340 v850_elf_merge_private_bfd_data): ..
5341 * elf32-xtensa.c (elf_xtensa_check_relocs,
5342 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
5343 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
5344 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
5345 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
5346 * elf64-gen.c (elf64_generic_link_add_symbols): ..
5347 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
5348 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
5349 ppc64_elf_relocate_section): ..
5350 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
5351 elf_s390_relocate_section): ..
5352 * elf64-sh64.c (sh_elf64_relocate_section): ..
5353 * elf64-sparc.c (sparc64_elf_check_relocs,
5354 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
5355 sparc64_elf_merge_private_bfd_data): ..
5356 * elf64-x86-64.c (elf64_x86_64_check_relocs,
5357 elf64_x86_64_relocate_section): ..
5358 * elflink.c (_bfd_elf_add_default_symbol,
5359 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
5360 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
5361 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
5362 elf_get_linked_section_vma, elf_fixup_link_order,
5363 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
5364 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
5365 * elfxx-ia64.c (elfNN_ia64_relax_section,
5366 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
5367 * elfxx-mips.c (mips_elf_perform_relocation,
5368 _bfd_mips_elf_check_relocs,
5369 _bfd_mips_elf_merge_private_bfd_data): ..
5370 * ieee.c (ieee_slurp_external_symbols): ..
5371 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
5372 * libbfd.c (_bfd_generic_verify_endian_match): ..
5373 * linker.c (_bfd_generic_link_add_one_symbol,
5374 _bfd_generic_section_already_linked): ..
5375 * pdp11.c (translate_to_native_sym_flags): ..
5376 * pe-mips.c (coff_pe_mips_relocate_section): ..
5377 * peicode.h (pe_ILF_build_a_bfd): ..
5378 * srec.c (srec_bad_byte): ..
5379 * stabs.c (_bfd_link_section_stabs): ..
5380 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
5381 Replace all uses of bfd_archive_filename and bfd_get_section_ident
5382 with corresponding %B and %A in _bfd_error_handler format string.
5383 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
5384 calls to use %A and %B. Fix "against symbol .. from section" and
5385 similar error messages. Combine multiple _bfd_error_handler calls
5386 where they were separated due to bfd_archive_filename deficiencies.
5387 * bfd-in2.h: Regenerate.
5388
6ba842b6
L
53892004-08-12 H.J. Lu <hongjiu.lu@intel.com>
5390
5391 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
5392 relocation.
5393
99877b66
AM
53942004-08-10 Alan Modra <amodra@bigpond.net.au>
5395
5396 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
5397 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
5398 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
5399 Add twiddled_syms.
5400 (link_hash_newfunc): Init was_undefined.
5401 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
5402 Use undefweak instead.
5403 (ppc64_elf_check_directives): Fix undefs chain.
5404 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
5405 references.
5406 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
5407 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
5408 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
5409
ba3bee0b
JJ
54102004-08-09 Jakub Jelinek <jakub@redhat.com>
5411
5412 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
5413 error, test input_section flags rather than sec.
5414
8387904d
AM
54152004-08-09 Alan Modra <amodra@bigpond.net.au>
5416
5417 * elf-bfd.h (struct elf_backend_data): Add
5418 elf_backend_archive_symbol_lookup.
5419 (_bfd_elf_archive_symbol_lookup): Declare.
5420 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
5421 (elf_link_add_archive_symbols): ..extracted from here. Call the
5422 backend version.
5423 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
5424 (elfNN_bed): Init new field.
5425 * elf64-ppc.c (elf_backend_check_directives): Define.
5426 (elf_backend_archive_symbol_lookup): Define.
5427 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
5428 a ppc_link_hash_entry pointer.
5429 (get_fdh): Move.
5430 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
5431 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
5432 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
5433 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
5434 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
5435 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
5436 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
5437 descriptor symbols.
5438
b25116a9
AM
54392004-08-09 Alan Modra <amodra@bigpond.net.au>
5440
8843416a
AM
5441 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
5442 (ppc64_elf_add_symbol_hook): Test for NULL section.
5443 (get_sym_h): Formatting.
5444 (ppc64_elf_size_stubs): Include reloc addend in value stored as
5445 stub target_value.
5446
b25116a9
AM
5447 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
5448 long branch stubs with code handling plt and r2off branch stubs.
5449
ccfa59ea
AM
54502004-08-09 Alan Modra <amodra@bigpond.net.au>
5451
5452 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
5453 * elflink.c (elf_link_input_bfd): Formatting.
5454 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
5455 all callers.
5456 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
5457 (link_hash_newfunc): Don't set it.
5458 (ppc64_elf_copy_indirect_symbol): Nor copy it.
5459 (ppc64_elf_mark_entry_syms): Delete.
5460 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
5461 sections. Use get_opd_info.
5462 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
5463
4025353c
AM
54642004-08-09 Alan Modra <amodra@bigpond.net.au>
5465
4f800a42
AM
5466 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
5467
06da1e8e
AM
5468 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
5469 (func_desc_adjust): Don't set have_undefweak.
5470 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
5471 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
5472
34814b9f
AM
5473 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
5474 "struct ppc_link_hash_entry *". Adjust all references.
5475 (ppc64_elf_hide_symbol): Correct a comment.
5476
4025353c
AM
5477 * elf64-ppc.c (get_opd_info): New function.
5478 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
5479 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
5480 before calling get_fdh. Test fdh rather than h before dereferencing
5481 fdh. Mark removed symbols in opd_adjust.
5482 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
5483 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
5484 opd symbols.
5485 (ppc64_elf_output_symbol_hook): Likewise.
5486
db6579d4
PB
54872004-08-06 Paul Brook <paul@codesourcery.com>
5488
5489 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
5490 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
5491 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
5492 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
5493 and BFD_RELOC_ARM_SBREL32.
5494 * bfd-in2.h, bbfd.h: Regenerate.
5495
a4d0f181
TS
54962004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5497
5498 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
5499 the dynamic link symbol actually in use.
5500
83774818
SC
55012004-08-01 Stephane Carrez <stcarrez@nerim.fr>
5502
5503 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
5504
a4d0f181 55052004-07-31 Joel Brobecker <brobecker@gnat.com>
00b4930b
TS
5506 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5507
5508 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
5509 SHN_MIPS_TEXT and SHN_MIPS_DATA.
5510
185d09ad
L
55112004-07-30 H.J. Lu <hongjiu.lu@intel.com>
5512 Nick Clifton <nickc@redhat.com>
5513
5514 PR 290
5515 * bfd.c (_bfd_default_error_handler): Make it global.
5516
5517 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
5518
5519 * elf.c (assign_section_numbers): Cope gracefully with sections
5520 which have SHF_LINK_ORDER set but no sh_link set up.
5521 * elflink.c (elf_get_linked_section_vma): Likewise.
5522
5523 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
5524 it to NULL.
5525
5526 * elfxx-target.h (elf_backend_link_order_error_handler): New.
5527 Set it to _bfd_default_error_handler.
5528 (elfNN_bed): Add elf_backend_link_order_error_handler.
5529
5530 * libbfd-in.h (_bfd_default_error_handler): New.
5531
5532 * libbfd.h: Regenerated.
5533
7946e94a
JJ
55342004-07-30 Jakub Jelinek <jakub@redhat.com>
5535
5536 * archures.c (bfd_mach_sparc_64bit_p): Define.
5537 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
5538 * bfd-in2.h: Rebuilt.
5539
1d70c7fb
AO
55402004-07-29 Alexandre Oliva <aoliva@redhat.com>
5541
5542 Introduce SH2a support.
5543 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
5544 * archures.c (bfd_mach_sh2a_nofpu): New.
5545 * bfd-in2.h: Rebuilt.
5546 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
5547 (arch_info_struct): Add sh2a_nofpu.
5548 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
5549 2003-12-29 DJ Delorie <dj@redhat.com>
5550 * reloc.c: Add relocs for sh2a.
5551 * bfd-in2.h: Regenerate.
5552 * libbfd.hh: Regenerate.
5553 2003-12-01 Michael Snyder <msnyder@redhat.com>
5554 * archures.c (bfd_mach_sh2a): New.
5555 * bfd-in2.h: Rebuilt.
5556 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
5557 (SH2A_NEXT): New.
5558 (arch_info_struct): Add sh2a.
5559 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
5560
404ed0cf
DA
55612004-07-28 Nick Clifton <nickc@redhat.com>
5562 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5563
5564 PR 273
5565 * som.c (setup_sections): Improve estimation of space sizes in
5566 relocatable objects.
5567
225247f0
JT
55682004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
5569 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
5570 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
5571 to targ_selvecs.
5572 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
5573 * configure: Regenerate.
5574 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
5575 case that accepts OSABI=NetBSD and OSABI=SysV.
5576 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
5577 the base of .got or .data (if .got does not exist).
5578 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
5579 set OSABI=NetBSD.
5580 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
5581 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
5582 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
5583 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
5584
3d7f7666
L
55852004-07-27 H.J. Lu <hongjiu.lu@intel.com>
5586
5587 PR 161/251
5588 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
5589 (elf_sec_group): Defined.
5590 (bfd_elf_match_symbols_in_sections): New prototype.
5591 (_bfd_elf_setup_group_pointers): Likewise.
5592
5593 * elf.c (bfd_elf_discard_group): Abort.
5594 (bfd_elf_set_group_contents): Also include relocation sections.
5595 Remove zero-fill for ld -r.
5596 (_bfd_elf_setup_group_pointers): New function.
5597 (elf_sort_elf_symbol): Likewise.
5598 (elf_sym_name_compare): Likewise.
5599 (bfd_elf_match_symbols_in_sections): Likewise.
5600
5601 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
5602
5603 * elflink.c (match_group_member): New.
5604 (elf_link_input_bfd): Check group member for discarded section.
5605 (try_match_symbols_in_sections): New function.
5606 (already_linked): Likewise.
5607 (_bfd_elf_section_already_linked): Support mixing comdat group
5608 and linkonce section.
5609
5610 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
5611 * linker.c (bfd_section_already_linked_table_traverse): New.
5612
5613 * libbfd.h: Regenerated.
5614
670ec21d
NC
56152004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
5616
5617 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
5618 BFD_RELOC_CRX_SWITCH32.
5619 * bfd-in2.h: Regenerate.
6cd7f07e 5620 * libbfd.h: Regenerate.
670ec21d
NC
5621 * elf32-crx.c: Support relocation/relaxation of
5622 BFD_RELOC_CRX_SWITCH* types.
5623
2c66dc6c
AM
56242004-07-27 Alan Modra <amodra@bigpond.net.au>
5625
5626 * elf64-ppc.c: Correct "Linker stubs" comment.
5627
38ce5b11
L
56282004-07-26 H.J. Lu <hongjiu.lu@intel.com>
5629
5630 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
5631 linked-to section.
5632 (elf_linked_to_section): New.
5633
5634 * elf.c (assign_section_numbers): Set up sh_link for
5635 SHF_LINK_ORDER.
5636
5637 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
5638 to sh_link for SHT_IA_64_UNWIND sections.
5639
65da361f
L
56402004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5641
5642 * elflink.c (elf_fixup_link_order): Add _() to error message.
5643
08ccf96b
L
56442004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5645
5646 * elflink.c (elf_fixup_link_order): Issue a warning and flag
5647 an error if failed.
5648
082b7297
L
56492004-07-21 H.J. Lu <hongjiu.lu@intel.com>
5650
5651 * aout-adobe.c (aout_32_section_already_linked): Defined.
5652 * aout-target.h (MY_section_already_linked): Likewise.
5653 * aout-tic30.c (MY_section_already_linked): Likewise.
5654 * binary.c (binary_section_already_linked): Likewise.
5655 * bout.c (b_out_section_already_linked): Likewise.
5656 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
5657 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
5658 * coffcode.h (coff_section_already_linked): Likewise.
5659 * i386msdos.c (msdos_section_already_linked): Likewise.
5660 * i386os9k.c (os9k_section_already_linked): Likewise.
5661 * ieee.c (ieee_section_already_linked): Likewise.
5662 * ihex.c (ihex_section_already_linked): Likewise.
5663 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
5664 * mmo.c (mmo_section_already_linked): Likewise.
5665 * nlm-target.h (nlm_section_already_linked): Likewise.
5666 * oasys.c (oasys_section_already_linked): Likewise.
5667 * pef.c (bfd_pef_section_already_linked): Likewise.
5668 * ppcboot.c (ppcboot_section_already_linked): Likewise.
5669 * som.c (som_bfd_discard_group): Likewise.
5670 * srec.c (srec_section_already_linked): Likewise.
5671 * tekhex.c (tekhex_section_already_linked): Likewise.
5672 * versados.c (versados_section_already_linked): Likewise.
5673 * vms.c (vms_section_already_linked): Likewise.
5674 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
5675 * xsym.c (bfd_sym_section_already_linked): Likewise.
5676
5677 * bfd-in.h (bfd_section_already_linked_table_init): New.
5678 (bfd_section_already_linked_table_free): Likewise.
5679
5680 * coff-rs6000.c (rs6000coff_vec): Add
5681 _bfd_generic_section_already_linked.
5682 (pmac_xcoff_vec): Likewise.
5683 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5684 (aix5coff64_vec): Likewise.
5685
5686 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
5687 * elflink.c (_bfd_elf_section_already_linked): New function.
5688
5689 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
5690
5691 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
5692 (_bfd_generic_section_already_linked): New.
5693 (bfd_section_already_linked_hash_entry): Likewise.
5694 (bfd_section_already_linked): Likewise.
5695 (bfd_section_already_linked_table_lookup): Likewise.
5696 (bfd_section_already_linked_table_insert): Likewise.
5697
5698 * linker.c (bfd_section_already_linked): New.
5699 (_bfd_section_already_linked_table): Likewise.
5700 (bfd_section_already_linked_table_lookup): Likewise.
5701 (bfd_section_already_linked_table_insert): Likewise.
5702 (already_linked_newfunc): Likewise.
5703 (bfd_section_already_linked_table_init): Likewise.
5704 (bfd_section_already_linked_table_free): Likewise.
5705 (_bfd_generic_section_already_linked): Likewise.
5706
5707 * section.c (bfd_section): Remove comdat.
5708 (bfd_comdat_info): Moved to ...
5709 * bfd-in.h (coff_comdat_info): Here.
5710 (bfd_coff_get_comdat_section): New.
5711 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
5712 * libcoff-in.h (coff_section_tdata): Add comdat.
5713 * coffcode.h (handle_COMDAT): Updated.
5714 * cofflink.c (coff_link_add_symbols): Likewise.
5715 * ecoff.c (bfd_debug_section): Likewise.
5716
5717 * targets.c (bfd_target): Add _section_already_linked.
5718 (BFD_JUMP_TABLE_LINK): Updated.
5719
5720 * bfd-in2.h: Regenerated.
5721 * libbfd.h: Likewise.
5722 * libcoff.h: Likewise.
5723
0b52efa6
PB
57242003-07-21 Paul Brook <paul@codesourcery.com>
5725
5726 * elflink.c (elf_get_linked_section_vma, compare_link_order,
5727 elf_fixup_link_order): New functions.
5728 (bfd_elf_final_link): Call elf_fixup_link_order.
5729
7e2294f9
AO
57302004-07-21 Alexandre Oliva <aoliva@redhat.com>
5731
5732 * elf-bfd.h (ELF_COMMON_DEF_P): New.
5733 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
5734 common definitions.
5735 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
5736 _bfd_elf_symbol_refs_local_p.
5737 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
5738 symbols.
5739
e56f61be
L
57402004-07-19 H.J. Lu <hongjiu.lu@intel.com>
5741
5742 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
5743 DYN_NO_NEEDED.
5744 (bfd_elf_get_dyn_lib_class): New prototype.
5745 * elf.c (bfd_elf_get_dyn_lib_class): New function.
5746
5747 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
5748 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
5749 entry is needed. Issue an error if a DT_NEEDED entry is needed
5750 for a file marked DYN_NO_NEEDED.
5751 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
5752 for DT_NEEDED tags.
5753
5754 * bfd-in2.h: Regenerated.
5755
27b56da8
DA
57562004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5757
5758 * elflink.c (elf_section_complain_discarded): Don't complain in
5759 .PARISC.unwind.
5760
bbb268c3
JW
57612004-07-10 James E Wilson <wilson@specifixinc.com>
5762
5763 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
5764 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
5765 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
5766 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
5767 Fix callers.
5768 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
5769 bfd_put_64 to bfd_putl64.
5770 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
2c66dc6c 5771
e525914f
L
57722004-07-09 H.J. Lu <hongjiu.lu@intel.com>
5773
5774 PR 240
5775 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
5776 .init/.fini sections when trying to relax it.
5777
b1a6d0b1
NC
57782004-07-09 Jie Zhang <zhangjie@magima.com.cn>
5779
5780 * elf.c (assign_file_positions_for_segments): Make sure the
5781 .dynamic section is the first section in the PT_DYNAMIC segment.
5782
1a320fbb
NC
57832004-07-09 Nick Clifton <nickc@redhat.com>
5784
5785 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
5786 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
5787 sh_elf_get_flags_from_mach functions so that they do not conflict
5788 when this target is built with other sh-elf targets.
5789 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
5790 suppression of this function.
5791 (sh_elf_find_flags): Likewise.
5792
1fe1f39c
NC
57932004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
5794
5795 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
5796 (ALL_MACHINES_CFILES): Add cpu-crx.c.
5797 (BFD32_BACKENDS): Add elf32-crx.lo.
5798 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
5799 (cpu-crx.lo): New target.
5800 (elf32-crx.lo): New target.
5801 * Makefile.in: Regenerate.
5802 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
5803 (bfd_archures_list): Add bfd_crx_arch.
5804 * bfd-in2.h: Regenerate.
5805 * config.bfd: Handle crx-*-elf*, crx*.
5806 * configure.in: Handle bfd_elf32_crx_vec.
5807 * configure: Regenerate.
5808 * cpu-crx.c: New file.
5809 * elf32-crx.c: Likewise.
5810 * libbfd.h: Regenerate.
5811 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
5812 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
5813 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
5814 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
5815 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
5816 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
5817 * targets.c (bfd_elf32_crx_vec): Declare.
5818 (bfd_target_vector): Add bfd_elf32_crx_vec.
5819
85fbca6a
NC
58202004-07-06 Nick Clifton <nickc@redhat.com>
5821
5822 * config.bfd: Add sh-symbian-elf target.
5823 * configure.in: Add bfd_elf32_shl_symbian_vec.
5824 * configure: Regenerate.
5825 * elf-bfd.h (struct elf_backend_data): Add new field
5826 'check_directives'.
1fe1f39c 5827 * elflink.c (elf_link_add_object_symbols): Invoke the
85fbca6a 5828 check_directives function, if defined.
1fe1f39c 5829 * elfxx-target.h: Provide a default, NULL definition for
85fbca6a 5830 check_directives.
1fe1f39c
NC
5831 * targets.c: Add bfd_elf32_shl_symbian_vec.
5832 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
85fbca6a 5833 definition.
1fe1f39c 5834 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
85fbca6a 5835 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
1fe1f39c 5836 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
85fbca6a 5837 not already been defined.
1fe1f39c
NC
5838 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
5839 * sh-symbian.c: New file. Provide functions to support the
85fbca6a
NC
5840 * sh-symbian-elf target.
5841 * Makefile.am: Add elf32-sh-symbian.c
5842 * Makefile.in: Regenerate.
1fe1f39c 5843
871ec896
JR
58442004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
5845
1fe1f39c
NC
5846 * elf32-sh.c: Include ../opcodes/sh-opc.h.
5847 * Makefile.am: Ran make dep-am.
5848 * Makefile.in: Ran make dep-in.
871ec896 5849
c87db184
CF
58502004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
5851
5852 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
5853 externals properly.
5854
06f2f6af
MS
58552004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
5856
5857 * config.bfd: Add want64 to configuration target s390-*-linux*.
5858
b602c853
L
58592004-07-01 H.J. Lu <hongjiu.lu@intel.com>
5860
5861 * bfd.c (bfd_get_section_ident): New.
5862
5863 * elflink.c (elf_link_read_relocs_from_section): Call
5864 bfd_get_section_ident to identify the section when reporting
5865 error.
5866 (_bfd_elf_link_output_relocs): Likewise.
5867 (elf_link_output_extsym): Likewise.
5868 (elf_link_input_bfd): Likewise.
5869 (bfd_elf_gc_record_vtinherit): Likewise.
5870
5871 * bfd-in2.h: Regenerated.
5872
7a2a6943
NC
58732004-07-01 Jie Zhang <zhangjie@magima.com.cn>
5874 Nick Clifton <nickc@redhat.com>
5875
5876 PR 204
5877 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
5878 of section symbols to mips_elf_sort_hash_table ().
5879
cdd3575c
AM
58802004-07-01 Alan Modra <amodra@bigpond.net.au>
5881
5882 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
5883 change. Comment.
5884 (elf_section_complain_discarded): New function. Handle
5885 .gcc_except_table too.
5886 (elf_link_input_bfd): Rewrite handling of relocs against symbols
5887 in discarded sections.
5888 * elf-bfd.h (elf_discarded_section): Protect macro arg.
5889
21a8f7fa
JW
58902004-06-30 James E Wilson <wilson@specifixinc.com>
5891
5892 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
5893 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
5894
2de26f35
L
58952004-06-30 H.J. Lu <hongjiu.lu@intel.com>
5896
5897 PR 233
5898 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
5899 local references to discarded sections and report their
5900 locations.
5901
72d7a15c
AM
59022004-06-30 Alan Modra <amodra@bigpond.net.au>
5903
5904 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
5905 sec_info_type, test section name instead.
5906
e7f0a167
L
59072004-06-29 H.J. Lu <hongjiu.lu@intel.com>
5908
5909 PR 240
5910 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
5911 in .init/.fini sections.
5912
bff5f93a
BW
59132004-06-29 Bob Wilson <bob.wilson@acm.org>
5914
5915 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
5916 bfd_get_section_limit.
5917
b54d4b07
BW
59182004-06-29 Bob Wilson <bob.wilson@acm.org>
5919
5920 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
5921 output section size.
5922
e87a64e1
AM
59232004-06-29 Alan Modra <amodra@bigpond.net.au>
5924
1a23a9e6
AM
5925 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
5926 rawsize.
5927 (mmix_elf_perform_relocation): Adjust for above change.
5928 (mmix_elf_relocate_section): Likewise.
5929 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
5930 (mmix_elf_get_section_contents): Delete.
5931 (bfd_elf64_get_section_contents): Delete.
5932 (mmix_elf_relocate_section): Zero stub area.
5933 * linker.c (default_indirect_link_order): Alloc max of section size
5934 and rawsize.
5935 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
5936 * section.c (bfd_malloc_and_get_section): Likewise.
5937 (struct bfd_section): Update rawsize comment.
5938 * bfd-in2.h: Regenerate.
5939
e87a64e1
AM
5940 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
5941
07515404
AM
59422004-06-29 Alan Modra <amodra@bigpond.net.au>
5943
5944 * bfd-in.h (bfd_get_section_limit): Define.
1fe1f39c 5945 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
07515404
AM
5946 (_bfd_final_link_relocate): Use bfd_get_section_limit.
5947 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
5948 * coff-arm.c (coff_arm_relocate_section): Likewise.
5949 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
5950 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
5951 (bfd_ns32k_final_link_relocate): Likewise.
5952 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
5953 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
1fe1f39c 5954 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
07515404 5955 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
1fe1f39c 5956 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
07515404
AM
5957 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
5958 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
5959 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5960 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
5961 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
5962 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
5963 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
5964 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
5965 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
5966 * elf32-v850.c (v850_elf_reloc): Likewise.
5967 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
5968 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
5969 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
5970 * elf64-mips.c (mips_elf64_gprel32_reloc)
5971 (mips16_gprel_reloc): Likewise.
5972 * elf64-mmix.c (mmix_elf_reloc): Likewise.
5973 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
5974 * elf64-sparc.c (init_insn_reloc): Likewise.
5975 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
1fe1f39c
NC
5976 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
5977 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
07515404
AM
5978 (_bfd_mips_elf_generic_reloc): Likewise.
5979 * bfd-in2.h: Regenerate.
5980
3722b82f
AM
59812004-06-28 Alan Modra <amodra@bigpond.net.au>
5982
5983 * bfd-in.h (struct stab_info): Move from stabs.c.
5984 * stabs.c (struct stab_link_includes_table): Delete.
5985 (stab_link_includes_lookup): Delete.
5986 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
5987 level of indirection from sinfo parm.
5988 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
5989 stabstr section. Adjust hash table accesses.
5990 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
5991 alloc. Adjust stab_info test.
5992 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
5993 (_bfd_coff_final_link): Adjust stab_info test.
5994 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
5995 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
5996 in place.
5997 * libcoff-in.h (struct coff_link_hash_table): Likewise.
5998 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
5999 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
6000 stabstr section. Adjust stab_info test.
6001 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
6002 (_bfd_write_stab_strings): Adjust prototypes.
6003 * libbfd.h: Regenerate.
6004 * libcoff.h: Regenerate.
6005 * bfd-in2.h: Regenerate.
6006
727e493d
MK
60072004-06-27 Mark Kettenis <kettenis@gnu.org>
6008
6009 From Miod Vallat <miod@online.fr>:
6010 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
6011
146ccdbb
AO
60122004-06-26 Alexandre Oliva <aoliva@redhat.com>
6013
6014 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
6015 (struct elf32_mn10300_link_hash_entry): Remove
6016 pcrel_relocs_copied.
6017 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
6018 R_MN10300_32. Don't adjust pcrel_relocs_copied.
6019 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
6020 and gotoff relocations if the symbol doesn't bind locally. Use
6021 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
6022 relocation for PCREL32.
6023 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
6024 to test whether a symbol binds locally.
6025 (elf32_mn10300_link_hash_newfunc): Don't initialize
6026 pcrel_relocs_copied.
6027 (_bfd_mn10300_elf_discard_copies): Delete.
6028 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
6029
a5fd0812
MK
60302004-06-26 Mark Kettenis <kettenis@gnu.org>
6031
6032 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
6033
22bfad37
JB
60342004-06-25 Joel Brobecker <brobecker@gnat.com>
6035
6036 * som.c (som_set_reloc_info): Correct small typo.
6037
097f809a
NC
60382004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
6039
6040 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
6041 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
6042 (m32r_elf_gcsweep_hook): Likewise.
6043 (m32r_elf_check_relocs): Likewise.
6044 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
6045 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
6046 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
6047 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
f9f2cf5d
NC
6048 * bfd-in2.h: Regenerated.
6049 * libbfd.h: Regenerated.
097f809a 6050
6610a52d
L
60512004-06-24 H.J. Lu <hongjiu.lu@intel.com>
6052
6053 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
6054 relocation symbol.
6055 (elf64_x86_64_relocate_section): Issue an error for
6056 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
6057 against global symbols when building shared library.
6058
eea6121a
AM
60592004-06-24 Alan Modra <amodra@bigpond.net.au>
6060
6061 * section.c (struct sec): Rename "_cooked_size" to "size".
6062 Rename "_raw_size" to "rawsize".
6063 (STD_SECTION): Adjust comments.
6064 (bfd_set_section_size, bfd_get_section_contents): Use size.
6065 (bfd_malloc_and_get_section): New function.
6066 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
6067 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
6068 Correctly free reloc and contents memory.
6069 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
6070 and fake CIE now that we can shink section size to zero.
6071 (_bfd_elf_write_section_eh_frame): Likewise..
6072 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
6073 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
6074 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
6075 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
6076 unneeded indirection.
6077 * elf.c (_bfd_elf_section_offset): .. and update call.
6078 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
6079 * libbfd.h: Regenerate.
6080 * bfd-in2.h: Regenerate.
6081
6082 Replace occurrences of "_raw_size" and "_cooked_size" in most places
6083 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
6084 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
6085 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
6086 Similarly use "rawsize", if non-zero, in reloc functions to validate
6087 reloc addresses. Use new bfd_malloc_and_get_section in most places
6088 where bfd_get_section_contents was called. Expand all occurrences of
6089 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
6090 grok_prstatus and similar functions to "size".
6091 * aix386-core.c (aix386_core_file_p): ..
6092 * aix5ppc-core.c (xcoff64_core_p): ..
6093 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
6094 aout_adobe_set_section_contents): ..
6095 * aout-target.h (callback): ..
6096 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
6097 MY_bfd_final_link): ..
6098 * aoutf1.h (sunos4_core_file_p): ..
6099 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6100 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
6101 final_link, aout_link_input_section): ..
6102 * binary.c (binary_object_p, binary_canonicalize_symtab,
6103 binary_set_section_contents): ..
6104 * bout.c (b_out_callback, b_out_write_object_contents,
6105 b_out_set_section_contents, b_out_bfd_relax_section,
6106 b_out_bfd_get_relocated_section_contents): ..
6107 * cisco-core.c (cisco_core_file_validate): ..
6108 * coff-alpha.c (alpha_ecoff_object_p,
6109 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
6110 * coff-arm.c (coff_arm_relocate_section,
6111 bfd_arm_allocate_interworking_sections): ..
6112 * coff-h8300.c (h8300_reloc16_extra_cases,
6113 h8300_bfd_link_add_symbols): ..
6114 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
6115 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
6116 ppc_bfd_coff_final_link): ..
6117 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
6118 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
6119 sh_align_loads, sh_coff_get_relocated_section_contents): ..
6120 * coff64-rs6000.c (xcoff64_write_object_contents,
6121 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
6122 * coffcode.h (coff_compute_section_file_positions,
6123 coff_write_object_contents): ..
6124 * coffgen.c (make_a_section_from_file, coff_write_symbols,
6125 coff_section_symbol, build_debug_section): ..
6126 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
6127 process_embedded_commands, _bfd_coff_link_input_bfd,
6128 _bfd_coff_write_global_sym): ..
6129 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
6130 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
6131 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
6132 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
6133 _bfd_dwarf2_find_nearest_line): ..
6134 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
6135 ecoff_compute_section_file_positions,
6136 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
6137 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
6138 _bfd_elf_discard_section_eh_frame_hdr,
6139 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
6140 _bfd_elf_write_section_eh_frame,
6141 _bfd_elf_write_section_eh_frame_hdr): ..
6142 * elf-hppa.h (elf_hppa_sort_unwind): ..
6143 * elf-m10200.c (mn10200_elf_relax_section,
6144 mn10200_elf_relax_delete_bytes,
6145 mn10200_elf_get_relocated_section_contents): ..
6146 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
6147 mn10300_elf_check_relocs, mn10300_elf_relax_section,
6148 mn10300_elf_relax_delete_bytes,
6149 mn10300_elf_get_relocated_section_contents,
6150 _bfd_mn10300_elf_adjust_dynamic_symbol,
6151 _bfd_mn10300_elf_discard_copies,
6152 _bfd_mn10300_elf_size_dynamic_sections,
6153 _bfd_mn10300_elf_finish_dynamic_sections): ..
6154 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
6155 _bfd_elf_make_section_from_phdr, elf_fake_sections,
6156 bfd_elf_set_group_contents, map_sections_to_segments,
6157 elf_sort_sections, assign_file_positions_for_segments,
6158 SECTION_SIZE, copy_private_bfd_data,
6159 _bfd_elf_get_dynamic_reloc_upper_bound,
6160 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
6161 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
6162 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
6163 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
6164 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
6165 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
6166 bfd_elf32_arm_process_before_allocation,
6167 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
6168 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
6169 elf32_arm_write_section): ..
6170 * elf32-cris.c (cris_elf_grok_prstatus,
6171 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
6172 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
6173 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
6174 elf_cris_discard_excess_dso_dynamics,
6175 elf_cris_discard_excess_program_dynamics): ..
6176 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
6177 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
6178 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
6179 _frv_create_got_section, _frvfdpic_assign_plt_entries,
6180 elf32_frvfdpic_size_dynamic_sections,
6181 elf32_frvfdpic_modify_segment_map,
6182 elf32_frvfdpic_finish_dynamic_sections): ..
6183 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
6184 elf32_h8_get_relocated_section_contents): ..
6185 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
6186 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
6187 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
6188 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
6189 elf32_hppa_finish_dynamic_sections): ..
6190 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
6191 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
6192 i370_elf_finish_dynamic_sections): ..
6193 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
6194 allocate_dynrelocs, elf_i386_size_dynamic_sections,
6195 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
6196 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
6197 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
6198 * elf32-ip2k.c (ip2k_is_switch_table_128,
6199 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
6200 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
6201 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
6202 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
6203 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
6204 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
6205 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
6206 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
6207 m32r_elf_get_relocated_section_contents): ..
6208 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
6209 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
6210 m68hc11_elf_relax_delete_bytes): ..
6211 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
6212 m68hc12_elf_size_one_stub): ..
6213 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
6214 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
6215 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
6216 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
6217 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
6218 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6219 elf32_mips_grok_prstatus): ..
6220 * elf32-or32.c (or32_elf_consth_reloc): ..
6221 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
6222 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
6223 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
6224 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
6225 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
6226 ppc_elf_final_write_processing): ..
6227 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6228 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6229 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
6230 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
6231 sh_elf_relax_delete_bytes, sh_elf_align_loads,
6232 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
6233 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
6234 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
6235 * elf32-sh64-com.c (sh64_address_in_cranges,
6236 sh64_get_contents_type): ..
6237 * elf32-sh64.c (sh64_find_section_for_address,
6238 sh64_elf_final_write_processing): ..
6239 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
6240 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
6241 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
6242 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
6243 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
6244 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
6245 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
6246 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
6247 elf_vax_finish_dynamic_sections): ..
6248 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
6249 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
6250 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
6251 xstormy16_elf_finish_dynamic_sections): ..
6252 * elf32-xtensa.c (xtensa_read_table_entries,
6253 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
6254 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
6255 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
6256 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
6257 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
6258 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
6259 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
6260 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
6261 xtensa_callback_required_dependence): ..
6262 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
6263 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
6264 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
6265 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
6266 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
6267 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
6268 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
6269 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
6270 * elf64-hppa.c (allocate_dynrel_entries,
6271 elf64_hppa_size_dynamic_sections,
6272 elf64_hppa_finish_dynamic_sections): ..
6273 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
6274 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
6275 elf64_mips_grok_prstatus): ..
6276 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
6277 mmix_elf_relocate_section, mmix_elf_final_link,
6278 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
6279 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
6280 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
6281 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
6282 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
6283 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
6284 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
6285 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
6286 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
6287 ppc64_elf_finish_dynamic_sections): ..
6288 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
6289 allocate_dynrelocs, elf_s390_size_dynamic_sections,
6290 elf_s390_finish_dynamic_sections): ..
6291 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
6292 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
6293 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
6294 sh64_elf64_finish_dynamic_sections): ..
6295 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
6296 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
6297 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
6298 sparc64_elf_finish_dynamic_symbol,
6299 sparc64_elf_finish_dynamic_sections): ..
6300 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
6301 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
6302 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
6303 elf64_x86_64_finish_dynamic_sections): ..
6304 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
6305 * elfcode.h (elf_slurp_reloc_table): ..
6306 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
6307 elf_finalize_dynstr, elf_link_add_object_symbols,
6308 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
6309 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
6310 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
6311 elf32_mips_grok_prstatus): ..
6312 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
6313 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
6314 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
6315 elfNN_ia64_finish_dynamic_sections): ..
6316 * elfxx-mips.c (mips_elf_create_procedure_table,
6317 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
6318 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
6319 mips_elf_global_got_index, mips_elf_multi_got,
6320 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
6321 mips_elf_allocate_dynamic_relocations,
6322 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
6323 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
6324 _bfd_mips_elf_always_size_sections,
6325 _bfd_mips_elf_size_dynamic_sections,
6326 _bfd_mips_elf_finish_dynamic_symbol,
6327 _bfd_mips_elf_finish_dynamic_sections,
6328 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
6329 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
6330 _bfd_elf_mips_get_relocated_section_contents,
6331 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
6332 * hp300hpux.c (callback): ..
6333 * hppabsd-core.c (make_bfd_asection): ..
6334 * hpux-core.c (make_bfd_asection): ..
6335 * i386linux.c (linux_link_create_dynamic_sections,
6336 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
6337 * i386msdos.c (msdos_write_object_contents): ..
6338 * i386os9k.c (os9k_callback, os9k_write_object_contents,
6339 os9k_set_section_contents): ..
6340 * ieee.c (parse_expression, ieee_slurp_external_symbols,
6341 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
6342 ieee_write_section_part, do_with_relocs, do_as_repeat,
6343 do_without_relocs, ieee_write_debug_part, init_for_output,
6344 ieee_set_section_contents): ..
6345 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
6346 * irix-core.c (do_sections, make_bfd_asection): ..
6347 * libaout.h (aout_section_merge_with_text_p): ..
6348 * libbfd.c (_bfd_generic_get_section_contents,
6349 _bfd_generic_get_section_contents_in_window): ..
6350 * linker.c (default_indirect_link_order): ..
6351 * lynx-core.c (make_bfd_asection): ..
6352 * m68klinux.c (linux_link_create_dynamic_sections,
6353 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6354 * mach-o.c (bfd_mach_o_make_bfd_section,
6355 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
6356 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
6357 bfd_mach_o_scan_read_segment): ..
6358 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
6359 _bfd_merge_sections): ..
6360 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
6361 mmo_map_set_sizes, mmo_canonicalize_symtab,
6362 mmo_internal_write_section, mmo_write_object_contents): ..
6363 * netbsd-core.c (netbsd_core_file_p): ..
6364 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
6365 nlm_alpha_set_public_section): ..
6366 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
6367 * nlm32-sparc.c (nlm_sparc_write_import): ..
6368 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
6369 nlm_compute_section_file_positions): ..
6370 * oasys.c (oasys_object_p, oasys_slurp_section_data,
6371 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
6372 * opncls.c (get_debug_link_info): ..
6373 * osf-core.c (make_bfd_asection): ..
6374 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
6375 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
6376 final_link, aout_link_input_section): ..
6377 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
6378 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
6379 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
6380 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
6381 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
6382 * ptrace-core.c (ptrace_unix_core_file_p): ..
6383 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
6384 _bfd_final_link_relocate, bfd_generic_relax_section,
6385 bfd_generic_get_relocated_section_contents): ..
6386 * reloc16.c (bfd_coff_reloc16_relax_section,
6387 bfd_coff_reloc16_get_relocated_section_c): ..
6388 * riscix.c (riscix_some_aout_object_p): ..
6389 * rs6000-core.c (read_hdr, make_bfd_asection): ..
6390 * sco5-core.c (make_bfd_asection): ..
6391 * simple.c (bfd_simple_get_relocated_section_contents): ..
6392 * som.c (som_object_setup, setup_sections, som_prep_headers,
6393 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
6394 som_set_reloc_info, som_get_section_contents,
6395 som_bfd_link_split_section): ..
6396 * sparclinux.c (linux_link_create_dynamic_sections,
6397 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
6398 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
6399 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
6400 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
6401 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
6402 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
6403 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
6404 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
6405 sunos_finish_dynamic_link): ..
6406 * syms.c (_bfd_stab_section_find_nearest_line): ..
6407 * tekhex.c (first_phase, tekhex_set_section_contents,
6408 tekhex_write_object_contents): ..
6409 * trad-core.c (trad_unix_core_file_p): ..
6410 * versados.c (process_esd, process_otr, process_otr): ..
6411 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
6412 * vms-misc.c (add_new_contents): ..
6413 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
6414 * vms.c (vms_set_section_contents): ..
6415 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
6416 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
6417 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
6418 * xsym.c (bfd_sym_scan): .. See above.
6419
bf8b15af
L
64202004-06-21 H.J. Lu <hongjiu.lu@intel.com>
6421
6422 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
6423 calling _bfd_merged_section_offset only for section symbols.
6424
d1c6de6f
AM
64252004-06-22 Alan Modra <amodra@bigpond.net.au>
6426
6427 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
6428 for handling SEC_MERGE symbols in relax_section.
6429
aa02cc63
AO
64302004-06-21 Alexandre Oliva <aoliva@redhat.com>
6431
6432 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
6433 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
6434 linked together. Mark the result as h8300sx code.
6435
aee6f5b4
AO
64362004-06-21 Alexandre Oliva <aoliva@redhat.com>
6437
6438 * elf-bfd.h (struct elf_backend_data): Added
6439 elf_backend_omit_section_dynsym.
6440 (_bfd_elf_link_omit_section_dynsym): Declare.
6441 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
6442 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
6443 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
6444 (_bfd_elf_link_renumber_dynsyms): ... this function.
6445 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
6446 _bfd_elf_link_omit_section_dynsym).
6447 (elfNN_bed): Added elf_backend_omit_section_dynsym.
6448
05576f10
NC
64492004-06-21 Nick Clifton <nickc@redhat.com>
6450
6451 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
6452 flags.
6453
02d5a37b
JG
64542004-06-17 Jerome Guitton <guitton@gnat.com>
6455
6456 * bfd-in.h (bfd_cache_close_all): New function declaration.
6457 * bfd-in2.h: Regenerate.
6458 * cache.c (bfd_cache_close_all): New function definition.
6459
d2bef492
MK
64602004-06-16 Mark Kettenis <kettenis@gnu.org>
6461
6462 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
6463 4.10 and beyond.
6464 * configure: Regenerate.
6465
8528d62e
DJ
64662004-06-16 Daniel Jacobowitz <dan@debian.org>
6467
6468 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
6469 the pre-existing section.
6470
911d08a7
AM
64712004-06-15 Alan Modra <amodra@bigpond.net.au>
6472
6473 * section.c (struct sec): Remove usused flags. Reorganize a little.
6474 (bfd_get_section_size_before_reloc): Delete.
6475 (bfd_get_section_size_after_reloc): Delete.
6476 (STD_SECTION): Update.
6477 (bfd_get_section_size_now): Delete.
6478 (bfd_set_section_contents): Don't referece reloc_done.
6479 (bfd_get_section_contents): Remove reloc_done comment.
6480 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
6481 reloc_done.
6482 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
6483 * ecoff.c (bfd_debug_section): Update initializer.
6484 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
6485 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
6486 * bfd-in.h (bfd_section_size): Expand.
6487 (bfd_get_section_size): New macro.
6488 * bfd-in2.h: Regenerate.
6489 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
6490 bfd_get_section_size_before_reloc with bfd_get_section_size.
6491 * coffcode.h (coff_write_object_contents): Likewise.
6492 * coffgen.c (build_debug_section): Likewise.
6493 * dwarf1.c (parse_line_table): Likewise.
6494 (_bfd_dwarf1_find_nearest_line): Likewise.
6495 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
6496 * i386msdos.c (msdos_write_object_contents): Likewise.
6497 * pdp11.c (squirt_out_relocs): Likewise.
6498 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
6499 * elf64-mmix.c (mmix_elf_final_link): Update comment.
6500
092dcd75
CD
65012004-06-14 Chris Demetriou <cgd@broadcom.com>
6502
6503 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
6504 removal) with updated comment.
6505 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
6506 BFD_RELOC_32_PCREL.
6507 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
6508 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6509
3ffa5234
AM
65102004-06-12 Alan Modra <amodra@bigpond.net.au>
6511
6512 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
6513 overflow on branches to undefweaks.
6514
e9edc808
MR
65152004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6516
6517 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
6518 as ecoff_section_data() does not return a valid lvalue.
6519
a873f25a
AO
65202004-06-09 Alexandre Oliva <aoliva@redhat.com>
6521
a9b881be
AO
6522 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
6523 (elf_link_add_object_symbols): Likewise.
6524
a873f25a
AO
6525 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
6526 (elf_backend_reloc_type_class): New.
6527
eef0f186
MK
65282004-06-08 Mark Kettenis <kettenis@gnu.org>
6529
6530 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
6531 netbsd-core.lo.
6532 * configure: Regenerate.
6533
822392ce
DJ
65342004-06-07 Daniel Jacobowitz <dan@debian.org>
6535
6536 From: Albert Chin-A-Young <china@thewrittenword.com>
6537 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
6538 to unsigned int.
6539
9f2e92c5
L
65402004-05-29 H.J. Lu <hongjiu.lu@intel.com>
6541
6542 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
6543 change.
6544
dd90f1b2
DD
65452004-05-28 DJ Delorie <dj@redhat.com>
6546
6547 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
6548 for linking, but otherwise adjust reloc for merged sections.
6549
5dd23ec1
L
65502004-05-28 H.J. Lu <hongjiu.lu@intel.com>
6551
6552 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
6553 _bfd_merged_section_offset for local symbols.
6554
f6f9408f
JR
65552004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
6556
6557 * Makefile.am: Regenerate dependencies.
6558 * Makefile.in: Regenerate.
6559 * archures.c: Add bfd_mach_sh3_nommu .
6560 * bfd-in2.h: Regenerate.
6561 * cpu-sh.c: Add sh3-nommu architecture.
6562 (bfd_to_arch_table): Create new table.
6563 (sh_get_arch_from_bfd_mach): Create new function.
6564 (sh_get_arch_up_from_bfd_mach): Create new function.
6565 (sh_merge_bfd_arch): Create new function.
6566 * elf32-sh.c (sh_ef_bfd_table): Add table.
6567 (sh_elf_check_relocs): Replace switch statement with
6568 use of sh_ef_bfd_table .
6569 (sh_elf_get_flags_from_mach): Add new function.
6570 (sh_find_elf_flags): Likewise.
6571 (sh_elf_copy_private_data): Replace most of non-elf contents
6572 with a call to sh_merge_bfd_arch() .
6573
d866f350
MC
65742004-05-27 Michael Chastain <mec.gnu@mindspring.com>
6575
6576 * Makefile.am (bfdver.h): Use explicit filename, not $< .
6577 * Makefile.in: Regenerate.
6578
1055df0f
AO
65792004-05-27 Alexandre Oliva <aoliva@redhat.com>
6580
6581 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
6582 custom calling conventions for dynamic symbols.
6583 (mn10300_elf_relax_section): Avoid relaxing a function as a local
6584 symbol if it's an alias to a global one.
6585
b3096250
L
65862004-05-26 H.J. Lu <hongjiu.lu@intel.com>
6587
6588 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
6589 change.
6590
9bb351fd
AO
65912004-05-27 Alexandre Oliva <aoliva@redhat.com>
6592
6593 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
6594 loop over hashes.
6595
e49f5022
AM
65962004-05-26 Alan Modra <amodra@bigpond.net.au>
6597
6598 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
6599 for SHT_GROUP sections.
6600
57ceae94
AM
66012004-05-25 Alan Modra <amodra@bigpond.net.au>
6602
6603 * elflink.c (elf_link_add_object_symbols): Don't set up merge
6604 section data here..
6605 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
6606 * merge.c: Formatting. Remove unnecessary casts. Expand
6607 bfd_get_section_alignment macro.
6608 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
6609 use throughout file.
6610 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
6611 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
6612 section name to determine sinfo group, instead test output section
6613 and alignment.
6614 (_bfd_merge_sections): Add struct bfd_link_info param. Call
6615 _bfd_strip_section_from_output rather than just twiddling flags.
6616 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
6617 (_bfd_merge_sections): Update prototype.
6618 * libbfd.h: Regenerate.
6619
c6f8758f 66202004-05-24 Mark Kettenis <kettenis@gnu.org>
d34436e8
MK
6621
6622 * netbsd-core.c: Correctly indent section that sets architecture
6623 from machine ID.
6624
c6f8758f
NC
6625 From Miod Vallat <miod@online.fr>:
6626 * m88kopenbsd.c: New file.
6627 * targets.c (m88k_openbsd_vec): New.
6628 * config.bfd: Add m88k-*-openbsd*.
6629 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
6630 (m88kopenbsd_vec): New.
6631 * configure: Regenerate.
6632 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
6633 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
6634 Run "make dep-am".
6635 * Makefile.in: Regenerate.
6636 * po/SRC-POTFILES.in: Regenerate.
6637
7d7e6bc4
NC
66382004-05-24 Nick Clifton <nickc@redhat.com>
6639
6640 * hash.c: Remove bogus node "Changing the default Hash Table Size"
6641 introduced by hash table size patch.
6642
bc286f95
BE
66432004-05-22 Ben Elliston <bje@au.ibm.com>
6644
6645 * configure.in (is_release): Remove.
6646 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
6647 (AC_OUTPUT): Don't output bfdver.h from version.h.
6648 * configure: Regenerate.
6649 * Makefile.am (RELEASE): New variable.
6650 (bfdver.h): New target.
6651 * Makefile.in: Regenerate.
6652 * doc/Makefile.in: Likewise.
6653
8b89a4eb
BE
66542004-05-22 Ben Elliston <bje@au.ibm.com>
6655
6656 * Makefile.am (config.status): Don't depend on version.h.
6657 * Makefile.in: Regenerate.
6658
753731ee
AM
66592004-05-22 Alan Modra <amodra@bigpond.net.au>
6660
6661 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
6662 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
6663 * libbfd.h: Regenerate.
6664 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
6665 (_bfd_elf_rel_local_sym): Likewise.
6666 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
6667 (elf_link_input_bfd): Likewise.
6668 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
6669 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6670 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6671 (elfNN_ia64_relocate_section): Likewise.
6672
2d643429
NC
66732004-05-21 Andy Chittenden <achittenden@bluearc.com>
6674
6675 * hash.c (bfd_default_hash_table_size): New variable.
6676 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
6677 (bfd_hash_set_default_size): New function. Set the default size
6678 to a selected prime number close to the argument. Document new
6679 function.
6680 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
6681 * bfd-in2.h: Regenerate.
6682 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
6683 * Makefile.in: Regenerate.
6684
8377c19c
MK
66852004-05-21 Mark Kettenis <kettenis@gnu.org>
6686
6687 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
6688 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
6689 arm, m68k, m88k and hppa core files.
6690
69fd4758
NC
66912004-05-21 Nick Clifton <nickc@redhat.com>
6692
6693 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
6694 (bfd_bwrite): Likewise.
6695 (bfd_tell): Likewise.
6696 (bfd_flush): Likewise.
6697 (bfd_stat): Likewise.
6698 (bfd_seek): Likewise.
6699 (bfd_get_mtime): Likewise.
6700 (bfd_get_size): Likewise.
6701
cd917290
BE
67022004-05-19 Ben Elliston <bje@au.ibm.com>
6703
6704 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
6705
1b09e940
NC
67062004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
6707
6708 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
6709 (bfd_generic_openr_next_archived_file): Likewise.
6710
096c35a7
BW
67112004-05-17 Bob Wilson <bob.wilson@acm.org>
6712
6713 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
6714 section names by inserting a new substring after .gnu.linkonce, except
6715 for .gnu.linkonce.t.* where the "t." is replaced.
6716
eea6121a 67172004-05-17 Adam Nemet <anemet@lnxw.com>
b2d65c0b
NC
6718
6719 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
6720 (m68-*-lynxos* case): Likewise.
6721 (powerpc-*-lyxnos* case): New case.
6722 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
6723
80fccad2
BW
67242004-05-17 David Heine <dlheine@tensilica.com>
6725
6726 * aout-target.h (MY_bfd_copy_private_header_data): Define.
6727 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
6728 * bfd.c (bfd_copy_private_header_data): Define.
6729 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
6730 interface.
6731 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
6732 * coffcode.h (coff_bfd_copy_private_header_data): Define.
6733 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
6734 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
6735 segments by calling copy_private_bfd_data.
6736 (_bfd_elf_copy_private_header_data): Define.
6737 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
6738 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
6739 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
6740 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
6741 * mmo.c (mmo_bfd_copy_private_header_data): Define.
6742 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
6743 * som.c (som_bfd_copy_private_header_data): Define.
6744 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
6745 * vms.c (vms_bfd_copy_private_header_data): Define.
6746 * bfd-in2.h: Regenerate.
6747 * libbfd.h: Regenerate.
6748
c5ae1840
TS
67492004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6750
6751 * elfxx-mips.c (MINUS_TWO): Define.
6752 (mips_elf_higher, mips_elf_highest,
6753 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
6754 some bfd_vma values.
6755 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
6756
a99cf92b
DA
67572004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6758
6759 * som.c (log2): Rename to exact_log2. Adjust all callers.
6760
0da76f83
NC
67612004-05-13 Paul Brook <paul@codesourcery.com>
6762
c273895f 6763 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
336b9722
NC
6764 dwarf3 format CIE entries. Remove comment about the size of the
6765 ra_column field. It is now correctly deduced.
0da76f83 6766
4b363073
NC
67672004-05-13 Joel Sherrill <joel@oarcorp.com>
6768
6769 * config.bfd (or32-*-rtems*): Switch to elf.
6770
9598fbe5
NC
67712004-05-13 Nick Clifton <nickc@redhat.com>
6772
6773 * po/fr.po: Updated French translation.
6774
8c37241b
JJ
67752004-05-11 Jakub Jelinek <jakub@redhat.com>
6776
0306b3bf 6777 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
8c37241b
JJ
6778 into .dynsym if elf_section_data (sec)->dynindx <= 0.
6779 Adjust counting of last_local.
6780 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
6781 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
6782 created by the linker nor !SHF_ALLOC.
6783
6784 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
6785 DT_PLTGOT to the start of the .got.plt section instead of the
6786 .got output section. Set sh_entsize for .got section in addition
6787 to .got.plt.
6788 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6789 is at sgot->output_section->vma.
6790 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
6791 DT_PLTGOT to the start of the .got.plt section instead of the
6792 .got output section.
6793 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6794 is at sgot->output_section->vma. Set sh_entsize for .got section
6795 in addition to .got.plt.
6796 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
6797 (bfd_section_from_phdr): Likewise.
6798 (map_sections_to_segments): Likewise.
6799 (assign_file_positions_for_segments): Likewise.
6800 (get_program_header_size): Likewise.
6801 * elflink.c (bfd_elf_size_dynamic_sections): Set
6802 elf_tdata (output_bfd)->relro from info->relro.
6803 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
6804
3f980e41
AO
68052004-05-08 Alexandre Oliva <aoliva@redhat.com>
6806
6807 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
6808 a zero symndx for which we hadn't accounted a dynamic relocation.
6809 (_frvfdpic_add_rofixup): Likewise.
6810
d70270c5 68112004-05-07 Brian Ford <ford@vss.fsi.com>
eea6121a 6812 DJ Delorie <dj@redhat.com>
d70270c5
BF
6813
6814 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
6815 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
6816 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
6817 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
6818
7e9f3bd6
AO
68192004-05-07 Alexandre Oliva <aoliva@redhat.com>
6820
6821 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
6822 immediately if there's no link info.
6823 (elf32_frvfdpic_copy_private_bfd_data): New.
6824 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
6825
eb61d2d6
ZW
68262004-05-06 Zack Weinberg <zack@codesourcery.com>
6827
6828 * dwarf2.c (add_line_info): Also set info->filename to NULL if
6829 filename argument is null; do not call strlen on a null pointer.
6830
ecb2d096
DJ
68312004-05-06 Daniel Jacobowitz <drow@mvista.com>
6832
6833 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
6834 special case.
6835
43850d5b
AO
68362004-05-05 Alexandre Oliva <aoliva@redhat.com>
6837
6838 * configure.in (bfd_elf32_frvfdpic_vec): New.
6839 * configure: Rebuilt.
6840 * targets.c (bfd_elf32_frvfdpic_vec): New.
6841 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
6842 on the latter.
6843 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
6844 frvfdpic instead of frv. Rearrange elf-target macros such that
6845 the FDPIC-specific ones are only defined for this new target
6846 vector.
6847 (bfd_elf32_frvfdpic_vec): Declare.
6848 (IS_FDPIC): New.
6849 (elf32_frv_relocate_section): Use it to enable segment checking
6850 and to control rofixup emission. Add output section vma to
6851 applied relocation in non-LOAD non-ALLOC sections. Use
6852 _bfd_error_handler for errors.
6853 (_frv_create_got_section): Create .rel.got and .rofixup only in
6854 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
6855 linker script.
6856 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
6857 (elf32_frvfdpic_modify_segment_map): Likewise.
6858 (elf32_frv_finish_dynamic_sections): New, do-nothing.
6859 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
6860 error message if we miscompute the rofixup size.
6861 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
6862 (frvfdpic_elf_encode_eh_address): Likewise.
6863 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
6864 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
6865 relocs. Reject unknown relocation types.
6866 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
6867 (frv_elf_merge_private_bfd_data): Likewise.
6868 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
6869 0x4000 for newly-added elf32-frvfdpic.
6870
06fc8a8c
NC
68712004-05-05 Nick Clifton <nickc@redhat.com>
6872
6873 PR/136
6874 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
6875 returning NULL as most users of this function do not check its
6876 return value.
33216455
NC
6877 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
6878 of bfd_cache_lookup().
6879 * sco5-core.c (sco5_core_file_p): Likewise.
6880 * trad-core.c (trad_unix_core_file_p): Likewise.
06fc8a8c
NC
6881
68822004-05-05 Nick Clifton <nickc@redhat.com>
6883
6884 * cache.c (bfd_cache_lookup): Improve formatting.
6885 * archive.c: Fix formatting.
6886
6b6e92f4
NC
68872004-05-05 Peter Barada <peter@the-baradas.com>
6888
6889 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
6890 * cpu-m68k.c(bfd_m68k_arch): Likewise.
6891 * bfd-in2.h(bfd_architecture): Regenerate.
6892
6a8d1586
AM
68932004-05-03 Alan Modra <amodra@bigpond.net.au>
6894
6895 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
6896 SEC_MERGE sections.
6897 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
6898 those against discarded link-once and SEC_MERGE section symbols.
6899
fafe6678
L
69002004-05-02 H.J. Lu <hongjiu.lu@intel.com>
6901
6902 * section.c (bfd_get_section_by_name_if): New.
6903 * bfd-in2.h: Regenerated.
6904
ad7b9a36
AM
69052004-05-02 Alan Modra <amodra@bigpond.net.au>
6906
6907 * som.c (som_bfd_is_group_section): Define.
6908
73499ab8
AM
69092004-05-01 Alan Modra <amodra@bigpond.net.au>
6910
6911 * section.c (bfd_make_section_anyway): Copy the whole
6912 bfd_hash_entry, not just "next" from existing entry.
6913
45c5e9ed
L
69142004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6915
6916 * elf.c (bfd_section_from_shdr): Maintain the section order in
6917 a section group.
6918 (special_sections): Add ".note.GNU-stack".
6919 (elf_fake_sections): Handle section group for relocatable
6920 link..
6921
bc87dd2e
L
69222004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6923
6924 * section.c (bfd_sections_find_if): New.
6925 * bfd-in2.h: Regenerated.
6926
72adc230
AM
69272004-04-30 Alan Modra <amodra@bigpond.net.au>
6928
6929 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
6930
6931 * elf-bfd.h (bfd_elf_is_group_section): Declare.
6932 * elf.c (bfd_elf_is_group_section): New function.
6933 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
6934 * section.c (bfd_generic_is_group_section): New function.
6935 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
6936 (BFD_JUMP_TABLE_LINK): Adjust.
6937 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
6938 * aout-target.h (MY_bfd_is_group_section): Define.
6939 * aout-tic30.c (MY_bfd_is_group_section): Define.
6940 * bfd.c (bfd_is_group_section): Define.
6941 * binary.c (binary_bfd_is_group_section): Define.
6942 * bout.c (b_out_bfd_is_group_section): Define.
6943 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
6944 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
6945 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
6946 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
6947 * coffcode.h (coff_bfd_is_group_section): Define.
6948 * i386msdos.c (msdos_bfd_is_group_section): Define.
6949 * i386os9k.c (os9k_bfd_is_group_section): Define.
6950 * ieee.c (ieee_bfd_is_group_section): Define.
6951 * ihex.c (ihex_bfd_is_group_section): Define.
6952 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
6953 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
6954 * mmo.c (mmo_bfd_is_group_section): Define.
6955 * nlm-target.h (nlm_bfd_is_group_section): Define.
6956 * oasys.c (oasys_bfd_is_group_section): Define.
6957 * pef.c (bfd_pef_bfd_is_group_section): Define.
6958 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
6959 * srec.c (srec_bfd_is_group_section): Define.
6960 * tekhex.c (tekhex_bfd_is_group_section): Define.
6961 * versados.c (versados_bfd_is_group_section): Define.
6962 * vms.c (vms_bfd_is_group_section): Define.
6963 * xsym.c (bfd_sym_bfd_is_group_section): Define.
6964 * bfd-in2.h: Regenerate.
6965 * libbfd.h: Regenerate.
6966
20f0a1ad
AM
69672004-04-30 Alan Modra <amodra@bigpond.net.au>
6968
6969 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
6970
f7458fc9 69712004-04-30 Hans-Peter Nilsson <hp@axis.com>
7dfb3b6b
HPN
6972
6973 * configure.in: Update version to 2.15.91.
6974 * configure: Regenerate.
6975
8a7140c3
NC
69762004-04-29 Brian Ford <ford@vss.fsi.com>
6977
6978 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
6979 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
6980 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
6981 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
6982 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
6983 .gnu.linkonce.wi. sections.
6984 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
6985 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
6986 .gnu.linkonce.wi..
6987 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
6988 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6989
3e722fb5
CD
69902004-04-28 Chris Demetriou <cgd@broadcom.com>
6991
6992 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
6993 * bfd-in2.h: Regenerate.
6994 * libbfd.h: Likewise.
6995
351e2b5a
DA
69962004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6997
6998 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
6999 dup_common fields.
7000 (setup_sections): Use som_subspace_dictionary_record struct instead
7001 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
7002 is_comdat, is_common or dup_common.
7003 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
7004 is_comdat, is_common and dup_common in section subspace_dict from
7005 copy_data.
7006 (som_begin_writing): Use som_subspace_dictionary_record struct.
7007 (som_finish_writing): Likewise.
7008 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
7009 is_common and dup_common flags in info for symbol. Add comment
7010 regarding linker support for these fields. Slightly reorganize
7011 function.
7012 (som_build_and_write_symbol_table): Set is_comdat, is_common and
7013 dup_common fields in symbol table from symbol info.
7014 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
7015 arguments. Set corresponding fields in copy_data. Change all callers.
7016 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
7017 symbol table.
7018 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
7019 * som.h (som_subspace_dictionary_record): Define.
7020 (som_copyable_section_data_struct): Add is_comdat, is_common and
7021 dup_common fields.
7022 (som_section_data_struct): Use som_subspace_dictionary_record struct
7023 instead of subspace_dictionary_record.
7024 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
7025
3ba3bc8c
BW
70262004-04-27 Bob Wilson <bob.wilson@acm.org>
7027
7028 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
7029 if set. Check reloc_done flag before applying relocations. Use
7030 output addresses, both when applying relocations and when comparing
7031 against the specified section.
7032 (elf_xtensa_relocate_section): Use output address to check if dynamic
7033 reloc is in a literal pool. Set section's reloc_done flag.
7034
beb8df56
L
70352004-04-27 H.J. Lu <hongjiu.lu@intel.com>
7036
7037 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
7038 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
7039 section.
7040 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
7041 section.
7042
1829f4b2
AM
70432004-04-27 Alan Modra <amodra@bigpond.net.au>
7044
7045 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
7046 structure field removed in 2004-04-24 patch.
7047 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
7048
7049 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
7050 Constify hdr arg.
7051 * elf32-arm.h (elf32_arm_section_flags): Likewise.
7052 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
7053 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
7054 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
7055 field before calling elf_backend_section_flags.
7056
4030e8f6
CD
70572004-04-24 Chris Demetriou <cgd@broadcom.com>
7058
7059 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
7060 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
7061 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
7062 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
7063 and BFD_RELOC_32_PCREL.
7064 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
7065 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
7066 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7067 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
7068 (mips_elf_next_relocation): Move comment about matching HI/LO
7069 relocations to...
7070 (_bfd_mips_elf_relocate_section): Here. Remove handling for
7071 R_MIPS_GNU_REL_HI16.
7072
3e27568f
CD
70732004-04-23 Chris Demetriou <cgd@broadcom.com>
7074
7075 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
7076 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
7077 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
7078 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
7079 and update comments to reflect current usage.
7080 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
7081 and MIPS_R_SWITCH, as well as several empty entries. Update comment
7082 for MIPS_R_PCREL16.
7083 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
7084 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
7085 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7086 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
7087 type number to be MIPS_R_PCREL16.
7088 (mips_relocate_section): Remove support for link-time relaxation
7089 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
7090 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
7091 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
7092 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
7093 relaxation of branches used by embedded-PIC.
7094 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
7095 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
7096 related members, update comment.
7097 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
7098 code related to embedded-PIC.
7099 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
7100 initialization of now-removed 'adjust' member of
7101 'struct ecoff_debug_info'.
7102
b32de0bc 71032004-04-23 Chris Demetriou <cgd@broadcom.com>
8472310d
CD
7104
7105 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
7106
955af222
PB
71072004-04-21 Philip Blundell <pb@nexus.co.uk>
7108
7109 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
7110 relocs for locally defined symbols during -shared final link.
7111 (elf32_arm_final_link_relocate): Likewise.
7112
47a9f7b3
JJ
71132004-04-22 Jakub Jelinek <jakub@redhat.com>
7114
7115 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
7116 ELF_LINK_POINTER_EQUALITY_NEEDED.
7117 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
7118 if r_type is not R_X86_64_PC32.
7119 (elf64_x86_64_finish_dynamic_symbol): If
7120 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
7121 SHN_UNDEF symbols.
7122
1f1799d5
KK
71232004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7124
7125 * elf32-sh.c (sh_elf_plt_sym_val): New function.
7126 (elf_backend_plt_sym_val): Define.
7127
0fdea5ce
AC
71282004-04-22 Andrew Cagney <cagney@redhat.com>
7129
7130 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
7131
5198ba8b
DA
71322004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7133
eb61d2d6 7134 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
5198ba8b
DA
7135 make_bfd_asection.
7136 * som.c (som_set_section_contents): Constantify second argument.
7137 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
7138 (som_object_setup): Rework to avoid warning.
7139 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
7140 Likewise.
7141
fe2e161a
AC
71422004-04-22 Andrew Cagney <cagney@redhat.com>
7143
7144 * cache.c (bfd_cache_close): Check for a previously closed file.
7145
4c45e5c9
JJ
71462004-04-22 Jakub Jelinek <jakub@redhat.com>
7147
7148 * bfd.c (bfd_get_synthetic_symtab): Define.
7149 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
7150 NAME##_get_synthetic_symtab.
7151 (struct bfd_target): Add _bfd_get_synthetic_symtab.
7152 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
7153 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
7154 relplt_name fields.
7155 (_bfd_elf_get_synthetic_symtab): New prototype.
7156 * elfcode.h (elf_get_synthetic_symtab): Define.
7157 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
7158 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
7159 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
7160 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
7161 * bfd-in2.h: Rebuilt.
7162 * libbfd.h: Rebuilt.
7163 * elf32-i386.c (elf_i386_plt_sym_val): New function.
7164 (elf_backend_plt_sym_val): Define.
7165 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
7166 (elf_backend_plt_sym_val): Define.
7167 * elf32-s390.c (elf_s390_plt_sym_val): New function.
7168 (elf_backend_plt_sym_val): Define.
7169 * elf64-s390.c (elf_s390_plt_sym_val): New function.
7170 (elf_backend_plt_sym_val): Define.
7171 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
7172 (elf_backend_plt_sym_val): Define.
7173 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
7174 (elf_backend_plt_sym_val): Define.
7175 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
7176 (elf_backend_plt_sym_val): Define.
7177 * aout-target.h (MY_get_synthetic_symtab): Define.
7178 * aout-tic30.c (MY_get_synthetic_symtab): Define.
7179 * coff-rs6000.c (rs6000coff_vec): Add
7180 _bfd_nodynamic_get_synthetic_symtab.
7181 (pmac_xcoff_vec): Likewise.
7182 * coff64-rs6000.c (rs6000coff64_vec): Add
7183 _bfd_nodynamic_get_synthetic_symtab.
7184 (aix5coff64_vec): Likewise.
7185 * sunos.c (MY_get_synthetic_symtab): Define.
7186 * vms.c (vms_get_synthetic_symtab): Define.
7187
d2f7ecac
NC
71882004-04-22 Nick Clifton <nickc@redhat.com>
7189
7190 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
7191
fd99574b
NC
71922004-04-22 Peter Barada <peter@the-baradas.com>
7193
7194 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
7195 * bfd2-in.h: Regenerate.
7196 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
7197
23867d67
CD
71982004-04-21 Chris Demetriou <cgd@broadcom.com>
7199
7200 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
7201 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
7202 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
7203 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
7204 * bfd-in2.h: Regenerate.
7205
2c8c90bc
BW
72062004-04-21 Bob Wilson <bob.wilson@acm.org>
7207
7208 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
7209 require relocations against a weak symbol to reference the same
7210 symbol hash entry if not a final, static link.
7211 (get_cached_value, add_value_map): Add final_static_link argument.
7212 (remove_literals): Pass final_static_link argument as needed.
7213
40838a72
AC
72142004-04-21 Andrew Cagney <cagney@redhat.com>
7215
7216 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
7217 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
7218 (opncls_bwrite, opncls_bclose, opncls_bflush)
7219 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
7220 bfd iovec that uses function callbacks.
7221 (bfd_close): Use the iovec's bclose.
7222 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
7223 (cache_bclose, cache_bflush, cache_bstat)
7224 (cache_iovec): New functions and global variable, implement a
7225 cache "iovec", where applicable set bfd_error.
7226 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
7227 * bfdio.c (struct bfd_iovec): Define.
7228 (real_read): Delete function.
7229 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
7230 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
7231 assume that bread and bwrite set bfd_error.
7232 * bfd.c (struct bfd): Add "iovec", update comments.
7233 * bfd-in2.h, libbfd.h: Re-generate.
7234
7f919c84
AC
72352004-04-21 Andrew Cagney <cagney@redhat.com>
7236
7237 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7238
715df9b8
EB
72392004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
7240
7241 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
7242 (bfd_elf_gc_sections): Fail if a shared object is being created.
7243 Do not fail if dynamic sections have been created. Instead call
7244 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
7245 dynamically referenced symbols. Do not mark the whole graph
7246 rooted at .eh_frame, only the section proper.
7247
6482c264
NC
72482004-04-20 DJ Delorie <dj@redhat.com>
7249
7250 * reloc.c: Add BFD_RELOC_32_SECREL.
7251 * bfd-in2.h: Regenerate.
7252 * libbfd.h: Likewise.
7253 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
7254 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
7255 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
7256
4dc570c2
JJ
72572004-04-19 Jakub Jelinek <jakub@redhat.com>
7258
7259 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
7260 relocs against hidden/protected undefweak symbols properly.
7261 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7262
0b60d5d3
MK
72632004-04-18 Mark Kettenis <kettenis@gnu.org>
7264
7265 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
7266 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
7267 core files.
7268
d48bdb99
AM
72692004-04-17 Brian Ford <ford@vss.fsi.com>
7270
7271 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
7272 filepos for the SizeOfHeaders field.
7273 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
7274 overflow.
7275 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
7276
57a1784e
AM
72772004-04-16 Alan Modra <amodra@bigpond.net.au>
7278
7279 * simple.c (bfd_simple_get_relocated_section_contents): Don't
7280 change reloc_done. Set and restore _cooked_size.
7281 (RETURN): Delete.
7282
d1ad3f6f
MK
72832004-04-15 Mark Kettenis <kettenis@gnu.org>
7284
7285 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
7286 core files.
7287
3d1bca9d
NC
72882004-04-15 Nick Clifton <nickc@redhat.com>
7289
7290 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
7291
019b892f
AM
72922004-04-15 Alan Modra <amodra@bigpond.net.au>
7293
7294 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
7295
15b43f48
AM
72962004-04-15 H.J. Lu <hongjiu.lu@intel.com>
7297
7298 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
7299 when it is a definition.
7300
6de00a78
AM
73012004-04-14 Alan Modra <amodra@bigpond.net.au>
7302
7303 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
7304 when statically linking PIC code.
7305 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7306
279500de
TS
73072004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7308
7309 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
7310 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
7311 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
7312 * configure: Regenerate.
7313
ccf2f652
RS
73142004-04-08 Richard Sandiford <rsandifo@redhat.com>
7315
7316 * elflink.c: Include libiberty.h.
7317 * Makefile.am (elflink.lo): Depend on libiberty.h.
7318 * Makefile.in: Regenerate.
7319
ca07892d
DJ
73202004-04-06 Daniel Jacobowitz <drow@mvista.com>
7321
7322 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
7323 ".MIPS.stubs".
7324
a5a58ba4
L
73252004-04-05 H.J. Lu <hongjiu.lu@intel.com>
7326
7327 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
7328 reserve the memory for dynamic linker
7329
24d18d30
MK
73302004-04-05 Mark Kettenis <kettenis@gnu.org>
7331
7332 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
7333 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
7334
a4d7b4b5
L
73352004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7336
7337 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
7338 RELOC_FOR_GLOBAL_SYMBOL.
7339 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
7340
1f433d93
L
73412004-04-02 H.J. Lu <hongjiu.lu@intel.com>
7342
7343 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7344 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
7345
e489d0ae
PB
73462004-04-01 Paul Brook <paul@codesourcery.com>
7347
7348 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
7349 * elf32-arm.h (struct elf32_elf_section_map): New.
7350 (struct _arm_elf_section_data): New.
7351 (elf32_arm_section_data): Define.
7352 (struct elf32_arm_link_hash_table): Add byteswap_code.
7353 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
7354 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
7355 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
7356 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
7357 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
7358 (bfd_elf32_new_section_hook, elf_backend_write_section,
7359 elf_backend_link_output_symbol_hook): Define.
7360
66a695f0
NC
73612004-04-01 Andy Chittenden <achittenden@bluearc.com>
7362
7363 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
7364 that keeps the characters in a B_INCL..B_EINCL range.
7365 (_bfd_link_section_stabs): When computing the sum of the
7366 characters in a B_INCL..B_EINCL range also keep a copy of those
7367 characters. Use this information to distinguish between
7368 include sections that have the same sum and the same length
7369 but which are nevertheless unique.
7370
8375c36b
PB
73712004-03-31 Paul Brook <paul@codesourcery.com>
7372
7373 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
7374 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
7375
a56b48eb
NC
73762004-03-31 Andy Chittenden <achittenden@bluearc.com>
7377
7378 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
7379 to 'sum_chars' and add field 'num_chars'.
7380 (_bfd_link_section_stabs): When computing the sum of the
7381 characters in a B_INCL..B_EINCL range also keep a count of the
7382 number of characters. Use this information to help distinguish
7383 between include sections when have the same sum but which
7384 nevertheless are still unique.
7385
1fbc7e7a 73862004-03-31 Mattias Engdegård <mattias@virtutech.se>
3d456464
NC
7387
7388 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
7389
0949843d 73902004-03-30 Galit Heller <Galit.Heller@nsc.com>
eb61d2d6 7391 Tomer Levi <Tomer.Levi@nsc.com>
0949843d
NC
7392
7393 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
7394 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
7395 (BFD32_BACKENDS): Add elf32-cr16c.lo.
7396 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
7397 (cpu-cr16c.lo): New target.
7398 (elf32-cr16c.lo): Likewise.
7399 * Makefile.in: Regenerate.
7400 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
7401 (bfd_archures_list): Add bfd_cr16c_arch.
7402 * config.bfd: Handle cr16c-*-elf*.
7403 * configure.in: Handle bfd_elf32_cr16c_vec.
7404 * configure: Regenerate.
7405 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
7406 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
7407 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
7408 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
7409 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
7410 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
7411 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
7412 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
7413 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
7414 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
7415 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
7416 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
7417 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
7418 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
7419 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
7420 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
7421 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
7422 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
7423 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
7424 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
7425 * targets.c (bfd_elf32_cr16c_vec): Declare.
7426 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
7427 * cpu-cr16c.c: New file.
7428 * elf32-cr16c.c: Likewise.
7429 * libbfd.h: Regenerate.
7430 * bfd-in2.h: Likewise.
7431
baaff79e
JJ
74322004-03-30 Jakub Jelinek <jakub@redhat.com>
7433
7434 * elf.c (map_sections_to_segments): Fix handling of .tbss.
7435
c152c796
AM
74362004-03-27 Alan Modra <amodra@bigpond.net.au>
7437
7438 * Makefile.am: Remove all mention of elflink.h.
7439 * Makefile.in: Regenerate.
7440 * bfd-in.h (bfd_elf_discard_info): Declare.
7441 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
7442 * bfd-in2.h: Regenerate.
7443 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
7444 bfd_elf32_link_record_dynamic_symbol,
7445 bfd_elf64_link_record_dynamic_symbol,
7446 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
7447 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
7448 _bfd_elf32_link_record_local_dynamic_symbol,
7449 _bfd_elf64_link_record_local_dynamic_symbol,
7450 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
7451 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
7452 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
7453 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
7454 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
7455 _bfd_elf32_reloc_symbol_deleted_p,
7456 _bfd_elf64_reloc_symbol_deleted_p): Delete.
7457 (bfd_elf_link_record_dynamic_symbol,
7458 bfd_elf_link_record_local_dynamic_symbol,
7459 bfd_elf_final_link, bfd_elf_gc_sections,
7460 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
7461 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
7462 bfd_elf_reloc_symbol_deleted_p): Declare.
7463 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
7464 * elf32-arm.h: Update for changed function names. Remove local
7465 WILL_CALL_FINISH_DYNAMIC_SECTION define.
7466 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
7467 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
7468 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
7469 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7470 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
7471 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
7472 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
7473 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
7474 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
7475 (bfd_elfNN_print_symbol): Define.
7476 * elfcode.h: Don't include elflink.h.
7477 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
7478 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
7479 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
7480 elf_gc_record_vtinherit, elf_gc_record_vtentry,
7481 elf_link_record_local_dynamic_symbol): Don't define.
7482 * elflink.c: Update for changed function names. Move elflink.h
7483 code here.
7484 * elflink.h: Delete file.
7485 * po/SRC-POTFILES.in: Regenerate.
7486 * po/bfd.pot: Regenerate.
7487
6a9cae7f
AM
74882004-03-27 Alan Modra <amodra@bigpond.net.au>
7489
7490 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
7491 "name" for global syms accidentally removed in 2004-03-20 change.
7492
140f6c8e
AM
74932004-03-27 Alan Modra <amodra@bigpond.net.au>
7494
7495 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
7496 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
7497 where Elf_External_* is different for 64 and 32 bit, with
7498 corresponding elf_size_info field.
7499 (struct elf_final_link_info): Use "bfd_byte *" instead
7500 of "Elf_External_Sym *" for external_syms and symbuf.
7501 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
7502 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
7503 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
7504 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
7505 (elf_link_sort_cmp2): Adjust.
7506 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
7507 using ELF_R_SYM macro. Set u.sym_mask.
7508 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
7509 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
7510 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
7511 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
7512 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
7513 swap_syn_out functions. Rearrange dyn swap in/out switch.
7514 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
7515 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
7516 (elf_link_flush_output_syms): Add elf_backend_data arg.
7517 (elf_link_check_versioned_symbol): Likewise.
7518 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
7519 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
7520 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
7521 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
7522 ELF_R_TYPE and ELF_R_INFO macros.
7523 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
7524 based on size rather than using ELF_R_INFO.
7525 (elf_gc_mark): Set up r_sym_shift local var and use instead of
7526 ELF_R_SYM macro.
7527 (struct alloc_got_off_arg): New.
7528 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
7529 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
7530 (elf_gc_allocate_got_offsets): Adjust.
7531 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
7532 ELF_R_SYM. Use bfd_section_from_elf_index.
7533 (elf_bfd_discard_info): Set cookie.r_sym_shift.
7534 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
7535 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
7536
14bde378
SS
75372004-03-26 Stan Shebs <shebs@apple.com>
7538
7539 Remove MPW support, no longer used.
7540 * config.bfd (powerpc-*-mpw*): Remove configuration.
7541 * mpw-config.in, mpw-make.sed: Remove files.
7542 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
7543
555cd476
AM
75442004-03-26 Alan Modra <amodra@bigpond.net.au>
7545
7546 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
7547 (ppc64_elf_add_symbol_hook): New function.
7548 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
7549 const from Elf_Internal_Sym param.
7550 * elflink.c (elf_link_add_object_symbols): Adjust.
7551 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
7552 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
7553 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
7554 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
7555 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
7556 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
7557 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
7558 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
7559 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
7560 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
7561 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
7562 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
7563 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
7564 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
7565 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
7566 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
7567
4ad4eba5
AM
75682004-03-26 Alan Modra <amodra@bigpond.net.au>
7569
7570 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
7571 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
7572 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
7573 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
7574 (bfd_elf64_bfd_link_add_symbols): Delete.
7575 (bfd_elf_link_add_symbols): Declare.
7576 * elfcode.h (elf_bfd_link_add_symbols): Delete.
7577 * elflink.c: Include safe-ctype.h.
7578 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
7579 make static.
7580 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
7581 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
7582 static.
7583 (elf_link_add_archive_symbols): Rename from
7584 _bfd_elf_link_add_archive_symbols, make static.
7585 (elf_link_add_object_symbols): New function. Corresponding
7586 elflink.h function converted to use elf_size_info.
7587 (bfd_elf_link_add_symbols): Likewise.
7588 (bfd_elf_size_dynamic_sections): Adjust.
7589 * elflink.h (elf_bfd_link_add_symbols): Delete.
7590 (elf_link_add_object_symbols): Delete.
7591 * elf32-gen.c (elf32_generic_link_add_symbols): Call
7592 bfd_elf_link_add_symbols.
7593 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
7594
5a580b3a
AM
75952004-03-25 Alan Modra <amodra@bigpond.net.au>
7596
7597 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
7598 and chained shared libs only if dynsym. Clear dynsym on forced-local.
c152c796 7599
5a580b3a
AM
7600 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
7601 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
7602 (_bfd_elf_add_dt_needed_tag): Declare.
7603 (_bfd_elf_sort_symbol): Declare.
7604 (_bfd_elf_finalize_dynstr): Declare.
7605 (RELOC_FOR_GLOBAL_SYM): Formatting.
7606 * elfcode.h (elf_add_dynamic_entry): Delete.
7607 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
7608 elflink.h function converted to use elf_size_info.
7609 (_bfd_elf_add_dt_needed_tag): Likewise.
7610 (_bfd_elf_sort_symbol): Likewise.
7611 (_bfd_elf_finalize_dynstr): Likewise.
7612 (compute_bucket_count): Likewise.
7613 (bfd_elf_size_dynamic_sections): Likewise. Check result of
7614 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
7615 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
7616 * elflink.h: ..here.
7617 (sort_symbol, add_dt_needed_tag): Delete.
7618 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
7619 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
7620 Update all users.
7621 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
7622 * elf32-cris.c (add_dynamic_entry): Likewise.
7623 * elf32-hppa.c (add_dynamic_entry): Likewise.
7624 * elf32-i370.c (add_dynamic_entry): Likewise.
7625 * elf32-i386.c (add_dynamic_entry): Likewise.
7626 * elf32-m32r.c (add_dynamic_entry): Likewise.
7627 * elf32-m68k.c (add_dynamic_entry): Likewise.
7628 * elf32-ppc.c (add_dynamic_entry): Likewise.
7629 * elf32-s390.c (add_dynamic_entry): Likewise.
7630 * elf32-sh.c (add_dynamic_entry): Likewise.
7631 * elf32-sparc.c (add_dynamic_entry): Likewise.
7632 * elf32-vax.c (add_dynamic_entry): Likewise.
7633 * elf32-xtensa.c (add_dynamic_entry): Likewise.
7634 * elf64-alpha.c (add_dynamic_entry): Likewise.
7635 * elf64-hppa.c (add_dynamic_entry): Likewise.
7636 * elf64-ppc.c (add_dynamic_entry): Likewise.
7637 * elf64-s390.c (add_dynamic_entry): Likewise.
7638 * elf64-sparc.c (add_dynamic_entry): Likewise.
7639 * elf64-x86-64.c (add_dynamic_entry): Likewise.
7640 * elfxx-ia64.c (add_dynamic_entry): Likewise.
7641 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
7642 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
7643 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
7644 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
7645
d507cf36
PB
76462004-03-23 Paul Brook <paul@codesourcery.com>
7647
7648 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
7649
88d65ad6
BW
76502004-03-22 Bob Wilson <bob.wilson@acm.org>
7651
7652 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
7653 literal tables and check for relocs outside of literal pools.
7654 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
7655 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
7656 set DF_TEXTREL.
7657 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
7658 (elf_xtensa_relocate_section): Read literal tables and check for
7659 dynamic relocations in read-only sections and not in literal pools.
c152c796 7660
b9cf773d
AM
76612004-03-23 Alan Modra <amodra@bigpond.net.au>
7662
7663 PR 51.
7664 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
7665
e4a2175c
HPN
76662004-03-22 Hans-Peter Nilsson <hp@axis.com>
7667
7668 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
7669 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
7670 not defined by the executable, or defined in a DSO.
7671 <eliding run-time relocation of .got>: Initialize GOT entry for a
7672 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
7673 executable.
7674 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
7675 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
7676 a PLT reloc to GOT for an executable.
7677 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
b9cf773d 7678 .got for a DSO and explain why.
e4a2175c
HPN
7679 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
7680 and unreferenced symbols for which a PLT is defined. Adjust
7681 dynamic-symbol pruning correspondingly, to make sure we don't lose
7682 a dynamic symbol also defined by a DSO.
7683
b2a8e766
AM
76842004-03-22 Alan Modra <amodra@bigpond.net.au>
7685
7686 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
7687 and rel args. Group input and output args. Wrap to 80 columns.
7688 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
7689 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
7690 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
7691 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
7692 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7693 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
7694 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
7695 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
7696 RELOC_FOR_GLOBAL_SYMBOL invocation.
7697
59c2e50f
L
76982004-03-20 H.J. Lu <hongjiu.lu@intel.com>
7699
7700 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
7701 unresolved symbols in objects aren't allowed.
7702
7703 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
7704 unresolved symbols.
7705 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
7706 (elf_hppa_unmark_useless_dynamic_symbols):
7707 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7708 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
7709 (elf32_hppa_relocate_section): Likewise.
7710 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7711 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7712 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7713 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
7714 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7715
7716 * elf-m10200.c (mn10200_elf_relocate_section): Use
7717 RELOC_FOR_GLOBAL_SYMBOL.
7718 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7719 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
7720 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7721 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7722 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7723 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
7724 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7725 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
7726 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7727 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7728 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7729 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
7730
9992270f
DA
77312004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7732
36751eee
DA
7733 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
7734 (final_link_relocate): Likewise.
9992270f
DA
7735 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
7736 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
7737
05864e2a
AM
77382004-03-19 Alan Modra <amodra@bigpond.net.au>
7739
7740 * Makefile.am: Run "make dep-am".
7741 * Makefile.in: Regenerate.
7742 * aclocal.m4: Regenerate.
7743 * config.in: Regenerate.
7744 * po/bfd.pot: Regenerate.
7745
f218a464 77462004-03-19 Alan Modra <amodra@bigpond.net.au>
0f8a2703
AM
7747 H.J. Lu <hongjiu.lu@intel.com>
7748
7749 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
7750 type and size change code to where it was previously. Remove
7751 dt_needed param. Treat old weak syms as strong if new sym is
7752 from a shared lib, even when old sym is from another shared
7753 lib. Remove unnecessary tests of oldweak and newweak. Correct
7754 comments.
7755 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
7756 _bfd_elf_merge_symbol calls.
7757 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
7758 dt_needed local var. Update comments.
7759 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
7760 (_bfd_elf_add_default_symbol): Likewise.
f218a464
AM
7761
7762 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
7763 strong syms in one shared object overriding weak syms in another.
7764
79349b09
AM
77652004-03-18 Alan Modra <amodra@bigpond.net.au>
7766
4a43e768
AM
7767 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
7768 dyn_lib_class field. Rearrange for better packing.
7769 (elf_dt_soname): Delete.
7770 (elf_dyn_lib_class): Define.
7771 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
7772 (bfd_elf_set_dt_needed_soname): Delete.
7773 (bfd_elf_set_dyn_lib_class): New function.
7774 * elflink.h (add_dt_needed_tag): New function. Split out from..
7775 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
7776 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
7777 initialization of soname.
7778 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
7779 elf_dt_soname.
7780 * bfd-in.h (enum dynamic_lib_link_class): New.
7781 (bfd_elf_set_dt_needed_soname): Delete.
7782 (bfd_elf_set_dyn_lib_class): Declare.
7783 * bfd-in2.h: Regenerate.
7784
79349b09
AM
7785 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
7786 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
7787 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
7788 symbol loop. Instead use add_needed to flag tag as written.
7789
d13d89fa
NS
77902004-03-17 Nathan Sidwell <nathan@codesourcery.com>
7791
7792 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
7793 logic for null_input_bfd detection.
7794
9183ed4b
AM
77952004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7796
7797 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
7798
021d7868
MK
77992004-03-16 Mark Kettenis <kettenis@gnu.org>
7800
7801 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
7802 code.
7803
51992aec
AM
78042004-03-16 Alan Modra <amodra@bigpond.net.au>
7805
7806 * elflink.c (elf_link_read_relocs_from_section): Don't use
7807 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
7808 (_bfd_elf_link_read_relocs): ..to here.
7809 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
7810
ccba357f
AM
78112004-03-16 Alan Modra <amodra@bigpond.net.au>
7812
7813 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
7814 values selected in configure.host. Require both to be defined
7815 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
7816 corresponding BFD_HOST vars with quotes.
7817 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
7818 Always require BFD_HOST_64_BIT_DEFINED.
7819 <file_ptr type>: Find off_t size before emitting message. Combine
7820 off_t and ftello64 conditional.
7821 * configure: Regenerate.
7822
41978308
AM
78232004-03-16 Alan Modra <amodra@bigpond.net.au>
7824
7825 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
7826 aliasing warning. Remove trailing whitespace throughout file.
7827
d63b5ed9
DA
78282004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7829
7830 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
7831 input_section in calls to get_dyn_name.
7832 * 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
7833 local symbols.
7834 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
7835
8ce8c090
AM
78362004-03-15 Alan Modra <amodra@bigpond.net.au>
7837
7838 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
7839 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
7840 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
7841 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
7842 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
7843 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
7844 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
7845 when using long.
7846 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
7847 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7848 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7849 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7850 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
7851 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
7852 (read_8_bytes, read_indirect_string, read_address): Likewise.
7853 (read_abbrevs, parse_comp_unit): Likewise.
7854 * targets.c (struct bfd_target): Likewise.
7855 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
7856 * hppabsd-core.c: Likewise. Formatting.
7857 * hpux-core.c: Likewise.
7858 * irix-core.c: Likewise.
7859 * netbsd-core.c: Likewise.
7860 * osf-core.c: Likewise.
7861 * ptrace-core.c: Likewise.
7862 * sco5-core.c: Likewise.
7863 * trad-core.c: Likewise.
7864 * configure: Regenerate.
7865 * bfd-in2.h: Regenerate.
7866
edeb6e24
AM
78672004-03-15 Alan Modra <amodra@bigpond.net.au>
7868
7869 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
7870 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
7871 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7872 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
7873 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
7874 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
7875 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
7876 * libbfd.c: Likewise in function definitions.
7877 (bfd_put_8): Mask with 0xff rather than casting to char.
7878 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
7879 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
7880 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
7881 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
7882 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
7883 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
7884 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
7885 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
7886 (H_GET_64, H_GET_32, H_GET_16): Likewise.
7887 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
7888 * archive.c (do_slurp_coff_armap): Update swap prototype.
7889 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
7890 (tic54x_getl_signed_32): Likewise.
7891 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
7892 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
7893 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
7894 (bfd_getp_signed_32, bfd_putp32): Likewise.
7895 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
7896 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
7897 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
7898 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
7899 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
7900 bfd_h_getx_signed_16, bfd_h_putx16.
7901 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
7902 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
7903 * hpux-core.c: Likewise.
7904 * irix-core.c: Likewise.
7905 * netbsd-core.c: Likewise.
7906 * osf-core.c: Likewise.
7907 * ptrace-core.c: Likewise.
7908 * sco5-core.c: Likewise.
7909 * trad-core.c: Likewise.
7910 * bfd-in2.h: Regenerate.
7911
c1b954e2
AM
79122004-03-15 Matt Thomas <matt@3am-software.com>
7913
7914 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
7915 selected.
7916
85cfd8d3
MK
79172004-03-13 Mark Kettenis <kettenis@gnu.org>
7918
7919 * config.bfd: Add x86_64-*-openbsd*.
7920 * configure.in (x86_64-*-openbsd*): Set COREFILE to
7921 netbsd-core.lo.
7922 * configure: Regenerate.
7923
d1f161ea
NC
79242004-03-12 Nick Clifton <nickc@redhat.com>
7925 Dave Murphy <wintermute2k4@ntlworld.com>
c1b954e2 7926
d1f161ea
NC
7927 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
7928 if the input bfd does not contain any code.
7929
8b6f2683
JW
79302004-03-09 Steve Ellcey <sje@cup.hp.com>
7931
7932 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
7933
79cda7cf
FF
79342004-03-05 Fred Fish <fnf@redhat.com>
7935
7936 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
7937 mips16 symbols to be even rather than testing first for even/odd.
7938 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
7939
e5caec89
NS
79402004-03-05 Nathan Sidwell <nathan@codesourcery.com>
7941
7942 * elf.c (map_sections_to_segments): Ignore .tbss sections for
7943 layout purposes.
7944
02bb6eae
AO
79452004-03-03 Alexandre Oliva <aoliva@redhat.com>
7946
7947 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
7948 undefined symbols as hash_new.
7949
ae51a426
JR
79502003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
7951
7952 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
7953 * cpu-sh.c: Ditto.
7954 * elf32-sh.c: Ditto.
7955 * bfd-in2.h: Regenerate.
7956
3b712a1a
AO
79572004-03-02 Alexandre Oliva <aoliva@redhat.com>
7958
7959 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
7960 dynrelocs.
7961 (_frv_count_got_plt_entries): Initialize them.
7962 (frv_pic_relocs_info_find): Add insert argument. Adjust all
7963 callers.
7964 (frv_pic_relocs_info_for_global): Likewise.
7965 (frv_pic_relocs_info_for_local): Likewise.
7966 (frv_pic_merge_early_relocs_info): New.
7967 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
7968 another.
7969 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
7970 Check that we don't exceed the allocated count for entry.
7971 (_frv_add_rofixup): Likewise.
7972 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
7973 (elf32_frv_finish_dynamic_sections): Improve error message in case
7974 we emit too few rofixup entries.
7975
676a64f4
RS
79762004-03-01 Richard Sandiford <rsandifo@redhat.com>
7977
7978 * archures.c (bfd_mach_fr450): New.
7979 * bfd-in2.h: Regenerate.
7980 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
7981 (arch_info_500): Link to it.
7982 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
7983 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
7984 (frv_elf_arch_extension_p): New function.
7985 (frv_elf_merge_private_bfd_data): Use it.
7986
0ad989f9
L
79872004-02-28 H.J. Lu <hongjiu.lu@intel.com>
7988
7989 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
7990
7991 * elflink.h (is_global_data_symbol_definition): Moved to
7992 elflink.c.
7993 (elf_link_is_defined_archive_symbol): Likewise.
7994 (elf_link_add_archive_symbols): Likewise. Renamed to
7995 _bfd_elf_link_add_archive_symbols.
7996
7997 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
7998 of ELF symbol table entry from backend.
7999 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
8000 instead of elf_link_add_object_symbols.
8001
ec3391e7
AO
80022004-02-27 Alexandre Oliva <aoliva@redhat.com>
8003
8004 * elf-bfd.h (struct elf_backend_data): Added
8005 elf_backend_can_make_relative_eh_frame,
8006 elf_backend_can_make_lsda_relative_eh_frame and
8007 elf_backend_encode_eh_address.
8008 (_bfd_elf_encode_eh_address): Declare.
8009 (_bfd_elf_can_make_relative): Declare.
8010 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
8011 hooks to decide whether to attempt to make_relative and
8012 make_lsda_relative.
8013 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
8014 (_bfd_elf_can_make_relative): New.
8015 (_bfd_elf_encode_eh_address): New.
8016 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
8017 (frv_elf_encode_eh_address): New.
8018 (elf_backend_can_make_relative_eh_frame): Define.
8019 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8020 (elf_backend_encode_eh_address): Define.
8021 * elfxx-target.h
8022 (elf_backend_can_make_relative_eh_frame): Define.
8023 (elf_backend_can_make_lsda_relative_eh_frame): Define.
8024 (elf_backend_encode_eh_address): Define.
8025 (elfNN_bed): Add them.
8026
e6deed0a
AO
80272004-02-27 Alexandre Oliva <aoliva@redhat.com>
8028
8029 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
8030 complain_on_overflow to signed.
8031
b60d7a1a
L
80322004-02-27 H.J. Lu <hongjiu.lu@intel.com>
8033
8034 * elflink.h (sort_symbol): New.
8035 (elf_link_add_object_symbols): Use a sorted symbol array for
8036 weakdef.
8037
1c3ff0f2
MS
80382004-02-27 Jakub Jelinek <jakub@redhat.com>
8039
8040 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8041 for pc relative relocs.
8042 (elf_s390_relocate_section): Likewise.
8043 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
8044 for pc relative relocs.
8045 (elf_s390_relocate_section): Likewise.
8046
de9811af
L
80472004-02-26 H.J. Lu <hongjiu.lu@intel.com>
8048
8049 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
8050 count_dyn_reloc.
8051
ac33696c
L
80522004-02-25 H.J. Lu <hongjiu.lu@intel.com>
8053
8054 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
8055 field to track if a relocation is against readonly section.
8056 (count_dyn_reloc): Take a new argument for rent->reltext.
8057 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
8058 (get_reloc_section): Don't set ia64_info->reltext here.
8059 (allocate_dynrel_entries): Set ia64_info->reltext here.
8060
072c8903
AO
80612004-02-24 Alexandre Oliva <aoliva@redhat.com>
8062
8063 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
8064 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
8065 function's descriptor to symbol+offset, and map local undefweak
8066 symbol to NULL function descriptor.
8067 (elf32_frv_relocate_section): Likewise.
8068
aca305d9
NC
80692004-02-23 Mark Kettenis <kettenis@gnu.org>
8070
8071 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
8072 M_X86_64_NETBSD.
8073 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
8074 (netbsd_core_file_p): Set architecture from machine ID for
8075 selected machines.
8076
646411fb
JJ
80772004-02-23 Jakub Jelinek <jakub@redhat.com>
8078
8079 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
8080 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
8081
1de1a317
L
80822004-02-21 H.J. Lu <hongjiu.lu@intel.com>
8083
8084 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
8085 symbols with non-default visibility.
8086
3c9d0484
DS
80872004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
8088
8089 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
8090 IMAGE_SCN_MEM_WRITE on known sections only.
8091
a876ecf9
JJ
80922004-02-20 Jakub Jelinek <jakub@redhat.com>
8093
8094 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
8095 symbols used in PIE relocs.
8096
a8a6d7ce
JJ
80972004-02-19 Jakub Jelinek <jakub@redhat.com>
8098
8099 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
8100 .plt sh_entsize.
8101
d080fcd2
DJ
81022004-02-18 Daniel Jacobowitz <drow@mvista.com>
8103
8104 * configure.in: Update version to 2.15.90.
8105 * configure: Regenerate.
8106
d25aed71 81072004-02-17 Daniel Jacobowitz <drow@mvista.com>
c1b954e2 8108 Richard Sandiford <rsandifo@redhat.com>
d25aed71
RS
8109
8110 * elfxx-mips.c (mips_elf_calculate_relocation): Use
8111 _bfd_elf_symbol_refs_local_p to decide whether to decay
8112 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
8113 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
8114 relocs if the symbol wasn't defined by a regular object file.
8115 Don't check the symbol's dynindx.
8116
d7ce59e3
AC
81172004-02-16 Andrew Cagney <cagney@redhat.com>
8118
8119 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
8120 @bfd_file_ptr@.
8121 * bfd-in2.h: Re-generate.
8122
ca0b7686
AC
81232004-02-14 Andrew Cagney <cagney@redhat.com>
8124
8125 * configure.host (HDEFINES): When hppa*-*-hpux*, define
8126 _LARGEFILE64_SOURCE.
8127
340b6d91
AC
81282004-02-13 Andrew Cagney <cagney@redhat.com>
8129
8130 * elf.c (vma_page_aligned_bias): New function.
8131 (assign_file_positions_except_relocs)
8132 (assign_file_positions_for_segments): Replace broken modulo
8133 arithmetic with call to vma_page_aligned_bias.
8134
1012372a
AC
81352004-02-11 Andrew Cagney <cagney@redhat.com>
8136
7c192733
AC
8137 * bfd-in.h: Update copyright.
8138 (bfd_tell): Change return type to file_ptr.
8139 * bfd-in2.h: Re-generate.
8140 * cache.c: Update copyright.
8141 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
8142 parameter.
8143 (close_one): Use real_ftell.
8144 * bfdio.c: Update copyright.
8145 (real_ftell, real_fseek): New functions.
8146 (bfd_tell): Use real_fseek and real_ftell, change return type to
8147 file_ptr.
8148 (bfd_seek): Use real_ftell and real_fseek, change type of
8149 file_position to a file_ptr.
8150 * libbfd-in.h: Update copyright.
8151 (real_ftell, real_fseek): Declare.
8152 * libbfd.h: Re-generate.
8153
1012372a
AC
8154 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
8155 fseeko and fseeko64. Determine bfd_file_ptr.
8156 * configure: Re-generate.
c1ea0c09 8157 * config.in: Re-generate.
c1b954e2 8158
3255318a
NC
81592004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
8160
8161 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
8162 * elf32-h8300.c: Likewise.
8163
0d5f9994
NC
81642004-02-09 Christian Vogel <vogelchr@vogel.cx>
8165 Nick Clifton <nickc@redhat.com>
8166
8167 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
8168 GOT entries with no associated GOT subsection.
8169
174fd7f9
RS
81702004-02-09 Richard Sandiford <rsandifo@redhat.com>
8171
8172 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
8173 * elf.c (swap_out_syms): Use it to decide whether local section
8174 symbols should be named.
8175 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
8176 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
8177 (elf_backend_name_local_section_symbols): Define.
8178 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
8179
03609792
L
81802004-01-30 H.J. Lu <hongjiu.lu@intel.com>
8181
8182 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
8183 (elfNN_ia64_relax_section): Optimize brl to br during the relax
8184 finalize pass.
8185
ea01195e
AO
81862004-01-30 Alexandre Oliva <aoliva@redhat.com>
8187
8188 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
8189 to bfd_link_hash_entry passed by reference to
8190 _bfd_generic_link_add_one_symbol.
8191
838e70c5
L
81922004-01-25 H.J. Lu <hongjiu.lu@intel.com>
8193
8194 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
8195 relocations against dynamic symbols.
8196
4f199be3
DJ
81972004-01-23 Daniel Jacobowitz <drow@mvista.com>
8198
8199 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
8200 change.
8201
28d39d1a
NC
82022004-01-21 Tom Rix <tcrix@worldnet.att.net>
8203
8204 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
8205 * bfd-in2.h, libbfd.h: Rebuilt.
8206
66bed356
DS
82072004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
8208
8209 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
8210 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
8211 flag has been cleared.
8212
7e89635a
KH
82132004-01-19 Kazu Hirata <kazu@cs.umass.edu>
8214
8215 * coff-h8300.c: Add and adjust comments about relaxation.
8216 * elf32-h8300.c: Likewise.
8217
e804e836
KH
82182004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8219
8220 * coff-h8300.c: Fix comment typos.
8221 * elf32-h8300.c: Likewise.
8222
630a7b0a
KH
82232004-01-16 Kazu Hirata <kazu@cs.umass.edu>
8224
8225 * coff-h8300.c: Add comments about relaxation.
8226 * elf32-h8300.c: Likewise.
8227
f8b73030
MR
82282004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8229
8230 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
8231 throughout.
8232 * aclocal.m4: Regenerate.
8233 * configure: Regenerate.
8234
32159579
ILT
82352004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
8236
8237 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
8238 mips_elf64_rtype_to_howto instead of using howto_table.
8239
c84cd8ee
DJ
82402004-01-13 Daniel Jacobowitz <drow@mvista.com>
8241
8242 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
8243 the .plt section.
8244 (elf32_arm_check_relocs): Don't increment the PLT refcount for
8245 relocs which would not use the PLT.
8246
680a3378
AM
82472004-01-13 Alan Modra <amodra@bigpond.net.au>
8248
8249 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
8250 (ppc64_elf_gc_sweep_hook): Likewise.
8251 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
8252
faca21e5
NC
82532004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
8254
8255 Adds linker relaxation support for bit manipulation insns like
680a3378 8256 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
faca21e5 8257 bst, btst, bxor.
680a3378 8258 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5 8259 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
680a3378 8260 * coff-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5
NC
8261 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
8262
818a27ac
AM
82632004-01-12 Alan Modra <amodra@bigpond.net.au>
8264
8265 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
8266
96ef1419
KH
82672004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8268
8269 * elf32-h8300.c: Fix formatting.
8270
babfd660
KH
82712004-01-11 Kazu Hirata <kazu@cs.umass.edu>
8272
8273 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
8274 dynamic object is present. Declare r_symndx and h in an inner
8275 scope.
8276 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
8277
7359ea65
DJ
82782004-01-09 Daniel Jacobowitz <drow@mvista.com>
8279
8280 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
8281 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
8282 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
8283 identically. Do not emit PC24 relocations for shared libraries.
8284 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
8285 identically. Don't adjust pc_count.
8286 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
8287 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
8288 adjust count for branch relocations.
8289 (allocate_dynrelocs): Correct typo in call to
8290 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
8291 PC24 or PLT32 relocs when linking.
8292
44e88952
NC
82932004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8294
8295 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
8296 relocation howto with ARM_26 one for consistency.
8297 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
8298 that will be converted to ARM_26D ones, since we always want 'done'
8299 relocations to be reflected in section's data.
8300 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
8301 offset.
8302 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
8303 requested.
8304
1e7fef1d
NC
83052004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
8306
8307 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
8308 are not partial_inplace during a relocatable link.
8309
4f075348
KH
83102004-01-08 Kazu Hirata <kazu@cs.umass.edu>
8311
babfd660 8312 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
4f075348
KH
8313 if no dynamic object is present. Declare r_symndx and h in an
8314 inner scope.
8315
de0d9f33
L
83162004-01-07 H.J. Lu <hongjiu.lu@intel.com>
8317
8318 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
8319 trampoline if it is known out of range.
8320
51532845
AO
83212004-01-06 Alexandre Oliva <aoliva@redhat.com>
8322
8323 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
8324 * elf32-frv.c (_frv_osec_readonly_p): New.
8325 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
8326 undefweak symbol.
8327 (_frv_count_got_plt_entries): Adjust expected count accordingly.
8328 (elf32_frv_relocate_section): Likewise. Error out if attempting
8329 to emit rofixups or dynamic relocs in read-only segments. Use
8330 _bfd_elf_section_offset to adjust r_offsets in rofixups and
8331 dynamic relocations.
8332 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
8333 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
8334 relocations or fixups involving merged sections correctly. Avoid
8335 crash when undefined symbol is referenced by R_FRV_32 or
8336 R_FRV_FUNCDESC_VALUE.
8337 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
8338 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
8339 input section holding local symbol to addend of R_FRV_32 or
8340 R_FRV_FUNCDESC_VALUE dynamic relocation.
8341 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
8342 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
8343 (elf32_frv_always_size_sections): Don't store pointer to
8344 __stacksize symbol in sec_info.
8345 (elf32_frv_modify_segment_map): Look it up here.
8346 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
8347 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
8348 of the lazy PLT entry, not only its offset, as the low word of a
8349 function descriptor.
8350 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
8351 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
8352 if a hash table entry already exists but is not a definition.
8353 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
8354 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
8355 (_frv_add_rofixup): Don't inline.
8356 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
8357 for undefweak symbols.
8358 (elf32_frv_relocate_section): Avoid crash while computing
8359 relocation when linking with shared library. Only emit rofixups
8360 and dynamic relocations for alloc&load sections. Mark binaries
8361 with inter-segment relocations for relocation as a unit.
8362 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
8363 (DEFAULT_STACK_SIZE): New.
8364 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
8365 emit rofixups or dynamic relocs when linking dynamic non-PIE
8366 executables.
8367 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
8368 shared libs too. Reserve the last entry for the GOT pointer.
8369 (elf32_frv_finish_dynamic_sections): Emit it.
8370 (elf32_frv_always_size_sections): New.
8371 (elf32_frv_modify_segment_map): New.
8372 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
8373 sections.
8374 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
8375 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
8376 (elf_backend_always_size_sections): New.
8377 (elf_backend_modify_segment_map): New.
8378 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
8379 * config.bfd: Added frv-*-*linux*.
8380 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
8381 ABS section, instead of crashing.
8382 (elf32_frv_relocate_section): Don't crash before warning about
8383 different segments in non-PIC relocation.
8384 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
8385 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
8386 relocs to undefweak symbols.
8387 (elf32_frv_relocate_section): Ditto for undefined symbols.
8388 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
8389 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
8390 gotfixup section was created.
8391 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
8392 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
8393 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
8394 complain_overflow_signed.
8395 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
8396 have not been allocated.
8397 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
8398 privfd only if dynamic sections were created.
8399 (elf32_frv_relocate_section): Compute gprel_segment, and use it
8400 for GPREL relocs. When linking relocatable FDPIC executables,
8401 emit warnings for relocations that would be illegal on PIE or
8402 shared libraries. Emit rofixup for R_FRV_32 only if input object
8403 is not FDPIC.
8404 (_frv_create_got_section): Define _gp symbol in the rofixup
8405 section.
8406 (elf32_frv_finish_dynamic_sections): If rofixups needed but
8407 dynamic sections missing, error out requesting -melf32frvfd.
8408 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
8409 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
8410 computation of addends from section and global or local symbol
8411 value. Change return type to bfd_boolean, and return a failure if
8412 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
8413 nonzero addend is required.
8414 (elf32_frv_relocate_section): Likewise. Print error for
8415 unsupported nonzero addends.
8416 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
8417 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
8418 force everything local.
8419 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
8420 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
8421 (frv_gotfixup_section): New.
8422 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
8423 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
8424 and relocsfdv.
8425 (_frv_add_rofixup): New.
8426 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
8427 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
8428 improve some ugly conditions.
8429 (elf32_frv_relocate_section): Likewise. Reject inter-segment
8430 relocations in fdpic.
8431 (_frv_create_got_section): Create .rofixup.got section.
8432 (struct _frv_dynamic_got_info): Added fixups.
8433 (_frv_count_got_plt_entries): Account in-GOT relocations into
8434 relocs32, relocsfd and relocsfdv. Account them into relocs or
8435 fixups, as appropriate.
8436 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
8437 sizing of gotrel.
8438 (elf32_frv_finish_dynamic_sections): Verify that the right number
8439 of relocations and fixups was generated.
8440 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
8441 relocsfdv.
8442 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
8443 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
8444 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
8445 descriptor of a (formerly-)global symbol is local.
8446 (struct frv_pic_relocs_info): Adjust comments.
8447 (_frv_emit_got_relocs_plt_entries): Adjust.
8448 (elf32_frv_relocate_section): Likewise.
8449 (_frv_count_got_plt_entries): Likewise.
8450 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
8451 symbol's value to addend in the common preamble. Decay dynamic
8452 symbols to section+offset if they bind or call locally, for GOT
8453 and FUNCDESC_VALUE, respectively.
8454 (elf32_frv_relocate_section): Likewise.
8455 (elf32_frv_check_relocs): Don't register as dynamic symbols of
8456 internal or hidden visibility.
8457 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
8458 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
8459 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
8460 (elf32_frv_relocate_section): Pass relocation addend in. Use
8461 original relocation addend to look up the got relocs/plt entries
8462 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
8463 processing relocations that reference .scommon symbols.
8464 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
8465 Introduce support for dynamic linking.
8466 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
8467 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
8468 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
8469 (frv_reloc_type_lookup): Return REL howtos for executables and
8470 dynamic libraries.
8471 (frv_info_to_howto_rel): New.
8472 (struct frv_elf_link_hash_table): New.
8473 (frv_hash_table, frv_got_section, frv_gotrel_section,
8474 frv_plt_section, frv_pltrel_section, frv_relocs_info,
8475 frv_got_initial_offset, frv_plt_initial_offset): New macros.
8476 (frv_elf_link_hash_table_create): New.
8477 (struct frv_pic_relocs_info): New.
8478 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
8479 (frv_pic_relocs_info_find): New.
8480 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
8481 New.
8482 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
8483 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
8484 (_frv_emit_got_relocs_plt_entries): New.
8485 (elf32_frv_relocate_section): Add support for dynamic linking.
8486 Handle new relocations.
8487 (_frv_create_got_section): New.
8488 (elf32_frv_create_dynamic_sections): New.
8489 (ELF_DYNAMIC_INTERPRETER): New.
8490 (struct _frv_dynamic_got_info): New.
8491 (_frv_count_got_plt_entries): New.
8492 (struct _frv_dynamic_got_plt_info): New.
8493 (_frv_compute_got_alloc_data): New.
8494 (_frv_get_got_entry, _frv_get_fd_entry): New.
8495 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
8496 (_frv_resolve_final_relocs_info): New.
8497 (elf32_frv_size_dynamic_sections): New.
8498 (elf32_frv_finish_dynamic_sections): New.
8499 (elf32_frv_adjust_dynamic_symbol): New.
8500 (elf32_frv_finish_dynamic_symbol): New.
8501 (elf32_frv_check_relocs): Handle new relocs. Explain how the
8502 whole thing works.
8503 (elf_info_to_howto_rel): Define.
8504 (bfd_elf32_bfd_link_hash_table_create): Define.
8505 (elf_backend_create_dynamic_sections): Define.
8506 (elf_backend_adjust_dynamic_symbol): Define.
8507 (elf_backend_size_dynamic_sections): Define.
8508 (elf_backend_finish_dynamic_symbol): Define.
8509 (elf_backend_finish_dynamic_sections): Define.
8510 (elf_backend_want_got_sym): Define.
8511 (elf_backend_got_header_size): Define.
8512 (elf_backend_want_got_plt): Define.
8513 (elf_backend_plt_readonly): Define.
8514 (elf_backend_want_plt_sym): Define.
8515 (elf_backend_plt_header_size): Define.
8516 (elf_backend_may_use_rel_p): Define.
8517 (elf_backend_may_use_rela_p): Define.
8518 (elf_backend_default_use_rela_p): Define.
8519 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
8520 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
8521 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
8522 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
8523 (frv_reloc_map): Map the corresponding BFD relocs to them.
8524 (frv_reloc_type_lookup): ... and back to BFD relocs.
8525 * reloc.c: New relocs.
8526 * bfd-in2.h, libbfd.h: Rebuilt.
8527 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
8528 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
8529 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
8530 R_FRV_FUNCDESC_GOTLO): New.
8531 (frv_reloc_map): Map the corresponding BFD relocs to them.
8532 (frv_reloc_type_lookup): ... and back to BFD relocs.
8533 * reloc.c: New relocs.
8534 * bfd-in2.h, libbfd.h: Rebuilt.
8535
4301eeb1
MR
85362004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8537
8538 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8539 targets to support pages of up to 64kB.
8540 (elf32_bed): Redefine to get a separate backend data structure for
8541 traditional targets.
8542 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8543 targets to support pages of up to 64kB.
8544 (elf64_bed): Redefine to get a separate backend data structure for
8545 traditional targets.
8546 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
8547 targets to support pages of up to 64kB.
8548 (elf32_bed): Redefine to get a separate backend data structure for
8549 traditional targets.
8550
0647ed71
MK
85512004-01-04 Mark Kettenis <kettenis@gnu.org>
8552
8553 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
8554
61adc1a4
NC
85552004-01-02 Mark Kettenis <kettenis@gnu.org>
8556
8557 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
8558 (elf_i386_grok_psinfo): Likewise.
8559
b50c15dc
NC
85602004-01-02 Bernardo Innocenti <bernie@develer.com>
8561
8562 * config.bfd: Add m68k-uClinux target.
8563
2627de83
AM
85642004-01-01 Grant Edwards <grante@visi.com>
8565
8566 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
8567 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
8568 (elf32_h8_gc_sweep_hook): New function.
8569 (elf_backend_gc_mark_hook): Define.
8570 (elf_backend_gc_sweep_hook): Define.
8571 (elf_backend_can_gc_sections): Define.
8572
c9e214e5 8573For older changes see ChangeLog-0203
56882138
AM
8574\f
8575Local Variables:
8576mode: change-log
8577left-margin: 8
8578fill-column: 74
8579version-control: never
8580End:
This page took 0.763267 seconds and 4 git commands to generate.