* elflink.h (elf_gc_mark): Pass in the section whose relocs we are
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
1e2f5b6e
AM
12002-07-01 Alan Modra <amodra@bigpond.net.au>
2
3 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
4 examining to gc_mark_hook, rather than the bfd.
5 (elf_gc_sections): Adjust.
6 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
8 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
9 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
10 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
11 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
12 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
13 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
14 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
15 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
16 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
17 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
18 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
19 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
20 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
21 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
22 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
23 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
24 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
25 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
26 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
27 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
28 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
29 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
30 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
31 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
32 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
33 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
34 redundant local sym tests.
35 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
36 (link_hash_newfunc): Init is_entry.
37 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
38 (ppc64_elf_link_hash_table_create): Init all_local_syms.
39 (create_linkage_sections): Use bfd_make_section_anyway rather than
40 bfd_make_section.
41 (ppc64_elf_mark_entry_syms): New function.
42 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
43 up opd entry to function section map.
44 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
45 relocs that reference the opd section.
46 (edit_opd): New function.
47 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
48 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
49 (get_local_syms): Do so here. Exit if we already have local syms.
50 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
51 read local syms on non-ELF input.
52 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
53 than duplicating it's function here. Adjust free of internal
54 relocs to suit.
55 (ppc64_elf_relocate_section): Adjust local syms in opd section.
56 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
57 * elf32-hppa.c (elf32_hppa_size_stubs): Call
58 _bfd_elf32_link_read_relocs rather than duplicating it's function
59 here. Adjust free of internal relocs to suit.
60
1b71fb54
AJ
612002-07-01 Andreas Jaeger <aj@suse.de>
62
63 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
64 are not allowed in shared libs code, enforce -fPIC.
65
8d28f606
HPN
662002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
67
68 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
69 trailing zero-sequences when there's previous left-over data.
70
5ac81c74
JL
712002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
72
73 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
74 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
75 and opd_rel_sec in order for starting rela section. Check _raw_size.
76 (elf_backend_reloc_type_class): Define.
77
91a4d569
AM
782002-06-27 Kevin Buettner <kevinb@redhat.com>
79
80 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
81 DWARF2 formats.
82
feee612b
AM
832002-06-27 Alan Modra <amodra@bigpond.net.au>
84
85 * cpu-powerpc.c: Comment on ordering of arch_info.
86 * elf32-ppc.c (ppc_elf_object_p): New function.
87 (elf_backend_object_p): Define.
88 * elf64-ppc.c (ppc64_elf_object_p): New function.
89 (elf_backend_object_p): Define.
90
a4e6cefc
JT
912002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
92
93 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
94 * configure: Regenerate.
95
dae2dd0d
NC
962002-06-25 Jason Eckhardt <jle@rice.edu>
97
98 * dwarf2.c (decode_line_info): Check unit->addr_size
99 to read in the proper number of prologue bytes.
100
680f9d5c
NC
1012002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
102
103 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
104 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
105 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
106 been enabled.
dae2dd0d 107
680f9d5c
NC
108 * targets.c (_bfd_target_vector[]): Only include
109 aix5coff64_vec if 64-bit bfd support has been enabled.
110
d4c88bbb
AM
1112002-06-25 Alan Modra <amodra@bigpond.net.au>
112
113 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
114 * elf32-hppa.c (hppa_add_stub): Likewise.
115 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
116 * elflink.h (elf_add_default_symbol): Fix comment typo.
117 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
118 (elf_link_add_object_symbols): Likewise.
119 (elf_link_assign_sym_version): Likewise.
120 * hash.c (bfd_hash_lookup): Likewise.
121 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
122 * section.c (bfd_get_unique_section_name): Likewise.
123 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
124 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
125 (assign_section_numbers): Likewise.
126 (_bfd_elfcore_make_pseudosection): Likewise.
127 (elfcore_grok_lwpstatus): Likewise.
128 (elfcore_grok_win32pstatus): Likewise.
129 (elfcore_write_note): Constify input params. Use PTR instead of
130 void *. Include terminating NUL in namesz. Correct padding.
131 Support NULL "name" param. Use memcpy instead of strcpy.
132 (elfcore_write_prpsinfo): Constify input params.
133 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
134 (elfcore_write_lwpstatus): Likewise.
135 (elfcore_write_pstatus): Likewise.
136 (elfcore_write_prfpreg): Likewise.
137 (elfcore_write_prxfpreg): Likewise.
138 * elf-bfd.h (elfcore_write_note): Update declaration.
139 (elfcore_write_prpsinfo): Likewise.
140 (elfcore_write_prstatus): Likewise.
141 (elfcore_write_pstatus): Likewise.
142 (elfcore_write_prfpreg): Likewise.
143 (elfcore_write_prxfpreg): Likewise.
144 (elfcore_write_lwpstatus): Likewise.
145
b0ac09d2
NC
1462002-06-25 Jason Eckhardt <jle@rice.edu>
147
148 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
149 symbols of type stProc and stStaticProc.
150
1512002-06-25 Nick Clifton <nickc@redhat.com>
152
153 * ecoff.c: VArious formatting fixes.
154
021d6096
AM
1552002-06-25 Alan Modra <amodra@bigpond.net.au>
156
157 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
158
82e51918
AM
1592002-06-25 Alan Modra <amodra@bigpond.net.au>
160
161 * aout-adobe.c: Don't compare against "true" or "false.
162 * aout-target.h: Likewise.
163 * aoutx.h: Likewise.
164 * archive.c: Likewise.
165 * bout.c: Likewise.
166 * cache.c: Likewise.
167 * coff-a29k.c: Likewise.
168 * coff-alpha.c: Likewise.
169 * coff-i386.c: Likewise.
170 * coff-mips.c: Likewise.
171 * coff-or32.c: Likewise.
172 * coff64-rs6000.c: Likewise.
173 * coffcode.h: Likewise.
174 * coffgen.c: Likewise.
175 * cpu-ns32k.c: Likewise.
176 * ecoff.c: Likewise.
177 * ecofflink.c: Likewise.
178 * elf.c: Likewise.
179 * elf32-arm.h: Likewise.
180 * elf32-cris.c: Likewise.
181 * elf32-d30v.c: Likewise.
182 * elf32-i386.c: Likewise.
183 * elf32-mcore.c: Likewise.
184 * elf32-ppc.c: Likewise.
185 * elf32-sh.c: Likewise.
186 * elf32-sh64.c: Likewise.
187 * elf32-v850.c: Likewise.
188 * elf64-alpha.c: Likewise.
189 * elf64-sh64.c: Likewise.
190 * elfcode.h: Likewise.
191 * elfcore.h: Likewise.
192 * elflink.h: Likewise.
193 * elfxx-mips.c: Likewise.
194 * i386os9k.c: Likewise.
195 * ieee.c: Likewise.
196 * libbfd.c: Likewise.
197 * linker.c: Likewise.
198 * mmo.c: Likewise.
199 * nlm32-alpha.c: Likewise.
200 * nlm32-i386.c: Likewise.
201 * nlm32-ppc.c: Likewise.
202 * nlm32-sparc.c: Likewise.
203 * nlmcode.h: Likewise.
204 * oasys.c: Likewise.
205 * pdp11.c: Likewise.
206 * peicode.h: Likewise.
207 * reloc.c: Likewise.
208 * som.c: Likewise.
209 * srec.c: Likewise.
210 * tekhex.c: Likewise.
211 * vms.c: Likewise.
212 * xcofflink.c: Likewise.
213 * elf64-sparc.c: Edit comment to not use "== false".
214
215 * aoutf1.h: Don't use "? true : false".
216 * ecoff.c: Likewise.
217 * format.c: Likewise.
218 * ieee.c: Likewise.
219 * linker.c: Likewise.
220 * mmo.c: Likewise.
221 * oasys.c: Likewise.
222
48fc70a2
AM
2232002-06-23 H.J. Lu <hjl@gnu.org>
224
225 * elflink.h (elf_link_add_archive_symbols): For the default
226 version, check references with only one `@' first.
227
47b7c2db
AM
2282002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
229
230 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
231 function.
232 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
233 symbol table.
234 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
235 (elf64_hppa_size_dynamic_sections): Revise to use
236 elf64_hppa_mark_milli_and_exported_functions.
237 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
238 symbols out of dynamic symbol table.
239
f5d44ba0
AM
2402002-06-23 Alan Modra <amodra@bigpond.net.au>
241
bb3fff1e
AM
242 * Makefile.in: Regenerate.
243 * libbfd.h: Regenerate.
244 * bfd-in2.h: Regenerate.
245 * configure: Regenerate.
246 * po/SRC-POTFILES.in: Regenerate.
247
f5d44ba0
AM
248 * elflink.h: Comment typo fixes.
249
2502002-06-23 H.J. Lu <hjl@gnu.org>
251
252 * elf-bfd.h (elf_link_loaded_list): New structure.
253 (elf_link_hash_table): Add "loaded".
254 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
255 * elflink.h (elf_link_check_versioned_symbol): New function.
256 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
257
cc36acdf
NC
2582002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
259
260 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 261 support an ELF style hash table, return true, indicating that
cc36acdf
NC
262 nothing needed to be done, rather than false, indicating that the
263 section's size could not be computed.
264
4e5ba5b7
DB
2652002-06-18 Dave Brolley <brolley@redhat.com>
266
267 From Catherine Moore, Michael Meissner, Dave Brolley:
268 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
269 * targets.c: Support bfd_elf32_frv_vec.
270 * reloc.c: Add FRV relocs.
271 * configure.in: Add support for bfd-elf32-frv-vec.
272 * config.bfd (targ_cpu): Add support for frv-*-elf.
273 * archures.c: Add frv arch and machines.
274 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
275 (ALL_MACHINES_CFILES): Add cpu-frv.c.
276 (BFD32_BACKENDS): Add elf32-frv.lo.
277 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
278 (cpu-frv.lo): New target.
279 (elf32-frv.lo): New target.
280 * cpu-frv.c: New file.
281 * elf32-frv.c: New file.
282
7ece0d85
JJ
2832002-06-18 Jakub Jelinek <jakub@redhat.com>
284
285 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
286 e_shnum == 0.
287 Only read the first section header if e_shoff is non-zero.
288 Don't consider e_shstrndx if there are no sections.
289
57fb03ac
TR
2902002-06-17 Tom Rix <trix@redhat.com>
291
292 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 293 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
294 complain_overflow_bitfield.
295
341ca622
AM
2962002-06-17 Alan Modra <amodra@bigpond.net.au>
297
767e34d1
AM
298 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
299 (bfd_fdopenr): Likewise.
300 (bfd_openstreamr): Likewise.
301 (bfd_openw): Likewise.
302
341ca622
AM
303 * targets.c: Sort target vecs.
304 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
305 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
306 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
307 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
308 * configure.in: Sort target vecs. Add m88kmach3_vec.
309 * configure: Regenerate.
310
dfbbae4c
HPN
3112002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
312
313 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
314 bpo_reloc_no to break sort order ties, not address of items.
315
d663e1cd
JL
3162002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
317
318 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
319 Skip excluded sections in determing __gp value.
320 (elf_hppa_final_link_relocate): Use the symbol's address in
321 R_PARISC_FPTR64 relocations that don't need an opd entry.
322 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
323 (elf64_hppa_finalize_dynreloc): Likewise.
324 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
325 (elf64_hppa_finish_dynamic_symbol): Break up assert.
326
a8295218
NC
3272002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
328
329 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
330 alignment for .bss, .data and .text sections so that sse and sse2
331 code will work.
332 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
333
3342002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
335
336 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
337 sh[1234]*-elf*.
338
3db4b612
JL
3392002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
340
2cb69dd3
JL
341 * elflink.h (elf_bfd_final_link): Improve error handling for missing
342 dynamic sections.
343
3db4b612
JL
344 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
345 for a symbol that has no output section.
346 (allocate_dynrel_entries): Correct comment.
347 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
348 unless we want one.
349 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
350 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
351 with no section. Remove unnecessary parentheses.
352
f3813499
TR
3532002-06-11 Tom Rix <trix@redhat.com>
354
355 * coffcode.h (coff_compute_section_file_positions): Add data
356 section to AIX loader alignment check.
357
f5d44ba0 358 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
359 alignment to 4 bytes.
360 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
361 power accessor macro.
362 (do_shared_object_padding): Remove invalid assertion.
363
0ebaf185
RS
3642002-06-10 Richard Sandiford <rsandifo@redhat.com>
365
366 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
367 for removed output sections.
368
ebe3e2d1
NC
3692002-06-10 Geoffrey Keating <geoffk@redhat.com>
370
371 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
372 htab_alloc.
373 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
374
0b14c2aa
L
3752002-06-08 H.J. Lu <hjl@gnu.org>
376
377 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
378 work around a long long bug in gcc 2.96 on mips.
379
3c2bfad6
JT
3802002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
381
382 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
383 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
384 Regenerate dependency lists.
385 * Makefile.in: Regenerate.
386 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
387 vax1knetbsd_vec to targ_selvecs.
388 * configure.in: Add vax1knetbsd_vec.
389 * configure: Regenerate.
390 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
391 * vax1knetbsd.c: New file.
392 * vaxnetbsd.c: Update copyright years.
393 (TARGET_PAGE_SIZE): Set to 0x1000.
394 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
395
91149be3
JT
3962002-06-08 Matt Thomas <matt@3am-software.com>
397
398 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
399
21e15248
AM
4002002-06-08 Alan Modra <amodra@bigpond.net.au>
401
402 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
403
986b7daa
AM
4042002-06-08 Alan Modra <amodra@bigpond.net.au>
405
e90b95f6
AM
406 * Makefile.am: Run "make dep-am".
407 * Makefile.in: Regenerate.
408
3f9c735e
AM
409 * armnetbsd.c: Replace CONST with const.
410 * corefile.c: Likewise.
411 * elf32-dlx.c: Likewise.
412 * elf64-mips.c: Likewise.
413 * mmo.c: Likewise.
414 * ns32knetbsd.c: Likewise.
415
986b7daa
AM
416 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
417 table is elf64-sparc.
418
5a659663
TS
4192002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
420
421 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
422 Fix RELA addends to get not shifted in the result. Don't do special
423 handling of R_MIPS_64 for NewABI.
424
9bab7074
AM
4252002-06-07 Alan Modra <amodra@bigpond.net.au>
426
427 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
428 (NAME(aout,slurp_reloc_table)): Likewise.
429 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
430 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
431 (xcoff_write_archive_contents_big): Likewise.
432 (xcoff_generate_rtinit): Likewise.
433 (xcoff_generate_rtinit): Likewise, and check error return.
434 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
435 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
436 (coff_get_normalized_symtab): Likewise.
437 (coff_make_empty_symbol): Likewise.
438 (bfd_coff_set_symbol_class): Likewise.
439 * cofflink.c (coff_link_add_symbols): Likewise.
440 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
441 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
442 (bfd_ecoff_write_accumulated_debug): Likewise.
443 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
444 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
445 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
446 * ieee.c (do_with_relocs): Use bfd_zalloc.
447 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
448 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
449 (NAME(aout,slurp_reloc_table)): Likewise.
450 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
451 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
452 * som.c (som_build_and_write_symbol_table): Likewise.
453 (som_slurp_string_table): Likewise.
454 (som_slurp_symbol_table): Likewise.
455 (som_bfd_ar_write_symbol_stuff): Likewise.
456 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
457 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
458 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
459 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
460 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
461
1126897b
AM
4622002-06-07 Alan Modra <amodra@bigpond.net.au>
463
464 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
465 "group" union.
466 (elf_group_name): Update.
467 (elf_group_id): Define.
468 (bfd_elf_set_group_contents): Declare.
469 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
470 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
471 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
472 that sym for the signature.
473 (_bfd_elf_compute_section_file_positions): Don't call
474 set_group_contents for "ld -r" case.
475 (swap_out_syms): Use bfd_zalloc.
476 * elflink.h (elf_link_add_archive_symbols): Likewise.
477 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
478 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
479
3fad3c7c
AM
4802002-06-07 Alan Modra <amodra@bigpond.net.au>
481
482 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
483 relocs in opd for non-shared too.
484
76f99c63
JL
4852002-06-06 Jeffrey Law <law@redhat.com
486
487 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
488 relocations.
489
7217313c
NC
4902002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
491
492 * merge.c: Include libiberty.h.
493 * elf-strtab.c: Include libiberty.h.
494
6cb22815
AM
4952002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
496
497 * peXXigen.c (pe_print_idata): Remove unused variable.
498
1ed89aa9
NC
4992002-06-06 David Heine <dlheine@tensilica.com>
500
501 * elf.c (assign_file_positions_for_segments): Remove unallocated
502 sections from the section to segment mapping for PT_LOAD segments.
503 Update comment about empty loadable segments.
504
644c4c80
RS
5052002-06-06 Richard Sandiford <rsandifo@redhat.com>
506
507 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
508 is within the .stabstr section.
509
f8ecb12b
AM
5102002-06-06 Alan Modra <amodra@bigpond.net.au>
511
512 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
513 are "const PTR", not "const PTR *".
514 (bfd_elf32_swap_symbol_in): Likewise.
515 (bfd_elf64_swap_symbol_in): Likewise.
516 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
517 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
518 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
519 (elf_link_add_object_symbols): Likewise.
520 (elf_link_record_local_dynamic_symbol): Likewise.
521 (elf_link_input_bfd): Likewise.
522 (elf_gc_mark): Likewise.
523 (elf_reloc_symbol_deleted_p): Likewise.
524 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
525 (mn10200_elf_relax_delete_bytes): Likewise.
526 (mn10200_elf_symbol_address_p): Likewise.
527 (mn10200_elf_get_relocated_section_contents): Likewise.
528 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
529 (mn10300_elf_relax_section): Likewise.
530 (mn10300_elf_relax_delete_bytes): Likewise.
531 (mn10300_elf_symbol_address_p): Likewise.
532 (mn10300_elf_get_relocated_section_contents): Likewise.
533 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
534 (elf32_h8_relax_delete_bytes): Likewise.
535 (elf32_h8_symbol_address_p): Likewise.
536 (elf32_h8_get_relocated_section_contents): Likewise.
537 * elf32-hppa.c (get_local_syms): Likewise.
538 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
539 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
540 * elf32-sh.c (sh_elf_relax_section): Likewise.
541 (sh_elf_relax_delete_bytes): Likewise.
542 (sh_elf_get_relocated_section_contents): Likewise.
543 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
544 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
545 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
546 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
547 * elf64-ppc.c (get_local_syms): Likewise.
548 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
549 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
550
1ed89aa9 5512002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
552
553 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
554
73ff0d56
AM
5552002-06-05 Alan Modra <amodra@bigpond.net.au>
556
9dce4196
AM
557 * elf.c (group_signature): Swap in the whole symbol, and handle
558 extracting section symbol names.
559 (setup_group): Add comment.
560 (set_group_contents): When called from objcopy or ld, arrange for
561 section contents to be written. Write group member output section
562 indices to allow objcopy to reorganize sections.
563 (_bfd_elf_copy_private_section_data): Copy group info.
564
73ff0d56
AM
565 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
566 (bfd_elf32_swap_symbol_in): Update prototype.
567 (bfd_elf64_swap_symbol_in): Likewise.
568 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
569 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
570 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
571 (elf_link_add_object_symbols): Likewise.
572 (elf_link_record_local_dynamic_symbol): Likewise.
573 (elf_link_input_bfd): Likewise.
574 (elf_gc_mark): Likewise.
575 (elf_reloc_symbol_deleted_p): Likewise.
576 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
577 (mn10200_elf_relax_delete_bytes): Likewise.
578 (mn10200_elf_symbol_address_p): Likewise.
579 (mn10200_elf_get_relocated_section_contents): Likewise.
580 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
581 (mn10300_elf_relax_section): Likewise.
582 (mn10300_elf_relax_delete_bytes): Likewise.
583 (mn10300_elf_symbol_address_p): Likewise.
584 (mn10300_elf_get_relocated_section_contents): Likewise.
585 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
586 (elf32_h8_relax_delete_bytes): Likewise.
587 (elf32_h8_symbol_address_p): Likewise.
588 (elf32_h8_get_relocated_section_contents): Likewise.
589 * elf32-hppa.c (get_local_syms): Likewise.
590 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
591 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
592 * elf32-sh.c (sh_elf_relax_section): Likewise.
593 (sh_elf_relax_delete_bytes): Likewise.
594 (sh_elf_get_relocated_section_contents): Likewise.
595 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
596 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
597 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
598 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
599 * elf64-ppc.c (get_local_syms): Likewise.
600 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
601 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
602 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
603 * elf64-alpha.c (alpha_elf_size_info): Likewise.
604 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
605 * elf64-mips.c (mips_elf64_size_info): Likewise.
606 * elf64-s390.c (s390_elf64_size_info): Likewise.
607 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
608
53bfd6b4
MR
6092002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
610
611 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
612 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
613 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
614 _bfd_mips_elf_ignore_discarded_relocs.
615 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
616
d4df96e6
L
6172002-06-05 H.J. Lu <hjl@gnu.org>
618
619 * elfxx-mips.c (mips_elf_calculate_relocation): Call
620 _bfd_elf_rel_local_sym for STT_SECTION relocations against
621 the SEC_MERGE section.
622
e61463e1
AM
6232002-06-05 Alan Modra <amodra@bigpond.net.au>
624
3cac74d0
AM
625 * coff-alpha.c: Update copyright date.
626 * coff-mips.c: Likewise.
627 * xcoff-target.h: Likewise.
628
e61463e1
AM
629 * bfd-in.h: Remove "taken from the source" comment.
630 * libbfd-in.h: Likewise.
631 * libcoff-in.h: Likewise.
632 * bfd-in2.h: Regenerate.
633 * libbfd.h: Regenerate.
634 * libcoff.h: Regenerate.
635
636 * elf.c (bfd_elf_discard_group): Return true.
637 * elf-bfd.h (bfd_elf_discard_group): Declare.
638 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
639 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
640 * bfd.c (bfd_discard_group): Define.
641 * targets.c (struct bfd_target): Add _bfd_discard_group.
642 (BFD_JUMP_TABLE_LINK): Here too.
643 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
644 * aout-adobe.c (aout_32_bfd_discard_group): Define.
645 * aout-target.h (MY_bfd_discard_group): Define.
646 * aout-tic30.c (MY_bfd_discard_group): Define.
647 * binary.c (binary_bfd_discard_group): Define.
648 * bout.c (b_out_bfd_discard_group): Define.
649 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
650 * coffcode.h (coff_bfd_discard_group): Define.
651 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
652 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
653 * i386msdos.c (msdos_bfd_discard_group): Define.
654 * i386os9k.c (os9k_bfd_discard_group): Define.
655 * ieee.c (ieee_bfd_discard_group): Define.
656 * ihex.c (ihex_bfd_discard_group): Define.
657 * mmo.c (mmo_bfd_discard_group): Define.
658 * nlm-target.h (nlm_bfd_discard_group): Define.
659 * oasys.c (oasys_bfd_discard_group): Define.
660 * ppcboot.c (ppcboot_bfd_discard_group): Define.
661 * som.c (som_bfd_discard_group): Define.
662 * srec.c (srec_bfd_discard_group): Define.
663 * tekhex.c (tekhex_bfd_discard_group): Define.
664 * versados.c (versados_bfd_discard_group): Define.
665 * vms.c (vms_bfd_discard_group): Define.
666 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
667 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
668 (aix5coff64_vec): Likewise.
669 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
670
9cba27b2
JT
6712002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
672
673 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
674 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
675 (elf32-sh64-com.lo): New dependency list.
676 * Makefile.in: Regenerate.
677 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
678 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
679 elf32-sh64-com.lo.
680 * configure: Regenerate.
681 * elf32-sh64.c (sh64_address_in_cranges)
682 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
683 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
684 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
685 * elf32-sh64-com.c: ...here. New file.
686
8d2c33be
AM
6872002-06-04 Alan Modra <amodra@bigpond.net.au>
688
689 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
690 ATTRIBUTE_UNUSED on used params.
691 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
692 before calling bfd_section_from_elf_index on local syms.
693 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
694
5b0e55b6
JT
6952002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
696
697 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
698 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
699 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
700 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
701 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
702 * Makefile.in: Regenerate.
703 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
704 (sh64-*-netbsd*): New targets.
705 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
706 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
707 * configure: Regenerate.
708 * elf32-sh64-nbsd.c: New file.
709 * elf64-sh64-nbsd.c: New file.
710 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
711 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
712 bfd_elf64_sh64lnbsd_vec.
713
b885599b
AM
7142002-06-04 Alan Modra <amodra@bigpond.net.au>
715
716 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
717 (bfd_section_from_shdr): Likewise. Set section name of group
718 sections from signature.
719 (group_signature): Split out from setup_group. Ensure symbol table
720 is available.
721 (bfd_elf_discard_group): New function.
722 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
723 .gnu.linkonce* sections if they are members of a group.
724 (set_group_contents): Set GRP_COMDAT flag.
725 * section.c (bfd_discard_group): New function.
726 * bfd-in.h (bfd_elf_discard_group): Declare.
727 * bfd-in2.h: Regenerate.
728 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
729 (elf_linkonce_p): Define.
730
90937f86
AM
7312002-06-04 Alan Modra <amodra@bigpond.net.au>
732
733 * elf.c (bfd_section_from_shdr): Make "name" const.
734 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
735 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
736 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
737 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
738 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
739 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
740 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
741 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
742 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
743 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
744 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
745
cf6fb9ce
MR
7462002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
747
748 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
749 ABI.
750
cedb70c5
KH
7512002-06-02 Kazu Hirata <kazu@cs.umass.edu>
752
753 * elf32-arc.c: Fix formatting.
754 * elf32-arm.h: Likewise.
755 * elf32-cris.c: Likewise.
756 * elf32-dlx.c: Likewise.
757 * elf32-hppa.c: Likewise.
758 * elf32-i386.c: Likewise.
759 * elf32-i386qnx.c: Likewise.
760 * elf32-or32.c: Likewise.
761 * elf32-s390.c: Likewise.
762 * elf32-sh64.c: Likewise.
763 * elf32-vax.c: Likewise.
764 * elf32-xstormy16.c: Likewise.
765 * elf64-alpha.c: Likewise.
766 * elf64-mmix.c: Likewise.
767 * elf64-ppc.c: Likewise.
768 * elf64-s390.c: Likewise.
769 * elf64-sh64.c: Likewise.
770 * elf64-x86-64.c: Likewise.
771
048d873d
RH
7722002-06-02 Richard Henderson <rth@redhat.com>
773
774 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
775 null when there are no got entries for a symbol.
776 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
777 uninitialized variable warning.
778
4a67a098
RH
7792002-06-01 Richard Henderson <rth@redhat.com>
780
781 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
782 undefined symbols here.
783 (elf64_alpha_relax_section): Do it here. Also test for not
784 defined in the current module.
785 (elf64_alpha_relocate_section_r): Split out of ...
786 (elf64_alpha_relocate_section): ... here. Don't dereference
787 NULL when looking up local got entries.
788
f44f99a5
RH
7892002-06-01 Richard Henderson <rth@redhat.com>
790
791 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
792 symbols from JSR relaxation.
793 (elf64_alpha_size_plt_section_1): New.
794 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
795 (elf64_alpha_size_rela_got_1): ... here.
796 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
797 (elf64_alpha_size_rela_got_section): ... here.
798 (elf64_alpha_size_plt_section): New.
799 (elf64_alpha_relax_section): Call them.
800 (elf64_alpha_size_got_sections): Remove output_bfd arg.
801 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
802
9e756d64
RH
8032002-06-01 Richard Henderson <rth@redhat.com>
804
805 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
806 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
807 in shared libraries. Fix DTPRELHI and TPRELHI value.
808 (INSN_ADDQ, INSN_RDUNIQ): New.
809 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
810 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
811 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
812 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
813 Handle GOTDTPREL and GOTTPREL relocations.
814 (elf64_alpha_relax_gprelhilo): New.
815 (elf64_alpha_relax_tls_get_addr): New.
816 (elf64_alpha_relax_find_tls_segment): New.
817 (elf64_alpha_relax_section): Handle TLS relocations.
818 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
819 (elf64_alpha_check_relocs): Set it.
820
c853d7f6
RH
8212002-06-01 Richard Henderson <rth@redhat.com>
822
b646261c
RH
823 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
824
c853d7f6
RH
825 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
826 check; don't suppress dynamic relocs for non-allocated sections.
827
d7e41a96
RH
828 * elf64-alpha.c: Remove dead code.
829
5f333394
AM
8302002-05-31 Alan Modra <amodra@bigpond.net.au>
831
08e0ee05
AM
832 * bfd-in2.h: Regenerate.
833 * libbfd.h: Regenerate.
834 * po/SRC-POTFILES.in: Regenerate.
835
5f333394
AM
836 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
837 space for bss .plt.
838
caf47ea6
AM
8392002-05-31 Graeme Peterson <gp@qnx.com>
840
841 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
842 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
843 Run "make dep-am".
844 * Makefile.in: Regenerate.
845 * config.bfd: Add i[3456]86-*-nto-qnx* support.
846 * configure.in: Add bfd_elf32_i386qnx_vec support.
847 * configure: Regenerate.
848 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
849 is_contained_by_filepos, and copy_private_bfd_data_p.
850 * elf.c (assign_file_positions_for_segments): Call backend
851 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
852 (IS_CONTAINED_BY_FILEPOS): Define.
853 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
854 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
855 Fix non-K&R call to _bfd_error_handler.
856 (_bfd_elf_copy_private_section_data): Use backend
857 copy_private_bfd_data_p.
858 * elf32-i386.c: Don't include elfxx-target.h when
859 ELF32_I386_C_INCLUDED is defined.
860 * elf32-i386qnx.c: New QNX elf backend file.
861 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
862 elf_backend_is_contained_by_filepos, and
863 elf_backend_do_copy_private_bfd_data.
864 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
865
5bc56484
AM
8662002-05-31 Alan Modra <amodra@bigpond.net.au>
867
868 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
869 Move other similar defines to start of file.
870
1b164155
TR
8712002-05-30 Tom Rix <trix@redhat.com>
872
873 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
874 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
875
3765b1be
RH
8762002-05-30 Richard Henderson <rth@redhat.com>
877
878 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
879 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
880 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
881 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
882 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
883 (struct alpha_elf_obj_tdata): Rename total_got_entries and
884 n_local_got_entries to total_got_size and local_got_size.
885 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
886 (alpha_got_entry_size): New.
887 (elf64_alpha_relax_with_lituse): Use it.
888 (elf64_alpha_relax_without_lituse): Likewise.
889 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
890 (get_got_entry): New.
891 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
892 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
893 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
894 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
895 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
896 (elf64_alpha_calc_got_offsets): Likewise.
897 (alpha_dynamic_entries_for_reloc): New.
898 (elf64_alpha_calc_dynrel_sizes): Use it.
899 (elf64_alpha_size_dynamic_sections): Likewise.
900 (elf64_alpha_relocate_section): Handle TLS relocations.
901 * reloc.c: Add Alpha TLS relocations.
902 * bfd-in2.h, libbfd.h: Rebuild.
903
5e226794
NC
9042002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
905
906 * peXXigen.c (pe_print_idata): Remove double printed
907 import table lines; add Bound-To comment.
908
90ace9e9
JT
9092002-05-29 Matt Thomas <matt@3am-software.com>
910
911 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
912 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
913 (elf32-vax.lo): New rule.
914 * Makefile.in: Regenerate.
915 * configure.in (bfd_elf32_vax_vec)
916 (vaxnetbsd_vec): New vectors.
917 * configure: Regenerate.
918 * config.bfd (vax-*-netbsdelf*)
919 (vax-*-netbsdaout*)
920 (vax-*-netbsd*): New targets.
921 * elf32-vax.c: New file.
922 * reloc.c: Add VAX relocations.
923 * bfd-in2.h: Regenerate.
924 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
925
4a253e81
JT
9262002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
927
928 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
929 and bfd_elf32_bigarm_vec to targ_selvecs.
930
6e7c73dd
CF
9312002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
932
933 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
934 with auto-imported symbols.
935
8afb0e02
NC
9362002-05-29 Adam Nemet <anemet@lnxw.com>
937
938 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
939 sections only record bfd.
9bab7074 940 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 941 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 942 * bfd-in2.h: Regenerate.
8afb0e02 943
a95653f5
NC
9442002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
945
946 * syms.c (_bfd_stab_section_find_nearest_line): Move
947 declaration and initialisation of saw_line and saw_func out of
948 for loop.
949
7cdc5bba
AM
9502002-05-29 Alan Modra <amodra@bigpond.net.au>
951
952 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
953 (bfd_elf64_get_symbol_info): Define.
954 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
955
4c7aad1c
AM
9562002-05-29 Andrey Volkov <avolkov@transas.com>
957
958 * cpu-h8300.c: Make default h8300 machine first in machine list.
959
d172d4ba
NC
9602002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
961
962 * config.bfd: Added DLX configuraton.
963 * Makefile.am: Added DLX configuraton.
964 * configure.in: Added DLX configuraton.
965 * archures.c: Add DLX architecure.
966 * reloc.c: Add DLX relocs.
967 * targets.c: Added DLX target vector.
968 * configure: Regenerate.
969 * Makefile.in: Regenreate.
970 * bfd-in2.h: Regenreate.
971 * elf32-dlx.c: New file: Support DLX target.
972 * cpu-dlx.c: New file: Support DLX target.
973
d1329ca3
AM
9742002-05-25 Alan Modra <amodra@bigpond.net.au>
975
428d0de3
AM
976 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
977
d1329ca3
AM
978 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
979 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
980 strings to point inside function code sym string.
981 (func_desc_adjust): Likewise.
982 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
983
3bab7989
ML
9842002-05-24 Michal Ludvig <mludvig@suse.cz>
985
986 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
987 (elf64_x86_64_grok_psinfo): Added.
988
436e8db0
NC
9892002-05-24 TAMURA Kent <kent@netbsd.org>
990
991 * config.bfd: Add a target for i386-netbsdpe.
992
ea1e4b0d
AM
9932002-05-24 Alan Modra <amodra@bigpond.net.au>
994
995 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
996 and is_func_descriptor.
997 (func_desc_adjust): Hide function code sym in shared libs unless
998 there is a matching exported function descriptor sym.
999
13ae64f3
JJ
10002002-05-23 Jakub Jelinek <jakub@redhat.com>
1001
1002 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
1003 for symbols from SHF_TLS section.
1004 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
1005 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
1006 (map_sections_to_segments): Build PT_TLS segment if necessary.
1007 (assign_file_positions_for_segments): Likewise.
1008 (get_program_header_size): Account for PT_TLS segment.
1009 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
1010 SEC_THREAD_LOCAL sections to STT_TLS.
1011 * reloc.c: Add 386 and IA-64 TLS relocs.
1012 * section.c (SEC_THREAD_LOCAL): Define.
1013 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
1014 Remove.
1015 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
1016 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
1017 unconditionally.
1018 (struct elf_final_link_info): Add first_tls_sec.
1019 (elf_bfd_final_link): Set first_tls_sec.
1020 Compute elf_hash_table (info)->tls_segment.
1021 (elf_link_output_extsym): Handle STT_TLS symbols.
1022 (elf_link_input_bfd): Likewise.
1023 * syms.c (BSF_THREAD_LOCAL): Define.
1024 * bfd-in2.h: Rebuilt.
1025 * libbfd.h: Rebuilt.
1026 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
1027 elf_i386_mkobject, elf_i386_object_p): New functions.
1028 (elf_howto_table): Add TLS relocs.
1029 (elf_i386_reloc_type_lookup): Support TLS relocs.
1030 (elf_i386_info_to_howto_rel): Likewise.
1031 (struct elf_i386_link_hash_entry): Add tls_type.
1032 (struct elf_i386_obj_tdata): New.
1033 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
1034 New macros.
1035 (struct elf_i386_link_hash_table): Add tls_ldm_got.
1036 (link_hash_newfunc): Clear tls_type.
1037 (elf_i386_check_relocs): Support TLS relocs.
1038 (elf_i386_gc_sweep_hook): Likewise.
1039 (allocate_dynrelocs): Likewise.
1040 (elf_i386_size_dynamic_sections): Likewise.
1041 (elf_i386_relocate_section): Likewise.
1042 (elf_i386_finish_dynamic_symbol): Likewise.
1043 (bfd_elf32_mkobject, elf_backend_object_p): Define.
1044 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
1045 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
1046 want_tprel, want_dtpmod, want_dtprel.
1047 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
1048 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
1049 R_IA64_LTOFF_TPREL22.
1050 (elf_code_to_howto_index): Add TLS relocs.
1051 (elfNN_ia64_check_relocs): Support TLS relocs.
1052 (allocate_global_data_got): Account for TLS .got data.
1053 (allocate_dynrel_entries): Account for TLS dynamic relocations.
1054 (elfNN_ia64_install_value): Supprt TLS relocs.
1055 (set_got_entry): Support TLS relocs.
1056 (elfNN_ia64_relocate_section): Likewise.
1057
c62e1cc3
NC
10582002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
1059
1060 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
1061 BLX reloc round the relocation up rather than down.
1062 * coff-arm.c (coff_arm_relocate_section): Likewise.
1063
c5a43a5d
L
10642002-05-21 H.J. Lu (hjl@gnu.org)
1065
1066 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
1067 definition.
1068
afbe61cf
AM
10692002-05-22 Alan Modra <amodra@bigpond.net.au>
1070
1071 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
1072 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
1073
9c07fe7c
AM
10742002-05-22 Alan Modra <amodra@bigpond.net.au>
1075
1076 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
1077 unresolved relocs.
1078 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
1079
21611032
TS
10802002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1081
1082 * bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
1083 non-ELF targets.
1084
41241523
TS
10852002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1086
1087 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
1088 an error value.
1089 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
1090 return with false on error.
1091 (elf_link_input_bfd): Check reloc_emitter return value.
1092
658f2588
JT
10932002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
1094
1095 * config.bfd (armeb-*-netbsdelf*): New target.
1096
c862ae31
AM
10972002-05-20 Alan Modra <amodra@bigpond.net.au>
1098
1099 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
1100 at the plt call stub.
1101
6dd14845
TS
11022002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1103
1104 * cpu-mips.c (mips_compatible): Don't try to check machine
1105 compatibility.
1106
a58d9c34
TR
11072002-05-18 Tom Rix <trix@redhat.com>
1108
1109 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
1110
ef60b7ff
AM
11112002-05-17 Alan Modra <amodra@bigpond.net.au>
1112
1113 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
1114 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
1115 we've already warned about an undefined symbol. Report more
1116 detail on reloc errors.
1117
a703a6ea
AM
11182002-05-17 Alan Modra <amodra@bigpond.net.au>
1119
1120 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
1121 * configure.in: Invoke AM_INSTALL_LIBBFD.
1122 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
1123 (install_libbfd): .. New target.
1124 (uninstall_libbfd): Likewise.
1125 (install-bfdlibLTLIBRARIES): Likewise.
1126 (uninstall-bfdlibLTLIBRARIES): Likewise.
1127 (bfdlibdir): New.
1128 (bfdincludedir): New.
1129 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
1130 * aclocal.m4: Regenerate.
1131 * configure: Regenerate.
1132 * Makefile.in: Regenerate.
1133
2c13d98b
NC
11342002-05-17 Stuart Balfour <sbalfour@cisco.com>
1135
1136 * hash.c (bfd_hash_lookup): Remove computation of len from inside
1137 hash loop.
1138
629936c5
NC
11392002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
1140
1141 * config.bfd: Add targets for sh64-linux (little endian and
1142 big endian).
1143
e4cf60a8
NC
11442002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
1145
1146 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
1147 is located in the same section as the import table. Instead
1148 check, and if necessary load the section containing the thunk.
1149
d1e66cd4
NC
11502002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
1151
1152 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
1153 bfd_bread.
1154 (xcoff64_core_file_matches_executable_p): Replace bfd_read
1155 with bfd_bread.
d1e66cd4 1156
2d653fc7
AM
11572002-05-15 Alan Modra <amodra@bigpond.net.au>
1158
1159 * aix5ppc-core.c: Warning fixes.
1160 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
1161 * aout-target.h (MY_bfd_link_just_syms): Define.
1162 * aout-tic30.c (MY_bfd_link_just_syms): Define.
1163 * bfd.c (bfd_link_just_syms): Define.
1164 * binary.c (binary_bfd_link_just_syms): Define.
1165 * bout.c (b_out_bfd_link_just_syms): Define.
1166 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
1167 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
1168 * coffcode.h (coff_bfd_link_just_syms): Define.
1169 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
1170 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
1171 (_bfd_elf_link_just_syms): Declare.
1172 * elf.c (_bfd_elf_link_just_syms): New function.
1173 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
1174 sections haven't already been discarded by the linker.
1175 * elflink.h (elf_link_add_object_symbols): Likewise for stab
1176 sections and SEC_MERGE sections.
1177 (elf_bfd_discard_info): Similarly here.
1178 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
1179 * i386msdos.c (msdos_bfd_link_just_syms): Define.
1180 * i386os9k.c (os9k_bfd_link_just_syms): Define.
1181 * ieee.c (ieee_bfd_link_just_syms): Define.
1182 * ihex.c (ihex_bfd_link_just_syms): Define.
1183 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
1184 (_bfd_generic_link_just_syms): Declare.
1185 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
1186 * linker.c (_bfd_generic_link_just_syms): New function.
1187 * mmo.c (mmo_bfd_link_just_syms): Define.
1188 * nlm-target.h (nlm_bfd_link_just_syms): Define.
1189 * oasys.c (oasys_bfd_link_just_syms): Define.
1190 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
1191 * som.c (som_bfd_link_just_syms): Define.
1192 * srec.c (srec_bfd_link_just_syms): Define.
1193 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
1194 (BFD_JUMP_TABLE_LINK): And here.
1195 * tekhex.c (tekhex_bfd_link_just_syms): Define.
1196 * versados.c (versados_bfd_link_just_syms): Define.
1197 * vms.c (vms_bfd_link_just_syms): Define.
1198 * libbfd.h: Regenerate.
1199 * bfd-in2.h: Regenerate.
1200
cb7394f2
TS
12012002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1202
1203 * elf32-mips.c: Remove superfluous definitions copied from
1204 elfxx-mips.c.
1205 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
1206 SGIish vectors to check the special case.
1207 (mips_elf_hi16_reloc): Fix comment.
1208 (mips_elf_got16_reloc): Likewise.
1209 (_bfd_mips_elf32_gprel16_reloc): Likewise.
1210 (elf_reloc_map): Code cleanup.
1211 (mips_reloc_map): Add comment.
1212 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
1213 (mips_elf32_rtype_to_howto): Likewise.
1214 (mips_elf32_discard_info): Likewise.
1215 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
1216 lead to IRIX compatibility now.
1217
8dc1a139
TS
12182002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1219
1220 * elfxx-mips.c: Call it IRIX, not Irix in comments.
1221
2051e1b5
JT
12222002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
1223
1224 * config.bfd (shle-*-netbsdelf*): Add target which includes
1225 sh64 support.
1226
83954261
AM
12272002-05-13 David Edelsohn <edelsohn@gnu.org>
1228
1229 * configure.in: Revert 2002-04-07. Instead, auto-configure
1230 HAVE_ST_C_IMPL.
1231 * configure: Regenerate.
1232 * config.in: Regenerate.
1233 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
1234 or AIX_5_CORE.
1235
a9bf1154
NC
12362002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
1237
1238 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
1239 corefiles as well.2
1240 * configure: Regenerate.
1241
3129eb7a
AM
12422002-05-13 Alan Modra <amodra@bigpond.net.au>
1243
1244 * Makefile.am (install-data-local): Install headers to
1245 $(exec_prefix)/include.
1246 * Makefile.in: Regenerate.
1247
a9a32010
DJ
12482002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1249 Daniel Jacobowitz <drow@mvista.com>
1250
1251 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
1252 map BFD_RELOC_RVA.
1253
12542002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
1255
1256 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
1257 hppa*-*-openbsd*): New targets.
1258 * configure.in (alpha*-*-openbsd*): Set COREFILE.
1259 * configure: Regenerate.
1260
f1f0d9ab
TR
12612002-05-10 Tom Rix <trix@redhat.com>
1262
ea1e4b0d 1263 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
1264 xcoff64_ppc_relocate_section.
1265 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
1266 * libxcoff.h: Common xcoff_reloc_type function declaration.
1267
c432ba1a
AM
12682002-05-10 Alan Modra <amodra@bigpond.net.au>
1269
16a10388 1270 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 1271 added in 2002-05-09 commit.
16a10388 1272
c432ba1a
AM
1273 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
1274 don't look for stubs on all undefined syms.
1275
4a335f3d
AM
12762002-05-09 Alan Modra <amodra@bigpond.net.au>
1277
8fc39d5d
AM
1278 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
1279 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
1280 pcrel_offset.
1281
4a335f3d
AM
1282 * elf32-i386.c (elf_howto_table): Comments.
1283 (elf_i386_relocate_section): Handle more relocs for relocatable
1284 linking and against SEC_MERGE sections.
1285
41fcb14e
AM
12862002-05-08 Alan Modra <amodra@bigpond.net.au>
1287
1288 * elf32-ppc.c (ppc_elf_create_got): New function.
1289 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 1290 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
1291 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
1292 _bfd_elf_create_got_section.
1293
b491616a
AM
12942002-05-07 Alan Modra <amodra@bigpond.net.au>
1295
1296 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
1297 * elfxx-target.h (elf_backend_rela_normal): Define.
1298 (elfNN_bed): Init rela_normal.
1299 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
1300 for section symbols here if rela_normal. Simplify abs section test.
1301 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
1302 return immediately. Remove code handling relocatable linking.
1303 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1304 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1305 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1306 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1307 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1308 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1309 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1310 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1311 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1312 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1313 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1314 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1315 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1316 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1317 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
1318 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1319 * elf-m10200.c (elf_backend_rela_normal): Define.
1320 * elf-m10300.c (elf_backend_rela_normal): Define.
1321 * elf32-fr30.c (elf_backend_rela_normal): Define.
1322 * elf32-i370.c (elf_backend_rela_normal): Define.
1323 * elf32-i860.c (elf_backend_rela_normal): Define.
1324 * elf32-m68k.c (elf_backend_rela_normal): Define.
1325 * elf32-mcore.c (elf_backend_rela_normal): Define.
1326 * elf32-openrisc.c (elf_backend_rela_normal): Define.
1327 * elf32-ppc.c (elf_backend_rela_normal): Define.
1328 * elf32-s390.c (elf_backend_rela_normal): Define.
1329 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
1330 * elf64-ppc.c (elf_backend_rela_normal): Define.
1331 * elf64-s390.c (elf_backend_rela_normal): Define.
1332 * elf64-x86-64.c (elf_backend_rela_normal): Define.
1333 * elfxx-ia64.c (elf_backend_rela_normal): Define.
1334 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
1335 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
1336
df212a7e
NC
13372002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
1338
1339 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
1340 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
1341
3decf53c
AM
13422002-05-06 Alan Modra <amodra@bigpond.net.au>
1343
1344 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
1345 when not relocatable. Fix reloc_emitter call for K&R.
1346
f46c2da6
AM
13472002-05-04 Alan Modra <amodra@bigpond.net.au>
1348
1349 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
1350 reloading local sym addend mistakenly removed in 2002-05-01 change.
1351
1352 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
1353 (read_abbrevs): Change "offset" param to bfd_vma.
1354 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
1355 Change "abbrev_offset" to bfd_vma.
1356 (read_indirect_string): Use correct conversion chars in error
1357 message format string, cast bfd_vma's to unsigned long.
1358 (read_abbrevs): Likewise.
1359 (read_attribute_value): Likewise.
1360 (decode_line_info): Likewise.
1361 (scan_unit_for_functions): Likewise.
1362 (parse_comp_unit): Likewise.
1363
59862849
TR
13642002-05-04 Tom Rix <trix@redhat.com>
1365
1366 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
1367 (coff_swap_reloc_out): Same.
1368 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
1369 (xcoff_swap_reloc_out): Same.
1370 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
1371 case some 16 bit relocs. Add reloc value to output.
1372 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 1373 R_RBR. Improve names.
59862849
TR
1374 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
1375 (bfd_xcoff_backend_data): Update with new reloc swap names.
1376 (bfd_pmac_xcoff_backend_data) : Same.
1377 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
1378 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 1379 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 1380 R_POS. Add reloc value to output.
ea1e4b0d
AM
1381 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
1382 bit R_RBR. Improve names, masks.
59862849
TR
1383 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
1384 (bfd_xcoff_backend_data): Update with new reloc swap names.
1385 (bfd_xcoff_aix5_backend_data) : Same.
1386
b4655ea9
AM
13872002-05-04 Alan Modra <amodra@bigpond.net.au>
1388
1389 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
1390 bfd_count top_index, input_list, all_local_syms.
1391 (elf32_hppa_setup_section_lists): New function, split from
1392 elf32_hppa_size_stubs.
1393 (elf32_hppa_next_input_section): Likewise.
1394 (group_sections): Likewise.
1395 (get_local_syms): Likewise.
1396 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
1397 stubs on undefined syms too.
1398 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 1399 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
1400 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
1401 (elf32_hppa_next_input_section): Declare.
1402
301e3139
AM
14032002-05-04 Bob Byrnes <byrnes@curl.com>
1404
1405 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
1406 _bfd_new_bfd.
1407
7c5fcef7
L
14082002-05-03 H.J. Lu (hjl@gnu.org)
1409
1410 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
1411 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
1412 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
1413 to hide a global symbol.
1414 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 1415 forced_local to true.
7c5fcef7 1416
84de6048
RH
14172002-05-02 Richard Henderson <rth@redhat.com>
1418
1419 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
1420 vs SHN_UNDEF to zero.
1421
805fc799
AM
14222002-05-02 Alan Modra <amodra@bigpond.net.au>
1423
c061c2d8
AM
1424 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
1425 16 bit reloc.
1426 <R_PPC64_SECTOFF_DS>: Likewise.
1427 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
1428 SECTOFF reloc.
1429 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
1430 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
1431 SECTOFF reloc.
1432
805fc799
AM
1433 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
1434 (ppc64_elf_ha_reloc): New function.
1435 (ppc64_elf_brtaken_reloc): New function.
1436 (ppc64_elf_sectoff_reloc): New function.
1437 (ppc64_elf_sectoff_ha_reloc): New function.
1438 (ppc64_elf_toc_reloc): New function.
1439 (ppc64_elf_toc_ha_reloc): New function.
1440 (ppc64_elf_toc64_reloc): New function.
1441 (ppc64_elf_unhandled_reloc): New function.
1442 (ppc64_elf_howto_raw): Use the above.
1443 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
1444 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
1445 <R_PPC64_SECTOFF_DS>: Likewise.
1446 (IS_ABSOLUTE_RELOC): Update.
1447 (struct ppc_link_hash_table): Add have_undefweak.
1448 (ppc64_elf_link_hash_table_create): Init.
1449 (func_desc_adjust): Set have_undefweak.
1450 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
1451 add the .sfpr blr when have_undefweak.
1452 (ppc64_elf_setup_section_lists): Check hash table flavour.
1453 (ppc64_elf_next_input_section): Move output_section->owner test to
1454 ppc64elf.em.
1455 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
1456 and relocatable test. Return TOCstart and don't set elf_gp.
1457 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
1458 offset calculation. Add assert on weak sym branch tweaks.
1459 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
1460 (ppc64_elf_toc): Declare.
1461 (ppc64_elf_next_input_section): Update.
ea1e4b0d 1462
818c39a3
AM
14632002-05-01 Alan Modra <amodra@bigpond.net.au>
1464
1465 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
1466 file_name.
1467
721956f4
AM
14682002-05-01 Alan Modra <amodra@bigpond.net.au>
1469
1470 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
1471 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
1472 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
1473 call branches. Correct undefined weak destination.
1474 (ppc64_elf_func_desc_adjust): Always create at least one blr in
1475 .sfpr, and correct case where either only savef* or restf* is
1476 needed.
1477
1478 Long branch stubs, multiple stub sections.
1479 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
1480 (ppc64_elf_next_input_section): Declare.
1481 * elf64-ppc.c: Move linker-only prototypes.
1482 (STUB_SUFFIX): Define.
1483 (enum ppc_stub_type): New.
1484 (struct ppc_stub_hash_entry): New.
1485 (struct ppc_branch_hash_entry): New.
1486 (struct ppc_link_hash_entry): Add stub_cache, oh.
1487 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
1488 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
1489 Rename plt_overflow to stub_error.
1490 (ppc_stub_hash_lookup): Define.
1491 (ppc_branch_hash_lookup): Define.
1492 (stub_hash_newfunc): New function.
1493 (branch_hash_newfunc): New function.
1494 (link_hash_newfunc): Init new fields.
1495 (ppc64_elf_link_hash_table_create): Likewise.
1496 (ppc64_elf_link_hash_table_free): New function.
1497 (ppc_stub_name): New function.
1498 (ppc_get_stub_entry): New function.
1499 (ppc_add_stub): New function.
1500 (create_linkage_sections): Use bfd_make_section_anyway. Create
1501 .branch_lt and .rela.branch_lt sections. Don't create .stub.
1502 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
1503 and set up for plt call stubs. Link func and func desc syms.
1504 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
1505 (func_desc_adjust): Avoid hash lookup when func desc sym available
1506 via shortcut, and set links when processing.
1507 (ppc64_elf_hide_symbol): Likewise.
1508 (allocate_dynrelocs): Don't allocate stub section here.
1509 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
1510 Remove sstub code.
1511 (ppc_type_of_stub): New function.
1512 (build_one_stub): Delete.
1513 (ppc_build_one_stub): New function.
1514 (ppc_size_one_stub): New function.
1515 (ppc64_elf_setup_section_lists): New function.
1516 (ppc64_elf_next_input_section): New function.
1517 (group_sections): New function.
1518 (get_local_syms): New function.
1519 (ppc64_elf_size_stubs): Rewrite.
1520 (ppc64_elf_build_stubs): Rewrite.
1521 (ppc64_elf_relocate_section): Look up stub entry for REL24
1522 relocs. Don't propagate REL14* to dynamic objects. Look for long
1523 branch stubs if REL14* or REL24 relocs won't reach.
1524 (bfd_elf64_bfd_link_hash_table_free): Define.
1525
09c2219b
MM
15262002-04-30 Mark Mitchell <mark@codesourcery.com>
1527
1528 * bfd/config.bfd: Add support for powerpc-*-windiss.
1529
07b678c0
TR
15302002-04-30 Tom Rix <trix@redhat.com>
1531
1532 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
1533 symbol names into the hash table.
1534
dbe341c6
TR
15352002-04-28 Tom Rix <trix@redhat.com>
1536
1537 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 1538 calulating relocations.
dbe341c6 1539 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
1540 (xcoff_ppc_relocate_section): Use relocation and complain function
1541 tables.
1542 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
1543 (xcoff_complain_overflow_signed_func): Same.
1544 (xcoff_complain_overflow_bitfield_func): Same.
1545 (xcoff_complain_overflow_dont_func): Same.
1546 (xcoff_reloc_type_crel): New recot function.
1547 (xcoff_reloc_type_br): Same.
1548 (xcoff_reloc_type_ba): Same.
1549 (xcoff_reloc_type_toc): Same.
1550 (xcoff_reloc_type_rel): Same.
1551 (xcoff_reloc_type_neg): Same.
1552 (xcoff_reloc_type_pos): Same.
1553 (xcoff_reloc_type_fail): Same.
1554 (xcoff_reloc_type_noop): Same.
1555 * libxcoff.h : Declare common parts for xcoff64.
1556 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 1557 and complain function tables.
dbe341c6 1558
985142a4
AM
15592002-04-28 Alan Modra <amodra@bigpond.net.au>
1560
1561 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
1562 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
1563
eba91044
AM
15642002-04-26 Alan Modra <amodra@bigpond.net.au>
1565
e54fdaa5
AM
1566 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
1567 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
1568
a50c1845
AM
1569 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
1570 same as the output before calling elf_link_input_bfd.
1571
eba91044
AM
1572 * coffcode.h (coff_compute_section_file_positions): Set
1573 section_tail after shuffling section list.
1574
3c25c5f6
NC
15752002-04-24 Christian Groessler <chris@groessler.org>
1576
1577 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
1578 addresses are 23bit with a special layout, not plain 32bit
1579 values. Prevent relocation of immediate values.
1580
40d32fc6
CD
15812002-04-24 Chris G. Demetriou <cgd@broadcom.com>
1582
1583 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
1584 MIPS-16 ASE flags are set, print something to indicate that.
1585
067fa4a6
AM
15862002-04-23 Alan Modra <amodra@bigpond.net.au>
1587
1588 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
1589 under which a plt call stub is used.
1590 (final_link_relocate): Similarly.
1591 (allocate_plt_static): Clear h-plabel except when plt entry is
1592 exclusively used for a plabel.
1593 (allocate_dynrelocs): Use the above to simplify plt sizing.
1594 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
1595 (elf32_hppa_link_hash_table_create): Init.
1596 (BL22_RP): Define.
1597 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
1598 (elf32_hppa_check_relocs): Set has_22bit_branch.
1599
1600 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
1601 (final_link_relocate): Likewise.
1602
af40ce3c
JJ
16032002-04-22 Jakub Jelinek <jakub@redhat.com>
1604
1605 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
1606 search table if some FDE is DW_EH_PE_aligned encoded either.
1607 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
1608
09ae86c2
JJ
16092002-04-22 Richard Smith <richard@ex-parrot.com>
1610 Jakub Jelinek <jakub@redhat.com>
1611
1612 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
1613 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
1614 encoded personality.
1615 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
1616 for CIE/FDE removal.
1617
deeb2cd7
TR
16182002-04-20 Tom Rix <trix@redhat.com>
1619
1620 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
1621
99dc0092
AM
16222002-04-20 Alan Modra <amodra@bigpond.net.au>
1623
aa3d5824
AM
1624 * archures.c (bfd_lookup_arch): Move the list order comment..
1625 (struct bfd_arch_info): ..to where it belongs.
1626 * bfd-in2.h: Regenerate.
1627
99dc0092
AM
1628 * archures.c (bfd_lookup_arch): Add comment on list order.
1629 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
1630 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
1631 is always at head of list.
1632
7831a775
NC
16332002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
1634
1635 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
1636 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
1637 definition of these functions for ARM_WINCE builds as they are
1638 not used.
ea1e4b0d 1639 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
1640 for ARM_WINCE builds.
1641
16422002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
1643
ea1e4b0d 1644 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
1645
16462002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
1647
1648 * cpu-sh.c (scan_mach): Delete.
1649 (arch_info_struct): Replace scan_mach with bfd_default_scan.
1650 (bfd_sh_arch): Likewise.
1651
3d8dbe36
NC
16522002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
1653
1654 * ihex.c (ihex_write_object_contents): Fix check for records
1655 crossing 64K boundaries.
1656
4ab82700
AM
16572002-04-16 Alan Modra <amodra@bigpond.net.au>
1658
1659 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
1660 type rather than just assuming entries are ELF.
1661 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
1662 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
1663 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
1664 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
1665 rather than elf_link_hash_entry.
1666
036fe0fe
RH
16672002-04-15 Richard Henderson <rth@redhat.com>
1668
1669 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
1670 n32 binaries.
1671
c4f3d130
NC
16722002-04-15 Michael Snyder <msnyder@redhat.com>
1673
1674 * opncls.c (bfd_close): Write contents if writeable.
1675 Minor formatting tidy-ups.
1676
4ab82700 16772002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
1678
1679 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
1680
0c04d169
MS
16812002-04-12 Michael Snyder <msnyder@redhat.com>
1682
1683 * bfd-in.h (bfd_get_section_lma): New access macro.
1684 Minor white-space fix-up.
1685
89d4966f
AM
16862002-04-12 Alan Modra <amodra@bigpond.net.au>
1687
1688 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
1689 header pad.
1690
8d0da3c2
DD
16912002-04-09 DJ Delorie <dj@redhat.com>
1692
1693 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
1694
05793179
NC
16952002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
1696
1697 * coffcode.h (coff_read_word): New.
1698 (coff_compute_checksum): New.
1699 (coff_apply_checksum): New.
1700 (coff_write_object_contents): Call coff_apply_checksum () to
1701 apply checksum to PE image.
1702
46fe4e66
AM
17032002-04-08 Randolph Chung <tausq@debian.org>
1704
1705 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
1706 (elf32_hppa_final_link): Split out sorting logic to..
1707 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
1708 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
1709
3b5b409c
AC
17102002-04-07 Andrew Cagney <ac131313@redhat.com>
1711
1712 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
1713 pattern.
1714 * configure: Re-generate.
1715
ac7b6ceb
AC
17162002-04-07 Andrew Cagney <ac131313@redhat.com>
1717
1718 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
1719 is greater or equal to 4.3.3.
1720 * configure: Regenerate.
1721 Fix PR gdb/344.
1722
44aa49bb
HPN
17232002-04-05 Hans-Peter Nilsson <hp@axis.com>
1724
1725 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
1726 R_CRIS_32_PCREL>: Fix typo in name.
1727 (cris_elf_check_relocs): Always create .rela.got here when
1728 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
1729 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
1730 assume it's created.
1731
e2d34d7d
DJ
17322002-04-04 Daniel Jacobowitz <drow@mvista.com>
1733
1734 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
1735 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
1736 define.
1737 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
1738 * bfd.c (bfd_link_hash_table_free): Define.
1739 * binary.c (binary_bfd_link_hash_table_free): Define.
1740 * bout.c (b_out_bfd_link_hash_table_free): Define.
1741 * coff-rs6000.c (rs6000coff_vec): Include
1742 _bfd_generic_link_hash_table_free.
1743 (pmac_xcoff_vec): Likewise.
1744 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1745 (aix5coff64_vec): Likewise.
1746 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
1747 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
1748 (bfd_elf32_bfd_link_hash_table_free): Define.
1749 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
1750 (bfd_elf32_bfd_link_hash_table_free): Define.
1751 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
1752 define.
1753 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
1754 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
1755 * ieee.c (ieee_bfd_link_hash_table_free): Define.
1756 * ihex.c (ihex_bfd_link_hash_table_free): Define.
1757 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
1758 (_bfd_generic_link_hash_table_free): Add prototype.
1759 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
1760 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
1761 * linker.c (_bfd_generic_link_hash_table_free): New function.
1762 * mmo.c (mmo_bfd_link_hash_table_free): Define.
1763 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
1764 * oasys.c (oasys_bfd_link_hash_table_free): Define.
1765 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
1766 * som.c (som_bfd_link_hash_table_free): Define.
1767 * srec.c (srec_bfd_link_hash_table_free): Define.
1768 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
1769 * versados.c (versados_bfd_link_hash_table_free): Define.
1770 * vms.c (vms_bfd_link_hash_table_free): New function.
1771 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
1772
1773 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
1774 instead of bfd_alloc.
1775 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
1776 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
1777 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
1778 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
1779 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
1780 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
1781 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
1782 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
1783 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
1784 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
1785 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
1786 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
1787 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
1788 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
1789 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
1790 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1791 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
1792 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
1793 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
1794 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
1795 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1796 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
1797 * m68klinux.c (linux_link_hash_table_create): Likewise.
1798 * sparclinux.c (linux_link_hash_table_create): Likewise.
1799 * sunos.c (sunos_link_hash_table_create): Likewise.
1800 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
1801
1802 * targets.c: Add _bfd_link_hash_table_free to xvec.
1803
1804 * bfd-in2.h: Regenerate.
1805 * libbfd.h: Regenerate.
1806 * libcoff.h: Regenerate.
1807
830629ab
AM
18082002-04-04 Alan Modra <amodra@bigpond.net.au>
1809
1810 * dep-in.sed: Cope with absolute paths.
1811 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
1812 Run "make dep-am".
1813 * Makefile.in: Regenerate.
1814 * coff-arm.c: Fix copyright date.
1815 * cpu-h8300.c: Likewise.
1816 * cpu-i370.c: Likewise.
1817 * cpu-s390.c: Likewise.
1818 * cpu-mips.c: Likewise.
1819 * po/SRC-POTFILES.in: Regenerate.
1820
c6e90b02
TS
18212002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1822
1823 * Makefile.am: Add elfxx-mips.c to the known backends.
1824 (elf32-mips.lo): remove dependency to coff/external.h.
1825 * Makefile.in: Regenerate.
1826 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
1827 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
1828 accordingly.
1829 * configure: Regenerate.
1830 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
1831 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
1832 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
1833 MIPS specific backend functions.
1834 * elf32-mips.c: Moved most code to elfxx-mips.c.
1835 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
1836 static.
1837 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
1838 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
1839 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
1840 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
1841 interface to allow selection of the right REL or RELA howto table.
1842 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
1843 static. Let it refuse n32 objects.
1844 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
1845 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
1846 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
1847 (elf32_mips_ignore_discarded_relocs): Rename from
1848 _bfd_elf32_mips_ignore_discarded_relocs.
1849 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
1850 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
1851 (elf_mips_howto_table_rela): Remove.
1852 * elf64-mips.c: Moved most code to elfxx-mips.c.
1853 (bfd_elf64_bfd_reloc_type_lookup): Make static.
1854 (mips_elf64_rtype_to_howto): New function.
1855 (mips_elf64_object_p): Likewise.
1856 (elf64_mips_irix_compat): Likewise.
1857 * elfxx-mips.c: New file containing common code merged together from
1858 elf32-mips.c and elf64-mips.c.
1859 * elfxx-mips.h: New file containing MIPS specific prototypes from
1860 elf-bfd.h.
1861 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
1862 elf_backend_mips_rtype_to_howto.
1863
d8dce692
AM
18642002-04-04 Alan Modra <amodra@bigpond.net.au>
1865
1866 * srec.c (MAXCHUNK, Chunk): Revise comments.
1867 (srec_write_record): Correct buffer size.
1868 (srec_write_header): Do without intermediate buffer.
1869 (srec_write_section): Validate Chunk.
1870 (srec_write_terminator): Pass NULL instead of dummy buffer.
1871 (srec_write_symbols): Pass file and symbol names directly to
1872 bfd_bwrite so sprintf won't overflow buffer.
1873
b88a866a
JJ
18742002-04-03 Jakub Jelinek <jakub@redhat.com>
1875
1876 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
1877 PC relative relocs against hidden symbols.
1878 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1879
d7866f04
AM
18802002-04-03 Alan Modra <amodra@bigpond.net.au>
1881
1882 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
1883 LMAs, loop over segments until p_vaddr and p_memsz specify an
1884 extent enclosing the section.
1885
9e81ee67
NC
18862002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
1887
1888 * ihex.c (ihex_write_object_contents): Do not allow records to
1889 cross a 64K boundary - wrap if necessary.
1890
d2b64500
JT
18912002-04-01 Nathan Williams <nathanw@wasabisystems.com>
1892
1893 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
1894 which caused the returned LWP ID to always be 0.
1895
e36f7d53
RH
18962002-04-01 Richard Henderson <rth@redhat.com>
1897
1898 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1899 (elf32_sparc_relocate_section): Use it to figure out when to
1900 initialize .got entries.
1901 * elf64-sparc.c: Similarly.
1902
e92d460e
AM
19032002-03-28 Alan Modra <amodra@bigpond.net.au>
1904
1905 * linker.c (link_action): Ignore duplicate warning syms.
1906 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
1907 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
1908 (elf_adjust_dynamic_symbol): Likewise.
1909 (elf_export_symbol): Likewise.
1910 (elf_link_find_version_dependencies): Likewise.
1911 (elf_link_assign_sym_version): Likewise.
1912 (elf_link_sec_merge_syms): Likewise.
1913 (elf_link_output_extsym): Likewise.
1914 (elf_gc_sweep_symbol): Likewise.
1915 (elf_gc_propagate_vtable_entries_used): Likewise.
1916 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1917 (elf_gc_allocate_got_offsets): Likewise.
1918 (elf_collect_hash_codes): Likewise.
1919 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
1920 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
1921 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
1922 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
1923 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
1924 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
1925 (elf_cris_discard_excess_dso_dynamics): Likewise.
1926 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
1927 (mark_PIC_calls): Likewise.
1928 (allocate_plt_static): Likewise.
1929 (allocate_dynrelocs): Likewise.
1930 (readonly_dynrelocs): Likewise.
1931 * elf32-i386.c (allocate_dynrelocs): Likewise.
1932 (readonly_dynrelocs): Likewise.
1933 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
1934 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
1935 * elf32-mips.c (mips_elf_output_extsym): Likewise.
1936 (mips_elf_sort_hash_table_f): Likewise.
1937 (mips_elf_check_mips16_stubs): Likewise.
1938 * elf32-s390.c (allocate_dynrelocs): Likewise.
1939 (readonly_dynrelocs): Likewise.
1940 * elf32-sh.c (sh_elf_discard_copies): Likewise.
1941 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
1942 (xstormy16_relax_plt_realloc): Likewise.
1943 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
1944 (elf64_alpha_output_extsym): Likewise.
1945 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
1946 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
1947 (mips_elf64_check_mips16_stubs): Likewise.
1948 (mips_elf64_output_extsym): Likewise.
1949 * elf64-ppc.c (func_desc_adjust): Likewise.
1950 (allocate_dynrelocs): Likewise.
1951 (readonly_dynrelocs): Likewise.
1952 * elf64-s390.c (allocate_dynrelocs): Likewise.
1953 (readonly_dynrelocs): Likewise.
1954 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
1955 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1956 (readonly_dynrelocs): Likewise.
1957 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
1958 * aoutx.h (aout_link_write_other_symbol): Likewise.
1959 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
1960 (_bfd_coff_write_global_sym): Likewise.
1961 * i386linux.c (linux_tally_symbols): Likewise.
1962 * m68klinux.c (linux_tally_symbols): Likewise.
1963 * sparclinux.c (linux_tally_symbols): Likewise.
1964 * pdp11.c (aout_link_write_other_symbol): Likewise.
1965 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
1966 * xcofflink.c (xcoff_build_ldsyms): Likewise.
1967 (xcoff_write_global_symbol): Likewise.
1968
1969 * cofflink.c (_bfd_coff_final_link): Formatting.
1970 * cpu-mips.c (mips_compatible): Make static, prototype.
1971 * elf32-i386.c (elf_i386_check_relocs): Formatting.
1972 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
1973 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
1974 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
1975 (mips_elf64_final_link): Likewise.
1976 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
1977 prototype.
1978
2106126f
NC
19792002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
1980
1981 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
1982 (SWAP_OUT_RELOC_OFFSET): Define.
1983
b99d1833
AM
19842002-03-27 Gregory Steuck <greg@nest.cx>
1985
1986 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
1987 terminating NULL if empty symbol table.
1988 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
1989
ad43ed4c
L
19902002-03-26 H.J. Lu (hjl@gnu.org)
1991
1992 * elflink.h (elf_link_input_bfd): Revert the last change since
1993 the gcc exception handling isn't fixed yet.
1994
3851fca4
L
19952002-03-26 H.J. Lu (hjl@gnu.org)
1996
1997 * elflink.h (elf_link_input_bfd): Complain about relocations
1998 against local symbols in discarded sections.
1999
b91afed7
AM
20002002-03-26 Alan Modra <amodra@bigpond.net.au>
2001
2002 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
2003
dba143ef
AM
20042002-03-23 Alan Modra <amodra@bigpond.net.au>
2005
2006 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
2007 section file offset for !SEC_LOAD sections.
2008
ee29b9fb
RE
20092002-03-21 Richard Earnshaw <rearnsha@arm.com>
2010
830629ab
AM
2011 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
2012 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 2013
54327882
AM
20142002-03-21 Alan Modra <amodra@bigpond.net.au>
2015
2016 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
2017 Whitespace changes.
2018 * archive.c: Update copyright date.
2019 * bfd-in2.h: Regenerate.
2020 * libbfd.h: Regenerate.
2021 * Makefile.am: Run "make dep-am"
2022 * Makefile.in: Regenerate.
2023 * po/SRC-POTFILES.in: Regenerate.
2024
1ee24f27
DJ
20252002-03-20 Daniel Jacobowitz <drow@mvista.com>
2026
2027 * dwarf2.c (struct funcinfo): Move up.
2028 (lookup_address_in_function_table): New argument function_ptr.
2029 Set it.
2030 (lookup_address_in_line_table): New argument function. If function
2031 is non-NULL, use it to handle ``addr'' before the first line note of
2032 the function.
2033 (comp_unit_find_nearest_line): Update and swap calls to
2034 lookup_address_in_function_table and lookup_address_in_line_table.
2035 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
2036 N_SLINE encountered if we see an N_FUN before any N_SLINE.
2037
51b9608c
TR
20382002-03-20 Tom Rix <trix@redhat.com>
2039
ea1e4b0d 2040 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 2041 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
ea1e4b0d 2042 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 2043
789c90aa
TR
20442002-03-19 Tom Rix <trix@redhat.com>
2045
ea1e4b0d 2046 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
2047 dynamic objects in archives.
2048
1da54d81
HPN
20492002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
2050
2051 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
2052 STT_NOTYPE symbols to STT_OBJECT.
2053
7831a775 20542002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
2055
2056 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
2057
eb1e0e80
NC
20582002-03-18 Tom Rix <trix@redhat.com>
2059
2060 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
2061 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
2062 * coff-rs6000 (do_pad) : New function for archive padding.
2063 (do_copy) : New function for object file copying in archives.
2064 (do_shared_object_padding) : New function for padding shared
2065 objects to their text section alignment in archives.
2066 (bfd_xcoff_ar_achive_set_magic) : Stub.
2067 (xcoff_write_armap_big) : Use do_copy and do_pad.
2068 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
2069 do_copy and do_pad.
2070 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 2071 bfd_xcoff_magic_number.
eb1e0e80
NC
2072 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
2073 fop.
2074 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
2075 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
2076 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
2077 * rs6000-core.c : Update copyright date.
ea1e4b0d 2078 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
2079 csectpp.
2080 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
2081 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
2082 (coff_set_flags) : Use bfd_xcoff_magic_number.
2083 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
2084 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
2085 * Makefile.am : Same.
2086 * config.bfd : Same.
2087 * targets.c : Same.
2088 * configure : Regnerate.
2089 * Makefile.in : Same.
2090 * bfd-in2.h : Same.
2091
a1c259a1
NC
20922002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
2093
2094 * po/fr.po: Updated version.
2095
4dae1ae7
AM
20962002-03-18 Alan Modra <amodra@bigpond.net.au>
2097
2098 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
2099 * libbfd.h: Regenerate.
2100 * archive.c (coff_write_armap): Pass on failures from
2101 bfd_write_bigendian_4byte_int.
2102
36b4f6e7
L
21032002-03-14 H.J. Lu <hjl@gnu.org>
2104
2105 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
2106 error to bfd_error_nonrepresentable_section for reinit_array
2107 section in DSO.
2108
a1aefc76
NC
21092002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
2110
a181be0a
NC
2111 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
2112 OR it in rather than replacing previously selected flags.
2113
a1aefc76
NC
2114 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
2115 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
2116
c119f9b8
AM
21172002-03-14 Alan Modra <amodra@bigpond.net.au>
2118
2119 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
2120 (N): Use the above.
2121 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
2122 ensure reloc size matches before calling elf_link_input_bfd.
2123 Add an assert to check reloc size when counting output relocs.
2124
c295a511
NC
21252002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
2126
2127 * mmo.c (mmo_get_loc): Return NULL rather than false.
2128
9ce88e60
NC
21292002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
2130
2131 * po/fr.po: Updated version.
2132
4ddafab0
AM
21332002-03-13 Alan Modra <amodra@bigpond.net.au>
2134
b74fa2cd
AM
2135 * archures.c (bfd_default_compatible): Test bits_per_word.
2136 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
2137 bfd_default_compatible.
2138 * cpu-i370.c (i370_compatible): Likewise.
2139 * cpu-sparc.c (sparc_compatible): Likewise.
2140 * cpu-h8300.c (compatible): Test in->arch == out->arch.
2141
40b829d4
AM
2142 * elflink.h: Formatting fixes.
2143 (elf_link_output_extsym): Merge undefined and undef weak cases.
2144
4ddafab0
AM
2145 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
2146 when word size of input matches output word size.
2147
dd53c801
AJ
21482002-03-12 Andreas Jaeger <aj@suse.de>
2149
2150 * cpu-i386.c (i386_compatible): New. Use it instead of
2151 bfd_default_compatible.
2152
aa066ac8
L
21532002-03-07 H.J. Lu (hjl@gnu.org)
2154
2155 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
2156 as the type for bfd_reloc_val.
2157
1bf42538
JL
21582002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
2159
2160 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
2161 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
2162 (elf_hppa_final_link_relocate): Correct relocations for indirect
2163 references to local data through the DLT. Fix .opd creation for
2164 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
2165 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
2166 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
2167 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
2168 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
2169 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
2170 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
2171
86eaf01e
JJ
21722002-03-05 Jakub Jelinek <jakub@redhat.com>
2173
2174 * merge.c (_bfd_merge_sections): Don't segfault if there
2175 is nothing to merge due to GC.
2176
c44233aa
AM
21772002-03-05 Alan Modra <amodra@bigpond.net.au>
2178
039cc25f
AM
2179 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
2180 symbols that have been forced local.
2181
c44233aa
AM
2182 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
2183 to output forced local syms for non-shared link.
2184 (elf_link_output_extsym): Tweak condition for calling backend
2185 adjust_dynamic_symbol so that previous behaviour is kept.
2186 Whitespace changes throughout file.
2187
25e27870
L
21882002-03-04 H.J. Lu <hjl@gnu.org>
2189
2190 * elf.c (bfd_section_from_shdr): Handle special sections,
2191 .init_array, .fini_array and .preinit_array.
2192 (elf_fake_sections): Likewise.
2193
2194 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
2195 DT entry only if the section is in output for .init_array,
2196 .fini_array and .preinit_array. Complain about .preinit_array
2197 section in DSO.
2198 (elf_bfd_final_link): Warn zero size for .init_array,
2199 .fini_array and .preinit_array sections.
2200
2201 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
2202 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
2203 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
2204 .preinit_array.
2205
bb2a49f2
AM
22062002-03-04 Alan Modra <amodra@bigpond.net.au>
2207
2208 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
2209 * configure: Regenerate.
2210
38487e5e
TR
22112002-03-02 Tom Rix <trix@redhat.com>
2212
c44233aa
AM
2213 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
2214 symbolic equiv.
38487e5e
TR
2215 * coff-rs6000.c (xcoff_howto_table): Same.
2216
30831527
RH
22172002-03-01 David Mosberger <davidm@hpl.hp.com>
2218
2219 * elflink.h (size_dynamic_sections): If section named
2220 ".preinit_array" exists, create DT_PREINIT_ARRAY and
2221 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
2222 ".init_array" and ".fini_array".
2223 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
2224 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
2225 DT_FINI_ARRAY.
2226
c8e5ddc8
AM
22272002-02-26 Andrew Macleod <amacleod@cygnus.com>
2228
2229 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
2230 dynsyms.
2231
96e0dda4
AM
22322002-02-25 Alan Modra <amodra@bigpond.net.au>
2233
1c5b6bf8
AM
2234 * elf64-hppa.h: Update copyright date.
2235
96e0dda4
AM
2236 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
2237 (ppc64_elf_relocate_section): Don't generate power4 style branch
2238 hints for *_BRTAKEN and *_BRNTAKEN relocs.
2239
0fb19cbc
JJ
22402002-02-22 Jakub Jelinek <jakub@redhat.com>
2241
2242 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
2243 last patch.
2244 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2245
c434dee6
AJ
22462002-02-21 Andreas Jaeger <aj@suse.de>
2247
2248 * elf64-x86-64.c: Major rework that introduces all recent changes
2249 to the x86-64 backend. Get a closer match to elf32-i386.
2250 (struct elf64_x86_64_dyn_relocs): Rename from
2251 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
2252 all users.
2253 (struct elf64_x86_64_link_hash_table): Add short cuts to some
2254 sections.
2255 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
2256 remove casts, initialize new hash members.
2257 (create_got_section): New.
2258 (elf64_x86_64_create_dynamic_sections): New.
2259 (elf64_x86_64_copy_indirect_symbol): New.
2260 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
2261 relocs, .got or .relgot here but do it in allocate_dynrelocs.
2262 Reference count possible .plt and .got entries. Don't test input
2263 section SEC_READONLY here to try to avoid copy relocs, and keep
2264 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
2265 DF_TEXTREL here. Delay setting of variables until needed. Cache
2266 pointer to "sreloc" section in elf_section_data. Tweak condition
2267 under which .got created. Report files with bad relocation
2268 section names.
2269 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
2270 Reference count possible .plt entries. Don't deallocate .got and
2271 .relgot space here.
2272 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
2273 do copy reloc processing for weakdefs. Remove redundant casts and
2274 aborts. Delay setting of vars until needed. Move creation of
2275 dynamic symbols and allocation of .plt and .rela.plt to
2276 allocate_dynrelocs. Replace BFD_ASSERT with abort.
2277 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
2278 (allocate_dynrelocs): New.
2279 (readonly_dynrelocs): New.
2280 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
2281 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
2282 Zero out the dynamic allocated content space.
2283 (elf64_x86_64_discard_copies): Removed.
2284 (elf64_x86_64_relocate_section): Make use of dynamic section
2285 short-cuts. Localise vars, and delay setting. Better error
2286 reporting, replace BFD_ASSERT with abort. Check
2287 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
2288 regular object file and tread the weak definition as the normal
2289 one. Don't discard relocs for undefweak or undefined symbols and
2290 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
2291 relocs.
2292 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
2293 symbols that have been forced local. Use same test to decide if
2294 we can use a relative reloc for got as relocate_section. Expand
2295 SHN_UNDEF comment. Move expressions out of function calls.
2296 Replace BFD_ASSERT with abort.
2297 (bfd_elf64_bfd_final_link): Removed.
2298 (elf_backend_copy_indirect_symbol): Define.
2299
ff3a6ee3
TR
23002002-02-20 Tom Rix <trix@redhat.com>
2301
2302 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
2303 (_bfd_xcoff_reloc_type_lookup): Use it.
2304 * coff64-rs6000.c (xcoff64_howto_table): Same.
2305 (xcoff64_reloc_type_lookup): Same.
c434dee6 2306
a68d41fb
AM
23072002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
2308
2309 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
2310 little endian.
2311
befc3abb
MS
23122002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
2313
2314 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
2315 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
2316 * bfd-in2.h: Regenerate.
2317 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
2318 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
2319 with "s390:64-bit".
2320 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
2321 (elf_s390_reloc_type_lookup): Likewise.
2322 (elf_s390_check_relocs): Likewise.
2323 (elf_s390_gc_sweep_hook): Likewise.
2324 (elf_s390_relocate_section): Likewise.
2325 (elf_s390_object_p): Use renamed architecture define.
2326 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
2327
6eeeec9b
FCE
23282002-02-19 Frank Ch. Eigler <fche@redhat.com>
2329
2330 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
2331
0bb2d96a
JJ
23322002-02-19 Jakub Jelinek <jakub@redhat.com>
2333
2334 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
2335 absptr -> pcrel optimization for shared libs.
2336 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
2337 library cannot be converted to pcrel.
2338 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
2339 relative.
2340 * elf32-i386.c (elf_i386_relocate_section): If
2341 _bfd_elf_section_offset returned -2, skip, but make sure the
2342 relocation is installed.
2343 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
2344 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2345 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2346 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2347 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2348 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2349 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2350 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2351 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2352 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2353 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2354 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2355 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2356 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2357 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
2358 _bfd_elf_section_offset returning -2 the same way as -1.
2359 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
2360 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
2361 and BFD_ASSERT.
2362 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
2363
69f284c7
TR
23642002-02-18 Tom Rix <trix@redhat.com>
2365
2366 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
2367 (bfd_xcoff_size_dynamic_sections): Same.
2368 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
2369 (bfd_xcoff_size_dynamic_sections): Same.
2370 * coff-rs6000.c (xcoff_generate_rtinit): Same.
2371 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
2372 * libxcoff.h (struct xcoff_backend_data_rec): Same.
2373 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
2374 * bfd-in2.h: Regenerate.
2375
82bd7b59
AM
23762002-02-18 Alan Modra <amodra@bigpond.net.au>
2377
2378 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
2379 (struct ppc_link_hash_table): Add sfpr.
2380 (ppc64_elf_link_hash_table_create): Init it.
2381 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
2382 .glink out to..
2383 (create_linkage_sections): ..here. Make .sfpr too.
2384 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
2385 dynobj early.
2386 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
2387 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
2388 ._restf* functions, and create as needed.
2389 (func_desc_adjust): Only force_local for shared libs.
2390
ef1355e8
NC
23912002-02-18 David O'Brien <obrien@FreeBSD.org>
2392
2393 * configure.in: Bump version number post 2.12 branching.
2394 * configure: Regenerate.
2395
dfa36a69
HPN
23962002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
2397
2398 * mmo.c: Correct and improve comments.
2399 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
2400 zero-pad. Use input to fill up non-empty bfd buffer.
2401 (mmo_flush_chunk): New function.
2402 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
2403 changed. Don't emit location specifier if VMA is same as
2404 *LAST_VMAP after omitting leading zero contents. Call
2405 mmo_flush_chunk before emitting location specifier.
2406 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
2407 with mmo_write_loc_chunk calls.
2408 (mmo_internal_write_section): Call mmo_flush_chunk after
2409 mmo_write_chunk.
2410 (mmo_write_symbols_and_terminator): Move :Main to first position
2411 in symbol array. Add faked one if it does not exist if there are
2412 other symbols. Don't add it if there are no symbols at all. Move
2413 out test for value of :Main from symbol loop. Rename table
2414 fakemain to maintable and variable mainsym to fakemain.
2415
ccf00ab6
RH
24162002-02-15 Richard Henderson <rth@redhat.com>
2417
2418 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
2419 section with no got matches any got. Simplify error generaion.
2420
88eaccc2
AM
24212002-02-15 Alan Modra <amodra@bigpond.net.au>
2422
fd96f80f
AM
2423 Support arbitrary length fill patterns.
2424 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
2425 (_bfd_default_link_order): Remove bfd_fill_link_order code.
2426 Call default_data_link_order.
2427 (default_fill_link_order): Delete.
2428 (default_data_link_order): New function.
2429 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
2430 of bfd_fill_link_order with bfd_data_link_order.
2431 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
2432 * elf64-mips.c (mips_elf64_final_link): Likewise.
2433
88eaccc2
AM
2434 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
2435 Correct value returned in "end" for "0x<non-hex>".
2436
e2fd756b
NC
24372002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
2438
2439 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
2440 (scan): Test against 'mach' field in info structure.
2441
edd29cf9
AM
24422002-02-14 Alan Modra <amodra@bigpond.net.au>
2443
2444 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
2445
1e30956e 24462002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
2447
2448 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
2449 EF_M68000.
2450
bf36db18
NC
24512002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
2452
2453 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
2454 non-zero physical addresses when adjusting the LMAs of new
2455 sections.
bf36db18 2456
189c6563
AM
24572002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
2458
2459 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
2460 from _bfd_elf_hppa_gen_reloc_type.
2461 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
2462 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
2463 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
2464 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
2465
e948afaf
AO
24662002-02-12 Alexandre Oliva <aoliva@redhat.com>
2467
2468 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
2469 loading its contents if there's nothing to do in it.
2470
19397422
AM
24712002-02-12 Alan Modra <amodra@bigpond.net.au>
2472
0ad3a73b
AM
2473 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
2474 64k boundary.
2475
19397422
AM
2476 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
2477 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
2478 (ppc64_elf_finish_dynamic_sections): Set values for them.
2479
51316059
MS
24802002-02-11 Michael Snyder <msnyder@redhat.com>
2481
2482 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
2483 * elf.c (elfcore_grok_pstatus): Add prototype.
2484 (elfcore_grok_lwpstatus): Add prototype.
2485 (elfcore_write_lwpstatus): New function.
2486 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
2487
518313c3
AO
24882002-02-11 Alexandre Oliva <aoliva@redhat.com>
2489
2490 * elf32-sh.c: Added missing prototypes.
2491 * elf32-sh64.c: Likewise.
2492 (sh_elf_align_loads): Mark unused args as such.
2493 * elf64-sh64.c: Added missing prototypes.
2494 (struct elf_sh64_link_hash_entry): Fix typo.
2495 (sh_elf64_relocate_section): Fix info argument passed to
2496 _bfd_elf_section_offset.
2497
2c73f9d8
AM
24982002-02-11 Alan Modra <amodra@bigpond.net.au>
2499
2500 * Makefile.am: "make dep-am".
2501 * Makefile.in: Regenerate.
2502 * aclocal.m4: Regenerate.
2503 * config.in: Regenerate.
2504 * configure: Regenerate.
2505
d426c6b0
DJ
25062002-02-10 Daniel Jacobowitz <drow@mvista.com>
2507
2508 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
2509 variable warnings.
2510 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
2511 comparison warning.
2512 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
2513 cast warnings for the common case.
2514
e58ee0cd
HPN
25152002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
2516
2517 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
2518 vectors.
2519 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
2520 vectors.
2521
7793f4d0
RH
25222002-02-09 Richard Henderson <rth@redhat.com>
2523
2524 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
2525 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
2526 (elf64_alpha_relocate_section): Likewise.
2527 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
2528 * bfd-in2.h, libbfd.h: Rebuild.
2529
7e799044
HPN
25302002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
2531
2532 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
2533 that base-plus-offset reloc accounting is consistent.
2534 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
2535 up to date for undefined symbols.
2536
027d73eb
EC
25372002-02-08 Eric Christopher <echristo@redhat.com>
2538
2539 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2540
2541 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
2542 sections for the O32 ABI.
2543
517662d4
CD
25442002-02-08 Chris Demetriou <cgd@broadcom.com>
2545
2546 * elf32-arm.h: Fix formatting of _("...").
2547 * elf32-d10v.c: Likewise.
2548 * elf32-m68k.c: Likewise.
2549 * elf32-mips.c: Likewise.
2550
5e37cc46
NC
25512002-02-08 Ivan Guzvinec <ivang@opencores.org>
2552
2553 * coff-or32.c: Fix compile time warning messages.
2554
fbca6ad9
AO
25552002-02-08 Alexandre Oliva <aoliva@redhat.com>
2556
2557 Contribute sh64-elf.
2558 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
2559 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
2560 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
2561 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
2562 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
2563 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
2564 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
2565 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
2566 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
2567 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
2568 New relocs.
2569 * libbfd.h, bfd-in2.h: Rebuilt.
2570 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
2571 (sh_reloc_map): Map them.
2572 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
2573 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
2574 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
2575 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
2576 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
2577 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
2578 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
2579 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
2580 datalabel_got_offset.
2581 (sh_elf_link_hash_newfunc): Initialize it.
2582 (sh_elf_relocate_section): Augment the scope of
2583 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
2584 GOT and GOTOFF handling to new SHmedia relocation types. Support
2585 GOT_BIAS.
2586 (sh_elf_check_relocs): Likewise.
2587 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
2588 PLT entries using movi_shori_putval. Support GOT_BIAS.
2589 (sh_elf_finish_dynamic_sections): Likewise.
2590 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
2591 relocation, it's now done by the caller.
2592 (GOT_BIAS): New.
2593 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
2594 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
2595 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
2596 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
2597 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
2598 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
2599 sh64_elf64_hash_table): New.
2600 (sh_elf64_howto_table): Introduce new relocs.
2601 (sh_elf64_info_to_howto): Accept new PIC relocs.
2602 (sh_elf64_relocate_section): Augment the scope of
2603 seen_stt_datalabel. Support new PIC relocs.
2604 (sh_elf64_check_relocs): Support new PIC relocs.
2605 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
2606 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
2607 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
2608 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
2609 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
2610 movi_shori_putval, movi_3shori_putval,
2611 sh64_elf64_create_dynamic_sections,
2612 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
2613 sh64_elf64_size_dynamic_sections,
2614 sh64_elf64_finish_dynamic_symbol,
2615 sh64_elf64_finish_dynamic_sections): New.
2616 (elf_backend_create_dynamic-sections,
2617 bfd_elf64_bfd_link_hash_table_create,
2618 elf_backend_adjust_dynamic_symbol,
2619 elf_backend_size_dynamic_sections,
2620 elf_backend_finish_dynamic_symbol,
2621 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
2622 elf_backend_plt_readonly, elf_backend_want_plt_sym,
2623 elf_backend_got_header_size, elf_backend_plt_header_size):
2624 Define.
2625 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
2626 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
2627 match official numbers and names; moved unmaching ones to the
2628 range 0xf2-0xff.
2629 * elf32-sh64.c, elf64-sh64.c: Likewise.
2630 2001-03-12 DJ Delorie <dj@redhat.com>
2631 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
2632 sections.
2633 2001-03-12 DJ Delorie <dj@redhat.com>
2634 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
2635 be aligned.
2636 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
2637 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
2638 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
2639 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
2640 .cranges section with SEC_SORT_ENTRIES set.
2641 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
2642 incoming sorted .cranges section.
2643 (sh64_bfd_elf_copy_private_section_data): New.
2644 (sh64_elf_final_write_processing): Only sort .cranges and modify
2645 start address if called by linker.
2646 2001-01-08 Ben Elliston <bje@redhat.com>
2647 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
2648 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
2649 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
2650 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
2651 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
2652 line. Add comments before all entries.
2653 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
2654 comment.
2655 (sh_elf64_reloc): Correct head comment.
2656 (sh_elf64_relocate_section): Correct spacing.
2657 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
2658 instead call reloc_dangerous callback.
2659 <case R_SH_SHMEDIA_CODE>: New case.
2660 (sh_elf64_gc_mark_hook): Correct spacing.
2661 (sh_elf64_check_relocs): Ditto.
2662 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
2663 New case.
2664 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
2665 functions.
2666 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
2667 clarify describing comment. Add comments before all entries.
2668 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
2669 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
2670 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
2671 Sort .cranges section in final link. Prepare to set bit 0 on
2672 entry address.
2673 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
2674 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
2675 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
2676 .cranges section.
2677 (sh64_backend_section_from_shdr): New, to recognize
2678 SHT_SH5_CR_SORTED on incoming .cranges section.
2679 (elf_backend_section_from_shdr): Define.
2680 (sh64_elf_final_write_processing): Sort outgoing .cranges
2681 section. (New, temporarily disabled:) Set bit 0 on entry address
2682 according to ISA type.
2683 (sh64_find_section_for_address): New.
2684 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
2685 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
2686 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
2687 bfd_malloc, not xmalloc.
2688 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
2689 global.
2690 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
2691 temporarily disabled) setting bit 0 on entry address.
2692 (elf_backend_final_write_processing): Define.
2693 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
2694 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
2695 be a proper relocation for PTA and PTB rather than a marker.
2696 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
2697 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
2698 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
2699 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
2700 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
2701 Zero src_mask.
2702 * elf64-sh64.c: Ditto.
2703 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
2704 * elf32-sh64.c: Include opcodes/sh64-opc.h
2705 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
2706 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
2707 parameters. No unused parameters. Caller changed.
2708 <case R_SH_PT_16>: New case.
2709 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
2710 * Makefile.in: Regenerate.
2711 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
2712 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
2713 all code sections.
2714 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
2715 (sh64_elf_merge_private_data): Ditto.
2716 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
2717 to access stored section flags.
2718 (sh64_elf_final_write_processing): Return immediately unless
2719 called by linker. Use sh64_elf_section_data (cranges) to get size
2720 of linker-generated cranges entries.
2721 (sh64_elf_copy_private_data): Add missing "return true".
2722 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
2723 (sh_elf64_merge_private_data): Ditto.
2724 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
2725 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
2726 elf64-sh64.c:sh64_elf_fake_sections.
2727 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
2728 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
2729 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
2730 (sh64_elf_final_write_processing): New.
2731 (elf_backend_final_write_processing): Define.
2732 (sh64_elf_fake_sections): Get header flags from tdata field.
2733 (sh64_elf_copy_private_data): Do not call
2734 sh64_elf_copy_private_data_internal, just copy e_flags field.
2735 (sh64_elf_merge_private_data): Do not call
2736 sh64_elf_copy_private_data_internal.
2737 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
2738 Remove EF_SH64_ABI64, let ELF size make difference.
2739 Remove SH64-specific BFD section flag.
2740 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
2741 containing SHmedia through elf_section_data (asect)->tdata
2742 non-zero, not using a BFD section flag.
2743 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
2744 (sh64_elf_merge_private_data): Similar.
2745 (elf_backend_section_flags): Don't define.
2746 (sh64_elf_backend_section_flags): Delete.
2747 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
2748 not EF_SH64_ABI64.
2749 (sh_elf64_merge_private_data): Similar.
2750 * section.c (Section flags definitions): Don't define
2751 SEC_SH_ISA_SHMEDIA.
2752 (bfd-in2.h): Regenerate.
2753 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
2754 Make DataLabel references work with partial linking.
2755 * elf32-sh64.c: Fix formatting.
2756 (sh64_elf_link_output_symbol_hook): New.
2757 (elf_backend_link_output_symbol_hook): Define to
2758 sh64_elf_link_output_symbol_hook.
2759 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
2760 undefined if partial linking. Adjust sanity check.
2761 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
2762 (elf_backend_link_output_symbol_hook): Define to
2763 sh64_elf64_link_output_symbol_hook.
2764 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
2765 undefined if partial linking. Adjust sanity check.
2766 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
2767 Implement semantics for inter-file DataLabel references.
2768 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
2769 (sh64_elf64_add_symbol_hook): New.
2770 (sh_elf64_relocate_section): If passing an indirect symbol with
2771 st_type STT_DATALABEL on the way to a symbol with st_other
2772 STO_SH5_ISA32, do not bitor 1 to the relocation.
2773 (elf_backend_add_symbol_hook): Define to
2774 sh64_elf64_add_symbol_hook.
2775 * elf64-sh32.c: Tweak comments.
2776 (DATALABEL_SUFFIX): Define.
2777 (sh64_elf_add_symbol_hook): New.
2778 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
2779 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
2780 symbol with st_type STT_DATALABEL on the way to a symbol with
2781 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
2782 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
2783 Pass through STT_DATALABEL.
2784 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
2785 (elf_backend_get_symbol_type): Define.
2786 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
2787 (elf_backend_get_symbol_type): Define.
2788 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
2789 * elf32-sh64.c: Tweak comments.
2790 (sh64_elf_copy_private_data_internal): Add prototype.
2791 (bfd_elf32_bfd_set_private_flags): Define.
2792 (sh64_elf_copy_private_data_internal): Compare machine name, not
2793 textual BFD target name, to check whether to copy section flag
2794 SHF_SH5_ISA32.
2795 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
2796 Tweak section-contents-type-mismatch message.
2797 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
2798 Validize reloc-types.
2799 * elf64-sh64.c: New file.
2800 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
2801 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
2802 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
2803 Regenerate dependencies.
2804 * Makefile.in: Regenerate.
2805 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
2806 bfd_elf64_sh64l_vec.
2807 * configure.in: Handle bfd_elf64_sh64_vec and
2808 bfd_elf64_sh64l_vec.
2809 * configure: Regenerate.
2810 * po/POTFILES.in: Regenerate.
2811 * po/bfd.pot: Regenerate.
2812 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
2813 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
2814 anything else but EF_SH64 and EF_SH64_ABI64.
2815 (sh64_elf_merge_private_data): Emit error for anything else but
2816 EF_SH64 and EF_SH64_ABI64.
2817 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
2818 from targ_selvecs.
2819 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
2820 bfd_elf32_sh64l_vec as a temporary measure.
2821 * configure: Regenerate.
2822 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
2823 * cpu-sh.c (arch_info_struct): Include sh5 item
2824 unconditionalized.
2825 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
2826 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
2827 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
2828 * elf32-sh64.c: Tweak comments.
2829 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
2830 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
2831 (sh64_elf_copy_private_data_internal): Wrap long line.
2832 (sh64_elf_merge_private_data): Rewrite to allow objects from
2833 SH64 subsets to be linked together.
2834 (INCLUDE_SHMEDIA): Define.
2835 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
2836 Parenthesize plus-expression inside or-expression.
2837 <global symbol>: Ditto.
2838 (sh_elf_set_mach_from_flags): Remove code refusing
2839 deleted EF_SH64_32BIT_ABI flag.
2840 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
2841 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
2842 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
2843 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
2844 (sh_elf_relocate_section) <local symbol>: Or 1 in
2845 calculation of relocation if sym->st_other & STO_SH5_ISA32.
2846 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
2847 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
2848 relocation.
2849 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
2850 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
2851 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
2852 Regenerate dependencies.
2853 * Makefile.in: Regenerate.
2854 * archures.c: Add bfd_mach_sh5.
2855 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
2856 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
2857 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
2858 * configure: Regenerate.
2859 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
2860 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
2861 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
2862 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
2863 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
2864 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
2865 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
2866 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
2867 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
2868 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
2869 in item for SH5.
2870 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
2871 for SHmedia relocs.
2872 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
2873 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
2874 shmedia_prepare_reloc, goto final_link_relocate if it returns
2875 non-zero, else fail as before.
2876 (sh_elf_set_mach_from_flags): Provide function only if not defined
2877 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
2878 (sh_elf_set_private_flags): Provide function only if not defined
2879 as a macro.
2880 (sh_elf_copy_private_data): Similar.
2881 (sh_elf_merge_private_data): Similar.
2882 * section.c (SEC_SH_ISA_SHMEDIA): New.
2883 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
2884 * elf32-sh64.c: New file.
2885 * libbfd.h: Regenerate.
2886 * bfd-in2.h: Regenerate.
2887 * po/POTFILES.in: Regenerate.
2888 * po/bfd.pot: Regenerate.
2889 * bfd-in2.h: Regenerate.
2890 * libbfd.h: Regenerate.
2891
e108f470
DJ
28922002-02-07 Daniel Jacobowitz <drow@mvista.com>
2893
2894 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
2895 been included, not drag it in.
2896 * bfd-in2.h: Regenerate.
2897
259d18a3
L
28982002-02-06 H.J. Lu (hjl@gnu.org)
2899
2900 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
2901 the mach and ISA fields if necessary.
2902
f13b834e
NC
29032002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
2904
2905 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
2906 ARM architecture when an F_ARM_5 flag is detected, since we cannot
2907 be sure exactly which architecture this represents.
2908
82f6addb
NC
29092002-02-05 Nick Clifton <nickc@redhat.com>
2910
2911 * po/tr.po: Updated translation.
2912
899f54f5
AM
29132002-02-05 Alan Modra <amodra@bigpond.net.au>
2914
2915 From Jimi X <jimix@watson.ibm.com>
2916 * archures (bfd_mach_ppc64): Define.
2917 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
2918 (bfd_powerpc_arch): Define.
2919 * bfd-in2.h: Regenerate.
2920 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
2921 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
2922 (bfd_powerpc_archs): Add default powerpc64 arch.
2923
248866a8
AM
29242002-02-05 Alan Modra <amodra@bigpond.net.au>
2925
2926 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
2927 against section syms in readonly sections. Don't do the global
2928 sym check if we find one.
2929 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
2930 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 2931 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
2932 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
2933 (elf_s390_grok_prstatus): Add missing prototype.
2934
4fa5c2a8
HPN
29352002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
2936
2937 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
2938 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
2939 Call bfd_get_section_by_name only once. Initialize
2940 bpodata->n_bpo_relocs_this_section.
2941 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
2942 referring to DSOs.
2943 (bpo_reloc_request_sort_fn): Don't use difference of values as
2944 return-value.
2945
537c972e
DB
29462002-02-02 David O'Brien <obrien@FreeBSD>
2947
2948 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
2949 version 4.5 and later the same as 5-CURRENT.
2950 * configure: Re-generate.
2951
006336b8
JT
29522002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
2953
2954 * config.bfd (hppa*-*-netbsd*): New target.
2955
6c571f00
PT
29562002-01-31 Philipp Thomas <pthomas@suse.de>
2957
19397422
AM
2958 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
2959 to front of message. Unify messages with elf32-arm.h. Use
2960 commas where neccessary.
2961 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
2962 ERROR in messages. Unify messages with coff-arm.c. Correct
2963 VFP/FPA error message.
2964 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
2965 APCS-32 for translation.
6c571f00 2966
930b4cb2
HPN
29672002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
2968
2969 Perform on-demand global register allocation from
2970 R_MMIX_BASE_PLUS_OFFSET relocs.
2971 * elf64-mmix.c (struct bpo_reloc_section_info, struct
2972 bpo_reloc_request, struct bpo_greg_section_info): New.
2973 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
2974 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
2975 _bfd_mmix_check_all_relocs,
2976 _bfd_mmix_prepare_linker_allocated_gregs,
2977 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
2978 (elf_mmix_howto_table): Correct src_mask for most relocs.
2979 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
2980 case.
2981 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
2982 case. Fix typo in comment. New label do_mmix_reloc.
2983 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
2984 store first object file with a base-plus-offset reloc. Call
2985 mmix_elf_check_common_relocs for the part common with mmo.
2986 (mmix_elf_final_link): Write out linker-allocated register
2987 contents section.
2988 (elf_backend_gc_sweep_hook): Define.
2989 (bfd_elf64_bfd_relax_section): Define.
2990
2991 * mmo.c: Don't include <ctype.h>
2992 (mmo_init): Correct init-once logic.
2993
3e36d993
TR
29942002-02-01 Tom Rix <trix@redhat.com>
2995
2996 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
2997
ba323545
AM
29982002-02-01 Alan Modra <amodra@bigpond.net.au>
2999
3000 * Makefile.am: Run "make dep-am"
3001 * Makefile.in: Regenerate.
3002
012884d6
DB
30032002-01-31 David O'Brien <obrien@FreeBSD>
3004
3005 * configure.in: Recognize the differences in core files from FreeBSD
3006 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
3007 5-CURRENT.
3008 * configure: Regenerate.
3009
3b16e843
NC
30102002-01-31 Ivan Guzvinec <ivang@opencores.org>
3011
3012 * coff-or32.c: New file.
3013 * cpu-or32.c: New file.
3014 * elf32-or32.c: New file.
3015 * archures.c: Add support for or32.
3016 * targets.c: Add support for or32.
3017 * bfd-in2.h: Regenerate.
7dc0ab31 3018 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
3019 coff_write_object_contents): Add support for or32.
3020 * config.bfd: Add target.
3021 * configure.in: Add support for or32.
3022 * configure: Regenerate.
3023 * Makefile.am: Add support for or32.
3024 * Makefile.in: Regenerate.
3b16e843
NC
3025 * po/SRC-POTFILES.in: Add or32 files.
3026 * po/bfd.pot: Regenerate.
7dc0ab31 3027
caf8ca8e
NC
30282002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
3029 Don Lindsay <lindsayd@cisco.com>
3030
3031 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
3032 false' with a return of a bfd_reloc_ error code.
3033
e5dfef09
HPN
30342002-01-31 Hans-Peter Nilsson <hp@axis.com>
3035
3036 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3037 unexport unreferenced symbols when --export-dynamic. Call
3038 _bfd_elf_strtab_delref when unexporting.
3039
4e4770d0
DJ
30402002-01-30 Daniel Jacobowitz <drow@mvista.com>
3041
3042 * bfd-in.h: Include <stdbool.h> if it is available.
3043 * bfd-in2.h: Regenerated.
3044
e1fa50e7
AM
30452002-01-31 Alan Modra <amodra@bigpond.net.au>
3046
3047 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
3048 not go via the plt.
3049
b5f79c76
NC
30502002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
3051
b5f79c76
NC
3052 * archures.c: Tidy up formatting of embedded comments.
3053 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 3054 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
3055 * reloc.c: Tidy up formatting of ordinary & embedded comments.
3056 * section.c: Tidy up formatting of embedded comments.
3057 * syms.c: Tidy up formatting of embedded comments.
3058 * targets.c: Tidy up formatting of embedded comments.
3059
3060 * bfd-in2.h: Regenerate.
3061
ca09e32b
NC
30622002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
3063
3064 * vms-tir.c (cmd_name): New function.
3065 (tir_cmd_name): New function.
3066 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
3067 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
3068 Fix formatting.
7dc0ab31 3069
ca09e32b
NC
3070 * peXXigen.c (pe_print_idata): Rearrange message to aid in
3071 translation.
3072 (pe_print_pdata): Rearrange message to aid in translation.
3073
3074 * libbfd.c (warn_deprecated): Rearrange error message to aid in
3075 translation.
3076
3077 * ihex.c (ihex_write_object_contents): Fix spelling typo.
3078
3079 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
3080
3081 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
3082 message to aid in translation.
3083
3084 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
3085 to aid in translation.
3086
3087 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
3088
7dc0ab31 30892002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
3090
3091 * coff-arm.c, elf32-elf.h: Unify messages.
3092
05f64ac6
NC
30932002-01-30 Nick Clifton <nickc@redhat.com>
3094
3095 * po/sv.po: Updated translation.
3096
f5a3e38a
NC
30972002-01-30 Philipp Thomas <pthomas@suse.de>
3098
3099 * dwarf2.c (read_abbrev): Use full section name in error message.
3100 (decode_line_info): Likewise.
661a3fd4
NC
3101
3102 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
3103 message.
3104
d926e03d
AM
31052002-01-30 Alan Modra <amodra@bigpond.net.au>
3106
3107 * elf64-ppc.c (func_desc_adjust): Only provide missing function
3108 descriptor symbols for undefined function code syms. Clear
3109 ELF_LINK_NON_ELF so that they can stay weak.
3110
030d18fb 31112002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 3112 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
3113
3114 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
3115 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
3116 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
3117 generation.
3118 * bfd-in2.h: Regenerate.
3119
fcc76bea
CD
31202002-01-29 Chris Demetriou <cgd@broadcom.com>
3121
3122 * elf32-mips.c: Add additional comments about HI16 relocation
3123 processing.
3124 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
3125 pc-relative relocations. (Reverts change made on 2001-10-31.)
3126 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
3127 for pc-relative relocations.
3128 (mips_elf_calculate_relocation): Add a comment about a kludge
3129 in the R_MIPS_GNU_REL_HI16 handling.
3130 (_bfd_mips_elf_relocate_section): Implement that kludge;
3131 adjust pc-relative HI16 relocation for difference in HI16 and
3132 LO16 addresses, since it can't easily be done in
3133 mips_elf_calculate_relocation.
3134
f9cd9119
MS
31352002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
3136
3137 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
3138 relocations with PC32 relocations for undefined or weak symbols.
3139 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
3140 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
3141
702248bb
JT
31422002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
3143
3144 * elfcore.h (elf_core_file_p): Improve comment for last change.
3145
4867be41
DJ
31462002-01-27 Daniel Jacobowitz <drow@mvista.com>
3147
3148 * configure: Regenerated.
3149
a94cef6a
JT
31502002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
3151
3152 * elfcore.h (elf_core_file_p): Set the machine architecture
3153 before processing the program headers.
3154
7562a296
HPN
31552002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
3156
966abd70
HPN
3157 * configure.in <64-bit configuration>: If using gcc, check and
3158 emit error for egcs-1.1.2.
3159 * configure: Regenerate.
3160
e8eab623
NC
31612002-01-26 Egor Duda <deo@logos-m.ru>
3162
3163 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
3164 as possible to avoid stack corruption.
3165
73896efb
RH
31662002-01-26 Richard Henderson <rth@redhat.com>
3167
3168 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
3169 for non-allocated sections.
3170
31712002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
3172
3173 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
3174 prstat.pr_reg even if it is a struct.
3175
73896efb 31762002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743
NC
3177
3178 * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
3179
3d66c4f7
NC
31802002-01-25 Philipp Thomas <pthomas@suse.de>
3181
3182 * coffgen.c (coff_print_symbol): Don't mark info message
3183 for translation.
3184
9460ecda
NC
31852002-01-25 Nick Clifton <nickc@redhat.com>
3186
3187 * po/fr.po: Updated translation.
3188 * po/es.po: Updated translation.
3189
cc9ff76a
AM
31902002-01-25 Philipp Thomas <pthomas@suse.de>
3191
3192 * coff-alpha.c (alpha_relocate_section): Unify warning message
3193 for GP relative relocations without GP defined.
3194 * coff-mips.c (mips_relocate_section): Likewise.
3195
c68836a9
AM
31962002-01-25 Alan Modra <amodra@bigpond.net.au>
3197
3198 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
3199 unsigned overflow when new_offset < old_offset.
3200
e8eab623 32012002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
3202
3203 * bfd.c (_bfd_abort): Fix typo.
3204
8ba89f17
RH
32052002-01-23 Richard Henderson <rth@redhat.com>
3206
3207 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
3208 plt entries for undefweak symbols.
3209
c6953948
NC
32102002-01-23 Steve Ellcey <sje@cup.hp.com>
3211
3212 * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
3213 DEFAULT_VECTOR.
3214 (bfd_elf64_ia64_hpux_big_vec): Ditto.
3215 (bfd_elf32_h8300_vec): Ditto.
3216
41bd81ab
AM
32172002-01-23 Alan Modra <amodra@bigpond.net.au>
3218
3219 * elf64-ppc.c: Remove stale part of ABI comment.
3220 (NO_OPD_RELOCS): Define.
3221 (ppc64_elf_check_relocs): Use it.
3222 (ppc64_elf_relocate_section): Here too.
3223 (build_one_stub): Don't point function syms at the stub. Instead,
3224 hijack plt.offset.
3225 (ppc64_elf_relocate_section): Check whether REL24 relocs should
3226 really go to the stub. Make all dynamic relocs in opd against
3227 locals.
3228 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
3229 plt.offset.
3230
f304919d
RH
32312002-01-22 Richard Henderson <rth@redhat.com>
3232
3233 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
3234
c0ef99a7
AM
32352002-01-22 Alan Modra <amodra@bigpond.net.au>
3236
60ee0d4a
AM
3237 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
3238 TOC_BASE_OFF adjustment.
3239
c0ef99a7
AM
3240 * Makefile.am: Run "make dep-am".
3241 * Makefile.in: Regenerate.
3242 * po/SRC-POTFILES.in: Regenerate.
3243
64328b46
AM
32442002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
3245
3246 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
3247 host defines.
3248
59953665 32492002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
3250
3251 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
3252 Check for and emit error if sgot is NULL at this point.
3253
9596feea
JT
32542002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
3255
3256 * config.bfd (ia64*-*-netbsd*): New target.
3257
7b45c6e1
AM
32582002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
3259
3260 * som.c (som_write_space_strings): Comment typo fix.
3261
e5094212
AM
32622002-01-21 Alan Modra <amodra@bigpond.net.au>
3263
e86ce104
AM
3264 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
3265 is_func_descriptor fields.
3266 (link_hash_newfunc): Init them.
3267 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
3268 dot are candidates for plt entries. When processing .opd relocs,
3269 set function descriptor strings to point inside function code
3270 string, and set new ppc_link_hash_entry fields.
3271 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
3272 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
3273 function descriptors. It's now done in..
3274 (func_desc_adjust): New.
3275 (ppc64_elf_func_desc_adjust): New.
3276 (define elf_backend_always_size_sections): Define.
3277 (ppc64_elf_hide_symbol): New.
3278 (define elf_backend_hide_symbol): Define.
3279 (allocate_dynrelocs): Remove code looking up function descriptors
3280 as that has been done earlier.
3281 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
3282 table.
3283 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
3284 up function descriptor.
3285 (build_one_stub): Look up the function code sym. Check for
3286 invalid plt offsets.
3287 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
3288 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
3289
e5094212
AM
3290 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
3291 boolean param.
3292 (_bfd_elf_link_hash_hide_symbol): Likewise.
3293 * elflink.h (elf_link_add_object_symbols): Adjust call to
3294 elf_backend_hide_symbol.
3295 (elf_fix_symbol_flags): Likewise.
3296 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
3297 than bfd_alloc.
3298 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
3299 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
3300 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3301 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
3302 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
3303 and adjust to suit.
3304 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
3305 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
3306 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3307
40b8271b
AM
33082002-01-18 Alan Modra <amodra@bigpond.net.au>
3309
3310 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
3311 dynamic function descriptor symbol, not the associated function
3312 symbol.
3313
55baa95b
EC
33142002-01-17 Eric Christopher <echristo@redhat.com>
3315
3316 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
3317
328577ad
NC
33182002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
3319
3320 * po/bfd.pot: Regenerate.
3321 * po/fr.po: Regenerate.
3322
af746e92
AM
33232002-01-17 Alan Modra <amodra@bigpond.net.au>
3324
3325 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
3326 Remove "Elf_Internal_Shdr *" param.
3327 (_bfd_mips_elf_section_from_bfd_section): Ditto.
3328 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
3329 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
3330 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
3331 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
3332 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
3333 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
3334 function to override special sections. Remove hdr arg from
3335 backend call, and don't loop.
3336
175e9962
EC
33372002-01-16 Eric Christopher <echristo@redhat.com>
3338
3339 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
3340 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
3341 relocations requiring gp0 and gp.
3342
96a846ea
RE
33432002-01-16 Richard Earnshaw <rearnsha@arm.com>
3344
175e9962 3345 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
3346 EF_ARM_VFP_FLOAT.
3347 (elf32_arm_print_private_bfd_data): Likewise.
3348
af3ae48d
NC
33492002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
3350
3351 * po/tr.po: Import new version.
3352
10ed1bba
AM
33532002-01-16 Alan Modra <amodra@bigpond.net.au>
3354
3355 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
3356 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
3357 (ORI_R0_R0_0): Correct.
3358
5d1634d7
AM
33592002-01-16 Alan Modra <amodra@bigpond.net.au>
3360
3361 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
3362 when plt_not_loaded.
3363 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
3364 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
3365 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
3366 (ppc64_elf_glink_code): Delete.
3367 (PPC64_ELF_GLINK_SIZE): Delete.
3368 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
3369 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
3370 ORI_R0_R0_0): Define.
3371 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
3372 (struct ppc_link_hash_table): Add sstub and plt_overflow.
3373 (ppc64_elf_link_hash_table_create): Init them.
3374 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
3375 Don't copy to shared lib.
3376 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
3377 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
3378 (allocate_dynrelocs <plt>): Don't change function sym here. Make
3379 room for .stub and .glink code.
3380 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
3381 DT_PPC64_GLINK.
3382 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
3383 bfd_elf64_bfd_final_link.
3384 (bfd_elf64_bfd_final_link): Don't define.
3385 (ppc64_elf_size_stubs): New.
3386 (build_plt_stub): New.
3387 (build_one_stub): New.
3388 (ppc64_elf_build_stubs): New.
3389 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
3390 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
3391 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
3392 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
3393 case output sections not separate. Adjust DT_RELASZ to not
3394 include plt relocs. Set reserved got entry. Set got and plt
3395 entry size.
3396 (elf_backend_got_header_size): Set to 8.
3397 * elf64-ppc.h: New file.
3398
c601ffdb
AM
33992002-01-16 Alan Modra <amodra@bigpond.net.au>
3400
3401 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
3402 sections, use bfd_section_list_remove.
3403 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
3404 * elflink.h (elf_link_add_object_symbols): When removing all
3405 sections, use bfd_section_list_clear.
3406
8fb4cb7f
NC
34072002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
3408
3409 * po/sv.po: New file: Swedish translation.
3410 * configure.in (ALL_LINGUAS): Add sv.
3411 * configure: Regenerate.
3412
d3c456e9
JJ
34132002-01-15 Jakub Jelinek <jakub@redhat.com>
3414
3415 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
3416 * elf.c (merge_sections_remove_hook): New function.
3417 (_bfd_elf_merge_sections): Pass it as 3rd argument to
3418 _bfd_merge_sections.
3419 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
3420 * libbfd.h: Rebuilt.
3421 * merge.c (_bfd_merge_sections): Add remove_hook argument.
3422 Call remove_hook if a SEC_EXCLUDE section is encountered.
3423
1f7fd478
NC
34242002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
3425
3426 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
3427 (xstormy16_reloc_map): Initialise new field with correct howto
3428 table.
3429 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
3430 howto entry.
3431
b87011e9
MS
34322002-01-10 Michael Snyder <msnyder@redhat.com>
3433
3434 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
3435 (elfcore_write_pstatus): Use long instead of pid_t;
3436 * elf-bfd.h: Change prototypes to use long instead of pid_t;
3437
175e9962 34382002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
3439
3440 * elf.c: Update copyright years.
3441 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
3442 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
3443
7c76fa91
MS
34442002-01-08 Michael Snyder <msnyder@redhat.com>
3445
3446 Add capability to write corefile note sections, for gdb.
3447 * elf.c (elfcore_write_note): New function.
3448 (elfcore_write_prpsinfo): New function.
3449 (elfcore_write_prstatus): New function.
3450 (elfcore_write_pstatus): New function.
3451 (elfcore_write_prfpreg): New function.
3452 (elfcore_write_prxfpreg): New function.
97996af6 3453 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 3454
e1fddb6b
AO
34552002-01-08 Alexandre Oliva <aoliva@redhat.com>
3456
3457 * elf.c (elf_fake_sections): Propagate errors from
3458 elf_backend_fake_section.
3459
8d05742f
JT
34602002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
3461
3462 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
3463 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
3464 (elf32-sh-nbsd.lo): New rule.
3465 * Makefile.in: Regenerate.
3466 * config.bfd (sh*le-*-netbsdelf*): New target.
3467 (sh*-*-netbsdelf*): New target.
3468 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
3469 (bfd_elf32_shnbsd_vec): New vector.
3470 (bfd_elf32_shlnbsd_vec): New vector.
3471 * configure: Regenerate.
3472 * elf32-sh-nbsd.c: New file.
3473 * targets.c: Update copyright years.
175e9962 3474 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
3475 bfd_elf32_shnbsd_vec.
3476
1dba4cb4
AH
34772002-01-07 Aldy Hernandez <aldyh@redhat.com>
3478
3479 * coff-rs6000.c (READ20): Use bfd_scan_vma.
3480
47b22aef
GK
34812002-01-07 Geoffrey Keating <geoffk@redhat.com>
3482
3483 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
3484 of a symbol in a section that will be deleted.
3485
be2d1673
NC
34862002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
3487
3488 * po/es.po: New file: Spanish translation.
3489 * configure.in (ALL_LINGUAS): Add es.
3490 * configure: Regenerate.
3491
d9cf1b54
AM
34922002-01-06 Steve Ellcey <sje@cup.hp.com>
3493
3494 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
3495 argument so we can handle HP-UX specially.
3496 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
3497 (elfNN_hpux_backend_section_from_bfd_section): New for support
3498 of SHN_IA_64_ANSI_COMMON.
3499 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
3500 (is_unwind_section_name): Add special HP-UX support.
3501 (elfNN_ia64_section_from_shdr): Add support for more sections.
3502 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
3503 add support for more sections.
3504 (elfNN_ia64_additional_program_headers): Modify
3505 is_unwind_section_name call.
3506 (elfNN_ia64_modify_segment_map): Remove assumption that there is
3507 only one unwind section in segment.
3508
3f3c5c34
AM
35092002-01-06 Alan Modra <amodra@bigpond.net.au>
3510
3511 * syms.c (_bfd_generic_make_empty_symbol): New function.
3512 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
3513 _bfd_generic_make_empty_symbol.
3514 * libbfd.h: Regenerate.
3515 * bfd-in2.h: Regenerate.
3516 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
3517 (hppabsd_core_get_symtab_upper_bound): Don't define.
3518 (hppabsd_core_get_symtab): Likewise.
3519 (hppabsd_core_print_symbol): Likewise.
3520 (hppabsd_core_get_symbol_info): Likewise.
3521 (hppabsd_core_bfd_is_local_label_name): Likewise.
3522 (hppabsd_core_get_lineno): Likewise.
3523 (hppabsd_core_find_nearest_line): Likewise.
3524 (hppabsd_core_bfd_make_debug_symbol): Likewise.
3525 (hppabsd_core_read_minisymbols): Likewise.
3526 (hppabsd_core_minisymbol_to_symbol): Likewise.
3527 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
3528 Formatting fixes.
3529 * hpux-core.c: Similarly.
3530 * irix-core.c: Similarly.
3531 * osf-core.c: Similarly.
3532 * sco5-core.c: Similarly.
3533 * binary.c (binary_make_empty_symbol): Remove function, define as
3534 _bfd_generic_make_empty_symbol.
3535 * ihex.c (ihex_make_empty_symbol): Likewise.
3536 * mmo.c (mmo_make_empty_symbol): Likewise.
3537 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
3538 * srec.c (srec_make_empty_symbol): Likewise.
3539 * versados.c (versados_make_empty_symbol): Likewise.
3540 * vms.c (_bfd_vms_make_empty_symbol): Remove.
3541 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
3542 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
3543 rather than _bfd_vms_make_empty_symbol.
3544 * vms-misc.c (new_symbol): Likewise.
3545
3f0a7f7f
AM
35462002-01-05 Alan Modra <amodra@bigpond.net.au>
3547
9e7b37b3
AM
3548 * section.c (bfd_section_init): Remove unnecessary initialisations.
3549 (bfd_section_list_clear): New function.
3550 (bfd_section_list_remove, bfd_section_list_insert): New macros.
3551 (_bfd_strip_section_from_output): Use them.
3552 * coffcode.h (coff_set_alignment_hook): Likewise.
3553 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
3554 * elf64-mips.c (mips_elf64_final_link): Likewise.
3555 * elf64-mmix.c (mmix_elf_final_link): Likewise.
3556 * sunos.c (sunos_add_dynamic_symbols): Likewise.
3557 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
3558 * bfd-in2.h: Regenerate.
3559
3560 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
3561 rather than doing our own section handling. Clean up after errors
3562 with bfd_release and bfd_section_list_clear. Handle unexpected
3563 flags.
3564 * aoutf1.h (sunos4_core_file_p): Likewise.
3565 * aix386-core.c (aix386_core_file_p): Likewise.
3566 * cisco-core.c (cisco_core_file_validate): Likewise.
3567 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
3568 * trad-core.c (trad_unix_core_file_p): Likewise.
3569
3570 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
3571 with bfd_release and bfd_section_list_clear.
3572 * hpux-core.c (hpux_core_core_file_p): Likewise.
3573 * irix-core.c (irix_core_core_file_p): Likewise.
3574 * lynx-core.c (lynx_core_file_p): Likewise.
3575 * osf-core.c (osf_core_core_file_p): Likewise.
3576 * rs6000-core.c (rs6000coff_core_p): Likewise.
3577 * sco5-core.c (sco5_core_file_p): Likewise.
3578
3f0a7f7f
AM
3579 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
3580 sign extension adjustments without conditionals.
3581
a3aa38ee
JJ
35822002-01-04 Jakub Jelinek <jakub@redhat.com>
3583
3584 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
3585 CIE at .eh_frame start is removed due to no FDEs referencing it.
3586
8a8b2d4b
AJ
35872002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
3588
3589 * config.bfd (x86_64-*-netbsd*): New target.
3590 * configure.in (x86_64-*-netbsd*): Set COREFILE
3591 to netbsd-core.lo.
3592 * configure: Regenerated.
3593
04b5af89
TR
35942002-01-03 Tom Rix <trix@redhat.com>
3595
3596 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
3597 for recent bfd_make_section_anyway change.
3598
51c5503b
NC
35992002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
3600
3601 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
3602 R_ARM_THM_PC11 reloc.
3603
07f7c046
NC
36042002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
3605
3606 * configure.in (LINGUAS): Add ja.
3607 * configure: Regenerate.
3608 * po/ja.po: Import from translation project's web site.
3609
5eefb65f
NC
36102002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
3611
3612 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
3613 messages to ease translation into other languages.
3614
39e90f10 3615For older changes see ChangeLog-0001
56882138
AM
3616\f
3617Local Variables:
3618mode: change-log
3619left-margin: 8
3620fill-column: 74
3621version-control: never
3622End:
This page took 0.270256 seconds and 4 git commands to generate.